Diff
Modified: trunk/Source/WebCore/ChangeLog (112474 => 112475)
--- trunk/Source/WebCore/ChangeLog 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/ChangeLog 2012-03-28 23:57:16 UTC (rev 112475)
@@ -1,3 +1,28 @@
+2012-03-28 Emil A Eklund <[email protected]>
+
+ Change FilterOperations::getOutsets to use integers
+ https://bugs.webkit.org/show_bug.cgi?id=82535
+
+ Reviewed by Eric Seidel.
+
+ FilterOperations::getOutsets calculates the outsets using integers and
+ the values are guranteed to be set to full-pixel values. By changing the
+ function signature we communicate this fact better and avoid unnecessary
+ type conversions in some cases.
+
+ No new tests.
+
+ * platform/graphics/filters/FilterOperations.cpp:
+ (WebCore::FilterOperations::getOutsets):
+ * platform/graphics/filters/FilterOperations.h:
+ (FilterOperations):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeRectForRepaint):
+ (WebCore::RenderBox::addVisualEffectOverflow):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::computeRectForRepaint):
+ * rendering/style/RenderStyle.h:
+
2012-03-28 Nate Chapin <[email protected]>
Remove dispatchDidLoadMainResource callback, since no
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp (112474 => 112475)
--- trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp 2012-03-28 23:57:16 UTC (rev 112475)
@@ -97,7 +97,7 @@
return false;
}
-void FilterOperations::getOutsets(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const
+void FilterOperations::getOutsets(int& top, int& right, int& bottom, int& left) const
{
top = 0;
right = 0;
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperations.h (112474 => 112475)
--- trunk/Source/WebCore/platform/graphics/filters/FilterOperations.h 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperations.h 2012-03-28 23:57:16 UTC (rev 112475)
@@ -64,7 +64,7 @@
bool operationsMatch(const FilterOperations&) const;
bool hasOutsets() const;
- void getOutsets(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
+ void getOutsets(int& top, int& right, int& bottom, int& left) const;
bool hasFilterThatAffectsOpacity() const;
bool hasFilterThatMovesPixels() const;
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (112474 => 112475)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 23:57:16 UTC (rev 112475)
@@ -1645,10 +1645,10 @@
#if ENABLE(CSS_FILTERS)
if (styleToUse->hasFilterOutsets()) {
- LayoutUnit topOutset;
- LayoutUnit rightOutset;
- LayoutUnit bottomOutset;
- LayoutUnit leftOutset;
+ int topOutset;
+ int rightOutset;
+ int bottomOutset;
+ int leftOutset;
styleToUse->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
rect.move(-leftOutset, -topOutset);
rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
@@ -3683,10 +3683,10 @@
#if ENABLE(CSS_FILTERS)
// Compute any filter outset overflow.
if (style()->hasFilterOutsets()) {
- LayoutUnit filterOutsetLeft;
- LayoutUnit filterOutsetRight;
- LayoutUnit filterOutsetTop;
- LayoutUnit filterOutsetBottom;
+ int filterOutsetLeft;
+ int filterOutsetRight;
+ int filterOutsetTop;
+ int filterOutsetBottom;
style()->getFilterOutsets(filterOutsetTop, filterOutsetRight, filterOutsetBottom, filterOutsetLeft);
overflowMinX = min(overflowMinX, borderBox.x() - filterOutsetLeft);
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (112474 => 112475)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2012-03-28 23:57:16 UTC (rev 112475)
@@ -1114,10 +1114,10 @@
#if ENABLE(CSS_FILTERS)
if (style()->hasFilterOutsets()) {
- LayoutUnit topOutset;
- LayoutUnit rightOutset;
- LayoutUnit bottomOutset;
- LayoutUnit leftOutset;
+ int topOutset;
+ int rightOutset;
+ int bottomOutset;
+ int leftOutset;
style()->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
rect.move(-leftOutset, -topOutset);
rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (112474 => 112475)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-28 23:55:31 UTC (rev 112474)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-28 23:57:16 UTC (rev 112475)
@@ -465,7 +465,7 @@
}
#if ENABLE(CSS_FILTERS)
- void getFilterOutsets(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const
+ void getFilterOutsets(int& top, int& right, int& bottom, int& left) const
{
if (hasFilter())
filter().getOutsets(top, right, bottom, left);