The display size in MVM for popup window is often never updated
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: hiro, Unassigned)
References
(Blocks 1 open bug)
Details
From bug 1683612 comment 12;
(In reply to Timothy Nikkel (:tnikkel) from comment #11)
Does the display size change later to a non-zero value? I would hope it does.
If the case of the scrollbar appears properly, the answer is yes, the display size was initially (0, 0) and it becomes a proper size. But in the case of the problem case, it seems the display size will never be resized correctly as far as I can tell.
Presumably this may be a problem when we want desktop zoom feature in popup window.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
I did track down this a bit. So what happens when the popup window size is changed is; nsDocumentViewer::SetBoundsWithFlags gets called, then we run though this code path, thus we call nsIFrame::InvalidateFrame.
But unfortunately, to set the display size in MVM it doesn't work, we need to call PresShell::ResizeReflow instead. But ResizeReflow checks UsesMobileViewportSizing(), which kind of makes sense because we don't need to trigger auto-shrink machinery on desktop. Maybe we can directly change MobileViewportManager::mDisplaySize from nsDocumentViewer::SetBoundsWithFlags? It looks awkward though.
Comment 2•4 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)
I did track down this a bit. So what happens when the popup window size is changed is; nsDocumentViewer::SetBoundsWithFlags gets called, then we run though this code path, thus we call nsIFrame::InvalidateFrame.
But unfortunately, to set the display size in MVM it doesn't work, we need to call PresShell::ResizeReflow instead. But ResizeReflow checks UsesMobileViewportSizing(), which kind of makes sense because we don't need to trigger auto-shrink machinery on desktop. Maybe we can directly change MobileViewportManager::mDisplaySize from nsDocumentViewer::SetBoundsWithFlags? It looks awkward though.
The SetWindowDimensions call in nsDocumentViewer::SetBoundsWithFlags should result in ResizeReflow getting called eventually, no?
Reporter | ||
Comment 3•4 years ago
|
||
No, because in the case the size is same, it's this condition.
Reporter | ||
Comment 4•4 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)
No, because in the case the size is same, it's this condition.
Then here.
Comment 5•4 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #4)
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)
No, because in the case the size is same, it's this condition.
Then here.
Okay, so the view has the right size but the presshell does not. Should we inform the MVM of the (potential) size change in nsDocumentViewer::SetBoundsWithFlags where we call InvalidateFrame so that it can update?
Reporter | ||
Updated•2 years ago
|
Description
•