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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPainter.cpp

Issue 1458733002: Fix CSS outline property in flipped blocks Writing Mode (vertical-rl) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: !isBox() Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
index b82157054ef57ac539465b8fc80f62d18c6187c6..987f6806f4c3d7ee848cc3fcbfca6b8082752404 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -5,6 +5,7 @@
#include "config.h"
#include "core/paint/ObjectPainter.h"
+#include "core/layout/LayoutBlock.h"
#include "core/layout/LayoutInline.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutTheme.h"
@@ -206,6 +207,14 @@ void ObjectPainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutObject, paintInfo.phase, paintOffset))
return;
+ // The result rects are in coordinates of m_layoutObject's border box.
+ // Block flipping is not applied yet if !m_layoutObject.isBox().
+ if (!m_layoutObject.isBox() && m_layoutObject.styleRef().isFlippedBlocksWritingMode()) {
+ LayoutBlock* container = m_layoutObject.containingBlock();
+ if (container)
+ m_layoutObject.localToContainerRects(outlineRects, container, -paintOffset, paintOffset);
+ }
+
Vector<IntRect> pixelSnappedOutlineRects;
for (auto& r : outlineRects)
pixelSnappedOutlineRects.append(pixelSnappedIntRect(r));
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698