From ab0a50979b9eb4dfa3320eff7e187e41efedf7a9 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 8 Aug 2014 14:30:41 +0200 Subject: Update Chromium to beta version 37.0.2062.68 Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi --- .../WebKit/Source/core/rendering/shapes/Shape.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h') diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h index de9aef9f99d..fb649957671 100644 --- a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h +++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h @@ -33,6 +33,8 @@ #include "core/rendering/style/BasicShapes.h" #include "core/rendering/style/StyleImage.h" #include "platform/geometry/LayoutRect.h" +#include "platform/geometry/RoundedRect.h" +#include "platform/graphics/Path.h" #include "platform/text/WritingMode.h" #include "wtf/PassOwnPtr.h" #include "wtf/Vector.h" @@ -60,24 +62,25 @@ typedef Vector SegmentList; class Shape { public: - static PassOwnPtr createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding); - static PassOwnPtr createShape(const StyleImage*, float threshold, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding); - static PassOwnPtr createLayoutBoxShape(const LayoutSize& logicalBoxSize, WritingMode, const Length& margin, const Length& padding); + struct DisplayPaths { + Path shape; + Path marginShape; + }; + static PassOwnPtr createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, float margin); + static PassOwnPtr createRasterShape(Image*, float threshold, const LayoutRect& imageRect, const LayoutRect& marginRect, WritingMode, float margin); + static PassOwnPtr createLayoutBoxShape(const RoundedRect&, WritingMode, float margin); virtual ~Shape() { } virtual LayoutRect shapeMarginLogicalBoundingBox() const = 0; - virtual LayoutRect shapePaddingLogicalBoundingBox() const = 0; virtual bool isEmpty() const = 0; - virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0; virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const = 0; - virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const = 0; + bool lineOverlapsShapeMarginBounds(LayoutUnit lineTop, LayoutUnit lineHeight) const { return lineOverlapsBoundingBox(lineTop, lineHeight, shapeMarginLogicalBoundingBox()); } - bool lineOverlapsShapePaddingBounds(LayoutUnit lineTop, LayoutUnit lineHeight) const { return lineOverlapsBoundingBox(lineTop, lineHeight, shapePaddingLogicalBoundingBox()); } + virtual void buildDisplayPaths(DisplayPaths&) const = 0; protected: float shapeMargin() const { return m_margin; } - float shapePadding() const { return m_padding; } private: bool lineOverlapsBoundingBox(LayoutUnit lineTop, LayoutUnit lineHeight, const LayoutRect& rect) const @@ -89,7 +92,6 @@ private: WritingMode m_writingMode; float m_margin; - float m_padding; }; } // namespace WebCore -- cgit v1.2.3