Title: [112756] trunk/Source/WebCore
- Revision
- 112756
- Author
- e...@chromium.org
- Date
- 2012-03-30 17:52:52 -0700 (Fri, 30 Mar 2012)
Log Message
Fix return type for virtual borderBoundingBox method
https://bugs.webkit.org/show_bug.cgi?id=82561
Reviewed by Eric Seidel.
No new tests, no change in functionality.
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoxRect):
Rename pixelSnappedBorderBoxRect to borderBoxRect and remove LayoutRect
version of same as we always want to use the pixel snapped version to
ensure proper rounding and alignment to device pixels.
(The way this rect is pixel snapped, using the m_frameRect location,
makes it hard for calling code to take the subpixel rect and correctly
snap it).
(WebCore::RenderBox::borderBoundingBox):
* rendering/RenderBoxModelObject.h:
Change pure virtual definition of borderBoundingBox to return an IntRect
to match implementation in RenderBox.
(RenderBoxModelObject):
* rendering/RenderInline.h:
(WebCore::RenderInline::borderBoundingBox):
Change overloaded method to IntRect to match RenderBox implementation.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112755 => 112756)
--- trunk/Source/WebCore/ChangeLog 2012-03-31 00:46:04 UTC (rev 112755)
+++ trunk/Source/WebCore/ChangeLog 2012-03-31 00:52:52 UTC (rev 112756)
@@ -1,3 +1,33 @@
+2012-03-30 Emil A Eklund <e...@chromium.org>
+
+ Fix return type for virtual borderBoundingBox method
+ https://bugs.webkit.org/show_bug.cgi?id=82561
+
+ Reviewed by Eric Seidel.
+
+ No new tests, no change in functionality.
+
+ * editing/DeleteButtonController.cpp:
+ (WebCore::isDeletableElement):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::borderBoxRect):
+ Rename pixelSnappedBorderBoxRect to borderBoxRect and remove LayoutRect
+ version of same as we always want to use the pixel snapped version to
+ ensure proper rounding and alignment to device pixels.
+ (The way this rect is pixel snapped, using the m_frameRect location,
+ makes it hard for calling code to take the subpixel rect and correctly
+ snap it).
+
+ (WebCore::RenderBox::borderBoundingBox):
+ * rendering/RenderBoxModelObject.h:
+ Change pure virtual definition of borderBoundingBox to return an IntRect
+ to match implementation in RenderBox.
+
+ (RenderBoxModelObject):
+ * rendering/RenderInline.h:
+ (WebCore::RenderInline::borderBoundingBox):
+ Change overloaded method to IntRect to match RenderBox implementation.
+
2012-03-30 Bear Travis <betra...@adobe.com>
shape-inside and shape-outside are not in the list of computed style properties
Modified: trunk/Source/WebCore/editing/DeleteButtonController.cpp (112755 => 112756)
--- trunk/Source/WebCore/editing/DeleteButtonController.cpp 2012-03-31 00:46:04 UTC (rev 112755)
+++ trunk/Source/WebCore/editing/DeleteButtonController.cpp 2012-03-31 00:52:52 UTC (rev 112756)
@@ -92,7 +92,7 @@
return false;
RenderBox* box = toRenderBox(renderer);
- LayoutRect borderBoundingBox = box->borderBoundingBox();
+ IntRect borderBoundingBox = box->borderBoundingBox();
if (borderBoundingBox.width() < minimumWidth || borderBoundingBox.height() < minimumHeight)
return false;
Modified: trunk/Source/WebCore/rendering/RenderBox.h (112755 => 112756)
--- trunk/Source/WebCore/rendering/RenderBox.h 2012-03-31 00:46:04 UTC (rev 112755)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2012-03-31 00:52:52 UTC (rev 112756)
@@ -132,10 +132,8 @@
LayoutRect frameRect() const { return m_frameRect; }
void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; }
- // FIXME: We shouldn't be returning this as a LayoutRect, since it loses its position and won't properly pixel snap.
- LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); }
- IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), IntSize(m_frameRect.pixelSnappedWidth(), m_frameRect.pixelSnappedHeight())); }
- virtual IntRect borderBoundingBox() const { return pixelSnappedBorderBoxRect(); }
+ IntRect borderBoxRect() const { return IntRect(IntPoint(), IntSize(m_frameRect.pixelSnappedWidth(), m_frameRect.pixelSnappedHeight())); }
+ virtual IntRect borderBoundingBox() const { return borderBoxRect(); }
// The content area of the box (excludes padding and border).
LayoutRect contentBoxRect(PaddingOptions paddingOption = ExcludeIntrinsicPadding) const { return LayoutRect(borderLeft() + paddingLeft(paddingOption), borderTop() + paddingTop(paddingOption), contentWidth(paddingOption), contentHeight(paddingOption)); }
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (112755 => 112756)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2012-03-31 00:46:04 UTC (rev 112755)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2012-03-31 00:52:52 UTC (rev 112756)
@@ -77,7 +77,7 @@
virtual bool requiresLayer() const { return isRoot() || isPositioned() || isRelPositioned() || isTransparent() || hasTransform() || hasHiddenBackface() || hasMask() || hasReflection() || hasFilter() || style()->specifiesColumns(); }
// This will work on inlines to return the bounding box of all of the lines' border boxes.
- virtual LayoutRect borderBoundingBox() const = 0;
+ virtual IntRect borderBoundingBox() const = 0;
// Virtual since table cells override
virtual LayoutUnit paddingTop(PaddingOptions = IncludeIntrinsicPadding) const;
Modified: trunk/Source/WebCore/rendering/RenderInline.h (112755 => 112756)
--- trunk/Source/WebCore/rendering/RenderInline.h 2012-03-31 00:46:04 UTC (rev 112755)
+++ trunk/Source/WebCore/rendering/RenderInline.h 2012-03-31 00:52:52 UTC (rev 112756)
@@ -134,10 +134,10 @@
virtual VisiblePosition positionForPoint(const LayoutPoint&);
- virtual LayoutRect borderBoundingBox() const
+ virtual IntRect borderBoundingBox() const
{
- LayoutRect boundingBox = linesBoundingBox();
- return LayoutRect(0, 0, boundingBox.width(), boundingBox.height());
+ IntRect boundingBox = linesBoundingBox();
+ return IntRect(0, 0, boundingBox.width(), boundingBox.height());
}
virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes