зеркало из https://github.com/mozilla/pjs.git
Bug 580160. Test plugin needs to invalidate itself if its size changes. r=josh
This commit is contained in:
Родитель
2fd2eb71de
Коммит
bedf0d6189
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<embed type="application/x-test" style="width:200px; height:400px;"></embed>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<embed type="application/x-test" id="p"
|
||||
style="position:fixed; width:200px; height:200px;"></embed>
|
||||
<script>
|
||||
var p = document.getElementById("p");
|
||||
function doTest() {
|
||||
p.style.height = "400px";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1459,5 +1459,6 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
|
|||
== 571347-3.html 571347-3-ref.html
|
||||
== 572598-1.html 572598-ref.html
|
||||
== 574898-1.html 574898-ref.html
|
||||
== 580160-1.html 580160-1-ref.html
|
||||
== 579349-1.html 579349-1-ref.html
|
||||
== 581317-1.html 581317-1-ref.html
|
||||
|
|
|
@ -939,6 +939,17 @@ NPError
|
|||
NPP_SetWindow(NPP instance, NPWindow* window)
|
||||
{
|
||||
InstanceData* instanceData = (InstanceData*)(instance->pdata);
|
||||
|
||||
if (instanceData->scriptableObject->drawMode == DM_DEFAULT &&
|
||||
(instanceData->window.width != window->width ||
|
||||
instanceData->window.height != window->height)) {
|
||||
NPRect r;
|
||||
r.left = r.top = 0;
|
||||
r.right = window->width;
|
||||
r.bottom = window->height;
|
||||
NPN_InvalidateRect(instance, &r);
|
||||
}
|
||||
|
||||
void* oldWindow = instanceData->window.window;
|
||||
pluginDoSetWindow(instanceData, window);
|
||||
if (instanceData->hasWidget && oldWindow != instanceData->window.window) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче