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

Unified Diff: Source/platform/ParsingUtilities.h

Issue 293423002: Refactor srcset parser to align it with spec changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed ASSERT Created 6 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 | « Source/core/html/parser/HTMLSrcsetParserTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/ParsingUtilities.h
diff --git a/Source/platform/ParsingUtilities.h b/Source/platform/ParsingUtilities.h
index ba8fa9e55295f76346b56a02d88aa22d2f858a3b..882b800bf398e9e951aa39e1ff22bf40c48243ad 100644
--- a/Source/platform/ParsingUtilities.h
+++ b/Source/platform/ParsingUtilities.h
@@ -72,5 +72,12 @@ void skipWhile(const CharType*& position, const CharType* end)
++position;
}
+template<typename CharType, bool characterPredicate(CharType)>
+void reverseSkipWhile(const CharType*& position, const CharType* start)
+{
+ while (position >= start && characterPredicate(*position))
+ --position;
+}
+
#endif
« no previous file with comments | « Source/core/html/parser/HTMLSrcsetParserTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698