New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 709001 link

Starred by 9 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 388780

Blocking:
issue 674593
issue 678167


Show other hotlists

Hotlists containing this issue:
Non-Standard-IDL


Sign in to add a comment

Replace SVGMatrix, SVGPoint and SVGRect with DOMMatrix, DOMPoint and DOMRect

Project Member Reported by foolip@chromium.org, Apr 6 2017

Issue description

These types were in SVG 1.1, but are not in SVG 2:
https://www.w3.org/TR/SVG11/coords.html#DOMInterfaces
https://svgwg.org/svg2-draft/

When the DOM* geometry interfaces have shipped, the SVG* types should be replaced with these. If that turns out to be impossible due to compat constraints, we instead need to revive the SVG* types in the spec.
 
Labels: PaintTeamTriaged-20170406 BugSource-Team

Comment 2 by f...@opera.com, Apr 7 2017

Cc: f...@opera.com

Comment 3 by f...@opera.com, May 3 2017

Blocking: 678167
Project Member

Comment 4 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/99b481419897f642644932ecab1db0ee7453147e

commit 99b481419897f642644932ecab1db0ee7453147e
Author: fs <fs@opera.com>
Date: Tue May 30 17:42:18 2017

Clean up creation of "detached" SVG* data type objects

Add CreateDetached helpers for the various objects (or, their tear-offs)
that can be created without having a context element. This is in
preparation for replacing some of these with their DOM* counterparts
from the Geometry specifications [1]. The "detached" term is borrowed from
the SVG2 specification [2].
Also drop all of the default arguments that pass QualifiedName::Null(),
and instead explicitly pass them where needed (for detached objects.)

[1] https://drafts.fxtf.org/geometry/
[2] https://svgwg.org/svg2-draft/struct.html#__svg__SVGSVGElement__createSVGNumber

BUG=709001

Review-Url: https://codereview.chromium.org/2912663002
Cr-Commit-Position: refs/heads/master@{#475583}

[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGAngleTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGLengthTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGNumberListTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGNumberTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGNumberTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGPointListTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGPointTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGRectTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGRectTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGStringListTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGTransformListTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGTransformTearOff.cpp
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/SVGTransformTearOff.h
[modify] https://crrev.com/99b481419897f642644932ecab1db0ee7453147e/third_party/WebKit/Source/core/svg/properties/SVGPropertyTearOff.h

Comment 5 by f...@opera.com, May 31 2017

For the sake of my future self as well as others, I figured I should braindump here, to list stumbling blocks and things that'll need fixing:

 * DOMRect and DOMPoint need to be able to fit into their corresponding SVGAnimated* types. Hopefully a notifier hook is all that will be needed here, but see below.

 * DOMPoint needs to be "listable", i.e be able to reside in a SVGPointList. Hopefully the notifier hook mentioned above will suffice for this as well.

 * The animation engines will need to be taught how to animate DOMRects. This is currently achieved for SVGRect by it being a SVGPropertyBase, so it can use the type tag from there. The actual interpolation/addition/accumulation logic for the SMIL engine also goes in the SVGPropertyBase as things stand today, but that should be possible to separate (and merge with/use the core/animation code instead.)

 * SVGRect contains parsing logic (string => SVGRect) which may need to be externalized. SVGPoint contains the same, but it should never be used (i.e it's essentially dead code.)

 * SVGMatrix is in a relationship with SVGTransform, which means it sometimes share storage of the actual matrix with SVGTransform. This probably needs to be fixed/changed in some way. A notifier hook will be needed here as well.

 * For the "read only" use cases we currently use a bit in SVGPropertyTearOffBase. I suspect we need a new way to handle it for these types.

 * ...and more! (I'm sure)

Comment 6 by f...@opera.com, May 31 2017

 * SVGRect has an 'is valid' flag (in addition to x, y, width and height.) We should get rid of that. Maybe via issue 703050.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f488b372798d523f0b6b48f6eec7efa6bf53500

commit 5f488b372798d523f0b6b48f6eec7efa6bf53500
Author: fs <fs@opera.com>
Date: Sun Jun 04 20:41:42 2017

Tidy up SVGListPropertyHelper

Turn some iterations into range-based for-loops. Use operator== from
Vector<...> rather than re-implementing it. Remove FindItem (unused.)
Deduplicate some code, replace 0 with nullptr where appropriate and
simplify the padding loop.

BUG=709001

Review-Url: https://codereview.chromium.org/2920103002
Cr-Commit-Position: refs/heads/master@{#476914}

[modify] https://crrev.com/5f488b372798d523f0b6b48f6eec7efa6bf53500/third_party/WebKit/Source/core/svg/properties/SVGListPropertyHelper.h

Cc: bbri...@microsoft.com
Cc: robertma@chromium.org
 Issue 860439  has been merged into this issue.

Comment 10 by f...@opera.com, Today (9 hours ago)

 Issue 924259  has been merged into this issue.

Sign in to add a comment