Remove LayoutState.

The only bit that was still used was the
containingBlockLogicalWidthChanged check in
RenderBlock::widthAvailableToChildrenHasChanged.
a4f1e657ff
is the patch that added that code. I added a
test to confirm we still pass the test case
that code was added for.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/945003002
This commit is contained in:
Ojan Vafai
2015-02-20 14:02:42 -08:00
parent 08e0cb549c
commit 914fb9ce76
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
CONSOLE: unittest-suite-wait-for-done
CONSOLE: PASS: paragraph width should shrink
CONSOLE:
CONSOLE: All 1 tests passed.
CONSOLE: unittest-suite-success
DONE

View File

@@ -0,0 +1,33 @@
<style>
border-box {
background-color: pink;
box-sizing: border-box;
max-width: 300px;
padding: 0 5%;
}
paragraph {
display: paragraph;
}
</style>
<container style="width: 400px">
<border-box>
<paragraph>Even though the width of 'border-box' stays the same after it reaches 300px, the width available to its children decreases as its padding continues to expand. Because the padding is based off the width before it's constrained by min/max. This tests that we continue to layout the contents of border-box even when its own width remains the same.</paragraph>
</div>
</container>
<script>
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";
import "dart:sky";
void main() {
initUnit();
test("paragraph width should shrink", () {
expect(document.querySelector("paragraph").offsetWidth, equals(260));
document.querySelector("container").style["width"] = "800px";
expect(document.querySelector("paragraph").offsetWidth, equals(220));
});
}
</script>