Changeset 147295 in webkit
- Timestamp:
- Mar 31, 2013 8:44:36 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147291 r147295 1 2013-03-31 Hayato Ito <hayato@chromium.org> 2 3 Text representation of pseudo elements, '::-webkit-distributed', is wrong in CSSSelector::selectorText(). 4 https://bugs.webkit.org/show_bug.cgi?id=113560 5 6 Reviewed by Dimitri Glazkov. 7 8 * fast/dom/shadow/distributed-pseudo-element-css-text-expected.txt: Added. 9 * fast/dom/shadow/distributed-pseudo-element-css-text.html: Added. 10 1 11 2013-03-31 Rafael Weinstein <rafaelw@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r147294 r147295 1 2013-03-31 Hayato Ito <hayato@chromium.org> 2 3 Text representation of pseudo elements, '::-webkit-distributed', is wrong in CSSSelector::selectorText(). 4 https://bugs.webkit.org/show_bug.cgi?id=113560 5 6 Reviewed by Dimitri Glazkov. 7 8 Fix the text representation of distributed functional pseudo elements in CSSSelector::selectorText(). 9 10 Test: fast/dom/shadow/distributed-pseudo-element-css-text.html 11 12 * css/CSSSelector.cpp: 13 (WebCore::CSSSelector::selectorText): 14 * css/CSSSelector.h: 15 (CSSSelector): 16 1 17 2013-03-31 Adam Barth <abarth@webkit.org> 2 18 -
trunk/Source/WebCore/css/CSSSelector.cpp
r145691 r147295 609 609 } 610 610 611 String CSSSelector::selectorText( ) const611 String CSSSelector::selectorText(const String& rightSide) const 612 612 { 613 613 StringBuilder str; … … 710 710 711 711 if (const CSSSelector* tagHistory = cs->tagHistory()) { 712 String tagHistoryText = tagHistory->selectorText();713 712 switch (cs->relation()) { 714 713 case CSSSelector::Descendant: 715 return tagHistory Text + " " + str.toString();714 return tagHistory->selectorText(" " + str.toString() + rightSide); 716 715 case CSSSelector::Child: 717 return tagHistory Text + " > " + str.toString();716 return tagHistory->selectorText(" > " + str.toString() + rightSide); 718 717 case CSSSelector::DirectAdjacent: 719 return tagHistory Text + " + " + str.toString();718 return tagHistory->selectorText(" + " + str.toString() + rightSide); 720 719 case CSSSelector::IndirectAdjacent: 721 return tagHistory Text + " ~ " + str.toString();720 return tagHistory->selectorText(" ~ " + str.toString() + rightSide); 722 721 case CSSSelector::SubSelector: 723 722 ASSERT_NOT_REACHED(); 724 723 case CSSSelector::ShadowDescendant: 725 return tagHistory Text + str.toString();724 return tagHistory->selectorText(str.toString() + rightSide); 726 725 #if ENABLE(SHADOW_DOM) 727 726 case CSSSelector::ShadowDistributed: 728 return tagHistory Text + "::-webkit-distributed(" + str.toString() + ")";727 return tagHistory->selectorText("::-webkit-distributed(" + str.toString() + rightSide + ")"); 729 728 #endif 730 729 } 731 730 } 732 733 return str.toString(); 731 return str.toString() + rightSide; 734 732 } 735 733 -
trunk/Source/WebCore/css/CSSSelector.h
r145691 r147295 45 45 * Re-create selector text from selector's data 46 46 */ 47 String selectorText( ) const;47 String selectorText(const String& = "") const; 48 48 49 49 // checks if the 2 selectors (including sub selectors) agree.
Note: See TracChangeset
for help on using the changeset viewer.