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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2454693003: adjustedPositionRelativeTo() couldn't find offsetParent. (Closed)
Patch Set: Update comment, since the problem described has been fixed. Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fast/inline/inline-offsetLeft-continuation-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 0d07b008fa00024dadfa534d5ffdd185eeed2c8b..4f9e99ebc6385f9f6ad27c6572ccc48714c81f17 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -1000,12 +1000,13 @@ LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeTo(
// Note that we may fail to find |offsetParent| while walking the
// container chain, if |offsetParent| is an inline split into
- // continuations: <body style="display:inline;" id="offsetParent"><div>
- // </div><span id="this">
+ // continuations: <body style="display:inline;" id="offsetParent">
+ // <div id="this">
// This is why we have to do a nullptr check here.
// offset(Left|Top) is generally broken when offsetParent is inline.
for (const LayoutObject* current = container();
- current && current != offsetParent; current = current->container()) {
+ current && current->node() != element;
+ current = current->container()) {
// FIXME: What are we supposed to do inside SVG content?
referencePoint.move(current->columnOffset(referencePoint));
if (current->isBox() && !current->isTableRow())
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/inline/inline-offsetLeft-continuation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698