This will force APZ to do a main-thread hit-test for the cases where the
shapes are too complex to easily send to the compositor.
Differential Revision: https://phabricator.services.mozilla.com/D27455
--HG--
extra : moz-landing-system : lando
Sorry for the vague commit message, but I haven't dug yet on why or how the
Android code is depending on this.
This call used to be part of nsPresContext::CompatibilityModeChanged, which
unconditionally called PresShell::EnsureStyleFlush.
This was not (in theory, at least) always necessary. There's there's no point in
ensuring a style flush is going to happen if styles haven't changed, and
CompatibilityModeChanged() didn't actually guarantee that the compat mode was
different at all before my patch.
Styles only change if the compat mode actually changes (since then selectors
become case-sensitive or case-insensitive), or more obviously when you insert or
remove the quirks.css stylesheet, and in that case ApplicableStylesChanged makes
sure that the flush happens.
Yet here we are, and not having that early call to EnsureStyleFlush, even in the
case there's no quirks mode or quirks sheet change or anything of that sort
(this happens even on XUL docs, which are always FullStandards) makes the first
(and only the first) browsing session in Geckoview have terrible scrolling
performance.
I'm calling it a day for today, will investigate as time permits in bug 1544185.
Differential Revision: https://phabricator.services.mozilla.com/D27416
--HG--
extra : moz-landing-system : lando
aBuilder->InInvalidSubtree() tracks the modified state. Save the state
during construction of nsDisplayItem and use in ProcessItemFromNewList.
Depends on D24462
Differential Revision: https://phabricator.services.mozilla.com/D26138
--HG--
extra : moz-landing-system : lando
To avoid expensive virtual dispatch in PreProcessDisplayList().
Depends on D24460
Differential Revision: https://phabricator.services.mozilla.com/D26136
--HG--
extra : moz-landing-system : lando
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.
Differential Revision: https://phabricator.services.mozilla.com/D26134
--HG--
extra : moz-landing-system : lando
Some "HTML editor commands" are stateful due to storing tag name to handle it
with specific command. However, we can make it stateless with retrieving
tag name from command name once per command only when it's necessary. The
runtime cost must be really cheap since we can map it with hash table.
This patch makes them stateless and singleton classes. So, we can save
footprint and allocation runtime cost with this change.
Differential Revision: https://phabricator.services.mozilla.com/D27407
--HG--
extra : moz-landing-system : lando
Different from the comment in `EditorCommands.h`, editing commands and
editor commands are instantiated for each editable document or each
`HTMLInputElement` or `HTMLTextareaElement`. Therefore, even though they
are stateless, we allocate too many instances of them. We should make
them singleton classes to reduce the footprint and save runtime allocation
cost.
Differential Revision: https://phabricator.services.mozilla.com/D27406
--HG--
extra : moz-landing-system : lando
We already get the user space metrics, mFontSizeScaleFactor is irrelevant
and the scaling should not be applied in the first place.
Otherwise we will get very wrong bounding box when <text> has SVG transform
or the font has extreme size.
Differential Revision: https://phabricator.services.mozilla.com/D27443
--HG--
extra : moz-landing-system : lando
So, this patch makes all caller of it safe including its arguments unless
they come from other methods.
Differential Revision: https://phabricator.services.mozilla.com/D27225
--HG--
extra : moz-landing-system : lando
They are debug build only methods. So, callers of them shouldn't be marked
as `MOZ_CAN_RUN_SCRIPT` only for them. Therefore, `MOZ_CAN_RUN_SCRIPT_BOUNDARY`
must be better.
Differential Revision: https://phabricator.services.mozilla.com/D27218
--HG--
extra : moz-landing-system : lando
First of all, we should mark `nsIPresShell::FlushPendingNotifications()` as
`MOZ_CAN_RUN_SCRIPT` as soon as possible. Therefore, I'll mark all its callers
in `PresShell` as `MOZ_CAN_RUN_SCRIPT` first.
Differential Revision: https://phabricator.services.mozilla.com/D27217
--HG--
extra : moz-landing-system : lando
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`. Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.
Differential Revision: https://phabricator.services.mozilla.com/D26663
--HG--
extra : moz-landing-system : lando
This patch makes `TabChild` use `mozilla::PresShell` directly.
Then, renames `TabChild::GetPresShell()` and `TabChild::GetDocument()` to
`TabChild::GetTopLevelPresShell()` and `TabChild::GetTopLevelDocument()` to
make what they do clearer (e.g., see the change in `PresShell.cpp`).
Differential Revision: https://phabricator.services.mozilla.com/D26455
--HG--
extra : moz-landing-system : lando
This patch makes `nsViewManager::GetPresShell()` and
`nsIWidgetListener::GetPresShell()` (overridden by `nsView` and
`nsWebShellWindow::WidgetListenerDelegate`) return `mozilla::PresShell*`.
Additionally, makes `nsWebShellWindow::GetPresShell()` also return
`mozilla::PresShell()`.
Differential Revision: https://phabricator.services.mozilla.com/D26454
--HG--
extra : moz-landing-system : lando
We need device pixel, but TransformFramePointToTextChild returns in css pixel,
thus a scaling is necessary.
Differential Revision: https://phabricator.services.mozilla.com/D27322
--HG--
extra : moz-landing-system : lando
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.
Differential Revision: https://phabricator.services.mozilla.com/D26424
--HG--
extra : moz-landing-system : lando
Check all transform-like properties which may affect the scaling
factors when computing the suitable scale for animations.
Differential Revision: https://phabricator.services.mozilla.com/D19526
--HG--
extra : moz-landing-system : lando
I wrote this while looking at bug 1537903, but actually it doesn't help there,
since all the extra time is spent actually computing styles.
I think this is still worth landing it though.
The reasoning for not caring of this case is that we mint an style anyway out of
the blue anyway. There's no point in restyling the whole document.
Differential Revision: https://phabricator.services.mozilla.com/D27124
--HG--
extra : moz-landing-system : lando
- Remove expectation that 'preventScroll.html' fails.
- Use '[NoInterfaceObject] interface' workaround to simulate missing 'mixin' support.
Differential Revision: https://phabricator.services.mozilla.com/D26922
--HG--
extra : moz-landing-system : lando