Bug 1269444 - Move Plugin Zoom Value update into SetWindow call; r?bsmedberg
Currently, CSS Zoom is updated on calls to ResolutionMayHaveChanged.
However, this happens in between two calls in NPP_SetWindow, one for
widget repaint and then one for resolution updates. Not having CSS Zoom
updated during the first call to NPP_SetWindow would result in
desynchronized window updates in Adobe Flash. Therefore,
ResolutionMayHaveChanged is called on all NPP_SetWindow calls from
nsPluginFrame, meaning the plugin library will always have access to the
correct values via NPP_GetValue/NPP_SetValue.
MozReview-Commit-ID: 6BddqngxsKy
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -647,16 +647,18 @@ nsPluginFrame::CallSetWindow(bool aCheck
scaleFactor = 1.0;
}
size_t intScaleFactor = ceil(scaleFactor);
window->x = intBounds.x / intScaleFactor;
window->y = intBounds.y / intScaleFactor;
window->width = intBounds.width / intScaleFactor;
window->height = intBounds.height / intScaleFactor;
+ mInstanceOwner->ResolutionMayHaveChanged();
+
// This will call pi->SetWindow and take care of window subclassing
// if needed, see bug 132759. Calling SetWindow can destroy this frame
// so check for that before doing anything else with this frame's memory.
if (mInstanceOwner->UseAsyncRendering()) {
rv = pi->AsyncSetWindow(window);
}
else {
rv = window->CallSetWindow(pi);