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

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

Issue 1007623003: Fix incorrect percentage top for positioned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index b87d2138d1fcd54f189a0096ba5c5f9adb6514d1..be412169a0299a35952e526380087850078b30a3 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -2717,6 +2717,11 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing(const Length& h, AvailableLogi
return adjustContentBoxLogicalHeightForBoxSizing(newContentHeight);
}
+ if (isLayoutBlock() && isOutOfFlowPositioned() && (heightType == IncludePadding)) {
rune 2015/03/13 12:49:13 What happens if you pass IncludePadding with non-o
changseok 2015/03/16 10:02:25 IncludePadding is only for position:absolute. so n
+ LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(this);
+ return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
+ }
+
// FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightType);
if (heightType == ExcludeMarginBorderPadding) {
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698