Changeset 92124 in webkit


Ignore:
Timestamp:
Aug 1, 2011 5:25:53 AM (13 years ago)
Author:
hayato@chromium.org
Message:

Add support for getting an element in shadow root by its id into a window.internals object.
https://bugs.webkit.org/show_bug.cgi?id=64587

Reviewed by Hajime Morita.

.:

  • Source/autotools/symbols.filter:

Source/WebCore:

Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html

  • WebCore.exp.in:
  • testing/Internals.cpp:

(WebCore::Internals::getElementByIdInShadowRoot):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

  • win/WebKit2.def:
  • win/WebKit2CFLite.def:

LayoutTests:

  • fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt: Added.
  • fast/dom/shadow/get-element-by-id-in-shadow-root.html: Added.
  • fast/dom/shadow/resources/create-dom.js: Added.

(createShadow):
(createDom):

Location:
trunk
Files:
4 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r92123 r92124  
     12011-08-01  Hayato Ito  <hayato@chromium.org>
     2
     3        Add support for getting an element in shadow root by its id into a window.internals object.
     4        https://bugs.webkit.org/show_bug.cgi?id=64587
     5
     6        Reviewed by Hajime Morita.
     7
     8        * Source/autotools/symbols.filter:
     9
    1102011-08-01  Neil Roberts  <neil@linux.intel.com>
    211
  • trunk/LayoutTests/ChangeLog

    r92122 r92124  
     12011-08-01  Hayato Ito  <hayato@chromium.org>
     2
     3        Add support for getting an element in shadow root by its id into a window.internals object.
     4        https://bugs.webkit.org/show_bug.cgi?id=64587
     5
     6        Reviewed by Hajime Morita.
     7
     8        * fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt: Added.
     9        * fast/dom/shadow/get-element-by-id-in-shadow-root.html: Added.
     10        * fast/dom/shadow/resources/create-dom.js: Added.
     11        (createShadow):
     12        (createDom):
     13
    1142011-08-01  Yury Semikhatsky  <yurys@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r92122 r92124  
     12011-08-01  Hayato Ito  <hayato@chromium.org>
     2
     3        Add support for getting an element in shadow root by its id into a window.internals object.
     4        https://bugs.webkit.org/show_bug.cgi?id=64587
     5
     6        Reviewed by Hajime Morita.
     7
     8        Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
     9
     10        * WebCore.exp.in:
     11        * testing/Internals.cpp:
     12        (WebCore::Internals::getElementByIdInShadowRoot):
     13        * testing/Internals.h:
     14        * testing/Internals.idl:
     15
     162011-07-15  Hayato Ito  <hayato@chromium.org>
     17
     18        Add support for retrieving an element in TreeScope by id to window.internals object.
     19        https://bugs.webkit.org/show_bug.cgi?id=64587
     20
     21        Reviewed by Hajime Morita.
     22
     23        Test: fast/dom/shadow/get-element-by-id-in-shadow.html
     24
     25        * WebCore.exp.in:
     26        * testing/Internals.cpp:
     27        (WebCore::Internals::getElementByIdInTreeScope):
     28        * testing/Internals.h:
     29        * testing/Internals.idl:
     30
    1312011-08-01  Yury Semikhatsky  <yurys@chromium.org>
    232
  • trunk/Source/WebCore/WebCore.exp.in

    r92059 r92124  
    13431343__ZNK7WebCore9PageCache10frameCountEv
    13441344__ZNK7WebCore9PageCache21autoreleasedPageCountEv
     1345__ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE
    13451346__ZTVN7WebCore12ChromeClientE
    13461347__ZTVN7WebCore12JSDOMWrapperE
  • trunk/Source/WebCore/testing/Internals.cpp

    r92059 r92124  
    7171
    7272    return ShadowContentElement::create(document);
     73}
     74
     75Element* Internals::getElementByIdInShadowRoot(Node* shadowRoot, const String& id, ExceptionCode& ec)
     76{
     77    if (!shadowRoot || !shadowRoot->isShadowRoot()) {
     78        ec = INVALID_ACCESS_ERR;
     79        return 0;
     80    }
     81    return toShadowRoot(shadowRoot)->getElementById(id);
    7382}
    7483
  • trunk/Source/WebCore/testing/Internals.h

    r92059 r92124  
    5555    String shadowPseudoId(Element*, ExceptionCode&);
    5656    PassRefPtr<Element> createShadowContentElement(Document*, ExceptionCode&);
     57    Element* getElementByIdInShadowRoot(Node* shadowRoot, const String& id, ExceptionCode&);
    5758
    5859#if ENABLE(INSPECTOR)
  • trunk/Source/WebCore/testing/Internals.idl

    r92059 r92124  
    3737        DOMString shadowPseudoId(in Element element) raises (DOMException);
    3838        Element createShadowContentElement(in Document document) raises(DOMException);
     39        Element getElementByIdInShadowRoot(in Node shadowRoot, in DOMString id) raises(DOMException);
    3940
    4041        void setInspectorResourcesDataSizeLimits(in Document document, in long maximumResourcesContentSize, in long maximumSingleResourceContentSize) raises(DOMException);
  • trunk/Source/WebKit2/ChangeLog

    r92113 r92124  
     12011-08-01  Hayato Ito  <hayato@chromium.org>
     2
     3        Add support for getting an element in shadow root by its id into a window.internals object.
     4        https://bugs.webkit.org/show_bug.cgi?id=64587
     5
     6        Reviewed by Hajime Morita.
     7
     8        * win/WebKit2.def:
     9        * win/WebKit2CFLite.def:
     10
    1112011-08-01  Sheriff Bot  <webkit.review.bot@gmail.com>
    212
  • trunk/Source/WebKit2/win/WebKit2.def

    r92070 r92124  
    152152        ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
    153153        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
     154        ?getElementById@TreeScope@WebCore@@QBEPAVElement@2@ABVAtomicString@WTF@@@Z
    154155        ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
    155156        ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
  • trunk/Source/WebKit2/win/WebKit2CFLite.def

    r92079 r92124  
    144144        ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
    145145        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
     146        ?getElementById@TreeScope@WebCore@@QBEPAVElement@2@ABVAtomicString@WTF@@@Z
    146147        ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
    147148        ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVClientRect@1@@Z
  • trunk/Source/autotools/symbols.filter

    r92081 r92124  
    6161_ZNK7WebCore7Element10shadowRootEv;
    6262_ZNK7WebCore8Document4pageEv;
     63_ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
    6364local:
    6465_Z*;
Note: See TracChangeset for help on using the changeset viewer.