⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179391 in webkit


Ignore:
Timestamp:
Jan 29, 2015, 8:23:51 PM (12 years ago)
Author:
Darin Adler
Message:

Remove SVGUseElement.instanceRoot and all tests that depend on it
https://bugs.webkit.org/show_bug.cgi?id=141025

Reviewed by Anders Carlsson.

Source/WebCore:

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::instanceRoot): Deleted.

  • svg/SVGUseElement.h: Removed instanceRoot.
  • svg/SVGUseElement.idl: Ditto.

LayoutTests:

  • platform/gtk/TestExpectations: Removed expected failure for now-removed test.
  • platform/ios-simulator-wk2/TestExpectations: Ditto.
  • platform/mac/TestExpectations: Ditto.
  • platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed.
  • platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed.
  • platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed.
  • platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed.
  • platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • svg/custom/element-instance-held-by-js-crash-expected.txt: Removed.
  • svg/custom/element-instance-held-by-js-crash.svg: Removed.
  • svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead

of using use.instanceRoot.correspondingElement.

  • svg/custom/resources/use-instanceRoot-event-listeners.js: Removed.
  • svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that

got at the instanceRoot. It's possible this test no longer has value, and if so, then
we could later delete it, but it does no harm.

  • svg/custom/use-elementInstance-event-target.svg: Removed.
  • svg/custom/use-elementInstance-methods.svg: Removed.
  • svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed.
  • svg/custom/use-instanceRoot-as-event-target.xhtml: Removed.
  • svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed.
  • svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed.
  • svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed.
  • svg/custom/use-instanceRoot-event-listeners.xhtml: Removed.
  • svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved

the instanceRoot property. It's possible this test now has reduced value, and if so, we
could later delete it but it does no harm.

  • svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot

and correspondingUseElement. Not certain this remains a useful test. Also converted line
endings to LF instead of CRLF.

  • svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot.
  • svg/custom/use-modify-target-container.svg: Ditto.
  • svg/custom/use-modify-target-symbol.svg: Ditto.
  • svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance

tree any more.

  • svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree,

and added in the part about dragging to make sure it doesn't crash.

  • svg/dom/use-transform.svg: Get element by id instead of instanceRoot.
Location:
trunk
Files:
25 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r179388 r179391  
     12015-01-29  Darin Adler  <darin@apple.com>
     2
     3        Remove SVGUseElement.instanceRoot and all tests that depend on it
     4        https://bugs.webkit.org/show_bug.cgi?id=141025
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * platform/gtk/TestExpectations: Removed expected failure for now-removed test.
     9        * platform/ios-simulator-wk2/TestExpectations: Ditto.
     10        * platform/mac/TestExpectations: Ditto.
     11
     12        * platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed.
     13        * platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
     14        * platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed.
     15        * platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed.
     16        * platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
     17        * platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed.
     18        * platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
     19        * platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed.
     20        * platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
     21        * platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed.
     22        * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed.
     23        * platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
     24        * platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed.
     25        * platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed.
     26        * svg/custom/element-instance-held-by-js-crash-expected.txt: Removed.
     27        * svg/custom/element-instance-held-by-js-crash.svg: Removed.
     28        * svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead
     29        of using use.instanceRoot.correspondingElement.
     30        * svg/custom/resources/use-instanceRoot-event-listeners.js: Removed.
     31        * svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that
     32        got at the instanceRoot. It's possible this test no longer has value, and if so, then
     33        we could later delete it, but it does no harm.
     34        * svg/custom/use-elementInstance-event-target.svg: Removed.
     35        * svg/custom/use-elementInstance-methods.svg: Removed.
     36        * svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed.
     37        * svg/custom/use-instanceRoot-as-event-target.xhtml: Removed.
     38        * svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed.
     39        * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed.
     40        * svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed.
     41        * svg/custom/use-instanceRoot-event-listeners.xhtml: Removed.
     42        * svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved
     43        the instanceRoot property. It's possible this test now has reduced value, and if so, we
     44        could later delete it but it does no harm.
     45        * svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot
     46        and correspondingUseElement. Not certain this remains a useful test. Also converted line
     47        endings to LF instead of CRLF.
     48        * svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot.
     49        * svg/custom/use-modify-target-container.svg: Ditto.
     50        * svg/custom/use-modify-target-symbol.svg: Ditto.
     51        * svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance
     52        tree any more.
     53        * svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree,
     54        and added in the part about dragging to make sure it doesn't crash.
     55        * svg/dom/use-transform.svg: Get element by id instead of instanceRoot.
     56
    1572015-01-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    258
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r179112 r179391  
    543543webkit.org/b/86176 [ Debug ] ietestcenter/css3/valuesandunits/units-000.htm [ Crash ]
    544544
    545 webkit.org/b/93812 [ Debug ] svg/custom/use-instanceRoot-as-event-target.xhtml [ Crash Pass ]
    546 
    547545webkit.org/b/90957 [ Release ] js/dom/random-array-gc-stress.html [ Timeout Crash Pass ]
    548546
     
    694692webkit.org/b/94119 storage/websql/database-lock-after-reload.html [ Failure Pass ]
    695693webkit.org/b/132283 storage/websql/read-transactions-running-concurrently.html [ Failure Pass ]
    696 
    697 webkit.org/b/93812 [ Release ] svg/custom/use-instanceRoot-as-event-target.xhtml [ Pass Timeout ]
    698694
    699695webkit.org/b/95430 fast/layers/scroll-no-visible-content-but-visible-descendant.html [ ImageOnlyFailure Pass ]
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r179200 r179391  
    414414svg/custom/use-event-handler-on-referenced-element.svg
    415415svg/custom/use-event-handler-on-use-element.svg
    416 svg/custom/use-instanceRoot-as-event-target.xhtml
    417416svg/custom/use-instanceRoot-event-bubbling.xhtml
    418417svg/custom/use-instanceRoot-event-listeners.xhtml
  • trunk/LayoutTests/platform/mac/TestExpectations

    r179378 r179391  
    434434# Assertion failure in MessagePort::contextDestroyed, usually attributed to later tests
    435435http/tests/security/MessagePort/event-listener-context.html [ Skip ]
    436 
    437 # https://bugs.webkit.org/show_bug.cgi?id=93812
    438 # REGRESSION(r125251): It made svg/custom/use-instanceRoot-as-event-target.xhtml assert and flakey
    439 # ASSERTION FAILED: m_wrapper || !m_jsFunction
    440 svg/custom/use-instanceRoot-as-event-target.xhtml [ Skip ]
    441436
    442437webkit.org/b/112620 [ Debug ] svg/custom/image-with-attr-change-after-delete-crash.html [ Crash Pass ]
  • trunk/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js

    r124380 r179391  
    4444    successfullyParsed = true;
    4545
    46     use.instanceRoot.correspondingElement.setAttribute("fill", "green");
     46    document.getElementById("rectParent").setAttribute("fill", "green");
    4747    shouldBeTrue("successfullyParsed");
    4848    debug('<br /><span class="pass">TEST COMPLETE</span>');
  • trunk/LayoutTests/svg/custom/use-crash-using-children-before-destroy.svg

    r124380 r179391  
    44    <use id="b" xlink:href="#outer" />
    55<script><![CDATA[
    6 var useobj = document.getElementById("b").instanceRoot;
    76
    87function test() {
  • trunk/LayoutTests/svg/custom/use-instanceRoot-modifications.svg

    r75408 r179391  
    1717function runInstanceRootTest() {
    1818    var useElement = document.getElementsByTagName("use")[1];
    19     if (useElement != useElement.instanceRoot.correspondingUseElement)
    20         return;
    21 
    22     var element = useElement.instanceRoot.correspondingElement;
    23     if (element != document.getElementById("g"))
    24         return;
     19    var element = document.getElementById("g");
    2520
    2621    // element.firstChild is a #text node! the next sibling gives the rect
  • trunk/LayoutTests/svg/custom/use-instanceRoot-with-use-removed.svg

    r124380 r179391  
    1515        else
    1616            location.hash = "#1";
    17         var ir = document.getElementById("use1").instanceRoot;
    18         ir.correspondingUseElement.parentElement.removeChild(ir.correspondingUseElement);
     17        document.getElementById("use1").parentElement.removeChild(document.getElementById("use1"));
    1918        gc();
    20         ir.correspondingUseElement;
    2119        setTimeout(function(){location.reload()},0);
    2220    } else {
  • trunk/LayoutTests/svg/custom/use-listener-append-crash.html

    r142548 r179391  
    1414        testRunner.dumpAsText();
    1515
     16    var leftSquare = document.getElementById("leftSquare");
     17    var square = document.getElementById("square");
     18
    1619    leftSquare.addEventListener('mousedown', function() { leftSquare.parentNode.appendChild(leftSquare); });
    17     leftSquare.addEventListener('mousedown', function() { leftSquare.instanceRoot.correspondingElement.setAttribute("fill", "green"); });
     20    leftSquare.addEventListener('mousedown', function() { square.setAttribute("fill", "green"); });
    1821
    1922    if (window.eventSender) {
  • trunk/LayoutTests/svg/custom/use-modify-target-container.svg

    r19254 r179391  
    1515
    1616<script>
    17 var useElement = document.getElementsByTagName("use")[1];
    18 var element = useElement.instanceRoot.correspondingElement;
    19 
    20 element.setAttribute("transform", "");
     17document.getElementById("g").setAttribute("transform", "");
    2118</script>
    2219</svg>
  • trunk/LayoutTests/svg/custom/use-modify-target-symbol.svg

    r19987 r179391  
    1414
    1515<script>
    16 var useElement = document.getElementsByTagName("use")[1];
    17 var element = useElement.instanceRoot.correspondingElement;
    18 element.removeAttribute("viewBox");
     16document.getElementById("symbol").removeAttribute("viewBox");
    1917</script>
    2018</svg>
  • trunk/LayoutTests/svg/custom/use-on-use-with-child-expected.txt

    r49833 r179391  
    1 The instance tree of use element zoomplus:
    2 
    3      id = loupePlus  this = [object SVGElementInstance]  correspondingElement = [object SVGGElement]
    4           id = useRim  this = [object SVGElementInstance]  correspondingElement = [object SVGUseElement]
    5                id = rim  this = [object SVGElementInstance]  correspondingElement = [object SVGCircleElement]
    6 
     1PASS if this did not crash
  • trunk/LayoutTests/svg/custom/use-on-use-with-child.svg

    r124380 r179391  
    1515    <foreignObject><pre id="console" xmlns="http://www.w3.org/1999/xhtml"/></foreignObject>
    1616    <script>
    17         function makeCrash(){
    18             if (window.eventSender) {
    19                 eventSender.dragMode = false;
    20                 eventSender.mouseMoveTo(300, 300);
    21                 eventSender.mouseDown();
    22                 eventSender.mouseUp();
    23             }
     17        if (window.eventSender) {
     18            eventSender.dragMode = false;
     19            eventSender.mouseMoveTo(300, 300);
     20            eventSender.mouseDown();
     21            eventSender.mouseUp();
    2422        }
    25         // If you like, you can make a crash.
    26         // makeCrash();
    27 
    28         var console = document.getElementById("console");
    29         function println(string)
    30         {
    31             console.textContent += string + '\n';
    32         }
    33 
    34         function printInstanceTree( obj, indent )
    35         {
    36             indent += "     ";
    37             println(indent + "id = " + obj.correspondingElement.id + "  this = " + obj + "  correspondingElement = " + obj.correspondingElement);
    38             for (var m = obj.firstChild; m != null; m = m.nextSibling ) {
    39                 printInstanceTree(m, indent);
    40             }
    41         }
    42         var useobj = document.getElementById("zoomplus").instanceRoot;
    43         println("The instance tree of use element zoomplus:\n");
    44         printInstanceTree(useobj,"");
    45 
    46         if (window.testRunner){
     23        var console = document.getElementById("console").textContent = "PASS if this did not crash";
     24        if (window.testRunner)
    4725            testRunner.dumpAsText();
    48         }
    49 
    5026  </script>
    5127</svg>
  • trunk/LayoutTests/svg/dom/use-transform.svg

    r124380 r179391  
    3232 //
    3333
    34 var useElement = document.getElementsByTagName("use")[1];
    35 var element = useElement.instanceRoot.correspondingElement;
    36 
    37 element.setAttribute("transform", "");
     34document.getElementById("g").setAttribute("transform", "");
    3835
    3936if (window.testRunner)
  • trunk/Source/WebCore/ChangeLog

    r179389 r179391  
     12015-01-29  Darin Adler  <darin@apple.com>
     2
     3        Remove SVGUseElement.instanceRoot and all tests that depend on it
     4        https://bugs.webkit.org/show_bug.cgi?id=141025
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * svg/SVGUseElement.cpp:
     9        (WebCore::SVGUseElement::instanceRoot): Deleted.
     10        * svg/SVGUseElement.h: Removed instanceRoot.
     11        * svg/SVGUseElement.idl: Ditto.
     12
    1132015-01-29  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebCore/svg/SVGUseElement.cpp

    r179260 r179391  
    105105}
    106106
    107 SVGElementInstance* SVGUseElement::instanceRoot()
    108 {
    109     // If there is no element instance tree, force immediate SVGElementInstance tree
    110     // creation by asking the document to invoke our recalcStyle function - as we can't
    111     // wait for the lazy creation to happen if e.g. JS wants to access the instanceRoot
    112     // object right after creating the element on-the-fly
    113     if (!m_targetElementInstance)
    114         document().updateLayoutIgnorePendingStylesheets();
    115 
    116     return m_targetElementInstance.get();
    117 }
    118 
    119107bool SVGUseElement::isSupportedAttribute(const QualifiedName& attrName)
    120108{
  • trunk/Source/WebCore/svg/SVGUseElement.h

    r179101 r179391  
    4646    virtual ~SVGUseElement();
    4747
    48     SVGElementInstance* instanceRoot();
    4948    SVGElementInstance* instanceForShadowTreeElement(Node*) const;
    5049    void invalidateShadowTree();
  • trunk/Source/WebCore/svg/SVGUseElement.idl

    r179101 r179391  
    2929    readonly attribute SVGAnimatedLength width;
    3030    readonly attribute SVGAnimatedLength height;
    31 
    32     readonly attribute SVGElementInstance instanceRoot;
    3331};
    3432
Note: See TracChangeset for help on using the changeset viewer.