Changeset 21651 in webkit


Ignore:
Timestamp:
May 22, 2007 4:47:07 PM (17 years ago)
Author:
darin
Message:

LayoutTests:

Reviewed by Geoff.

  • test for <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
  • fast/dom/iframe-document.html: Updated test to expect no document property.
  • fast/dom/iframe-document-expected.txt: Updated.
  • fast/forms/focus2.html: Changed test to use ownerDocument instead of document.

WebCore:

Reviewed by Geoff.

  • fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong

The code on ebay was looking for the "document" property on a iframe.
We changed that to be the ownerDocument rather than the contentDocument,
which was not what ebay was expecting. The best fix seems to be removing
the document property altogether.

Test: fast/dom/iframe-document.html

  • bindings/js/kjs_html.h: Remove ElementDocument.
  • bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.

WebKit:

Reviewed by Geoff.

  • WebInspector/webInspector/treeoutline.js: Use ownerDocument instead of non-standard document property.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21649 r21651  
     12007-05-22  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        - test for <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
     6
     7        * fast/dom/iframe-document.html: Updated test to expect no document property.
     8        * fast/dom/iframe-document-expected.txt: Updated.
     9
     10        * fast/forms/focus2.html: Changed test to use ownerDocument instead of document.
     11
    1122007-05-22  Adele Peterson  <adele@apple.com>
    213
  • trunk/LayoutTests/fast/dom/iframe-document-expected.txt

    r20972 r21651  
    1 This tests the document property on an HTMLIFrameElement. Internet Explorer and Safari have a document property on all elements that gives the document the element is in. Old versions of Safari overrode this on iframe elements to return the document inside the iframe, which created an incompatibility with at least on SAP application because it doesn't match the behavior of other browsers.
     1This tests the document property on an HTMLIFrameElement. Internet Explorer has a document property on all elements that gives the document the element is in. Old versions of Safari had both this and another property on iframe elements to return the document inside the iframe, which created an incompatibility with at least on SAP application because it doesn't match the behavior of other browsers.
    22
    3 TEST PASSED: The document property is returning the document the iframe element is in.
     3TEST PASSED: The frame has no document property.
    44
    55
  • trunk/LayoutTests/fast/dom/iframe-document.html

    r20972 r21651  
    66    var result;
    77    if (!document.getElementById('frame').document)
    8         result = "TEST PASSED: The frame has no document property, so this is probably not IE or Safari.";
     8        result = "TEST PASSED: The frame has no document property.";
    99    else if (document == document.getElementById('frame').document)
    10         result = "TEST PASSED: The document property is returning the document the iframe element is in.";
     10        result = "TEST FAILED: The document property is returning the document the iframe element is in.";
    1111    else
    1212        result = "TEST FAILED: The document property is returning a document other than the one the iframe element is in, probably the document inside the frame.";
     
    1717<body onload="test()">
    1818<p>This tests the document property on an HTMLIFrameElement.
    19 Internet Explorer and Safari have a document property on all elements that gives the document the element is in.
    20 Old versions of Safari overrode this on iframe elements to return the document inside the iframe, which created an incompatibility
    21 with at least on SAP application because it doesn't match the behavior of other browsers.</p>
     19Internet Explorer has a document property on all elements that gives the document the element is in.
     20Old versions of Safari had both this and another property on iframe elements to return the document
     21inside the iframe, which created an incompatibility with at least on SAP application because it
     22doesn't match the behavior of other browsers.</p>
    2223<p id="result">TEST NOT RUN</p>
    2324<iframe src="data:text/html,iframe contents" id="frame"></iframe>
  • trunk/LayoutTests/fast/forms/focus2.html

    r21546 r21651  
    8080    // Form elements
    8181    for (var i = 0; i < inputTypes.length; ++i) { //>
    82         var input = parentElement.document.createElement('input');
     82        var input = parentElement.ownerDocument.createElement('input');
    8383        input.type = inputTypes[i];
    8484        addEventListeners(input);
     
    8787   
    8888    // Textarea
    89     var textarea = parentElement.document.createElement('textarea');
     89    var textarea = parentElement.ownerDocument.createElement('textarea');
    9090    addEventListeners(textarea);
    9191    parentElement.appendChild(textarea);
    9292   
    9393    // Contenteditable
    94     var div = parentElement.document.createElement('div');
     94    var div = parentElement.ownerDocument.createElement('div');
    9595    div.contentEditable = true;
    9696    div.style.border = "1px solid black";
     
    9999
    100100    // Anchor
    101     var anchor = parentElement.document.createElement('a');
     101    var anchor = parentElement.ownerDocument.createElement('a');
    102102    anchor.innerHTML = "anchor";
    103103    anchor.href = "javascript:";
  • trunk/WebCore/ChangeLog

    r21650 r21651  
     12007-05-22  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        - fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
     6
     7        The code on ebay was looking for the "document" property on a iframe.
     8        We changed that to be the ownerDocument rather than the contentDocument,
     9        which was not what ebay was expecting. The best fix seems to be removing
     10        the document property altogether.
     11
     12        Test: fast/dom/iframe-document.html
     13
     14        * bindings/js/kjs_html.h: Remove ElementDocument.
     15        * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.
     16
    1172007-05-22  Adele Peterson  <adele@apple.com>
    218
  • trunk/WebCore/bindings/js/kjs_html.cpp

    r21633 r21651  
    465465  outerHTML     KJS::JSHTMLElement::ElementOuterHTML DontDelete
    466466  outerText     KJS::JSHTMLElement::ElementOuterText DontDelete
    467   document      KJS::JSHTMLElement::ElementDocument  DontDelete|ReadOnly
    468467# IE extension
    469468  children      KJS::JSHTMLElement::ElementChildren  DontDelete|ReadOnly
     
    696695        case ElementOuterText:
    697696            return jsString(element.outerText());
    698         case ElementDocument:
    699             return toJS(exec,element.ownerDocument());
    700697        case ElementChildren:
    701698            return getHTMLCollection(exec, element.children().get());
  • trunk/WebCore/bindings/js/kjs_html.h

    r21633 r21651  
    102102           GetContext,
    103103           ElementInnerHTML, ElementId, ElementDir, ElementLang,
    104            ElementClassName, ElementInnerText, ElementDocument, ElementChildren, ElementContentEditable,
     104           ElementClassName, ElementInnerText, ElementChildren, ElementContentEditable,
    105105           ElementIsContentEditable, ElementOuterHTML, ElementOuterText
    106106    };
  • trunk/WebCore/page/Chrome.h

    r21650 r21651  
    11// -*- mode: c++; c-basic-offset: 4 -*-
    22/*
    3  * Copyright (C) 2006-2007 Apple Inc.
     3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
    44 *
    55 * This library is free software; you can redistribute it and/or
     
    107107        void focusNSView(NSView*);
    108108#endif
     109
    109110    private:
    110 
    111111        Page* m_page;
    112112        ChromeClient* m_client;
  • trunk/WebKit/ChangeLog

    r21647 r21651  
     12007-05-22  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        * WebInspector/webInspector/treeoutline.js: Use ownerDocument instead of non-standard
     6        document property.
     7
    182007-05-22  Adele Peterson  <adele@apple.com>
    29
  • trunk/WebKit/WebInspector/webInspector/treeoutline.js

    r21007 r21651  
    304304            this._listItemNode.parentNode.removeChild(this._listItemNode);
    305305
    306         this._listItemNode = this.treeOutline._childrenListNode.document.createElement("li");
     306        this._listItemNode = this.treeOutline._childrenListNode.ownerDocument.createElement("li");
    307307        this._listItemNode.treeElement = this;
    308308        this._listItemNode.innerHTML = this.title;
     
    416416            this.children = [];
    417417
    418         this._childrenListNode = this.treeOutline._childrenListNode.document.createElement("ol");
     418        this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
    419419        this._childrenListNode.parentTreeElement = this;
    420420        this._childrenListNode.addStyleClass("children");
Note: See TracChangeset for help on using the changeset viewer.