Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: Source/WebCore/css/CSSSelector.cpp

Issue 10533036: Merge 118703 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/css/crash-on-incomplete-not-expected.txt ('k') | Source/WebCore/css/SelectorChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/css/CSSSelector.cpp
===================================================================
--- Source/WebCore/css/CSSSelector.cpp (revision 119628)
+++ Source/WebCore/css/CSSSelector.cpp (working copy)
@@ -81,10 +81,9 @@
case End:
// FIXME: PsuedoAny should base the specificity on the sub-selectors.
// See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html
- if (pseudoType() == PseudoNot) {
- ASSERT(selectorList());
+ if (pseudoType() == PseudoNot && selectorList())
s += selectorList()->first()->specificityForOneSelector();
- } else
+ else
s += 0x100;
case None:
break;
@@ -544,8 +543,8 @@
switch (cs->pseudoType()) {
case PseudoNot:
- ASSERT(cs->selectorList());
- str += cs->selectorList()->first()->selectorText();
+ if (CSSSelectorList* selectorList = cs->selectorList())
+ str += selectorList->first()->selectorText();
str += ")";
break;
case PseudoLang:
« no previous file with comments | « LayoutTests/fast/css/crash-on-incomplete-not-expected.txt ('k') | Source/WebCore/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698