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

Unified Diff: sky/sdk/lib/framework/layout2.dart

Issue 1144193004: Add a simple_render_tree example (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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/sdk/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/layout2.dart
diff --git a/sky/sdk/lib/framework/layout2.dart b/sky/sdk/lib/framework/layout2.dart
index e3773e2bcc67bea48bdb19bafce41577409a2637..a3d348be3c3bf165655f6a76d62623d78bfc76db 100644
--- a/sky/sdk/lib/framework/layout2.dart
+++ b/sky/sdk/lib/framework/layout2.dart
@@ -228,7 +228,7 @@ abstract class RenderNode extends AbstractNode {
var ancestor = this;
while (ancestor.parent != null)
ancestor = ancestor.parent;
- assert(ancestor is Screen);
+ assert(ancestor is RenderView);
ancestor.paintFrame();
}
void paint(RenderNodeDisplayList canvas) { }
@@ -450,11 +450,11 @@ abstract class RenderBox extends RenderNode {
}
-// SCREEN LAYOUT MANAGER
+// RENDER VIEW LAYOUT MANAGER
-class Screen extends RenderNode {
+class RenderView extends RenderNode {
- Screen({
+ RenderView({
RenderBox root,
this.timeForRotation: const Duration(microseconds: 83333)
}) {
@@ -474,7 +474,7 @@ class Screen extends RenderNode {
RenderBox _root;
RenderBox get root => _root;
void set root (RenderBox value) {
- assert(root != null);
+ assert(value != null);
_root = value;
adoptChild(_root);
markNeedsLayout();
@@ -547,12 +547,12 @@ class EdgeDims {
class BlockParentData extends BoxParentData with ContainerParentDataMixin<RenderBox> { }
-class BlockBox extends RenderBox with ContainerRenderNodeMixin<RenderBox, BlockParentData> {
+class RenderBlock extends RenderBox with ContainerRenderNodeMixin<RenderBox, BlockParentData> {
// lays out RenderBox children in a vertical stack
// uses the maximum width provided by the parent
// sizes itself to the height of its child stack
- BlockBox({
+ RenderBlock({
EdgeDims padding: const EdgeDims(0.0, 0.0, 0.0, 0.0)
}) {
_padding = padding;
« no previous file with comments | « sky/sdk/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698