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

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

Issue 1217623002: Support for background images on cards, style demo home (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove unused file 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 118e78b84223e5e39c5ce78e5d5fbd42bf7a236e..c2fed81a53b86209f9044e99eec41922ca640352 100644
--- a/sky/sdk/lib/rendering/box.dart
+++ b/sky/sdk/lib/rendering/box.dart
@@ -963,6 +963,11 @@ class RenderDecoratedBox extends RenderProxyBox {
BoxDecoration get decoration => _painter.decoration;
void set decoration (BoxDecoration value) {
assert(value != null);
+ if (value.backgroundImage != null) {
+ if (_painter.decoration.backgroundImage != null)
+ _painter.decoration.backgroundImage.removeChangeListener(markNeedsPaint);
abarth-chromium 2015/06/26 23:35:59 Don't we need to removeChangeListener even if valu
jackson 2015/06/29 16:53:25 We do, thanks
+ value.backgroundImage.addChangeListener(markNeedsPaint);
+ }
if (value == _painter.decoration)
return;
_painter.decoration = value;

Powered by Google App Engine
This is Rietveld 408576698