Changeset 139353 in webkit
- Timestamp:
- Jan 10, 2013, 12:51:41 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r139352 r139353 1 2013-01-10 Florin Malita <fmalita@chromium.org> 2 3 Rename GraphicsContext::addRoundedRectClip 4 https://bugs.webkit.org/show_bug.cgi?id=106581 5 6 Reviewed by Simon Fraser. 7 8 This patch renames GraphicsContext::addRoundedRectClip to clipRoundedRect for consistency 9 with the other GC clipping methods. 10 11 No new tests: no functional changes. 12 13 * WebCore.order: 14 * platform/graphics/GraphicsContext.cpp: 15 (WebCore::GraphicsContext::clipRoundedRect): 16 * platform/graphics/GraphicsContext.h: 17 (GraphicsContext): 18 * platform/graphics/skia/GraphicsContextSkia.cpp: 19 (WebCore::GraphicsContext::clipRoundedRect): 20 * rendering/RenderBox.cpp: 21 (WebCore::RenderBox::paintBoxDecorations): 22 (WebCore::RenderBox::pushContentsClip): 23 * rendering/RenderBoxModelObject.cpp: 24 (WebCore::RenderBoxModelObject::clipRoundedInnerRect): 25 (WebCore::RenderBoxModelObject::paintBorder): 26 (WebCore::RenderBoxModelObject::drawBoxSideFromPath): 27 * rendering/RenderLayer.cpp: 28 (WebCore::RenderLayer::clipToRect): 29 * rendering/RenderThemeChromiumWin.cpp: 30 (WebCore): 31 (WebCore::RenderThemeChromiumWin::paintTextFieldInternal): 32 * rendering/RenderThemeMacShared.mm: 33 (WebCore::RenderThemeMacShared::paintMenuListButtonGradients): 34 (WebCore::RenderThemeMacShared::paintSliderTrack): 35 * rendering/RenderThemeSafari.cpp: 36 (WebCore::RenderThemeSafari::paintMenuListButtonGradients): 37 (WebCore::RenderThemeSafari::paintSliderTrack): 38 * rendering/RenderThemeWinCE.cpp: 39 (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton): 40 1 41 2013-01-10 Tommy Widenflycht <tommyw@google.com> 2 42 -
trunk/Source/WebCore/WebCore.order
r137520 r139353 14292 14292 __ZN7WebCoreL39backgroundRectAdjustedForBleedAvoidanceEPNS_15GraphicsContextERKNS_7IntRectENS_24BackgroundBleedAvoidanceE 14293 14293 __ZN7WebCore20RenderBoxModelObject24getBackgroundRoundedRectERKNS_7IntRectEPNS_13InlineFlowBoxEiibb 14294 __ZN7WebCore15GraphicsContext1 8addRoundedRectClipERKNS_14RoundedRectE14294 __ZN7WebCore15GraphicsContext15clipRoundedRectERKNS_14RoundedRectE 14295 14295 __ZN3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_NS_6RefPtrINS1_5ImageEEEENS_18PairFirstExtractorIS7_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E16lookupForWritingIS2_NS_22IdentityHashTranslatorIS2_S7_SB_EEEES3_IPS7_bERKT_ 14296 14296 __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_ -
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
r139238 r139353 606 606 607 607 #if !USE(SKIA) 608 void GraphicsContext:: addRoundedRectClip(const RoundedRect& rect)608 void GraphicsContext::clipRoundedRect(const RoundedRect& rect) 609 609 { 610 610 if (paintingDisabled()) -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r139138 r139353 344 344 void clip(const IntRect&); 345 345 void clip(const FloatRect&); 346 void addRoundedRectClip(const RoundedRect&);346 void clipRoundedRect(const RoundedRect&); 347 347 void clipOut(const IntRect&); 348 348 void clipOutRoundedRect(const RoundedRect&); -
trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r139238 r139353 323 323 } 324 324 325 void GraphicsContext:: addRoundedRectClip(const RoundedRect& rect)325 void GraphicsContext::clipRoundedRect(const RoundedRect& rect) 326 326 { 327 327 if (paintingDisabled()) -
trunk/Source/WebCore/rendering/RenderBox.cpp
r139351 r139353 1085 1085 RoundedRect border = style()->getRoundedBorderFor(paintRect, view()); 1086 1086 stateSaver.save(); 1087 paintInfo.context-> addRoundedRectClip(border);1087 paintInfo.context->clipRoundedRect(border); 1088 1088 paintInfo.context->beginTransparencyLayer(1); 1089 1089 } … … 1378 1378 paintInfo.context->save(); 1379 1379 if (style()->hasBorderRadius()) 1380 paintInfo.context-> addRoundedRectClip(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));1380 paintInfo.context->clipRoundedRect(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size()))); 1381 1381 paintInfo.context->clip(clipRect); 1382 1382 return true; -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r138757 r139353 671 671 { 672 672 if (clipRect.isRenderable()) 673 context-> addRoundedRectClip(clipRect);673 context->clipRoundedRect(clipRect); 674 674 else { 675 675 // We create a rounded rect for each of the corners and clip it, while making sure we clip opposing corners together. … … 678 678 RoundedRect::Radii topCornerRadii; 679 679 topCornerRadii.setTopLeft(clipRect.radii().topLeft()); 680 context-> addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));680 context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii)); 681 681 682 682 IntRect bottomCorner(rect.x(), rect.y(), clipRect.rect().maxX() - rect.x(), clipRect.rect().maxY() - rect.y()); 683 683 RoundedRect::Radii bottomCornerRadii; 684 684 bottomCornerRadii.setBottomRight(clipRect.radii().bottomRight()); 685 context-> addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));685 context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii)); 686 686 } 687 687 … … 690 690 RoundedRect::Radii topCornerRadii; 691 691 topCornerRadii.setTopRight(clipRect.radii().topRight()); 692 context-> addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));692 context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii)); 693 693 694 694 IntRect bottomCorner(clipRect.rect().x(), rect.y(), rect.maxX() - clipRect.rect().x(), clipRect.rect().maxY() - rect.y()); 695 695 RoundedRect::Radii bottomCornerRadii; 696 696 bottomCornerRadii.setBottomLeft(clipRect.radii().bottomLeft()); 697 context-> addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));697 context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii)); 698 698 } 699 699 } … … 1993 1993 // Clip to the inner and outer radii rects. 1994 1994 if (bleedAvoidance != BackgroundBleedUseTransparencyLayer) 1995 graphicsContext-> addRoundedRectClip(outerBorder);1995 graphicsContext->clipRoundedRect(outerBorder); 1996 1996 // isRenderable() check avoids issue described in https://bugs.webkit.org/show_bug.cgi?id=38787 1997 1997 // The inside will be clipped out later (in clipBorderSideForComplexInnerPath) … … 2090 2090 includeLogicalLeftEdge, includeLogicalRightEdge); 2091 2091 2092 graphicsContext-> addRoundedRectClip(innerClip);2092 graphicsContext->clipRoundedRect(innerClip); 2093 2093 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); 2094 2094 } … … 2141 2141 includeLogicalLeftEdge, includeLogicalRightEdge); 2142 2142 2143 graphicsContext-> addRoundedRectClip(clipRect);2143 graphicsContext->clipRoundedRect(clipRect); 2144 2144 drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s2, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); 2145 2145 return; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r139054 r139353 3356 3356 LayoutPoint delta; 3357 3357 layer->convertToLayerCoords(rootLayer, delta); 3358 context-> addRoundedRectClip(layer->renderer()->style()->getRoundedInnerBorderFor(LayoutRect(delta, layer->size())));3358 context->clipRoundedRect(layer->renderer()->style()->getRoundedInnerBorderFor(LayoutRect(delta, layer->size()))); 3359 3359 } 3360 3360 -
trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
r137201 r139353 567 567 // FIXME: make sure we do the right thing if css background-clip is set. 568 568 i.context->save(); 569 i.context-> addRoundedRectClip(o->style()->getRoundedBorderFor(r));569 i.context->clipRoundedRect(o->style()->getRoundedBorderFor(r)); 570 570 } 571 571 { -
trunk/Source/WebCore/rendering/RenderThemeMacShared.mm
r135003 r139353 1118 1118 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1119 1119 CGContextClipToRect(context, r); 1120 paintInfo.context-> addRoundedRectClip(border);1120 paintInfo.context->clipRoundedRect(border); 1121 1121 context = cgContextContainer.context(); 1122 1122 CGContextDrawShading(context, mainShading.get()); … … 1126 1126 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1127 1127 CGContextClipToRect(context, topGradient); 1128 paintInfo.context-> addRoundedRectClip(RoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize()));1128 paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize())); 1129 1129 context = cgContextContainer.context(); 1130 1130 CGContextDrawShading(context, topShading.get()); … … 1134 1134 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1135 1135 CGContextClipToRect(context, bottomGradient); 1136 paintInfo.context-> addRoundedRectClip(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight()));1136 paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight())); 1137 1137 context = cgContextContainer.context(); 1138 1138 CGContextDrawShading(context, bottomShading.get()); … … 1142 1142 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1143 1143 CGContextClipToRect(context, r); 1144 paintInfo.context-> addRoundedRectClip(border);1144 paintInfo.context->clipRoundedRect(border); 1145 1145 context = cgContextContainer.context(); 1146 1146 CGContextDrawShading(context, leftShading.get()); … … 1366 1366 1367 1367 IntSize radius(trackRadius, trackRadius); 1368 paintInfo.context-> addRoundedRectClip(RoundedRect(bounds, radius, radius, radius, radius));1368 paintInfo.context->clipRoundedRect(RoundedRect(bounds, radius, radius, radius, radius)); 1369 1369 context = localContext.cgContext(); 1370 1370 CGContextDrawShading(context, mainShading.get()); -
trunk/Source/WebCore/rendering/RenderThemeSafari.cpp
r132112 r139353 778 778 paintInfo.context->save(); 779 779 CGContextClipToRect(context, bound.rect()); 780 paintInfo.context-> addRoundedRectClip(bound);780 paintInfo.context->clipRoundedRect(bound); 781 781 CGContextDrawShading(context, mainShading.get()); 782 782 paintInfo.context->restore(); … … 784 784 paintInfo.context->save(); 785 785 CGContextClipToRect(context, topGradient); 786 paintInfo.context-> addRoundedRectClip(RoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize()));786 paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize())); 787 787 CGContextDrawShading(context, topShading.get()); 788 788 paintInfo.context->restore(); … … 791 791 paintInfo.context->save(); 792 792 CGContextClipToRect(context, bottomGradient); 793 paintInfo.context-> addRoundedRectClip(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight()));793 paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight())); 794 794 CGContextDrawShading(context, bottomShading.get()); 795 795 paintInfo.context->restore(); … … 798 798 paintInfo.context->save(); 799 799 CGContextClipToRect(context, bound.rect()); 800 paintInfo.context-> addRoundedRectClip(bound);800 paintInfo.context->clipRoundedRect(bound); 801 801 CGContextDrawShading(context, leftShading.get()); 802 802 CGContextDrawShading(context, rightShading.get()); … … 982 982 mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.rect().x(), bounds.rect().y()), CGPointMake(bounds.rect().x(), bounds.rect().maxY()), mainFunction.get(), false, false)); 983 983 984 paintInfo.context-> addRoundedRectClip(bounds);984 paintInfo.context->clipRoundedRect(bounds); 985 985 CGContextDrawShading(context, mainShading.get()); 986 986 paintInfo.context->restore(); -
trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp
r126416 r139353 380 380 IntRect cancelBounds(IntPoint(x, y), cancelSize); 381 381 paintInfo.context->save(); 382 paintInfo.context-> addRoundedRectClip(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));382 paintInfo.context->clipRoundedRect(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius)); 383 383 paintInfo.context->fillRect(cancelBounds, buttonColor, ColorSpaceDeviceRGB); 384 384
Note:
See TracChangeset
for help on using the changeset viewer.