Bug 98673 - [CSS Exclusions] shape-outside on floats for circle and ellipse shapes
Summary: [CSS Exclusions] shape-outside on floats for circle and ellipse shapes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bem Jones-Bey
URL: http://dev.w3.org/csswg/css3-exclusio...
Keywords:
: 98674 (view as bug list)
Depends on:
Blocks: 98664
  Show dependency treegraph
 
Reported: 2012-10-08 11:39 PDT by Bem Jones-Bey
Modified: 2013-03-15 21:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.41 KB, patch)
2013-03-15 12:07 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (18.48 KB, patch)
2013-03-15 12:17 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (19.02 KB, patch)
2013-03-15 13:08 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (19.03 KB, patch)
2013-03-15 13:27 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (19.03 KB, patch)
2013-03-15 16:11 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bem Jones-Bey 2012-10-08 11:39:42 PDT
This bug tracks the implementation of shape-outside on floats for circle shape outsides.
Comment 1 Bem Jones-Bey 2013-03-14 13:49:55 PDT
*** Bug 98674 has been marked as a duplicate of this bug. ***
Comment 2 Bem Jones-Bey 2013-03-14 13:50:47 PDT
Also for ellipses.
Comment 3 Bem Jones-Bey 2013-03-15 12:07:16 PDT
Created attachment 193348 [details]
Patch

Add support for circles and ellipses for shape-outside.
Comment 4 WebKit Review Bot 2013-03-15 12:10:30 PDT
Attachment 193348 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/exclusions/resources/rounded-rectangle.js', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-circle-expected.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-circle.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-ellipse-expected.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-ellipse.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp']" exit_code: 1
LayoutTests/ChangeLog:7:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:14:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:16:  Line contains tab character.  [whitespace/tab] [5]
LayoutTests/ChangeLog:17:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:16:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:17:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:18:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 10 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Bem Jones-Bey 2013-03-15 12:17:54 PDT
Created attachment 193351 [details]
Patch

Add support for circles and ellipses for shape-outside. I fix my vim config on one machine, but must have forgotten this one. *sigh*
Comment 6 Bem Jones-Bey 2013-03-15 13:08:52 PDT
Created attachment 193359 [details]
Patch

Add a small fix to make xOutset more readable from feedback in Bug 100299.
Comment 7 WebKit Review Bot 2013-03-15 13:12:32 PDT
Attachment 193359 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/exclusions/resources/rounded-rectangle.js', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-circle-expected.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-circle.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-ellipse-expected.html', u'LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-simple-ellipse.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp']" exit_code: 1
LayoutTests/ChangeLog:18:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Bem Jones-Bey 2013-03-15 13:27:17 PDT
Created attachment 193367 [details]
Patch

And I just got caught by the tab issue again.
Comment 9 Dirk Schulze 2013-03-15 15:59:21 PDT
Comment on attachment 193367 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193367&action=review

Some comments from me.

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:6
> +function computeRoundedRectDimensions(dimensions) {

Is the function name not bogus if you test for ellipses and circles?

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:8
> +    if (defined(dimensions.shapeCenterX) && defined(dimensions.shapeCenterY)) { // circle or ellipse
> +        if (defined(dimensions.shapeRadius)) { // circle

Comments at the beginning of a line are easier to see IMO.

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:16
> +        }
> +        else { // ellipse

no new line for the else

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:22
> +    }

what happens if it is neither circle nor ellipse here? Something should indicate that this should not happen or a fixme should be added.

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:155
> +    if (defined(dimensions.shapeCenterX) && defined(dimensions.shapeCenterY)) { // circle or ellipse

Comment in it's own line

> LayoutTests/fast/exclusions/resources/rounded-rectangle.js:164
> +        }
> +        else { // ellipse

Ditto, no break and new line for comment.
Comment 10 Bem Jones-Bey 2013-03-15 16:11:58 PDT
Created attachment 193392 [details]
Patch

Rename computeRoundedRectDimensions to convertToRoundedRect make its purpose clearer; reformat and add comments per review feedback; and remove some comments that are useless because the next line of code says what type of shape is being created.
Comment 11 WebKit Review Bot 2013-03-15 21:42:23 PDT
Comment on attachment 193392 [details]
Patch

Clearing flags on attachment: 193392

Committed r145982: <http://trac.webkit.org/changeset/145982>
Comment 12 WebKit Review Bot 2013-03-15 21:42:27 PDT
All reviewed patches have been landed.  Closing bug.