| Index: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| index 9222e00bfd13e2c773ae8b8f5c9e5084bd8ffc2a..3ecc33a06cf37b147278116d2405c2a978276fee 100644
|
| --- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| @@ -55,8 +55,7 @@ void IntersectionObservation::initializeRootRect(LayoutRect& rect) const
|
| LayoutObject* rootLayoutObject = m_observer->rootLayoutObject();
|
| if (rootLayoutObject->isLayoutView())
|
| rect = LayoutRect(toLayoutView(rootLayoutObject)->frameView()->visibleContentRect());
|
| - // TODO(szager): Obey the spec -- use content box for a scrolling element, border box otherwise.
|
| - else if (rootLayoutObject->isBox())
|
| + else if (rootLayoutObject->isBox() && rootLayoutObject->hasOverflowClip())
|
| rect = LayoutRect(toLayoutBox(rootLayoutObject)->contentBoxRect());
|
| else
|
| rect = LayoutRect(toLayoutBoxModelObject(rootLayoutObject)->borderBoundingBox());
|
|
|