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

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

Issue 176763011: Revert "Consider text alignment and direction when computing the left offset for horizontal writing… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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/rendering/RenderBlockLineLayout.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 760eab0aad7d7832b5fed5c1e2a2aff48cfc7088..7946e78451db9f3971db398d430a43cb194fedbb 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -3233,20 +3233,8 @@ static void computeLogicalLeftPositionedOffset(LayoutUnit& logicalLeftPos, const
if (containerBlock->isHorizontalWritingMode() != child->isHorizontalWritingMode() && containerBlock->style()->isFlippedBlocksWritingMode()) {
logicalLeftPos = containerLogicalWidth - logicalWidthValue - logicalLeftPos;
logicalLeftPos += (child->isHorizontalWritingMode() ? containerBlock->borderRight() : containerBlock->borderBottom());
- } else if (child->isHorizontalWritingMode()) {
- RenderStyle* blockStyle = containerBlock->style();
- bool containerBlockIsLTR = isLeftToRightDirection(blockStyle->direction());
- ETextAlign textAlignForContainerBlock = containerBlock->simplifiedTextAlign(blockStyle->textAlign());
- if (containerBlockIsLTR && textAlignForContainerBlock == RIGHT) {
- logicalLeftPos = containerLogicalWidth - (logicalWidthValue + child->borderLogicalWidth() + child->style()->logicalRight().value());
- logicalLeftPos += containerBlock->borderLogicalRight();
- } else if (!containerBlockIsLTR && textAlignForContainerBlock == LEFT) {
- logicalLeftPos += containerBlock->borderAndPaddingLogicalLeft() + logicalWidthValue;
- } else {
- logicalLeftPos += containerBlock->borderLeft();
- }
} else {
- logicalLeftPos += containerBlock->borderTop();
+ logicalLeftPos += (child->isHorizontalWritingMode() ? containerBlock->borderLeft() : containerBlock->borderTop());
}
}
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698