Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: sky/examples/style/toolbar-layout.sky

Issue 850593003: Examples: move markAsLaidOut() to just before the return, so the asserts work (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/style/hex-layout.sky ('k') | sky/specs/style.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/style/toolbar-layout.sky
diff --git a/sky/examples/style/toolbar-layout.sky b/sky/examples/style/toolbar-layout.sky
index c806067e528d045fa22fefd71cbd1d3ec71a9273..037e219c2bf180ecb45b74a3409cbf07028cfc15 100644
--- a/sky/examples/style/toolbar-layout.sky
+++ b/sky/examples/style/toolbar-layout.sky
@@ -23,7 +23,6 @@ SKY MODULE
this.overflowChild = null;
}
function layout(width, height) {
- this.markAsLaidOut();
let children = null;
let loop = null;
if (height == null)
@@ -58,7 +57,7 @@ SKY MODULE
childHeight = childHeight.value;
else
childHeight = height;
- dims = child.layoutManager.layout(width, height);
+ dims = child.layoutManager.layout(null, height);
this.setChildSize(child, dims.width, dims.height);
} else {
dims = {
@@ -125,11 +124,15 @@ SKY MODULE
else
this.firstSkippedChild = this.overflowChild;
+ this.markAsLaidOut();
return {
width: width,
height: height,
}
}
+ function layoutDescendants() {
+ this.layout(node.width, node.height);
+ }
function getIntrinsicWidth() {
let width = this.node.getProperty('width');
if (typeof width != 'number') {
« no previous file with comments | « sky/examples/style/hex-layout.sky ('k') | sky/specs/style.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698