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

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

Issue 1226113007: Add @override annotation to known overriden methods (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/lib/rendering/object.dart ('k') | sky/sdk/lib/rendering/sky_binding.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/paragraph.dart
diff --git a/sky/sdk/lib/rendering/paragraph.dart b/sky/sdk/lib/rendering/paragraph.dart
index 605e0950f7b117c6d1140ed5158dd44b1800465e..23c3d6e6ef4a934e4d21ccbc92d3026bab034138 100644
--- a/sky/sdk/lib/rendering/paragraph.dart
+++ b/sky/sdk/lib/rendering/paragraph.dart
@@ -10,6 +10,7 @@ import '../painting/text_style.dart';
abstract class InlineBase {
sky.Node _toDOM(sky.Document owner);
+ @override
String toString([String prefix = '']);
}
@@ -20,13 +21,18 @@ class InlineText extends InlineBase {
final String text;
+ @override
sky.Node _toDOM(sky.Document owner) {
return owner.createText(text);
}
+ @override
bool operator ==(other) => other is InlineText && text == other.text;
+
+ @override
int get hashCode => text.hashCode;
+ @override
String toString([String prefix = '']) => '${prefix}InlineText: "${text}"';
}
@@ -39,6 +45,7 @@ class InlineStyle extends InlineBase {
final TextStyle style;
final List<InlineBase> children;
+ @override
sky.Node _toDOM(sky.Document owner) {
sky.Element parent = owner.createElement('t');
style.applyToCSSStyle(parent.style);
@@ -48,6 +55,7 @@ class InlineStyle extends InlineBase {
return parent;
}
+ @override
bool operator ==(other) {
if (identical(this, other))
return true;
@@ -62,6 +70,7 @@ class InlineStyle extends InlineBase {
return true;
}
+ @override
int get hashCode {
int value = 373;
value = 37 * value + style.hashCode;
@@ -70,6 +79,7 @@ class InlineStyle extends InlineBase {
return value;
}
+ @override
String toString([String prefix = '']) {
List<String> result = [];
result.add('${prefix}InlineStyle:');
@@ -128,12 +138,14 @@ class RenderParagraph extends RenderBox {
_constraintsForCurrentLayout = constraints;
}
+ @override
double getMinIntrinsicWidth(BoxConstraints constraints) {
_layout(constraints);
return constraints.constrainWidth(
_applyFloatingPointHack(_layoutRoot.rootElement.minContentWidth));
}
+ @override
double getMaxIntrinsicWidth(BoxConstraints constraints) {
_layout(constraints);
return constraints.constrainWidth(
@@ -146,14 +158,17 @@ class RenderParagraph extends RenderBox {
_applyFloatingPointHack(_layoutRoot.rootElement.height));
}
+ @override
double getMinIntrinsicHeight(BoxConstraints constraints) {
return _getIntrinsicHeight(constraints);
}
+ @override
double getMaxIntrinsicHeight(BoxConstraints constraints) {
return _getIntrinsicHeight(constraints);
}
+ @override
double computeDistanceToActualBaseline(TextBaseline baseline) {
assert(!needsLayout);
_layout(constraints);
@@ -164,6 +179,7 @@ class RenderParagraph extends RenderBox {
}
}
+ @override
void performLayout() {
_layout(constraints);
sky.Element root = _layoutRoot.rootElement;
@@ -172,6 +188,7 @@ class RenderParagraph extends RenderBox {
_applyFloatingPointHack(root.height)));
}
+ @override
void paint(PaintingCanvas canvas, Offset offset) {
// Ideally we could compute the min/max intrinsic width/height with a
// non-destructive operation. However, currently, computing these values
@@ -189,7 +206,7 @@ class RenderParagraph extends RenderBox {
}
// we should probably expose a way to do precise (inter-glpyh) hit testing
-
+ @override
String debugDescribeSettings(String prefix) {
String result = '${super.debugDescribeSettings(prefix)}';
result += '${prefix}inline:\n${inline.toString("$prefix ")}\n';
« no previous file with comments | « sky/sdk/lib/rendering/object.dart ('k') | sky/sdk/lib/rendering/sky_binding.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698