Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2016 21:35:40 +0000 (21:35 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2016 21:35:40 +0000 (21:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159793

Reviewed by Ryosuke Niwa.

Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.

Source/WebCore:

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::installReplacement):
* dom/Element.h:
(WebCore::Element::setIdAttribute):
* editing/ApplyStyleCommand.cpp:
(WebCore::hasNoAttributeOrOnlyStyleAttribute):
(WebCore::createFontElement):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isMailPasteAsQuotationNode):
(WebCore::isInlineNodeWithStyle):
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange):
* editing/htmlediting.cpp:
(WebCore::createTabSpanElement):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
(WebCore::Editor::WebContentReader::readURL):
* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readURL):
* editing/markup.cpp:
(WebCore::createFragmentFromText):
* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::setValue):
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::setValue):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::appendEntry):
(WebCore::FTPDirectoryDocumentParser::createTDForFilename):
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::href):
(WebCore::HTMLAnchorElement::setHref):
(WebCore::HTMLAnchorElement::target):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::target):
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::setHref):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::setType):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
(WebCore::HTMLDetailsElement::toggleOpen):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::setBgColor):
(WebCore::HTMLDocument::setFgColor):
(WebCore::HTMLDocument::setAlinkColor):
(WebCore::HTMLDocument::setLinkColor):
(WebCore::HTMLDocument::setVlinkColor):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setDir):
(WebCore::HTMLElement::setContentEditable):
(WebCore::HTMLElement::setDraggable):
(WebCore::HTMLElement::setSpellcheck):
(WebCore::HTMLElement::setTranslate):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::setFormEnctype):
(WebCore::HTMLFormControlElement::setFormMethod):
(WebCore::HTMLFormControlElement::setAutocorrect):
(WebCore::HTMLFormControlElement::setAutocapitalize):
(WebCore::HTMLFormControlElement::setAutocomplete):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::setAutocorrect):
(WebCore::HTMLFormElement::setAutocapitalize):
(WebCore::HTMLFormElement::setAction):
(WebCore::HTMLFormElement::setEnctype):
(WebCore::HTMLFormElement::setMethod):
(WebCore::HTMLFormElement::target):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
(WebCore::HTMLImageElement::setSrc):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::altText):
(WebCore::HTMLInputElement::setDefaultValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::href):
(WebCore::HTMLLinkElement::target):
(WebCore::HTMLLinkElement::type):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSrc):
(WebCore::HTMLMediaElement::setPreload):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::min):
(WebCore::HTMLMeterElement::setMin):
(WebCore::HTMLMeterElement::max):
(WebCore::HTMLMeterElement::setMax):
(WebCore::HTMLMeterElement::value):
(WebCore::HTMLMeterElement::setValue):
(WebCore::HTMLMeterElement::low):
(WebCore::HTMLMeterElement::setLow):
(WebCore::HTMLMeterElement::high):
(WebCore::HTMLMeterElement::setHigh):
(WebCore::HTMLMeterElement::optimum):
(WebCore::HTMLMeterElement::setOptimum):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::containsJavaApplet):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::createForJSConstructor):
(WebCore::HTMLOptionElement::setValue):
(WebCore::HTMLOptionElement::setLabel):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::setValue):
(WebCore::HTMLProgressElement::setMax):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::typeAttributeValue):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setMultiple):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::setSrc):
(WebCore::HTMLSourceElement::media):
(WebCore::HTMLSourceElement::setMedia):
(WebCore::HTMLSourceElement::type):
(WebCore::HTMLSourceElement::setType):
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::setAlign):
(WebCore::HTMLTableSectionElement::setCh):
(WebCore::HTMLTableSectionElement::chOff):
(WebCore::HTMLTableSectionElement::setChOff):
(WebCore::HTMLTableSectionElement::setVAlign):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::imageSourceURL):
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::restoreFormControlState):
(WebCore::HiddenInputType::setValue):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createAutoFillButton):
(WebCore::TextFieldInputType::updateAutoFillButton):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsContainerElement::create):
(WebCore::MediaControlTimelineElement::create):
(WebCore::MediaControlPanelVolumeSliderElement::create):
(WebCore::MediaControlFullscreenVolumeSliderElement::create):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::tryCreate):
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::ImageControlsRootElement::tryCreate):
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::createEquivalentHTMLElement):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::buildObjectForFrame):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::toggle):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::isOpen):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* svg/SVGElement.cpp:
(WebCore::SVGElement::setXmlbase):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setContentScriptType):
(WebCore::SVGSVGElement::setContentStyleType):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::setMedia):
(WebCore::SVGStyleElement::setTitle):

Source/WebKit/mac:

* WebView/WebHTMLRepresentation.mm:
(matchLabelsAgainstElement):

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLElement::idName):

Source/WebKit2:

* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createPasswordEntryForm):
* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
(WebKit::PDFPluginAnnotation::attach):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

66 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp
Source/WebCore/dom/Element.h
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/cocoa/DataDetection.mm
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/html/BaseButtonInputType.cpp
Source/WebCore/html/BaseCheckableInputType.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLBaseElement.cpp
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLDetailsElement.cpp
Source/WebCore/html/HTMLDocument.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMeterElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLProgressElement.cpp
Source/WebCore/html/HTMLScriptElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLTableSectionElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HiddenInputType.cpp
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/mac/ImageControlsButtonElementMac.cpp
Source/WebCore/html/shadow/mac/ImageControlsRootElementMac.cpp
Source/WebCore/html/track/WebVTTElement.cpp
Source/WebCore/html/track/WebVTTParser.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/mathml/MathMLSelectElement.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/SVGStyleElement.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm

index 59318a0..49060fb 100644 (file)
@@ -1,5 +1,194 @@
 2016-07-15  Chris Dumez  <cdumez@apple.com>
 
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159793
+
+        Reviewed by Ryosuke Niwa.
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.
+
+        * Modules/plugins/YouTubePluginReplacement.cpp:
+        (WebCore::YouTubePluginReplacement::installReplacement):
+        * dom/Element.h:
+        (WebCore::Element::setIdAttribute):
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::hasNoAttributeOrOnlyStyleAttribute):
+        (WebCore::createFontElement):
+        (WebCore::ApplyStyleCommand::applyInlineStyleChange):
+        * editing/EditingStyle.cpp:
+        (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
+        * editing/Editor.cpp:
+        (WebCore::Editor::setBaseWritingDirection):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::isMailPasteAsQuotationNode):
+        (WebCore::isInlineNodeWithStyle):
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::DataDetection::detectContentInRange):
+        * editing/htmlediting.cpp:
+        (WebCore::createTabSpanElement):
+        * editing/ios/EditorIOS.mm:
+        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
+        (WebCore::Editor::WebContentReader::readURL):
+        * editing/mac/EditorMac.mm:
+        (WebCore::Editor::WebContentReader::readURL):
+        * editing/markup.cpp:
+        (WebCore::createFragmentFromText):
+        * html/BaseButtonInputType.cpp:
+        (WebCore::BaseButtonInputType::setValue):
+        * html/BaseCheckableInputType.cpp:
+        (WebCore::BaseCheckableInputType::setValue):
+        * html/FTPDirectoryDocument.cpp:
+        (WebCore::FTPDirectoryDocumentParser::appendEntry):
+        (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
+        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
+        (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::href):
+        (WebCore::HTMLAnchorElement::setHref):
+        (WebCore::HTMLAnchorElement::target):
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::target):
+        * html/HTMLBaseElement.cpp:
+        (WebCore::HTMLBaseElement::setHref):
+        * html/HTMLButtonElement.cpp:
+        (WebCore::HTMLButtonElement::setType):
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
+        (WebCore::HTMLDetailsElement::toggleOpen):
+        * html/HTMLDocument.cpp:
+        (WebCore::HTMLDocument::setBgColor):
+        (WebCore::HTMLDocument::setFgColor):
+        (WebCore::HTMLDocument::setAlinkColor):
+        (WebCore::HTMLDocument::setLinkColor):
+        (WebCore::HTMLDocument::setVlinkColor):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::setDir):
+        (WebCore::HTMLElement::setContentEditable):
+        (WebCore::HTMLElement::setDraggable):
+        (WebCore::HTMLElement::setSpellcheck):
+        (WebCore::HTMLElement::setTranslate):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::setFormEnctype):
+        (WebCore::HTMLFormControlElement::setFormMethod):
+        (WebCore::HTMLFormControlElement::setAutocorrect):
+        (WebCore::HTMLFormControlElement::setAutocapitalize):
+        (WebCore::HTMLFormControlElement::setAutocomplete):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::setAutocorrect):
+        (WebCore::HTMLFormElement::setAutocapitalize):
+        (WebCore::HTMLFormElement::setAction):
+        (WebCore::HTMLFormElement::setEnctype):
+        (WebCore::HTMLFormElement::setMethod):
+        (WebCore::HTMLFormElement::target):
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::width):
+        (WebCore::HTMLImageElement::height):
+        (WebCore::HTMLImageElement::setSrc):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::setType):
+        (WebCore::HTMLInputElement::updateType):
+        (WebCore::HTMLInputElement::altText):
+        (WebCore::HTMLInputElement::setDefaultValue):
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::href):
+        (WebCore::HTMLLinkElement::target):
+        (WebCore::HTMLLinkElement::type):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::setSrc):
+        (WebCore::HTMLMediaElement::setPreload):
+        * html/HTMLMeterElement.cpp:
+        (WebCore::HTMLMeterElement::min):
+        (WebCore::HTMLMeterElement::setMin):
+        (WebCore::HTMLMeterElement::max):
+        (WebCore::HTMLMeterElement::setMax):
+        (WebCore::HTMLMeterElement::value):
+        (WebCore::HTMLMeterElement::setValue):
+        (WebCore::HTMLMeterElement::low):
+        (WebCore::HTMLMeterElement::setLow):
+        (WebCore::HTMLMeterElement::high):
+        (WebCore::HTMLMeterElement::setHigh):
+        (WebCore::HTMLMeterElement::optimum):
+        (WebCore::HTMLMeterElement::setOptimum):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::containsJavaApplet):
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::createForJSConstructor):
+        (WebCore::HTMLOptionElement::setValue):
+        (WebCore::HTMLOptionElement::setLabel):
+        * html/HTMLProgressElement.cpp:
+        (WebCore::HTMLProgressElement::setValue):
+        (WebCore::HTMLProgressElement::setMax):
+        * html/HTMLScriptElement.cpp:
+        (WebCore::HTMLScriptElement::typeAttributeValue):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::setMultiple):
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::setSrc):
+        (WebCore::HTMLSourceElement::media):
+        (WebCore::HTMLSourceElement::setMedia):
+        (WebCore::HTMLSourceElement::type):
+        (WebCore::HTMLSourceElement::setType):
+        * html/HTMLTableSectionElement.cpp:
+        (WebCore::HTMLTableSectionElement::setAlign):
+        (WebCore::HTMLTableSectionElement::setCh):
+        (WebCore::HTMLTableSectionElement::chOff):
+        (WebCore::HTMLTableSectionElement::setChOff):
+        (WebCore::HTMLTableSectionElement::setVAlign):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::imageSourceURL):
+        * html/HiddenInputType.cpp:
+        (WebCore::HiddenInputType::restoreFormControlState):
+        (WebCore::HiddenInputType::setValue):
+        * html/MediaDocument.cpp:
+        (WebCore::MediaDocumentParser::createDocumentStructure):
+        (WebCore::MediaDocument::replaceMediaElementTimerFired):
+        * html/PluginDocument.cpp:
+        (WebCore::PluginDocumentParser::createDocumentStructure):
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createAutoFillButton):
+        (WebCore::TextFieldInputType::updateAutoFillButton):
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlClosedCaptionsContainerElement::create):
+        (WebCore::MediaControlTimelineElement::create):
+        (WebCore::MediaControlPanelVolumeSliderElement::create):
+        (WebCore::MediaControlFullscreenVolumeSliderElement::create):
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
+        * html/shadow/mac/ImageControlsButtonElementMac.cpp:
+        (WebCore::ImageControlsButtonElementMac::tryCreate):
+        * html/shadow/mac/ImageControlsRootElementMac.cpp:
+        (WebCore::ImageControlsRootElement::tryCreate):
+        * html/track/WebVTTElement.cpp:
+        (WebCore::WebVTTElement::createEquivalentHTMLElement):
+        * html/track/WebVTTParser.cpp:
+        (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::buildObjectForFrame):
+        * mathml/MathMLSelectElement.cpp:
+        (WebCore::MathMLSelectElement::toggle):
+        * page/PageSerializer.cpp:
+        (WebCore::PageSerializer::serializeFrame):
+        * rendering/RenderDetailsMarker.cpp:
+        (WebCore::RenderDetailsMarker::isOpen):
+        * rendering/mathml/RenderMathMLFraction.cpp:
+        (WebCore::RenderMathMLFraction::updateFromElement):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::setXmlbase):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::setContentScriptType):
+        (WebCore::SVGSVGElement::setContentStyleType):
+        * svg/SVGStyleElement.cpp:
+        (WebCore::SVGStyleElement::setMedia):
+        (WebCore::SVGStyleElement::setTitle):
+
+2016-07-15  Chris Dumez  <cdumez@apple.com>
+
         Modernize StaticNodeList / StaticElementList
         https://bugs.webkit.org/show_bug.cgi?id=159831
 
