Changeset 101998 in webkit


Ignore:
Timestamp:
Dec 5, 2011 7:30:38 AM (12 years ago)
Author:
rolandsteiner@chromium.org
Message:

"Raw" pseudo selectors don't match if immediately after a child or descendant combinator
https://bugs.webkit.org/show_bug.cgi?id=72933

Source/WebCore:

Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.

Reviewed by Antti Koivisto.

  • css/CSSParser.cpp:

(WebCore::CSSParser::updateSpecifiersWithElementName):

LayoutTests:

Add tests cases for "raw" shadow pseudo-element selectors with various combinators.
Also add cases with explicit universal '*' selector.

Reviewed by Antti Koivisto.

  • fast/css/css-selector-text-expected.txt:
  • fast/css/css-selector-text.html:
  • fast/css/css-set-selector-text-expected.txt:
  • fast/css/css-set-selector-text.html:
  • fast/css/unknown-pseudo-element-matching-expected.txt:
  • fast/css/unknown-pseudo-element-matching.html:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r101997 r101998  
     12011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
     2
     3        "Raw" pseudo selectors don't match if immediately after a child or descendant combinator
     4        https://bugs.webkit.org/show_bug.cgi?id=72933
     5
     6        Add tests cases for "raw" shadow pseudo-element selectors with various combinators.
     7        Also add cases with explicit universal '*' selector.
     8
     9        Reviewed by Antti Koivisto.
     10
     11        * fast/css/css-selector-text-expected.txt:
     12        * fast/css/css-selector-text.html:
     13        * fast/css/css-set-selector-text-expected.txt:
     14        * fast/css/css-set-selector-text.html:
     15        * fast/css/unknown-pseudo-element-matching-expected.txt:
     16        * fast/css/unknown-pseudo-element-matching.html:
     17
    1182011-12-05  Vsevolod Vlasov  <vsevik@chromium.org>
    219
  • trunk/LayoutTests/fast/css/css-selector-text-expected.txt

    r101679 r101998  
    5959PASS parseThenSerializeRule(':-webkit-drag { }') is ':-webkit-drag { }'
    6060
    61 PASS parseThenSerializeRule('::-webkit-file-upload-button { }') is '::-webkit-file-upload-button { }'
    62 PASS parseThenSerializeRule('::-webkit-search-cancel-button { }') is '::-webkit-search-cancel-button { }'
    63 PASS parseThenSerializeRule('::-webkit-search-decoration { }') is '::-webkit-search-decoration { }'
    64 PASS parseThenSerializeRule('::-webkit-search-results-button { }') is '::-webkit-search-results-button { }'
    65 PASS parseThenSerializeRule('::-webkit-search-results-decoration { }') is '::-webkit-search-results-decoration { }'
    66 PASS parseThenSerializeRule('::-webkit-slider-thumb { }') is '::-webkit-slider-thumb { }'
     61PASS parseThenSerializeRule('::-webkit-file-upload-button { }') is '*::-webkit-file-upload-button { }'
     62PASS parseThenSerializeRule('::-webkit-search-cancel-button { }') is '*::-webkit-search-cancel-button { }'
     63PASS parseThenSerializeRule('::-webkit-search-decoration { }') is '*::-webkit-search-decoration { }'
     64PASS parseThenSerializeRule('::-webkit-search-results-button { }') is '*::-webkit-search-results-button { }'
     65PASS parseThenSerializeRule('::-webkit-search-results-decoration { }') is '*::-webkit-search-results-decoration { }'
     66PASS parseThenSerializeRule('::-webkit-slider-thumb { }') is '*::-webkit-slider-thumb { }'
    6767
    6868PASS parseThenSerializeRule('a::-webkit-slider-thumb { }') is 'a::-webkit-slider-thumb { }'
    69 PASS parseThenSerializeRule('a ::-webkit-slider-thumb { }') is 'a ::-webkit-slider-thumb { }'
     69PASS parseThenSerializeRule('a ::-webkit-slider-thumb { }') is 'a *::-webkit-slider-thumb { }'
    7070PASS parseThenSerializeRule('[a]::-webkit-slider-thumb { }') is '[a]::-webkit-slider-thumb { }'
    71 PASS parseThenSerializeRule('[a] ::-webkit-slider-thumb { }') is '[a] ::-webkit-slider-thumb { }'
     71PASS parseThenSerializeRule('[a] ::-webkit-slider-thumb { }') is '[a] *::-webkit-slider-thumb { }'
    7272PASS parseThenSerializeRule('.a::-webkit-slider-thumb { }') is '.a::-webkit-slider-thumb { }'
    73 PASS parseThenSerializeRule('.a ::-webkit-slider-thumb { }') is '.a ::-webkit-slider-thumb { }'
     73PASS parseThenSerializeRule('.a ::-webkit-slider-thumb { }') is '.a *::-webkit-slider-thumb { }'
    7474PASS parseThenSerializeRule('#a::-webkit-slider-thumb { }') is '#a::-webkit-slider-thumb { }'
    75 PASS parseThenSerializeRule('#a ::-webkit-slider-thumb { }') is '#a ::-webkit-slider-thumb { }'
     75PASS parseThenSerializeRule('#a ::-webkit-slider-thumb { }') is '#a *::-webkit-slider-thumb { }'
     76PASS parseThenSerializeRule('* ::-webkit-slider-thumb { }') is '* *::-webkit-slider-thumb { }'
     77
     78PASS parseThenSerializeRule('a[b]::-webkit-slider-thumb { }') is 'a[b]::-webkit-slider-thumb { }'
     79PASS parseThenSerializeRule('a.b::-webkit-slider-thumb { }') is 'a.b::-webkit-slider-thumb { }'
     80PASS parseThenSerializeRule('a#b::-webkit-slider-thumb { }') is 'a#b::-webkit-slider-thumb { }'
     81PASS parseThenSerializeRule('a[b].c#d::-webkit-slider-thumb { }') is 'a[b].c#d::-webkit-slider-thumb { }'
    7682
    7783PASS parseThenSerializeRule('input:not([type="file"]):focus { }') is 'input:not([type="file"]):focus { }'
  • trunk/LayoutTests/fast/css/css-selector-text.html

    r101679 r101998  
    9898debug('');
    9999
    100 testSelectorRoundTrip("::-webkit-file-upload-button");
    101 testSelectorRoundTrip("::-webkit-search-cancel-button");
    102 testSelectorRoundTrip("::-webkit-search-decoration");
    103 testSelectorRoundTrip("::-webkit-search-results-button");
    104 testSelectorRoundTrip("::-webkit-search-results-decoration");
    105 testSelectorRoundTrip("::-webkit-slider-thumb");
     100shouldBe("parseThenSerializeRule('::-webkit-file-upload-button { }')", "'*::-webkit-file-upload-button { }'");
     101shouldBe("parseThenSerializeRule('::-webkit-search-cancel-button { }')", "'*::-webkit-search-cancel-button { }'");
     102shouldBe("parseThenSerializeRule('::-webkit-search-decoration { }')", "'*::-webkit-search-decoration { }'");
     103shouldBe("parseThenSerializeRule('::-webkit-search-results-button { }')", "'*::-webkit-search-results-button { }'");
     104shouldBe("parseThenSerializeRule('::-webkit-search-results-decoration { }')", "'*::-webkit-search-results-decoration { }'");
     105shouldBe("parseThenSerializeRule('::-webkit-slider-thumb { }')", "'*::-webkit-slider-thumb { }'");
    106106
    107107debug('');
    108108
    109109testSelectorRoundTrip("a::-webkit-slider-thumb");
    110 testSelectorRoundTrip("a ::-webkit-slider-thumb");
     110shouldBe("parseThenSerializeRule('a ::-webkit-slider-thumb { }')", "'a *::-webkit-slider-thumb { }'");
    111111testSelectorRoundTrip("[a]::-webkit-slider-thumb");
    112 testSelectorRoundTrip("[a] ::-webkit-slider-thumb");
     112shouldBe("parseThenSerializeRule('[a] ::-webkit-slider-thumb { }')", "'[a] *::-webkit-slider-thumb { }'");
    113113testSelectorRoundTrip(".a::-webkit-slider-thumb");
    114 testSelectorRoundTrip(".a ::-webkit-slider-thumb");
     114shouldBe("parseThenSerializeRule('.a ::-webkit-slider-thumb { }')", "'.a *::-webkit-slider-thumb { }'");
    115115testSelectorRoundTrip("#a::-webkit-slider-thumb");
    116 testSelectorRoundTrip("#a ::-webkit-slider-thumb");
     116shouldBe("parseThenSerializeRule('#a ::-webkit-slider-thumb { }')", "'#a *::-webkit-slider-thumb { }'");
     117shouldBe("parseThenSerializeRule('* ::-webkit-slider-thumb { }')", "'* *::-webkit-slider-thumb { }'");
     118
     119debug('');
     120
     121testSelectorRoundTrip("a[b]::-webkit-slider-thumb");
     122testSelectorRoundTrip("a.b::-webkit-slider-thumb");
     123testSelectorRoundTrip("a#b::-webkit-slider-thumb");
     124testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb");
    117125
    118126debug('');
  • trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt

    r101679 r101998  
    6969PASS setThenReadSelectorText(':-webkit-drag') is ':-webkit-drag'
    7070
    71 PASS setThenReadSelectorText('::-webkit-file-upload-button') is '::-webkit-file-upload-button'
    72 PASS setThenReadSelectorText('::-webkit-search-cancel-button') is '::-webkit-search-cancel-button'
    73 PASS setThenReadSelectorText('::-webkit-search-decoration') is '::-webkit-search-decoration'
    74 PASS setThenReadSelectorText('::-webkit-search-results-button') is '::-webkit-search-results-button'
    75 PASS setThenReadSelectorText('::-webkit-search-results-decoration') is '::-webkit-search-results-decoration'
    76 PASS setThenReadSelectorText('::-webkit-slider-thumb') is '::-webkit-slider-thumb'
     71PASS setThenReadSelectorText('::-webkit-file-upload-button') is '*::-webkit-file-upload-button'
     72PASS setThenReadSelectorText('::-webkit-search-cancel-button') is '*::-webkit-search-cancel-button'
     73PASS setThenReadSelectorText('::-webkit-search-decoration') is '*::-webkit-search-decoration'
     74PASS setThenReadSelectorText('::-webkit-search-results-button') is '*::-webkit-search-results-button'
     75PASS setThenReadSelectorText('::-webkit-search-results-decoration') is '*::-webkit-search-results-decoration'
     76PASS setThenReadSelectorText('::-webkit-slider-thumb') is '*::-webkit-slider-thumb'
    7777
    7878PASS setThenReadSelectorText('a::-webkit-slider-thumb') is 'a::-webkit-slider-thumb'
    79 PASS setThenReadSelectorText('a ::-webkit-slider-thumb') is 'a ::-webkit-slider-thumb'
     79PASS setThenReadSelectorText('a ::-webkit-slider-thumb') is 'a *::-webkit-slider-thumb'
    8080PASS setThenReadSelectorText('[a]::-webkit-slider-thumb') is '[a]::-webkit-slider-thumb'
    81 PASS setThenReadSelectorText('[a] ::-webkit-slider-thumb') is '[a] ::-webkit-slider-thumb'
     81PASS setThenReadSelectorText('[a] ::-webkit-slider-thumb') is '[a] *::-webkit-slider-thumb'
    8282PASS setThenReadSelectorText('.a::-webkit-slider-thumb') is '.a::-webkit-slider-thumb'
    83 PASS setThenReadSelectorText('.a ::-webkit-slider-thumb') is '.a ::-webkit-slider-thumb'
     83PASS setThenReadSelectorText('.a ::-webkit-slider-thumb') is '.a *::-webkit-slider-thumb'
    8484PASS setThenReadSelectorText('#a::-webkit-slider-thumb') is '#a::-webkit-slider-thumb'
    85 PASS setThenReadSelectorText('#a ::-webkit-slider-thumb') is '#a ::-webkit-slider-thumb'
     85PASS setThenReadSelectorText('#a ::-webkit-slider-thumb') is '#a *::-webkit-slider-thumb'
     86PASS setThenReadSelectorText('* ::-webkit-slider-thumb') is '* *::-webkit-slider-thumb'
     87
     88PASS setThenReadSelectorText('a[b]::-webkit-slider-thumb') is 'a[b]::-webkit-slider-thumb'
     89PASS setThenReadSelectorText('a.b::-webkit-slider-thumb') is 'a.b::-webkit-slider-thumb'
     90PASS setThenReadSelectorText('a#b::-webkit-slider-thumb') is 'a#b::-webkit-slider-thumb'
     91PASS setThenReadSelectorText('a[b].c#d::-webkit-slider-thumb') is 'a[b].c#d::-webkit-slider-thumb'
    8692
    8793PASS setThenReadSelectorText('input:not([type="file"]):focus') is 'input:not([type="file"]):focus'
  • trunk/LayoutTests/fast/css/css-set-selector-text.html

    r101679 r101998  
    115115debug('');
    116116
    117 testSelectorRoundTrip("::-webkit-file-upload-button");
    118 testSelectorRoundTrip("::-webkit-search-cancel-button");
    119 testSelectorRoundTrip("::-webkit-search-decoration");
    120 testSelectorRoundTrip("::-webkit-search-results-button");
    121 testSelectorRoundTrip("::-webkit-search-results-decoration");
    122 testSelectorRoundTrip("::-webkit-slider-thumb");
     117shouldBe("setThenReadSelectorText('::-webkit-file-upload-button')", "'*::-webkit-file-upload-button'");
     118shouldBe("setThenReadSelectorText('::-webkit-search-cancel-button')", "'*::-webkit-search-cancel-button'");
     119shouldBe("setThenReadSelectorText('::-webkit-search-decoration')", "'*::-webkit-search-decoration'");
     120shouldBe("setThenReadSelectorText('::-webkit-search-results-button')", "'*::-webkit-search-results-button'");
     121shouldBe("setThenReadSelectorText('::-webkit-search-results-decoration')", "'*::-webkit-search-results-decoration'");
     122shouldBe("setThenReadSelectorText('::-webkit-slider-thumb')", "'*::-webkit-slider-thumb'");
    123123
    124124debug('');
    125125
    126126testSelectorRoundTrip("a::-webkit-slider-thumb");
    127 testSelectorRoundTrip("a ::-webkit-slider-thumb");
     127shouldBe("setThenReadSelectorText('a ::-webkit-slider-thumb')", "'a *::-webkit-slider-thumb'");
    128128testSelectorRoundTrip("[a]::-webkit-slider-thumb");
    129 testSelectorRoundTrip("[a] ::-webkit-slider-thumb");
     129shouldBe("setThenReadSelectorText('[a] ::-webkit-slider-thumb')", "'[a] *::-webkit-slider-thumb'");
    130130testSelectorRoundTrip(".a::-webkit-slider-thumb");
    131 testSelectorRoundTrip(".a ::-webkit-slider-thumb");
     131shouldBe("setThenReadSelectorText('.a ::-webkit-slider-thumb')", "'.a *::-webkit-slider-thumb'");
    132132testSelectorRoundTrip("#a::-webkit-slider-thumb");
    133 testSelectorRoundTrip("#a ::-webkit-slider-thumb");
     133shouldBe("setThenReadSelectorText('#a ::-webkit-slider-thumb')", "'#a *::-webkit-slider-thumb'");
     134shouldBe("setThenReadSelectorText('* ::-webkit-slider-thumb')", "'* *::-webkit-slider-thumb'");
     135
     136debug('');
     137
     138testSelectorRoundTrip("a[b]::-webkit-slider-thumb");
     139testSelectorRoundTrip("a.b::-webkit-slider-thumb");
     140testSelectorRoundTrip("a#b::-webkit-slider-thumb");
     141testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb");
    134142
    135143debug('');
  • trunk/LayoutTests/fast/css/unknown-pseudo-element-matching-expected.txt

    r89742 r101998  
    33Basic selector tests:
    44::-webkit-slider-thumb should match: PASS
     5*::-webkit-slider-thumb should match: PASS
    56::-webkit-slider-thumb, where HTML is not default namespace should not match: PASS
    67*|::-webkit-slider-thumb, where HTML is not default namespace should match: PASS
     8*|*::-webkit-slider-thumb, where HTML is not default namespace should match: PASS
    79html|::-webkit-slider-thumb, where HTML is not default namespace should match: PASS
     10html|*::-webkit-slider-thumb, where HTML is not default namespace should match: PASS
    811#foo::-webkit-slider-thumb should match: PASS
    912.bar::-webkit-slider-thumb should match: PASS
     
    2932Shouldn't ignore selector after the unknown pseudo element:
    3033::-webkit-slider-thumb:disabled should not match: PASS
     34*::-webkit-slider-thumb:disabled should not match: PASS
    3135input::-webkit-slider-thumb:disabled should not match: PASS
    3236#foo::-webkit-slider-thumb:disabled should not match: PASS
     
    3741Should not match disabled input, because the disabled state is on the input, not the thumb:
    3842::-webkit-slider-thumb:disabled should not match: PASS
     43*::-webkit-slider-thumb:disabled should not match: PASS
    3944input::-webkit-slider-thumb:disabled should not match: PASS
    4045#foo::-webkit-slider-thumb:disabled should not match: PASS
     
    4550Should match :hover when the mouse is over the slider thumb:
    4651::-webkit-slider-thumb:hover should match: PASS
     52*::-webkit-slider-thumb:hover should match: PASS
    4753input::-webkit-slider-thumb:hover should match: PASS
    4854#foo::-webkit-slider-thumb:hover should match: PASS
     
    5258
    5359Should match when combined with descendant selectors:
     60#baz ::-webkit-slider-thumb should match: PASS
     61#baz *::-webkit-slider-thumb should match: PASS
    5462#baz input::-webkit-slider-thumb should match: PASS
    5563#baz #foo::-webkit-slider-thumb should match: PASS
     
    5765#baz input.bar::-webkit-slider-thumb should match: PASS
    5866#baz input[type=range]::-webkit-slider-thumb should match: PASS
     67.qux ::-webkit-slider-thumb should match: PASS
     68.qux *::-webkit-slider-thumb should match: PASS
    5969.qux input::-webkit-slider-thumb should match: PASS
    6070.qux #foo::-webkit-slider-thumb should match: PASS
     
    6272.qux input.bar::-webkit-slider-thumb should match: PASS
    6373.qux input[type=range]::-webkit-slider-thumb should match: PASS
     74
     75Should match when combined with sibling selectors:
     76#sib + ::-webkit-slider-thumb should match: PASS
     77#sib + *::-webkit-slider-thumb should match: PASS
     78#sib + input::-webkit-slider-thumb should match: PASS
     79#sib + #foo::-webkit-slider-thumb should match: PASS
     80#sib + input#foo::-webkit-slider-thumb should match: PASS
     81#sib + input.bar::-webkit-slider-thumb should match: PASS
     82#sib + input[type=range]::-webkit-slider-thumb should match: PASS
     83#sib ~ ::-webkit-slider-thumb should match: PASS
     84#sib ~ *::-webkit-slider-thumb should match: PASS
     85#sib ~ input::-webkit-slider-thumb should match: PASS
     86#sib ~ #foo::-webkit-slider-thumb should match: PASS
     87#sib ~ input#foo::-webkit-slider-thumb should match: PASS
     88#sib ~ input.bar::-webkit-slider-thumb should match: PASS
     89#sib ~ input[type=range]::-webkit-slider-thumb should match: PASS
     90.ling + ::-webkit-slider-thumb should match: PASS
     91.ling + *::-webkit-slider-thumb should match: PASS
     92.ling + input::-webkit-slider-thumb should match: PASS
     93.ling + #foo::-webkit-slider-thumb should match: PASS
     94.ling + input#foo::-webkit-slider-thumb should match: PASS
     95.ling + input.bar::-webkit-slider-thumb should match: PASS
     96.ling + input[type=range]::-webkit-slider-thumb should match: PASS
     97.ling ~ ::-webkit-slider-thumb should match: PASS
     98.ling ~ *::-webkit-slider-thumb should match: PASS
     99.ling ~ input::-webkit-slider-thumb should match: PASS
     100.ling ~ #foo::-webkit-slider-thumb should match: PASS
     101.ling ~ input#foo::-webkit-slider-thumb should match: PASS
     102.ling ~ input.bar::-webkit-slider-thumb should match: PASS
     103.ling ~ input[type=range]::-webkit-slider-thumb should match: PASS
  • trunk/LayoutTests/fast/css/unknown-pseudo-element-matching.html

    r89742 r101998  
    1919var SELECTORS = [
    2020'::-webkit-slider-thumb',
     21'*::-webkit-slider-thumb',
    2122'input::-webkit-slider-thumb',
    2223'#foo::-webkit-slider-thumb',
     
    2829var HOVER_SELECTORS = SELECTORS.map(function(selector) { return selector + ':hover'; });
    2930var DESCENDANT_ID_SELECTORS = SELECTORS.map(function(selector) { return '#baz ' + selector; });
    30 DESCENDANT_ID_SELECTORS.shift();
    3131var DESCENDANT_CLASS_SELECTORS = SELECTORS.map(function(selector) { return '.qux ' + selector; });
    32 DESCENDANT_CLASS_SELECTORS.shift();
     32var DIRECT_SIBLING_ID_SELECTORS = SELECTORS.map(function(selector) { return '#sib + ' + selector; });
     33var INDIRECT_SIBLING_ID_SELECTORS = SELECTORS.map(function(selector) { return '#sib ~ ' + selector; });
     34var DIRECT_SIBLING_CLASS_SELECTORS = SELECTORS.map(function(selector) { return '.ling + ' + selector; });
     35var INDIRECT_SIBLING_CLASS_SELECTORS = SELECTORS.map(function(selector) { return '.ling ~ ' + selector; });
    3336
    3437// convenience constants
     
    6770    head = document.getElementsByTagName('head')[0];
    6871    input = document.getElementsByTagName('input')[0];
     72    testContainer = document.getElementById('baz');
    6973    logDiv = document.getElementById('log');
    7074    log('Basic selector tests:');
    7175    runSelectorTest(MATCH, '::-webkit-slider-thumb');
     76    runSelectorTest(MATCH, '*::-webkit-slider-thumb');
    7277    runSelectorTest(NO_MATCH, '::-webkit-slider-thumb', WITH_NAMESPACES);
    7378    runSelectorTest(MATCH, '*|::-webkit-slider-thumb', WITH_NAMESPACES);
     79    runSelectorTest(MATCH, '*|*::-webkit-slider-thumb', WITH_NAMESPACES);
    7480    runSelectorTest(MATCH, 'html|::-webkit-slider-thumb', WITH_NAMESPACES);
     81    runSelectorTest(MATCH, 'html|*::-webkit-slider-thumb', WITH_NAMESPACES);
    7582    runSelectorTest(MATCH, '#foo::-webkit-slider-thumb');
    7683    runSelectorTest(MATCH, '.bar::-webkit-slider-thumb');
     
    108115    DESCENDANT_ID_SELECTORS.forEach(expectMatch);
    109116    DESCENDANT_CLASS_SELECTORS.forEach(expectMatch);
    110     input.parentNode.removeChild(input);
     117    log('<br>Should match when combined with sibling selectors:');
     118    DIRECT_SIBLING_ID_SELECTORS.forEach(expectMatch);
     119    INDIRECT_SIBLING_ID_SELECTORS.forEach(expectMatch);
     120    DIRECT_SIBLING_CLASS_SELECTORS.forEach(expectMatch);
     121    INDIRECT_SIBLING_CLASS_SELECTORS.forEach(expectMatch);
     122
     123    testContainer.parentNode.removeChild(testContainer);
    111124}
    112125
     
    124137    <p>Tests various selector combinations, containing unknown pseudo element selectors.</p>
    125138    <div id="baz" class="qux">
     139        <span id="sib" class="ling">Sibling</span>
    126140        <input id="foo" class="bar" type="range">
    127141    </div>
  • trunk/Source/WebCore/ChangeLog

    r101995 r101998  
     12011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
     2
     3        "Raw" pseudo selectors don't match if immediately after a child or descendant combinator
     4        https://bugs.webkit.org/show_bug.cgi?id=72933
     5
     6        Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.
     7
     8        Reviewed by Antti Koivisto.
     9
     10        * css/CSSParser.cpp:
     11        (WebCore::CSSParser::updateSpecifiersWithElementName):
     12
    1132011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/Source/WebCore/css/CSSParser.cpp

    r101935 r101998  
    76747674    }
    76757675
    7676     // No need to create an extra element name selector if we are matching any element
    7677     // in any namespace.
    7678     if (elementName == starAtom && m_defaultNamespace == starAtom)
    7679         return;
    7680 
     7676    // For shadow-ID pseudo-elements to be correctly matched, the ShadowDescendant combinator has to be used.
     7677    // We therefore create a new Selector with that combinator here in any case, even if matching any (host) element in any namespace (i.e. '*').
    76817678    OwnPtr<CSSParserSelector> elementNameSelector = adoptPtr(new CSSParserSelector);
    76827679    elementNameSelector->setTag(tag);
Note: See TracChangeset for help on using the changeset viewer.