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

Unified Diff: sky/examples/raw/render_paragraph.dart

Issue 1155103003: Move RenderParagraph into layout2.dart (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 | « no previous file | sky/sdk/lib/framework/layout2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/render_paragraph.dart
diff --git a/sky/examples/raw/render_paragraph.dart b/sky/examples/raw/render_paragraph.dart
index 7092f93494e025e26960456d434c3f26ed097f39..32d6eebc4d017620dcd560f4b2c90acea76e290e 100644
--- a/sky/examples/raw/render_paragraph.dart
+++ b/sky/examples/raw/render_paragraph.dart
@@ -6,36 +6,6 @@ import 'dart:sky';
import 'package:sky/framework/app.dart';
import 'package:sky/framework/layout2.dart';
-class RenderParagraph extends RenderDecoratedBox {
- final String text;
- LayoutRoot _layoutRoot = new LayoutRoot();
- Document _document;
-
- RenderParagraph(String this.text) :
- super(new BoxDecoration(backgroundColor: 0xFFFFFFFF)) {
- _document = new Document();
- _layoutRoot.rootElement = _document.createElement('p');
- _layoutRoot.rootElement.appendChild(_document.createText(this.text));
- }
-
- void performLayout() {
- _layoutRoot.maxWidth = constraints.maxWidth;
- _layoutRoot.minWidth = constraints.minWidth;
- _layoutRoot.layout();
- width = _layoutRoot.rootElement.width;
- height = _layoutRoot.rootElement.height;
- }
-
- void hitTestChildren(HitTestResult result, { double x, double y }) {
- // defaultHitTestChildren(result, x: x, y: y);
- }
-
- void paint(RenderNodeDisplayList canvas) {
- super.paint(canvas);
- _layoutRoot.paint(canvas);
- }
-}
-
class RenderSolidColor extends RenderDecoratedBox {
final double desiredHeight;
final double desiredWidth;
« no previous file with comments | « no previous file | sky/sdk/lib/framework/layout2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698