Commit c3bbc172 authored by schenney's avatar schenney Committed by Commit bot

Force layout and invalidation for new plugin content

Correct paint invalidation was not occurring for the plugin placeholder
content in Chromium when WebPluginContainer paint invalidation is
delayed until the paint invalidation phase of the document lifecycle.

Here we set the needs layout and needs full paint invalidation flags so that layout is re-done on the plugin content at the next opportunity.

Depends on Blink review https://codereview.chromium.org/1056893003

R=tommycli
BUG=472348

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

Cr-Commit-Position: refs/heads/master@{#324127}
parent 6ac071f7
......@@ -329,6 +329,12 @@ void LoadablePluginPlaceholder::DidFinishLoadingCallback() {
if (message_.length() > 0)
UpdateMessage();
// Ensure that we force a layout and paint invalidation for the new
// content. This will cause the container invalidation to be acted upon.
blink::WebFrame* frame = GetFrame();
blink::WebView* view = frame->view();
view->setNeedsLayoutAndFullPaintInvalidation();
// Wait for the placeholder to finish loading to hide the premade plugin.
// This is necessary to prevent a flicker.
if (premade_throttler_ && !placeholder_was_replaced_)
......
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