<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166316] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166316">166316</a></dd>
<dt>Author</dt> <dd>zoltan@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-26 14:06:49 -0700 (Wed, 26 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[CSS Shapes] Remove no-longer-used shape-inside geometry code
https://bugs.webkit.org/show_bug.cgi?id=130740
Reviewed by David Hyatt.
This patch removes shape-padding support, since it can be used only with shape-inside.
Shape-inside support has been removed in <a href="http://trac.webkit.org/projects/webkit/changeset/166301">r166301</a>.
No new tests needed, existing tests have been removed by <a href="http://trac.webkit.org/projects/webkit/changeset/166301">r166301</a>.
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
(WebCore::BoxShape::shapePaddingBounds): Deleted.
(WebCore::BoxShape::getIncludedIntervals): Deleted.
(WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::leftSide): Deleted.
(WebCore::isReflexVertex): Deleted.
(WebCore::computeShapePaddingBounds): Deleted.
(WebCore::PolygonShape::shapePaddingBounds): Deleted.
(WebCore::PolygonShape::getIncludedIntervals): Deleted.
(WebCore::firstFitRectInPolygon): Deleted.
(WebCore::aboveOrToTheLeft): Deleted.
(WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
(WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
(WebCore::RasterShape::paddingIntervals): Deleted.
(WebCore::RasterShape::getIncludedIntervals): Deleted.
(WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.cpp:
(WebCore::ellipseYIntercept): Deleted.
(WebCore::RectangleShape::shapePaddingBounds): Deleted.
(WebCore::RectangleShape::getIncludedIntervals): Deleted.
(WebCore::cornerInterceptForWidth): Deleted.
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
* rendering/shapes/RectangleShape.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
(WebCore::Shape::createRasterShape):
(WebCore::Shape::createBoxShape):
* rendering/shapes/Shape.h:
(WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
(WebCore::Shape::shapePadding): Deleted.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesBoxShapecpp">trunk/Source/WebCore/rendering/shapes/BoxShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesBoxShapeh">trunk/Source/WebCore/rendering/shapes/BoxShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesPolygonShapecpp">trunk/Source/WebCore/rendering/shapes/PolygonShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesPolygonShapeh">trunk/Source/WebCore/rendering/shapes/PolygonShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesRasterShapecpp">trunk/Source/WebCore/rendering/shapes/RasterShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesRasterShapeh">trunk/Source/WebCore/rendering/shapes/RasterShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesRectangleShapecpp">trunk/Source/WebCore/rendering/shapes/RectangleShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesRectangleShapeh">trunk/Source/WebCore/rendering/shapes/RectangleShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapecpp">trunk/Source/WebCore/rendering/shapes/Shape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeh">trunk/Source/WebCore/rendering/shapes/Shape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/ChangeLog        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2014-03-26 Zoltan Horvath <zoltan@webkit.org>
+
+ [CSS Shapes] Remove no-longer-used shape-inside geometry code
+ https://bugs.webkit.org/show_bug.cgi?id=130740
+
+ Reviewed by David Hyatt.
+
+ This patch removes shape-padding support, since it can be used only with shape-inside.
+ Shape-inside support has been removed in r166301.
+
+ No new tests needed, existing tests have been removed by r166301.
+
+ * rendering/shapes/BoxShape.cpp:
+ (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
+ (WebCore::BoxShape::shapePaddingBounds): Deleted.
+ (WebCore::BoxShape::getIncludedIntervals): Deleted.
+ (WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
+ * rendering/shapes/BoxShape.h:
+ * rendering/shapes/PolygonShape.cpp:
+ (WebCore::leftSide): Deleted.
+ (WebCore::isReflexVertex): Deleted.
+ (WebCore::computeShapePaddingBounds): Deleted.
+ (WebCore::PolygonShape::shapePaddingBounds): Deleted.
+ (WebCore::PolygonShape::getIncludedIntervals): Deleted.
+ (WebCore::firstFitRectInPolygon): Deleted.
+ (WebCore::aboveOrToTheLeft): Deleted.
+ (WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
+ * rendering/shapes/PolygonShape.h:
+ (WebCore::PolygonShape::PolygonShape):
+ * rendering/shapes/RasterShape.cpp:
+ (WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
+ (WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
+ (WebCore::RasterShape::paddingIntervals): Deleted.
+ (WebCore::RasterShape::getIncludedIntervals): Deleted.
+ (WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
+ * rendering/shapes/RasterShape.h:
+ * rendering/shapes/RectangleShape.cpp:
+ (WebCore::ellipseYIntercept): Deleted.
+ (WebCore::RectangleShape::shapePaddingBounds): Deleted.
+ (WebCore::RectangleShape::getIncludedIntervals): Deleted.
+ (WebCore::cornerInterceptForWidth): Deleted.
+ (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
+ * rendering/shapes/RectangleShape.h:
+ * rendering/shapes/Shape.cpp:
+ (WebCore::Shape::createShape):
+ (WebCore::Shape::createRasterShape):
+ (WebCore::Shape::createBoxShape):
+ * rendering/shapes/Shape.h:
+ (WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
+ (WebCore::Shape::shapePadding): Deleted.
+ * rendering/shapes/ShapeInfo.cpp:
+ (WebCore::ShapeInfo<RenderType>::computedShape):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::changeRequiresLayout):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h:
+
</ins><span class="cx"> 2014-03-26 Jeremy Jones <jeremyj@apple.com>
</span><span class="cx">
</span><span class="cx"> Implement hasLiveStreamingContent property in WebAVPlayerController
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesBoxShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/BoxShape.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/BoxShape.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/BoxShape.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -42,14 +42,6 @@
</span><span class="cx"> return static_cast<LayoutRect>(marginBounds);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LayoutRect BoxShape::shapePaddingLogicalBoundingBox() const
-{
- FloatRect paddingBounds(m_bounds.rect());
- if (shapePadding() > 0)
- paddingBounds.inflate(-shapePadding());
- return static_cast<LayoutRect>(paddingBounds);
-}
-
</del><span class="cx"> FloatRoundedRect BoxShape::shapeMarginBounds() const
</span><span class="cx"> {
</span><span class="cx"> FloatRoundedRect marginBounds(m_bounds);
</span><span class="lines">@@ -60,16 +52,6 @@
</span><span class="cx"> return marginBounds;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FloatRoundedRect BoxShape::shapePaddingBounds() const
-{
- FloatRoundedRect paddingBounds(m_bounds);
- if (shapePadding() > 0) {
- paddingBounds.inflate(-shapePadding());
- paddingBounds.expandRadii(-shapePadding());
- }
- return paddingBounds;
-}
-
</del><span class="cx"> void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
</span><span class="cx"> {
</span><span class="cx"> const FloatRoundedRect& marginBounds = shapeMarginBounds();
</span><span class="lines">@@ -112,50 +94,6 @@
</span><span class="cx"> result.append(LineSegment(x1, x2));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BoxShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const FloatRoundedRect& paddingBounds = shapePaddingBounds();
- if (paddingBounds.isEmpty())
- return;
-
- const FloatRect& rect = paddingBounds.rect();
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
-
- if (y1 < rect.y() || y2 > rect.maxY())
- return;
-
- if (!paddingBounds.isRounded()) {
- result.append(LineSegment(rect.x(), rect.maxX()));
- return;
- }
-
- float x1 = rect.x();
- float x2 = rect.maxX();
- float minXIntercept;
- float maxXIntercept;
-
- if (paddingBounds.xInterceptsAtY(y1, minXIntercept, maxXIntercept)) {
- x1 = std::max<float>(x1, minXIntercept);
- x2 = std::min<float>(x2, maxXIntercept);
- }
-
- if (paddingBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) {
- x1 = std::max<float>(x1, minXIntercept);
- x2 = std::min<float>(x2, maxXIntercept);
- }
-
- result.append(LineSegment(x1, x2));
-}
-
-bool BoxShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize&, LayoutUnit& result) const
-{
- // FIXME: this method is only a stub, https://bugs.webkit.org/show_bug.cgi?id=124606.
-
- result = minLogicalIntervalTop;
- return true;
-}
-
</del><span class="cx"> void BoxShape::buildDisplayPaths(DisplayPaths& paths) const
</span><span class="cx"> {
</span><span class="cx"> paths.shape.addRoundedRect(m_bounds, Path::PreferBezierRoundedRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesBoxShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/BoxShape.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/BoxShape.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/BoxShape.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -43,17 +43,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual LayoutRect shapeMarginLogicalBoundingBox() const override;
</span><del>- virtual LayoutRect shapePaddingLogicalBoundingBox() const override;
</del><span class="cx"> virtual bool isEmpty() const override { return m_bounds.isEmpty(); }
</span><span class="cx"> virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
</span><del>- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const override;
</del><span class="cx">
</span><span class="cx"> virtual void buildDisplayPaths(DisplayPaths&) const override;
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> FloatRoundedRect shapeMarginBounds() const;
</span><del>- FloatRoundedRect shapePaddingBounds() const;
</del><span class="cx">
</span><span class="cx"> FloatRoundedRect m_bounds;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesPolygonShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/PolygonShape.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/PolygonShape.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/PolygonShape.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -48,16 +48,6 @@
</span><span class="cx"> EdgeIntersectionType type;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-static inline float leftSide(const FloatPoint& vertex1, const FloatPoint& vertex2, const FloatPoint& point)
-{
- return ((point.x() - vertex1.x()) * (vertex2.y() - vertex1.y())) - ((vertex2.x() - vertex1.x()) * (point.y() - vertex1.y()));
-}
-
-static inline bool isReflexVertex(const FloatPoint& prevVertex, const FloatPoint& vertex, const FloatPoint& nextVertex)
-{
- return leftSide(prevVertex, nextVertex, vertex) < 0;
-}
-
</del><span class="cx"> static bool computeXIntersection(const FloatPolygonEdge* edgePointer, float y, EdgeIntersection& result)
</span><span class="cx"> {
</span><span class="cx"> const FloatPolygonEdge& edge = *edgePointer;
</span><span class="lines">@@ -136,27 +126,6 @@
</span><span class="cx"> vertices[i].set(LayoutUnit(vertices[i].x()).toFloat(), LayoutUnit(vertices[i].y()).toFloat());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline PassOwnPtr<FloatPolygon> computeShapePaddingBounds(const FloatPolygon& polygon, float padding, WindRule fillRule)
-{
- OwnPtr<Vector<FloatPoint>> paddedVertices = adoptPtr(new Vector<FloatPoint>());
- FloatPoint intersection;
-
- for (unsigned i = 0; i < polygon.numberOfEdges(); ++i) {
- const FloatPolygonEdge& thisEdge = polygon.edgeAt(i);
- const FloatPolygonEdge& prevEdge = thisEdge.previousEdge();
- OffsetPolygonEdge thisOffsetEdge(thisEdge, inwardEdgeNormal(thisEdge) * padding);
- OffsetPolygonEdge prevOffsetEdge(prevEdge, inwardEdgeNormal(prevEdge) * padding);
-
- if (prevOffsetEdge.intersection(thisOffsetEdge, intersection))
- paddedVertices->append(intersection);
- else if (isReflexVertex(prevEdge.vertex1(), thisEdge.vertex1(), thisEdge.vertex2()))
- appendArc(*paddedVertices, thisEdge.vertex1(), padding, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true);
- }
-
- snapVerticesToLayoutUnitGrid(*paddedVertices);
- return adoptPtr(new FloatPolygon(paddedVertices.release(), fillRule));
-}
-
</del><span class="cx"> static inline PassOwnPtr<FloatPolygon> computeShapeMarginBounds(const FloatPolygon& polygon, float margin, WindRule fillRule)
</span><span class="cx"> {
</span><span class="cx"> OwnPtr<Vector<FloatPoint>> marginVertices = adoptPtr(new Vector<FloatPoint>());
</span><span class="lines">@@ -178,18 +147,7 @@
</span><span class="cx"> return adoptPtr(new FloatPolygon(marginVertices.release(), fillRule));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const FloatPolygon& PolygonShape::shapePaddingBounds() const
-{
- ASSERT(shapePadding() >= 0);
- if (!shapePadding() || m_polygon.isEmpty())
- return m_polygon;
</del><span class="cx">
</span><del>- if (!m_paddingBounds)
- m_paddingBounds = computeShapePaddingBounds(m_polygon, shapePadding(), m_polygon.fillRule());
-
- return *m_paddingBounds;
-}
-
</del><span class="cx"> const FloatPolygon& PolygonShape::shapeMarginBounds() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(shapeMargin() >= 0);
</span><span class="lines">@@ -387,142 +345,6 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PolygonShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const FloatPolygon& polygon = shapePaddingBounds();
- if (polygon.isEmpty())
- return;
-
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
-
- FloatShapeIntervals y1XIntervals, y2XIntervals;
- computeXIntersections(polygon, y1, true, y1XIntervals);
- computeXIntersections(polygon, y2, false, y2XIntervals);
-
- FloatShapeIntervals commonIntervals;
- FloatShapeInterval::intersectShapeIntervals(y1XIntervals, y2XIntervals, commonIntervals);
-
- FloatShapeIntervals edgeIntervals;
- computeOverlappingEdgeXProjections(polygon, y1, y2, edgeIntervals);
-
- FloatShapeIntervals includedIntervals;
- FloatShapeInterval::subtractShapeIntervals(commonIntervals, edgeIntervals, includedIntervals);
-
- for (unsigned i = 0; i < includedIntervals.size(); ++i) {
- const FloatShapeInterval& interval = includedIntervals[i];
- result.append(LineSegment(interval.x1(), interval.x2()));
- }
-}
-
-static inline bool firstFitRectInPolygon(const FloatPolygon& polygon, const FloatRect& rect, unsigned offsetEdgeIndex1, unsigned offsetEdgeIndex2)
-{
- Vector<const FloatPolygonEdge*> edges;
- if (!polygon.overlappingEdges(rect.y(), rect.maxY(), edges))
- return true;
-
- for (unsigned i = 0; i < edges.size(); ++i) {
- const FloatPolygonEdge* edge = edges[i];
- if (edge->edgeIndex() != offsetEdgeIndex1 && edge->edgeIndex() != offsetEdgeIndex2 && edge->overlapsRect(rect))
- return false;
- }
-
- return true;
-}
-
-static inline bool aboveOrToTheLeft(const FloatRect& r1, const FloatRect& r2)
-{
- if (r1.y() < r2.y())
- return true;
- if (r1.y() == r2.y())
- return r1.x() < r2.x();
- return false;
-}
-
-bool PolygonShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const
-{
- float minIntervalTop = minLogicalIntervalTop;
- float minIntervalHeight = minLogicalIntervalSize.height();
- float minIntervalWidth = minLogicalIntervalSize.width();
-
- const FloatPolygon& polygon = shapePaddingBounds();
- const FloatRect boundingBox = polygon.boundingBox();
- if (minIntervalWidth > boundingBox.width())
- return false;
-
- float minY = std::max(boundingBox.y(), minIntervalTop);
- float maxY = minY + minIntervalHeight;
-
- if (maxY > boundingBox.maxY())
- return false;
-
- Vector<const FloatPolygonEdge*> edges;
- polygon.overlappingEdges(minIntervalTop, boundingBox.maxY(), edges);
-
- float dx = minIntervalWidth / 2;
- float dy = minIntervalHeight / 2;
- Vector<OffsetPolygonEdge> offsetEdges;
-
- for (unsigned i = 0; i < edges.size(); ++i) {
- const FloatPolygonEdge& edge = *(edges[i]);
- const FloatPoint& vertex0 = edge.previousEdge().vertex1();
- const FloatPoint& vertex1 = edge.vertex1();
- const FloatPoint& vertex2 = edge.vertex2();
- Vector<OffsetPolygonEdge> offsetEdgeBuffer;
-
- if (vertex2.y() > vertex1.y() ? vertex2.x() >= vertex1.x() : vertex1.x() >= vertex2.x()) {
- offsetEdgeBuffer.append(OffsetPolygonEdge(edge, FloatSize(dx, -dy)));
- offsetEdgeBuffer.append(OffsetPolygonEdge(edge, FloatSize(-dx, dy)));
- } else {
- offsetEdgeBuffer.append(OffsetPolygonEdge(edge, FloatSize(dx, dy)));
- offsetEdgeBuffer.append(OffsetPolygonEdge(edge, FloatSize(-dx, -dy)));
- }
-
- if (isReflexVertex(vertex0, vertex1, vertex2)) {
- if (vertex2.x() <= vertex1.x() && vertex0.x() <= vertex1.x())
- offsetEdgeBuffer.append(OffsetPolygonEdge(vertex1, FloatSize(dx, -dy), FloatSize(dx, dy)));
- else if (vertex2.x() >= vertex1.x() && vertex0.x() >= vertex1.x())
- offsetEdgeBuffer.append(OffsetPolygonEdge(vertex1, FloatSize(-dx, -dy), FloatSize(-dx, dy)));
- if (vertex2.y() <= vertex1.y() && vertex0.y() <= vertex1.y())
- offsetEdgeBuffer.append(OffsetPolygonEdge(vertex1, FloatSize(-dx, dy), FloatSize(dx, dy)));
- else if (vertex2.y() >= vertex1.y() && vertex0.y() >= vertex1.y())
- offsetEdgeBuffer.append(OffsetPolygonEdge(vertex1, FloatSize(-dx, -dy), FloatSize(dx, -dy)));
- }
-
- for (unsigned j = 0; j < offsetEdgeBuffer.size(); ++j)
- if (offsetEdgeBuffer[j].maxY() >= minY)
- offsetEdges.append(offsetEdgeBuffer[j]);
- }
-
- offsetEdges.append(OffsetPolygonEdge(polygon, minIntervalTop, FloatSize(0, dy)));
-
- FloatPoint offsetEdgesIntersection;
- FloatRect firstFitRect;
- bool firstFitFound = false;
-
- for (unsigned i = 0; i < offsetEdges.size() - 1; ++i) {
- for (unsigned j = i + 1; j < offsetEdges.size(); ++j) {
- if (offsetEdges[i].intersection(offsetEdges[j], offsetEdgesIntersection)) {
- FloatPoint potentialFirstFitLocation(offsetEdgesIntersection.x() - dx, offsetEdgesIntersection.y() - dy);
- FloatRect potentialFirstFitRect(potentialFirstFitLocation, minLogicalIntervalSize);
- if ((offsetEdges[i].basis() == OffsetPolygonEdge::LineTop
- || offsetEdges[j].basis() == OffsetPolygonEdge::LineTop
- || potentialFirstFitLocation.y() >= minIntervalTop)
- && (!firstFitFound || aboveOrToTheLeft(potentialFirstFitRect, firstFitRect))
- && polygon.contains(offsetEdgesIntersection)
- && firstFitRectInPolygon(polygon, potentialFirstFitRect, offsetEdges[i].edgeIndex(), offsetEdges[j].edgeIndex())) {
- firstFitFound = true;
- firstFitRect = potentialFirstFitRect;
- }
- }
- }
- }
-
- if (firstFitFound)
- result = ceiledLayoutUnit(firstFitRect.y());
- return firstFitFound;
-}
-
</del><span class="cx"> static void addPolygon(Path& path, const FloatPolygon& polygon)
</span><span class="cx"> {
</span><span class="cx"> if (!polygon.numberOfVertices())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesPolygonShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/PolygonShape.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/PolygonShape.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/PolygonShape.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -85,26 +85,20 @@
</span><span class="cx"> PolygonShape(PassOwnPtr<Vector<FloatPoint>> vertices, WindRule fillRule)
</span><span class="cx"> : m_polygon(vertices, fillRule)
</span><span class="cx"> , m_marginBounds(nullptr)
</span><del>- , m_paddingBounds(nullptr)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual LayoutRect shapeMarginLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapeMarginBounds().boundingBox()); }
</span><del>- virtual LayoutRect shapePaddingLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapePaddingBounds().boundingBox()); }
</del><span class="cx"> virtual bool isEmpty() const override { return m_polygon.isEmpty(); }
</span><span class="cx"> virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
</span><del>- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const override;
</del><span class="cx">
</span><span class="cx"> virtual void buildDisplayPaths(DisplayPaths&) const override;
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> const FloatPolygon& shapeMarginBounds() const;
</span><del>- const FloatPolygon& shapePaddingBounds() const;
</del><span class="cx">
</span><span class="cx"> FloatPolygon m_polygon;
</span><span class="cx"> mutable OwnPtr<FloatPolygon> m_marginBounds;
</span><del>- mutable OwnPtr<FloatPolygon> m_paddingBounds;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesRasterShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/RasterShape.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/RasterShape.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/RasterShape.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -145,58 +145,6 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RasterShapeIntervals::firstIncludedIntervalY(int minY, const IntSize& minSize, LayoutUnit& result) const
-{
- minY = std::max<int>(bounds().y(), minY);
-
- ASSERT(minY >= 0 && minY < size());
-
- if (minSize.isEmpty() || minSize.width() > bounds().width())
- return false;
-
- for (int lineY = minY; lineY <= bounds().maxY() - minSize.height(); lineY++) {
- Vector<int> intervalX1Values;
- if (!getIntervalX1Values(lineY, lineY + minSize.height(), minSize.width(), intervalX1Values))
- continue;
-
- std::sort(intervalX1Values.begin(), intervalX1Values.end());
-
- IntRect firstFitRect(IntPoint(0, 0), minSize);
- for (unsigned i = 0; i < intervalX1Values.size(); i++) {
- int lineX = intervalX1Values[i];
- if (i > 0 && lineX == intervalX1Values[i - 1])
- continue;
- firstFitRect.setLocation(IntPoint(lineX, lineY));
- if (contains(firstFitRect)) {
- result = lineY;
- return true;
- }
- }
- }
-
- return false;
-}
-
-void RasterShapeIntervals::getIncludedIntervals(int y1, int y2, IntShapeIntervals& result) const
-{
- ASSERT(y2 >= y1);
-
- if (y1 < bounds().y() || y2 > bounds().maxY())
- return;
-
- for (int y = y1; y < y2; y++) {
- if (intervalsAt(y).isEmpty())
- return;
- }
-
- result = intervalsAt(y1);
- for (int y = y1 + 1; y < y2 && !result.isEmpty(); y++) {
- IntShapeIntervals intervals;
- IntShapeInterval::intersectShapeIntervals(result, intervalsAt(y), intervals);
- result.swap(intervals);
- }
-}
-
</del><span class="cx"> void RasterShapeIntervals::getExcludedIntervals(int y1, int y2, IntShapeIntervals& result) const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(y2 >= y1);
</span><span class="lines">@@ -279,16 +227,6 @@
</span><span class="cx"> return *m_marginIntervals;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const RasterShapeIntervals& RasterShape::paddingIntervals() const
-{
- ASSERT(shapePadding() >= 0);
- if (!shapePadding())
- return *m_intervals;
-
- // FIXME: Add support for non-zero padding, see https://bugs.webkit.org/show_bug.cgi?id=116348.
- return *m_intervals;
-}
-
</del><span class="cx"> static inline void appendLineSegments(const IntShapeIntervals& intervals, SegmentList& result)
</span><span class="cx"> {
</span><span class="cx"> for (unsigned i = 0; i < intervals.size(); i++)
</span><span class="lines">@@ -306,24 +244,4 @@
</span><span class="cx"> appendLineSegments(excludedIntervals, result);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RasterShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const RasterShapeIntervals& intervals = paddingIntervals();
- if (intervals.isEmpty())
- return;
-
- IntShapeIntervals includedIntervals;
- intervals.getIncludedIntervals(logicalTop, logicalTop + logicalHeight, includedIntervals);
- appendLineSegments(includedIntervals, result);
-}
-
-bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const
-{
- const RasterShapeIntervals& intervals = paddingIntervals();
- if (intervals.isEmpty())
- return false;
-
- return intervals.firstIncludedIntervalY(minLogicalIntervalTop.floor(), flooredIntSize(minLogicalIntervalSize), result);
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesRasterShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/RasterShape.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/RasterShape.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/RasterShape.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -50,9 +50,8 @@
</span><span class="cx"> bool isEmpty() const { return m_bounds.isEmpty(); }
</span><span class="cx"> void appendInterval(int y, int x1, int x2);
</span><span class="cx">
</span><del>- void getIncludedIntervals(int y1, int y2, IntShapeIntervals& result) const;
</del><span class="cx"> void getExcludedIntervals(int y1, int y2, IntShapeIntervals& result) const;
</span><del>- bool firstIncludedIntervalY(int minY, const IntSize& minSize, LayoutUnit& result) const;
</del><ins>+
</ins><span class="cx"> PassOwnPtr<RasterShapeIntervals> computeShapeMarginIntervals(int shapeMargin) const;
</span><span class="cx">
</span><span class="cx"> void buildBoundsPath(Path&) const;
</span><span class="lines">@@ -99,11 +98,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual LayoutRect shapeMarginLogicalBoundingBox() const override { return static_cast<LayoutRect>(marginIntervals().bounds()); }
</span><del>- virtual LayoutRect shapePaddingLogicalBoundingBox() const override { return static_cast<LayoutRect>(paddingIntervals().bounds()); }
</del><span class="cx"> virtual bool isEmpty() const override { return m_intervals->isEmpty(); }
</span><span class="cx"> virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
</span><del>- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const override;
</del><span class="cx">
</span><span class="cx"> virtual void buildDisplayPaths(DisplayPaths& paths) const override
</span><span class="cx"> {
</span><span class="lines">@@ -114,7 +110,6 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> const RasterShapeIntervals& marginIntervals() const;
</span><del>- const RasterShapeIntervals& paddingIntervals() const;
</del><span class="cx">
</span><span class="cx"> OwnPtr<RasterShapeIntervals> m_intervals;
</span><span class="cx"> mutable OwnPtr<RasterShapeIntervals> m_marginIntervals;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesRectangleShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/RectangleShape.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/RectangleShape.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/RectangleShape.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -40,26 +40,6 @@
</span><span class="cx"> return rx * sqrt(1 - (y * y) / (ry * ry));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline float ellipseYIntercept(float x, float rx, float ry)
-{
- ASSERT(rx > 0);
- return ry * sqrt(1 - (x * x) / (rx * rx));
-}
-
-FloatRect RectangleShape::shapePaddingBounds() const
-{
- ASSERT(shapePadding() >= 0);
- if (!shapePadding() || isEmpty())
- return m_bounds;
-
- float boundsX = x() + std::min(width() / 2, shapePadding());
- float boundsY = y() + std::min(height() / 2, shapePadding());
- float boundsWidth = std::max(0.0f, width() - shapePadding() * 2);
- float boundsHeight = std::max(0.0f, height() - shapePadding() * 2);
-
- return FloatRect(boundsX, boundsY, boundsWidth, boundsHeight);
-}
-
</del><span class="cx"> FloatRect RectangleShape::shapeMarginBounds() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(shapeMargin() >= 0);
</span><span class="lines">@@ -108,114 +88,6 @@
</span><span class="cx"> result.append(LineSegment(x1, x2));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RectangleShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const FloatRect& bounds = shapePaddingBounds();
- if (bounds.isEmpty())
- return;
-
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
-
- if (y1 < bounds.y() || y2 > bounds.maxY())
- return;
-
- float x1 = bounds.x();
- float x2 = bounds.maxX();
-
- float paddingRadiusX = std::max(0.0f, rx() - shapePadding());
- float paddingRadiusY = std::max(0.0f, ry() - shapePadding());
-
- if (paddingRadiusX > 0) {
- bool y1InterceptsCorner = y1 < bounds.y() + paddingRadiusY;
- bool y2InterceptsCorner = y2 > bounds.maxY() - paddingRadiusY;
- float xi = 0;
-
- if (y1InterceptsCorner && y2InterceptsCorner) {
- if (y1 < bounds.height() + 2 * bounds.y() - y2) {
- float yi = y1 - bounds.y() - paddingRadiusY;
- xi = ellipseXIntercept(yi, paddingRadiusX, paddingRadiusY);
- } else {
- float yi = y2 - (bounds.maxY() - paddingRadiusY);
- xi = ellipseXIntercept(yi, paddingRadiusX, paddingRadiusY);
- }
- } else if (y1InterceptsCorner) {
- float yi = y1 - bounds.y() - paddingRadiusY;
- xi = ellipseXIntercept(yi, paddingRadiusX, paddingRadiusY);
- } else if (y2InterceptsCorner) {
- float yi = y2 - (bounds.maxY() - paddingRadiusY);
- xi = ellipseXIntercept(yi, paddingRadiusX, paddingRadiusY);
- }
-
- if (y1InterceptsCorner || y2InterceptsCorner) {
- x1 = bounds.x() + paddingRadiusX - xi;
- x2 = bounds.maxX() - paddingRadiusX + xi;
- }
- }
-
- result.append(LineSegment(x1, x2));
-}
-
-static FloatPoint cornerInterceptForWidth(float width, float widthAtIntercept, float rx, float ry)
-{
- float xi = (width - widthAtIntercept) / 2;
- float yi = ry - ellipseYIntercept(rx - xi, rx, ry);
- return FloatPoint(xi, yi);
-}
-
-bool RectangleShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const
-{
- float minIntervalTop = minLogicalIntervalTop;
- float minIntervalHeight = minLogicalIntervalSize.height();
- float minIntervalWidth = minLogicalIntervalSize.width();
-
- const FloatRect& bounds = shapePaddingBounds();
- if (bounds.isEmpty() || minIntervalWidth > bounds.width())
- return false;
-
- float minY = std::max(bounds.y(), minIntervalTop);
- float maxY = minY + minIntervalHeight;
-
- if (maxY > bounds.maxY())
- return false;
-
- float paddingRadiusX = std::max(0.0f, rx() - shapePadding());
- float paddingRadiusY = std::max(0.0f, ry() - shapePadding());
-
- bool intervalOverlapsMinCorner = minY < bounds.y() + paddingRadiusY;
- bool intervalOverlapsMaxCorner = maxY > bounds.maxY() - paddingRadiusY;
-
- if (!intervalOverlapsMinCorner && !intervalOverlapsMaxCorner) {
- result = ceiledLayoutUnit(minY);
- return true;
- }
-
- float centerY = bounds.y() + bounds.height() / 2;
- bool minCornerDefinesX = fabs(centerY - minY) > fabs(centerY - maxY);
- bool intervalFitsWithinCorners = minIntervalWidth + 2 * paddingRadiusX <= bounds.width();
- FloatPoint cornerIntercept = cornerInterceptForWidth(bounds.width(), minIntervalWidth, paddingRadiusX, paddingRadiusY);
-
- if (intervalOverlapsMinCorner && (!intervalOverlapsMaxCorner || minCornerDefinesX)) {
- if (intervalFitsWithinCorners || bounds.y() + cornerIntercept.y() < minY) {
- result = ceiledLayoutUnit(minY);
- return true;
- }
- if (minIntervalHeight < bounds.height() - (2 * cornerIntercept.y())) {
- result = ceiledLayoutUnit(bounds.y() + cornerIntercept.y());
- return true;
- }
- }
-
- if (intervalOverlapsMaxCorner && (!intervalOverlapsMinCorner || !minCornerDefinesX)) {
- if (intervalFitsWithinCorners || minY <= bounds.maxY() - cornerIntercept.y() - minIntervalHeight) {
- result = ceiledLayoutUnit(minY);
- return true;
- }
- }
-
- return false;
-}
-
</del><span class="cx"> void RectangleShape::buildDisplayPaths(DisplayPaths& paths) const
</span><span class="cx"> {
</span><span class="cx"> paths.shape.addRoundedRect(m_bounds, FloatSize(m_radii.width(), m_radii.height()), Path::PreferBezierRoundedRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesRectangleShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/RectangleShape.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/RectangleShape.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/RectangleShape.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -48,17 +48,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual LayoutRect shapeMarginLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapeMarginBounds()); }
</span><del>- virtual LayoutRect shapePaddingLogicalBoundingBox() const override { return static_cast<LayoutRect>(shapePaddingBounds()); }
</del><span class="cx"> virtual bool isEmpty() const override { return m_bounds.isEmpty(); }
</span><span class="cx"> virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
</span><del>- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const override;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit&) const override;
</del><span class="cx">
</span><span class="cx"> virtual void buildDisplayPaths(DisplayPaths&) const override;
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> FloatRect shapeMarginBounds() const;
</span><del>- FloatRect shapePaddingBounds() const;
</del><span class="cx">
</span><span class="cx"> float rx() const { return m_radii.width(); }
</span><span class="cx"> float ry() const { return m_radii.height(); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/Shape.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/Shape.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/Shape.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> return size.transposedSize();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, WritingMode writingMode, Length margin, Length padding)
</del><ins>+PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, WritingMode writingMode, Length margin)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(basicShape);
</span><span class="cx">
</span><span class="lines">@@ -174,12 +174,11 @@
</span><span class="cx">
</span><span class="cx"> shape->m_writingMode = writingMode;
</span><span class="cx"> shape->m_margin = floatValueForLength(margin, 0);
</span><del>- shape->m_padding = floatValueForLength(padding, 0);
</del><span class="cx">
</span><span class="cx"> return shape.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const LayoutRect& imageR, const LayoutRect& marginR, WritingMode writingMode, Length margin, Length padding)
</del><ins>+PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const LayoutRect& imageR, const LayoutRect& marginR, WritingMode writingMode, Length margin)
</ins><span class="cx"> {
</span><span class="cx"> IntRect imageRect = pixelSnappedIntRect(imageR);
</span><span class="cx"> IntRect marginRect = pixelSnappedIntRect(marginR);
</span><span class="lines">@@ -218,11 +217,10 @@
</span><span class="cx"> OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release(), marginRect.size()));
</span><span class="cx"> rasterShape->m_writingMode = writingMode;
</span><span class="cx"> rasterShape->m_margin = floatValueForLength(margin, 0);
</span><del>- rasterShape->m_padding = floatValueForLength(padding, 0);
</del><span class="cx"> return rasterShape.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<Shape> Shape::createBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, Length margin, Length padding)
</del><ins>+PassOwnPtr<Shape> Shape::createBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, Length margin)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(roundedRect.rect().width() >= 0 && roundedRect.rect().height() >= 0);
</span><span class="cx">
</span><span class="lines">@@ -231,7 +229,6 @@
</span><span class="cx"> OwnPtr<Shape> shape = adoptPtr(new BoxShape(bounds));
</span><span class="cx"> shape->m_writingMode = writingMode;
</span><span class="cx"> shape->m_margin = floatValueForLength(margin, 0);
</span><del>- shape->m_padding = floatValueForLength(padding, 0);
</del><span class="cx">
</span><span class="cx"> return shape.release();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/Shape.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/Shape.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/Shape.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -67,26 +67,22 @@
</span><span class="cx"> Path marginShape;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding);
- static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const LayoutRect& imageRect, const LayoutRect& marginRect, WritingMode, Length margin, Length padding);
- static PassOwnPtr<Shape> createBoxShape(const RoundedRect&, WritingMode, Length margin, Length padding);
</del><ins>+ static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin);
+ static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const LayoutRect& imageRect, const LayoutRect& marginRect, WritingMode, Length margin);
+ static PassOwnPtr<Shape> createBoxShape(const RoundedRect&, WritingMode, Length margin);
</ins><span class="cx">
</span><span class="cx"> virtual ~Shape() { }
</span><span class="cx">
</span><span class="cx"> virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0;
</span><del>- virtual LayoutRect shapePaddingLogicalBoundingBox() const = 0;
</del><span class="cx"> virtual bool isEmpty() const = 0;
</span><del>- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0;
</del><span class="cx"> virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0;
</span><del>- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const = 0;
</del><ins>+
</ins><span class="cx"> bool lineOverlapsShapeMarginBounds(LayoutUnit lineTop, LayoutUnit lineHeight) const { return lineOverlapsBoundingBox(lineTop, lineHeight, shapeMarginLogicalBoundingBox()); }
</span><del>- bool lineOverlapsShapePaddingBounds(LayoutUnit lineTop, LayoutUnit lineHeight) const { return lineOverlapsBoundingBox(lineTop, lineHeight, shapePaddingLogicalBoundingBox()); }
</del><span class="cx">
</span><span class="cx"> virtual void buildDisplayPaths(DisplayPaths&) const = 0;
</span><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> float shapeMargin() const { return m_margin; }
</span><del>- float shapePadding() const { return m_padding; }
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> bool lineOverlapsBoundingBox(LayoutUnit lineTop, LayoutUnit lineHeight, const LayoutRect& rect) const
</span><span class="lines">@@ -98,7 +94,6 @@
</span><span class="cx">
</span><span class="cx"> WritingMode m_writingMode;
</span><span class="cx"> float m_margin;
</span><del>- float m_padding;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -123,7 +123,6 @@
</span><span class="cx">
</span><span class="cx"> WritingMode writingMode = this->styleForWritingMode().writingMode();
</span><span class="cx"> Length margin = m_renderer.style().shapeMargin();
</span><del>- Length padding = m_renderer.style().shapePadding();
</del><span class="cx"> float shapeImageThreshold = m_renderer.style().shapeImageThreshold();
</span><span class="cx"> const ShapeValue* shapeValue = this->shapeValue();
</span><span class="cx"> ASSERT(shapeValue);
</span><span class="lines">@@ -131,21 +130,21 @@
</span><span class="cx"> switch (shapeValue->type()) {
</span><span class="cx"> case ShapeValue::Shape:
</span><span class="cx"> ASSERT(shapeValue->shape());
</span><del>- m_shape = Shape::createShape(shapeValue->shape(), m_referenceBoxLogicalSize, writingMode, margin, padding);
</del><ins>+ m_shape = Shape::createShape(shapeValue->shape(), m_referenceBoxLogicalSize, writingMode, margin);
</ins><span class="cx"> break;
</span><span class="cx"> case ShapeValue::Image: {
</span><span class="cx"> Image* image;
</span><span class="cx"> LayoutRect imageRect;
</span><span class="cx"> getShapeImageAndRect(shapeValue, &m_renderer, m_referenceBoxLogicalSize, image, imageRect);
</span><span class="cx"> const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_referenceBoxLogicalSize);
</span><del>- m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect, marginRect, writingMode, margin, padding);
</del><ins>+ m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect, marginRect, writingMode, margin);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case ShapeValue::Box: {
</span><span class="cx"> // FIXME This does not properly compute the rounded corners as specified in all conditions.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=127982
</span><span class="cx"> const RoundedRect& shapeRect = m_renderer.style().getRoundedBorderFor(LayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), &(m_renderer.view()));
</span><del>- m_shape = Shape::createBoxShape(shapeRect, writingMode, margin, padding);
</del><ins>+ m_shape = Shape::createBoxShape(shapeRect, writingMode, margin);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case ShapeValue::Outside:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -414,8 +414,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>- if (rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin
- || rareNonInheritedData->m_shapePadding != other->rareNonInheritedData->m_shapePadding)
</del><ins>+ if (rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin)
</ins><span class="cx"> return true;
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -1509,10 +1509,6 @@
</span><span class="cx">
</span><span class="cx"> static ShapeValue* initialShapeOutside() { return 0; }
</span><span class="cx">
</span><del>- const Length& shapePadding() const { return rareNonInheritedData->m_shapePadding; }
- void setShapePadding(Length shapePadding) { SET_VAR(rareNonInheritedData, m_shapePadding, std::move(shapePadding)); }
- static Length initialShapePadding() { return Length(0, Fixed); }
-
</del><span class="cx"> const Length& shapeMargin() const { return rareNonInheritedData->m_shapeMargin; }
</span><span class="cx"> void setShapeMargin(Length shapeMargin) { SET_VAR(rareNonInheritedData, m_shapeMargin, std::move(shapeMargin)); }
</span><span class="cx"> static Length initialShapeMargin() { return Length(0, Fixed); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -58,7 +58,6 @@
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> , m_shapeOutside(RenderStyle::initialShapeOutside())
</span><span class="cx"> , m_shapeMargin(RenderStyle::initialShapeMargin())
</span><del>- , m_shapePadding(RenderStyle::initialShapePadding())
</del><span class="cx"> , m_shapeImageThreshold(RenderStyle::initialShapeImageThreshold())
</span><span class="cx"> #endif
</span><span class="cx"> , m_clipPath(RenderStyle::initialClipPath())
</span><span class="lines">@@ -131,7 +130,6 @@
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> , m_shapeOutside(o.m_shapeOutside)
</span><span class="cx"> , m_shapeMargin(o.m_shapeMargin)
</span><del>- , m_shapePadding(o.m_shapePadding)
</del><span class="cx"> , m_shapeImageThreshold(o.m_shapeImageThreshold)
</span><span class="cx"> #endif
</span><span class="cx"> , m_clipPath(o.m_clipPath)
</span><span class="lines">@@ -222,7 +220,6 @@
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> && m_shapeOutside == o.m_shapeOutside
</span><span class="cx"> && m_shapeMargin == o.m_shapeMargin
</span><del>- && m_shapePadding == o.m_shapePadding
</del><span class="cx"> && m_shapeImageThreshold == o.m_shapeImageThreshold
</span><span class="cx"> #endif
</span><span class="cx"> && m_clipPath == o.m_clipPath
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (166315 => 166316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2014-03-26 21:04:27 UTC (rev 166315)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2014-03-26 21:06:49 UTC (rev 166316)
</span><span class="lines">@@ -143,7 +143,6 @@
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> RefPtr<ShapeValue> m_shapeOutside;
</span><span class="cx"> Length m_shapeMargin;
</span><del>- Length m_shapePadding;
</del><span class="cx"> float m_shapeImageThreshold;
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>