Bug 154141 - Synchronization of SVGMarkerElement DOM methods and orient attribute is broken
Summary: Synchronization of SVGMarkerElement DOM methods and orient attribute is broken
Status: RESOLVED DUPLICATE of bug 196087
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 17:01 PST by Nikos Andronikos
Modified: 2019-03-22 12:42 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Andronikos 2016-02-11 17:01:36 PST
Test: https://jsfiddle.net/dodgeyhack/bgLe93sw/

After using the DOM methods:
* setOrientToAuto
* setorientToAngle

And I think after also reading and writing to/from SVGMarkerElement.orientType and SVGMarkerElement.orientAngle.

Then, calling setAttribute with an invalid value causes that value not to be reflected in the attribute as it should.

Minimal JS test:
markerElement.setOrientToAngle(svgElement.createSVGAngle());
shouldNotThrow("markerElement.setAttribute('orient', 'AUTO')");
shouldBeEqualToString("markerElement.getAttribute('orient')", "AUTO");

Fails because getAttribute('orient') returns '0'.

The call stack shows that SetAttributeInternal is called multiple times, which is likely an error:
--Element::setAttribute----------------
    name=orient / newValue=AUTO-START-REVERSE
    --synchronizeOrientAngle------
    shouldSynchronize = 1
    --Element::setAttributeInternal----------------
    name=orient / newValue=0123456789:;<=>?@ABCDEF... snipped the remaining garbage
    --synchronizeOrientType-------
    ownerType.m_orientType.value = 2
    is angle
    --Element::setAttributeInternal----------------
    name=orient / newValue=AUTO-START-REVERSE
    --parseAttribute-------
    name = orient / value = AUTO-START-REVERSE
    returns 0
    --svgAttributeChanged-------
    attrName = orient
    --synchronizeOrientAngle------
    shouldSynchronize = 1
    --Element::setAttributeInternal----------------
    name=orient / newValue=0123456789:;<=>?@ABCDEF... snipped the remaining garbage
    --synchronizeOrientType-------
    ownerType.m_orientType.value = 2
    is angle
Comment 1 Said Abou-Hallawa 2019-03-22 12:42:49 PDT
This will be fixed by https://bugs.webkit.org/show_bug.cgi?id=196087

*** This bug has been marked as a duplicate of bug 196087 ***