Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 0fc755972d6d57de055a7ea9d31fa11733eaf13b..f4d20dd5838d2f20dd50019bd5b592b62d03ea57 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -725,7 +725,9 @@ void View::SchedulePaintInRect(const gfx::Rect& rect) { |
if (layer()) { |
layer()->SchedulePaint(rect); |
- } else if (parent_) { |
+ } |
+ |
+ if (parent_ && (!layer() || !layer()->fills_bounds_opaquely())) { |
jonross
2015/11/18 16:55:45
This will trigger for all schedule paints on a non
bruthig
2015/11/18 17:02:48
Agreed, I just want to make sure the following sce
bruthig
2015/11/18 17:46:42
Discussed offline.
|
// Translate the requested paint rect to the parent's coordinate system |
// then pass this notification up to the parent. |
parent_->SchedulePaintInRect(ConvertRectToParent(rect)); |
@@ -1384,8 +1386,14 @@ void View::OnPaintBorder(gfx::Canvas* canvas) { |
void View::SetFillsBoundsOpaquely(bool fills_bounds_opaquely) { |
// This method should not have the side-effect of creating the layer. |
- if (layer()) |
+ if (layer()) { |
layer()->SetFillsBoundsOpaquely(fills_bounds_opaquely); |
+ if (!fills_bounds_opaquely && parent_) { |
+ // Translate the requested paint rect to the parent's coordinate system |
+ // then pass this notification up to the parent. |
+ parent_->SchedulePaintInRect(ConvertRectToParent(bounds_)); |
+ } |
+ } |
} |
gfx::Vector2d View::CalculateOffsetToAncestorWithLayer( |