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

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: Updated patch 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..eecac2c8dda0fe8e46c05f5be1e67c5d6ee42ed1 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -2717,12 +2717,12 @@ LayoutUnit LayoutBox::availableLogicalHeightUsing(const Length& h, AvailableLogi
return adjustContentBoxLogicalHeightForBoxSizing(newContentHeight);
}
- // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
rune 2015/03/16 13:34:03 You removed this FIXME. Is it fixed?
- LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightType);
- if (heightType == ExcludeMarginBorderPadding) {
- // FIXME: Margin collapsing hasn't happened yet, so this incorrectly removes collapsed margins.
rune 2015/03/16 13:34:03 You removed this FIXME. Is it fixed?
- availableHeight -= marginBefore() + marginAfter() + borderAndPaddingLogicalHeight();
- }
+ const LayoutBlock* cb = isLayoutBlock() ? toLayoutBlock(this) : containingBlock();
mstensho (USE GERRIT) 2015/03/23 14:27:55 Pretending that we're our own containing block? Th
changseok 2015/03/26 07:12:04 Agree. I looked into this area more. I don't know
mstensho (USE GERRIT) 2015/03/26 12:53:37 Yeah, but resolving percentage heights isn't as si
+ LayoutUnit availableHeight = cb->clientLogicalHeight();
rune 2015/03/16 13:34:03 This seems quite different from containingBlockLog
changseok 2015/03/26 07:12:04 Yeah.. I think containingBlockLogicalHeightForCont
+ if (heightType == ExcludeMarginBorderPadding)
+ availableHeight -= paddingBefore() + paddingAfter();
+ else if (heightType == IncludeMarginBorderPadding)
+ availableHeight += marginBefore() + marginAfter() + borderBefore() + borderAfter();
return availableHeight;
}
« 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