Changeset 128323 in webkit


Ignore:
Timestamp:
Sep 12, 2012 9:16:14 AM (12 years ago)
Author:
morrita@google.com
Message:

[Shadow DOM] Unpolished elements should reject author shadows
https://bugs.webkit.org/show_bug.cgi?id=96404

Reviewed by Dimitri Glazkov.

Source/WebCore:

Gave areAuthorShadowsAllowed() overrides for these replaced elements
which aren't author shadow ready.

No new tests. Covered by existing tests.

  • html/HTMLCanvasElement.h: Did areAuthorShadowsAllowed() overrride.
  • html/HTMLFieldSetElement.h: Did areAuthorShadowsAllowed() overrride.
  • html/HTMLFrameElementBase.h: Did areAuthorShadowsAllowed() overrride.
  • html/HTMLMediaElement.h: Did areAuthorShadowsAllowed() overrride.
  • html/HTMLPlugInElement.h: Did areAuthorShadowsAllowed() overrride.
  • html/HTMLSelectElement.h: Did areAuthorShadowsAllowed() overrride.

LayoutTests:

  • Added setAuthorShadowDOMForAnyElementEnabled() calls to make tests works.
  • UPdated shadow-disable.html to capture the disabled elements.
  • fast/dom/shadow/shadow-disable-expected.txt:
  • fast/dom/shadow/shadow-disable.html:
  • fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html:
  • fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html:
  • fast/dom/shadow/shadowdom-for-media.html:
  • platform/chromium/TestExpectations:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128318 r128323  
     12012-09-12  MORITA Hajime  <morrita@google.com>
     2
     3        [Shadow DOM] Unpolished elements should reject author shadows
     4        https://bugs.webkit.org/show_bug.cgi?id=96404
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        - Added setAuthorShadowDOMForAnyElementEnabled() calls to make tests works.
     9        - UPdated shadow-disable.html to capture the disabled elements.
     10
     11        * fast/dom/shadow/shadow-disable-expected.txt:
     12        * fast/dom/shadow/shadow-disable.html:
     13        * fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html:
     14        * fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html:
     15        * fast/dom/shadow/shadowdom-for-media.html:
     16        * platform/chromium/TestExpectations:
     17
    1182012-09-12  Dominic Mazzoni  <dmazzoni@google.com>
    219
  • trunk/LayoutTests/fast/dom/shadow/shadow-disable-expected.txt

    r127108 r128323  
    1212SECTION
    1313PASS new WebKitShadowRoot(element) is not null
    14 AUDIO
    15 PASS new WebKitShadowRoot(element) is not null
    16 VIDEO
    17 PASS new WebKitShadowRoot(element) is not null
    18 SELECT
    19 PASS new WebKitShadowRoot(element) is not null
    2014TEXTAREA
    2115PASS new WebKitShadowRoot(element) is not null
     
    2418tref
    2519PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
     20AUDIO
     21PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
     22VIDEO
     23PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
     24SELECT
     25PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
    2626PASS successfullyParsed is true
    2727
  • trunk/LayoutTests/fast/dom/shadow/shadow-disable.html

    r127108 r128323  
    2525    document.createElement('a'),
    2626    document.createElement('section'),
    27     document.createElement('audio'),
    28     document.createElement('video'),
    29     document.createElement('select'),
    3027    document.createElement('textarea')
    3128];
     
    3330var elementsToFail = [
    3431    document.createElement('input'),
    35     document.getElementById('tref')
     32    document.getElementById('tref'),
     33    document.createElement('audio'),
     34    document.createElement('video'),
     35    document.createElement('select')
    3636];
    3737
  • trunk/LayoutTests/fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html

    r123713 r128323  
    1212
    1313<script>
     14if (window.internals)
     15    window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
    1416var host = document.getElementById('host');
    1517var shadowRoot = new WebKitShadowRoot(host);
  • trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html

    r126248 r128323  
    3131    if (window.testRunner)
    3232        testRunner.dumpAsText();
     33    if (window.internals)
     34        window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
    3335
    3436    for (var i = 0; i < elems.length; ++i) {
  • trunk/LayoutTests/fast/dom/shadow/shadowdom-for-media.html

    r122816 r128323  
    1717    return shadowRoot;
    1818}
     19
     20if (window.internals)
     21    window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
    1922
    2023var shadowRootForVideoWithControls = addShadowDOM(videoWithControls);
  • trunk/Source/WebCore/ChangeLog

    r128322 r128323  
     12012-09-12  MORITA Hajime  <morrita@google.com>
     2
     3        [Shadow DOM] Unpolished elements should reject author shadows
     4        https://bugs.webkit.org/show_bug.cgi?id=96404
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Gave areAuthorShadowsAllowed() overrides for these replaced elements
     9        which aren't author shadow ready.
     10
     11        No new tests. Covered by existing tests.
     12
     13        * html/HTMLCanvasElement.h: Did areAuthorShadowsAllowed() overrride.
     14        * html/HTMLFieldSetElement.h: Did areAuthorShadowsAllowed() overrride.
     15        * html/HTMLFrameElementBase.h: Did areAuthorShadowsAllowed() overrride.
     16        * html/HTMLMediaElement.h: Did areAuthorShadowsAllowed() overrride.
     17        * html/HTMLPlugInElement.h: Did areAuthorShadowsAllowed() overrride.
     18        * html/HTMLSelectElement.h: Did areAuthorShadowsAllowed() overrride.
     19
    1202012-09-12  Mark Pilgrim  <pilgrim@chromium.org>
    221
  • trunk/Source/WebCore/html/HTMLCanvasElement.h

    r122550 r128323  
    144144    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    145145    virtual void attach();
     146    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    146147
    147148    void reset();
  • trunk/Source/WebCore/html/HTMLFieldSetElement.h

    r122115 r128323  
    5656    virtual bool recalcWillValidate() const { return false; }
    5757    virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
     58    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    5859
    5960    static void invalidateDisabledStateUnder(Element*);
  • trunk/Source/WebCore/html/HTMLFrameElementBase.h

    r126131 r128323  
    5454    virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
    5555    virtual void attach();
     56    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    5657
    5758private:
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r128298 r128323  
    8787    void createShadowSubtree();
    8888    virtual void willAddAuthorShadowRoot() OVERRIDE;
     89    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    8990
    9091    virtual bool isVideo() const = 0;
  • trunk/Source/WebCore/html/HTMLPlugInElement.h

    r124954 r128323  
    6363    virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
    6464    virtual void collectStyleForAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
     65    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    6566
    6667    bool m_inBeforeLoadEventHandler;
  • trunk/Source/WebCore/html/HTMLSelectElement.h

    r125660 r128323  
    180180
    181181    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
     182    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
    182183
    183184    // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and HTMLHRElement objects.
Note: See TracChangeset for help on using the changeset viewer.