| Index: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| index f67c1a9e27f5de3d64158bbcddb911508d6e4d5d..cdcbbcaa9302f5f403c66efe41d9a714e24aef78 100644
|
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| @@ -39,11 +39,13 @@ static void parseRootMargin(String rootMarginParameter, Vector<Length>& rootMarg
|
| // "1px 2px" = top/bottom left/right
|
| // "1px 2px 3px" = top left/right bottom
|
| // "1px 2px 3px 4px" = top left right bottom
|
| - //
|
| - // Any extra stuff after the first four tokens is ignored.
|
| CSSTokenizer::Scope tokenizerScope(rootMarginParameter);
|
| CSSParserTokenRange tokenRange = tokenizerScope.tokenRange();
|
| - while (rootMargin.size() < 4 && tokenRange.peek().type() != EOFToken && !exceptionState.hadException()) {
|
| + while (tokenRange.peek().type() != EOFToken && !exceptionState.hadException()) {
|
| + if (rootMargin.size() == 4) {
|
| + exceptionState.throwDOMException(SyntaxError, "Extra text found at the end of rootMargin.");
|
| + break;
|
| + }
|
| const CSSParserToken& token = tokenRange.consumeIncludingWhitespace();
|
| switch (token.type()) {
|
| case PercentageToken:
|
|
|