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

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

Issue 1846753004: Fix wrong box-shadow visual overflow with flipped blocks writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 32daeddf1ea9e5c5708a672522bc3005ae8c4b84..36520c9fd1c9ed1af76d3f513a87a8c8a4487a88 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4017,6 +4017,14 @@ LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() const
left = std::max(left, borderOutsets.left());
}
+ // Box-shadow and border-image-outsets are in physical direction. Flip into block direction.
+ if (UNLIKELY(hasFlippedBlocksWritingMode())) {
+ if (isHorizontalWritingMode())
+ std::swap(top, bottom);
+ else
+ std::swap(left, right);
+ }
+
if (style()->hasOutline()) {
Vector<LayoutRect> outlineRects;
// The result rects are in coordinates of this object's border box.

Powered by Google App Engine
This is Rietveld 408576698