Changeset 139353 in webkit


Ignore:
Timestamp:
Jan 10, 2013, 12:51:41 PM (13 years ago)
Author:
fmalita@chromium.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139352 r139353  
     12013-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
    1412013-01-10  Tommy Widenflycht  <tommyw@google.com>
    242
  • trunk/Source/WebCore/WebCore.order

    r137520 r139353  
    1429214292__ZN7WebCoreL39backgroundRectAdjustedForBleedAvoidanceEPNS_15GraphicsContextERKNS_7IntRectENS_24BackgroundBleedAvoidanceE
    1429314293__ZN7WebCore20RenderBoxModelObject24getBackgroundRoundedRectERKNS_7IntRectEPNS_13InlineFlowBoxEiibb
    14294 __ZN7WebCore15GraphicsContext18addRoundedRectClipERKNS_14RoundedRectE
     14294__ZN7WebCore15GraphicsContext15clipRoundedRectERKNS_14RoundedRectE
    1429514295__ZN3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_NS_6RefPtrINS1_5ImageEEEENS_18PairFirstExtractorIS7_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E16lookupForWritingIS2_NS_22IdentityHashTranslatorIS2_S7_SB_EEEES3_IPS7_bERKT_
    1429614296__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  
    606606
    607607#if !USE(SKIA)
    608 void GraphicsContext::addRoundedRectClip(const RoundedRect& rect)
     608void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
    609609{
    610610    if (paintingDisabled())
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r139138 r139353  
    344344        void clip(const IntRect&);
    345345        void clip(const FloatRect&);
    346         void addRoundedRectClip(const RoundedRect&);
     346        void clipRoundedRect(const RoundedRect&);
    347347        void clipOut(const IntRect&);
    348348        void clipOutRoundedRect(const RoundedRect&);
  • trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

    r139238 r139353  
    323323}
    324324
    325 void GraphicsContext::addRoundedRectClip(const RoundedRect& rect)
     325void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
    326326{
    327327    if (paintingDisabled())
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r139351 r139353  
    10851085        RoundedRect border = style()->getRoundedBorderFor(paintRect, view());
    10861086        stateSaver.save();
    1087         paintInfo.context->addRoundedRectClip(border);
     1087        paintInfo.context->clipRoundedRect(border);
    10881088        paintInfo.context->beginTransparencyLayer(1);
    10891089    }
     
    13781378    paintInfo.context->save();
    13791379    if (style()->hasBorderRadius())
    1380         paintInfo.context->addRoundedRectClip(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
     1380        paintInfo.context->clipRoundedRect(style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
    13811381    paintInfo.context->clip(clipRect);
    13821382    return true;
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r138757 r139353  
    671671{
    672672    if (clipRect.isRenderable())
    673         context->addRoundedRectClip(clipRect);
     673        context->clipRoundedRect(clipRect);
    674674    else {
    675675        // We create a rounded rect for each of the corners and clip it, while making sure we clip opposing corners together.
     
    678678            RoundedRect::Radii topCornerRadii;
    679679            topCornerRadii.setTopLeft(clipRect.radii().topLeft());
    680             context->addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));
     680            context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
    681681
    682682            IntRect bottomCorner(rect.x(), rect.y(), clipRect.rect().maxX() - rect.x(), clipRect.rect().maxY() - rect.y());
    683683            RoundedRect::Radii bottomCornerRadii;
    684684            bottomCornerRadii.setBottomRight(clipRect.radii().bottomRight());
    685             context->addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));
     685            context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
    686686        }
    687687
     
    690690            RoundedRect::Radii topCornerRadii;
    691691            topCornerRadii.setTopRight(clipRect.radii().topRight());
    692             context->addRoundedRectClip(RoundedRect(topCorner, topCornerRadii));
     692            context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
    693693
    694694            IntRect bottomCorner(clipRect.rect().x(), rect.y(), rect.maxX() - clipRect.rect().x(), clipRect.rect().maxY() - rect.y());
    695695            RoundedRect::Radii bottomCornerRadii;
    696696            bottomCornerRadii.setBottomLeft(clipRect.radii().bottomLeft());
    697             context->addRoundedRectClip(RoundedRect(bottomCorner, bottomCornerRadii));
     697            context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
    698698        }
    699699    }
     
    19931993        // Clip to the inner and outer radii rects.
    19941994        if (bleedAvoidance != BackgroundBleedUseTransparencyLayer)
    1995             graphicsContext->addRoundedRectClip(outerBorder);
     1995            graphicsContext->clipRoundedRect(outerBorder);
    19961996        // isRenderable() check avoids issue described in https://bugs.webkit.org/show_bug.cgi?id=38787
    19971997        // The inside will be clipped out later (in clipBorderSideForComplexInnerPath)
     
    20902090                includeLogicalLeftEdge, includeLogicalRightEdge);
    20912091           
    2092             graphicsContext->addRoundedRectClip(innerClip);
     2092            graphicsContext->clipRoundedRect(innerClip);
    20932093            drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
    20942094        }
     
    21412141            includeLogicalLeftEdge, includeLogicalRightEdge);
    21422142
    2143         graphicsContext->addRoundedRectClip(clipRect);
     2143        graphicsContext->clipRoundedRect(clipRect);
    21442144        drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s2, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
    21452145        return;
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r139054 r139353  
    33563356                LayoutPoint delta;
    33573357                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())));
    33593359        }
    33603360
  • trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp

    r137201 r139353  
    567567        // FIXME: make sure we do the right thing if css background-clip is set.
    568568        i.context->save();
    569         i.context->addRoundedRectClip(o->style()->getRoundedBorderFor(r));
     569        i.context->clipRoundedRect(o->style()->getRoundedBorderFor(r));
    570570    }
    571571    {
  • trunk/Source/WebCore/rendering/RenderThemeMacShared.mm

    r135003 r139353  
    11181118        GraphicsContextStateSaver stateSaver(*paintInfo.context);
    11191119        CGContextClipToRect(context, r);
    1120         paintInfo.context->addRoundedRectClip(border);
     1120        paintInfo.context->clipRoundedRect(border);
    11211121        context = cgContextContainer.context();
    11221122        CGContextDrawShading(context, mainShading.get());
     
    11261126        GraphicsContextStateSaver stateSaver(*paintInfo.context);
    11271127        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()));
    11291129        context = cgContextContainer.context();
    11301130        CGContextDrawShading(context, topShading.get());
     
    11341134        GraphicsContextStateSaver stateSaver(*paintInfo.context);
    11351135        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()));
    11371137        context = cgContextContainer.context();
    11381138        CGContextDrawShading(context, bottomShading.get());
     
    11421142        GraphicsContextStateSaver stateSaver(*paintInfo.context);
    11431143        CGContextClipToRect(context, r);
    1144         paintInfo.context->addRoundedRectClip(border);
     1144        paintInfo.context->clipRoundedRect(border);
    11451145        context = cgContextContainer.context();
    11461146        CGContextDrawShading(context, leftShading.get());
     
    13661366
    13671367    IntSize radius(trackRadius, trackRadius);
    1368     paintInfo.context->addRoundedRectClip(RoundedRect(bounds, radius, radius, radius, radius));
     1368    paintInfo.context->clipRoundedRect(RoundedRect(bounds, radius, radius, radius, radius));
    13691369    context = localContext.cgContext();
    13701370    CGContextDrawShading(context, mainShading.get());
  • trunk/Source/WebCore/rendering/RenderThemeSafari.cpp

    r132112 r139353  
    778778    paintInfo.context->save();
    779779    CGContextClipToRect(context, bound.rect());
    780     paintInfo.context->addRoundedRectClip(bound);
     780    paintInfo.context->clipRoundedRect(bound);
    781781    CGContextDrawShading(context, mainShading.get());
    782782    paintInfo.context->restore();
     
    784784    paintInfo.context->save();
    785785    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()));
    787787    CGContextDrawShading(context, topShading.get());
    788788    paintInfo.context->restore();
     
    791791        paintInfo.context->save();
    792792        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()));
    794794        CGContextDrawShading(context, bottomShading.get());
    795795        paintInfo.context->restore();
     
    798798    paintInfo.context->save();
    799799    CGContextClipToRect(context, bound.rect());
    800     paintInfo.context->addRoundedRectClip(bound);
     800    paintInfo.context->clipRoundedRect(bound);
    801801    CGContextDrawShading(context, leftShading.get());
    802802    CGContextDrawShading(context, rightShading.get());
     
    982982        mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.rect().x(),  bounds.rect().y()), CGPointMake(bounds.rect().x(), bounds.rect().maxY()), mainFunction.get(), false, false));
    983983
    984     paintInfo.context->addRoundedRectClip(bounds);
     984    paintInfo.context->clipRoundedRect(bounds);
    985985    CGContextDrawShading(context, mainShading.get());
    986986    paintInfo.context->restore();
  • trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp

    r126416 r139353  
    380380    IntRect cancelBounds(IntPoint(x, y), cancelSize);
    381381    paintInfo.context->save();
    382     paintInfo.context->addRoundedRectClip(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));
     382    paintInfo.context->clipRoundedRect(RoundedRect(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius));
    383383    paintInfo.context->fillRect(cancelBounds, buttonColor, ColorSpaceDeviceRGB);
    384384
Note: See TracChangeset for help on using the changeset viewer.