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

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

Issue 2577893004: position:fixed content is not offset by relative positioned ancestors (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index d9673fa25ee06b0138ebd53efbb1bc8e85a0e74b..e09033effcb19066a6b60e4e4b296bd74c34ace6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4166,10 +4166,13 @@ void LayoutBox::computeBlockStaticDistance(
LayoutUnit staticLogicalTop = child->layer()->staticBlockPosition();
for (LayoutObject* curr = child->parent(); curr && curr != containerBlock;
curr = curr->container()) {
- if (!curr->isBox() || curr->isTableRow())
+ if (!curr->isBox())
continue;
const LayoutBox& box = *toLayoutBox(curr);
- staticLogicalTop += box.logicalTop();
+ if (!curr->isTableRow())
+ staticLogicalTop += box.logicalTop();
mstensho (USE GERRIT) 2016/12/16 11:53:00 The table rows change here doesn't look right. I s
Anton Obzhirov 2016/12/16 14:46:31 Will do, probably I already got an issue with a la
+ if (box.isInFlowPositioned())
+ staticLogicalTop += box.offsetForInFlowPosition().height();
if (!box.isLayoutFlowThread())
continue;
// We're walking out of a flowthread here. This flow thread is not in the

Powered by Google App Engine
This is Rietveld 408576698