Closed Bug 449781 Opened 12 years ago Closed 12 years ago

Dragging a zoomed tab applies zoom to chrome


(Core :: DOM: Navigation, defect, major)

Not set





(Reporter: bzbarsky, Assigned: bzbarsky)




(1 file)


1) Load a page in a tab
2) Zoom in a few times
3) Drag the tab to a different window

ACTUAL RESULTS: Chrome in the different window gets the zoom applied

EXPECTED RESULTS: don't mess with me chrome, I tells you!

Many thanks to for spotting this.
Oh, this is fun.  Apparently it's been broken all along, actually, for cases when a subdocument went display:none then back to visible.  We just never ran into it much, because apparently we don't run into too much trouble if multiple content frames share the same device context?

That's what's going on here: the content document ends up with the chrome device context, because unlike DocumentViewerImpl::Init (which gets the device context passed in), DocumentViewerImpl::Show just grabs the device context off the parent widget... which is SO the wrong thing to do.
Attached patch Patch to fixSplinter Review
roc, any idea how to test this?  Basically we're screwing up the pixel scale on our parent frame's device context....

If DrawWindow uses the same device context as normal painting, it would be pretty easy to write a reftest for this using enablePrivilege, I guess.  Have a child which is hidden-visibility, set it to display:none, then display:whatever, then zoom the child and compare to our initial state, or something.  Would that work?
Attachment #332970 - Flags: superreview?
Attachment #332970 - Flags: review?(roc)
Attachment #332970 - Flags: superreview? → superreview?(jst)
Duplicate of this bug: 449814
OS: Mac OS X → All
Hardware: PC → All
Version: unspecified → Trunk
Will bug 408496 be fixed, or is it maybe related?
Maybe.  Hard to say from that bug.
Attachment #332970 - Flags: superreview?(jst) → superreview+
Pushed this, with a mochitest.  I added a little mochitest helper file for doing reftest-like stuff.
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.