index 907fc0a..1faf89d 100644 (file)
@@ -85,19 +85,19 @@ bool YouTubePluginReplacement::installReplacement(ShadowRoot& root)
 
     auto iframeElement = HTMLIFrameElement::create(HTMLNames::iframeTag, m_parentElement->document());
     if (m_attributes.contains("width"))
-        iframeElement->setAttribute(HTMLNames::widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
+        iframeElement->setAttributeWithoutSynchronization(HTMLNames::widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
     
     const auto& heightValue = m_attributes.find("height");
     if (heightValue != m_attributes.end()) {
         iframeElement->setAttribute(HTMLNames::styleAttr, AtomicString("max-height: 100%", AtomicString::ConstructFromLiteral));
-        iframeElement->setAttribute(HTMLNames::heightAttr, heightValue->value);
+        iframeElement->setAttributeWithoutSynchronization(HTMLNames::heightAttr, heightValue->value);
     }
 
-    iframeElement->setAttribute(HTMLNames::srcAttr, youTubeURL(m_attributes.get("src")));
-    iframeElement->setAttribute(HTMLNames::frameborderAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
+    iframeElement->setAttributeWithoutSynchronization(HTMLNames::srcAttr, youTubeURL(m_attributes.get("src")));
+    iframeElement->setAttributeWithoutSynchronization(HTMLNames::frameborderAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
     
     // Disable frame flattening for this iframe.
-    iframeElement->setAttribute(HTMLNames::scrollingAttr, AtomicString("no", AtomicString::ConstructFromLiteral));
+    iframeElement->setAttributeWithoutSynchronization(HTMLNames::scrollingAttr, AtomicString("no", AtomicString::ConstructFromLiteral));
     m_embedShadowElement->appendChild(iframeElement);
 
     return true;
index 95a6d9a..62f796f 100644 (file)
@@ -74,7 +74,7 @@ public:
     WEBCORE_EXPORT bool hasAttribute(const QualifiedName&) const;
     WEBCORE_EXPORT const AtomicString& getAttribute(const QualifiedName&) const;
     WEBCORE_EXPORT void setAttribute(const QualifiedName&, const AtomicString& value);
-    void setAttributeWithoutSynchronization(const QualifiedName&, const AtomicString& value);
+    WEBCORE_EXPORT void setAttributeWithoutSynchronization(const QualifiedName&, const AtomicString& value);
     void setSynchronizedLazyAttribute(const QualifiedName&, const AtomicString& value);
     bool removeAttribute(const QualifiedName&);
 
@@ -705,7 +705,7 @@ inline const AtomicString& Element::getNameAttribute() const
 
 inline void Element::setIdAttribute(const AtomicString& value)
 {
-    setAttribute(HTMLNames::idAttr, value);
+    setAttributeWithoutSynchronization(HTMLNames::idAttr, value);
 }
 
 inline const SpaceSplitString& Element::classNames() const
index 267f950..38b9784 100644 (file)
@@ -82,7 +82,7 @@ static bool hasNoAttributeOrOnlyStyleAttribute(const StyledElement* element, Sho
         return true;
 
     unsigned matchedAttributes = 0;
-    if (element->getAttribute(classAttr) == styleSpanClassString())
+    if (element->fastGetAttribute(classAttr) == styleSpanClassString())
         matchedAttributes++;
     if (element->hasAttribute(styleAttr) && (shouldStyleAttributeBeEmpty == AllowNonEmptyStyleAttribute
         || !element->inlineStyle() || element->inlineStyle()->isEmpty()))
@@ -114,7 +114,7 @@ bool isEmptyFontTag(const Element* element, ShouldStyleAttributeBeEmpty shouldSt
     return hasNoAttributeOrOnlyStyleAttribute(downcast<HTMLFontElement>(element), shouldStyleAttributeBeEmpty);
 }
 
-static RefPtr<Element> createFontElement(Document& document)
+static RefPtr<HTMLElement> createFontElement(Document& document)
 {
     return createHTMLElement(document, fontTag);
 }
@@ -1461,13 +1461,13 @@ void ApplyStyleCommand::applyInlineStyleChange(PassRefPtr<Node> passedStart, Pas
             if (styleChange.applyFontSize())
                 setNodeAttribute(fontContainer, sizeAttr, styleChange.fontSize());
         } else {
-            RefPtr<Element> fontElement = createFontElement(document());
+            auto fontElement = createFontElement(document());
             if (styleChange.applyFontColor())
-                fontElement->setAttribute(colorAttr, styleChange.fontColor());
+                fontElement->setAttributeWithoutSynchronization(colorAttr, styleChange.fontColor());
             if (styleChange.applyFontFace())
-                fontElement->setAttribute(faceAttr, styleChange.fontFace());
+                fontElement->setAttributeWithoutSynchronization(faceAttr, styleChange.fontFace());
             if (styleChange.applyFontSize())
-                fontElement->setAttribute(sizeAttr, styleChange.fontSize());
+                fontElement->setAttributeWithoutSynchronization(sizeAttr, styleChange.fontSize());
             surroundNodeRangeWithElement(startNode, endNode, fontElement.get());
         }
     }
index ec7e7eb..791d708 100644 (file)
@@ -1050,7 +1050,7 @@ bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* elemen
     if (!elementIsSpanOrElementEquivalent && !matchedAttributes)
         return false; // element is not a span, a html element equivalent, or font element.
     
-    if (element->getAttribute(HTMLNames::classAttr) == AppleStyleSpanClass)
+    if (element->fastGetAttribute(HTMLNames::classAttr) == AppleStyleSpanClass)
         matchedAttributes++;
 
     if (element->hasAttribute(HTMLNames::styleAttr)) {
index 1c80fd1..939f58e 100644 (file)
@@ -1661,7 +1661,7 @@ void Editor::setBaseWritingDirection(WritingDirection direction)
     if (is<HTMLTextFormControlElement>(focusedElement)) {
         if (direction == NaturalWritingDirection)
             return;
-        downcast<HTMLTextFormControlElement>(*focusedElement).setAttribute(dirAttr, direction == LeftToRightWritingDirection ? "ltr" : "rtl");
+        downcast<HTMLTextFormControlElement>(*focusedElement).setAttributeWithoutSynchronization(dirAttr, direction == LeftToRightWritingDirection ? "ltr" : "rtl");
         focusedElement->dispatchInputEvent();
         document().updateStyleIfNeeded();
         return;
index 494405e..5049b43 100644 (file)
@@ -436,7 +436,7 @@ bool ReplaceSelectionCommand::shouldMergeEnd(bool selectionEndWasEndOfParagraph)
 
 static bool isMailPasteAsQuotationNode(const Node* node)
 {
-    return node && node->hasTagName(blockquoteTag) && downcast<Element>(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
+    return node && node->hasTagName(blockquoteTag) && downcast<Element>(node)->fastGetAttribute(classAttr) == ApplePasteAsQuotation;
 }
 
 static bool isHeaderElement(const Node* a)
@@ -894,7 +894,7 @@ static bool isInlineNodeWithStyle(const Node* node)
     // We can skip over elements whose class attribute is
     // one of our internal classes.
     const HTMLElement* element = static_cast<const HTMLElement*>(node);
-    const AtomicString& classAttributeValue = element->getAttribute(classAttr);
+    const AtomicString& classAttributeValue = element->fastGetAttribute(classAttr);
     if (classAttributeValue == AppleTabSpanClass
         || classAttributeValue == AppleConvertedSpace
         || classAttributeValue == ApplePasteAsQuotation)
index d0805bf..ed5963f 100644 (file)
@@ -634,9 +634,9 @@ NSArray *DataDetection::detectContentInRange(RefPtr<Range>& contextRange, DataDe
             }
             anchorElement->appendChild(WTFMove(newTextNode));
             // Add a special attribute to mark this URLification as the result of data detectors.
-            anchorElement->setAttribute(x_apple_data_detectorsAttr, "true");
-            anchorElement->setAttribute(x_apple_data_detectors_typeAttr, dataDetectorTypeForCategory(softLink_DataDetectorsCore_DDResultGetCategory(coreResult)));
-            anchorElement->setAttribute(x_apple_data_detectors_resultAttr, identifier);
+            anchorElement->setAttributeWithoutSynchronization(x_apple_data_detectorsAttr, AtomicString("true", AtomicString::ConstructFromLiteral));
+            anchorElement->setAttributeWithoutSynchronization(x_apple_data_detectors_typeAttr, dataDetectorTypeForCategory(softLink_DataDetectorsCore_DDResultGetCategory(coreResult)));
+            anchorElement->setAttributeWithoutSynchronization(x_apple_data_detectors_resultAttr, identifier);
 
             parentNode->insertBefore(WTFMove(anchorElement), &currentTextNode);
 
index b407908..d9bd60b 100644 (file)
@@ -931,7 +931,7 @@ static Ref<Element> createTabSpanElement(Document& document, Text& tabTextNode)
 {
     auto spanElement = document.createElement(spanTag, false);
 
-    spanElement->setAttribute(classAttr, AppleTabSpanClass);
+    spanElement->setAttributeWithoutSynchronization(classAttr, AppleTabSpanClass);
     spanElement->setAttribute(styleAttr, "white-space:pre");
 
     spanElement->appendChild(tabTextNode, ASSERT_NO_EXCEPTION);
index e98adce..5b4d38a 100644 (file)
@@ -166,7 +166,7 @@ void Editor::setTextAlignmentForChangedBaseWritingDirection(WritingDirection dir
             || downcast<HTMLInputElement>(*focusedElement).isSearchField())))) {
         if (direction == NaturalWritingDirection)
             return;
-        downcast<HTMLElement>(*focusedElement).setAttribute(alignAttr, newValue);
+        downcast<HTMLElement>(*focusedElement).setAttributeWithoutSynchronization(alignAttr, newValue);
         m_frame.document()->updateStyleIfNeeded();
         return;
     }
@@ -490,7 +490,7 @@ bool Editor::WebContentReader::readURL(const URL& url, const String&)
         }
     } else {
         auto anchor = frame.document()->createElement(HTMLNames::aTag, false);
-        anchor->setAttribute(HTMLNames::hrefAttr, url.string());
+        anchor->setAttributeWithoutSynchronization(HTMLNames::hrefAttr, url.string());
         anchor->appendChild(frame.document()->createTextNode([[(NSURL *)url absoluteString] precomposedStringWithCanonicalMapping]));
 
         auto newFragment = frame.document()->createDocumentFragment();
index 29b1f63..765b2bd 100644 (file)
@@ -598,7 +598,7 @@ bool Editor::WebContentReader::readURL(const URL& url, const String& title)
         return false;
 
     auto anchor = frame.document()->createElement(HTMLNames::aTag, false);
-    anchor->setAttribute(HTMLNames::hrefAttr, url.string());
+    anchor->setAttributeWithoutSynchronization(HTMLNames::hrefAttr, url.string());
     anchor->appendChild(frame.document()->createTextNode([title precomposedStringWithCanonicalMapping]));
 
     fragment = frame.document()->createDocumentFragment();
index 723e004..15a95d8 100644 (file)
@@ -796,7 +796,7 @@ Ref<DocumentFragment> createFragmentFromText(Range& context, const String& text)
         fragment->appendChild(document.createTextNode(string), ASSERT_NO_EXCEPTION);
         if (string.endsWith('\n')) {
             auto element = HTMLBRElement::create(document);
-            element->setAttribute(classAttr, AppleInterchangeNewline);            
+            element->setAttributeWithoutSynchronization(classAttr, AppleInterchangeNewline);
             fragment->appendChild(element, ASSERT_NO_EXCEPTION);
         }
         return fragment;
@@ -828,7 +828,7 @@ Ref<DocumentFragment> createFragmentFromText(Range& context, const String& text)
         if (s.isEmpty() && i + 1 == numLines) {
             // For last line, use the "magic BR" rather than a P.
             element = HTMLBRElement::create(document);
-            element->setAttribute(classAttr, AppleInterchangeNewline);
+            element->setAttributeWithoutSynchronization(classAttr, AppleInterchangeNewline);
         } else if (useLineBreak) {
             element = HTMLBRElement::create(document);
             fillContainerFromString(fragment, s);
index e75a80a..4021c6e 100644 (file)
@@ -64,7 +64,7 @@ bool BaseButtonInputType::storesValueSeparateFromAttribute()
 
 void BaseButtonInputType::setValue(const String& sanitizedValue, bool, TextFieldEventBehavior)
 {
-    element().setAttribute(valueAttr, sanitizedValue);
+    element().setAttributeWithoutSynchronization(valueAttr, sanitizedValue);
 }
 
 } // namespace WebCore
index eb7aefe..ba5a991 100644 (file)
@@ -103,7 +103,7 @@ bool BaseCheckableInputType::storesValueSeparateFromAttribute()
 
 void BaseCheckableInputType::setValue(const String& sanitizedValue, bool, TextFieldEventBehavior)
 {
-    element().setAttribute(valueAttr, sanitizedValue);
+    element().setAttributeWithoutSynchronization(valueAttr, sanitizedValue);
 }
 
 bool BaseCheckableInputType::isCheckable()
index 7de3d80..dbd8c73 100644 (file)
@@ -101,29 +101,29 @@ FTPDirectoryDocumentParser::FTPDirectoryDocumentParser(HTMLDocument& document)
 
 void FTPDirectoryDocumentParser::appendEntry(const String& filename, const String& size, const String& date, bool isDirectory)
 {
-    RefPtr<Element> rowElement = m_tableElement->insertRow(-1, IGNORE_EXCEPTION);
-    rowElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryEntryRow");
+    auto rowElement = m_tableElement->insertRow(-1, IGNORE_EXCEPTION);
+    rowElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryEntryRow", AtomicString::ConstructFromLiteral));
 
     auto typeElement = document()->createElement(tdTag, false);
     typeElement->appendChild(Text::create(*document(), String(&noBreakSpace, 1)), IGNORE_EXCEPTION);
     if (isDirectory)
-        typeElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryIcon ftpDirectoryTypeDirectory");
+        typeElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryIcon ftpDirectoryTypeDirectory", AtomicString::ConstructFromLiteral));
     else
-        typeElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryIcon ftpDirectoryTypeFile");
+        typeElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryIcon ftpDirectoryTypeFile", AtomicString::ConstructFromLiteral));
     rowElement->appendChild(typeElement, IGNORE_EXCEPTION);
 
     auto nameElement = createTDForFilename(filename);
-    nameElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryFileName");
+    nameElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryFileName", AtomicString::ConstructFromLiteral));
     rowElement->appendChild(nameElement, IGNORE_EXCEPTION);
 
     auto dateElement = document()->createElement(tdTag, false);
     dateElement->appendChild(Text::create(*document(), date), IGNORE_EXCEPTION);
-    dateElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryFileDate");
+    dateElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryFileDate", AtomicString::ConstructFromLiteral));
     rowElement->appendChild(dateElement, IGNORE_EXCEPTION);
 
     auto sizeElement = document()->createElement(tdTag, false);
     sizeElement->appendChild(Text::create(*document(), size), IGNORE_EXCEPTION);
-    sizeElement->setAttribute(HTMLNames::classAttr, "ftpDirectoryFileSize");
+    sizeElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("ftpDirectoryFileSize", AtomicString::ConstructFromLiteral));
     rowElement->appendChild(sizeElement, IGNORE_EXCEPTION);
 }
 
@@ -136,7 +136,7 @@ Ref<Element> FTPDirectoryDocumentParser::createTDForFilename(const String& filen
         fullURL = fullURL + '/' + filename;
 
     auto anchorElement = document()->createElement(aTag, false);
-    anchorElement->setAttribute(HTMLNames::hrefAttr, fullURL);
+    anchorElement->setAttributeWithoutSynchronization(HTMLNames::hrefAttr, fullURL);
     anchorElement->appendChild(Text::create(*document(), filename), IGNORE_EXCEPTION);
 
     Ref<Element> tdElement = document()->createElement(tdTag, false);
@@ -306,7 +306,7 @@ bool FTPDirectoryDocumentParser::loadDocumentTemplate()
     // Otherwise create one manually
     tableElement = document()->createElement(tableTag, false);
     m_tableElement = downcast<HTMLTableElement>(tableElement.get());
-    m_tableElement->setAttribute(HTMLNames::idAttr, "ftpDirectoryTable");
+    m_tableElement->setAttributeWithoutSynchronization(HTMLNames::idAttr, AtomicString("ftpDirectoryTable", AtomicString::ConstructFromLiteral));
 
     // If we didn't find the table element, lets try to append our own to the body
     // If that fails for some reason, cram it on the end of the document as a last
@@ -331,8 +331,8 @@ void FTPDirectoryDocumentParser::createBasicDocument()
 
     auto tableElement = document()->createElement(tableTag, false);
     m_tableElement = downcast<HTMLTableElement>(tableElement.ptr());
-    m_tableElement->setAttribute(HTMLNames::idAttr, "ftpDirectoryTable");
-    m_tableElement->setAttribute(HTMLNames::styleAttr, "width:100%");
+    m_tableElement->setAttributeWithoutSynchronization(HTMLNames::idAttr, AtomicString("ftpDirectoryTable", AtomicString::ConstructFromLiteral));
+    m_tableElement->setAttribute(HTMLNames::styleAttr, AtomicString("width:100%", AtomicString::ConstructFromLiteral));
 
     bodyElement->appendChild(tableElement, IGNORE_EXCEPTION);
 
index 6c5b357..acffa35 100644 (file)
@@ -286,12 +286,12 @@ bool HTMLAnchorElement::draggable() const
 
 URL HTMLAnchorElement::href() const
 {
-    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
+    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr)));
 }
 
 void HTMLAnchorElement::setHref(const AtomicString& value)
 {
-    setAttribute(hrefAttr, value);
+    setAttributeWithoutSynchronization(hrefAttr, value);
 }
 
 bool HTMLAnchorElement::hasRel(uint32_t relation) const
@@ -319,7 +319,7 @@ int HTMLAnchorElement::tabIndex() const
 
 String HTMLAnchorElement::target() const
 {
-    return getAttribute(targetAttr);
+    return fastGetAttribute(targetAttr);
 }
 
 String HTMLAnchorElement::origin() const
index deaa46b..c06369c 100644 (file)
@@ -251,7 +251,7 @@ bool HTMLAreaElement::supportsFocus() const
 
 String HTMLAreaElement::target() const
 {
-    return getAttribute(targetAttr);
+    return fastGetAttribute(targetAttr);
 }
 
 }
