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

Unified Diff: third_party/WebKit/Source/core/css/SelectorChecker.cpp

Issue 1969203002: Unreachable code fixes in SelectorChecker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index 3416c2386789fce0db221a12c9e35cd4d44c2431..a7d0076401b9f10ed32d8dacc4936e5e1ee31eb4 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -397,9 +397,8 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC
}
case CSSSelector::SubSelector:
- ASSERT_NOT_REACHED();
+ break;
}
-
ASSERT_NOT_REACHED();
return SelectorFailsCompletely;
}
@@ -495,11 +494,9 @@ static bool attributeValueMatches(const Attribute& attributeItem, CSSSelector::M
return false;
return true;
default:
- break;
+ ASSERT_NOT_REACHED();
+ return false;
}
-
- ASSERT_NOT_REACHED();
- return true;
}
static bool anyAttributeMatches(Element& element, CSSSelector::MatchType match, const CSSSelector& selector)
@@ -582,15 +579,10 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, MatchResu
case CSSSelector::PseudoElement:
return checkPseudoElement(context, result);
- case CSSSelector::PagePseudoClass:
- // FIXME: what?
- return true;
- case CSSSelector::Unknown:
- // FIXME: what?
- return true;
+ default:
+ ASSERT_NOT_REACHED();
+ return false;
}
- ASSERT_NOT_REACHED();
- return true;
}
bool SelectorChecker::checkPseudoNot(const SelectorCheckingContext& context, MatchResult& result) const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698