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

Unified Diff: sky/framework/layout.dart

Issue 1137153002: Revert "[Effen] Move 'flex' out of CSS also." (Closed) Base URL: https://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/framework/fn.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/layout.dart
diff --git a/sky/framework/layout.dart b/sky/framework/layout.dart
index a17b8220170fa2b3e80542935b31bb8517cf17b3..5678fd88f35a839c39f05ea5533e5294ad1c360a 100644
--- a/sky/framework/layout.dart
+++ b/sky/framework/layout.dart
@@ -53,10 +53,6 @@ class ParentData {
detachSiblings();
}
void detachSiblings() { } // workaround for lack of inter-class mixins in Dart
- void merge(ParentData other) {
- // override this in subclasses to merge in data from other into this
- assert(other.runtimeType == this.runtimeType);
- }
}
abstract class RenderNode extends Node {
@@ -265,16 +261,8 @@ abstract class RenderCSS extends RenderBox {
return styles.map((s) => s._className).join(' ');
}
- String _inlineStyles = '';
- String _additionalStylesFromParent = ''; // used internally to propagate parentData settings to the child
-
void updateInlineStyle(String newStyle) {
- _inlineStyles = newStyle;
- _updateInlineStyleAttribute();
- }
-
- void _updateInlineStyleAttribute() {
- _skyElement.setAttribute('style', "$_inlineStyles;$_additionalStylesFromParent");
+ _skyElement.setAttribute('style', newStyle);
}
double get width {
@@ -332,14 +320,7 @@ class RenderCSSContainer extends RenderCSS with ContainerRenderNodeMixin<RenderC
}
-class FlexBoxParentData extends CSSParentData {
- int flex;
- void merge(FlexBoxParentData other) {
- if (other.flex != null)
- flex = other.flex;
- super.merge(other);
- }
-}
+class FlexBoxParentData extends CSSParentData { }
enum FlexDirection { Row }
@@ -370,21 +351,6 @@ class RenderCSSFlex extends RenderCSSContainer {
return super.stylesToClasses(styles) + ' ' + settings;
}
- void markNeedsLayout() {
- super.markNeedsLayout();
-
- // pretend we did the layout:
- RenderCSS child = _firstChild;
- while (child != null) {
- assert(child.parentData is FlexBoxParentData);
- if (child.parentData.flex != null) {
- child._additionalStylesFromParent = 'flex:${child.parentData.flex};';
- child._updateInlineStyleAttribute();
- }
- child = child.parentData.nextSibling;
- }
- }
-
}
class RenderCSSText extends RenderCSS {
« no previous file with comments | « sky/framework/fn.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698