Backed out changeset 9ff299f97edd (bug 1688948) for causing bc failures on browser_tab_touch_events.js. CLOSED TREE

This commit is contained in:
Iulian Moraru 2021-05-31 21:02:38 +03:00
Родитель 2c6099421a
Коммит 8a81b5d4a3
5 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -2613,8 +2613,9 @@ bool BrowsingContext::InactiveForSuspend() const {
}
bool BrowsingContext::CanSet(FieldIndex<IDX_TouchEventsOverrideInternal>,
dom::TouchEventsOverride, ContentParent* aSource) {
return XRE_IsParentProcess() && !aSource;
dom::TouchEventsOverride, ContentParent*) {
// TODO: Bug 1688948 - Should only be set in the parent process.
return true;
}
void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
@ -2872,6 +2873,11 @@ mozilla::dom::TouchEventsOverride BrowsingContext::TouchEventsOverride() const {
return mozilla::dom::TouchEventsOverride::None;
}
void BrowsingContext::SetTouchEventsOverride(dom::TouchEventsOverride aOverride,
ErrorResult& aRv) {
SetTouchEventsOverrideInternal(aOverride, aRv);
}
// We map `watchedByDevTools` WebIDL attribute to `watchedByDevToolsInternal`
// BC field. And we map it to the top level BrowsingContext.
bool BrowsingContext::WatchedByDevTools() {

Просмотреть файл

@ -525,6 +525,7 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
void SetWatchedByDevTools(bool aWatchedByDevTools, ErrorResult& aRv);
dom::TouchEventsOverride TouchEventsOverride() const;
void SetTouchEventsOverride(dom::TouchEventsOverride, ErrorResult& aRv);
bool FullscreenAllowed() const;

Просмотреть файл

@ -2351,11 +2351,6 @@ bool CanonicalBrowsingContext::AllowedInBFCache(
return bfcacheCombo == 0;
}
void CanonicalBrowsingContext::SetTouchEventsOverride(
dom::TouchEventsOverride aOverride, ErrorResult& aRv) {
SetTouchEventsOverrideInternal(aOverride, aRv);
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(CanonicalBrowsingContext, BrowsingContext,
mSessionHistory, mContainerFeaturePolicy,
mCurrentBrowserParent,

Просмотреть файл

@ -322,8 +322,6 @@ class CanonicalBrowsingContext final : public BrowsingContext {
mPriorityActive = aIsActive;
}
void SetTouchEventsOverride(dom::TouchEventsOverride, ErrorResult& aRv);
protected:
// Called when the browsing context is being discarded.
void CanonicalDiscard();

Просмотреть файл

@ -187,6 +187,12 @@ interface BrowsingContext {
[SetterThrows] attribute DisplayMode displayMode;
/**
* This allows chrome to override the default choice of whether touch events
* are available in a specific BrowsingContext and its descendents.
*/
[SetterThrows] attribute TouchEventsOverride touchEventsOverride;
/**
* The nsID of the browsing context in the session history.
*/
@ -283,12 +289,6 @@ interface CanonicalBrowsingContext : BrowsingContext {
readonly attribute URI? currentURI;
void clearRestoreState();
/**
* This allows chrome to override the default choice of whether touch events
* are available in a specific BrowsingContext and its descendents.
*/
[SetterThrows] attribute TouchEventsOverride touchEventsOverride;
};
[Exposed=Window, ChromeOnly]