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

Unified Diff: sky/sdk/lib/rendering/box.dart

Issue 1211573003: Fill out some more documentation about building RenderBox subclasses. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
Index: sky/sdk/lib/rendering/box.dart
diff --git a/sky/sdk/lib/rendering/box.dart b/sky/sdk/lib/rendering/box.dart
index 0d0b624c4e88f8fb9830994ff4d19c44638b0e7f..b5a961340538f3dcc39215d828648c7ab653c0ba 100644
--- a/sky/sdk/lib/rendering/box.dart
+++ b/sky/sdk/lib/rendering/box.dart
@@ -1133,9 +1133,12 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
}
-// DEFAULT BEHAVIORS FOR RENDERBOX CONTAINERS
+// HELPER METHODS FOR RENDERBOX CONTAINERS
abstract class RenderBoxContainerDefaultsMixin<ChildType extends RenderBox, ParentDataType extends ContainerParentDataMixin<ChildType>> implements ContainerRenderObjectMixin<ChildType, ParentDataType> {
+ // This class, by convention, doesn't override any members of the superclass.
+ // It only provides helper functions that subclasses can call.
+
double defaultGetDistanceToFirstActualBaseline(TextBaseline baseline) {
assert(!needsLayout);
RenderBox child = firstChild;

Powered by Google App Engine
This is Rietveld 408576698