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

Issue 14289003: [CSS Exclusions] Zoom causes shape-inside to fail when shape-padding is specified (Closed)

Created:
7 years, 8 months ago by Hans Muller
Modified:
7 years, 7 months ago
CC:
blink-reviews, jchaffraix+rendering, leviw_travelin_and_unemployed, eae
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

[CSS Exclusions] Zoom causes shape-inside to fail when shape-padding is specified Snap computed margin and polygon boundaries to the LayoutUnit grid to ensure that they fall within the shape's LayoutUnit bounding box. This is a provisional change, it will be replaced by the TBD patch for https://code.google.com/p/chromium/issues/detail?id=235085 BUG=230392

Patch Set 1 #

Total comments: 3

Patch Set 2 : [CSS Exclusions] Zoom causes shape-inside to fail when shape-padding is specified #

Patch Set 3 : Sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -14 lines) Patch
A + LayoutTests/fast/exclusions/shape-inside/shape-inside-polygon-zoom.html View 2 chunks +10 lines, -8 lines 0 comments Download
A + LayoutTests/fast/exclusions/shape-inside/shape-inside-polygon-zoom-expected.html View 1 chunk +10 lines, -6 lines 0 comments Download
M Source/core/rendering/ExclusionPolygon.cpp View 1 4 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Hans Muller
This is a patch for https://code.google.com/p/chromium/issues/detail?id=230392 which syncs blink with the WebKit patch for https://bugs.webkit.org/show_bug.cgi?id=113730.
7 years, 8 months ago (2013-04-23 15:21:04 UTC) #1
Julien - ping for review
https://codereview.chromium.org/14289003/diff/1/Source/core/rendering/ExclusionPolygon.cpp File Source/core/rendering/ExclusionPolygon.cpp (right): https://codereview.chromium.org/14289003/diff/1/Source/core/rendering/ExclusionPolygon.cpp#newcode132 Source/core/rendering/ExclusionPolygon.cpp:132: static inline void snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices) Wouldn't it make more ...
7 years, 8 months ago (2013-04-23 17:09:04 UTC) #2
Hans Muller
2013/04/23 17:09:04, Julien Chaffraix wrote: > https://codereview.chromium.org/14289003/diff/1/Source/core/rendering/ExclusionPolygon.cpp#newcode132 > Source/core/rendering/ExclusionPolygon.cpp:132: static inline void > snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices) ...
7 years, 8 months ago (2013-04-23 18:18:57 UTC) #3
leviw_travelin_and_unemployed
https://codereview.chromium.org/14289003/diff/1/Source/core/rendering/ExclusionPolygon.cpp#newcode135 > > Source/core/rendering/ExclusionPolygon.cpp:135: > > vertices[i].set(LayoutUnit(vertices[i].x()).toFloat(), > > LayoutUnit(vertices[i].y()).toFloat()); > > Note that this ...
7 years, 8 months ago (2013-04-23 18:27:20 UTC) #4
Hans Muller
On 2013/04/23 18:27:20, Levi wrote: > https://codereview.chromium.org/14289003/diff/1/Source/core/rendering/ExclusionPolygon.cpp#newcode135 > > As done, any subsequent operation(s) on ...
7 years, 8 months ago (2013-04-23 18:35:54 UTC) #5
Julien - ping for review
On 2013/04/23 18:35:54, Hans Muller wrote: > On 2013/04/23 18:27:20, Levi wrote: > > > ...
7 years, 8 months ago (2013-04-23 19:30:34 UTC) #6
Julien - ping for review
> > Also it may be nice to just use the existing FloatPoint -> LayoutPoint ...
7 years, 8 months ago (2013-04-23 19:37:04 UTC) #7
Hans Muller
On 2013/04/23 19:37:04, Julien Chaffraix wrote: > > > Also it may be nice to ...
7 years, 8 months ago (2013-04-23 21:41:54 UTC) #8
Hans Muller
On 2013/04/23 19:30:34, Julien Chaffraix wrote: > > Are you suggesting that FloatRects also be ...
7 years, 8 months ago (2013-04-23 21:51:32 UTC) #9
Hans Muller
Using flooredLayoutPoint() to snap polygon vertices to the LayoutUnit grid. I'd like to defer LayoutRectifying ...
7 years, 8 months ago (2013-04-23 22:40:31 UTC) #10
Julien - ping for review
LGTM. Preferably (ie nit) the description should mention the follow-up bug for the bigger refactoring ...
7 years, 8 months ago (2013-04-24 16:47:16 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hmuller@adobe.com/14289003/11001
7 years, 8 months ago (2013-04-24 17:44:19 UTC) #12
commit-bot: I haz the power
Presubmit check for 14289003-11001 failed and returned exit status -2001. The presubmit check was hung. ...
7 years, 8 months ago (2013-04-24 17:50:26 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hmuller@adobe.com/14289003/17001
7 years, 8 months ago (2013-04-24 18:04:27 UTC) #14
commit-bot: I haz the power
Presubmit check for 14289003-17001 failed and returned exit status -2001. The presubmit check was hung. ...
7 years, 8 months ago (2013-04-24 18:10:28 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hmuller@adobe.com/14289003/17001
7 years, 8 months ago (2013-04-24 18:44:12 UTC) #16
commit-bot: I haz the power
Presubmit check for 14289003-17001 failed and returned exit status -2001. The presubmit check was hung. ...
7 years, 8 months ago (2013-04-24 18:50:16 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hmuller@adobe.com/14289003/17001
7 years, 8 months ago (2013-04-24 18:57:07 UTC) #18
commit-bot: I haz the power
Presubmit check for 14289003-17001 failed and returned exit status -2001. The presubmit check was hung. ...
7 years, 8 months ago (2013-04-24 19:03:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hmuller@adobe.com/14289003/17001
7 years, 8 months ago (2013-04-25 14:42:18 UTC) #20
commit-bot: I haz the power
7 years, 8 months ago (2013-04-25 14:42:19 UTC) #21
Failed to apply patch for Source/core/rendering/ExclusionPolygon.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file Source/core/rendering/ExclusionPolygon.cpp
  Hunk #1 FAILED at 29.
  1 out of 4 hunks FAILED -- saving rejects to file
Source/core/rendering/ExclusionPolygon.cpp.rej

Patch:       Source/core/rendering/ExclusionPolygon.cpp
Index: Source/core/rendering/ExclusionPolygon.cpp
diff --git a/Source/core/rendering/ExclusionPolygon.cpp
b/Source/core/rendering/ExclusionPolygon.cpp
index
136287ac40f54a90d70754c8defa857add7cc4cd..b3d5884bfcd2575d1501391c5141357e0b1bdd03
100644
--- a/Source/core/rendering/ExclusionPolygon.cpp
+++ b/Source/core/rendering/ExclusionPolygon.cpp
@@ -29,6 +29,7 @@
 
 #include "config.h"
 #include "ExclusionPolygon.h"
+#include "LayoutPoint.h"
 
 #include <wtf/MathExtras.h>
 
@@ -129,6 +130,12 @@ static inline void appendArc(Vector<FloatPoint>& vertices,
const FloatPoint& arc
     vertices.append(endArcVertex);
 }
 
+static inline void snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices)
+{
+    for (unsigned i = 0; i < vertices.size(); ++i)
+      vertices[i] = flooredLayoutPoint(vertices[i]);
+}
+
 static inline FloatPolygon* computeShapePaddingBounds(const FloatPolygon&
polygon, float padding, WindRule fillRule)
 {
     Vector<FloatPoint>* paddedVertices = new Vector<FloatPoint>();
@@ -146,6 +153,7 @@ static inline FloatPolygon* computeShapePaddingBounds(const
FloatPolygon& polygo
             appendArc(*paddedVertices, thisEdge.vertex1(), padding,
prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true);
     }
 
+    snapVerticesToLayoutUnitGrid(*paddedVertices);
     return new FloatPolygon(adoptPtr(paddedVertices), fillRule);
 }
 
@@ -166,6 +174,7 @@ static inline FloatPolygon* computeShapeMarginBounds(const
FloatPolygon& polygon
             appendArc(*marginVertices, thisEdge.vertex1(), margin,
prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), false);
     }
 
+    snapVerticesToLayoutUnitGrid(*marginVertices);
     return new FloatPolygon(adoptPtr(marginVertices), fillRule);
 }

Powered by Google App Engine
This is Rietveld 408576698