WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
124368
[CSS Shapes] Add BoxShape and FloatRoundingRect classes
https://bugs.webkit.org/show_bug.cgi?id=124368
Summary
[CSS Shapes] Add BoxShape and FloatRoundingRect classes
Hans Muller
Reported
2013-11-14 09:33:57 PST
Currently the internal FloatRoundedRect class (see RectangleShape.h) supports two corner radii, which was sufficient for earlier version of the CSS Shapes spec. The current spec (
http://dev.w3.org/csswg/css-shapes/
) requires elliptical corners, two radii per corner.
Attachments
Path
(36.90 KB, patch)
2013-11-19 15:24 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(36.90 KB, patch)
2013-11-19 15:51 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(36.88 KB, patch)
2013-11-19 16:31 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(36.64 KB, patch)
2013-11-19 16:52 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(37.03 KB, patch)
2013-11-20 09:59 PST
,
Hans Muller
dino
: review+
Details
Formatted Diff
Diff
Patch
(36.97 KB, patch)
2013-11-20 13:27 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Hans Muller
Comment 1
2013-11-19 14:23:06 PST
A BoxShape class would represent margin-box, border-box, padding-box, and content-box values, see
http://dev.w3.org/csswg/css-shapes/#typedef-box
. A float analog of RoundedRect is needed to represent a BoxShape's shape-margin and shape-padding bounds. A FloatRoundedRect is a rounded rectangle with four elliptical corners, each with its own pair of radii.
Hans Muller
Comment 2
2013-11-19 15:24:58 PST
Created
attachment 217342
[details]
Path Added the BoxShape class. It's now used to represent shape-outside box values: [margin/border/padding/content]-box. BoxShape depends on a new FloatRoundedRect class, which is a float analog of the existing (int) RoundedRect class.
WebKit Commit Bot
Comment 3
2013-11-19 15:26:54 PST
Attachment 217342
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/platform/graphics/FloatRoundedRect.cpp', u'Source/WebCore/platform/graphics/FloatRoundedRect.h', u'Source/WebCore/rendering/shapes/BoxShape.cpp', u'Source/WebCore/rendering/shapes/BoxShape.h', u'Source/WebCore/rendering/shapes/Shape.cpp']" exit_code: 1 Source/WebCore/platform/graphics/FloatRoundedRect.h:42: Missing space inside { }. [whitespace/braces] [5] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Hans Muller
Comment 4
2013-11-19 15:51:25 PST
Created
attachment 217348
[details]
Patch Fixed a styleO.
Hans Muller
Comment 5
2013-11-19 16:31:13 PST
Created
attachment 217358
[details]
Patch Resync'd.
Hans Muller
Comment 6
2013-11-19 16:52:13 PST
Created
attachment 217360
[details]
Patch Remove diff for the leading mystery characters in the header for /Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Hans Muller
Comment 7
2013-11-20 09:59:08 PST
Created
attachment 217451
[details]
Patch Updated the ChangeLog entry: Added the BoxShape class. It's now used to represent shape-outside box values: [margin/border/padding/content]-box. BoxShape depends on a new FloatRoundedRect class, which is a float analog of the existing (int) RoundedRect class. The FloatRoundedRect class contains the same basic methods and accessors as BorderRect and adds a set of four methods, for example topLeftCorner(), that return a FloatRect that represents the bounds of one elliptical corner. I also added a method, xInterceptsAtY() that returns two X coordinates of the intersection between a horizontal line and the rounded rectangle.
Dean Jackson
Comment 8
2013-11-20 12:45:09 PST
Comment on
attachment 217451
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=217451&action=review
> Source/WebCore/platform/graphics/FloatRoundedRect.cpp:4 > +/* > + * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. > + * Copyright (C) 2010 Google Inc. All rights reserved. > + * Copyright (C) 2013 Xidorn Quan (
quanxunzhen@gmail.com
)
This doesn't match the .h
> Source/WebCore/platform/graphics/FloatRoundedRect.cpp:106 > + if (y < rect().y() || y >= rect().maxY())
Double space before ||
> Source/WebCore/platform/graphics/FloatRoundedRect.h:2 > +/* > + * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
2013
Hans Muller
Comment 9
2013-11-20 13:27:55 PST
Created
attachment 217473
[details]
Patch Made the requested changes.
WebKit Commit Bot
Comment 10
2013-11-20 14:19:32 PST
Comment on
attachment 217473
[details]
Patch Clearing flags on attachment: 217473 Committed
r159583
: <
http://trac.webkit.org/changeset/159583
>
WebKit Commit Bot
Comment 11
2013-11-20 14:19:34 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug