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

Unified Diff: Source/core/page/WindowFeatures.cpp

Issue 333643008: WindowFeatures arguments shoud ignore invalid characters in values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Maybe update the expected.txt next time Created 6 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/dom/Window/window-property-invalid-characters-ignored-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/WindowFeatures.cpp
diff --git a/Source/core/page/WindowFeatures.cpp b/Source/core/page/WindowFeatures.cpp
index b5ecaa8adc06196904664b7197f954a2ee8462da..85202c251543a44a72e088eb7fef25c760ed0848 100644
--- a/Source/core/page/WindowFeatures.cpp
+++ b/Source/core/page/WindowFeatures.cpp
@@ -74,13 +74,12 @@ WindowFeatures::WindowFeatures(const String& features)
scrollbarsVisible = false;
// Tread lightly in this code -- it was specifically designed to mimic Win IE's parsing behavior.
- int keyBegin, keyEnd;
- int valueBegin, valueEnd;
+ unsigned keyBegin, keyEnd;
+ unsigned valueBegin, valueEnd;
- int i = 0;
- int length = features.length();
String buffer = features.lower();
- while (i < length) {
+ unsigned length = buffer.length();
+ for (unsigned i = 0; i < length; ) {
// skip to first non-separator, but don't skip past the end of the string
while (i < length && isWindowFeaturesSeparator(buffer[i]))
i++;
« no previous file with comments | « LayoutTests/fast/dom/Window/window-property-invalid-characters-ignored-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698