提交 77ef2197 编写于 作者: H Hixie

Fix some minor warnings from the analyzer in the framework.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1162623011
上级 8ee5aa0b
......@@ -69,10 +69,10 @@ class InkWell extends Component implements ScrollClient {
// });
// }
// bool ancestorScrolled(Scrollable ancestor) {
bool ancestorScrolled(Scrollable ancestor) {
// _abortSplashes();
// return false;
// }
return false;
}
// void handleRemoved() {
// UINode node = parent;
......
......@@ -463,6 +463,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
void insert(RenderObjectWrapper child, dynamic slot) {
assert(slot == null || slot is RenderObject);
assert(root is ContainerRenderObjectMixin);
root.add(child.root, before: slot);
}
......@@ -648,6 +649,11 @@ class Paragraph extends RenderObjectWrapper {
super.syncRenderObject(old);
root.text = text;
}
void insert(RenderObjectWrapper child, dynamic slot) {
assert(false);
// Paragraph does not support having children currently
}
}
class FlexContainer extends MultiChildRenderObjectWrapper {
......@@ -691,6 +697,11 @@ class Image extends RenderObjectWrapper {
root.src = src;
root.requestedSize = size;
}
void insert(RenderObjectWrapper child, dynamic slot) {
assert(false);
// Image does not support having children currently
}
}
......
......@@ -36,7 +36,7 @@ class EdgeDims {
(left == other.left);
int get hashCode {
value = 373;
int value = 373;
value = 37 * value + top.hashCode;
value = 37 * value + left.hashCode;
value = 37 * value + bottom.hashCode;
......@@ -97,7 +97,7 @@ class BoxConstraints {
bool get isInfinite => maxWidth >= double.INFINITY || maxHeight >= double.INFINITY;
int get hashCode {
value = 373;
int value = 373;
value = 37 * value + minWidth.hashCode;
value = 37 * value + maxWidth.hashCode;
value = 37 * value + minHeight.hashCode;
......@@ -336,7 +336,7 @@ class RenderImage extends RenderBox {
// maintain the aspect ratio
if (requestedSize.width == null) {
if (requestedSize.height == null) {
size = constraints.constrain(new sky.Size(_image.width, _image.height));
size = constraints.constrain(new sky.Size(_image.width.toDouble(), _image.height.toDouble()));
} else {
double width = requestedSize.height * _image.width / _image.height;
size = constraints.constrain(new sky.Size(width, requestedSize.height));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册