Bug 135215 - Turn x/y to presentation attributes
Summary: Turn x/y to presentation attributes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 135045
  Show dependency treegraph
 
Reported: 2014-07-23 14:47 PDT by Dirk Schulze
Modified: 2019-09-21 09:04 PDT (History)
2 users (show)

See Also:


Attachments
Patch (45.41 KB, patch)
2014-07-24 12:24 PDT, Dirk Schulze
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2014-07-23 14:47:13 PDT
Turn x/y to presentation attributes.
Comment 1 Dirk Schulze 2014-07-24 12:24:14 PDT
Created attachment 235444 [details]
Patch
Comment 2 Dean Jackson 2014-07-24 15:15:54 PDT
Comment on attachment 235444 [details]
Patch

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

> LayoutTests/svg/css/parse-length-expected.txt:7
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="  100"
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100   "
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="  100"
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100   "
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="  100"
> +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100   "

Why are these invalid?

> LayoutTests/svg/css/parse-length.html:12
> +description("Test that 'with' presentation attribute is parsed with CSS presentation rules.");

width not with

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2902
> +        // New positioning and sizing properties for SVG

Nit: missing .

> Source/WebCore/rendering/style/SVGRenderStyleDefs.h:294
> +    // Positioning and sizing properties.
> +    class StyleLayoutData : public RefCounted<StyleLayoutData> {

It's just positioning.

> Source/WebCore/svg/SVGAnimateElement.cpp:6
> + * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.

There were no other changes in this file.

> Source/WebCore/svg/SVGFilterElement.cpp:7
> + * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.

Or this one.
Comment 3 Dirk Schulze 2014-07-24 15:54:28 PDT
(In reply to comment #2)
> (From update of attachment 235444 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=235444&action=review
> 
> > LayoutTests/svg/css/parse-length-expected.txt:7
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="  100"
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100   "
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="  100"
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100   "
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="  100"
> > +CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100   "
> 
> Why are these invalid?

The problem is that SVGLength parsing does not accept new parsing rules. Cleaning this up is one of the next patches.

> 
> > LayoutTests/svg/css/parse-length.html:12
> > +description("Test that 'with' presentation attribute is parsed with CSS presentation rules.");
> 
> width not with
> 
> > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2902
> > +        // New positioning and sizing properties for SVG
> 
> Nit: missing .

Will fix both. Thanks!

> 
> > Source/WebCore/rendering/style/SVGRenderStyleDefs.h:294
> > +    // Positioning and sizing properties.
> > +    class StyleLayoutData : public RefCounted<StyleLayoutData> {
> 
> It's just positioning.

For now. It will have more information in the next patch. Just fear that I could forget to update the comment.

> 
> > Source/WebCore/svg/SVGAnimateElement.cpp:6
> > + * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
> 
> There were no other changes in this file.

These were missing from the last patch. Did add a comment to the change log.

> 
> > Source/WebCore/svg/SVGFilterElement.cpp:7
> > + * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
> 
> Or this one.

Ditto.
Comment 4 Dirk Schulze 2014-07-25 02:52:53 PDT
Committed r171591: <http://trac.webkit.org/changeset/171591>