mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 580160. Test plugin needs to invalidate itself if its size changes. r=josh
This commit is contained in:
parent
d434e271cb
commit
bb197a6e72
6
layout/reftests/bugs/580160-1-ref.html
Normal file
6
layout/reftests/bugs/580160-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<embed type="application/x-test" style="width:200px; height:400px;"></embed>
|
||||
</body>
|
||||
</html>
|
15
layout/reftests/bugs/580160-1.html
Normal file
15
layout/reftests/bugs/580160-1.html
Normal file
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user