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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 766223004: Blocks should be aligned by style of parents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index d08b3e586e7a1029c8b6f54e29794111935075af..01a21c43a10be798c0924b8e8066a2e9ce6cf3a2 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1886,8 +1886,11 @@ void RenderBox::computeLogicalWidth(LogicalExtentComputedValues& computedValues)
}
// Margin calculations.
- computeMarginsForDirection(InlineDirection, cb, containerLogicalWidth, computedValues.m_extent, computedValues.m_margins.m_start,
- computedValues.m_margins.m_end, style()->marginStart(), style()->marginEnd());
+ bool hasInvertedDirection = cb->style()->isLeftToRightDirection() == style()->isLeftToRightDirection();
mstensho (USE GERRIT) 2014/12/04 12:18:29 This name seems inverted. :) It's true when the di
Kyungtae Kim 2014/12/08 07:00:13 Done.
+ computeMarginsForDirection(InlineDirection, cb, containerLogicalWidth, computedValues.m_extent,
+ hasInvertedDirection ? computedValues.m_margins.m_start : computedValues.m_margins.m_end,
mstensho (USE GERRIT) 2014/12/04 12:18:29 extraneous space
Kyungtae Kim 2014/12/08 07:00:13 Done.
+ hasInvertedDirection ? computedValues.m_margins.m_end : computedValues.m_margins.m_start,
+ style()->marginStart(), style()->marginEnd());
if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLogicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + computedValues.m_margins.m_end)
&& !isFloating() && !isInline() && !cb->isFlexibleBoxIncludingDeprecated() && !cb->isRenderGrid()) {

Powered by Google App Engine
This is Rietveld 408576698