Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadow-dom: Fixed indent style and performance improvement #210

Merged
merged 1 commit into from
Jun 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@
};
}

var inner_html = 'div::x-thumb { font-size: 30px; } '
+ 'div::xthumb { font-size: 30px; } '
+ 'div::-thumb { font-size: 30px; } '
+ 'div::thumb { font-size: 30px; }';

style = d.createElement('style');
style.innerHTML = '';
style.innerHTML += 'div::x-thumb { font-size: 30px; }';
style.innerHTML += 'div::xthumb { font-size: 30px; }';
style.innerHTML += 'div::-thumb { font-size: 30px; }';
style.innerHTML += 'div::thumb { font-size: 30px; }';
style.innerHTML = inner_html;
d.body.appendChild(style);

for (var val in elems) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,41 @@
<div id="log"></div>
<script>
test(unit(function (ctx) {
var d = newRenderedHTMLDocument(ctx);
var d = newRenderedHTMLDocument(ctx);

var host = d.createElement('div');
host.contentEditable = "true";
d.body.appendChild(host);
var host = d.createElement('div');
host.contentEditable = "true";
d.body.appendChild(host);

var s = createSR(host);
var s = createSR(host);

assert_equals(host.contentEditable, "true");
assert_equals(host.contentEditable, "true");
assert_equals(s.contentEditable, undefined);
}), 'contentEditable of shadow trees must be undefined when contentEditable attribute of shadow host is "true"');

test(unit(function (ctx) {
var d = newRenderedHTMLDocument(ctx);
var d = newRenderedHTMLDocument(ctx);

var host = d.createElement('div');
host.contentEditable = "false";
d.body.appendChild(host);
var host = d.createElement('div');
host.contentEditable = "false";
d.body.appendChild(host);

var s = createSR(host);
var s = createSR(host);

assert_equals(host.contentEditable, 'false');
assert_equals(host.contentEditable, 'false');
assert_equals(s.contentEditable, undefined);
}), 'contentEditable of shadow trees must be undefined when contentEditable of shadow host is "false"');

test(unit(function (ctx) {
var d = newRenderedHTMLDocument(ctx);
var d = newRenderedHTMLDocument(ctx);

var host = d.createElement('div');
d.body.appendChild(host);
d.body.contentEditable = "true";
var host = d.createElement('div');
d.body.appendChild(host);
d.body.contentEditable = "true";

var s = createSR(host);
assert_equals(host.contentEditable, 'inherit');
var s = createSR(host);

assert_equals(host.contentEditable, 'inherit');
assert_equals(s.contentEditable, undefined);
}), 'contentEditable of shadow trees must be undefined when contentEditable attribute of shadow host is "inherit"');
</script>
Expand Down