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:
parent
e1136c44d1
commit
96eb53d4ef
@ -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
|
28
engine/src/flutter/tests/editing/delete_block_contents.sky
Normal file
28
engine/src/flutter/tests/editing/delete_block_contents.sky
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user