Commit 6d37ddc6 authored by dglazkov@chromium.org's avatar dglazkov@chromium.org

Remove applyAuthorStyles flag from ShadowRoot.

This re-applies https://src.chromium.org/viewvc/blink?revision=165673&view=revision.

BUG=357151

Review URL: https://codereview.chromium.org/215313003

git-svn-id: svn://svn.chromium.org/blink/trunk@170271 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6e077c53
......@@ -839,13 +839,10 @@ crbug.com/334152 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/the-
crbug.com/341331 http/tests/xmlhttprequest/event-listener-gc.html [ Pass Failure ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-001.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-002.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-003.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-004.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/styles/test-001.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/styles/test-002.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/styles/test-004.html [ Skip ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-001.html [ Failure ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-002.html [ Failure ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-003.html [ Failure ]
crbug.com/323130 w3c/web-platform-tests/shadow-dom/styles/test-002.html [ Failure ]
crbug.com/246077 [ Linux ] virtual/android/fullscreen/parent-flow-inline-with-block-child.html [ Failure ]
......
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
PASS window.internals is defined.
PASS successfullyParsed is true
TEST COMPLETE
test a scoped style in document is applied to a node in shadow dom subtree when apply-author-styles is true.
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(255, 0, 0)"
test a style in an enclosing shadow dom tree is applied to a node in shadow subtree when apply-author-styles is true.
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(255, 0, 0)"
test a scoped style in an enclosing shadow dom tree is applied to a node in shadow subtree when apply-author-styles is true and the node is in the scope.
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(255, 0, 0)"
PASS borderColor is "rgb(0, 0, 0)"
test styles declared in enclosing shadow trees should be applied to an enclosed shadow tree whose apply-atur-styles is true.
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 255)"
PASS borderColor is "rgb(0, 0, 255)"
test a style in document is applied to nodes in multiple shadow subtrees when apply-author-styles is true.
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 255)"
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 255)"
PASS borderColor is "rgb(255, 0, 0)"
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(0, 0, 255)"
PASS borderColor is "rgb(0, 0, 0)"
PASS borderColor is "rgb(255, 0, 0)"
PASS borderColor is "rgb(0, 0, 255)"
PASS borderColor is "rgb(0, 0, 0)"
test a style is applied in document order.
PASS borderColor is "rgb(255, 255, 0)"
PASS borderColor is "rgb(0, 128, 0)"
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
Test whether scoped styles are applied in the cascade order or not.
If this test passes, rules which are declared in descendant scoping element are applied to a target element.
c.f. https://bugs.webkit.org/show_bug.cgi?id=103239
......@@ -8,8 +7,6 @@ A new scoped style is inserted into the grandparent node of the target. A class
PASS window.getComputedStyle(target).color is "rgb(255, 255, 0)"
A new scoped style is inserted into the parent node of the target. A tag rule in the inserted scoped style wins an id rule and a class rule in existing styles.
PASS window.getComputedStyle(target).color is "rgb(0, 0, 255)"
Append a new style element to the shadow root. The style's scoping element is the shadow root. Rules in the style should override other rules in ascendant (scoped) styles.
PASS window.getComputedStyle(targetInShadow).color is "rgb(0, 255, 0)"
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -42,16 +42,5 @@ document.getElementById("parent").appendChild(styleForParent);
debug("A new scoped style is inserted into the parent node of the target. A tag rule in the inserted scoped style wins an id rule and a class rule in existing styles.");
shouldBe("window.getComputedStyle(target).color", '"rgb(0, 0, 255)"');
var shadowRoot = target.createShadowRoot();
shadowRoot.innerHTML = '<span id="targetInShadow" class="target"></span>';
var targetInShadow = shadowRoot.getElementById("targetInShadow");
shadowRoot.applyAuthorStyles = true;
var styleInShadow = document.createElement("style");
styleInShadow.innerHTML = "span { color: lime; }";
shadowRoot.appendChild(styleInShadow);
debug("Append a new style element to the shadow root. The style's scoping element is the shadow root. Rules in the style should override other rules in ascendant (scoped) styles.");
shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 255, 0)"');
</script>
</html>
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
Test that rules in an inner scoped stylesheet don't override !important rules declared in an outer scoped stylesheet.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......@@ -16,12 +15,6 @@ Case5: The target element has any matched important rule declared in an author s
PASS getComputedStyle(target5).borderColor is "rgb(0, 255, 0)"
Case6: The target element has matched important rules. One is declared in an author stylesheet (not scoped) and the other is declared in a scoped stylesheet.
PASS getComputedStyle(target6).borderColor is "rgb(0, 0, 255)"
Case7: The target element has any matched important rule declared in an outer scoped stylesheet. The element is in a shadow dom tree whose shadow root has apply-author-styles true. The shadow dom tree has any other normal rules which match the element.
PASS getComputedStyle(target7).borderColor is "rgb(0, 128, 0)"
Case8: The target element in a shadow dom tree has any matched important rule declared in an outer scoped stylesheet in an enclosing shadow dom tree. The target element's shadow root has apply-author-styles true.
PASS getComputedStyle(target8).borderColor is "rgb(0, 128, 0)"
Case8': The target element is in a shadow dom tree. An enclosing shadow dom tree has some stylesheet which declares an important rule. The target element's shadow root has apply-author-styles false.
PASS getComputedStyle(target8).borderColor is "rgb(0, 0, 255)"
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -39,7 +39,6 @@ div#id2 { border-color: yellow; }
</style>
<div id="id4"></div>
</div>
<div id="host1">Shadow Host</div>
</div>
<div>
<style scoped>
......@@ -53,12 +52,6 @@ div#id2 { border-color: yellow; }
</style>
<span id="id6"></span>
</div>
<div>
<style scoped>
div { border-color: red;}
</style>
<div id="host2">Shadow Host</div>
</div>
</body>
<script>
description("Test that rules in an inner scoped stylesheet don't override !important rules declared in an outer scoped stylesheet.");
......@@ -86,31 +79,5 @@ shouldBe('getComputedStyle(target5).borderColor', '"rgb(0, 255, 0)"');
debug("Case6: The target element has matched important rules. One is declared in an author stylesheet (not scoped) and the other is declared in a scoped stylesheet.");
var target6 = document.getElementById("id6");
shouldBe('getComputedStyle(target6).borderColor', '"rgb(0, 0, 255)"');
debug("Case7: The target element has any matched important rule declared in an outer scoped stylesheet. The element is in a shadow dom tree whose shadow root has apply-author-styles true. The shadow dom tree has any other normal rules which match the element.");
var host1 = document.getElementById("host1");
var shadowRoot1 = host1.createShadowRoot();
shadowRoot1.applyAuthorStyles = true;
shadowRoot1.innerHTML = '<style>div#shadow1 { color: blue; }</style><div id="shadow1"></div>';
var target7 = shadowRoot1.getElementById("shadow1");
shouldBe('getComputedStyle(target7).borderColor', '"rgb(0, 128, 0)"');
debug("Case8: The target element in a shadow dom tree has any matched important rule declared in an outer scoped stylesheet in an enclosing shadow dom tree. The target element's shadow root has apply-author-styles true.");
var host2 = document.getElementById("host2");
var shadowRoot2 = host2.createShadowRoot();
shadowRoot2.applyAuthorStyles = false;
shadowRoot2.innerHTML = '<style>div { border-color: green !important; }</style><div id="shadow2"></div>';
var hostInShadowTree2 = shadowRoot2.getElementById("shadow2");
var shadowRoot3 = hostInShadowTree2.createShadowRoot();
shadowRoot3.applyAuthorStyles = true;
shadowRoot3.innerHTML = '<style>div#shadow3 { border-color: blue; }</style><div id="shadow3"></div>';
var target8 = shadowRoot3.getElementById("shadow3");
shouldBe('getComputedStyle(target8).borderColor', '"rgb(0, 128, 0)"');
debug("Case8': The target element is in a shadow dom tree. An enclosing shadow dom tree has some stylesheet which declares an important rule. The target element's shadow root has apply-author-styles false.");
shadowRoot3.applyAuthorStyles = false;
shouldBe('getComputedStyle(target8).borderColor', '"rgb(0, 0, 255)"');
</script>
</html>
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -16,7 +16,6 @@ gc(true);
try { shadow.innerHTML = "Hello"; } catch(e) { }
shadow.appendChild(document.createElement("span"));
shadow.applyAuthorStyles = false;
document.body.innerHTML = "PASS unless crash.";
</script>
......
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
Test the case: a treescope has some style element and a new style is inserted into its parent treescope.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(getNodeInTreeOfTrees('host1/host2/target')).color is "rgb(0, 128, 0)"
PASS successfullyParsed is true
TEST COMPLETE
<!doctype html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="resources/shadow-dom.js"></script>
<style>
span { color: red; }
</style>
</head>
<body>
<div id='sandbox'></div>
<pre id='console'></pre>
</body>
<script>
description('Test the case: a treescope has some style element and a new style is inserted into its parent treescope.')
sandbox.appendChild(
createDOM('div', {'id': 'host1'},
createShadowRoot(
createDOM('div', {'id': 'host2'},
createShadowRoot(
createDOM('style', {},
document.createTextNode('div { color: red; }')),
createDOM('span', {'id': 'target'},
document.createTextNode('Hello')))))));
getNodeInTreeOfTrees('host1/host2/').applyAuthorStyles = true;
document.body.offsetLeft;
getNodeInTreeOfTrees('host1/').appendChild(
createDOM('style', {},
document.createTextNode('span { color: green; }')));
shouldBe("getComputedStyle(getNodeInTreeOfTrees('host1/host2/target')).color", '"rgb(0, 128, 0)"');
</script>
</html>
......@@ -7,11 +7,9 @@ if (window.testRunner)
function runTest() {
var shadow = host.createShadowRoot();
shadow.applyAuthorStyles = false;
shadow.innerHTML = "<div id='hostInShadow'><div class='parent'><p ishidden='false'>NotHidden</p><p ishidden='true' id='target'>Hidden</p></div></div>";
var innerShadow = shadow.getElementById('hostInShadow').createShadowRoot();
innerShadow.applyAuthorStyles = false;
innerShadow.innerHTML = "<style>content::content .parent [ishidden=true] { display: none; }</style><content>";
window.setTimeout(function() {
......
......@@ -7,7 +7,6 @@ if (window.testRunner)
function runTest() {
var shadow = host.createShadowRoot();
shadow.applyAuthorStyles = false;
shadow.innerHTML = "<style> [ishidden=true] { display: none; } </style><p ishidden='false'>NotHidden</p><p ishidden='true' id='target'>Hidden</p>";
var target = shadow.getElementById("target");
window.setTimeout(function() {
......
<!DOCTYPE html>
<html>
<body>
<div id="apply-author-style"><span style="background-color:#eef;border:solid;color:#fee;display:boxed-inline;font-size:24px;margin:2px;outline-color:#f00;padding-left:5px;text-align:start;text-decoration:underline;"></span></div>
<!-- <div id="no-apply-author-style"><span></span></div> -->
<div id="with-inline-style-declaration"><span style="background-color:#eef;border:none;color:#daa;display:boxed-inline;font-size:18px;margin:2px;outline-color:#f00;padding-left:5px;text-align:start;text-decoration:none;"></span></div>
<div id="try-to-overide-important"><input type="file" /></div>
<div id="change-apply-author-style-from-true-to-false"><div><span></span></div></div>
<div id="change-apply-author-style-from-false-to-true"><div><span style="background-color:#eef;border:solid;color:#fee;display:boxed-inline;font-size:24px;margin:2px;outline-color:#f00;padding-left:5px;text-align:start;text-decoration:underline;"></span></div></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
span {
background-color: #eef;
border: solid;
color: #fee;
display: boxed-inline;
font-size: 24px;
margin: 2px;
outline-color: #f00;
padding-left: 5px;
text-align: start;
text-decoration: underline;
}
input[type="file"] {
text-align: end;
}
</style>
</head>
<body>
<div id="apply-author-style"></div>
<div id="no-apply-author-style"></div>
<div id="with-inline-style-declaration"></div>
<div id="try-to-override-important"></div>
<div id="change-apply-author-style-from-true-to-false"></div>
<div id="change-apply-author-style-from-false-to-true"></div>
<script>
function shouldBe(a, b)
{
if (a != b) {
throw "failure:" + a + ": should be " + b;
}
}
function shouldNotBe(a, b)
{
if (a == b) {
throw "failure:" + a + ": should not be " + b;
}
}
function assertTrue(id, actual) {
if (!actual) {
throw "failure:" + id + ": assertTrue failed";
}
}
function assertFalse(id, actual) {
if (actual) {
throw "failure:" + id + ": assertFalse failed";
}
}
function renderApplyAuthorStyleCase() {
var div = document.createElement('div');
document.getElementById('apply-author-style').appendChild(div);
var shadowRoot = div.createShadowRoot();
assertFalse('default applyAuthorStyles', shadowRoot.applyAuthorStyles);
shadowRoot.applyAuthorStyles = true;
assertTrue('applyAuthorStyles should be true', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<span></span>';
}
function renderNoApplyAuthorStyleCase() {
var div = document.createElement('div');
document.getElementById('no-apply-author-style').appendChild(div);
var shadowRoot = div.createShadowRoot();
assertFalse('default applyAuthorStyles', shadowRoot.applyAuthorStyles);
shadowRoot.applyAuthorStyles = false;
assertFalse('applyAuthorStyles should be false', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<span></span>';
}
function renderApplyAuthorStyleWithInlineStyleDeclarationCase() {
var div = document.createElement('div');
document.getElementById('with-inline-style-declaration').appendChild(div);
var shadowRoot = div.createShadowRoot();
assertFalse('default applyAuthorStyles', shadowRoot.applyAuthorStyles);
shadowRoot.applyAuthorStyles = true;
assertTrue('applyAuthorStyles should be true', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<span style="border:none; color:#daa; font-size:18px; text-decoration:none"></span>';
}
function renderApplyAuthorStyleWithOverridingImportantPropertyCase() {
var div = document.createElement('div');
document.getElementById('try-to-override-important').appendChild(div);
var shadowRoot = div.createShadowRoot();
assertFalse('default applyAuthorStyles', shadowRoot.applyAuthorStyles);
shadowRoot.applyAuthorStyles = true;
assertTrue('applyAuthorStyles should be true', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<input type="file" />';
}
function testChangingApplyAuthorStyleFromTrueToFalse() {
var div = document.createElement('div');
document.getElementById('change-apply-author-style-from-true-to-false').appendChild(div);
var shadowRoot = div.createShadowRoot();
assertFalse('default applyAuthorStyles', shadowRoot.applyAuthorStyles);
shadowRoot.applyAuthorStyles = true;
assertTrue('applyAuthorStyles should be true', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<div><span id="test1"></span></div>';
div.offsetLeft;
var target = shadowRoot.getElementById('test1');
shouldBe(window.getComputedStyle(target).getPropertyValue('font-size'), "24px");
shouldBe(window.getComputedStyle(target).getPropertyValue('text-decoration'), "underline");
shadowRoot.applyAuthorStyles = false;
assertFalse('applyAuthorStyles should be false', shadowRoot.applyAuthorStyles);
div.offsetLeft;
shouldNotBe(window.getComputedStyle(target).getPropertyValue('font-size'), "24px");
shouldNotBe(window.getComputedStyle(target).getPropertyValue('text-decoration'), "underline");
}
function testChangingApplyAuthorStyleFromFalseToTrue() {
var div = document.createElement('div');
document.getElementById('change-apply-author-style-from-false-to-true').appendChild(div);
var shadowRoot = div.createShadowRoot();
shadowRoot.applyAuthorStyles = false;
assertFalse('applyAuthorStyles should be false', shadowRoot.applyAuthorStyles);
shadowRoot.innerHTML = '<div><span id="test2"></span></div>';
div.offsetLeft;
var target = shadowRoot.getElementById('test2');
shouldNotBe(window.getComputedStyle(target).getPropertyValue('font-size'), "24px");
shouldNotBe(window.getComputedStyle(target).getPropertyValue('text-decoration'), "underline");
shadowRoot.applyAuthorStyles = true;
assertTrue('applyAuthorStyles should be true', shadowRoot.applyAuthorStyles);
div.offsetLeft;
shouldBe(window.getComputedStyle(target).getPropertyValue('font-size'), "24px");
shouldBe(window.getComputedStyle(target).getPropertyValue('text-decoration'), "underline");
}
renderApplyAuthorStyleCase();
// Looks: regression.
// renderNoApplyAuthorStyleCase();
renderApplyAuthorStyleWithInlineStyleDeclarationCase();
renderApplyAuthorStyleWithOverridingImportantPropertyCase();
testChangingApplyAuthorStyleFromTrueToFalse();
testChangingApplyAuthorStyleFromFalseToTrue();
</script>
</body>
</html>
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
Test for issue 247275: shadow tree styles selects shadow host when a shadow root has apply-author-styles true.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test when one shadow root has apply-author-styles true
PASS borderColorOf('host/target') is "rgb(0, 128, 0)"
Test when an inert shadow root has apply-author-styles true
PASS borderColorOf('host/target') is "rgb(0, 0, 0)"
Test when one of shadow roots which are not out of compositing has apply-author-styles true
PASS borderColorOf('host/target') is "rgb(0, 128, 0)"
PASS successfullyParsed is true
TEST COMPLETE
<!doctype html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="resources/shadow-dom.js"></script>
</head>
<body>
<div id='sandbox'></div>
<pre id='console'></pre>
</body>
<script>
description('Test for issue 247275: shadow tree styles selects shadow host when a shadow root has apply-author-styles true.');
var sandbox = document.getElementById('sandbox');
function borderColorOf(selector) {
return window.getComputedStyle(getNodeInTreeOfTrees(selector)).borderColor;
}
function shouldHaveBorderColor(selector, color) {
shouldBeEqualToString('borderColorOf(\'' + selector + '\')', color);
}
function cleanUp() {
sandbox.innerHTML = '';
}
sandbox.appendChild(
createDOM('style', {},
document.createTextNode('div { border: 1px solid green; }')));
sandbox.appendChild(
createDOM('div', {'id': 'host'},
createShadowRoot(
createDOM('div', {'id': 'target'},
createShadowRoot({'applyAuthorStyles': 'true'},
createDOM('span', {'id': 'span'},
document.createTextNode('Hello')))))));
debug('Test when one shadow root has apply-author-styles true');
shouldHaveBorderColor('host/target', 'rgb(0, 128, 0)');
cleanUp();
sandbox.appendChild(
createDOM('style', {},
document.createTextNode('div { border: 1px solid green; }')));
sandbox.appendChild(
createDOM('div', {'id': 'host'},
createShadowRoot(
createDOM('div', {'id': 'target'},
createShadowRoot({'applyAuthorStyles': 'true'},
createDOM('span', {'id': 'spanA'},
document.createTextNode('Hello'))),
createShadowRoot(
createDOM('span', {'id': 'spanB'},
document.createTextNode('Hello'))),
document.createTextNode('child of target')))));
debug('Test when an inert shadow root has apply-author-styles true');
shouldHaveBorderColor('host/target', 'rgb(0, 0, 0)');
cleanUp();
sandbox.appendChild(
createDOM('style', {},
document.createTextNode('div { border: 1px solid green; }')));
sandbox.appendChild(
createDOM('div', {'id': 'host'},
createShadowRoot(
createDOM('div', {'id': 'target'},
createShadowRoot({'applyAuthorStyles': 'true'},
createDOM('span', {'id': 'spanA'},
document.createTextNode('Hello'))),
createShadowRoot(
createDOM('shadow', {}))),
document.createTextNode('child of target'))));
debug('Test when one of shadow roots which are not out of compositing has apply-author-styles true');
shouldHaveBorderColor('host/target', 'rgb(0, 128, 0)');
cleanUp();
</script>
</html>
CONSOLE WARNING: 'ShadowRoot.applyAuthorStyles' is deprecated.
PASS successfullyParsed is true
TEST COMPLETE
PASS getBackgroundColor(shadowRootWithKeyframe.getElementById('box')) is "rgb(0, 0, 255)"
PASS getBackgroundColor(shadowRootWithoutKeyframe.getElementById('box')) is "rgb(255, 0, 0)"
PASS getBackgroundColor(shadowRootWithApplyAuthorStyles.getElementById('box')) is "rgb(0, 128, 0)"
......@@ -16,7 +16,6 @@
<body>
<div id="d1"></div>
<div id="d2"></div>
<div id="d3"></div>
<div id="result"></div>
<script>
if (window.testRunner)
......@@ -34,23 +33,14 @@ shadowRootWithKeyframe.innerHTML = '<style>@-webkit-keyframes "anim" {' +
'<div id="box"></div>';
var shadowRootWithoutKeyframe = document.getElementById("d2").createShadowRoot();
shadowRootWithoutKeyframe.applyAuthorStyles = false;
shadowRootWithoutKeyframe.innerHTML = '<style>' +
'#box { height: 100px; width: 100px; background: red; ' +
'-webkit-animation: "anim" 0.5s both; }</style>' +
'<div id="box"></div>';
var shadowRootWithApplyAuthorStyles = document.getElementById("d3").createShadowRoot();
shadowRootWithApplyAuthorStyles.applyAuthorStyles = true;
shadowRootWithApplyAuthorStyles.innerHTML = '<style>' +
'#box { height: 100px; width: 100px; background: red; ' +
'-webkit-animation: "anim" 0.5s both; }</style>' +
'<div id="box"></div>';
window.setTimeout(function() {
shouldBe("getBackgroundColor(shadowRootWithKeyframe.getElementById('box'))", '"rgb(0, 0, 255)"');
shouldBe("getBackgroundColor(shadowRootWithoutKeyframe.getElementById('box'))", '"rgb(255, 0, 0)"');
shouldBe("getBackgroundColor(shadowRootWithApplyAuthorStyles.getElementById('box'))", '"rgb(0, 128, 0)"');
if (window.testRunner)
testRunner.notifyDone();
}, 1000);
......
......@@ -28,7 +28,7 @@
NoInterfaceObject
] interface ShadowRoot : DocumentFragment {
readonly attribute Element activeElement;
[DeprecateAs=ShadowRootApplyAuthorStyles] attribute boolean applyAuthorStyles;
[ImplementedAs=olderShadowRootForBindings] readonly attribute ShadowRoot olderShadowRoot;
[TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds, RaisesException=Setter] attribute DOMString innerHTML;
......
......@@ -673,9 +673,6 @@ String UseCounter::deprecationMessage(Feature feature)
case PrefixedPutImageDataHD:
return "'CanvasRenderingContext2D.webkitPutImageDataHD' is deprecated. Please use putImageData instead.";
case ShadowRootApplyAuthorStyles:
return "'ShadowRoot.applyAuthorStyles' is deprecated.";
case PrefixedSpeechAttribute:
return "The 'x-webkit-speech' input field attribute is deprecated. Please use the JavaScript API instead.";
......@@ -691,7 +688,6 @@ String UseCounter::deprecationMessage(Feature feature)
case PrefixedCancelRequestAnimationFrame:
return "'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead.";
// Features that aren't deprecated don't have a deprecation message.
default:
return String();
}
......
......@@ -281,7 +281,6 @@ public:
PrefixedPutImageDataHD = 266,
PrefixedImageSmoothingEnabled = 267,
UnprefixedImageSmoothingEnabled = 268,
ShadowRootApplyAuthorStyles = 269,
PromiseConstructor = 270,
PromiseCast = 271,
PromiseReject = 272,
......
......@@ -2,7 +2,7 @@
Use a class to apply touch-action so that we can easily manually check
the tests for consistent behavior on IE10 as well.
*/
.ta-none {
* /deep/ .ta-none {
-ms-touch-action: none;
touch-action: none;
}
......
......@@ -17,7 +17,6 @@ window.addEventListener('load', function() {
}
tree.parentElement.removeChild(tree);
var shadowRoot = host.createShadowRoot();
shadowRoot.applyAuthorStyles = true;
shadowRoot.appendChild(tree);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment