Commit 999fe8c8 authored by ccameron@chromium.org's avatar ccameron@chromium.org

Force software layer to redraw when it is resized.

Consider the following sequence of events:
1. The view is initialized with a size of 0x0
2. A frame comes in at a size of 50x50. Nothing is drawn.
3. The view is resized to 50x50.

We should re-draw the full frame at step 3, but we don't. This patch
makes it so that we do.

BUG=358450

Review URL: https://codereview.chromium.org/217283006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261465 0039d316-1c4b-4281-b951-d872f2087c98
parent bbea1df9
...@@ -2274,7 +2274,12 @@ void RenderWidgetHostViewMac::LayoutLayers() { ...@@ -2274,7 +2274,12 @@ void RenderWidgetHostViewMac::LayoutLayers() {
// in the layer being anchored to the top-left. Set the layer's frame // in the layer being anchored to the top-left. Set the layer's frame
// explicitly, since this is more reliable in practice. // explicitly, since this is more reliable in practice.
if (software_layer_) { if (software_layer_) {
[software_layer_ setFrame:new_background_frame]; bool frame_changed = !CGRectEqualToRect(
new_background_frame, [software_layer_ frame]);
if (frame_changed) {
[software_layer_ setFrame:new_background_frame];
[software_layer_ setNeedsDisplay];
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment