On Wednesday, April 20, 2016 at 5:44:14 AM UTC-4, [email protected] wrote:
> I've tried increasing the dimensions of aDirtyRegion when calling 
> nsLayoutUtils::PaintFrame() from nsPresShell.cpp. 
> https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#6351
>  That didn't seem to make a difference.

I haven't tested this, but I'll try to point you in the right direction.

The place to start looking is probably this line in 
nsGfxScrollFrame::BuildDisplayList() [1] where we restrict the dirty rect 
(which is essentially the rect that needs to be repainted) to the scroll 
frame's "scroll port". For the page's root scroll frame, that's the viewport.

You may want to condition any modification you make to this line, to the scroll 
frame being the page's root scroll frame. The condition to test this is 
something like |mIsRoot && mOuter->PresContext()->IsRootContentDocument()|. 
(|mIsRoot| is true for the root scroll frame of any document, including an 
iframe. |IsRootContentDocument()| is only true for the top-level page you're 
viewing).

If you're using APZ (async panning/zooming; it's the default in e10s mode on 46 
and newer), you probably also want to adjust this line [2] which overwrites the 
dirty rect to be the "display port", which is an area larger than the scroll 
port that we pre-render so async panning can bring it into view without 
repainting, but still not (necessarily) as large as the entire document.

There may also be other places that need to be adjusted that I'm not aware of 
or not thinking of right now.

This probably goes without saying, but rendering the entire document will kill 
performance for large documents, so it's suitable for debugging only (I assume 
that's what you have in mind).

Hope that helps!

Cheers,
Botond

[1] 
https://dxr.mozilla.org/mozilla-central/rev/ae7413abfa4d3954a6a4ce7c1613a7100f367f9a/layout/generic/nsGfxScrollFrame.cpp#3145
[2] 
https://dxr.mozilla.org/mozilla-central/rev/ae7413abfa4d3954a6a4ce7c1613a7100f367f9a/layout/generic/nsGfxScrollFrame.cpp#3512
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to