| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| index 78d02a87c11a1c59fab1f61efe381b2dd8aebd62..4f4997278c8b7b0c4a1a1260574944a6c6d2bfb8 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| @@ -3213,12 +3213,12 @@ void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect)
|
| imageChanged(static_cast<WrappedImagePtr>(image), rect);
|
| }
|
|
|
| -Element* LayoutObject::offsetParent(const Element* unclosedBase) const
|
| +Element* LayoutObject::offsetParent() const
|
| {
|
| if (isDocumentElement() || isBody())
|
| return nullptr;
|
|
|
| - if (isFixedPositioned())
|
| + if (isOutOfFlowPositioned() && style()->position() == FixedPosition)
|
| return nullptr;
|
|
|
| float effectiveZoom = style()->effectiveZoom();
|
| @@ -3231,16 +3231,6 @@ Element* LayoutObject::offsetParent(const Element* unclosedBase) const
|
| if (!node)
|
| continue;
|
|
|
| - // TODO(kochi): If |unclosedBase| or |node| is nested deep in shadow roots, this loop may
|
| - // get expensive, as isUnclosedNodeOf() can take up to O(N+M) time (N and M are depths).
|
| - if (unclosedBase && (!node->isUnclosedNodeOf(*unclosedBase) || (node->isInShadowTree() && node->containingShadowRoot()->type() == ShadowRootType::UserAgent))) {
|
| - // If 'position: fixed' node is found while traversing up, terminate the loop and
|
| - // return null.
|
| - if (ancestor->isFixedPositioned())
|
| - return nullptr;
|
| - continue;
|
| - }
|
| -
|
| if (ancestor->isPositioned())
|
| break;
|
|
|
|
|