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

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

Issue 1876123002: Absolute positioned child with percent should include containing block padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update commit message Created 4 years, 8 months 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 007c6f9921e3a9d44d789a19655c9229f9ecde7a..df17d22b91bdd7bf115c9d9c5466bf7404e3d146 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1627,6 +1627,8 @@ LayoutUnit LayoutBox::containingBlockLogicalWidthForContent() const
return overrideContainingBlockContentLogicalWidth();
LayoutBlock* cb = containingBlock();
+ if (!isTable() && styleRef().position() == AbsolutePosition)
mstensho (USE GERRIT) 2016/05/11 08:36:22 Why not for tables? And rather than "styleRef().p
Deokjin Kim 2016/05/11 14:10:04 In case of tables, even though the absolute positi
mstensho (USE GERRIT) 2016/05/12 09:34:03 That's weird. I don't think there's anything in th
Deokjin Kim 2016/05/12 11:24:20 In updateLogicalWidth() of LayoutTable.cpp, if abs
+ return cb->clientLogicalWidth();
mstensho (USE GERRIT) 2016/05/11 08:36:22 Right, the padding box (and not the content box) o
Deokjin Kim 2016/05/11 14:10:04 First time I thought that this code is only used f
return cb->availableLogicalWidth();
}

Powered by Google App Engine
This is Rietveld 408576698