index f3e29d0..0eaf158 100644 (file)
@@ -98,7 +98,7 @@ URL HTMLBaseElement::href() const
 
 void HTMLBaseElement::setHref(const AtomicString& value)
 {
-    setAttribute(hrefAttr, value);
+    setAttributeWithoutSynchronization(hrefAttr, value);
 }
 
 }
index e795f44..3e8786b 100644 (file)
@@ -53,7 +53,7 @@ Ref<HTMLButtonElement> HTMLButtonElement::create(const QualifiedName& tagName, D
 
 void HTMLButtonElement::setType(const AtomicString& type)
 {
-    setAttribute(typeAttr, type);
+    setAttributeWithoutSynchronization(typeAttr, type);
 }
 
 RenderPtr<RenderElement> HTMLButtonElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
index 77e6456..c5553e2 100644 (file)
@@ -95,7 +95,7 @@ RenderPtr<RenderElement> HTMLDetailsElement::createElementRenderer(RenderStyle&&
 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 {
     auto summarySlot = HTMLSlotElement::create(slotTag, document());
-    summarySlot->setAttribute(nameAttr, summarySlotName());
+    summarySlot->setAttributeWithoutSynchronization(nameAttr, summarySlotName());
     m_summarySlot = summarySlot.ptr();
 
     auto defaultSummary = HTMLSummaryElement::create(summaryTag, document());
@@ -143,7 +143,7 @@ void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
 
 void HTMLDetailsElement::toggleOpen()
 {
-    setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom);
+    setAttributeWithoutSynchronization(openAttr, m_isOpen ? nullAtom : emptyAtom);
 
     // We need to post to the document because toggling this element will delete it.
     if (AXObjectCache* cache = document().existingAXObjectCache())
index a203ee3..3993759 100644 (file)
@@ -150,7 +150,7 @@ const AtomicString& HTMLDocument::bgColor() const
 void HTMLDocument::setBgColor(const String& value)
 {
     if (auto* bodyElement = body())
-        bodyElement->setAttribute(bgcolorAttr, value);
+        bodyElement->setAttributeWithoutSynchronization(bgcolorAttr, value);
 }
 
 const AtomicString& HTMLDocument::fgColor() const
@@ -164,7 +164,7 @@ const AtomicString& HTMLDocument::fgColor() const
 void HTMLDocument::setFgColor(const String& value)
 {
     if (auto* bodyElement = body())
-        bodyElement->setAttribute(textAttr, value);
+        bodyElement->setAttributeWithoutSynchronization(textAttr, value);
 }
 
 const AtomicString& HTMLDocument::alinkColor() const
@@ -178,7 +178,7 @@ const AtomicString& HTMLDocument::alinkColor() const
 void HTMLDocument::setAlinkColor(const String& value)
 {
     if (auto* bodyElement = body())
-        bodyElement->setAttribute(alinkAttr, value);
+        bodyElement->setAttributeWithoutSynchronization(alinkAttr, value);
 }
 
 const AtomicString& HTMLDocument::linkColor() const
@@ -192,7 +192,7 @@ const AtomicString& HTMLDocument::linkColor() const
 void HTMLDocument::setLinkColor(const String& value)
 {
     if (auto* bodyElement = body())
-        bodyElement->setAttribute(linkAttr, value);
+        bodyElement->setAttributeWithoutSynchronization(linkAttr, value);
 }
 
 const AtomicString& HTMLDocument::vlinkColor() const
@@ -206,7 +206,7 @@ const AtomicString& HTMLDocument::vlinkColor() const
 void HTMLDocument::setVlinkColor(const String& value)
 {
     if (auto* bodyElement = body())
-        bodyElement->setAttribute(vlinkAttr, value);
+        bodyElement->setAttributeWithoutSynchronization(vlinkAttr, value);
 }
 
 void HTMLDocument::captureEvents()
index 39ec871..1b8a964 100644 (file)
@@ -541,7 +541,7 @@ const AtomicString& HTMLElement::dir() const
 
 void HTMLElement::setDir(const AtomicString& value)
 {
-    setAttribute(dirAttr, value);
+    setAttributeWithoutSynchronization(dirAttr, value);
 }
 
 void HTMLElement::setInnerText(const String& text, ExceptionCode& ec)
@@ -764,11 +764,11 @@ String HTMLElement::contentEditable() const
 void HTMLElement::setContentEditable(const String& enabled, ExceptionCode& ec)
 {
     if (equalLettersIgnoringASCIICase(enabled, "true"))
-        setAttribute(contenteditableAttr, AtomicString("true", AtomicString::ConstructFromLiteral));
+        setAttributeWithoutSynchronization(contenteditableAttr, AtomicString("true", AtomicString::ConstructFromLiteral));
     else if (equalLettersIgnoringASCIICase(enabled, "false"))
-        setAttribute(contenteditableAttr, AtomicString("false", AtomicString::ConstructFromLiteral));
+        setAttributeWithoutSynchronization(contenteditableAttr, AtomicString("false", AtomicString::ConstructFromLiteral));
     else if (equalLettersIgnoringASCIICase(enabled, "plaintext-only"))
-        setAttribute(contenteditableAttr, AtomicString("plaintext-only", AtomicString::ConstructFromLiteral));
+        setAttributeWithoutSynchronization(contenteditableAttr, AtomicString("plaintext-only", AtomicString::ConstructFromLiteral));
     else if (equalLettersIgnoringASCIICase(enabled, "inherit"))
         removeAttribute(contenteditableAttr);
     else
@@ -782,7 +782,7 @@ bool HTMLElement::draggable() const
 
 void HTMLElement::setDraggable(bool value)
 {
-    setAttribute(draggableAttr, value
+    setAttributeWithoutSynchronization(draggableAttr, value
         ? AtomicString("true", AtomicString::ConstructFromLiteral)
         : AtomicString("false", AtomicString::ConstructFromLiteral));
 }
@@ -794,7 +794,7 @@ bool HTMLElement::spellcheck() const
 
 void HTMLElement::setSpellcheck(bool enable)
 {
-    setAttribute(spellcheckAttr, enable
+    setAttributeWithoutSynchronization(spellcheckAttr, enable
         ? AtomicString("true", AtomicString::ConstructFromLiteral)
         : AtomicString("false", AtomicString::ConstructFromLiteral));
 }
@@ -851,7 +851,7 @@ bool HTMLElement::translate() const
 
 void HTMLElement::setTranslate(bool enable)
 {
-    setAttribute(translateAttr, enable ? "yes" : "no");
+    setAttributeWithoutSynchronization(translateAttr, enable ? "yes" : "no");
 }
 
 bool HTMLElement::rendererIsNeeded(const RenderStyle& style)
index 6dc1871..760fb2f 100644 (file)
@@ -85,7 +85,7 @@ String HTMLFormControlElement::formEnctype() const
 
 void HTMLFormControlElement::setFormEnctype(const String& value)
 {
-    setAttribute(formenctypeAttr, value);
+    setAttributeWithoutSynchronization(formenctypeAttr, value);
 }
 
 String HTMLFormControlElement::formMethod() const
@@ -98,7 +98,7 @@ String HTMLFormControlElement::formMethod() const
 
 void HTMLFormControlElement::setFormMethod(const String& value)
 {
-    setAttribute(formmethodAttr, value);
+    setAttributeWithoutSynchronization(formmethodAttr, value);
 }
 
 bool HTMLFormControlElement::formNoValidate() const
@@ -580,7 +580,7 @@ bool HTMLFormControlElement::autocorrect() const
 
 void HTMLFormControlElement::setAutocorrect(bool autocorrect)
 {
-    setAttribute(autocorrectAttr, autocorrect ? AtomicString("on", AtomicString::ConstructFromLiteral) : AtomicString("off", AtomicString::ConstructFromLiteral));
+    setAttributeWithoutSynchronization(autocorrectAttr, autocorrect ? AtomicString("on", AtomicString::ConstructFromLiteral) : AtomicString("off", AtomicString::ConstructFromLiteral));
 }
 
 WebAutocapitalizeType HTMLFormControlElement::autocapitalizeType() const
@@ -600,7 +600,7 @@ const AtomicString& HTMLFormControlElement::autocapitalize() const
 
 void HTMLFormControlElement::setAutocapitalize(const AtomicString& value)
 {
-    setAttribute(autocapitalizeAttr, value);
+    setAttributeWithoutSynchronization(autocapitalizeAttr, value);
 }
 
 #endif
@@ -621,7 +621,7 @@ String HTMLFormControlElement::autocomplete() const
 
 void HTMLFormControlElement::setAutocomplete(const String& value)
 {
-    setAttribute(autocompleteAttr, value);
+    setAttributeWithoutSynchronization(autocompleteAttr, value);
 }
 
 AutofillMantle HTMLFormControlElement::autofillMantle() const
index 7e64e02..eafb997 100644 (file)
@@ -406,7 +406,7 @@ bool HTMLFormElement::autocorrect() const
 
 void HTMLFormElement::setAutocorrect(bool autocorrect)
 {
-    setAttribute(autocorrectAttr, autocorrect ? AtomicString("on", AtomicString::ConstructFromLiteral) : AtomicString("off", AtomicString::ConstructFromLiteral));
+    setAttributeWithoutSynchronization(autocorrectAttr, autocorrect ? AtomicString("on", AtomicString::ConstructFromLiteral) : AtomicString("off", AtomicString::ConstructFromLiteral));
 }
 
 WebAutocapitalizeType HTMLFormElement::autocapitalizeType() const
@@ -421,7 +421,7 @@ const AtomicString& HTMLFormElement::autocapitalize() const
 
 void HTMLFormElement::setAutocapitalize(const AtomicString& value)
 {
-    setAttribute(autocapitalizeAttr, value);
+    setAttributeWithoutSynchronization(autocapitalizeAttr, value);
 }
 
 #endif
@@ -687,12 +687,12 @@ String HTMLFormElement::action() const
 
 void HTMLFormElement::setAction(const String &value)
 {
-    setAttribute(actionAttr, value);
+    setAttributeWithoutSynchronization(actionAttr, value);
 }
 
 void HTMLFormElement::setEnctype(const String &value)
 {
-    setAttribute(enctypeAttr, value);
+    setAttributeWithoutSynchronization(enctypeAttr, value);
 }
 
 String HTMLFormElement::method() const
@@ -702,12 +702,12 @@ String HTMLFormElement::method() const
 
 void HTMLFormElement::setMethod(const String &value)
 {
-    setAttribute(methodAttr, value);
+    setAttributeWithoutSynchronization(methodAttr, value);
 }
 
 String HTMLFormElement::target() const
 {
-    return getAttribute(targetAttr);
+    return fastGetAttribute(targetAttr);
 }
 
 bool HTMLFormElement::wasUserSubmitted() const
index 36e3cde..563b9b8 100644 (file)
@@ -375,7 +375,7 @@ int HTMLImageElement::width(bool ignorePendingStylesheets)
     if (!renderer()) {
         // check the attribute first for an explicit pixel value
         bool ok;
-        int width = getAttribute(widthAttr).toInt(&ok);
+        int width = fastGetAttribute(widthAttr).toInt(&ok);
         if (ok)
             return width;
 
@@ -401,7 +401,7 @@ int HTMLImageElement::height(bool ignorePendingStylesheets)
     if (!renderer()) {
         // check the attribute first for an explicit pixel value
         bool ok;
-        int height = getAttribute(heightAttr).toInt(&ok);
+        int height = fastGetAttribute(heightAttr).toInt(&ok);
         if (ok)
             return height;
 
@@ -507,7 +507,7 @@ URL HTMLImageElement::src() const
 
 void HTMLImageElement::setSrc(const String& value)
 {
-    setAttribute(srcAttr, value);
+    setAttributeWithoutSynchronization(srcAttr, value);
 }
 
 void HTMLImageElement::setWidth(int value)
index 34b4ccc..ff60cb3 100644 (file)
@@ -441,7 +441,7 @@ void HTMLInputElement::handleBlurEvent()
 
 void HTMLInputElement::setType(const AtomicString& type)
 {
-    setAttribute(typeAttr, type);
+    setAttributeWithoutSynchronization(typeAttr, type);
 }
 
 void HTMLInputElement::updateType()
@@ -456,7 +456,7 @@ void HTMLInputElement::updateType()
     if (hadType && !newType->canChangeFromAnotherType()) {
         // Set the attribute back to the old value.
         // Useful in case we were called from inside parseAttribute.
-        setAttribute(typeAttr, type());
+        setAttributeWithoutSynchronization(typeAttr, type());
         return;
     }
 
@@ -478,7 +478,7 @@ void HTMLInputElement::updateType()
     bool willStoreValue = m_inputType->storesValueSeparateFromAttribute();
 
     if (didStoreValue && !willStoreValue && hasDirtyValue()) {
-        setAttribute(valueAttr, m_valueIfDirty);
+        setAttributeWithoutSynchronization(valueAttr, m_valueIfDirty);
         m_valueIfDirty = String();
     }
     if (!didStoreValue && willStoreValue) {
@@ -808,7 +808,7 @@ String HTMLInputElement::altText() const
     String alt = fastGetAttribute(altAttr);
     // fall back to title attribute
     if (alt.isNull())
-        alt = getAttribute(titleAttr);
+        alt = fastGetAttribute(titleAttr);
     if (alt.isNull())
         alt = fastGetAttribute(valueAttr);
     if (alt.isEmpty())
@@ -1207,7 +1207,7 @@ String HTMLInputElement::defaultValue() const
 
 void HTMLInputElement::setDefaultValue(const String &value)
 {
-    setAttribute(valueAttr, value);
+    setAttributeWithoutSynchronization(valueAttr, value);
 }
 
 static inline bool isRFC2616TokenCharacter(UChar ch)
index 551ce76..8b8d815 100644 (file)
@@ -478,7 +478,7 @@ void HTMLLinkElement::handleClick(Event& event)
 
 URL HTMLLinkElement::href() const
 {
-    return document().completeURL(getAttribute(hrefAttr));
+    return document().completeURL(fastGetAttribute(hrefAttr));
 }
 
 const AtomicString& HTMLLinkElement::rel() const
@@ -488,12 +488,12 @@ const AtomicString& HTMLLinkElement::rel() const
 
 String HTMLLinkElement::target() const
 {
-    return getAttribute(targetAttr);
+    return fastGetAttribute(targetAttr);
 }
 
 const AtomicString& HTMLLinkElement::type() const
 {
-    return getAttribute(typeAttr);
+    return fastGetAttribute(typeAttr);
 }
 
 Optional<LinkIconType> HTMLLinkElement::iconType() const
index 40e229f..5f8d8bb 100644 (file)
@@ -996,7 +996,7 @@ MediaError* HTMLMediaElement::error() const
 
 void HTMLMediaElement::setSrc(const String& url)
 {
-    setAttribute(srcAttr, url);
+    setAttributeWithoutSynchronization(srcAttr, url);
 }
 
 #if ENABLE(MEDIA_STREAM)
@@ -3047,7 +3047,7 @@ void HTMLMediaElement::setPreload(const String& preload)
         return;
 #endif
 
-    setAttribute(preloadAttr, preload);
+    setAttributeWithoutSynchronization(preloadAttr, preload);
 }
 
 void HTMLMediaElement::play(PlayPromise&& promise)
index 5f6019d..da276a4 100644 (file)
@@ -80,7 +80,7 @@ void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicStr
 
 double HTMLMeterElement::min() const
 {
-    return parseToDoubleForNumberType(getAttribute(minAttr), 0);
+    return parseToDoubleForNumberType(fastGetAttribute(minAttr), 0);
 }
 
 void HTMLMeterElement::setMin(double min, ExceptionCode& ec)
@@ -89,12 +89,12 @@ void HTMLMeterElement::setMin(double min, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(minAttr, AtomicString::number(min));
+    setAttributeWithoutSynchronization(minAttr, AtomicString::number(min));
 }
 
 double HTMLMeterElement::max() const
 {
-    return std::max(parseToDoubleForNumberType(getAttribute(maxAttr), std::max(1.0, min())), min());
+    return std::max(parseToDoubleForNumberType(fastGetAttribute(maxAttr), std::max(1.0, min())), min());
 }
 
 void HTMLMeterElement::setMax(double max, ExceptionCode& ec)
@@ -103,12 +103,12 @@ void HTMLMeterElement::setMax(double max, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(maxAttr, AtomicString::number(max));
+    setAttributeWithoutSynchronization(maxAttr, AtomicString::number(max));
 }
 
 double HTMLMeterElement::value() const
 {
-    double value = parseToDoubleForNumberType(getAttribute(valueAttr), 0);
+    double value = parseToDoubleForNumberType(fastGetAttribute(valueAttr), 0);
     return std::min(std::max(value, min()), max());
 }
 
@@ -118,12 +118,12 @@ void HTMLMeterElement::setValue(double value, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(valueAttr, AtomicString::number(value));
+    setAttributeWithoutSynchronization(valueAttr, AtomicString::number(value));
 }
 
 double HTMLMeterElement::low() const
 {
-    double low = parseToDoubleForNumberType(getAttribute(lowAttr), min());
+    double low = parseToDoubleForNumberType(fastGetAttribute(lowAttr), min());
     return std::min(std::max(low, min()), max());
 }
 
@@ -133,12 +133,12 @@ void HTMLMeterElement::setLow(double low, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(lowAttr, AtomicString::number(low));
+    setAttributeWithoutSynchronization(lowAttr, AtomicString::number(low));
 }
 
 double HTMLMeterElement::high() const
 {
-    double high = parseToDoubleForNumberType(getAttribute(highAttr), max());
+    double high = parseToDoubleForNumberType(fastGetAttribute(highAttr), max());
     return std::min(std::max(high, low()), max());
 }
 
@@ -148,12 +148,12 @@ void HTMLMeterElement::setHigh(double high, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(highAttr, AtomicString::number(high));
+    setAttributeWithoutSynchronization(highAttr, AtomicString::number(high));
 }
 
 double HTMLMeterElement::optimum() const
 {
-    double optimum = parseToDoubleForNumberType(getAttribute(optimumAttr), (max() + min()) / 2);
+    double optimum = parseToDoubleForNumberType(fastGetAttribute(optimumAttr), (max() + min()) / 2);
     return std::min(std::max(optimum, min()), max());
 }
 
@@ -163,7 +163,7 @@ void HTMLMeterElement::setOptimum(double optimum, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(optimumAttr, AtomicString::number(optimum));
+    setAttributeWithoutSynchronization(optimumAttr, AtomicString::number(optimum));
 }
 
 HTMLMeterElement::GaugeRegion HTMLMeterElement::gaugeRegion() const
index 1af0881..ed3f440 100644 (file)
@@ -470,12 +470,12 @@ void HTMLObjectElement::updateDocNamedItem()
 
 bool HTMLObjectElement::containsJavaApplet() const
 {
-    if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr)))
+    if (MIMETypeRegistry::isJavaAppletMIMEType(fastGetAttribute(typeAttr)))
         return true;
 
     for (auto& child : childrenOfType<Element>(*this)) {
         if (child.hasTagName(paramTag) && equalLettersIgnoringASCIICase(child.getNameAttribute(), "type")
-            && MIMETypeRegistry::isJavaAppletMIMEType(child.getAttribute(valueAttr).string()))
+            && MIMETypeRegistry::isJavaAppletMIMEType(child.fastGetAttribute(valueAttr).string()))
             return true;
         if (child.hasTagName(objectTag) && downcast<HTMLObjectElement>(child).containsJavaApplet())
             return true;
index 82fcdc0..c79cca1 100644 (file)
@@ -81,7 +81,7 @@ RefPtr<HTMLOptionElement> HTMLOptionElement::createForJSConstructor(Document& do
     if (!value.isNull())
         element->setValue(value);
     if (defaultSelected)
-        element->setAttribute(selectedAttr, emptyAtom);
+        element->setAttributeWithoutSynchronization(selectedAttr, emptyAtom);
     element->setSelected(selected);
 
     return WTFMove(element);
@@ -202,7 +202,7 @@ String HTMLOptionElement::value() const
 
 void HTMLOptionElement::setValue(const String& value)
 {
-    setAttribute(valueAttr, value);
+    setAttributeWithoutSynchronization(valueAttr, value);
 }
 
 bool HTMLOptionElement::selected()
@@ -280,7 +280,7 @@ String HTMLOptionElement::label() const
 
 void HTMLOptionElement::setLabel(const String& label)
 {
-    setAttribute(labelAttr, label);
+    setAttributeWithoutSynchronization(labelAttr, label);
 }
 
 void HTMLOptionElement::willResetComputedStyle()
index 354b827..8eaa063 100644 (file)
@@ -104,7 +104,7 @@ void HTMLProgressElement::setValue(double value, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(valueAttr, AtomicString::number(value >= 0 ? value : 0));
+    setAttributeWithoutSynchronization(valueAttr, AtomicString::number(value >= 0 ? value : 0));
 }
 
 double HTMLProgressElement::max() const
@@ -119,7 +119,7 @@ void HTMLProgressElement::setMax(double max, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    setAttribute(maxAttr, AtomicString::number(max > 0 ? max : 1));
+    setAttributeWithoutSynchronization(maxAttr, AtomicString::number(max > 0 ? max : 1));
 }
 
 double HTMLProgressElement::position() const
index 3b10d67..2f3c7d6 100644 (file)
@@ -139,7 +139,7 @@ String HTMLScriptElement::charsetAttributeValue() const
 
 String HTMLScriptElement::typeAttributeValue() const
 {
-    return getAttribute(typeAttr).string();
+    return fastGetAttribute(typeAttr).string();
 }
 
 String HTMLScriptElement::languageAttributeValue() const
index cc3bfe2..a459932 100644 (file)
@@ -405,7 +405,7 @@ void HTMLSelectElement::setMultiple(bool multiple)
 {
     bool oldMultiple = this->multiple();
     int oldSelectedIndex = selectedIndex();
-    setAttribute(multipleAttr, multiple ? "" : 0);
+    setAttributeWithoutSynchronization(multipleAttr, multiple ? emptyAtom : nullAtom);
 
     // Restore selectedIndex after changing the multiple flag to preserve
     // selection as single-line and multi-line has different defaults.
index 5a428b2..1e72e41 100644 (file)
@@ -91,27 +91,27 @@ void HTMLSourceElement::removedFrom(ContainerNode& removalRoot)
 
 void HTMLSourceElement::setSrc(const String& url)
 {
-    setAttribute(srcAttr, url);
+    setAttributeWithoutSynchronization(srcAttr, url);
 }
 
 String HTMLSourceElement::media() const
 {
-    return getAttribute(mediaAttr);
+    return fastGetAttribute(mediaAttr);
 }
 
 void HTMLSourceElement::setMedia(const String& media)
 {
-    setAttribute(mediaAttr, media);
+    setAttributeWithoutSynchronization(mediaAttr, media);
 }
 
 String HTMLSourceElement::type() const
 {
-    return getAttribute(typeAttr);
+    return fastGetAttribute(typeAttr);
 }
 
 void HTMLSourceElement::setType(const String& type)
 {
-    setAttribute(typeAttr, type);
+    setAttributeWithoutSynchronization(typeAttr, type);
 }
 
 void HTMLSourceElement::scheduleErrorEvent()
index ca30ed2..0aa5be7 100644 (file)
@@ -117,7 +117,7 @@ const AtomicString& HTMLTableSectionElement::align() const
 
 void HTMLTableSectionElement::setAlign(const AtomicString& value)
 {
-    setAttribute(alignAttr, value);
+    setAttributeWithoutSynchronization(alignAttr, value);
 }
 
 const AtomicString& HTMLTableSectionElement::ch() const
@@ -127,17 +127,17 @@ const AtomicString& HTMLTableSectionElement::ch() const
 
 void HTMLTableSectionElement::setCh(const AtomicString& value)
 {
-    setAttribute(charAttr, value);
+    setAttributeWithoutSynchronization(charAttr, value);
 }
 
 const AtomicString& HTMLTableSectionElement::chOff() const
 {
-    return getAttribute(charoffAttr);
+    return fastGetAttribute(charoffAttr);
 }
 
 void HTMLTableSectionElement::setChOff(const AtomicString& value)
 {
-    setAttribute(charoffAttr, value);
+    setAttributeWithoutSynchronization(charoffAttr, value);
 }
 
 const AtomicString& HTMLTableSectionElement::vAlign() const
@@ -147,7 +147,7 @@ const AtomicString& HTMLTableSectionElement::vAlign() const
 
 void HTMLTableSectionElement::setVAlign(const AtomicString& value)
 {
-    setAttribute(valignAttr, value);
+    setAttributeWithoutSynchronization(valignAttr, value);
 }
 
 Ref<HTMLCollection> HTMLTableSectionElement::rows()
index 8483956..238ef1a 100644 (file)
@@ -506,7 +506,7 @@ void HTMLTextFormControlElement::readOnlyAttributeChanged()
 void HTMLTextFormControlElement::updateInnerTextElementEditability()
 {
     if (TextControlInnerTextElement* innerText = innerTextElement())
-        innerText->setAttribute(contenteditableAttr, isDisabledOrReadOnly() ? "false" : "plaintext-only");
+        innerText->setAttributeWithoutSynchronization(contenteditableAttr, isDisabledOrReadOnly() ? "false" : "plaintext-only");
 }
 
 bool HTMLTextFormControlElement::lastChangeWasUserEdit() const
index 3561479..e037d9b 100644 (file)
@@ -213,7 +213,7 @@ bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const
 
 const AtomicString& HTMLVideoElement::imageSourceURL() const
 {
-    const AtomicString& url = getAttribute(posterAttr);
+    const AtomicString& url = fastGetAttribute(posterAttr);
     if (!stripLeadingAndTrailingHTMLSpaces(url).isEmpty())
         return url;
     return m_defaultPosterURL;
index e6f732f..21e0a12 100644 (file)
@@ -59,7 +59,7 @@ FormControlState HiddenInputType::saveFormControlState() const
 
 void HiddenInputType::restoreFormControlState(const FormControlState& state)
 {
-    element().setAttribute(valueAttr, state[0]);
+    element().setAttributeWithoutSynchronization(valueAttr, state[0]);
 }
 
 bool HiddenInputType::supportsValidation() const
@@ -89,7 +89,7 @@ bool HiddenInputType::storesValueSeparateFromAttribute()
 
 void HiddenInputType::setValue(const String& sanitizedValue, bool, TextFieldEventBehavior)
 {
-    element().setAttribute(valueAttr, sanitizedValue);
+    element().setAttributeWithoutSynchronization(valueAttr, sanitizedValue);
 }
 
 bool HiddenInputType::isHiddenType() const
index d84296d..234c491 100644 (file)
@@ -92,8 +92,8 @@ void MediaDocumentParser::createDocumentStructure()
     rootElement->appendChild(headElement, IGNORE_EXCEPTION);
 
     auto metaElement = document()->createElement(metaTag, false);
-    metaElement->setAttribute(nameAttr, "viewport");
-    metaElement->setAttribute(contentAttr, "width=device-width,initial-scale=1,user-scalable=no");
+    metaElement->setAttributeWithoutSynchronization(nameAttr, AtomicString("viewport", AtomicString::ConstructFromLiteral));
+    metaElement->setAttributeWithoutSynchronization(contentAttr, AtomicString("width=device-width,initial-scale=1,user-scalable=no", AtomicString::ConstructFromLiteral));
     headElement->appendChild(metaElement, IGNORE_EXCEPTION);
 #endif
 
@@ -103,10 +103,10 @@ void MediaDocumentParser::createDocumentStructure()
     auto mediaElement = document()->createElement(videoTag, false);
 
     m_mediaElement = downcast<HTMLVideoElement>(mediaElement.ptr());
-    m_mediaElement->setAttribute(controlsAttr, emptyAtom);
-    m_mediaElement->setAttribute(autoplayAttr, emptyAtom);
+    m_mediaElement->setAttributeWithoutSynchronization(controlsAttr, emptyAtom);
+    m_mediaElement->setAttributeWithoutSynchronization(autoplayAttr, emptyAtom);
 
-    m_mediaElement->setAttribute(nameAttr, "media");
+    m_mediaElement->setAttributeWithoutSynchronization(nameAttr, AtomicString("media", AtomicString::ConstructFromLiteral));
 
     StringBuilder elementStyle;
     elementStyle.appendLiteral("max-width: 100%; max-height: 100%;");
@@ -237,22 +237,22 @@ void MediaDocument::replaceMediaElementTimerFired()
         return;
 
     // Set body margin width and height to 0 as that is what a PluginDocument uses.
-    htmlBody->setAttribute(marginwidthAttr, "0");
-    htmlBody->setAttribute(marginheightAttr, "0");
+    htmlBody->setAttributeWithoutSynchronization(marginwidthAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
+    htmlBody->setAttributeWithoutSynchronization(marginheightAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
 
     if (HTMLVideoElement* videoElement = descendantVideoElement(*htmlBody)) {
         RefPtr<Element> element = Document::createElement(embedTag, false);
         HTMLEmbedElement& embedElement = downcast<HTMLEmbedElement>(*element);
 
-        embedElement.setAttribute(widthAttr, "100%");
-        embedElement.setAttribute(heightAttr, "100%");
-        embedElement.setAttribute(nameAttr, "plugin");
-        embedElement.setAttribute(srcAttr, url().string());
+        embedElement.setAttributeWithoutSynchronization(widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
+        embedElement.setAttributeWithoutSynchronization(heightAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
+        embedElement.setAttributeWithoutSynchronization(nameAttr, AtomicString("plugin", AtomicString::ConstructFromLiteral));
+        embedElement.setAttributeWithoutSynchronization(srcAttr, url().string());
 
         DocumentLoader* documentLoader = loader();
         ASSERT(documentLoader);
         if (documentLoader)
-            embedElement.setAttribute(typeAttr, documentLoader->writer().mimeType());
+            embedElement.setAttributeWithoutSynchronization(typeAttr, documentLoader->writer().mimeType());
 
         videoElement->parentNode()->replaceChild(embedElement, *videoElement, IGNORE_EXCEPTION);
     }
index 5f512ea..298d7d0 100644 (file)
@@ -80,8 +80,8 @@ void PluginDocumentParser::createDocumentStructure()
 #endif
 
     auto body = document()->createElement(bodyTag, false);
-    body->setAttribute(marginwidthAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
-    body->setAttribute(marginheightAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
+    body->setAttributeWithoutSynchronization(marginwidthAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
+    body->setAttributeWithoutSynchronization(marginheightAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
 #if PLATFORM(IOS)
     body->setAttribute(styleAttr, AtomicString("background-color: rgb(217,224,233)", AtomicString::ConstructFromLiteral));
 #else
@@ -93,16 +93,16 @@ void PluginDocumentParser::createDocumentStructure()
     auto embedElement = document()->createElement(embedTag, false);
         
     m_embedElement = downcast<HTMLEmbedElement>(embedElement.ptr());
-    m_embedElement->setAttribute(widthAttr, "100%");
-    m_embedElement->setAttribute(heightAttr, "100%");
+    m_embedElement->setAttributeWithoutSynchronization(widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
+    m_embedElement->setAttributeWithoutSynchronization(heightAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
     
-    m_embedElement->setAttribute(nameAttr, "plugin");
-    m_embedElement->setAttribute(srcAttr, document()->url().string());
+    m_embedElement->setAttributeWithoutSynchronization(nameAttr, AtomicString("plugin", AtomicString::ConstructFromLiteral));
+    m_embedElement->setAttributeWithoutSynchronization(srcAttr, document()->url().string());
     
     DocumentLoader* loader = document()->loader();
     ASSERT(loader);
     if (loader)
-        m_embedElement->setAttribute(typeAttr, loader->writer().mimeType());
+        m_embedElement->setAttributeWithoutSynchronization(typeAttr, loader->writer().mimeType());
 
     downcast<PluginDocument>(*document()).setPluginElement(m_embedElement);
 
index 2668813..67450f7 100644 (file)
@@ -664,8 +664,8 @@ void TextFieldInputType::createAutoFillButton(AutoFillButtonType autoFillButtonT
 
     m_autoFillButton = AutoFillButtonElement::create(element().document(), *this);
     m_autoFillButton->setPseudo(autoFillButtonTypeToAutoFillButtonPseudoClassName(autoFillButtonType));
-    m_autoFillButton->setAttribute(roleAttr, "button");
-    m_autoFillButton->setAttribute(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(autoFillButtonType));
+    m_autoFillButton->setAttributeWithoutSynchronization(roleAttr, AtomicString("button", AtomicString::ConstructFromLiteral));
+    m_autoFillButton->setAttributeWithoutSynchronization(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(autoFillButtonType));
     m_container->appendChild(*m_autoFillButton, IGNORE_EXCEPTION);
 }
 
@@ -682,7 +682,7 @@ void TextFieldInputType::updateAutoFillButton()
         bool shouldUpdateAutoFillButtonType = isAutoFillButtonTypeChanged(attribute, element().autoFillButtonType());
         if (shouldUpdateAutoFillButtonType) {
             m_autoFillButton->setPseudo(autoFillButtonTypeToAutoFillButtonPseudoClassName(element().autoFillButtonType()));
-            m_autoFillButton->setAttribute(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(element().autoFillButtonType()));
+            m_autoFillButton->setAttributeWithoutSynchronization(aria_labelAttr, autoFillButtonTypeToAccessibilityLabel(element().autoFillButtonType()));
         }
         m_autoFillButton->setInlineStyleProperty(CSSPropertyDisplay, CSSValueBlock, true);
         return;
index 9f02bbd..7cd6c5d 100644 (file)
@@ -470,7 +470,7 @@ void HTMLTreeBuilder::processIsindexStartTagForInBody(AtomicHTMLToken& token)
     notImplemented(); // Acknowledge self-closing flag
     processFakeStartTag(formTag);
     if (Attribute* actionAttribute = findAttribute(token.attributes(), actionAttr))
-        m_tree.form()->setAttribute(actionAttr, actionAttribute->value());
+        m_tree.form()->setAttributeWithoutSynchronization(actionAttr, actionAttribute->value());
     processFakeStartTag(hrTag);
     processFakeStartTag(labelTag);
     if (Attribute* promptAttribute = findAttribute(token.attributes(), promptAttr))
index 1a9ed33..bea6f06 100644 (file)
@@ -656,7 +656,7 @@ MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerE
 Ref<MediaControlClosedCaptionsContainerElement> MediaControlClosedCaptionsContainerElement::create(Document& document)
 {
     Ref<MediaControlClosedCaptionsContainerElement> element = adoptRef(*new MediaControlClosedCaptionsContainerElement(document));
-    element->setAttribute(dirAttr, "auto");
+    element->setAttributeWithoutSynchronization(dirAttr, AtomicString("auto", AtomicString::ConstructFromLiteral));
     element->hide();
     return element;
 }
@@ -838,7 +838,7 @@ Ref<MediaControlTimelineElement> MediaControlTimelineElement::create(Document& d
     Ref<MediaControlTimelineElement> timeline = adoptRef(*new MediaControlTimelineElement(document, controls));
     timeline->ensureUserAgentShadowRoot();
     timeline->setType("range");
-    timeline->setAttribute(precisionAttr, "float");
+    timeline->setAttributeWithoutSynchronization(precisionAttr, AtomicString("float", AtomicString::ConstructFromLiteral));
     return timeline;
 }
 
@@ -904,8 +904,8 @@ Ref<MediaControlPanelVolumeSliderElement> MediaControlPanelVolumeSliderElement::
     Ref<MediaControlPanelVolumeSliderElement> slider = adoptRef(*new MediaControlPanelVolumeSliderElement(document));
     slider->ensureUserAgentShadowRoot();
     slider->setType("range");
-    slider->setAttribute(precisionAttr, "float");
-    slider->setAttribute(maxAttr, "1");
+    slider->setAttributeWithoutSynchronization(precisionAttr, AtomicString("float", AtomicString::ConstructFromLiteral));
+    slider->setAttributeWithoutSynchronization(maxAttr, AtomicString("1", AtomicString::ConstructFromLiteral));
     return slider;
 }
 
@@ -922,8 +922,8 @@ Ref<MediaControlFullscreenVolumeSliderElement> MediaControlFullscreenVolumeSlide
     Ref<MediaControlFullscreenVolumeSliderElement> slider = adoptRef(*new MediaControlFullscreenVolumeSliderElement(document));
     slider->ensureUserAgentShadowRoot();
     slider->setType("range");
-    slider->setAttribute(precisionAttr, "float");
-    slider->setAttribute(maxAttr, "1");
+    slider->setAttributeWithoutSynchronization(precisionAttr, AtomicString("float", AtomicString::ConstructFromLiteral));
+    slider->setAttributeWithoutSynchronization(maxAttr, AtomicString("1", AtomicString::ConstructFromLiteral));
     return slider;
 }
 
index 9fc8da2..c02329e 100644 (file)
@@ -212,9 +212,9 @@ inline SearchFieldCancelButtonElement::SearchFieldCancelButtonElement(Document&
 {
     setPseudo(AtomicString("-webkit-search-cancel-button", AtomicString::ConstructFromLiteral));
 #if !PLATFORM(IOS)
-    setAttribute(aria_labelAttr, AXSearchFieldCancelButtonText());
+    setAttributeWithoutSynchronization(aria_labelAttr, AXSearchFieldCancelButtonText());
 #endif
-    setAttribute(roleAttr, AtomicString("button", AtomicString::ConstructFromLiteral));
+    setAttributeWithoutSynchronization(roleAttr, AtomicString("button", AtomicString::ConstructFromLiteral));
 }
 
 Ref<SearchFieldCancelButtonElement> SearchFieldCancelButtonElement::create(Document& document)
index 212368f..1df383d 100644 (file)
@@ -96,7 +96,7 @@ RefPtr<ImageControlsButtonElementMac> ImageControlsButtonElementMac::tryCreate(D
         return nullptr;
 
     auto button = adoptRef(*new ImageControlsButtonElementMac(document));
-    button->setAttribute(HTMLNames::classAttr, "x-webkit-image-controls-button");
+    button->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("x-webkit-image-controls-button", AtomicString::ConstructFromLiteral));
 
     IntSize positionOffset = document.page()->theme().imageControlsButtonPositionOffset();
     button->setInlineStyleProperty(CSSPropertyTop, positionOffset.height(), CSSPrimitiveValue::CSS_PX);
index dc5e8c3..f479d28 100644 (file)
@@ -86,7 +86,7 @@ RefPtr<ImageControlsRootElement> ImageControlsRootElement::tryCreate(Document& d
         return nullptr;
 
     Ref<ImageControlsRootElementMac> controls = adoptRef(*new ImageControlsRootElementMac(document));
-    controls->setAttribute(HTMLNames::classAttr, "x-webkit-image-controls");
+    controls->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("x-webkit-image-controls", AtomicString::ConstructFromLiteral));
 
     if (RefPtr<ImageControlsButtonElementMac> button = ImageControlsButtonElementMac::tryCreate(document))
         controls->appendChild(*button);
index 07da512..3959135 100644 (file)
@@ -96,8 +96,8 @@ Ref<HTMLElement> WebVTTElement::createEquivalentHTMLElement(Document& document)
     case WebVTTNodeTypeLanguage:
     case WebVTTNodeTypeVoice:
         htmlElement = HTMLElementFactory::createElement(HTMLNames::spanTag, document);
-        htmlElement->setAttribute(HTMLNames::titleAttr, getAttribute(voiceAttributeName()));
-        htmlElement->setAttribute(HTMLNames::langAttr, getAttribute(langAttributeName()));
+        htmlElement->setAttributeWithoutSynchronization(HTMLNames::titleAttr, fastGetAttribute(voiceAttributeName()));
+        htmlElement->setAttributeWithoutSynchronization(HTMLNames::langAttr, fastGetAttribute(langAttributeName()));
         break;
     case WebVTTNodeTypeItalic:
         htmlElement = HTMLElementFactory::createElement(HTMLNames::iTag, document);
@@ -118,7 +118,7 @@ Ref<HTMLElement> WebVTTElement::createEquivalentHTMLElement(Document& document)
 
     ASSERT(htmlElement);
     if (htmlElement)
-        htmlElement->setAttribute(HTMLNames::classAttr, fastGetAttribute(HTMLNames::classAttr));
+        htmlElement->setAttributeWithoutSynchronization(HTMLNames::classAttr, fastGetAttribute(HTMLNames::classAttr));
     return htmlElement.releaseNonNull();
 }
 
index fff0456..3f785f8 100644 (file)
@@ -551,13 +551,13 @@ void WebVTTTreeBuilder::constructTreeFromToken(Document& document)
 
         auto child = WebVTTElement::create(nodeType, document);
         if (!m_token.classes().isEmpty())
-            child->setAttribute(classAttr, m_token.classes());
+            child->setAttributeWithoutSynchronization(classAttr, m_token.classes());
 
         if (nodeType == WebVTTNodeTypeVoice)
-            child->setAttribute(WebVTTElement::voiceAttributeName(), m_token.annotation());
+            child->setAttributeWithoutSynchronization(WebVTTElement::voiceAttributeName(), m_token.annotation());
         else if (nodeType == WebVTTNodeTypeLanguage) {
             m_languageStack.append(m_token.annotation());
-            child->setAttribute(WebVTTElement::langAttributeName(), m_languageStack.last());
+            child->setAttributeWithoutSynchronization(WebVTTElement::langAttributeName(), m_languageStack.last());
         }
         if (!m_languageStack.isEmpty())
             child->setLanguage(m_languageStack.last());
index c7c6d6f..021dcbd 100644 (file)
@@ -779,7 +779,7 @@ InspectorStyleSheet* InspectorCSSAgent::createInspectorStyleSheetForDocument(Doc
         return nullptr;
 
     Ref<Element> styleElement = document.createElement(HTMLNames::styleTag, false);
-    styleElement->setAttribute(HTMLNames::typeAttr, "text/css");
+    styleElement->setAttributeWithoutSynchronization(HTMLNames::typeAttr, AtomicString("text/css", AtomicString::ConstructFromLiteral));
 
     ContainerNode* targetNode;
     // HEAD is absent in ImageDocuments, for example.
index 193b598..7abcf77 100644 (file)
@@ -926,7 +926,7 @@ Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Fr
     if (frame->ownerElement()) {
         String name = frame->ownerElement()->getNameAttribute();
         if (name.isEmpty())
-            name = frame->ownerElement()->getAttribute(HTMLNames::idAttr);
+            name = frame->ownerElement()->fastGetAttribute(HTMLNames::idAttr);
         frameObject->setName(name);
     }
 
index 81072ad..531f2e7 100644 (file)
@@ -238,7 +238,7 @@ void MathMLSelectElement::toggle()
 
     // We update the attribute value of the selection attribute.
     // This will also call MathMLSelectElement::attributeChanged to update the selected child.
-    setAttribute(MathMLNames::selectionAttr, AtomicString::number(newSelectedChildIndex));
+    setAttributeWithoutSynchronization(MathMLNames::selectionAttr, AtomicString::number(newSelectedChildIndex));
 }
 
 }
index c1c8d10..0962a55 100644 (file)
@@ -239,7 +239,7 @@ void PageSerializer::serializeFrame(Frame* frame)
         } else if (is<HTMLLinkElement>(element)) {
             HTMLLinkElement& linkElement = downcast<HTMLLinkElement>(element);
             if (CSSStyleSheet* sheet = linkElement.sheet()) {
-                URL url = document->completeURL(linkElement.getAttribute(HTMLNames::hrefAttr));
+                URL url = document->completeURL(linkElement.fastGetAttribute(HTMLNames::hrefAttr));
                 serializeCSSStyleSheet(sheet, url);
                 ASSERT(m_resourceURLs.contains(url));
             }
index 6955d34..c1dd80e 100644 (file)
@@ -144,7 +144,7 @@ bool RenderDetailsMarker::isOpen() const
         if (!renderer->node())
             continue;
         if (is<HTMLDetailsElement>(*renderer->node()))
-            return !downcast<HTMLDetailsElement>(*renderer->node()).getAttribute(openAttr).isNull();
+            return !downcast<HTMLDetailsElement>(*renderer->node()).fastGetAttribute(openAttr).isNull();
         if (is<HTMLInputElement>(*renderer->node()))
             return true;
     }
index 5aa917e..42c6cd1 100644 (file)
@@ -374,7 +374,7 @@ String SVGElement::xmlbase() const
 
 void SVGElement::setXmlbase(const String& value, ExceptionCode&)
 {
-    setAttribute(XMLNames::baseAttr, value);
+    setAttributeWithoutSynchronization(XMLNames::baseAttr, value);
 }
 
 void SVGElement::removedFrom(ContainerNode& rootParent)
index 283b2da..cf7ed0d 100644 (file)
@@ -107,7 +107,7 @@ const AtomicString& SVGSVGElement::contentScriptType() const
 
 void SVGSVGElement::setContentScriptType(const AtomicString& type)
 {
-    setAttribute(SVGNames::contentScriptTypeAttr, type);
+    setAttributeWithoutSynchronization(SVGNames::contentScriptTypeAttr, type);
 }
 
 const AtomicString& SVGSVGElement::contentStyleType() const
@@ -119,7 +119,7 @@ const AtomicString& SVGSVGElement::contentStyleType() const
 
 void SVGSVGElement::setContentStyleType(const AtomicString& type)
 {
-    setAttribute(SVGNames::contentStyleTypeAttr, type);
+    setAttributeWithoutSynchronization(SVGNames::contentStyleTypeAttr, type);
 }
 
 FloatRect SVGSVGElement::viewport() const
index 045ae6d..c5b70db 100644 (file)
@@ -81,7 +81,7 @@ const AtomicString& SVGStyleElement::media() const
 
 void SVGStyleElement::setMedia(const AtomicString& media, ExceptionCode&)
 {
-    setAttribute(SVGNames::mediaAttr, media);
+    setAttributeWithoutSynchronization(SVGNames::mediaAttr, media);
 }
 
 String SVGStyleElement::title() const
@@ -91,7 +91,7 @@ String SVGStyleElement::title() const
 
 void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode&)
 {
-    setAttribute(SVGNames::titleAttr, title);
+    setAttributeWithoutSynchronization(SVGNames::titleAttr, title);
 }
 
 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
index e1cb1fc..7382683 100644 (file)
@@ -1,3 +1,15 @@
+2016-07-15  Chris Dumez  <cdumez@apple.com>
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159793
+
+        Reviewed by Ryosuke Niwa.
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.
+
+        * WebView/WebHTMLRepresentation.mm:
+        (matchLabelsAgainstElement):
+
 2016-07-14  Alex Christensen  <achristensen@webkit.org>
 
         Use SocketProvider to create SocketStreamHandles
index a437890..c405d17 100644 (file)
@@ -520,11 +520,11 @@ static NSString* matchLabelsAgainstElement(NSArray* labels, Element* element)
 {
     // Match against the name element, then against the id element if no match is found for the name element.
     // See 7538330 for one popular site that benefits from the id element check.
-    String resultFromNameAttribute = matchLabelsAgainstString(labels, element->getAttribute(nameAttr));
+    String resultFromNameAttribute = matchLabelsAgainstString(labels, element->fastGetAttribute(nameAttr));
     if (!resultFromNameAttribute.isEmpty())
         return resultFromNameAttribute;
     
-    return matchLabelsAgainstString(labels, element->getAttribute(idAttr));
+    return matchLabelsAgainstString(labels, element->fastGetAttribute(idAttr));
 }
 
 
index e7567cc..5fc850b 100644 (file)
@@ -1,3 +1,15 @@
+2016-07-15  Chris Dumez  <cdumez@apple.com>
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159793
+
+        Reviewed by Ryosuke Niwa.
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.
+
+        * DOMHTMLClasses.cpp:
+        (DOMHTMLElement::idName):
+
 2016-07-14  Chris Dumez  <cdumez@apple.com>
 
         Use emptyString() instead of "" when possible
index e481d0d..8522ec4 100644 (file)
@@ -429,7 +429,7 @@ HRESULT DOMHTMLElement::idName(__deref_opt_out BSTR* result)
         return E_POINTER;
 
     ASSERT(is<HTMLElement>(m_element));
-    String idString = downcast<HTMLElement>(m_element)->getAttribute(idAttr);
+    String idString = downcast<HTMLElement>(m_element)->fastGetAttribute(idAttr);
     *result = BString(idString).release();
     return S_OK;
 }
index 71d2199..b210ef9 100644 (file)
@@ -1,3 +1,21 @@
+2016-07-15  Chris Dumez  <cdumez@apple.com>
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
+        https://bugs.webkit.org/show_bug.cgi?id=159793
+
+        Reviewed by Ryosuke Niwa.
+
+        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.
+
+        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
+        (WebKit::PDFPlugin::PDFPlugin):
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::createPasswordEntryForm):
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
+        (WebKit::PDFPluginAnnotation::attach):
+        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
+        (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
+
 2016-07-15  Ryosuke Niwa  <rniwa@webkit.org>
 
         Disable custom elements in Safari Tech Preview
index 1223f49..8bb3e3f 100644 (file)
@@ -523,7 +523,7 @@ PDFPlugin::PDFPlugin(WebFrame* frame)
     if (supportsForms()) {
         Document* document = webFrame()->coreFrame()->document();
         m_annotationContainer = document->createElement(divTag, false);
-        m_annotationContainer->setAttribute(idAttr, "annotationContainer");
+        m_annotationContainer->setAttributeWithoutSynchronization(idAttr, AtomicString("annotationContainer", AtomicString::ConstructFromLiteral));
 
         auto annotationStyleElement = document->createElement(styleTag, false);
         annotationStyleElement->setTextContent(annotationStyle, ASSERT_NO_EXCEPTION);
index 13cebb2..db4ec3e 100644 (file)
@@ -795,7 +795,7 @@ void PDFPlugin::createPasswordEntryForm()
 
     Document* document = webFrame()->coreFrame()->document();
     m_passwordContainer = document->createElement(divTag, false);
-    m_passwordContainer->setAttribute(idAttr, "passwordContainer");
+    m_passwordContainer->setAttributeWithoutSynchronization(idAttr, AtomicString("passwordContainer", AtomicString::ConstructFromLiteral));
 
     m_passwordField = PDFPluginPasswordField::create(m_pdfLayerController.get(), this);
     m_passwordField->attach(m_passwordContainer.get());
index d214fa4..a732033 100644 (file)
@@ -69,7 +69,7 @@ void PDFPluginAnnotation::attach(Element* parent)
     m_parent = parent;
     m_element = createAnnotationElement();
 
-    m_element->setAttribute(classAttr, "annotation");
+    m_element->setAttributeWithoutSynchronization(classAttr, AtomicString("annotation", AtomicString::ConstructFromLiteral));
     m_element->addEventListener(eventNames().changeEvent, *m_eventListener, false);
     m_element->addEventListener(eventNames().blurEvent, *m_eventListener, false);
 
index 5501234..f46af16 100644 (file)
@@ -87,11 +87,11 @@ PassRefPtr<Element> PDFPluginChoiceAnnotation::createAnnotationElement()
 
     for (NSString *choice in choices) {
         auto choiceOption = document.createElement(optionTag, false);
-        choiceOption->setAttribute(valueAttr, choice);
+        choiceOption->setAttributeWithoutSynchronization(valueAttr, choice);
         choiceOption->setTextContent(choice, ASSERT_NO_EXCEPTION);
 
         if (choice == selectedChoice)
-            choiceOption->setAttribute(selectedAttr, "selected");
+            choiceOption->setAttributeWithoutSynchronization(selectedAttr, AtomicString("selected", AtomicString::ConstructFromLiteral));
 
         styledElement->appendChild(choiceOption);
     }