Diff
Modified: trunk/LayoutTests/ChangeLog (128322 => 128323)
--- trunk/LayoutTests/ChangeLog 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/ChangeLog 2012-09-12 16:16:14 UTC (rev 128323)
@@ -1,3 +1,20 @@
+2012-09-12 MORITA Hajime <[email protected]>
+
+ [Shadow DOM] Unpolished elements should reject author shadows
+ https://bugs.webkit.org/show_bug.cgi?id=96404
+
+ Reviewed by Dimitri Glazkov.
+
+ - 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:
+
2012-09-12 Dominic Mazzoni <[email protected]>
AX: Refactor most AccessibilityRenderObject code into AccessibilityNodeObject
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-disable-expected.txt (128322 => 128323)
--- trunk/LayoutTests/fast/dom/shadow/shadow-disable-expected.txt 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-disable-expected.txt 2012-09-12 16:16:14 UTC (rev 128323)
@@ -11,18 +11,18 @@
PASS new WebKitShadowRoot(element) is not null
SECTION
PASS new WebKitShadowRoot(element) is not null
-AUDIO
-PASS new WebKitShadowRoot(element) is not null
-VIDEO
-PASS new WebKitShadowRoot(element) is not null
-SELECT
-PASS new WebKitShadowRoot(element) is not null
TEXTAREA
PASS new WebKitShadowRoot(element) is not null
INPUT
PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
tref
PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
+AUDIO
+PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
+VIDEO
+PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
+SELECT
+PASS new WebKitShadowRoot(element) threw exception Error: HIERARCHY_REQUEST_ERR: DOM Exception 3.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-disable.html (128322 => 128323)
--- trunk/LayoutTests/fast/dom/shadow/shadow-disable.html 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-disable.html 2012-09-12 16:16:14 UTC (rev 128323)
@@ -24,15 +24,15 @@
document.createElement('span'),
document.createElement('a'),
document.createElement('section'),
- document.createElement('audio'),
- document.createElement('video'),
- document.createElement('select'),
document.createElement('textarea')
];
var elementsToFail = [
document.createElement('input'),
- document.getElementById('tref')
+ document.getElementById('tref'),
+ document.createElement('audio'),
+ document.createElement('video'),
+ document.createElement('select')
];
for (var i = 0; i < elementsToSuccess.length; ++i) {
Modified: trunk/LayoutTests/fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html (128322 => 128323)
--- trunk/LayoutTests/fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html 2012-09-12 16:16:14 UTC (rev 128323)
@@ -11,6 +11,8 @@
</form>
<script>
+if (window.internals)
+ window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
var host = document.getElementById('host');
var shadowRoot = new WebKitShadowRoot(host);
</script>
Modified: trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html (128322 => 128323)
--- trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html 2012-09-12 16:16:14 UTC (rev 128323)
@@ -30,6 +30,8 @@
{
if (window.testRunner)
testRunner.dumpAsText();
+ if (window.internals)
+ window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
for (var i = 0; i < elems.length; ++i) {
var host = document.getElementById(elems[i]);
Modified: trunk/LayoutTests/fast/dom/shadow/shadowdom-for-media.html (128322 => 128323)
--- trunk/LayoutTests/fast/dom/shadow/shadowdom-for-media.html 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/LayoutTests/fast/dom/shadow/shadowdom-for-media.html 2012-09-12 16:16:14 UTC (rev 128323)
@@ -17,6 +17,9 @@
return shadowRoot;
}
+if (window.internals)
+ window.internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
+
var shadowRootForVideoWithControls = addShadowDOM(videoWithControls);
var oldestShadowRootForVideoWithControls = internals.oldestShadowRoot(videoWithControls);
var youngerShadowRootForVideoWithControls = internals.youngerShadowRoot(oldestShadowRootForVideoWithControls);
Modified: trunk/Source/WebCore/ChangeLog (128322 => 128323)
--- trunk/Source/WebCore/ChangeLog 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/ChangeLog 2012-09-12 16:16:14 UTC (rev 128323)
@@ -1,3 +1,22 @@
+2012-09-12 MORITA Hajime <[email protected]>
+
+ [Shadow DOM] Unpolished elements should reject author shadows
+ https://bugs.webkit.org/show_bug.cgi?id=96404
+
+ Reviewed by Dimitri Glazkov.
+
+ 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.
+
2012-09-12 Mark Pilgrim <[email protected]>
[Chromium] Remove unused allowScriptDespiteSettings function from PlatformSupport
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLCanvasElement.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -143,6 +143,7 @@
virtual void parseAttribute(const Attribute&) OVERRIDE;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void attach();
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
void reset();
Modified: trunk/Source/WebCore/html/HTMLFieldSetElement.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLFieldSetElement.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLFieldSetElement.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -55,6 +55,7 @@
virtual const AtomicString& formControlType() const;
virtual bool recalcWillValidate() const { return false; }
virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
static void invalidateDisabledStateUnder(Element*);
void refreshElementsIfNeeded() const;
Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLFrameElementBase.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -53,6 +53,7 @@
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
virtual void attach();
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
private:
virtual bool supportsFocus() const;
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -86,6 +86,7 @@
void createShadowSubtree();
virtual void willAddAuthorShadowRoot() OVERRIDE;
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
virtual bool isVideo() const = 0;
virtual bool hasVideo() const { return false; }
Modified: trunk/Source/WebCore/html/HTMLPlugInElement.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLPlugInElement.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLPlugInElement.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -62,6 +62,7 @@
virtual void detach();
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
bool m_inBeforeLoadEventHandler;
// Subclasses should use guardedDispatchBeforeLoadEvent instead of calling dispatchBeforeLoadEvent directly.
Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (128322 => 128323)
--- trunk/Source/WebCore/html/HTMLSelectElement.h 2012-09-12 16:11:28 UTC (rev 128322)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h 2012-09-12 16:16:14 UTC (rev 128323)
@@ -179,6 +179,7 @@
int nextSelectableListIndexPageAway(int startIndex, SkipDirection) const;
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
// m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and HTMLHRElement objects.
mutable Vector<HTMLElement*> m_listItems;