Changeset 150696 in webkit


Ignore:
Timestamp:
May 25, 2013 5:51:00 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Path: clean up addPathForRoundedRect()
https://bugs.webkit.org/show_bug.cgi?id=116765

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-05-25
Reviewed by Andreas Kling.

Reorganize code that is a bit redundant.

No new tests, no behavior change.

  • platform/graphics/Path.cpp:

(WebCore::Path::addPathForRoundedRect):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150695 r150696  
     12013-05-25  Alberto Garcia  <agarcia@igalia.com>
     2
     3        Path: clean up addPathForRoundedRect()
     4        https://bugs.webkit.org/show_bug.cgi?id=116765
     5
     6        Reviewed by Andreas Kling.
     7
     8        Reorganize code that is a bit redundant.
     9
     10        No new tests, no behavior change.
     11
     12        * platform/graphics/Path.cpp:
     13        (WebCore::Path::addPathForRoundedRect):
     14
    1152013-05-25  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/Path.cpp

    r150646 r150696  
    146146void Path::addPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy strategy)
    147147{
    148     if (strategy == PreferBezierRoundedRect) {
    149         addBeziersForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
     148    if (strategy == PreferNativeRoundedRect) {
     149#if USE(CG) || PLATFORM(BLACKBERRY)
     150        platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
    150151        return;
     152#endif
    151153    }
    152154
    153 #if USE(CG) || PLATFORM(BLACKBERRY)
    154     platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
    155 #else
    156155    addBeziersForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
    157 #endif
    158156}
    159157
Note: See TracChangeset for help on using the changeset viewer.