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

Side by Side Diff: sky/framework/layout.dart

Issue 1139123007: [Effen] remove the last traces of the 'display' property from the effen component library. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update test 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 unified diff | Download patch
« no previous file with comments | « sky/framework/fn.dart ('k') | sky/tests/framework/basic.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library layout; 1 library layout;
2 2
3 import 'node.dart'; 3 import 'node.dart';
4 import 'dart:sky' as sky; 4 import 'dart:sky' as sky;
5 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 // UTILS 7 // UTILS
8 8
9 // Bridge to legacy CSS-like style specification 9 // Bridge to legacy CSS-like style specification
10 // Eventually we'll replace this with something else 10 // Eventually we'll replace this with something else
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 if (child.parentData.flex != null) { 385 if (child.parentData.flex != null) {
386 child._additionalStylesFromParent = 'flex:${child.parentData.flex}'; 386 child._additionalStylesFromParent = 'flex:${child.parentData.flex}';
387 child._updateInlineStyleAttribute(); 387 child._updateInlineStyleAttribute();
388 } 388 }
389 child = child.parentData.nextSibling; 389 child = child.parentData.nextSibling;
390 } 390 }
391 } 391 }
392 392
393 } 393 }
394 394
395 class RenderCSSText extends RenderCSS { 395 class RenderCSSParagraph extends RenderCSSContainer {
396 396
397 RenderCSSText(debug, String newData) : super(debug) { 397 RenderCSSParagraph(debug) : super(debug);
398 data = newData;
399 }
400 398
401 static final Style _displayParagraph = new Style('display:paragraph'); 399 static final Style _displayParagraph = new Style('display:paragraph');
402 400
403 String stylesToClasses(List<Style> styles) { 401 String stylesToClasses(List<Style> styles) {
404 return super.stylesToClasses(styles) + ' ' + _displayParagraph._className; 402 return super.stylesToClasses(styles) + ' ' + _displayParagraph._className;
405 } 403 }
406 404
405 }
406
407 class RenderCSSInline extends RenderCSS {
408
409 RenderCSSInline(debug, String newData) : super(debug) {
410 data = newData;
411 }
412
413 static final Style _displayInline = new Style('display:inline');
414
415 String stylesToClasses(List<Style> styles) {
416 return super.stylesToClasses(styles) + ' ' + _displayInline._className;
417 }
418
407 sky.Element createSkyElement() { 419 sky.Element createSkyElement() {
408 return sky.document.createElement('div') 420 return sky.document.createElement('div')
409 ..setChild(new sky.Text()) 421 ..setChild(new sky.Text())
410 ..setAttribute('debug', debug.toString()); 422 ..setAttribute('debug', debug.toString());
411 } 423 }
412 424
413 void set data (String value) { 425 void set data (String value) {
414 (_skyElement.firstChild as sky.Text).data = value; 426 (_skyElement.firstChild as sky.Text).data = value;
415 } 427 }
416 428
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 print(prefix + node.toString() + _attributes(node)); 488 print(prefix + node.toString() + _attributes(node));
477 var children = node.getChildNodes(); 489 var children = node.getChildNodes();
478 prefix = prefix + ' '; 490 prefix = prefix + ' ';
479 for (var child in children) 491 for (var child in children)
480 _serialiseDOM(child, prefix); 492 _serialiseDOM(child, prefix);
481 } 493 }
482 494
483 void dumpState() { 495 void dumpState() {
484 _serialiseDOM(sky.document); 496 _serialiseDOM(sky.document);
485 } 497 }
OLDNEW
« no previous file with comments | « sky/framework/fn.dart ('k') | sky/tests/framework/basic.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698