Bug 125995 - [CSS Shapes] Simplify FloatRoundedRect, BoxShape construction
Summary: [CSS Shapes] Simplify FloatRoundedRect, BoxShape construction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hans Muller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 09:48 PST by Hans Muller
Modified: 2014-01-03 08:53 PST (History)
5 users (show)

See Also:


Attachments
Patch. (14.76 KB, patch)
2013-12-19 12:34 PST, Hans Muller
kling: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch (14.77 KB, patch)
2014-01-03 08:18 PST, Hans Muller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Muller 2013-12-19 09:48:39 PST
Just a small cleanup suggested by Eric Seidel.  In Shape.cpp::createShape() (creates a BoxShape), replace this:

     FloatRoundedRect bounds(rect, roundedRect.radii().topLeft(), roundedRect.radii().topRight(), roundedRect.radii().bottomLeft(), roundedRect.radii().bottomRight());

with this:

    FloatRoundedRect bounds(rect, roundedRect.radii());

Also: make the change suggested here https://bugs.webkit.org/show_bug.cgi?id=125548#c2.
Comment 1 Hans Muller 2013-12-19 12:34:26 PST
Created attachment 219676 [details]
Patch.

Cleanup of various internal Shape issues:
- Removed unnecessary Shape() initialization list entries in Shape subclasses per https://bugs.webkit.org/show_bug.cgi?id=125548#c2.
- Used const references instead of pointers for non-deprecated Shape:createShape() logic.
- Replaced createShape() overloads for Rasters and Boxes with functions named createRasterShape() and createBoxShape().
- Added a FloatRoundedRect::Radii() constructor to reduce the parameter list length of the FloatRoundedRect constructor in createBoxShape().

There are no new tests, this is just internal refactoring.
Comment 2 Andreas Kling 2014-01-03 06:54:46 PST
Comment on attachment 219676 [details]
Patch.

I thought I set r+ on this patch weeks ago :|
Comment 3 WebKit Commit Bot 2014-01-03 08:11:01 PST
Comment on attachment 219676 [details]
Patch.

Rejecting attachment 219676 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 219676, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

/Volumes/Data/EWS/WebKit/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-queues.appspot.com/results/5819974354468864
Comment 4 Hans Muller 2014-01-03 08:18:32 PST
Created attachment 220305 [details]
Patch
Comment 5 WebKit Commit Bot 2014-01-03 08:53:30 PST
Comment on attachment 220305 [details]
Patch

Clearing flags on attachment: 220305

Committed r161260: <http://trac.webkit.org/changeset/161260>
Comment 6 WebKit Commit Bot 2014-01-03 08:53:32 PST
All reviewed patches have been landed.  Closing bug.