Title: [295750] trunk/Source/WebCore
- Revision
- 295750
- Author
- [email protected]
- Date
- 2022-06-22 15:07:32 -0700 (Wed, 22 Jun 2022)
Log Message
Rename attributeContainsJavascriptURL to attributeContainsJavaScriptURL
https://bugs.webkit.org/show_bug.cgi?id=241872
Reviewed by Wenson Hsieh.
with a capital S
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::attributeContainsJavaScriptURL const):
(WebCore::Element::stripScriptingAttributes const):
(WebCore::Element::attributeContainsJavascriptURL const): Deleted.
* Source/WebCore/dom/Element.h:
* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeContentsWithSideEffects):
* Source/WebCore/editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendStartTag):
* Source/WebCore/svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::attributeContainsJavaScriptURL const):
(WebCore::SVGAnimationElement::attributeContainsJavascriptURL const): Deleted.
* Source/WebCore/svg/SVGAnimationElement.h:
Canonical link: https://commits.webkit.org/251755@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/dom/Element.cpp (295749 => 295750)
--- trunk/Source/WebCore/dom/Element.cpp 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/dom/Element.cpp 2022-06-22 22:07:32 UTC (rev 295750)
@@ -2315,7 +2315,7 @@
return attribute.name().namespaceURI().isNull() && attribute.name().localName().startsWith("on"_s);
}
-bool Element::attributeContainsJavascriptURL(const Attribute& attribute) const
+bool Element::attributeContainsJavaScriptURL(const Attribute& attribute) const
{
return isURLAttribute(attribute) && WTF::protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(attribute.value()));
}
@@ -2324,7 +2324,7 @@
{
attributeVector.removeAllMatching([this](auto& attribute) -> bool {
return this->isEventHandlerAttribute(attribute)
- || this->attributeContainsJavascriptURL(attribute)
+ || this->attributeContainsJavaScriptURL(attribute)
|| this->isHTMLContentAttribute(attribute);
});
}
Modified: trunk/Source/WebCore/dom/Element.h (295749 => 295750)
--- trunk/Source/WebCore/dom/Element.h 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/dom/Element.h 2022-06-22 22:07:32 UTC (rev 295750)
@@ -294,7 +294,7 @@
void parserSetAttributes(const Vector<Attribute>&);
bool isEventHandlerAttribute(const Attribute&) const;
- virtual bool attributeContainsJavascriptURL(const Attribute&) const;
+ virtual bool attributeContainsJavaScriptURL(const Attribute&) const;
// Remove attributes that might introduce scripting from the vector leaving the element unchanged.
void stripScriptingAttributes(Vector<Attribute>&) const;
Modified: trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp (295749 => 295750)
--- trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp 2022-06-22 22:07:32 UTC (rev 295750)
@@ -238,7 +238,7 @@
}
if (element->hasAttributes()) {
for (auto& attribute : element->attributesIterator()) {
- if (element->isEventHandlerAttribute(attribute) || element->attributeContainsJavascriptURL(attribute))
+ if (element->isEventHandlerAttribute(attribute) || element->attributeContainsJavaScriptURL(attribute))
attributesToRemove.append({ element.copyRef(), attribute.name() });
}
}
Modified: trunk/Source/WebCore/editing/markup.cpp (295749 => 295750)
--- trunk/Source/WebCore/editing/markup.cpp 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/editing/markup.cpp 2022-06-22 22:07:32 UTC (rev 295750)
@@ -556,7 +556,7 @@
// We'll handle the style attribute separately, below.
if (attribute.name() == styleAttr && shouldOverrideStyleAttr)
continue;
- if (element.isEventHandlerAttribute(attribute) || element.attributeContainsJavascriptURL(attribute))
+ if (element.isEventHandlerAttribute(attribute) || element.attributeContainsJavaScriptURL(attribute))
continue;
#if ENABLE(DATA_DETECTION)
if (replacementType == SpanReplacementType::DataDetector && DataDetection::isDataDetectorAttribute(attribute.name()))
Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (295749 => 295750)
--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2022-06-22 22:07:32 UTC (rev 295750)
@@ -148,7 +148,7 @@
return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
}
-bool SVGAnimationElement::attributeContainsJavascriptURL(const Attribute& attribute) const
+bool SVGAnimationElement::attributeContainsJavaScriptURL(const Attribute& attribute) const
{
if (attribute.name() == SVGNames::fromAttr || attribute.name() == SVGNames::toAttr)
return WTF::protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(attribute.value()));
@@ -160,7 +160,7 @@
}
return false;
}
- return Element::attributeContainsJavascriptURL(attribute);
+ return Element::attributeContainsJavaScriptURL(attribute);
}
void SVGAnimationElement::parseAttribute(const QualifiedName& name, const AtomString& value)
Modified: trunk/Source/WebCore/svg/SVGAnimationElement.h (295749 => 295750)
--- trunk/Source/WebCore/svg/SVGAnimationElement.h 2022-06-22 21:41:28 UTC (rev 295749)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.h 2022-06-22 22:07:32 UTC (rev 295750)
@@ -88,7 +88,7 @@
virtual void resetAnimation();
static bool isSupportedAttribute(const QualifiedName&);
- bool attributeContainsJavascriptURL(const Attribute&) const final;
+ bool attributeContainsJavaScriptURL(const Attribute&) const final;
void parseAttribute(const QualifiedName&, const AtomString&) override;
void svgAttributeChanged(const QualifiedName&) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes