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

Changeset 243638 in webkit


Ignore:
Timestamp:
Mar 28, 2019, 7:34:56 PM (7 years ago)
Author:
Chris Dumez
Message:

Support <object>.contentWindow
https://bugs.webkit.org/show_bug.cgi?id=195562

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing or failing later on.

  • web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03-expected.txt:
  • web-platform-tests/html/dom/interfaces-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt:

Source/WebCore:

Support <object>.contentWindow as per:

No new tests, updated / rebaselined existing tests.

  • html/HTMLObjectElement.idl:

LayoutTests:

Update existing test to extend test coverage.

  • fast/dom/HTMLObjectElement/object-as-frame-expected.txt:
  • fast/dom/HTMLObjectElement/object-as-frame.html:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243637 r243638  
     12019-03-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Support <object>.contentWindow
     4        https://bugs.webkit.org/show_bug.cgi?id=195562
     5
     6        Reviewed by Sam Weinig.
     7
     8        Update existing test to extend test coverage.
     9
     10        * fast/dom/HTMLObjectElement/object-as-frame-expected.txt:
     11        * fast/dom/HTMLObjectElement/object-as-frame.html:
     12
    1132019-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
    214
  • trunk/LayoutTests/fast/dom/HTMLObjectElement/object-as-frame-expected.txt

    r30635 r243638  
    11PASS window.frames.length is 2
    22PASS window.frames[0].frameElement.name is "frame"
     3PASS window.frames[0].frameElement.contentWindow is window.frames[0].frameElement.contentDocument.defaultView
     4PASS window.frames[0].frameElement.contentWindow.document is window.frames[0].frameElement.contentDocument
    35PASS window.frames[1].frameElement.name is "obj"
     6PASS window.frames[1].frameElement.contentWindow is window.frames[1].frameElement.contentDocument.defaultView
     7PASS window.frames[1].frameElement.contentWindow.document is window.frames[1].frameElement.contentDocument
    48Loading 'data:text/html,Updated contents of iframe' in iframe...
    59Loading 'data:text/html,Updated contents of object' in object...
    610PASS window.frames[0].location.toString() is "data:text/html,Updated contents of iframe"
    711PASS window.frames[1].location.toString() is "data:text/html,Updated contents of object"
     12PASS successfullyParsed is true
     13
     14TEST COMPLETE
    815 
  • trunk/LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html

    r189164 r243638  
    1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
     1<!DOCTYPE html>
    22<html>
    33<head>
    4 <script src="../../../resources/js-test-pre.js"></script>
     4<script src="../../../resources/js-test.js"></script>
    55<script>
    66
    7 if (window.testRunner) {
    8     testRunner.dumpAsText();
    9     testRunner.waitUntilDone();
    10 }
     7jsTestIsAsync = true;
    118
    129var updatedFrameURL = "data:text/html,Updated contents of iframe";
     
    1714    shouldBe("window.frames.length", "2");
    1815    shouldBe("window.frames[0].frameElement.name", '"frame"');
     16    shouldBe("window.frames[0].frameElement.contentWindow", "window.frames[0].frameElement.contentDocument.defaultView");
     17    shouldBe("window.frames[0].frameElement.contentWindow.document", "window.frames[0].frameElement.contentDocument");
    1918    shouldBe("window.frames[1].frameElement.name", '"obj"');
     19    shouldBe("window.frames[1].frameElement.contentWindow", "window.frames[1].frameElement.contentDocument.defaultView");
     20    shouldBe("window.frames[1].frameElement.contentWindow.document", "window.frames[1].frameElement.contentDocument");
    2021
    2122    document.getElementsByName('frame')[0].onload = handleLoad;
     
    3839    shouldBe("window.frames[0].location.toString()", '"' + updatedFrameURL + '"');
    3940    shouldBe("window.frames[1].location.toString()", '"' + updatedObjectURL + '"');
    40     if (window.testRunner) {
    41         testRunner.notifyDone();
    42     }
     41
     42    finishJSTest();
    4343}
    4444</script>
  • trunk/LayoutTests/fast/dom/plugin-attributes-enumeration-expected.txt

    r192132 r243638  
    1212codeType
    1313contentDocument
     14contentWindow
    1415data
    1516declare
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r243634 r243638  
     12019-03-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Support <object>.contentWindow
     4        https://bugs.webkit.org/show_bug.cgi?id=195562
     5
     6        Reviewed by Sam Weinig.
     7
     8        Rebaseline WPT tests now that more checks are passing or failing later on.
     9
     10        * web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03-expected.txt:
     11        * web-platform-tests/html/dom/interfaces-expected.txt:
     12        * web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt:
     13
    1142019-03-28  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-03-expected.txt

    r204844 r243638  
    11
    2 FAIL Indexed child browsing contexts assert_equals: The first child browsing context's container should be the object element. expected (undefined) undefined but got (object) object "[object Window]"
     2FAIL Indexed child browsing contexts assert_equals: The first child browsing context's container should be the object element. expected null but got object "[object Window]"
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r243620 r243638  
    13391339PASS HTMLObjectElement interface: attribute height
    13401340PASS HTMLObjectElement interface: attribute contentDocument
    1341 FAIL HTMLObjectElement interface: attribute contentWindow assert_true: The prototype object must have a property "contentWindow" expected true got false
     1341PASS HTMLObjectElement interface: attribute contentWindow
    13421342PASS HTMLObjectElement interface: operation getSVGDocument()
    13431343PASS HTMLObjectElement interface: attribute willValidate
     
    13681368PASS HTMLObjectElement interface: document.createElement("object") must inherit property "height" with the proper type
    13691369PASS HTMLObjectElement interface: document.createElement("object") must inherit property "contentDocument" with the proper type
    1370 FAIL HTMLObjectElement interface: document.createElement("object") must inherit property "contentWindow" with the proper type assert_inherits: property "contentWindow" not found in prototype chain
     1370PASS HTMLObjectElement interface: document.createElement("object") must inherit property "contentWindow" with the proper type
    13711371PASS HTMLObjectElement interface: document.createElement("object") must inherit property "getSVGDocument()" with the proper type
    13721372PASS HTMLObjectElement interface: document.createElement("object") must inherit property "willValidate" with the proper type
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt

    r204090 r243638  
    11
    2 FAIL object.contentWindow undefined is not an object (evaluating 'obj1.contentWindow.name')
     2FAIL object.contentWindow assert_equals: The contentWindow's name of the object element should be 'o1'. expected "o1" but got "o"
    33FAIL object.width assert_equals: The width should be 100px. expected "100px" but got "auto"
    44FAIL object.height assert_equals: The height should be 50px. expected "50px" but got "auto"
  • trunk/Source/WebCore/ChangeLog

    r243637 r243638  
     12019-03-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Support <object>.contentWindow
     4        https://bugs.webkit.org/show_bug.cgi?id=195562
     5
     6        Reviewed by Sam Weinig.
     7
     8        Support <object>.contentWindow as per:
     9        - https://html.spec.whatwg.org/multipage/iframe-embed-object.html#dom-object-contentwindow
     10
     11        No new tests, updated / rebaselined existing tests.
     12
     13        * html/HTMLObjectElement.idl:
     14
    1152019-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/WebCore/html/HTMLObjectElement.idl

    r238748 r243638  
    4747
    4848    [CheckSecurityForNode] readonly attribute Document contentDocument;
     49    readonly attribute WindowProxy contentWindow;
    4950
    5051    [CheckSecurityForNode, MayThrowException] Document getSVGDocument();
Note: See TracChangeset for help on using the changeset viewer.