Now that stuff is a bit more complex and that we're adding media lazy
loading, factor the observer management down to Element.
Make UnbindContext more parallel to BindContext while at it. This
allows the new calls to work regardless of whether they get called
before or after the base class's Bind/UnbindFromTree, which is nice.
Differential Revision: https://phabricator.services.mozilla.com/D282723
This commit removes the unsuccessful deferring of notifications around
BrowserChild::Init and and narrows when we ignore a failure in
nsDocShell::Initialize.
Differential Revision: https://phabricator.services.mozilla.com/D279293
Per spec, certain functionality should be blocked for Document PiP windows. We
rely on the IsDocumentPiP flag that is set for both the content and chrome
window. But the chrome window should still be able to navigate, and system
callers should be able to move/resize content as well as chrome windows.
Differential Revision: https://phabricator.services.mozilla.com/D278260
Bug 543435 changed nsDocShell::Initialize from always returning true to
returning whether CreateInitialDocumentViewer succeeded. If this fails,
it is propagated up to ContentChild::RecvConstructBrowser where we crash.
The call to CreateDocumentViewerForActor that existed before bug 543435 in
nsWebBrowser::Create would've failed silently.
This commit restores avoids a crash by restoring the silent failure.
Differential Revision: https://phabricator.services.mozilla.com/D277765
Bug 543435 changed nsDocShell::Initialize from always returning true to
returning whether CreateInitialDocumentViewer succeeded. If this fails,
it is propagated up to ContentChild::RecvConstructBrowser where we crash.
The call to CreateDocumentViewerForActor that existed before bug 543435 in
nsWebBrowser::Create would've failed silently.
This commit restores avoids a crash by restoring the silent failure.
Differential Revision: https://phabricator.services.mozilla.com/D277765
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.
A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.
The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.
The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.
Differential Revision: https://phabricator.services.mozilla.com/D276437
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.
A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.
The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.
The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.
Differential Revision: https://phabricator.services.mozilla.com/D276437
This helper function encapsulates checks in various places which
were of a form similar to:
sf->IsSmoothScroll(behavior) ? ScrollMode::SmoothMsd
: ScrollMode::Instant
Differential Revision: https://phabricator.services.mozilla.com/D272346