See comment. Not sure how easy to test this is in practice since it
involves nodes getting cc'd.
I tried to repro (not too hard) with a crashtest running
SpecialPowers.gc() but that didn't cut it, looks like.
Differential Revision: https://phabricator.services.mozilla.com/D154891
When entering fullscreen and saving the original position of a window,
also save the original position of its screen.
When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.
Differential Revision: https://phabricator.services.mozilla.com/D153410
`HideWindowChrome(false)` may change the reported window size on Mac:
the OS menu bar appears at the top of the screen, and this will cause the
window to shrink if it was fullscreen.
This isn't a problem yet, since we don't check the window dimensions
when exiting fullscreen... but the following commit will do exactly
that. Delay calling `HideWindowChrome` until the last possible minute --
but make sure that it _does_ get called.
Since HideWindowChrome(true) does not presently change the window size
(see bug 498835), no functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D154469
Use desktop pixels everywhere:
- Store the old window position as a `DesktopRect`.
- Since `GetRectDisplayPix` is infallible, use the convenience getter
that hands us a `DesktopIntRect`.
- Add a helper function that wraps `Resize()` and takes any `Rect`
which uses `DesktopPixel`s.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D153409
A window is fullscreenable iff it's a desktop window (that is, a
positional child of the desktop rather than of another window) -- and
desktop windows are the windows which use desktop-pixel units in
Resize().
Code coverage confirms that the branch when `BoundsUseDesktopPixels()`
returns `false` is never taken in tests.
Under the (hopefully justified) assumption that it's never taken at all,
no functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D153408
This patch doesn't change behavior but I had it lying around in my
machine, and makes the code a bit easier to follow, so no reason not
to land it IMO.
Differential Revision: https://phabricator.services.mozilla.com/D154886
The only thing that could trigger this is a bogus key, or overriding an
already-loading stylesheet which we didn't correctly coalesce.
Either of those is a bug.
Differential Revision: https://phabricator.services.mozilla.com/D154915
We can move a float frame into its block parent's PushedFloatsList during column
balancing when it cannot fit in the available block-size.
Later, when the column balancing algorithm reflows the last column in an
unconstrained block-size (in the very last reflow if needed [1]), we have to
reflow the line which contains the float's placeholder. The old code uses
`GetPrevInFlow() || GetNextInFlow()` to detect this scenario, which is
insufficient because the float's block parent might not have any continuation.
This patch uses `NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR` bit to detect this instead.
[1] https://searchfox.org/mozilla-central/rev/5c04fc7016eb7f52cf835d482f1125c8f139c959/layout/generic/nsColumnSetFrame.cpp#1144-1154
Differential Revision: https://phabricator.services.mozilla.com/D154860
This has the side effect of firing the media query list change event for
printing, but it also improves the print emulation on DevTools, which is
an extra win!
Differential Revision: https://phabricator.services.mozilla.com/D154906
Instead of using SessionStateAggregator.js send() to collect history data and send the event StateUpdated to the app, the new GeckoViewSessionStore is used. It is enabled when fission is true and initialized by GeckoViewStartup when Services.appinfo.sessionHistoryInParent is true. It will observe two existing topics: browsing-context-did-set-embedder, which creates the history listener, and browsing-context-discarded, which unregisters it. When the history listener is created, it will collect history from the parent. It will only collect data when the current uri is not “about:blank” and when the history count is greater than 0. It uses SessionHistory’s collectFromParent.
The new code path was manually confirmed by debugging the app history delegate to see that the state map contains all the history data.
Differential Revision: https://phabricator.services.mozilla.com/D150020
This is what the documentation says we should be doing (and it's clearly the
right thing to do). We miss decoding a packet otherwise.
Depends on D150974
Differential Revision: https://phabricator.services.mozilla.com/D150975
We are updating more things when selecting a thread than when opening the debugger.
Let's use a unique codepath when it comes to handle a new top level target.
Differential Revision: https://phabricator.services.mozilla.com/D151552
This code path gets executed by existing tests, and I don't believe
there is a way to execute this behavior using our CI, since it's a macOS
version check.
Differential Revision: https://phabricator.services.mozilla.com/D154172
gfxFont::Measure would acquire/release a read-only lock on
gfxGlyphExtents::mLock for every glyph in the text run. This patch makes
it so that we once the lock once. We may need to populate the
gfxGlyphExtents hashtable once, where we need to upgrade to a read-write
lock.
Differential Revision: https://phabricator.services.mozilla.com/D154816