Diff
Modified: trunk/Source/WebCore/ChangeLog (139352 => 139353)
--- trunk/Source/WebCore/ChangeLog 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/ChangeLog 2013-01-10 20:51:41 UTC (rev 139353)
@@ -1,3 +1,43 @@
+2013-01-10 Florin Malita <fmal...@chromium.org>
+
+ Rename GraphicsContext::addRoundedRectClip
+ https://bugs.webkit.org/show_bug.cgi?id=106581
+
+ Reviewed by Simon Fraser.
+
+ This patch renames GraphicsContext::addRoundedRectClip to clipRoundedRect for consistency
+ with the other GC clipping methods.
+
+ No new tests: no functional changes.
+
+ * WebCore.order:
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::clipRoundedRect):
+ * platform/graphics/GraphicsContext.h:
+ (GraphicsContext):
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::clipRoundedRect):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBoxDecorations):
+ (WebCore::RenderBox::pushContentsClip):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
+ (WebCore::RenderBoxModelObject::paintBorder):
+ (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clipToRect):
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore):
+ (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
+ * rendering/RenderThemeMacShared.mm:
+ (WebCore::RenderThemeMacShared::paintMenuListButtonGradients):
+ (WebCore::RenderThemeMacShared::paintSliderTrack):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
+ (WebCore::RenderThemeSafari::paintSliderTrack):
+ * rendering/RenderThemeWinCE.cpp:
+ (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
+
2013-01-10 Tommy Widenflycht <tom...@google.com>
MediaStream API: Adding the new id attribute to MediaStream and MediaStreamTrack
Modified: trunk/Source/WebCore/WebCore.order (139352 => 139353)
--- trunk/Source/WebCore/WebCore.order 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/WebCore.order 2013-01-10 20:51:41 UTC (rev 139353)
@@ -14291,7 +14291,7 @@
__ZN7WebCore15GraphicsContext15fillRoundedRectERKNS_7IntRectERKNS_7IntSizeES6_S6_S6_RKNS_5ColorENS_10ColorSpaceE
__ZN7WebCoreL39backgroundRectAdjustedForBleedAvoidanceEPNS_15GraphicsContextERKNS_7IntRectENS_24BackgroundBleedAvoidanceE
__ZN7WebCore20RenderBoxModelObject24getBackgroundRoundedRectERKNS_7IntRectEPNS_13InlineFlowBoxEiibb
-__ZN7WebCore15GraphicsContext18addRoundedRectClipERKNS_14RoundedRectE
+__ZN7WebCore15GraphicsContext15clipRoundedRectERKNS_14RoundedRectE
__ZN3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_NS_6RefPtrINS1_5ImageEEEENS_18PairFirstExtractorIS7_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E16lookupForWritingIS2_NS_22IdentityHashTranslatorIS2_S7_SB_EEEES3_IPS7_bERKT_
__ZN3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_NS_6RefPtrINS1_5ImageEEEENS_18PairFirstExtractorIS7_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E3addIS2_S6_NS_17HashMapTranslatorIS7_SG_SB_EEEES3_INS_17HashTableIteratorIS2_S7_S9_SB_SG_SE_EEbERKT_RKT0_
__ZN3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_NS_6RefPtrINS1_5ImageEEEENS_18PairFirstExtractorIS7_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E4findIS2_NS_22IdentityHashTranslatorIS2_S7_SB_EEEENS_17HashTableIteratorIS2_S7_S9_SB_SG_SE_EERKT_
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (139352 => 139353)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -605,7 +605,7 @@
#endif
#if !USE(SKIA)
-void GraphicsContext::addRoundedRectClip(const RoundedRect& rect)
+void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
{
if (paintingDisabled())
return;
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (139352 => 139353)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2013-01-10 20:51:41 UTC (rev 139353)
@@ -343,7 +343,7 @@
void clip(const IntRect&);
void clip(const FloatRect&);
- void addRoundedRectClip(const RoundedRect&);
+ void clipRoundedRect(const RoundedRect&);
void clipOut(const IntRect&);
void clipOutRoundedRect(const RoundedRect&);
void clipPath(const Path&, WindRule);
Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (139352 => 139353)
--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -322,7 +322,7 @@
platformContext()->clipPath(*path.platformPath(), PlatformContextSkia::AntiAliased);
}
-void GraphicsContext::addRoundedRectClip(const RoundedRect& rect)
+void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
{
if (paintingDisabled())
return;
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -1084,7 +1084,7 @@
// beginning the layer).
RoundedRect border = style()->getRoundedBorderFor(paintRect, view());
stateSaver.save();
- paintInfo.context->addRoundedRectClip(border);
+ paintInfo.context->clipRoundedRect(border);
paintInfo.context->beginTransparencyLayer(1);
}
@@ -1377,7 +1377,7 @@
IntRect clipRect = pixelSnappedIntRect(isControlClip ? controlClipRect(accumulatedOffset) : overflowClipRect(accumulatedOffset, paintInfo.renderRegion));
paintInfo.context->save();
if (style()->hasBorderRadius())
- paintInfo.context->addRoundedRectClip(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
+ paintInfo.context->clipRoundedRect(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
paintInfo.context->clip(clipRect);
return true;
}
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -670,31 +670,31 @@
void RenderBoxModelObject::clipRoundedInnerRect(GraphicsContext * context, const LayoutRect& rect, const RoundedRect& clipRect)
{
if (clipRect.isRenderable())
- context->addRoundedRectClip(clipRect);
+ context->clipRoundedRect(clipRect);
else {
// We create a rounded rect for each of the corners and clip it, while making sure we clip opposing corners together.
if (!clipRect.radii().topLeft().isEmpty() || !clipRect.radii().bottomRight().isEmpty()) {
IntRect topCorner(clipRect.rect().x(), clipRect.rect().y(), rect.maxX() - clipRect.rect().x(), rect.maxY() - clipRect.rect().y());
RoundedRect::Radii topCornerRadii;
topCornerRadii.setTopLeft(clipRect.radii().topLeft());
- context->addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));
+ context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
IntRect bottomCorner(rect.x(), rect.y(), clipRect.rect().maxX() - rect.x(), clipRect.rect().maxY() - rect.y());
RoundedRect::Radii bottomCornerRadii;
bottomCornerRadii.setBottomRight(clipRect.radii().bottomRight());
- context->addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));
+ context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
}
if (!clipRect.radii().topRight().isEmpty() || !clipRect.radii().bottomLeft().isEmpty()) {
IntRect topCorner(rect.x(), clipRect.rect().y(), clipRect.rect().maxX() - rect.x(), rect.maxY() - clipRect.rect().y());
RoundedRect::Radii topCornerRadii;
topCornerRadii.setTopRight(clipRect.radii().topRight());
- context->addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));
+ context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
IntRect bottomCorner(clipRect.rect().x(), rect.y(), rect.maxX() - clipRect.rect().x(), clipRect.rect().maxY() - rect.y());
RoundedRect::Radii bottomCornerRadii;
bottomCornerRadii.setBottomLeft(clipRect.radii().bottomLeft());
- context->addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));
+ context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
}
}
}
@@ -1992,7 +1992,7 @@
if (clipToOuterBorder) {
// Clip to the inner and outer radii rects.
if (bleedAvoidance != BackgroundBleedUseTransparencyLayer)
- graphicsContext->addRoundedRectClip(outerBorder);
+ graphicsContext->clipRoundedRect(outerBorder);
// isRenderable() check avoids issue described in https://bugs.webkit.org/show_bug.cgi?id=38787
// The inside will be clipped out later (in clipBorderSideForComplexInnerPath)
if (innerBorder.isRenderable())
@@ -2089,7 +2089,7 @@
innerBorderTopWidth, innerBorderBottomWidth, innerBorderLeftWidth, innerBorderRightWidth,
includeLogicalLeftEdge, includeLogicalRightEdge);
- graphicsContext->addRoundedRectClip(innerClip);
+ graphicsContext->clipRoundedRect(innerClip);
drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
}
@@ -2140,7 +2140,7 @@
topWidth, bottomWidth, leftWidth, rightWidth,
includeLogicalLeftEdge, includeLogicalRightEdge);
- graphicsContext->addRoundedRectClip(clipRect);
+ graphicsContext->clipRoundedRect(clipRect);
drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s2, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
return;
}
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -3355,7 +3355,7 @@
if (layer->renderer()->hasOverflowClip() && layer->renderer()->style()->hasBorderRadius() && inContainingBlockChain(this, layer)) {
LayoutPoint delta;
layer->convertToLayerCoords(rootLayer, delta);
- context->addRoundedRectClip(layer->renderer()->style()->getRoundedInnerBorderFor(LayoutRect(delta, layer->size())));
+ context->clipRoundedRect(layer->renderer()->style()->getRoundedInnerBorderFor(LayoutRect(delta, layer->size())));
}
if (layer == rootLayer)
Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -566,7 +566,7 @@
// background (themed or filled) appropriately.
// FIXME: make sure we do the right thing if css background-clip is set.
i.context->save();
- i.context->addRoundedRectClip(o->style()->getRoundedBorderFor(r));
+ i.context->clipRoundedRect(o->style()->getRoundedBorderFor(r));
}
{
const ThemeData& themeData = getThemeData(o);
Modified: trunk/Source/WebCore/rendering/RenderThemeMacShared.mm (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderThemeMacShared.mm 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderThemeMacShared.mm 2013-01-10 20:51:41 UTC (rev 139353)
@@ -1117,7 +1117,7 @@
{
GraphicsContextStateSaver stateSaver(*paintInfo.context);
CGContextClipToRect(context, r);
- paintInfo.context->addRoundedRectClip(border);
+ paintInfo.context->clipRoundedRect(border);
context = cgContextContainer.context();
CGContextDrawShading(context, mainShading.get());
}
@@ -1125,7 +1125,7 @@
{
GraphicsContextStateSaver stateSaver(*paintInfo.context);
CGContextClipToRect(context, topGradient);
- paintInfo.context->addRoundedRectClip(RoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize()));
+ paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize()));
context = cgContextContainer.context();
CGContextDrawShading(context, topShading.get());
}
@@ -1133,7 +1133,7 @@
if (!bottomGradient.isEmpty()) {
GraphicsContextStateSaver stateSaver(*paintInfo.context);
CGContextClipToRect(context, bottomGradient);
- paintInfo.context->addRoundedRectClip(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight()));
+ paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight()));
context = cgContextContainer.context();
CGContextDrawShading(context, bottomShading.get());
}
@@ -1141,7 +1141,7 @@
{
GraphicsContextStateSaver stateSaver(*paintInfo.context);
CGContextClipToRect(context, r);
- paintInfo.context->addRoundedRectClip(border);
+ paintInfo.context->clipRoundedRect(border);
context = cgContextContainer.context();
CGContextDrawShading(context, leftShading.get());
CGContextDrawShading(context, rightShading.get());
@@ -1365,7 +1365,7 @@
mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(), bounds.y()), CGPointMake(bounds.x(), bounds.maxY()), mainFunction.get(), false, false));
IntSize radius(trackRadius, trackRadius);
- paintInfo.context->addRoundedRectClip(RoundedRect(bounds, radius, radius, radius, radius));
+ paintInfo.context->clipRoundedRect(RoundedRect(bounds, radius, radius, radius, radius));
context = localContext.cgContext();
CGContextDrawShading(context, mainShading.get());
Modified: trunk/Source/WebCore/rendering/RenderThemeSafari.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderThemeSafari.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderThemeSafari.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -777,27 +777,27 @@
RetainPtr<CGShadingRef> rightShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(r.maxX(), r.y()), CGPointMake(r.maxX() - radius, r.y()), mainFunction.get(), false, false));
paintInfo.context->save();
CGContextClipToRect(context, bound.rect());
- paintInfo.context->addRoundedRectClip(bound);
+ paintInfo.context->clipRoundedRect(bound);
CGContextDrawShading(context, mainShading.get());
paintInfo.context->restore();
paintInfo.context->save();
CGContextClipToRect(context, topGradient);
- paintInfo.context->addRoundedRectClip(RoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize()));
+ paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize()));
CGContextDrawShading(context, topShading.get());
paintInfo.context->restore();
if (!bottomGradient.isEmpty()) {
paintInfo.context->save();
CGContextClipToRect(context, bottomGradient);
- paintInfo.context->addRoundedRectClip(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight()));
+ paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight()));
CGContextDrawShading(context, bottomShading.get());
paintInfo.context->restore();
}
paintInfo.context->save();
CGContextClipToRect(context, bound.rect());
- paintInfo.context->addRoundedRectClip(bound);
+ paintInfo.context->clipRoundedRect(bound);
CGContextDrawShading(context, leftShading.get());
CGContextDrawShading(context, rightShading.get());
paintInfo.context->restore();
@@ -981,7 +981,7 @@
else
mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.rect().x(), bounds.rect().y()), CGPointMake(bounds.rect().x(), bounds.rect().maxY()), mainFunction.get(), false, false));
- paintInfo.context->addRoundedRectClip(bounds);
+ paintInfo.context->clipRoundedRect(bounds);
CGContextDrawShading(context, mainShading.get());
paintInfo.context->restore();
Modified: trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp (139352 => 139353)
--- trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2013-01-10 20:44:15 UTC (rev 139352)
+++ trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2013-01-10 20:51:41 UTC (rev 139353)
@@ -379,7 +379,7 @@
int y = r.y() + (r.height() - cancelSize.height()) / 2 + 1;
IntRect cancelBounds(IntPoint(x, y), cancelSize);
paintInfo.context->save();
- paintInfo.context->addRoundedRectClip(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));
+ paintInfo.context->clipRoundedRect(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));
paintInfo.context->fillRect(cancelBounds, buttonColor, ColorSpaceDeviceRGB);
// Draw the 'x'