Partial fix.
If nsDisplayItem::RestoreState changes the state of an nsDisplayItem, that
invalidates any prior RetainedItems items sent to WebRender for it, and its
DisplayItemCache entry is invalid. Clear the cache index in the
nsDisplayItem.
RetainedDisplayListBuilder::PreProcessDisplayList doesn't have convenient access
to the DisplayItemCache, so don't clear the cache entry in the DisplayItemCache.
The cache itself will eventually realize the entry is unused and clear it.
Differential Revision: https://phabricator.services.mozilla.com/D97538
There's a couple of uses of const_cast here, but I think they are
reasonable. Conceptually the input parameter is a const (in that it
is not modified) but the output shouldn't be const (because the
caller is free to modify it if it wants to). If we're returning the
input as output then we should strip the const attribute, hence
the const_cast.
Depends on D97621
Differential Revision: https://phabricator.services.mozilla.com/D97622
In bug 1674935 we encountered a situation where NotifyApzTransaction was called more than once on a scroll frame in one paint transaction, clearing the scroll updates before they should have been. In that bug I moved the NotifyApzTransaction calls to happen at the end of one transaction for the non-wr code path., but I left the wr code path alone to reduce risk becase we didn't have proof the same could happen with wr. In this bug I will change how the wr code path works to ensure that this problem cannot happen.
Differential Revision: https://phabricator.services.mozilla.com/D96165
The original code doesn't work for "writing-mode:vertical-rl" because
its block flow direction is the opposite of "writing-mode:vertical-lr."
Differential Revision: https://phabricator.services.mozilla.com/D96786
Scroll frames can appear in multiple containers.
Notifying the scroll frame causes it to clear it list of scroll updates. So we lose the scroll updates prematurely.
Previously https://phabricator.services.mozilla.com/D88650 moved the notify from happening the first time the scroll frame was encountered in a container to when the container is finished.
This patch moves this handling out of the container state and into nsDisplayListBuilder.
The bug could still happen for webrender. I'll fix that in another bug to reduce scope and risk.
Differential Revision: https://phabricator.services.mozilla.com/D95926
This patch includes a couple of changes.
1) Notify contentful paint only during refresh driver ticks.
2) Not only the root document, sub document should also have their own
contentful paint entry.
3) Consider invisible text as contentful as well.
Differential Revision: https://phabricator.services.mozilla.com/D89498
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This patch includes a couple of changes.
1) Notify contentful paint only during refresh driver ticks.
2) Not only the root document, sub document should also have their own
contentful paint entry.
3) Consider invisible text as contentful as well.
Differential Revision: https://phabricator.services.mozilla.com/D89498
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
My previous patch somehow causes WR to crash and fall back to d2d on Windows,
see bug 1671591.
While I figure that out let's fix TB by restoring the previous behavior
for XUL.
Rename the Root frame type because it's super-confusing that IsRootFrame
is not equivalent to !GetParent().
Differential Revision: https://phabricator.services.mozilla.com/D94105
It's used as the offset of the visible rect, which is intended to be
relative to the layout viewport.
This is mostly hidden by the fact that we almost always
overwrite this value with the displayport rect offset.
Differential Revision: https://phabricator.services.mozilla.com/D90784
`IS_TRUE_OVERFLOW_CONTAINER` is defined in nsContainerFrame.h, but is
already used in several places in nsIFrame. It really should be an
nsIFrame's method.
Differential Revision: https://phabricator.services.mozilla.com/D92007
This allows it to be forward-declared (while a nested class cannot be),
such that headers files that use RectCallback by pointer or reference
do not need to include nsLayoutUtils.h.
This avoids including nsLayoutUtils.h in nsRange.h.
Differential Revision: https://phabricator.services.mozilla.com/D91685
Along with a dependent struct DirectDrawInfo.
This allows nsImageRenderer.h and CanvasRenderingContext2D.h to
avoid including nsLayoutUtils.h.
For nsImageRenderer.h in particular, a forward declaration is
not sufficient as nsImageRenderer stores SurfaceFromElementResult
by value.
A couple of method definitions elsewhere are moved out of line
to keep things compiling without including nsLayoutUtils.h in
additional headers.
Differential Revision: https://phabricator.services.mozilla.com/D91684
Realistically we're not going to bother investigating these, I suspect,
and Thunderbird seems to hit these too often in their tests.
Differential Revision: https://phabricator.services.mozilla.com/D75683
This patch covers thw low-hanging fruit: headers that either don't use
nsLayoutUtils.h at all, or where only method implementations that can
easily be moved to the .cpp file use it.
Differential Revision: https://phabricator.services.mozilla.com/D91504
Changes to nsIScrollableFrame.h cause the world to rebuild which I find annoying.
This removes the inclusion into Element.h which is responsible for the
world-rebuilding and is relatively easy to eliminate. A bunch of usages of
nsIScrollableFrame get moved from .h files into .cpp files and I include the
header into .cpp files as needed.
Differential Revision: https://phabricator.services.mozilla.com/D90735
This patch includes a couple of changes.
1) Notify contentful paint only during refresh driver ticks.
2) Not only the root document, sub document should also have their own
contentful paint entry.
3) Consider invisible text as contentful as well.
Differential Revision: https://phabricator.services.mozilla.com/D89498
We usually suppress background images in
nsCSSRendering::PaintStyleImageLayerWithSC, but that codepath isn't hit
by WebRender, so instead do it during display list building, the same
way we suppress background colors.
Differential Revision: https://phabricator.services.mozilla.com/D90278
We usually suppress background images in
nsCSSRendering::PaintStyleImageLayerWithSC, but that codepath isn't hit
by WebRender, so instead do it during display list building, the same
way we suppress background colors.
Differential Revision: https://phabricator.services.mozilla.com/D90278