Changeset 203326 in webkit
- Timestamp:
- Jul 16, 2016, 10:21:07 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r203324 r203326 1 2016-07-16 Chris Dumez <cdumez@apple.com> 2 3 Use fastHasAttribute() when possible 4 https://bugs.webkit.org/show_bug.cgi?id=159838 5 6 Reviewed by Ryosuke Niwa. 7 8 Use fastHasAttribute() when possible, for performance. 9 10 * editing/DeleteSelectionCommand.cpp: 11 (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss): 12 * editing/markup.cpp: 13 (WebCore::createMarkupInternal): 14 * html/HTMLAnchorElement.cpp: 15 (WebCore::HTMLAnchorElement::draggable): 16 * html/HTMLFrameElementBase.cpp: 17 (WebCore::HTMLFrameElementBase::parseAttribute): 18 * mathml/MathMLSelectElement.cpp: 19 (WebCore::MathMLSelectElement::getSelectedSemanticsChild): 20 * rendering/RenderThemeIOS.mm: 21 (WebCore::RenderThemeIOS::adjustMenuListButtonStyle): 22 1 23 2016-07-16 Ryosuke Niwa <rniwa@webkit.org> 2 24 -
trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp
r200931 r203326 435 435 while (node && node != range->pastLastNode()) { 436 436 RefPtr<Node> nextNode = NodeTraversal::next(*node); 437 if ((is<HTMLStyleElement>(*node) && !downcast<HTMLStyleElement>(*node). hasAttribute(scopedAttr)) || is<HTMLLinkElement>(*node)) {437 if ((is<HTMLStyleElement>(*node) && !downcast<HTMLStyleElement>(*node).fastHasAttribute(scopedAttr)) || is<HTMLLinkElement>(*node)) { 438 438 nextNode = NodeTraversal::nextSkippingChildren(*node); 439 439 RefPtr<ContainerNode> rootEditableElement = node->rootEditableElement(); -
trunk/Source/WebCore/editing/markup.cpp
r203324 r203326 630 630 // appears to have no effect. 631 631 if ((!fullySelectedRootStyle || !fullySelectedRootStyle->style() || !fullySelectedRootStyle->style()->getPropertyCSSValue(CSSPropertyBackgroundImage)) 632 && fullySelectedRoot-> hasAttribute(backgroundAttr))632 && fullySelectedRoot->fastHasAttribute(backgroundAttr)) 633 633 fullySelectedRootStyle->style()->setProperty(CSSPropertyBackgroundImage, "url('" + fullySelectedRoot->getAttribute(backgroundAttr) + "')"); 634 634 -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r203324 r203326 282 282 if (equalLettersIgnoringASCIICase(value, "false")) 283 283 return false; 284 return hasAttribute(hrefAttr);284 return fastHasAttribute(hrefAttr); 285 285 } 286 286 -
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp
r203324 r203326 100 100 HTMLFrameOwnerElement::parseAttribute(name, value); 101 101 // Falling back to using the 'id' attribute is not standard but some content relies on this behavior. 102 if (! hasAttribute(nameAttr))102 if (!fastHasAttribute(nameAttr)) 103 103 m_frameName = value; 104 104 } else if (name == nameAttr) { -
trunk/Source/WebCore/mathml/MathMLSelectElement.cpp
r203324 r203326 175 175 if (child->hasTagName(MathMLNames::annotationTag)) { 176 176 // If the <annotation> element has an src attribute then it is a reference to arbitrary binary data and it is not clear whether we can display it. Hence we just ignore the annotation. 177 if (child-> hasAttribute(MathMLNames::srcAttr))177 if (child->fastHasAttribute(MathMLNames::srcAttr)) 178 178 continue; 179 179 // Otherwise, we assume it is a text annotation that can always be displayed and we stop here. … … 183 183 if (child->hasTagName(MathMLNames::annotation_xmlTag)) { 184 184 // If the <annotation-xml> element has an src attribute then it is a reference to arbitrary binary data and it is not clear whether we can display it. Hence we just ignore the annotation. 185 if (child-> hasAttribute(MathMLNames::srcAttr))185 if (child->fastHasAttribute(MathMLNames::srcAttr)) 186 186 continue; 187 187 // If the <annotation-xml> element has an encoding attribute describing presentation MathML, SVG or HTML we assume the content can be displayed and we stop here. -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r203324 r203326 626 626 // or a date input. We don't force these if this is just an element with 627 627 // "-webkit-appearance: menulist-button". 628 if (is<HTMLSelectElement>(*element) && !element-> hasAttribute(HTMLNames::multipleAttr))628 if (is<HTMLSelectElement>(*element) && !element->fastHasAttribute(HTMLNames::multipleAttr)) 629 629 adjustSelectListButtonStyle(style, *element); 630 630 else if (is<HTMLInputElement>(*element))
Note:
See TracChangeset
for help on using the changeset viewer.