diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index 3a2a2d3d92bf..eed3fdcd3902 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -325,6 +325,7 @@ @RESPATH@/components/toolkit_finalizationwitness.xpt @RESPATH@/components/toolkit_formautofill.xpt @RESPATH@/components/toolkit_osfile.xpt +@RESPATH@/components/toolkit_securityreporter.xpt #ifdef NIGHTLY_BUILD @RESPATH@/components/toolkit_perfmonitoring.xpt #endif @@ -707,6 +708,10 @@ @RESPATH@/components/PrivateBrowsing.manifest @RESPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js +; Security Reports +@RESPATH@/components/SecurityReporter.manifest +@RESPATH@/components/SecurityReporter.js + ; Signed Packaged Content @RESPATH@/components/InstallPackagedWebapp.manifest @RESPATH@/components/InstallPackagedWebapp.js diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 631a68c9adad..b2d7d6e4551c 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -319,6 +319,7 @@ @RESPATH@/components/toolkit_finalizationwitness.xpt @RESPATH@/components/toolkit_formautofill.xpt @RESPATH@/components/toolkit_osfile.xpt +@RESPATH@/components/toolkit_securityreporter.xpt #ifdef NIGHTLY_BUILD @RESPATH@/components/toolkit_perfmonitoring.xpt #endif @@ -629,6 +630,10 @@ @RESPATH@/components/PrivateBrowsing.manifest @RESPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js +; Security Reports +@RESPATH@/components/SecurityReporter.manifest +@RESPATH@/components/SecurityReporter.js + ; Signed Packaged Content @RESPATH@/components/InstallPackagedWebapp.manifest @RESPATH@/components/InstallPackagedWebapp.js diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 60e3e27d9f6c..88789a20d583 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -812,7 +812,7 @@ nsDOMWindowUtils::SendWheelEvent(float aX, wheelEvent.refPoint = nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext); - widget->DispatchInputEvent(&wheelEvent); + widget->DispatchAPZAwareEvent(&wheelEvent); if (widget->AsyncPanZoomEnabled()) { // Computing overflow deltas is not compatible with APZ, so if APZ is diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index a1e0c5722ef8..a002f707a8f0 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1797,37 +1797,35 @@ TabChild::RecvMouseEvent(const nsString& aType, } bool -TabChild::RecvRealMouseMoveEvent(const WidgetMouseEvent& aEvent, +TabChild::RecvRealMouseMoveEvent(const WidgetMouseEvent& event, const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) { - return RecvRealMouseButtonEvent(aEvent, aGuid, aInputBlockId); + return RecvRealMouseButtonEvent(event, aGuid, aInputBlockId); } bool -TabChild::RecvSynthMouseMoveEvent(const WidgetMouseEvent& aEvent, +TabChild::RecvSynthMouseMoveEvent(const WidgetMouseEvent& event, const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) { - return RecvRealMouseButtonEvent(aEvent, aGuid, aInputBlockId); + return RecvRealMouseButtonEvent(event, aGuid, aInputBlockId); } bool -TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& aEvent, +TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& event, const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) { nsEventStatus unused; InputAPZContext context(aGuid, aInputBlockId, unused); - WidgetMouseEvent localEvent(aEvent); + WidgetMouseEvent localEvent(event); localEvent.widget = mPuppetWidget; - APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid, - mPuppetWidget->GetDefaultScale()); APZCCallbackHelper::DispatchWidgetEvent(localEvent); - if (aEvent.mFlags.mHandledByAPZ) { - mAPZEventState->ProcessMouseEvent(aEvent, aGuid, aInputBlockId); + if (event.mFlags.mHandledByAPZ) { + mAPZEventState->ProcessMouseEvent(event, aGuid, aInputBlockId); } return true; } @@ -1843,18 +1841,16 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent, mPuppetWidget, document, aEvent, aGuid, aInputBlockId); } - WidgetWheelEvent localEvent(aEvent); - localEvent.widget = mPuppetWidget; - APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid, - mPuppetWidget->GetDefaultScale()); - APZCCallbackHelper::DispatchWidgetEvent(localEvent); + WidgetWheelEvent event(aEvent); + event.widget = mPuppetWidget; + APZCCallbackHelper::DispatchWidgetEvent(event); - if (localEvent.mCanTriggerSwipe) { - SendRespondStartSwipeEvent(aInputBlockId, localEvent.TriggersSwipe()); + if (event.mCanTriggerSwipe) { + SendRespondStartSwipeEvent(aInputBlockId, event.TriggersSwipe()); } if (aEvent.mFlags.mHandledByAPZ) { - mAPZEventState->ProcessWheelEvent(localEvent, aGuid, aInputBlockId); + mAPZEventState->ProcessWheelEvent(event, aGuid, aInputBlockId); } return true; } diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index c9603a8a1125..f9781c3cd2c2 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -1450,7 +1450,7 @@ bool TabParent::RecvDispatchWheelEvent(const mozilla::WidgetWheelEvent& aEvent) localEvent.widget = widget; localEvent.refPoint -= GetChildProcessOffset(); - widget->DispatchInputEvent(&localEvent); + widget->DispatchAPZAwareEvent(&localEvent); return true; } diff --git a/dom/media/tests/mochitest/mochitest.ini b/dom/media/tests/mochitest/mochitest.ini index 4abdca22dc26..88d0351dfe04 100644 --- a/dom/media/tests/mochitest/mochitest.ini +++ b/dom/media/tests/mochitest/mochitest.ini @@ -167,11 +167,11 @@ skip-if = toolkit == 'gonk' || buildapp == 'mulet' || (android_version == '18' & [test_peerConnection_twoAudioTracksInOneStream.html] skip-if = toolkit == 'gonk' || buildapp == 'mulet' || (android_version == '18' && debug) # b2g (Bug 1059867), android(Bug 1189784, timeouts on 4.3 emulator) [test_peerConnection_twoAudioVideoStreams.html] -# b2g(Bug 960442, video support for WebRTC is disabled on b2g), Bug 1180000 for Linux debug e10s, android(Bug 1189784, timeouts on 4.3 emulator) -skip-if = toolkit == 'gonk' || buildapp == 'mulet' || android_version == '18' +# b2g(Bug 960442, video support for WebRTC is disabled on b2g), Bug 1171255 for Linux debug e10s, android(Bug 1189784, timeouts on 4.3 emulator) +skip-if = toolkit == 'gonk' || buildapp == 'mulet' || (os == 'linux' && debug && e10s) || android_version == '18' [test_peerConnection_twoAudioVideoStreamsCombined.html] -# b2g(Bug 960442, video support for WebRTC is disabled on b2g), Bug 1180000 for Linux debug e10s, android(Bug 1189784, timeouts on 4.3 emulator) -skip-if = toolkit == 'gonk' || buildapp == 'mulet' || android_version == '18' +# b2g(Bug 960442, video support for WebRTC is disabled on b2g), Bug 1127828 for Linux debug e10s, android(Bug 1189784, timeouts on 4.3 emulator) +skip-if = toolkit == 'gonk' || buildapp == 'mulet' || (os == 'linux' && debug && e10s) || android_version == '18' [test_peerConnection_twoVideoStreams.html] # b2g(Bug 960442, video support for WebRTC is disabled on b2g), Bug 1180000 for Linux debug e10s, android(Bug 1189784, timeouts on 4.3 emulator) skip-if = toolkit == 'gonk' || buildapp == 'mulet' || android_version == '18' diff --git a/dom/media/webspeech/synth/test/mochitest.ini b/dom/media/webspeech/synth/test/mochitest.ini index 2136a7f34ac3..5a2d4807294d 100644 --- a/dom/media/webspeech/synth/test/mochitest.ini +++ b/dom/media/webspeech/synth/test/mochitest.ini @@ -22,4 +22,5 @@ support-files = [test_global_queue.html] [test_global_queue_cancel.html] [test_global_queue_pause.html] -[test_bfcache.html] \ No newline at end of file +[test_bfcache.html] +skip-if = os == 'linux' || os == 'android' # bug 1237176 diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index d59a1ae6ff46..ea23b50c0f5a 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -1087,9 +1087,10 @@ APZCTreeManager::ReceiveInputEvent(WidgetInputEvent& aEvent, ScrollableLayerGuid* aOutTargetGuid, uint64_t* aOutInputBlockId) { + // This function will be removed once metro code is modified to use the + // InputData version of ReceiveInputEvent. // In general it is preferable to use the version of ReceiveInputEvent - // that takes an InputData, as that is usable from off-main-thread. On some - // platforms OMT input isn't possible, and there we can use this version. + // that takes an InputData, as that is usable from off-main-thread. MOZ_ASSERT(NS_IsMainThread()); APZThreadUtils::AssertOnControllerThread(); diff --git a/gfx/layers/apz/util/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp index 2e2cd6f8d916..37dc8a47f27a 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.cpp +++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp @@ -532,19 +532,13 @@ APZCCallbackHelper::ApplyCallbackTransform(const LayoutDeviceIntPoint& aPoint, } void -APZCCallbackHelper::ApplyCallbackTransform(WidgetEvent& aEvent, +APZCCallbackHelper::ApplyCallbackTransform(WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid, const CSSToLayoutDeviceScale& aScale) { - if (aEvent.AsTouchEvent()) { - WidgetTouchEvent& event = *(aEvent.AsTouchEvent()); - for (size_t i = 0; i < event.touches.Length(); i++) { - event.touches[i]->mRefPoint = ApplyCallbackTransform( - event.touches[i]->mRefPoint, aGuid, aScale); - } - } else { - aEvent.refPoint = ApplyCallbackTransform( - aEvent.refPoint, aGuid, aScale); + for (size_t i = 0; i < aEvent.touches.Length(); i++) { + aEvent.touches[i]->mRefPoint = ApplyCallbackTransform( + aEvent.touches[i]->mRefPoint, aGuid, aScale); } } diff --git a/gfx/layers/apz/util/APZCCallbackHelper.h b/gfx/layers/apz/util/APZCCallbackHelper.h index 1932245af3dd..2b64e67b7ae9 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.h +++ b/gfx/layers/apz/util/APZCCallbackHelper.h @@ -99,9 +99,9 @@ public: const ScrollableLayerGuid& aGuid, const CSSToLayoutDeviceScale& aScale); - /* Convenience function for applying a callback transform to all refpoints - * in the input event. */ - static void ApplyCallbackTransform(WidgetEvent& aEvent, + /* Convenience function for applying a callback transform to all touch + * points of a touch event. */ + static void ApplyCallbackTransform(WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid, const CSSToLayoutDeviceScale& aScale); diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 699ee64c0e7e..cac064d1a775 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -183,7 +183,6 @@ #include "nsSubDocumentFrame.h" #include "nsQueryObject.h" #include "nsLayoutStylesheetCache.h" -#include "mozilla/layers/InputAPZContext.h" #ifdef ANDROID #include "nsIDocShellTreeOwner.h" @@ -5452,13 +5451,6 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll) nsCOMPtr shell = pointVM->GetPresShell(); if (shell) { - // Since this gets run in a refresh tick there isn't an InputAPZContext on - // the stack from the nsBaseWidget. We need to simulate one with at least - // the correct target guid, so that the correct callback transform gets - // applied if this event goes to a child process. The input block id is set - // to 0 because this is a synthetic event which doesn't really belong to any - // input block. Same for the APZ response field. - InputAPZContext apzContext(mMouseEventTargetGuid, 0, nsEventStatus_eIgnore); shell->DispatchSynthMouseMove(&event, !aFromScroll); } @@ -6426,11 +6418,9 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent) nsView* rootView = mViewManager->GetRootView(); mMouseLocation = nsLayoutUtils::TranslateWidgetToView(mPresContext, aEvent->widget, aEvent->refPoint, rootView); - mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid(); } else { mMouseLocation = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame); - mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid(); } #ifdef DEBUG_MOUSE_LOCATION if (aEvent->mMessage == eMouseEnterIntoWidget) { @@ -6450,7 +6440,6 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent) // this won't matter at all since we'll get the mouse move or enter after // the mouse exit when the mouse moves from one of our widgets into another. mMouseLocation = nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE); - mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid(); #ifdef DEBUG_MOUSE_LOCATION printf("[ps=%p]got mouse exit for %p\n", this, aEvent->widget); diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h index 955f3c66d107..9dbda7536d62 100644 --- a/layout/base/nsPresShell.h +++ b/layout/base/nsPresShell.h @@ -779,10 +779,6 @@ protected: // over our window or there is no last observed mouse location for some // reason. nsPoint mMouseLocation; - // This is an APZ state variable that tracks the target guid for the last - // mouse event that was processed (corresponding to mMouseLocation). This is - // needed for the synthetic mouse events. - mozilla::layers::ScrollableLayerGuid mMouseEventTargetGuid; // mStyleSet owns it but we maintain a ref, may be null RefPtr mPrefStyleSheet; diff --git a/layout/base/tests/chrome/chrome.ini b/layout/base/tests/chrome/chrome.ini index 23679c6b7758..277c9e62222d 100644 --- a/layout/base/tests/chrome/chrome.ini +++ b/layout/base/tests/chrome/chrome.ini @@ -56,7 +56,7 @@ skip-if = buildapp == 'b2g' [test_fixed_bg_scrolling_repaints.html] skip-if = buildapp == 'b2g' [test_leaf_layers_partition_browser_window.xul] -skip-if = (!debug) || (toolkit == "cocoa") || (buildapp == 'b2g') # Disabled on Mac because of Bug 748219 +skip-if = (!debug) || (toolkit == "cocoa") || (os == "linux") || (buildapp == 'b2g') # Disabled on Mac and Linux because of Bug 992311 [test_no_clip_iframe.xul] skip-if = buildapp == 'b2g' [test_passpointerevents.html] diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 0750329eb00d..a6fdda785822 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -2101,6 +2101,14 @@ nsMenuPopupFrame::AttributeChanged(int32_t aNameSpaceID, if (aAttribute == nsGkAtoms::left || aAttribute == nsGkAtoms::top) MoveToAttributePosition(); +#ifndef MOZ_GTK2 + if (aAttribute == nsGkAtoms::noautohide) { + nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); + if (pm) + pm->EnableRollup(mContent, !IsNoAutoHide()); + } +#endif + if (aAttribute == nsGkAtoms::label) { // set the label for the titlebar nsView* view = GetView(); diff --git a/layout/xul/nsXULPopupManager.cpp b/layout/xul/nsXULPopupManager.cpp index 5e36296c2de8..92463eda63af 100644 --- a/layout/xul/nsXULPopupManager.cpp +++ b/layout/xul/nsXULPopupManager.cpp @@ -1236,6 +1236,41 @@ nsXULPopupManager::HidePopupsInList(const nsTArray &aFrames) SetCaptureState(nullptr); } +void +nsXULPopupManager::EnableRollup(nsIContent* aPopup, bool aShouldRollup) +{ +#ifndef MOZ_GTK + if (aShouldRollup) { + nsMenuChainItem* item = mNoHidePanels; + while (item) { + if (item->Content() == aPopup) { + item->Detach(&mNoHidePanels); + nsIContent* oldmenu = nullptr; + if (mPopups) + oldmenu = mPopups->Content(); + item->SetParent(mPopups); + mPopups = item; + SetCaptureState(oldmenu); + return; + } + item = item->GetParent(); + } + } else { + nsMenuChainItem* item = mPopups; + while (item) { + if (item->Content() == aPopup) { + item->Detach(&mPopups); + item->SetParent(mNoHidePanels); + mNoHidePanels = item; + SetCaptureState(nullptr); + return; + } + item = item->GetParent(); + } + } +#endif +} + bool nsXULPopupManager::IsChildOfDocShell(nsIDocument* aDoc, nsIDocShellTreeItem* aExpected) { diff --git a/layout/xul/nsXULPopupManager.h b/layout/xul/nsXULPopupManager.h index f706183d4791..334049bed22a 100644 --- a/layout/xul/nsXULPopupManager.h +++ b/layout/xul/nsXULPopupManager.h @@ -484,6 +484,14 @@ public: */ void HidePopupsInDocShell(nsIDocShellTreeItem* aDocShellToHide); + /** + * Enable or disable the dynamic noautohide state of a panel. + * + * aPanel - the panel whose state is to change + * aShouldRollup - whether the panel is no longer noautohide + */ + void EnableRollup(nsIContent* aPopup, bool aShouldRollup); + /** * Execute a menu command from the triggering event aEvent. * diff --git a/mobile/android/b2gdroid/installer/package-manifest.in b/mobile/android/b2gdroid/installer/package-manifest.in index 2f214ad0771f..983ebc659383 100644 --- a/mobile/android/b2gdroid/installer/package-manifest.in +++ b/mobile/android/b2gdroid/installer/package-manifest.in @@ -251,6 +251,7 @@ @BINPATH@/components/toolkit_finalizationwitness.xpt @BINPATH@/components/toolkit_formautofill.xpt @BINPATH@/components/toolkit_osfile.xpt +@RESPATH@/components/toolkit_securityreporter.xpt #ifdef NIGHTLY_BUILD @BINPATH@/components/toolkit_perfmonitoring.xpt #endif @@ -466,6 +467,10 @@ @BINPATH@/components/url-classifier.xpt #endif +; Security Reports +@RESPATH@/components/SecurityReporter.manifest +@RESPATH@/components/SecurityReporter.js + ; [Browser Chrome Files] @BINPATH@/chrome/browser@JAREXT@ @BINPATH@/chrome/browser.manifest diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 0030384e96be..6c10168cc959 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -228,6 +228,7 @@ @BINPATH@/components/toolkit_finalizationwitness.xpt @BINPATH@/components/toolkit_formautofill.xpt @BINPATH@/components/toolkit_osfile.xpt +@BINPATH@/components/toolkit_securityreporter.xpt #ifdef NIGHTLY_BUILD @BINPATH@/components/toolkit_perfmonitoring.xpt #endif @@ -434,6 +435,10 @@ @BINPATH@/components/PrivateBrowsing.manifest @BINPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js +; Security Reports +@BINPATH@/components/SecurityReporter.manifest +@BINPATH@/components/SecurityReporter.js + ; [Browser Chrome Files] @BINPATH@/chrome/toolkit@JAREXT@ @BINPATH@/chrome/toolkit.manifest diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 027581ef0a6b..e09bbb2e2237 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1033,7 +1033,11 @@ pref("print.print_edge_right", 0); pref("print.print_edge_bottom", 0); // Print via the parent process. This is only used when e10s is enabled. +#if defined(XP_WIN) +pref("print.print_via_parent", true); +#else pref("print.print_via_parent", false); +#endif // Pref used by the spellchecker extension to control the // maximum number of misspelled words that will be underlined diff --git a/security/manager/ssl/tests/unit/test_toolkit_securityreporter.js b/security/manager/ssl/tests/unit/test_toolkit_securityreporter.js new file mode 100644 index 000000000000..1c7286a6aca3 --- /dev/null +++ b/security/manager/ssl/tests/unit/test_toolkit_securityreporter.js @@ -0,0 +1,132 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* This test is for the TLS error reporting functionality exposed by + * SecurityReporter.js in /toolkit/components/securityreporter. The test is + * here because we make use of the tlsserver functionality that lives with the + * PSM ssl tests. + * + * The testing here will be augmented by the existing mochitests for the + * error reporting functionality in aboutNetError.xhtml and + * aboutCertError.xhtml once these make use of this component. + */ + +"use strict"; +const CC = Components.Constructor; +const Cm = Components.manager; + +Cu.import("resource://testing-common/AppInfo.jsm"); +updateAppInfo(); + +// We must get the profile before performing operations on the cert db. +do_get_profile(); + +const certdb = Cc["@mozilla.org/security/x509certdb;1"] + .getService(Ci.nsIX509CertDB); +const reporter = Cc["@mozilla.org/securityreporter;1"] + .getService(Ci.nsISecurityReporter); + + +const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1", + "nsIBinaryInputStream", "setInputStream"); + +var server; + +// this allows us to create a callback which checks that a report is as +// expected. +function getReportCheck(expectReport, expectedError) { + return function sendReportWithInfo(transportSecurityInfo) { + // register a path handler on the server + server.registerPathHandler("/submit/sslreports", + function(request, response) { + if (expectReport) { + let report = JSON.parse(readDataFromRequest(request)); + do_check_eq(report.errorCode, expectedError); + response.setStatusLine(null, 201, "Created"); + response.write("Created"); + } else { + do_throw("No report should have been received"); + } + }); + + reporter.reportTLSError(transportSecurityInfo, "example.com", -1); + } +} + +// read the request body from a request +function readDataFromRequest(aRequest) { + if (aRequest.method == "POST" || aRequest.method == "PUT") { + if (aRequest.bodyInputStream) { + let inputStream = new BinaryInputStream(aRequest.bodyInputStream); + let bytes = []; + let available; + + while ((available = inputStream.available()) > 0) { + Array.prototype.push.apply(bytes, inputStream.readByteArray(available)); + } + + return String.fromCharCode.apply(null, bytes); + } + } + return null; +} + +function run_test() { + // start a report server + server = new HttpServer(); + server.start(-1); + + let port = server.identity.primaryPort; + + // Set the reporting URL to ensure any reports are sent to the test server + Services.prefs.setCharPref("security.ssl.errorReporting.url", + `http://localhost:${port}/submit/sslreports`); + // set strict-mode pinning enforcement so we can cause connection failures. + Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 2); + + // start a TLS server + add_tls_server_setup("BadCertServer", "bad_certs"); + + // Add a user-specified trust anchor. + addCertFromFile(certdb, "bad_certs/other-test-ca.pem", "CTu,u,u"); + + + // Cause a reportable condition with error reporting disabled. No report + // should be sent. + Services.prefs.setBoolPref("security.ssl.errorReporting.enabled", false); + add_connection_test("expired.example.com", + SEC_ERROR_EXPIRED_CERTIFICATE, null, + getReportCheck(false)); + + // Now enable reporting + add_test(function () { + Services.prefs.setBoolPref("security.ssl.errorReporting.enabled", true); + run_next_test(); + }); + + // test calling the component with no transportSecurityInfo. No report should + // be sent even though reporting is enabled. + add_test(function() { + server.registerPathHandler("/submit/sslreports", + function(request, response) { + do_throw("No report should be sent"); + }); + reporter.reportTLSError(null, "example.com", -1); + run_next_test(); + }); + + // Test sending a report with no error. This allows us to check the case + // where there is no failed cert chain + add_connection_test("good.include-subdomains.pinning.example.com", + PRErrorCodeSuccess, null, + getReportCheck(true, PRErrorCodeSuccess)); + + // Test sending a report where there is an error and a failed cert chain. + add_connection_test("expired.example.com", + SEC_ERROR_EXPIRED_CERTIFICATE, null, + getReportCheck(true, SEC_ERROR_EXPIRED_CERTIFICATE)); + + run_next_test(); +} diff --git a/security/manager/ssl/tests/unit/xpcshell.ini b/security/manager/ssl/tests/unit/xpcshell.ini index 3fa90211e956..2270f32ab9fe 100644 --- a/security/manager/ssl/tests/unit/xpcshell.ini +++ b/security/manager/ssl/tests/unit/xpcshell.ini @@ -150,3 +150,6 @@ skip-if = toolkit == 'android' || toolkit == 'gonk' run-sequentially = hardcoded ports [test_weak_crypto.js] firefox-appdir = browser + +# The TLS error reporting functionality lives in /toolkit but needs tlsserver +[test_toolkit_securityreporter.js] diff --git a/testing/mozharness/scripts/release/generate-checksums.py b/testing/mozharness/scripts/release/generate-checksums.py index f0cc57067e25..07eed0d33145 100644 --- a/testing/mozharness/scripts/release/generate-checksums.py +++ b/testing/mozharness/scripts/release/generate-checksums.py @@ -211,7 +211,14 @@ class ChecksumsGenerator(BaseScript, VirtualenvMixin, SigningMixin, VCSMixin): self.fatal("Failed to sign {}".format(sums)) def upload(self): - files = [] + # we need to provide the public side of the gpg key so that people can + # verify the detached signatures + dirs = self.query_abs_dirs() + tools_dir = path.join(dirs["abs_work_dir"], "tools") + self.copyfile(os.path.join(tools_dir, 'scripts', 'release', 'KEY'), + 'KEY') + files = ['KEY'] + for fmt in self.config["formats"]: files.append(self._get_sums_filename(fmt)) files.append("{}.asc".format(self._get_sums_filename(fmt))) diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index 309389fef1bb..6923a8d0f60e 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -48,6 +48,7 @@ DIRS += [ 'reader', 'remotebrowserutils', 'reflect', + 'securityreporter', 'sqlite', 'startup', 'statusfilter', diff --git a/toolkit/components/securityreporter/SecurityReporter.js b/toolkit/components/securityreporter/SecurityReporter.js new file mode 100644 index 000000000000..9ca1e55466cb --- /dev/null +++ b/toolkit/components/securityreporter/SecurityReporter.js @@ -0,0 +1,112 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const { classes: Cc, interfaces: Ci, utils: Cu} = Components; + +Cu.importGlobalProperties(['fetch']); + +const { XPCOMUtils } = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {}); +const protocolHandler = Cc["@mozilla.org/network/protocol;1?name=http"] + .getService(Ci.nsIHttpProtocolHandler); +const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); + +const TLS_ERROR_REPORT_TELEMETRY_SUCCESS = 6; +const TLS_ERROR_REPORT_TELEMETRY_FAILURE = 7; +const HISTOGRAM_ID = "TLS_ERROR_REPORT_UI"; + + +XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils", + "resource://gre/modules/UpdateUtils.jsm"); + +function getDERString(cert) +{ + var length = {}; + var derArray = cert.getRawDER(length); + var derString = ''; + for (var i = 0; i < derArray.length; i++) { + derString += String.fromCharCode(derArray[i]); + } + return derString; +} + +function SecurityReporter() { } + +SecurityReporter.prototype = { + classDescription: "Security reporter component", + classID: Components.ID("{8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b}"), + contractID: "@mozilla.org/securityreporter;1", + QueryInterface: XPCOMUtils.generateQI([Ci.nsISecurityReporter]), + reportTLSError: function(transportSecurityInfo, hostname, port) { + // don't send if there's no transportSecurityInfo (since the report cannot + // contain anything of interest) + if (!transportSecurityInfo) { + return; + } + + // don't send a report if the pref is not enabled + if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) { + return; + } + + // Don't send a report if the host we're connecting to is the report + // server (otherwise we'll get loops when this fails) + let endpoint = + Services.prefs.getCharPref("security.ssl.errorReporting.url"); + let reportURI = Services.io.newURI(endpoint, null, null); + + if (reportURI.host == hostname) { + return; + } + + // Convert the nsIX509CertList into a format that can be parsed into + // JSON + let asciiCertChain = []; + + if (transportSecurityInfo.failedCertChain) { + let certs = transportSecurityInfo.failedCertChain.getEnumerator(); + while (certs.hasMoreElements()) { + let cert = certs.getNext(); + cert.QueryInterface(Ci.nsIX509Cert); + asciiCertChain.push(btoa(getDERString(cert))); + } + } + + let report = { + hostname: hostname, + port: port, + timestamp: Math.round(Date.now() / 1000), + errorCode: transportSecurityInfo.errorCode, + failedCertChain: asciiCertChain, + userAgent: protocolHandler.userAgent, + version: 1, + build: Services.appinfo.appBuildID, + product: Services.appinfo.name, + channel: UpdateUtils.UpdateChannel + } + + fetch(endpoint, { + method: "POST", + body: JSON.stringify(report), + headers: { + 'Content-Type': 'application/json' + } + }).then(function (aResponse) { + if (!aResponse.ok) { + // request returned non-success status + Services.telemetry.getHistogramById(HISTOGRAM_ID) + .add(TLS_ERROR_REPORT_TELEMETRY_FAILURE); + } else { + Services.telemetry.getHistogramById(HISTOGRAM_ID) + .add(TLS_ERROR_REPORT_TELEMETRY_SUCCESS); + } + }).catch(function (e) { + // error making request to reportURL + Services.telemetry.getHistogramById(HISTOGRAM_ID) + .add(TLS_ERROR_REPORT_TELEMETRY_FAILURE); + }); + } +}; + +this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SecurityReporter]); diff --git a/toolkit/components/securityreporter/SecurityReporter.manifest b/toolkit/components/securityreporter/SecurityReporter.manifest new file mode 100644 index 000000000000..d4e080dc7cd9 --- /dev/null +++ b/toolkit/components/securityreporter/SecurityReporter.manifest @@ -0,0 +1,2 @@ +component {8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b} SecurityReporter.js +contract @mozilla.org/securityreporter;1 {8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b} diff --git a/toolkit/components/securityreporter/moz.build b/toolkit/components/securityreporter/moz.build new file mode 100644 index 000000000000..447033be2ebb --- /dev/null +++ b/toolkit/components/securityreporter/moz.build @@ -0,0 +1,16 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +XPIDL_MODULE = 'toolkit_securityreporter' + +XPIDL_SOURCES += [ + 'nsISecurityReporter.idl', +] + +EXTRA_COMPONENTS += [ + 'SecurityReporter.js', + 'SecurityReporter.manifest', +] diff --git a/toolkit/components/securityreporter/nsISecurityReporter.idl b/toolkit/components/securityreporter/nsISecurityReporter.idl new file mode 100644 index 000000000000..462dd1e480e2 --- /dev/null +++ b/toolkit/components/securityreporter/nsISecurityReporter.idl @@ -0,0 +1,14 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsISupports.idl" +#include "nsITransportSecurityInfo.idl" + +[scriptable, uuid(8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b)] +interface nsISecurityReporter : nsISupports +{ + void reportTLSError(in nsITransportSecurityInfo aSecurityInfo, + in AUTF8String aHostname, + in long aPort); +}; diff --git a/widget/PuppetWidget.cpp b/widget/PuppetWidget.cpp index ecbdb456ae6d..5f27f6e4dbbb 100644 --- a/widget/PuppetWidget.cpp +++ b/widget/PuppetWidget.cpp @@ -353,6 +353,29 @@ PuppetWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus) nsEventStatus PuppetWidget::DispatchInputEvent(WidgetInputEvent* aEvent) +{ + if (!mTabChild) { + return nsEventStatus_eIgnore; + } + + switch (aEvent->mClass) { + case eMouseEventClass: + Unused << + mTabChild->SendDispatchMouseEvent(*aEvent->AsMouseEvent()); + break; + case eKeyboardEventClass: + Unused << + mTabChild->SendDispatchKeyboardEvent(*aEvent->AsKeyboardEvent()); + break; + default: + MOZ_ASSERT_UNREACHABLE("unsupported event type"); + } + + return nsEventStatus_eIgnore; +} + +nsEventStatus +PuppetWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent) { if (!AsyncPanZoomEnabled()) { nsEventStatus status = nsEventStatus_eIgnore; @@ -369,14 +392,6 @@ PuppetWidget::DispatchInputEvent(WidgetInputEvent* aEvent) Unused << mTabChild->SendDispatchWheelEvent(*aEvent->AsWheelEvent()); break; - case eMouseEventClass: - Unused << - mTabChild->SendDispatchMouseEvent(*aEvent->AsMouseEvent()); - break; - case eKeyboardEventClass: - Unused << - mTabChild->SendDispatchKeyboardEvent(*aEvent->AsKeyboardEvent()); - break; default: MOZ_ASSERT_UNREACHABLE("unsupported event type"); } diff --git a/widget/PuppetWidget.h b/widget/PuppetWidget.h index 40e6da2a5147..a9ea5c03626f 100644 --- a/widget/PuppetWidget.h +++ b/widget/PuppetWidget.h @@ -132,6 +132,7 @@ public: LayoutDeviceIntPoint* aPoint = nullptr); NS_IMETHOD DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus) override; + nsEventStatus DispatchAPZAwareEvent(WidgetInputEvent* aEvent) override; nsEventStatus DispatchInputEvent(WidgetInputEvent* aEvent) override; void SetConfirmedTargetAPZC(uint64_t aInputBlockId, const nsTArray& aTargets) const override; diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 98d983184118..e3ab0969a6e9 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -4538,7 +4538,7 @@ NSEvent* gLastDragMouseDownEvent = nil; else geckoEvent.button = WidgetMouseEvent::eLeftButton; - mGeckoChild->DispatchInputEvent(&geckoEvent); + mGeckoChild->DispatchAPZAwareEvent(&geckoEvent); mBlockedLastMouseDown = NO; // XXX maybe call markedTextSelectionChanged:client: here? @@ -4565,7 +4565,7 @@ NSEvent* gLastDragMouseDownEvent = nil; // This might destroy our widget (and null out mGeckoChild). bool defaultPrevented = - (mGeckoChild->DispatchInputEvent(&geckoEvent) == nsEventStatus_eConsumeNoDefault); + (mGeckoChild->DispatchAPZAwareEvent(&geckoEvent) == nsEventStatus_eConsumeNoDefault); // Check to see if we are double-clicking in the titlebar. CGFloat locationInTitlebar = [[self window] frame].size.height - [theEvent locationInWindow].y; @@ -4686,7 +4686,7 @@ NewCGSRegionFromRegion(const LayoutDeviceIntRegion& aRegion, WidgetMouseEvent::eReal); [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent]; - mGeckoChild->DispatchInputEvent(&geckoEvent); + mGeckoChild->DispatchAPZAwareEvent(&geckoEvent); NS_OBJC_END_TRY_ABORT_BLOCK; } @@ -4732,7 +4732,7 @@ NewCGSRegionFromRegion(const LayoutDeviceIntRegion& aRegion, geckoEvent.button = WidgetMouseEvent::eRightButton; geckoEvent.clickCount = [theEvent clickCount]; - mGeckoChild->DispatchInputEvent(&geckoEvent); + mGeckoChild->DispatchAPZAwareEvent(&geckoEvent); if (!mGeckoChild) return; @@ -4756,7 +4756,7 @@ NewCGSRegionFromRegion(const LayoutDeviceIntRegion& aRegion, geckoEvent.clickCount = [theEvent clickCount]; nsAutoRetainCocoaObject kungFuDeathGrip(self); - mGeckoChild->DispatchInputEvent(&geckoEvent); + mGeckoChild->DispatchAPZAwareEvent(&geckoEvent); NS_OBJC_END_TRY_ABORT_BLOCK; } @@ -4840,7 +4840,7 @@ static int32_t RoundUp(double aDouble) WidgetWheelEvent wheelEvent(true, msg, mGeckoChild); [self convertCocoaMouseWheelEvent:theEvent toGeckoEvent:&wheelEvent]; mExpectingWheelStop = (msg == eWheelOperationStart); - mGeckoChild->DispatchInputEvent(wheelEvent.AsInputEvent()); + mGeckoChild->DispatchAPZAwareEvent(wheelEvent.AsInputEvent()); } - (void)sendWheelCondition:(BOOL)condition diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 35bd4a75f874..e77b4a2d0154 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -2695,7 +2695,7 @@ nsWindow::DispatchMissedButtonReleases(GdkEventCrossing *aGdkEvent) WidgetMouseEvent synthEvent(true, eMouseUp, this, WidgetMouseEvent::eSynthesized); synthEvent.button = buttonType; - DispatchInputEvent(&synthEvent); + DispatchAPZAwareEvent(&synthEvent); } } } @@ -2817,7 +2817,7 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent) InitButtonEvent(event, aEvent); event.pressure = mLastMotionPressure; - DispatchInputEvent(&event); + DispatchAPZAwareEvent(&event); // right menu click on linux should also pop up a context menu if (domButton == WidgetMouseEvent::eRightButton && @@ -2860,7 +2860,7 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent) gdk_event_get_axis ((GdkEvent*)aEvent, GDK_AXIS_PRESSURE, &pressure); event.pressure = pressure ? pressure : mLastMotionPressure; - DispatchInputEvent(&event); + DispatchAPZAwareEvent(&event); mLastMotionPressure = pressure; } @@ -3228,7 +3228,7 @@ nsWindow::OnScrollEvent(GdkEventScroll *aEvent) wheelEvent.time = aEvent->time; wheelEvent.timeStamp = GetEventTimeStamp(aEvent->time); - DispatchInputEvent(&wheelEvent); + DispatchAPZAwareEvent(&wheelEvent); } void @@ -3445,7 +3445,7 @@ nsWindow::OnTouchEvent(GdkEventTouch* aEvent) *event.touches.AppendElement() = touch.forget(); } - DispatchInputEvent(&event); + DispatchAPZAwareEvent(&event); return TRUE; } #endif diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 25dc570e58b5..cb79df584ad2 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -1012,13 +1012,14 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent, MOZ_ASSERT(NS_IsMainThread()); InputAPZContext context(aGuid, aInputBlockId, aApzResponse); - // If this is an event that the APZ has targeted to an APZC in the root + // If this is a touch event and APZ has targeted it to an APZC in the root // process, apply that APZC's callback-transform before dispatching the // event. If the event is instead targeted to an APZC in the child process, // the transform will be applied in the child process before dispatching // the event there (see e.g. TabChild::RecvRealTouchEvent()). - if (aGuid.mLayersId == mCompositorParent->RootLayerTreeId()) { - APZCCallbackHelper::ApplyCallbackTransform(*aEvent, aGuid, + // TODO: Do other types of events (than touch) need this? + if (aEvent->AsTouchEvent() && aGuid.mLayersId == mCompositorParent->RootLayerTreeId()) { + APZCCallbackHelper::ApplyCallbackTransform(*aEvent->AsTouchEvent(), aGuid, GetDefaultScale()); } @@ -1029,7 +1030,7 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent, UniquePtr original(aEvent->Duplicate()); DispatchEvent(aEvent, status); - if (mAPZC && !context.WasRoutedToChildProcess() && aInputBlockId) { + if (mAPZC && !context.WasRoutedToChildProcess()) { // EventStateManager did not route the event into the child process. // It's safe to communicate to APZ that the event has been processed. // TODO: Eventually we'll be able to move the SendSetTargetAPZCNotification @@ -1063,6 +1064,21 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent, return status; } +nsEventStatus +nsBaseWidget::DispatchInputEvent(WidgetInputEvent* aEvent) +{ + if (mAPZC) { + nsEventStatus result = mAPZC->ReceiveInputEvent(*aEvent, nullptr, nullptr); + if (result == nsEventStatus_eConsumeNoDefault) { + return result; + } + } + + nsEventStatus status; + DispatchEvent(aEvent, status); + return status; +} + class DispatchWheelEventOnMainThread : public Task { public: @@ -1130,7 +1146,7 @@ private: }; nsEventStatus -nsBaseWidget::DispatchInputEvent(WidgetInputEvent* aEvent) +nsBaseWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent) { MOZ_ASSERT(NS_IsMainThread()); if (mAPZC) { diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h index d0f1cecb3a5b..34729aaa3fd2 100644 --- a/widget/nsBaseWidget.h +++ b/widget/nsBaseWidget.h @@ -252,9 +252,13 @@ public: const FrameMetrics::ViewID& aViewId, const CSSRect& aRect, const uint32_t& aFlags) override; - // Dispatch an event that must be first be routed through APZ. + // Helper function for dispatching events which are not processed by APZ, + // but need to be transformed by APZ. nsEventStatus DispatchInputEvent(mozilla::WidgetInputEvent* aEvent) override; + // Dispatch an event that must be first be routed through APZ. + nsEventStatus DispatchAPZAwareEvent(mozilla::WidgetInputEvent* aEvent) override; + void SetConfirmedTargetAPZC(uint64_t aInputBlockId, const nsTArray& aTargets) const override; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 35811591a541..02b31c0b3860 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -1415,6 +1415,13 @@ class nsIWidget : public nsISupports { * enabled. If invoked in the child process, it is forwarded to the * parent process synchronously. */ + virtual nsEventStatus DispatchAPZAwareEvent(mozilla::WidgetInputEvent* aEvent) = 0; + + /** + * Dispatches an event that must be transformed by APZ first, but is not + * actually handled by APZ. If invoked in the child process, it is + * forwarded to the parent process synchronously. + */ virtual nsEventStatus DispatchInputEvent(mozilla::WidgetInputEvent* aEvent) = 0; /** diff --git a/widget/uikit/nsWindow.mm b/widget/uikit/nsWindow.mm index 264f95ed3e90..31298cd3d7ff 100644 --- a/widget/uikit/nsWindow.mm +++ b/widget/uikit/nsWindow.mm @@ -185,7 +185,7 @@ private: event.refPoint = loc; event.touches.AppendElement(t); } - aWindow->DispatchInputEvent(&event); + aWindow->DispatchAPZAwareEvent(&event); } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 7ceef113f958..1dd17237cae2 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3928,7 +3928,7 @@ bool nsWindow::DispatchContentCommandEvent(WidgetContentCommandEvent* aEvent) bool nsWindow::DispatchWheelEvent(WidgetWheelEvent* aEvent) { - nsEventStatus status = DispatchInputEvent(aEvent->AsInputEvent()); + nsEventStatus status = DispatchAPZAwareEvent(aEvent->AsInputEvent()); return ConvertStatus(status); } @@ -4266,7 +4266,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam, } } - result = ConvertStatus(DispatchInputEvent(&event)); + result = ConvertStatus(DispatchAPZAwareEvent(&event)); // Release the widget with NS_IF_RELEASE() just in case // the context menu key code in EventListenerManager::HandleEvent() @@ -6487,13 +6487,13 @@ bool nsWindow::OnTouch(WPARAM wParam, LPARAM lParam) if (!touchInput.mTimeStamp.IsNull()) { // Convert MultiTouchInput to WidgetTouchEvent interface. WidgetTouchEvent widgetTouchEvent = touchInput.ToWidgetTouchEvent(this); - DispatchInputEvent(&widgetTouchEvent); + DispatchAPZAwareEvent(&widgetTouchEvent); } // Dispatch touch end event if we have one. if (!touchEndInput.mTimeStamp.IsNull()) { // Convert MultiTouchInput to WidgetTouchEvent interface. WidgetTouchEvent widgetTouchEvent = touchEndInput.ToWidgetTouchEvent(this); - DispatchInputEvent(&widgetTouchEvent); + DispatchAPZAwareEvent(&widgetTouchEvent); } }