From 80f9b75efa08ea449937298b791ff278cbf5fa22 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 4 Feb 2018 23:15:50 +0100 Subject: Implement auxclick Bug(s): https://bugzilla.mozilla.org/show_bug.cgi?id=1304044 (native in moebius) --- dom/base/nsGkAtomList.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dom/base') diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index 7827ad66b..5ece68634 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -703,6 +703,7 @@ GK_ATOM(onattributechanged, "onattributechanged") GK_ATOM(onattributereadreq, "onattributereadreq") GK_ATOM(onattributewritereq, "onattributewritereq") GK_ATOM(onaudioprocess, "onaudioprocess") +GK_ATOM(onauxclick, "onauxclick") GK_ATOM(onbeforecopy, "onbeforecopy") GK_ATOM(onbeforecut, "onbeforecut") GK_ATOM(onbeforepaste, "onbeforepaste") -- cgit v1.2.3 From cf4482199c5b92c5029b79c086cf9f831a87f895 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Wed, 14 Mar 2018 08:52:52 +0100 Subject: Bug 1264125: Fire transitioncancel event when a transition is canceled - part 1 (in the description) Issue #55 part 1 - Add transitioncancel event handler part 2 - Add ontransitioncancel EventHandler to WebIDL part 3 - Add member of active time to ComputedTiming --- dom/base/nsGkAtomList.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dom/base') diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index e4ae7ede8..09d73e617 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -941,6 +941,7 @@ GK_ATOM(ontouchstart, "ontouchstart") GK_ATOM(ontouchend, "ontouchend") GK_ATOM(ontouchmove, "ontouchmove") GK_ATOM(ontouchcancel, "ontouchcancel") +GK_ATOM(ontransitioncancel, "ontransitioncancel") GK_ATOM(ontransitionend, "ontransitionend") GK_ATOM(ontransitionrun, "ontransitionrun") GK_ATOM(ontransitionstart, "ontransitionstart") -- cgit v1.2.3 From aade91b13a50ee4f246016fa8d8d1561f58f80ee Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Wed, 14 Mar 2018 11:45:38 +0100 Subject: moebius#89: DOM - implement animationcancel event Issue #55 --- dom/base/nsGkAtomList.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dom/base') diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index 09d73e617..948487083 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -694,6 +694,7 @@ GK_ATOM(onadapterremoved, "onadapterremoved") GK_ATOM(onafterprint, "onafterprint") GK_ATOM(onafterscriptexecute, "onafterscriptexecute") GK_ATOM(onalerting, "onalerting") +GK_ATOM(onanimationcancel, "onanimationcancel") GK_ATOM(onanimationend, "onanimationend") GK_ATOM(onanimationiteration, "onanimationiteration") GK_ATOM(onanimationstart, "onanimationstart") -- cgit v1.2.3 From 7ee501103ad2efe1d28ef3c10b4111a685746c06 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 29 Apr 2018 12:07:20 +0200 Subject: Bug 1322966 - Cleanup performance.cpp https://hg.mozilla.org/mozilla-central/rev/0ad76084c4c3 --- dom/base/nsGlobalWindow.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'dom/base') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 3d5c44a78..738703ef1 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -3124,8 +3124,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, newInnerWindow->mPerformance = Performance::CreateForMainThread(newInnerWindow->AsInner(), currentInner->mPerformance->GetDOMTiming(), - currentInner->mPerformance->GetChannel(), - currentInner->mPerformance->GetParentPerformance()); + currentInner->mPerformance->GetChannel()); } } @@ -4339,22 +4338,7 @@ nsPIDOMWindowInner::CreatePerformanceObjectIfNeeded() timedChannel = nullptr; } if (timing) { - // If we are dealing with an iframe, we will need the parent's performance - // object (so we can add the iframe as a resource of that page). - Performance* parentPerformance = nullptr; - nsCOMPtr parentWindow = GetScriptableParentOrNull(); - if (parentWindow) { - nsPIDOMWindowInner* parentInnerWindow = nullptr; - if (parentWindow) { - parentInnerWindow = parentWindow->GetCurrentInnerWindow(); - } - if (parentInnerWindow) { - parentPerformance = parentInnerWindow->GetPerformance(); - } - } - mPerformance = - Performance::CreateForMainThread(this, timing, timedChannel, - parentPerformance); + mPerformance = Performance::CreateForMainThread(this, timing, timedChannel); } } -- cgit v1.2.3 From 92d3042138babf4f82d254f6cb6e11831dcca506 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 29 Apr 2018 12:39:51 +0200 Subject: Bug 1321261 - partially - "using namespace mozilla" https://hg.mozilla.org/mozilla-central/diff/9ad9c6b4c8d6/dom/base/nsDOMNavigationTiming.cpp --- dom/base/nsDOMNavigationTiming.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'dom/base') diff --git a/dom/base/nsDOMNavigationTiming.cpp b/dom/base/nsDOMNavigationTiming.cpp index 31b2932fb..9b628e55a 100644 --- a/dom/base/nsDOMNavigationTiming.cpp +++ b/dom/base/nsDOMNavigationTiming.cpp @@ -16,6 +16,8 @@ #include "mozilla/dom/PerformanceNavigation.h" #include "mozilla/TimeStamp.h" +using namespace mozilla; + nsDOMNavigationTiming::nsDOMNavigationTiming() { Clear(); @@ -52,25 +54,26 @@ nsDOMNavigationTiming::Clear() } DOMTimeMilliSec -nsDOMNavigationTiming::TimeStampToDOM(mozilla::TimeStamp aStamp) const +nsDOMNavigationTiming::TimeStampToDOM(TimeStamp aStamp) const { if (aStamp.IsNull()) { return 0; } - mozilla::TimeDuration duration = aStamp - mNavigationStartTimeStamp; + + TimeDuration duration = aStamp - mNavigationStartTimeStamp; return GetNavigationStart() + static_cast(duration.ToMilliseconds()); } DOMTimeMilliSec nsDOMNavigationTiming::DurationFromStart() { - return TimeStampToDOM(mozilla::TimeStamp::Now()); + return TimeStampToDOM(TimeStamp::Now()); } void nsDOMNavigationTiming::NotifyNavigationStart(DocShellState aDocShellState) { mNavigationStartHighRes = (double)PR_Now() / PR_USEC_PER_MSEC; - mNavigationStartTimeStamp = mozilla::TimeStamp::Now(); + mNavigationStartTimeStamp = TimeStamp::Now(); mDocShellHasBeenActiveSinceNavigationStart = (aDocShellState == DocShellState::eActive); } @@ -127,7 +130,7 @@ nsDOMNavigationTiming::NotifyLoadEventEnd() } void -nsDOMNavigationTiming::SetDOMLoadingTimeStamp(nsIURI* aURI, mozilla::TimeStamp aValue) +nsDOMNavigationTiming::SetDOMLoadingTimeStamp(nsIURI* aURI, TimeStamp aValue) { if (!mDOMLoadingSet) { mLoadedURI = aURI; -- cgit v1.2.3 From 306db80410e802b0fe9a3b5273d4cf29586a1b17 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 29 Apr 2018 14:15:18 +0200 Subject: moebius#161: The Performance Resource Timing (make timestamps be relative to startTime) https://github.com/MoonchildProductions/moebius/pull/161 --- dom/base/nsContentUtils.cpp | 4 ++ dom/base/nsContentUtils.h | 9 +++ dom/base/nsDOMNavigationTiming.cpp | 131 +++++++++++++++++-------------------- dom/base/nsDOMNavigationTiming.h | 125 ++++++++++++++++++++++++----------- 4 files changed, 161 insertions(+), 108 deletions(-) (limited to 'dom/base') diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index ef87a250e..bc8cea35a 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -281,6 +281,7 @@ bool nsContentUtils::sIsCutCopyAllowed = true; bool nsContentUtils::sIsFrameTimingPrefEnabled = false; bool nsContentUtils::sIsPerformanceTimingEnabled = false; bool nsContentUtils::sIsResourceTimingEnabled = false; +bool nsContentUtils::sIsPerformanceNavigationTimingEnabled = false; bool nsContentUtils::sIsUserTimingLoggingEnabled = false; bool nsContentUtils::sIsExperimentalAutocompleteEnabled = false; bool nsContentUtils::sEncodeDecodeURLHash = false; @@ -571,6 +572,9 @@ nsContentUtils::Init() Preferences::AddBoolVarCache(&sIsResourceTimingEnabled, "dom.enable_resource_timing", true); + Preferences::AddBoolVarCache(&sIsPerformanceNavigationTimingEnabled, + "dom.enable_performance_navigation_timing", true); + Preferences::AddBoolVarCache(&sIsUserTimingLoggingEnabled, "dom.performance.enable_user_timing_logging", false); diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 0932f451e..9ae6d2155 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2032,6 +2032,14 @@ public: return sIsResourceTimingEnabled; } + /* + * Returns true if the performance timing APIs are enabled. + */ + static bool IsPerformanceNavigationTimingEnabled() + { + return sIsPerformanceNavigationTimingEnabled; + } + /* * Returns true if notification should be sent for peformance timing events. */ @@ -2825,6 +2833,7 @@ private: static uint32_t sHandlingInputTimeout; static bool sIsPerformanceTimingEnabled; static bool sIsResourceTimingEnabled; + static bool sIsPerformanceNavigationTimingEnabled; static bool sIsUserTimingLoggingEnabled; static bool sIsFrameTimingPrefEnabled; static bool sIsExperimentalAutocompleteEnabled; diff --git a/dom/base/nsDOMNavigationTiming.cpp b/dom/base/nsDOMNavigationTiming.cpp index 9b628e55a..32ce8a8cb 100644 --- a/dom/base/nsDOMNavigationTiming.cpp +++ b/dom/base/nsDOMNavigationTiming.cpp @@ -15,6 +15,7 @@ #include "nsPrintfCString.h" #include "mozilla/dom/PerformanceNavigation.h" #include "mozilla/TimeStamp.h" +#include "mozilla/Telemetry.h" using namespace mozilla; @@ -32,24 +33,17 @@ nsDOMNavigationTiming::Clear() { mNavigationType = TYPE_RESERVED; mNavigationStartHighRes = 0; - mBeforeUnloadStart = 0; - mUnloadStart = 0; - mUnloadEnd = 0; - mLoadEventStart = 0; - mLoadEventEnd = 0; - mDOMLoading = 0; - mDOMInteractive = 0; - mDOMContentLoadedEventStart = 0; - mDOMContentLoadedEventEnd = 0; - mDOMComplete = 0; - - mLoadEventStartSet = false; - mLoadEventEndSet = false; - mDOMLoadingSet = false; - mDOMInteractiveSet = false; - mDOMContentLoadedEventStartSet = false; - mDOMContentLoadedEventEndSet = false; - mDOMCompleteSet = false; + mBeforeUnloadStart = TimeStamp(); + mUnloadStart = TimeStamp(); + mUnloadEnd = TimeStamp(); + mLoadEventStart = TimeStamp(); + mLoadEventEnd = TimeStamp(); + mDOMLoading = TimeStamp(); + mDOMInteractive = TimeStamp(); + mDOMContentLoadedEventStart = TimeStamp(); + mDOMContentLoadedEventEnd = TimeStamp(); + mDOMComplete = TimeStamp(); + mDocShellHasBeenActiveSinceNavigationStart = false; } @@ -60,20 +54,15 @@ nsDOMNavigationTiming::TimeStampToDOM(TimeStamp aStamp) const return 0; } - TimeDuration duration = aStamp - mNavigationStartTimeStamp; + TimeDuration duration = aStamp - mNavigationStart; return GetNavigationStart() + static_cast(duration.ToMilliseconds()); } -DOMTimeMilliSec nsDOMNavigationTiming::DurationFromStart() -{ - return TimeStampToDOM(TimeStamp::Now()); -} - void nsDOMNavigationTiming::NotifyNavigationStart(DocShellState aDocShellState) { mNavigationStartHighRes = (double)PR_Now() / PR_USEC_PER_MSEC; - mNavigationStartTimeStamp = TimeStamp::Now(); + mNavigationStart = TimeStamp::Now(); mDocShellHasBeenActiveSinceNavigationStart = (aDocShellState == DocShellState::eActive); } @@ -89,7 +78,7 @@ nsDOMNavigationTiming::NotifyFetchStart(nsIURI* aURI, Type aNavigationType) void nsDOMNavigationTiming::NotifyBeforeUnload() { - mBeforeUnloadStart = DurationFromStart(); + mBeforeUnloadStart = TimeStamp::Now(); } void @@ -102,105 +91,107 @@ nsDOMNavigationTiming::NotifyUnloadAccepted(nsIURI* aOldURI) void nsDOMNavigationTiming::NotifyUnloadEventStart() { - mUnloadStart = DurationFromStart(); + mUnloadStart = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyUnloadEventEnd() { - mUnloadEnd = DurationFromStart(); + mUnloadEnd = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyLoadEventStart() { - if (!mLoadEventStartSet) { - mLoadEventStart = DurationFromStart(); - mLoadEventStartSet = true; + if (!mLoadEventStart.IsNull()) { + return; } + mLoadEventStart = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyLoadEventEnd() { - if (!mLoadEventEndSet) { - mLoadEventEnd = DurationFromStart(); - mLoadEventEndSet = true; + if (!mLoadEventEnd.IsNull()) { + return; } + mLoadEventEnd = TimeStamp::Now(); } void nsDOMNavigationTiming::SetDOMLoadingTimeStamp(nsIURI* aURI, TimeStamp aValue) { - if (!mDOMLoadingSet) { - mLoadedURI = aURI; - mDOMLoading = TimeStampToDOM(aValue); - mDOMLoadingSet = true; + if (!mDOMLoading.IsNull()) { + return; } + mLoadedURI = aURI; + mDOMLoading = aValue; } void nsDOMNavigationTiming::NotifyDOMLoading(nsIURI* aURI) { - if (!mDOMLoadingSet) { - mLoadedURI = aURI; - mDOMLoading = DurationFromStart(); - mDOMLoadingSet = true; + if (!mDOMLoading.IsNull()) { + return; } + mLoadedURI = aURI; + mDOMLoading = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyDOMInteractive(nsIURI* aURI) { - if (!mDOMInteractiveSet) { - mLoadedURI = aURI; - mDOMInteractive = DurationFromStart(); - mDOMInteractiveSet = true; + if (!mDOMInteractive.IsNull()) { + return; } + mLoadedURI = aURI; + mDOMInteractive = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyDOMComplete(nsIURI* aURI) { - if (!mDOMCompleteSet) { - mLoadedURI = aURI; - mDOMComplete = DurationFromStart(); - mDOMCompleteSet = true; + if (!mDOMComplete.IsNull()) { + return; } + mLoadedURI = aURI; + mDOMComplete = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyDOMContentLoadedStart(nsIURI* aURI) { - if (!mDOMContentLoadedEventStartSet) { - mLoadedURI = aURI; - mDOMContentLoadedEventStart = DurationFromStart(); - mDOMContentLoadedEventStartSet = true; + if (!mDOMContentLoadedEventStart.IsNull()) { + return; } + + mLoadedURI = aURI; + mDOMContentLoadedEventStart = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyDOMContentLoadedEnd(nsIURI* aURI) { - if (!mDOMContentLoadedEventEndSet) { - mLoadedURI = aURI; - mDOMContentLoadedEventEnd = DurationFromStart(); - mDOMContentLoadedEventEndSet = true; + if (!mDOMContentLoadedEventEnd.IsNull()) { + return; } + + mLoadedURI = aURI; + mDOMContentLoadedEventEnd = TimeStamp::Now(); } void nsDOMNavigationTiming::NotifyNonBlankPaintForRootContentDocument() { MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!mNavigationStartTimeStamp.IsNull()); + MOZ_ASSERT(!mNavigationStart.IsNull()); - if (!mNonBlankPaintTimeStamp.IsNull()) { + if (!mNonBlankPaint.IsNull()) { return; } - mNonBlankPaintTimeStamp = TimeStamp::Now(); - TimeDuration elapsed = mNonBlankPaintTimeStamp - mNavigationStartTimeStamp; + mNonBlankPaint = TimeStamp::Now(); + TimeDuration elapsed = mNonBlankPaint - mNavigationStart; if (profiler_is_active()) { nsAutoCString spec; @@ -215,8 +206,8 @@ nsDOMNavigationTiming::NotifyNonBlankPaintForRootContentDocument() if (mDocShellHasBeenActiveSinceNavigationStart) { Telemetry::AccumulateTimeDelta(Telemetry::TIME_TO_NON_BLANK_PAINT_MS, - mNavigationStartTimeStamp, - mNonBlankPaintTimeStamp); + mNavigationStart, + mNonBlankPaint); } } @@ -227,24 +218,24 @@ nsDOMNavigationTiming::NotifyDocShellStateChanged(DocShellState aDocShellState) (aDocShellState == DocShellState::eActive); } -DOMTimeMilliSec -nsDOMNavigationTiming::GetUnloadEventStart() +mozilla::TimeStamp +nsDOMNavigationTiming::GetUnloadEventStartTimeStamp() const { nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager(); nsresult rv = ssm->CheckSameOriginURI(mLoadedURI, mUnloadedURI, false); if (NS_SUCCEEDED(rv)) { return mUnloadStart; } - return 0; + return mozilla::TimeStamp(); } -DOMTimeMilliSec -nsDOMNavigationTiming::GetUnloadEventEnd() +mozilla::TimeStamp +nsDOMNavigationTiming::GetUnloadEventEndTimeStamp() const { nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager(); nsresult rv = ssm->CheckSameOriginURI(mLoadedURI, mUnloadedURI, false); if (NS_SUCCEEDED(rv)) { return mUnloadEnd; } - return 0; + return mozilla::TimeStamp(); } diff --git a/dom/base/nsDOMNavigationTiming.h b/dom/base/nsDOMNavigationTiming.h index 9babece96..3be2527ca 100644 --- a/dom/base/nsDOMNavigationTiming.h +++ b/dom/base/nsDOMNavigationTiming.h @@ -47,38 +47,91 @@ public: mozilla::TimeStamp GetNavigationStartTimeStamp() const { - return mNavigationStartTimeStamp; + return mNavigationStart; + } + + DOMTimeMilliSec GetUnloadEventStart() + { + return TimeStampToDOM(GetUnloadEventStartTimeStamp()); + } + + DOMTimeMilliSec GetUnloadEventEnd() + { + return TimeStampToDOM(GetUnloadEventEndTimeStamp()); } - DOMTimeMilliSec GetUnloadEventStart(); - DOMTimeMilliSec GetUnloadEventEnd(); DOMTimeMilliSec GetDomLoading() const { - return mDOMLoading; + return TimeStampToDOM(mDOMLoading); } DOMTimeMilliSec GetDomInteractive() const { - return mDOMInteractive; + return TimeStampToDOM(mDOMInteractive); } DOMTimeMilliSec GetDomContentLoadedEventStart() const { - return mDOMContentLoadedEventStart; + return TimeStampToDOM(mDOMContentLoadedEventStart); } DOMTimeMilliSec GetDomContentLoadedEventEnd() const { - return mDOMContentLoadedEventEnd; + return TimeStampToDOM(mDOMContentLoadedEventEnd); } DOMTimeMilliSec GetDomComplete() const { - return mDOMComplete; + return TimeStampToDOM(mDOMComplete); } DOMTimeMilliSec GetLoadEventStart() const { - return mLoadEventStart; + return TimeStampToDOM(mLoadEventStart); } DOMTimeMilliSec GetLoadEventEnd() const { - return mLoadEventEnd; + return TimeStampToDOM(mLoadEventEnd); + } + DOMTimeMilliSec GetTimeToNonBlankPaint() const + { + return TimeStampToDOM(mNonBlankPaint); + } + + DOMHighResTimeStamp GetUnloadEventStartHighRes() + { + mozilla::TimeStamp stamp = GetUnloadEventStartTimeStamp(); + if (stamp.IsNull()) { + return 0; + } + return TimeStampToDOMHighRes(stamp); + } + DOMHighResTimeStamp GetUnloadEventEndHighRes() + { + mozilla::TimeStamp stamp = GetUnloadEventEndTimeStamp(); + if (stamp.IsNull()) { + return 0; + } + return TimeStampToDOMHighRes(stamp); + } + DOMHighResTimeStamp GetDomInteractiveHighRes() const + { + return TimeStampToDOMHighRes(mDOMInteractive); + } + DOMHighResTimeStamp GetDomContentLoadedEventStartHighRes() const + { + return TimeStampToDOMHighRes(mDOMContentLoadedEventStart); + } + DOMHighResTimeStamp GetDomContentLoadedEventEndHighRes() const + { + return TimeStampToDOMHighRes(mDOMContentLoadedEventEnd); + } + DOMHighResTimeStamp GetDomCompleteHighRes() const + { + return TimeStampToDOMHighRes(mDOMComplete); + } + DOMHighResTimeStamp GetLoadEventStartHighRes() const + { + return TimeStampToDOMHighRes(mLoadEventStart); + } + DOMHighResTimeStamp GetLoadEventEndHighRes() const + { + return TimeStampToDOMHighRes(mLoadEventEnd); } enum class DocShellState : uint8_t { @@ -108,9 +161,13 @@ public: DOMTimeMilliSec TimeStampToDOM(mozilla::TimeStamp aStamp) const; - inline DOMHighResTimeStamp TimeStampToDOMHighRes(mozilla::TimeStamp aStamp) + inline DOMHighResTimeStamp TimeStampToDOMHighRes(mozilla::TimeStamp aStamp) const { - mozilla::TimeDuration duration = aStamp - mNavigationStartTimeStamp; + MOZ_ASSERT(!aStamp.IsNull(), "The timestamp should not be null"); + if (aStamp.IsNull()) { + return 0; + } + mozilla::TimeDuration duration = aStamp - mNavigationStart; return duration.ToMilliseconds(); } @@ -120,37 +177,29 @@ private: void Clear(); + mozilla::TimeStamp GetUnloadEventStartTimeStamp() const; + mozilla::TimeStamp GetUnloadEventEndTimeStamp() const; + nsCOMPtr mUnloadedURI; nsCOMPtr mLoadedURI; Type mNavigationType; DOMHighResTimeStamp mNavigationStartHighRes; - mozilla::TimeStamp mNavigationStartTimeStamp; - mozilla::TimeStamp mNonBlankPaintTimeStamp; - DOMTimeMilliSec DurationFromStart(); - - DOMTimeMilliSec mBeforeUnloadStart; - DOMTimeMilliSec mUnloadStart; - DOMTimeMilliSec mUnloadEnd; - DOMTimeMilliSec mLoadEventStart; - DOMTimeMilliSec mLoadEventEnd; - - DOMTimeMilliSec mDOMLoading; - DOMTimeMilliSec mDOMInteractive; - DOMTimeMilliSec mDOMContentLoadedEventStart; - DOMTimeMilliSec mDOMContentLoadedEventEnd; - DOMTimeMilliSec mDOMComplete; - - // Booleans to keep track of what things we've already been notified - // about. We don't update those once we've been notified about them - // once. - bool mLoadEventStartSet : 1; - bool mLoadEventEndSet : 1; - bool mDOMLoadingSet : 1; - bool mDOMInteractiveSet : 1; - bool mDOMContentLoadedEventStartSet : 1; - bool mDOMContentLoadedEventEndSet : 1; - bool mDOMCompleteSet : 1; + mozilla::TimeStamp mNavigationStart; + mozilla::TimeStamp mNonBlankPaint; + + mozilla::TimeStamp mBeforeUnloadStart; + mozilla::TimeStamp mUnloadStart; + mozilla::TimeStamp mUnloadEnd; + mozilla::TimeStamp mLoadEventStart; + mozilla::TimeStamp mLoadEventEnd; + + mozilla::TimeStamp mDOMLoading; + mozilla::TimeStamp mDOMInteractive; + mozilla::TimeStamp mDOMContentLoadedEventStart; + mozilla::TimeStamp mDOMContentLoadedEventEnd; + mozilla::TimeStamp mDOMComplete; + bool mDocShellHasBeenActiveSinceNavigationStart : 1; }; -- cgit v1.2.3 From 966e69291ae8ca1615b7d9a2d4db28b6532564f5 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 15:00:01 +0200 Subject: Bug 1216885 - Make nsISelectionPrivate not inherit from nsISelection --- dom/base/nsISelectionPrivate.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsISelectionPrivate.idl b/dom/base/nsISelectionPrivate.idl index 68412885e..049873b28 100644 --- a/dom/base/nsISelectionPrivate.idl +++ b/dom/base/nsISelectionPrivate.idl @@ -29,7 +29,7 @@ native nsDirection(nsDirection); native ScrollAxis(nsIPresShell::ScrollAxis); [scriptable, builtinclass, uuid(0c9f4f74-ee7e-4fe9-be6b-0ba856368178)] -interface nsISelectionPrivate : nsISelection +interface nsISelectionPrivate : nsISupports { const short ENDOFPRECEDINGLINE=0; const short STARTOFNEXTLINE=1; -- cgit v1.2.3 From d45c25971c084ba4afb38cec530f789969d6a338 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 22:09:55 +0200 Subject: Bug 1182569 - Skip security check for plugins using newstream attribute --- dom/base/nsContentUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index bc8cea35a..76463df16 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -5104,7 +5104,7 @@ nsContentUtils::TriggerLink(nsIContent *aContent, nsPresContext *aPresContext, handler->OnLinkClick(aContent, aLinkURI, fileName.IsVoid() ? aTargetSpec.get() : EmptyString().get(), - fileName, nullptr, nullptr, aIsTrusted); + fileName, nullptr, nullptr, aIsTrusted, aContent->NodePrincipal()); } } -- cgit v1.2.3 From b8e6315292839cd8a3263fec9d69555b7202c781 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 22:12:53 +0200 Subject: Bug 1182569: Update tests when converting docshell loads to use AynscOpen2 --- dom/base/test/file_simplecontentpolicy.js | 1 - 1 file changed, 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/test/file_simplecontentpolicy.js b/dom/base/test/file_simplecontentpolicy.js index 1f9606c49..2727b9530 100644 --- a/dom/base/test/file_simplecontentpolicy.js +++ b/dom/base/test/file_simplecontentpolicy.js @@ -39,7 +39,6 @@ var policy = { { // Remember last content type seen for the test url if (contentLocation.spec.endsWith(urlSuffix)) { - assert.ok(frame === browserElement, "correct element"); sendAsyncMessage("shouldLoad", {contentType: contentType, isTopLevel: isTopLevel}); return Ci.nsIContentPolicy.REJECT_REQUEST; } -- cgit v1.2.3 From 74858918fa2445f7e4ebc4b615ec073d528039f1 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 22:57:23 +0200 Subject: Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s) --- dom/base/nsContentUtils.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 76463df16..34c7d23b8 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -9776,9 +9776,13 @@ nsContentUtils::AttemptLargeAllocationLoad(nsIHttpChannel* aChannel) rv = aChannel->GetReferrer(getter_AddRefs(referrer)); NS_ENSURE_SUCCESS(rv, false); + nsCOMPtr loadInfo = aChannel->GetLoadInfo(); + nsCOMPtr triggeringPrincipal = loadInfo->TriggeringPrincipal(); + // Actually perform the cross process load bool reloadSucceeded = false; - rv = wbc3->ReloadInFreshProcess(docShell, uri, referrer, &reloadSucceeded); + rv = wbc3->ReloadInFreshProcess(docShell, uri, referrer, + triggeringPrincipal, &reloadSucceeded); NS_ENSURE_SUCCESS(rv, false); return reloadSucceeded; -- cgit v1.2.3 From 71e6952456e044fef8cd4ab2e1d1b972011a051e Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 23:11:43 +0200 Subject: Bug 1341754: Provide a valid triggeringPrincipal when calling SetURI in Location --- dom/base/nsGlobalWindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dom/base') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 738703ef1..4ffccde9d 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2521,8 +2521,13 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument* aNewDocument) return false; } - NS_ASSERTION(NS_IsAboutBlank(mDoc->GetDocumentURI()), - "How'd this happen?"); +#ifdef DEBUG +{ + nsCOMPtr uri; + mDoc->GetDocumentURI()->CloneIgnoringRef(getter_AddRefs(uri)); + NS_ASSERTION(NS_IsAboutBlank(uri), "How'd this happen?"); +} +#endif // Great, we're the original document, check for one of the other // conditions. -- cgit v1.2.3 From 4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 6 May 2018 14:31:20 +0200 Subject: moebius#231: Consider blocking top level window data: URIs (tests) https://github.com/MoonchildProductions/moebius/pull/231 --- dom/base/test/file_ipc_messagemanager_blob.html | 1 + dom/base/test/mochitest.ini | 1 + dom/base/test/test_ipc_messagemanager_blob.html | 3 +-- dom/base/test/test_x-frame-options.html | 6 +++++- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 dom/base/test/file_ipc_messagemanager_blob.html (limited to 'dom/base') diff --git a/dom/base/test/file_ipc_messagemanager_blob.html b/dom/base/test/file_ipc_messagemanager_blob.html new file mode 100644 index 000000000..dbdd64a34 --- /dev/null +++ b/dom/base/test/file_ipc_messagemanager_blob.html @@ -0,0 +1 @@ + diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index ddfd57443..b3b804ce4 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -676,6 +676,7 @@ skip-if = (toolkit == 'android') # Android: Bug 775227 [test_intersectionobservers.html] skip-if = true # Track Bug 1320704 [test_ipc_messagemanager_blob.html] +support-files = file_ipc_messagemanager_blob.html [test_link_prefetch.html] skip-if = !e10s # Track Bug 1281415 [test_link_stylesheet.html] diff --git a/dom/base/test/test_ipc_messagemanager_blob.html b/dom/base/test/test_ipc_messagemanager_blob.html index 74eab2945..77d6c767f 100644 --- a/dom/base/test/test_ipc_messagemanager_blob.html +++ b/dom/base/test/test_ipc_messagemanager_blob.html @@ -14,8 +14,7 @@ SimpleTest.waitForExplicitFinish(); - const childFrameURL = - "data:text/html,"; + const childFrameURL = "file_ipc_messagemanager_blob.html"; function childFrameScript() { "use strict"; diff --git a/dom/base/test/test_x-frame-options.html b/dom/base/test/test_x-frame-options.html index 8e24d8a78..a0c7acdc3 100644 --- a/dom/base/test/test_x-frame-options.html +++ b/dom/base/test/test_x-frame-options.html @@ -147,7 +147,11 @@ var testFrameInDataURI = function() { SimpleTest.waitForExplicitFinish(); // load the test harness -document.getElementById("harness").src = "file_x-frame-options_main.html"; +SpecialPowers.pushPrefEnv({ + "set": [["security.data_uri.block_toplevel_data_uri_navigations", false],] +}, function() { + document.getElementById("harness").src = "file_x-frame-options_main.html"; +}); -- cgit v1.2.3 From b7d9dad58e5a3f87a6c767412941700bc8010044 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 12 May 2018 14:32:03 +0200 Subject: Remove MOZ_B2G leftovers and some dead B2G-only components. --- dom/base/nsGlobalWindow.cpp | 111 -------------------------------------------- dom/base/nsGlobalWindow.h | 12 ----- dom/base/nsPIDOMWindow.h | 18 ------- 3 files changed, 141 deletions(-) (limited to 'dom/base') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 4ffccde9d..9663a6dbf 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -249,10 +249,6 @@ #include "mozilla/dom/SpeechSynthesis.h" #endif -#ifdef MOZ_B2G -#include "nsPISocketTransportService.h" -#endif - // Apple system headers seem to have a check() macro. #ifdef check class nsIScriptTimeoutHandler; @@ -1556,10 +1552,6 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow) mIdleRequestExecutor(nullptr), #ifdef DEBUG mSetOpenerWindowCalled(false), -#endif -#ifdef MOZ_B2G - mNetworkUploadObserverEnabled(false), - mNetworkDownloadObserverEnabled(false), #endif mCleanedUp(false), mDialogAbuseCount(0), @@ -1913,11 +1905,6 @@ nsGlobalWindow::CleanUp() os->RemoveObserver(mObserver, "dom-storage2-changed"); } -#ifdef MOZ_B2G - DisableNetworkEvent(eNetworkUpload); - DisableNetworkEvent(eNetworkDownload); -#endif // MOZ_B2G - if (mIdleService) { mIdleService->RemoveIdleObserver(mObserver, MIN_IDLE_NOTIFICATION_TIME_S); } @@ -1986,9 +1973,6 @@ nsGlobalWindow::CleanUp() mHasGamepad = false; DisableVRUpdates(); mHasVREvents = false; -#ifdef MOZ_B2G - DisableTimeChangeNotifications(); -#endif DisableIdleCallbackRequests(); } else { MOZ_ASSERT(!mHasGamepad); @@ -12133,27 +12117,6 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic, return NS_OK; } -#ifdef MOZ_B2G - if (!nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC) || - !nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_DOWNLOAD_TOPIC)) { - MOZ_ASSERT(IsInnerWindow()); - if (!AsInner()->IsCurrentInnerWindow()) { - return NS_OK; - } - - RefPtr event = NS_NewDOMEvent(this, nullptr, nullptr); - event->InitEvent( - !nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC) - ? NETWORK_UPLOAD_EVENT_NAME - : NETWORK_DOWNLOAD_EVENT_NAME, - false, false); - event->SetTrusted(true); - - bool dummy; - return DispatchEvent(event, &dummy); - } -#endif // MOZ_B2G - if (!nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) { MOZ_ASSERT(!NS_strcmp(aData, u"intl.accept_languages")); MOZ_ASSERT(IsInnerWindow()); @@ -15053,80 +15016,6 @@ nsGlobalWindow::GetIsPrerendered() return docShell && docShell->GetIsPrerendered(); } -#ifdef MOZ_B2G -void -nsGlobalWindow::EnableNetworkEvent(EventMessage aEventMessage) -{ - MOZ_ASSERT(IsInnerWindow()); - - nsCOMPtr permMgr = - services::GetPermissionManager(); - if (!permMgr) { - NS_ERROR("No PermissionManager available!"); - return; - } - - uint32_t permission = nsIPermissionManager::DENY_ACTION; - permMgr->TestExactPermissionFromPrincipal(GetPrincipal(), "network-events", - &permission); - - if (permission != nsIPermissionManager::ALLOW_ACTION) { - return; - } - - nsCOMPtr os = mozilla::services::GetObserverService(); - if (!os) { - NS_ERROR("ObserverService should be available!"); - return; - } - - switch (aEventMessage) { - case eNetworkUpload: - if (!mNetworkUploadObserverEnabled) { - mNetworkUploadObserverEnabled = true; - os->AddObserver(mObserver, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC, false); - } - break; - case eNetworkDownload: - if (!mNetworkDownloadObserverEnabled) { - mNetworkDownloadObserverEnabled = true; - os->AddObserver(mObserver, NS_NETWORK_ACTIVITY_BLIP_DOWNLOAD_TOPIC, false); - } - break; - default: - break; - } -} - -void -nsGlobalWindow::DisableNetworkEvent(EventMessage aEventMessage) -{ - MOZ_ASSERT(IsInnerWindow()); - - nsCOMPtr os = mozilla::services::GetObserverService(); - if (!os) { - return; - } - - switch (aEventMessage) { - case eNetworkUpload: - if (mNetworkUploadObserverEnabled) { - mNetworkUploadObserverEnabled = false; - os->RemoveObserver(mObserver, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC); - } - break; - case eNetworkDownload: - if (mNetworkDownloadObserverEnabled) { - mNetworkDownloadObserverEnabled = false; - os->RemoveObserver(mObserver, NS_NETWORK_ACTIVITY_BLIP_DOWNLOAD_TOPIC); - } - break; - default: - break; - } -} -#endif // MOZ_B2G - void nsGlobalWindow::RedefineProperty(JSContext* aCx, const char* aPropName, JS::Handle aValue, diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 78bee63a1..94d565bf3 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -639,13 +639,6 @@ public: virtual void EnableTimeChangeNotifications() override; virtual void DisableTimeChangeNotifications() override; -#ifdef MOZ_B2G - // Inner windows only. - virtual void EnableNetworkEvent(mozilla::EventMessage aEventMessage) override; - virtual void DisableNetworkEvent( - mozilla::EventMessage aEventMessage) override; -#endif // MOZ_B2G - virtual nsresult SetArguments(nsIArray* aArguments) override; void MaybeForgiveSpamCount(); @@ -1941,11 +1934,6 @@ protected: nsCOMPtr mLastOpenedURI; #endif -#ifdef MOZ_B2G - bool mNetworkUploadObserverEnabled; - bool mNetworkDownloadObserverEnabled; -#endif // MOZ_B2G - bool mCleanedUp; nsCOMPtr mApplicationCache; diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 45823057a..3fd666beb 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -452,24 +452,6 @@ public: virtual void EnableTimeChangeNotifications() = 0; virtual void DisableTimeChangeNotifications() = 0; -#ifdef MOZ_B2G - /** - * Tell the window that it should start to listen to the network event of the - * given aType. - * - * Inner windows only. - */ - virtual void EnableNetworkEvent(mozilla::EventMessage aEventMessage) = 0; - - /** - * Tell the window that it should stop to listen to the network event of the - * given aType. - * - * Inner windows only. - */ - virtual void DisableNetworkEvent(mozilla::EventMessage aEventMessage) = 0; -#endif // MOZ_B2G - /** * Tell this window that there is an observer for gamepad input * -- cgit v1.2.3 From 6571d2ceb42930dab01677ef0e95e732d5076fb8 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 12 May 2018 16:19:33 +0200 Subject: Remove MOZ_WIDGET_GONK [1/2] Tag #288 --- dom/base/Navigator.cpp | 6 ------ dom/base/ScreenOrientation.cpp | 2 +- dom/base/nsContentPermissionHelper.cpp | 3 --- dom/base/nsGlobalWindow.cpp | 10 +++++----- dom/base/nsGlobalWindow.h | 8 ++++---- dom/base/nsPIDOMWindow.h | 2 +- 6 files changed, 11 insertions(+), 20 deletions(-) (limited to 'dom/base') diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 5c315517c..ed96ee23b 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -767,12 +767,6 @@ StaticRefPtr gVibrateWindowListener; static bool MayVibrate(nsIDocument* doc) { -#if MOZ_WIDGET_GONK - if (XRE_IsParentProcess()) { - return true; // The system app can always vibrate - } -#endif // MOZ_WIDGET_GONK - // Hidden documents cannot start or stop a vibration. return (doc && !doc->Hidden()); } diff --git a/dom/base/ScreenOrientation.cpp b/dom/base/ScreenOrientation.cpp index bb3ccf5c3..ec9c4fa29 100644 --- a/dom/base/ScreenOrientation.cpp +++ b/dom/base/ScreenOrientation.cpp @@ -309,7 +309,7 @@ ScreenOrientation::LockInternal(ScreenOrientationInternal aOrientation, ErrorRes return nullptr; } -#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK) +#if !defined(MOZ_WIDGET_ANDROID) // User agent does not support locking the screen orientation. p->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR); return p.forget(); diff --git a/dom/base/nsContentPermissionHelper.cpp b/dom/base/nsContentPermissionHelper.cpp index fd04b1013..c57fc6233 100644 --- a/dom/base/nsContentPermissionHelper.cpp +++ b/dom/base/nsContentPermissionHelper.cpp @@ -5,9 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include -#ifdef MOZ_WIDGET_GONK -#include "GonkPermission.h" -#endif // MOZ_WIDGET_GONK #include "nsCOMPtr.h" #include "nsIDOMElement.h" #include "nsIPrincipal.h" diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 9663a6dbf..4e384c4d2 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -25,7 +25,7 @@ #include "mozilla/dom/Timeout.h" #include "mozilla/dom/TimeoutHandler.h" #include "mozilla/IntegerPrintfMacros.h" -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) #include "mozilla/dom/WindowOrientationObserver.h" #endif #include "nsDOMOfflineResourceList.h" @@ -1948,7 +1948,7 @@ nsGlobalWindow::CleanUp() mSpeechSynthesis = nullptr; #endif -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) mOrientationChangeObserver = nullptr; #endif @@ -2076,7 +2076,7 @@ nsGlobalWindow::FreeInnerObjects() mScreen = nullptr; } -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) mOrientationChangeObserver = nullptr; #endif @@ -14009,7 +14009,7 @@ nsGlobalWindow::DisableDeviceSensor(uint32_t aType) } } -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) void nsGlobalWindow::EnableOrientationChangeListener() { @@ -14902,7 +14902,7 @@ nsGlobalWindow::IsModalContentWindow(JSContext* aCx, JSObject* aGlobal) return xpc::WindowOrNull(aGlobal)->IsModalContentWindow(); } -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) int16_t nsGlobalWindow::Orientation(CallerType aCallerType) const { diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 94d565bf3..467bc6796 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -138,7 +138,7 @@ class U2F; class VRDisplay; class VREventObserver; class WakeLock; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) class WindowOrientationObserver; #endif class Worklet; @@ -631,7 +631,7 @@ public: virtual void EnableDeviceSensor(uint32_t aType) override; virtual void DisableDeviceSensor(uint32_t aType) override; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) virtual void EnableOrientationChangeListener() override; virtual void DisableOrientationChangeListener() override; #endif @@ -905,7 +905,7 @@ public: nsIDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError); already_AddRefed GetApplicationCache() override; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) int16_t Orientation(mozilla::dom::CallerType aCallerType) const; #endif @@ -1971,7 +1971,7 @@ protected: nsTArray mEnabledSensors; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) nsAutoPtr mOrientationChangeObserver; #endif diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 3fd666beb..47affbb06 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -444,7 +444,7 @@ public: */ virtual void DisableDeviceSensor(uint32_t aType) = 0; -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +#if defined(MOZ_WIDGET_ANDROID) virtual void EnableOrientationChangeListener() = 0; virtual void DisableOrientationChangeListener() = 0; #endif -- cgit v1.2.3 From 1124fb525bf7b8341170d886b8de070e20323efd Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 13 May 2018 22:46:04 +0200 Subject: Remove other gonk widget conditionals and unused files. Tag #288. --- dom/base/moz.build | 5 ----- 1 file changed, 5 deletions(-) (limited to 'dom/base') diff --git a/dom/base/moz.build b/dom/base/moz.build index 76c765b1c..77eb01ba6 100755 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -462,11 +462,6 @@ LOCAL_INCLUDES += [ '/xpcom/ds', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - LOCAL_INCLUDES += [ - '../system/gonk', - ] - if CONFIG['MOZ_WEBRTC']: LOCAL_INCLUDES += [ '/netwerk/sctp/datachannel', -- cgit v1.2.3