Bug 116349 - [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
Summary: [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape...
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: 116348
  Show dependency treegraph
 
Reported: 2013-05-17 14:00 PDT by Hans Muller
Modified: 2013-05-20 16:29 PDT (History)
9 users (show)

See Also:


Attachments
Patch (16.22 KB, patch)
2013-05-17 15:02 PDT, Hans Muller
no flags Details | Formatted Diff | Diff
Patch (20.64 KB, patch)
2013-05-17 15:39 PDT, Hans Muller
achicu: review+
Details | Formatted Diff | Diff
Patch (20.81 KB, patch)
2013-05-20 10:28 PDT, 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-05-17 14:00:55 PDT
Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
Comment 1 Hans Muller 2013-05-17 15:02:06 PDT
Created attachment 202164 [details]
Patch

Note: there are some test changes that I'd like to make in a subequent patch, to keep this one focused on just the mechanics of adding support for shape image URIs. The parsing shape-inside,outside parsing tests should be refactored, since they're nearly identical, and they should be moved to a subdirectory.
Comment 2 WebKit Commit Bot 2013-05-17 15:04:37 PDT
Attachment 202164 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt', u'LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt', u'LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js', u'LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/CSSParser.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/css/StyleResolver.cpp', u'Source/WebCore/rendering/style/ExclusionShapeValue.h']" exit_code: 1
Source/WebCore/rendering/style/ExclusionShapeValue.h:44:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Source/WebCore/rendering/style/ExclusionShapeValue.h:45:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Source/WebCore/rendering/style/ExclusionShapeValue.h:66:  More than one command on the same line in if  [whitespace/parens] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Hans Muller 2013-05-17 15:39:19 PDT
Created attachment 202166 [details]
Patch

Fixed the style bot failure by changing the ExclusionShapeValue::type enum values from AUTO,SHAPE,... to Auto,Shape...
Comment 4 Alexandru Chiculita 2013-05-20 09:20:11 PDT
Comment on attachment 202166 [details]
Patch

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

Thanks, looks good!

> LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js:61
> +    var unevaledString = '"' + value.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"';

nit: I think you can use JSON.stringify() now.

> Source/WebCore/rendering/style/ExclusionShapeValue.h:66
> +    void setImage(PassRefPtr<StyleImage> v)

nit: use full names for variables/parameters.

> Source/WebCore/rendering/style/ExclusionShapeValue.h:74
> +    ExclusionShapeValue(PassRefPtr<BasicShape> shape) : m_type(Shape), m_shape(shape) { }

nit: This is not WebKit style. You should have each member on a different line.
Comment 5 Hans Muller 2013-05-20 10:28:10 PDT
Created attachment 202289 [details]
Patch

I made the ExclusionShapeValue.h changes you suggested.  I am going to revise the parsing tests in a separate patch.
Comment 6 Hans Muller 2013-05-20 10:36:32 PDT
(In reply to comment #5)
> Created an attachment (id=202289) [details]
> Patch
> 
> I made the ExclusionShapeValue.h changes you suggested.  I am going to revise the parsing tests in a separate patch.

The test refactoring changes are covered by https://bugs.webkit.org/show_bug.cgi?id=116446
Comment 7 WebKit Commit Bot 2013-05-20 16:29:43 PDT
Comment on attachment 202289 [details]
Patch

Clearing flags on attachment: 202289

Committed r150387: <http://trac.webkit.org/changeset/150387>
Comment 8 WebKit Commit Bot 2013-05-20 16:29:45 PDT
All reviewed patches have been landed.  Closing bug.