Changeset 183967 in webkit


Ignore:
Timestamp:
May 7, 2015 5:59:01 PM (9 years ago)
Author:
weinig@apple.com
Message:

Consider implementing Document.scrollingElement
<rdar://problem/20845213>
https://bugs.webkit.org/show_bug.cgi?id=143609

Reviewed by Simon Fraser.

Source/WebCore:

Add the non-compliant implementation of Document.scrollingElement that the spec,
found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement,
says we should have while we have non-compliant implementations of Element.scrollTop
and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).

Tests: fast/dom/Document/scrollingElement-quirks-mode.html

fast/dom/Document/scrollingElement-standards-mode.html

  • dom/Document.cpp:

(WebCore::Document::scrollingElement):

  • dom/Document.h:
  • dom/Document.idl:

LayoutTests:

  • fast/dom/Document/scrollingElement-quirks-mode-expected.txt: Added.
  • fast/dom/Document/scrollingElement-quirks-mode.html: Added.
  • fast/dom/Document/scrollingElement-standards-mode-expected.txt: Added.
  • fast/dom/Document/scrollingElement-standards-mode.html: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183956 r183967  
     12015-05-07  Sam Weinig  <sam@webkit.org>
     2
     3        Consider implementing Document.scrollingElement
     4        <rdar://problem/20845213>
     5        https://bugs.webkit.org/show_bug.cgi?id=143609
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/dom/Document/scrollingElement-quirks-mode-expected.txt: Added.
     10        * fast/dom/Document/scrollingElement-quirks-mode.html: Added.
     11        * fast/dom/Document/scrollingElement-standards-mode-expected.txt: Added.
     12        * fast/dom/Document/scrollingElement-standards-mode.html: Added.
     13
    1142015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r183965 r183967  
     12015-05-07  Sam Weinig  <sam@webkit.org>
     2
     3        Consider implementing Document.scrollingElement
     4        <rdar://problem/20845213>
     5        https://bugs.webkit.org/show_bug.cgi?id=143609
     6
     7        Reviewed by Simon Fraser.
     8
     9        Add the non-compliant implementation of Document.scrollingElement that the spec,
     10        found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement,
     11        says we should have while we have non-compliant implementations of Element.scrollTop
     12        and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
     13
     14        Tests: fast/dom/Document/scrollingElement-quirks-mode.html
     15               fast/dom/Document/scrollingElement-standards-mode.html
     16
     17        * dom/Document.cpp:
     18        (WebCore::Document::scrollingElement):
     19        * dom/Document.h:
     20        * dom/Document.idl:
     21
    1222015-05-07  Dean Jackson  <dino@apple.com>
    223
  • trunk/Source/WebCore/dom/Document.cpp

    r183710 r183967  
    14301430}
    14311431
     1432Element* Document::scrollingElement()
     1433{
     1434    // FIXME: When we fix https://bugs.webkit.org/show_bug.cgi?id=106133, this should be replaced with the full implementation
     1435    // of Document.scrollingElement() as specified at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement.
     1436
     1437    return body();
     1438}
     1439
    14321440/*
    14331441 * Performs three operations:
  • trunk/Source/WebCore/dom/Document.h

    r183185 r183967  
    382382    RefPtr<Range> caretRangeFromPoint(const LayoutPoint& clientPoint);
    383383
     384    Element* scrollingElement();
     385
    384386    String readyState() const;
    385387
  • trunk/Source/WebCore/dom/Document.idl

    r183021 r183967  
    342342    // http://www.w3.org/TR/2014/WD-dom-20140204/#dom-document-origin
    343343    readonly attribute DOMString origin;
     344
     345    readonly attribute Element scrollingElement;
    344346};
    345347
Note: See TracChangeset for help on using the changeset viewer.