Closed
Bug 616884
Opened 14 years ago
Closed 14 years ago
plugins shown when we don't want them to be on Linux
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: tnikkel, Assigned: tnikkel)
Details
Attachments
(3 files, 2 obsolete files)
1.34 KB,
patch
|
roc
:
review+
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
2.08 KB,
patch
|
roc
:
review+
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
1.36 KB,
patch
|
Details | Diff | Splinter Review |
This causes some ugly artifacts during page transition. I have a fix.
Assignee | ||
Comment 1•14 years ago
|
||
nsObjectFrame::CreateWidget creates the plugin widget with bounds (0,0,0,0). Then in nsPluginInstanceOwner::CreateWidget we initially place the plugin widget at 0,0 with the correct size and empty clip region (nothing shown, everything clipped out). But in nsWindow::SetWindowClipRegion we exit early because the existing clip region appears to be the same as the new region, because the existing clip region is zero width and height because it is the whole widget rect which hasn't been updated yet since nsObjectFrame::CreateWidget created it as (0,0,0,0). When going back to a page with a plugin (maybe not all plugins) this creates a short period of time where a rect at (0,0,plugin width,plugin height) has the old page contents but the rest is the new page.
Assignee | ||
Comment 2•14 years ago
|
||
If we haven't set a clip yet on the window we should not exit early if the existing and new regions are equal.
Assignee: nobody → tnikkel
Attachment #496009 -
Flags: review?(roc)
Assignee | ||
Comment 3•14 years ago
|
||
Part 1 alone fixes the bug I was seeing.
Assignee | ||
Comment 4•14 years ago
|
||
In the case I was debugging we created the plugin widget from an action triggered by nsObjectFrame::DidReflow. So in nsPluginInstanceOwner::CreateWidget we should try to use the position of the object frame instead of just putting the widget at 0,0. Without part 1 this improves the bug I was seeing by making the artifact be where the plugin is. But with part 1 this doesn't fix any problems that I've seen.
Attachment #496012 -
Flags: review?(roc)
Assignee | ||
Updated•14 years ago
|
Attachment #496012 -
Attachment description: Part 2. → Part 2. Use the position of the object frame instead of 0,0.
Assignee | ||
Comment 5•14 years ago
|
||
While looking at this code I noticed something on Windows. nsWindow::SetWindowClipRegion doesn't store the new rects if it is asked to intersect with the existing clip. Since we only use this function by calling it with intersect = true following by intersect = false in ConfigureChildren I think that this cannot cause anything to go wrong. So if we don't take this and there isn't a good reason for the existing behaviour we should probably add a comment mentioning this in the code.
Attachment #496016 -
Flags: review?(roc)
Assignee | ||
Updated•14 years ago
|
Attachment #496016 -
Attachment description: Part 3. → Part 3. Always store the clip rects on Windows.
Attachment #496009 -
Flags: review?(roc) → review+
Attachment #496012 -
Flags: review?(roc) → review+
Comment on attachment 496016 [details] [diff] [review] Part 3. Always store the clip rects on Windows. I think we should just add the comment.
Attachment #496016 -
Flags: review?(roc) → review-
Assignee | ||
Comment 7•14 years ago
|
||
Ok, I will land this comment addition instead of part 3.
Attachment #496016 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #496009 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #496012 -
Flags: approval2.0?
I think we should add a comment saying if you call it with TRUE for the intersect parameter then you should call it with FALSE soon afterwards because it doesn't updated the stored region.
Attachment #496009 -
Flags: approval2.0? → approval2.0+
Attachment #496012 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 10•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/291782dcd3f2 http://hg.mozilla.org/mozilla-central/rev/45239c06759c http://hg.mozilla.org/mozilla-central/rev/5eaab51cd937
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•