Bug 1791759 - Add support for content-visibility: auto r=emilio
This change adds support for `content-visibilty: auto` as well as showing and hiding content based on the relevancy of the content as defined in the specification. Changes to relevancy are handled by triggering updates in a set of `content-visibility: auto` frames stored in PresShell at the appropriate time in the document lifecycle. Some tests are now failing due to this feature exposing the failures, but they will be fixed in later changes. This change is a reland of an earlier version that properly updates intrinsic sizes and triggers an update of remembered size for the purposes of contain-intrinsic-size when content relevancy changes. Co-authored-by: Jihye Hong <jihye@igalia.com> Differential Revision: https://phabricator.services.mozilla.com/D159693
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
|
||||
#include "mozilla/dom/Selection.h"
|
||||
|
||||
#include "LayoutConstants.h"
|
||||
#include "mozilla/intl/BidiEmbeddingLevel.h"
|
||||
|
||||
#include "mozilla/AccessibleCaretEventHub.h"
|
||||
@@ -3200,6 +3202,7 @@ void Selection::NotifySelectionListeners() {
|
||||
PresShell* presShell = GetPresShell();
|
||||
if (presShell) {
|
||||
doc = presShell->GetDocument();
|
||||
presShell->ScheduleContentRelevancyUpdate(ContentRelevancyReason::Selected);
|
||||
}
|
||||
|
||||
// We've notified all selection listeners even when some of them are removed
|
||||
|
||||
Reference in New Issue
Block a user