Changeset 143089 in webkit
- Timestamp:
- Feb 15, 2013 6:36:29 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143088 r143089 1 2013-02-15 Elliott Sprehn <esprehn@chromium.org> 2 3 Rename HasCustomCallbacks to HasCustomStyleCallbacks 4 https://bugs.webkit.org/show_bug.cgi?id=109982 5 6 Reviewed by Eric Seidel. 7 8 Now that inside ChildFrameDisconnector we only call isFrameOwnerElement() 9 on elements that report having descendants (or themselves) have connected 10 frames we don't need to be as agressive about avoiding the virtual call 11 to isFrameOwnerElement() which lets us rename hasCustomCallbacks to 12 hasCustomStyleCallbacks to better reflect it's purpose. 13 14 * dom/ContainerNodeAlgorithms.h: 15 (WebCore::ChildFrameDisconnector::collectFrameOwners): 16 * dom/Element.cpp: 17 (WebCore::Element::styleForRenderer): 18 (WebCore::Element::recalcStyle): 19 (WebCore::Element::willRecalcStyle): 20 (WebCore::Element::didRecalcStyle): 21 (WebCore::Element::customStyleForRenderer): 22 * dom/Node.h: 23 (WebCore::Node::pseudoId): 24 (WebCore::Node::hasCustomStyleCallbacks): 25 (WebCore::Node::customPseudoId): 26 (WebCore::Node::setHasCustomStyleCallbacks): 27 * dom/PseudoElement.cpp: 28 (WebCore::PseudoElement::PseudoElement): 29 * dom/ShadowRoot.cpp: 30 (WebCore::ShadowRoot::recalcStyle): 31 * html/HTMLFormControlElement.cpp: 32 (WebCore::HTMLFormControlElement::HTMLFormControlElement): 33 * html/HTMLFrameOwnerElement.cpp: 34 (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): 35 (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): 36 * html/HTMLFrameSetElement.cpp: 37 (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): 38 * html/HTMLIFrameElement.cpp: 39 (WebCore::HTMLIFrameElement::HTMLIFrameElement): 40 * html/HTMLInputElement.cpp: 41 (WebCore::HTMLInputElement::HTMLInputElement): 42 * html/HTMLMediaElement.cpp: 43 (WebCore::HTMLMediaElement::HTMLMediaElement): 44 * html/HTMLOptGroupElement.cpp: 45 (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): 46 * html/HTMLOptionElement.cpp: 47 (WebCore::HTMLOptionElement::HTMLOptionElement): 48 * html/HTMLPlugInImageElement.cpp: 49 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): 50 * html/shadow/DateTimeEditElement.cpp: 51 (WebCore::DateTimeEditElement::DateTimeEditElement): 52 * html/shadow/TextControlInnerElements.cpp: 53 (WebCore::TextControlInnerElement::TextControlInnerElement): 54 (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): 55 * html/shadow/TextFieldDecorationElement.cpp: 56 (WebCore::TextFieldDecorationElement::TextFieldDecorationElement): 57 * svg/SVGElement.cpp: 58 (WebCore::SVGElement::SVGElement): 59 * svg/SVGUseElement.cpp: 60 (WebCore::SVGUseElement::SVGUseElement): 61 1 62 2013-02-15 Eric Carlson <eric.carlson@apple.com> 2 63 -
trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h
r142899 r143089 292 292 return; 293 293 294 // FIXME: This should just check isElementNode() to avoid the virtual call 295 // and we should not depend on hasCustomCallbacks(). 296 if (root->hasCustomCallbacks() && root->isFrameOwnerElement()) 294 if (root->isHTMLElement() && root->isFrameOwnerElement()) 297 295 m_frameOwners.append(toFrameOwnerElement(root)); 298 296 -
trunk/Source/WebCore/dom/Element.cpp
r143076 r143089 1317 1317 PassRefPtr<RenderStyle> Element::styleForRenderer() 1318 1318 { 1319 if (hasCustom Callbacks()) {1319 if (hasCustomStyleCallbacks()) { 1320 1320 if (RefPtr<RenderStyle> style = customStyleForRenderer()) 1321 1321 return style.release(); … … 1327 1327 void Element::recalcStyle(StyleChange change) 1328 1328 { 1329 if (hasCustom Callbacks()) {1329 if (hasCustomStyleCallbacks()) { 1330 1330 if (!willRecalcStyle(change)) 1331 1331 return; … … 1352 1352 clearChildNeedsStyleRecalc(); 1353 1353 1354 if (hasCustom Callbacks())1354 if (hasCustomStyleCallbacks()) 1355 1355 didRecalcStyle(change); 1356 1356 return; … … 1423 1423 clearChildNeedsStyleRecalc(); 1424 1424 1425 if (hasCustom Callbacks())1425 if (hasCustomStyleCallbacks()) 1426 1426 didRecalcStyle(change); 1427 1427 } … … 2723 2723 bool Element::willRecalcStyle(StyleChange) 2724 2724 { 2725 ASSERT(hasCustom Callbacks());2725 ASSERT(hasCustomStyleCallbacks()); 2726 2726 return true; 2727 2727 } … … 2729 2729 void Element::didRecalcStyle(StyleChange) 2730 2730 { 2731 ASSERT(hasCustom Callbacks());2731 ASSERT(hasCustomStyleCallbacks()); 2732 2732 } 2733 2733 … … 2735 2735 PassRefPtr<RenderStyle> Element::customStyleForRenderer() 2736 2736 { 2737 ASSERT(hasCustom Callbacks());2737 ASSERT(hasCustomStyleCallbacks()); 2738 2738 return 0; 2739 2739 } -
trunk/Source/WebCore/dom/Node.h
r141972 r143089 234 234 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; } 235 235 bool isAfterPseudoElement() const { return pseudoId() == AFTER; } 236 PseudoId pseudoId() const { return (isElementNode() && hasCustom Callbacks()) ? customPseudoId() : NOPSEUDO; }236 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbacks()) ? customPseudoId() : NOPSEUDO; } 237 237 238 238 virtual bool isMediaControlElement() const { return false; } … … 260 260 261 261 bool inNamedFlow() const { return getFlag(InNamedFlowFlag); } 262 bool hasCustom Callbacks() const { return getFlag(HasCustomCallbacksFlag); }262 bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallbacksFlag); } 263 263 264 264 bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChildNodesFlag); } … … 718 718 InNamedFlowFlag = 1 << 19, 719 719 HasSyntheticAttrChildNodesFlag = 1 << 20, 720 HasCustom CallbacksFlag = 1 << 21,720 HasCustomStyleCallbacksFlag = 1 << 21, 721 721 HasScopedHTMLStyleChildFlag = 1 << 22, 722 722 HasEventTargetDataFlag = 1 << 23, … … 747 747 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, 748 748 CreateStyledElement = CreateElement | IsStyledElementFlag, 749 CreateHTMLElement = CreateStyledElement | IsHTMLFlag, 750 CreateFrameOwnerElement = CreateHTMLElement | HasCustomCallbacksFlag, 749 CreateHTMLElement = CreateStyledElement | IsHTMLFlag, 751 750 CreateSVGElement = CreateStyledElement | IsSVGFlag, 752 751 CreateDocument = CreateContainer | InDocumentFlag, … … 756 755 Node(Document*, ConstructionType); 757 756 758 virtual PseudoId customPseudoId() const759 {760 ASSERT(hasCustomCallbacks());761 return NOPSEUDO;762 }763 764 757 virtual void didMoveToNewDocument(Document* oldDocument); 765 758 … … 774 767 void clearEventTargetData(); 775 768 776 void setHasCustom Callbacks() { setFlag(true, HasCustomCallbacksFlag); }769 void setHasCustomStyleCallbacks() { setFlag(true, HasCustomStyleCallbacksFlag); } 777 770 778 771 Document* documentInternal() const { return treeScope()->documentScope(); } … … 781 774 private: 782 775 friend class TreeShared<Node>; 776 777 virtual PseudoId customPseudoId() const 778 { 779 ASSERT(hasCustomStyleCallbacks()); 780 return NOPSEUDO; 781 } 783 782 784 783 void removedLastRef(); -
trunk/Source/WebCore/dom/PseudoElement.cpp
r143060 r143089 61 61 ASSERT(pseudoId != NOPSEUDO); 62 62 setParentOrShadowHostNode(parent); 63 setHasCustom Callbacks();63 setHasCustomStyleCallbacks(); 64 64 } 65 65 -
trunk/Source/WebCore/dom/ShadowRoot.cpp
r141570 r143089 130 130 { 131 131 // ShadowRoot doesn't support custom callbacks. 132 ASSERT(!hasCustom Callbacks());132 ASSERT(!hasCustomStyleCallbacks()); 133 133 134 134 StyleResolver* styleResolver = document()->styleResolver(); -
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
r141947 r143089 64 64 { 65 65 setForm(form ? form : findFormAncestor()); 66 setHasCustom Callbacks();66 setHasCustomStyleCallbacks(); 67 67 } 68 68 -
trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp
r141524 r143089 35 35 36 36 HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Document* document) 37 : HTMLElement(tagName, document , CreateFrameOwnerElement)37 : HTMLElement(tagName, document) 38 38 , m_contentFrame(0) 39 39 , m_sandboxFlags(SandboxNone) … … 76 76 void HTMLFrameOwnerElement::disconnectContentFrame() 77 77 { 78 ASSERT(hasCustomCallbacks());79 78 // FIXME: Currently we don't do this in removedFrom because this causes an 80 79 // unload event in the subframe which could execute script that could then -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r135069 r143089 57 57 ASSERT(hasTagName(framesetTag)); 58 58 59 setHasCustom Callbacks();59 setHasCustomStyleCallbacks(); 60 60 } 61 61 -
trunk/Source/WebCore/html/HTMLIFrameElement.cpp
r138897 r143089 44 44 { 45 45 ASSERT(hasTagName(iframeTag)); 46 setHasCustom Callbacks();46 setHasCustomStyleCallbacks(); 47 47 } 48 48 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r142827 r143089 137 137 ASSERT(hasTagName(inputTag) || hasTagName(isindexTag)); 138 138 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 139 setHasCustom Callbacks();139 setHasCustomStyleCallbacks(); 140 140 #endif 141 141 } -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r143072 r143089 314 314 #endif 315 315 316 setHasCustom Callbacks();316 setHasCustomStyleCallbacks(); 317 317 addElementToDocumentMap(this, document); 318 318 -
trunk/Source/WebCore/html/HTMLOptGroupElement.cpp
r139064 r143089 43 43 { 44 44 ASSERT(hasTagName(optgroupTag)); 45 setHasCustom Callbacks();45 setHasCustomStyleCallbacks(); 46 46 } 47 47 -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r139064 r143089 57 57 { 58 58 ASSERT(hasTagName(optionTag)); 59 setHasCustom Callbacks();59 setHasCustomStyleCallbacks(); 60 60 } 61 61 -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r142685 r143089 78 78 , m_swapRendererTimer(this, &HTMLPlugInImageElement::swapRendererTimerFired) 79 79 { 80 setHasCustom Callbacks();80 setHasCustomStyleCallbacks(); 81 81 } 82 82 -
trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp
r142592 r143089 403 403 DEFINE_STATIC_LOCAL(AtomicString, dateTimeEditPseudoId, ("-webkit-datetime-edit", AtomicString::ConstructFromLiteral)); 404 404 setPseudo(dateTimeEditPseudoId); 405 setHasCustom Callbacks();405 setHasCustomStyleCallbacks(); 406 406 } 407 407 -
trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp
r137124 r143089 54 54 : HTMLDivElement(divTag, document) 55 55 { 56 setHasCustom Callbacks();56 setHasCustomStyleCallbacks(); 57 57 } 58 58 … … 73 73 : HTMLDivElement(divTag, document) 74 74 { 75 setHasCustom Callbacks();75 setHasCustomStyleCallbacks(); 76 76 } 77 77 -
trunk/Source/WebCore/html/shadow/TextFieldDecorationElement.cpp
r141235 r143089 63 63 { 64 64 ASSERT(decorator); 65 setHasCustom Callbacks();65 setHasCustomStyleCallbacks(); 66 66 } 67 67 -
trunk/Source/WebCore/svg/SVGElement.cpp
r142791 r143089 52 52 : StyledElement(tagName, document, constructionType) 53 53 { 54 setHasCustom Callbacks();54 setHasCustomStyleCallbacks(); 55 55 } 56 56 -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r141066 r143089 94 94 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) 95 95 { 96 ASSERT(hasCustom Callbacks());96 ASSERT(hasCustomStyleCallbacks()); 97 97 ASSERT(hasTagName(SVGNames::useTag)); 98 98 registerAnimatedPropertiesForSVGUseElement();
Note: See TracChangeset
for help on using the changeset viewer.