setChildrenInline wasn't doing anything and childrenInlien always deferred to isRenderParagraph.

Also, add a test from the original webkit patch that called setChildrenInline in layoutBlock

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/748943002
This commit is contained in:
Rafael Weinstein 2014-11-21 15:16:58 -08:00
parent e1136c44d1
commit 96eb53d4ef
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,5 @@
Running 1 tests
ok 1 height of an editable block remains the same after adding block elements and removing them
1 tests
1 pass
0 fail

View File

@ -0,0 +1,28 @@
<sky>
<import src="../resources/chai.sky" />
<import src="../resources/mocha.sky" />
This test verifies that the height of an editable block remains the same after adding block elements and removing them.
<div contenteditable="true" style="border: solid blue" id="test"></div>
<script>
describe("height of an editable block", function(done) {
it("remains the same after adding block elements and removing them", function() {
var elem = document.getElementById("test");
var originalHeight = elem.offsetHeight;
var d = elem.appendChild(document.createElement('div'));
d.appendChild(document.createTextNode('aaa'));
d = elem.appendChild(document.createElement('div'));
d.appendChild(document.createTextNode('bbb'));
var newHeight = elem.offsetHeight;
while (elem.firstChild) {
elem.removeChild(elem.firstChild);
}
setTimeout(function() {
assert.equal(elem.offsetHeight, originalHeight);
done();
});
});
})
</script>
</sky>