Changeset 202358 in webkit
- Timestamp:
- Jun 22, 2016 4:35:25 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202354 r202358 1 2016-06-22 Benjamin Poulain <bpoulain@apple.com> 2 3 AX: Add support for CSS4 :focus-within pseudo 4 https://bugs.webkit.org/show_bug.cgi?id=140144 5 6 Reviewed by Antti Koivisto. 7 8 * fast/css/css-selector-text-expected.txt: 9 * fast/css/css-selector-text.html: 10 * fast/css/css-set-selector-text-expected.txt: 11 * fast/css/css-set-selector-text.html: 12 * fast/css/pseudo-focus-within-basics-expected.html: Added. 13 * fast/css/pseudo-focus-within-basics.html: Added. 14 * fast/css/pseudo-focus-within-inside-shadow-dom-expected.html: Added. 15 * fast/css/pseudo-focus-within-inside-shadow-dom.html: Added. 16 * fast/css/pseudo-focus-within-style-sharing-1-expected.html: Added. 17 * fast/css/pseudo-focus-within-style-sharing-1.html: Added. 18 * fast/css/pseudo-focus-within-style-sharing-2-expected.html: Added. 19 * fast/css/pseudo-focus-within-style-sharing-2.html: Added. 20 * fast/selectors/focus-within-style-update-expected.txt: Added. 21 * fast/selectors/focus-within-style-update.html: Added. 22 1 23 2016-06-17 Dean Jackson <dino@apple.com> 2 24 -
trunk/LayoutTests/fast/css/css-selector-text-expected.txt
r202066 r202358 216 216 PASS parseThenSerializeRule('a#b::-webkit-input-placeholder { }') is 'a#b::-webkit-input-placeholder { }' 217 217 PASS parseThenSerializeRule('a[b].c#d::-webkit-input-placeholder { }') is 'a[b].c#d::-webkit-input-placeholder { }' 218 219 PASS parseThenSerializeRule('a[b]:default { }') is 'a[b]:default { }' 220 PASS parseThenSerializeRule('a.b:default { }') is 'a.b:default { }' 221 PASS parseThenSerializeRule('a#b:default { }') is 'a#b:default { }' 222 PASS parseThenSerializeRule('a[b].c#d:default { }') is 'a[b].c#d:default { }' 223 224 PASS parseThenSerializeRule('a[b]:in-range { }') is 'a[b]:in-range { }' 225 PASS parseThenSerializeRule('a.b:in-range { }') is 'a.b:in-range { }' 226 PASS parseThenSerializeRule('a#b:in-range { }') is 'a#b:in-range { }' 227 PASS parseThenSerializeRule('a[b].c#d:in-range { }') is 'a[b].c#d:in-range { }' 228 229 PASS parseThenSerializeRule('a[b]:out-of-range { }') is 'a[b]:out-of-range { }' 230 PASS parseThenSerializeRule('a.b:out-of-range { }') is 'a.b:out-of-range { }' 231 PASS parseThenSerializeRule('a#b:out-of-range { }') is 'a#b:out-of-range { }' 232 PASS parseThenSerializeRule('a[b].c#d:out-of-range { }') is 'a[b].c#d:out-of-range { }' 233 234 PASS parseThenSerializeRule('a[b]:focus-within { }') is 'a[b]:focus-within { }' 235 PASS parseThenSerializeRule('a.b:focus-within { }') is 'a.b:focus-within { }' 236 PASS parseThenSerializeRule('a#b:focus-within { }') is 'a#b:focus-within { }' 237 PASS parseThenSerializeRule('a[b].c#d:focus-within { }') is 'a[b].c#d:focus-within { }' 218 238 219 239 PASS parseThenSerializeRule('input:not([type="file"]):focus { }') is 'input:not([type="file"]):focus { }' -
trunk/LayoutTests/fast/css/css-selector-text.html
r202066 r202358 308 308 debug(''); 309 309 310 testSelectorRoundTrip("a[b]:default"); 311 testSelectorRoundTrip("a.b:default"); 312 testSelectorRoundTrip("a#b:default"); 313 testSelectorRoundTrip("a[b].c#d:default"); 314 315 debug(''); 316 317 testSelectorRoundTrip("a[b]:in-range"); 318 testSelectorRoundTrip("a.b:in-range"); 319 testSelectorRoundTrip("a#b:in-range"); 320 testSelectorRoundTrip("a[b].c#d:in-range"); 321 322 debug(''); 323 324 testSelectorRoundTrip("a[b]:out-of-range"); 325 testSelectorRoundTrip("a.b:out-of-range"); 326 testSelectorRoundTrip("a#b:out-of-range"); 327 testSelectorRoundTrip("a[b].c#d:out-of-range"); 328 329 debug(''); 330 331 testSelectorRoundTrip("a[b]:focus-within"); 332 testSelectorRoundTrip("a.b:focus-within"); 333 testSelectorRoundTrip("a#b:focus-within"); 334 testSelectorRoundTrip("a[b].c#d:focus-within"); 335 336 debug(''); 337 310 338 testSelectorRoundTrip('input:not([type="file"]):focus'); 311 339 testSelectorRoundTrip(':-webkit-any([type="file"])'); -
trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt
r202066 r202358 219 219 PASS setThenReadSelectorText('a[b].c#d::-webkit-input-placeholder') is 'a[b].c#d::-webkit-input-placeholder' 220 220 221 PASS setThenReadSelectorText('a[b]:default') is 'a[b]:default' 222 PASS setThenReadSelectorText('a.b:default') is 'a.b:default' 223 PASS setThenReadSelectorText('a#b:default') is 'a#b:default' 224 PASS setThenReadSelectorText('a[b].c#d:default') is 'a[b].c#d:default' 225 226 PASS setThenReadSelectorText('a[b]:in-range') is 'a[b]:in-range' 227 PASS setThenReadSelectorText('a.b:in-range') is 'a.b:in-range' 228 PASS setThenReadSelectorText('a#b:in-range') is 'a#b:in-range' 229 PASS setThenReadSelectorText('a[b].c#d:in-range') is 'a[b].c#d:in-range' 230 231 PASS setThenReadSelectorText('a[b]:out-of-range') is 'a[b]:out-of-range' 232 PASS setThenReadSelectorText('a.b:out-of-range') is 'a.b:out-of-range' 233 PASS setThenReadSelectorText('a#b:out-of-range') is 'a#b:out-of-range' 234 PASS setThenReadSelectorText('a[b].c#d:out-of-range') is 'a[b].c#d:out-of-range' 235 236 PASS setThenReadSelectorText('a[b]:focus-within') is 'a[b]:focus-within' 237 PASS setThenReadSelectorText('a.b:focus-within') is 'a.b:focus-within' 238 PASS setThenReadSelectorText('a#b:focus-within') is 'a#b:focus-within' 239 PASS setThenReadSelectorText('a[b].c#d:focus-within') is 'a[b].c#d:focus-within' 240 221 241 PASS setThenReadSelectorText('input:not([type="file"]):focus') is 'input:not([type="file"]):focus' 222 242 PASS setThenReadSelectorText(':-webkit-any([type="file"])') is ':-webkit-any([type="file"])' -
trunk/LayoutTests/fast/css/css-set-selector-text.html
r202066 r202358 312 312 debug(''); 313 313 314 testSelectorRoundTrip("a[b]:default"); 315 testSelectorRoundTrip("a.b:default"); 316 testSelectorRoundTrip("a#b:default"); 317 testSelectorRoundTrip("a[b].c#d:default"); 318 319 debug(''); 320 321 testSelectorRoundTrip("a[b]:in-range"); 322 testSelectorRoundTrip("a.b:in-range"); 323 testSelectorRoundTrip("a#b:in-range"); 324 testSelectorRoundTrip("a[b].c#d:in-range"); 325 326 debug(''); 327 328 testSelectorRoundTrip("a[b]:out-of-range"); 329 testSelectorRoundTrip("a.b:out-of-range"); 330 testSelectorRoundTrip("a#b:out-of-range"); 331 testSelectorRoundTrip("a[b].c#d:out-of-range"); 332 333 debug(''); 334 335 testSelectorRoundTrip("a[b]:focus-within"); 336 testSelectorRoundTrip("a.b:focus-within"); 337 testSelectorRoundTrip("a#b:focus-within"); 338 testSelectorRoundTrip("a[b].c#d:focus-within"); 339 340 debug(''); 341 314 342 testSelectorRoundTrip('input:not([type="file"]):focus'); 315 343 testSelectorRoundTrip(':-webkit-any([type="file"])'); -
trunk/Source/WebCore/ChangeLog
r202356 r202358 1 2016-06-22 Benjamin Poulain <bpoulain@apple.com> 2 3 AX: Add support for CSS4 :focus-within pseudo 4 https://bugs.webkit.org/show_bug.cgi?id=140144 5 6 Reviewed by Antti Koivisto. 7 8 Tests: fast/css/pseudo-focus-within-basics.html 9 fast/css/pseudo-focus-within-inside-shadow-dom.html 10 fast/css/pseudo-focus-within-style-sharing-1.html 11 fast/css/pseudo-focus-within-style-sharing-2.html 12 fast/selectors/focus-within-style-update.html 13 14 * css/CSSSelector.cpp: 15 (WebCore::CSSSelector::selectorText): 16 * css/CSSSelector.h: 17 * css/SelectorChecker.cpp: 18 (WebCore::SelectorChecker::checkOne): 19 * css/SelectorPseudoClassAndCompatibilityElementMap.in: 20 * cssjit/SelectorCompiler.cpp: 21 (WebCore::SelectorCompiler::addPseudoClassType): 22 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): 23 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasFocusWithin): 24 * dom/ContainerNode.cpp: 25 (WebCore::destroyRenderTreeIfNeeded): 26 * dom/Element.cpp: 27 (WebCore::Element::~Element): 28 (WebCore::Element::setFocus): 29 (WebCore::Element::unregisterNamedFlowContentElement): 30 (WebCore::Element::setIsNamedFlowContentElement): 31 (WebCore::Element::clearIsNamedFlowContentElement): 32 (WebCore::Element::setStyleAffectedByFocusWithin): 33 (WebCore::Element::rareDataStyleAffectedByFocusWithin): 34 (WebCore::Element::rareDataIsNamedFlowContentElement): 35 * dom/Element.h: 36 (WebCore::Element::hasFocusWithin): 37 (WebCore::Element::styleAffectedByFocusWithin): 38 (WebCore::Element::isNamedFlowContentElement): 39 (WebCore::Element::setHasFocusWithin): 40 * dom/ElementRareData.h: 41 (WebCore::ElementRareData::styleAffectedByFocusWithin): 42 (WebCore::ElementRareData::setStyleAffectedByFocusWithin): 43 (WebCore::ElementRareData::isNamedFlowContentElement): 44 (WebCore::ElementRareData::setIsNamedFlowContentElement): 45 (WebCore::ElementRareData::ElementRareData): 46 (WebCore::ElementRareData::resetComputedStyle): 47 * dom/Node.h: 48 (WebCore::Node::flagHasFocusWithin): 49 (WebCore::Node::isNamedFlowContentNode): Deleted. 50 (WebCore::Node::setIsNamedFlowContentNode): Deleted. 51 (WebCore::Node::clearIsNamedFlowContentNode): Deleted. 52 * rendering/RenderNamedFlowThread.cpp: 53 (WebCore::RenderNamedFlowThread::clearContentElements): 54 (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement): 55 (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement): 56 (WebCore::nextNodeInsideContentElement): 57 * style/RenderTreeUpdater.cpp: 58 (WebCore::RenderTreeUpdater::updateElementRenderer): 59 * style/StyleRelations.cpp: 60 (WebCore::Style::commitRelationsToRenderStyle): 61 (WebCore::Style::commitRelations): 62 * style/StyleRelations.h: 63 * style/StyleSharingResolver.cpp: 64 (WebCore::Style::SharingResolver::canShareStyleWithElement): 65 1 66 2016-06-22 Oliver Hunt <oliver@apple.com> 2 67 -
trunk/Source/WebCore/css/CSSSelector.cpp
r202091 r202358 498 498 str.appendLiteral(":focus"); 499 499 break; 500 case CSSSelector::PseudoClassFocusWithin: 501 str.appendLiteral(":focus-within"); 502 break; 500 503 #if ENABLE(VIDEO_TRACK) 501 504 case CSSSelector::PseudoClassFuture: -
trunk/Source/WebCore/css/CSSSelector.h
r202091 r202358 113 113 PseudoClassDrag, 114 114 PseudoClassFocus, 115 PseudoClassFocusWithin, 115 116 PseudoClassActive, 116 117 PseudoClassChecked, -
trunk/Source/WebCore/css/SelectorChecker.cpp
r202245 r202358 945 945 case CSSSelector::PseudoClassFocus: 946 946 return matchesFocusPseudoClass(element); 947 case CSSSelector::PseudoClassFocusWithin: 948 addStyleRelation(checkingContext, element, Style::Relation::AffectedByFocusWithin); 949 return element.hasFocusWithin(); 947 950 case CSSSelector::PseudoClassHover: 948 951 if (m_strictParsing || element.isLink() || canMatchHoverOrActiveInQuirksMode(context)) { -
trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
r202091 r202358 26 26 first-of-type 27 27 focus 28 focus-within 28 29 horizontal 29 30 host -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r202245 r202358 324 324 void generateElementIsScopeRoot(Assembler::JumpList& failureCases); 325 325 void generateElementIsTarget(Assembler::JumpList& failureCases); 326 void generateElementHasFocusWithin(Assembler::JumpList& failureCases); 326 327 327 328 // Helpers. … … 675 676 case CSSSelector::PseudoClassOnlyChild: 676 677 case CSSSelector::PseudoClassPlaceholderShown: 678 case CSSSelector::PseudoClassFocusWithin: 677 679 fragment.pseudoClasses.add(type); 678 680 if (selectorContext == SelectorContext::QuerySelector) … … 2578 2580 if (fragment.pseudoClasses.contains(CSSSelector::PseudoClassTarget)) 2579 2581 generateElementIsTarget(matchingPostTagNameFailureCases); 2582 2583 if (fragment.pseudoClasses.contains(CSSSelector::PseudoClassFocusWithin)) 2584 generateElementHasFocusWithin(matchingPostTagNameFailureCases); 2580 2585 2581 2586 for (unsigned i = 0; i < fragment.unoptimizedPseudoClasses.size(); ++i) … … 3792 3797 } 3793 3798 3799 void SelectorCodeGenerator::generateElementHasFocusWithin(Assembler::JumpList& failureCases) 3800 { 3801 generateAddStyleRelationIfResolvingStyle(elementAddressRegister, Style::Relation::AffectedByFocusWithin); 3802 failureCases.append(m_assembler.branchTest32(Assembler::Zero, Assembler::Address(elementAddressRegister, Node::nodeFlagsMemoryOffset()), Assembler::TrustedImm32(Node::flagHasFocusWithin()))); 3803 } 3804 3794 3805 void SelectorCodeGenerator::generateElementIsFirstLink(Assembler::JumpList& failureCases, Assembler::RegisterID element) 3795 3806 { -
trunk/Source/WebCore/dom/ContainerNode.cpp
r202105 r202358 104 104 childIsHTMLSlotElement = is<HTMLSlotElement>(child); 105 105 // FIXME: Get rid of the named flow test. 106 if (!child.renderer() && !child.isNamedFlowContentNode() && !childIsHTMLSlotElement) 106 bool isElement = is<Element>(child); 107 if (!child.renderer() && !childIsHTMLSlotElement 108 && !(isElement && downcast<Element>(child).isNamedFlowContentElement())) 107 109 return; 108 if (is <Element>(child))110 if (isElement) 109 111 RenderTreeUpdater::tearDownRenderers(downcast<Element>(child)); 110 112 else if (is<Text>(child)) -
trunk/Source/WebCore/dom/Element.cpp
r202292 r202358 183 183 // When the document is not destroyed, an element that was part of a named flow 184 184 // content nodes should have been removed from the content nodes collection 185 // and the isNamedFlowContent Nodeflag reset.186 ASSERT_WITH_SECURITY_IMPLICATION(!isNamedFlowContent Node());185 // and the isNamedFlowContentElement flag reset. 186 ASSERT_WITH_SECURITY_IMPLICATION(!isNamedFlowContentElement()); 187 187 } 188 188 #endif … … 602 602 document().userActionElements().setFocused(this, flag); 603 603 setNeedsStyleRecalc(); 604 605 for (Element* element = this; element; element = element->parentOrShadowHostElement()) 606 element->setHasFocusWithin(flag); 604 607 } 605 608 … … 1621 1624 void Element::unregisterNamedFlowContentElement() 1622 1625 { 1623 if (isNamedFlowContent Node() && document().renderView())1626 if (isNamedFlowContentElement() && document().renderView()) 1624 1627 document().renderView()->flowThreadController().unregisterNamedFlowContentElement(*this); 1625 1628 } … … 1909 1912 } 1910 1913 1914 void Element::setIsNamedFlowContentElement() 1915 { 1916 ensureElementRareData().setIsNamedFlowContentElement(true); 1917 } 1918 1919 void Element::clearIsNamedFlowContentElement() 1920 { 1921 ensureElementRareData().setIsNamedFlowContentElement(false); 1922 } 1923 1911 1924 void Element::removeAllEventListeners() 1912 1925 { … … 2563 2576 } 2564 2577 2578 void Element::setStyleAffectedByFocusWithin() 2579 { 2580 ensureElementRareData().setStyleAffectedByFocusWithin(true); 2581 } 2582 2565 2583 void Element::setChildrenAffectedByActive() 2566 2584 { … … 2606 2624 ASSERT(hasRareData()); 2607 2625 return elementRareData()->styleAffectedByEmpty(); 2626 } 2627 2628 bool Element::rareDataStyleAffectedByFocusWithin() const 2629 { 2630 ASSERT(hasRareData()); 2631 return elementRareData()->styleAffectedByFocusWithin(); 2632 } 2633 2634 bool Element::rareDataIsNamedFlowContentElement() const 2635 { 2636 ASSERT(hasRareData()); 2637 return elementRareData()->isNamedFlowContentElement(); 2608 2638 } 2609 2639 -
trunk/Source/WebCore/dom/Element.h
r202292 r202358 274 274 bool hovered() const { return isUserActionElement() && isUserActionElementHovered(); } 275 275 bool focused() const { return isUserActionElement() && isUserActionElementFocused(); } 276 bool hasFocusWithin() const { return getFlag(HasFocusWithin); }; 276 277 277 278 virtual void setActive(bool flag = true, bool pause = false); 278 279 virtual void setHovered(bool flag = true); 279 280 virtual void setFocus(bool flag); 281 void setHasFocusWithin(bool flag); 280 282 281 283 bool tabIndexSetExplicitly() const; … … 297 299 // Methods for indicating the style is affected by dynamic updates (e.g., children changing, our position changing in our sibling list, etc.) 298 300 bool styleAffectedByEmpty() const { return hasRareData() && rareDataStyleAffectedByEmpty(); } 301 bool styleAffectedByFocusWithin() const { return hasRareData() && rareDataStyleAffectedByFocusWithin(); } 299 302 bool childrenAffectedByHover() const { return getFlag(ChildrenAffectedByHoverRulesFlag); } 300 303 bool childrenAffectedByActive() const { return hasRareData() && rareDataChildrenAffectedByActive(); } … … 310 313 311 314 void setStyleAffectedByEmpty(); 315 void setStyleAffectedByFocusWithin(); 312 316 void setChildrenAffectedByHover() { setFlag(ChildrenAffectedByHoverRulesFlag); } 313 317 void setChildrenAffectedByActive(); … … 522 526 void setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value); 523 527 528 bool isNamedFlowContentElement() const { return hasRareData() && rareDataIsNamedFlowContentElement(); } 529 void setIsNamedFlowContentElement(); 530 void clearIsNamedFlowContentElement(); 531 524 532 protected: 525 533 Element(const QualifiedName&, Document&, ConstructionType); … … 608 616 609 617 bool rareDataStyleAffectedByEmpty() const; 618 bool rareDataStyleAffectedByFocusWithin() const; 619 bool rareDataIsNamedFlowContentElement() const; 610 620 bool rareDataChildrenAffectedByHover() const; 611 621 bool rareDataChildrenAffectedByActive() const; … … 750 760 } 751 761 762 inline void Element::setHasFocusWithin(bool flag) 763 { 764 if (hasFocusWithin() == flag) 765 return; 766 setFlag(flag, HasFocusWithin); 767 if (styleAffectedByFocusWithin()) 768 setNeedsStyleRecalc(); 769 } 770 752 771 } // namespace WebCore 753 772 -
trunk/Source/WebCore/dom/ElementRareData.h
r199964 r202358 1 1 /* 2 * Copyright (C) 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2009, 2010, 2014, 2016 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 4 4 * … … 59 59 void setStyleAffectedByEmpty(bool value) { m_styleAffectedByEmpty = value; } 60 60 61 bool styleAffectedByFocusWithin() const { return m_styleAffectedByFocusWithin; } 62 void setStyleAffectedByFocusWithin(bool value) { m_styleAffectedByFocusWithin = value; } 63 61 64 RegionOversetState regionOversetState() const { return m_regionOversetState; } 62 65 void setRegionOversetState(RegionOversetState state) { m_regionOversetState = state; } 66 67 bool isNamedFlowContentElement() const { return m_isNamedFlowContentElement; } 68 void setIsNamedFlowContentElement(bool value) { m_isNamedFlowContentElement = value; } 63 69 64 70 #if ENABLE(FULLSCREEN_API) … … 117 123 unsigned m_needsFocusAppearanceUpdateSoonAfterAttach : 1; 118 124 unsigned m_styleAffectedByEmpty : 1; 125 unsigned m_styleAffectedByFocusWithin : 1; 119 126 #if ENABLE(FULLSCREEN_API) 120 127 unsigned m_containsFullScreenElement : 1; … … 131 138 unsigned m_childrenAffectedByPropertyBasedBackwardPositionalRules : 1; 132 139 unsigned m_hasDisplayContents : 1; 140 unsigned m_isNamedFlowContentElement : 1; 133 141 134 142 RegionOversetState m_regionOversetState; … … 161 169 , m_needsFocusAppearanceUpdateSoonAfterAttach(false) 162 170 , m_styleAffectedByEmpty(false) 171 , m_styleAffectedByFocusWithin(false) 163 172 #if ENABLE(FULLSCREEN_API) 164 173 , m_containsFullScreenElement(false) … … 172 181 , m_childrenAffectedByPropertyBasedBackwardPositionalRules(false) 173 182 , m_hasDisplayContents(false) 183 , m_isNamedFlowContentElement(false) 174 184 , m_regionOversetState(RegionUndefined) 175 185 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) … … 201 211 m_hasDisplayContents = false; 202 212 setStyleAffectedByEmpty(false); 213 setStyleAffectedByFocusWithin(false); 203 214 setChildIndex(0); 204 215 } -
trunk/Source/WebCore/dom/Node.h
r202091 r202358 248 248 bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); } 249 249 250 bool isNamedFlowContentNode() const { return getFlag(IsNamedFlowContentNodeFlag); }251 250 bool hasCustomStyleResolveCallbacks() const { return getFlag(HasCustomStyleResolveCallbacksFlag); } 252 251 … … 337 336 bool isLink() const { return getFlag(IsLinkFlag); } 338 337 void setIsLink(bool flag) { setFlag(flag, IsLinkFlag); } 339 340 void setIsNamedFlowContentNode() { setFlag(IsNamedFlowContentNodeFlag); }341 void clearIsNamedFlowContentNode() { clearFlag(IsNamedFlowContentNodeFlag); }342 338 343 339 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } … … 573 569 static int32_t flagIsHTML() { return IsHTMLFlag; } 574 570 static int32_t flagIsLink() { return IsLinkFlag; } 571 static int32_t flagHasFocusWithin() { return HasFocusWithin; } 575 572 static int32_t flagHasRareData() { return HasRareDataFlag; } 576 573 static int32_t flagIsParsingChildrenFinished() { return IsParsingChildrenFinishedFlag; } … … 603 600 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1) | 1 << (nodeStyleChangeShift + 2), 604 601 IsEditingTextOrUnresolvedCustomElementFlag = 1 << 17, 605 IsNamedFlowContentNodeFlag= 1 << 18,602 HasFocusWithin = 1 << 18, 606 603 HasSyntheticAttrChildNodesFlag = 1 << 19, 607 604 HasCustomStyleResolveCallbacksFlag = 1 << 20, -
trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp
r200671 r202358 75 75 for (auto& contentElement : m_contentElements) { 76 76 ASSERT(contentElement); 77 ASSERT(contentElement->isNamedFlowContent Node());77 ASSERT(contentElement->isNamedFlowContentElement()); 78 78 ASSERT(&contentElement->document() == &document()); 79 79 80 contentElement->clearIsNamedFlowContent Node();80 contentElement->clearIsNamedFlowContentElement(); 81 81 } 82 82 … … 498 498 ASSERT(&contentElement.document() == &document()); 499 499 500 contentElement.setIsNamedFlowContent Node();500 contentElement.setIsNamedFlowContentElement(); 501 501 502 502 resetMarkForDestruction(); … … 519 519 { 520 520 ASSERT(m_contentElements.contains(&contentElement)); 521 ASSERT(contentElement.isNamedFlowContent Node());521 ASSERT(contentElement.isNamedFlowContentElement()); 522 522 ASSERT(&contentElement.document() == &document()); 523 523 524 contentElement.clearIsNamedFlowContent Node();524 contentElement.clearIsNamedFlowContentElement(); 525 525 m_contentElements.remove(&contentElement); 526 526 … … 617 617 static Node* nextNodeInsideContentElement(const Node& currNode, const Element* contentElement) 618 618 { 619 ASSERT(contentElement && contentElement->isNamedFlowContent Node());619 ASSERT(contentElement && contentElement->isNamedFlowContentElement()); 620 620 621 621 if (currNode.renderer() && currNode.renderer()->isSVGRoot()) -
trunk/Source/WebCore/style/RenderTreeUpdater.cpp
r202324 r202358 241 241 void RenderTreeUpdater::updateElementRenderer(Element& element, Style::ElementUpdate& update) 242 242 { 243 bool shouldTearDownRenderers = update.change == Style::Detach && (element.renderer() || element.isNamedFlowContent Node());243 bool shouldTearDownRenderers = update.change == Style::Detach && (element.renderer() || element.isNamedFlowContentElement()); 244 244 if (shouldTearDownRenderers) 245 245 tearDownRenderers(element, TeardownType::KeepHoverAndActive); -
trunk/Source/WebCore/style/StyleRelations.cpp
r199583 r202358 73 73 style.setUnique(); 74 74 break; 75 case Relation::AffectedByFocusWithin: 75 76 case Relation::AffectedByPreviousSibling: 76 77 case Relation::AffectsNextSibling: … … 102 103 case Relation::AffectedByEmpty: 103 104 element.setStyleAffectedByEmpty(); 105 break; 106 case Relation::AffectedByFocusWithin: 107 element.setStyleAffectedByFocusWithin(); 104 108 break; 105 109 case Relation::AffectedByHover: -
trunk/Source/WebCore/style/StyleRelations.h
r199583 r202358 43 43 AffectedByDrag, 44 44 AffectedByEmpty, 45 AffectedByFocusWithin, 45 46 AffectedByHover, 46 47 AffectedByPreviousSibling, -
trunk/Source/WebCore/style/StyleSharingResolver.cpp
r202245 r202358 231 231 if (candidateElement.affectsNextSiblingElementStyle() || candidateElement.styleIsAffectedByPreviousSibling()) 232 232 return false; 233 if (candidateElement.styleAffectedByFocusWithin() || element.styleAffectedByFocusWithin()) 234 return false; 233 235 234 236 auto& candidateElementId = candidateElement.idForStyleResolution();
Note: See TracChangeset
for help on using the changeset viewer.