Commit 4af3c7fb authored by jbroman@chromium.org's avatar jbroman@chromium.org

Prevent inherited style from propagating into a plugin placeholder.

Without setting 'all: initial', it's possible for text colours and such to be
inherited by the placeholder, which is unexpected.

TEST=fast/plugins/plugin-placeholder-inherit.html
BUG=364716

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184878

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

git-svn-id: svn://svn.chromium.org/blink/trunk@185298 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c9b0d44c
<!DOCTYPE html>
<link rel="stylesheet" href="plugin-placeholder.css">
<div class="plugin">
<div class="plugin-placeholder">
<div class="plugin-placeholder-content">
<div class="plugin-placeholder-message">
This test fails if this text is red, underlined, or uppercase.
</div>
</div>
</div>
</div>
<!DOCTYPE html>
<!-- These properties should not propagate into the placeholder. -->
<style>
body {
color: red;
text-decoration: underline;
text-transform: uppercase;
}
</style>
<!-- The message inserted below should be shown with some suitable style. -->
<embed type="application/x-fake-plugin"></embed>
<script>
var plugin = document.querySelector("embed");
internals.forcePluginPlaceholder(plugin, { message: "This test fails if this text is red, underlined, or uppercase." });
</script>
......@@ -5,6 +5,7 @@
}
.plugin-placeholder {
all: initial;
width: 100%;
height: 100%;
overflow: hidden;
......
......@@ -8,6 +8,7 @@ installClass('PluginPlaceholderElement', function(PluginPlaceholderElementProtot
// FIXME: Load this from a .css file.
var styleSource =
'#plugin-placeholder {' +
' all: initial;' +
' width: 100%;' +
' height: 100%;' +
' overflow: hidden;' +
......
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