From eab8a76b487f276575d095cc8e32cd16733f1268 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Fri, 4 Oct 2013 19:55:23 -0700 Subject: [PATCH 1/9] Bumping gaia.json for 4 gaia-central revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/3d86acf2f2d8 Author: Etienne Segonzac Desc: Merge pull request #12626 from etiennesegonzac/bug-920422-add-call-workflow Bug 920422 - Showing the contacts tab when we place a new call from the call screen. r=rik ======== https://hg.mozilla.org/integration/gaia-central/rev/018e6094ab33 Author: Etienne Segonzac Desc: Bug 920422 - Showing the contacts tab when we place a new call from the call screen. r=rik ======== https://hg.mozilla.org/integration/gaia-central/rev/f424392e7f53 Author: Etienne Segonzac Desc: Merge pull request #12585 from etiennesegonzac/bug-915573-custom-tel-type Bug 915573 - Do not translate custom phone types in the call screen additional infos. r=rik ======== https://hg.mozilla.org/integration/gaia-central/rev/362bf7cae7f3 Author: Etienne Segonzac Desc: Bug 915573 - Do not translate custom phone types in the call screen additional infos. r=rik --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5941520e87c..9346c67bcca 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "51dc7b3879435541f8ee00fa903a6dbc44726da4", + "revision": "3d86acf2f2d88ce58f91ea8a871a6f3c6ae61859", "repo_path": "/integration/gaia-central" } From a2a3c126f75bf49ad3e75e81f8ac3f9e7777cc6b Mon Sep 17 00:00:00 2001 From: Eric Chou Date: Sat, 5 Oct 2013 14:35:00 +0800 Subject: [PATCH 2/9] Bug 923369 - Return true when RawDBusConnection::SendWithError() executed without any error, r=tzimmerman, r=qdot --- ipc/dbus/RawDBusConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/dbus/RawDBusConnection.cpp b/ipc/dbus/RawDBusConnection.cpp index b2b914434d8..12d8b505544 100644 --- a/ipc/dbus/RawDBusConnection.cpp +++ b/ipc/dbus/RawDBusConnection.cpp @@ -441,7 +441,7 @@ bool RawDBusConnection::SendWithError(DBusMessage** aReply, *aReply = t->GetReply(); } - return false; + return true; } bool RawDBusConnection::SendWithError(DBusMessage** aReply, From defb296f9bc6b68c6315458c9c5b30b07b22f459 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Sat, 5 Oct 2013 00:50:23 -0700 Subject: [PATCH 3/9] Bumping gaia.json for 2 gaia-central revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/5d3e5b4601fc Author: Alive.Kuo Desc: Merge pull request #12503 from alivedise/bugzilla/920890_master_v2/getscreenshot-delay Bug 920890 - getScreenshot delays setVisible, r=vivien ======== https://hg.mozilla.org/integration/gaia-central/rev/8b089a8e738a Author: Alive Kuo Desc: Bug 920890 - getScreenshot delays setVisible --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9346c67bcca..c2f52b2f0e4 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "3d86acf2f2d88ce58f91ea8a871a6f3c6ae61859", + "revision": "5d3e5b4601fc693f1b9c3f5a8e7381394535888b", "repo_path": "/integration/gaia-central" } From 7091e3533c14ff50c7b7ddf5b1f21a853bf78235 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Sat, 5 Oct 2013 04:20:29 -0700 Subject: [PATCH 4/9] Bumping gaia.json for 2 gaia-central revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/cf3456748755 Author: Timothy Guan-tin Chien Desc: Merge pull request #12677 from timdream/hidpi-wrapper Bug 923773 - Wrapper open.png need background-size, r=alive, a=me ======== https://hg.mozilla.org/integration/gaia-central/rev/06bc127b0383 Author: Timothy Guan-tin Chien Desc: Bug 923773 - Wrapper open.png need background-size --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c2f52b2f0e4..87ab6cbc2e6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "5d3e5b4601fc693f1b9c3f5a8e7381394535888b", + "revision": "cf34567487555df98987144f9acda7eb58f51c4b", "repo_path": "/integration/gaia-central" } From dd40fe57b6c61f64a36a002fa322b6504480d8b0 Mon Sep 17 00:00:00 2001 From: Sushil Chauhan Date: Fri, 4 Oct 2013 11:01:22 -0700 Subject: [PATCH 5/9] Bug 919676 - Fix multiple hwc prepare calls with different layer lists. r=mwu, r=dwilson --- gfx/gl/GLContextProviderEGL.cpp | 10 +- widget/gonk/HwcComposer2D.cpp | 114 ++++++++++++++++++---- widget/gonk/HwcComposer2D.h | 4 + widget/gonk/libdisplay/GonkDisplay.h | 4 + widget/gonk/libdisplay/GonkDisplayICS.cpp | 11 +++ widget/gonk/libdisplay/GonkDisplayICS.h | 4 + widget/gonk/libdisplay/GonkDisplayJB.cpp | 14 +++ widget/gonk/libdisplay/GonkDisplayJB.h | 4 + 8 files changed, 141 insertions(+), 24 deletions(-) diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index 47103e5483c..c8c4ecfb6ef 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -596,9 +596,13 @@ public: { if (mSurface && !mPlatformContext) { #ifdef MOZ_WIDGET_GONK - if (!mIsOffscreen) - return GetGonkDisplay()->SwapBuffers(EGL_DISPLAY(), mSurface); - else + if (!mIsOffscreen) { + if (mHwc) { + return mHwc->Render(EGL_DISPLAY(), mSurface); + } else { + return GetGonkDisplay()->SwapBuffers(EGL_DISPLAY(), mSurface); + } + } else #endif return sEGLLibrary.fSwapBuffers(EGL_DISPLAY(), mSurface); } else { diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index 15aab226f08..eacb3f04edd 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -445,45 +445,114 @@ HwcComposer2D::TryHwComposition() { FramebufferSurface* fbsurface = (FramebufferSurface*)(GetGonkDisplay()->GetFBSurface()); + if (!(fbsurface && fbsurface->lastHandle)) { + LOGD("H/W Composition failed. FBSurface not initialized."); + return false; + } + + // Add FB layer + int idx = mList->numHwLayers++; + if (idx >= mMaxLayerCount) { + if (!ReallocLayerList() || idx >= mMaxLayerCount) { + LOGE("TryHwComposition failed! Could not add FB layer"); + return false; + } + } + + Prepare(fbsurface->lastHandle, -1); + + for (int j = 0; j < idx; j++) { + if (mList->hwLayers[j].compositionType == HWC_FRAMEBUFFER) { + LOGD("GPU or Partial HWC Composition"); + return false; + } + } + + // Full HWC Composition + Commit(); + + // No composition on FB layer, so closing releaseFenceFd + close(mList->hwLayers[idx].releaseFenceFd); + mList->hwLayers[idx].releaseFenceFd = -1; + mList->numHwLayers = 0; + return true; +} + +bool +HwcComposer2D::Render(EGLDisplay dpy, EGLSurface sur) +{ + if (!mList) { + // After boot, HWC list hasn't been created yet + return GetGonkDisplay()->SwapBuffers(dpy, sur); + } + + GetGonkDisplay()->UpdateFBSurface(dpy, sur); + + FramebufferSurface* fbsurface = (FramebufferSurface*)(GetGonkDisplay()->GetFBSurface()); if (!fbsurface) { LOGE("H/W Composition failed. FBSurface not initialized."); return false; } - hwc_display_contents_1_t *displays[HWC_NUM_DISPLAY_TYPES] = {NULL}; + if (mList->numHwLayers != 0) { + // No mHwc prepare, if already prepared in current draw cycle + mList->hwLayers[mList->numHwLayers - 1].handle = fbsurface->lastHandle; + mList->hwLayers[mList->numHwLayers - 1].acquireFenceFd = fbsurface->lastFenceFD; + } else { + mList->numHwLayers = 2; + mList->hwLayers[0].hints = 0; + mList->hwLayers[0].compositionType = HWC_BACKGROUND; + mList->hwLayers[0].flags = HWC_SKIP_LAYER; + mList->hwLayers[0].backgroundColor = {0}; + mList->hwLayers[0].displayFrame = {0, 0, mScreenRect.width, mScreenRect.height}; + Prepare(fbsurface->lastHandle, fbsurface->lastFenceFD); + } + + // GPU or partial HWC Composition + Commit(); + + GetGonkDisplay()->SetFBReleaseFd(mList->hwLayers[mList->numHwLayers - 1].releaseFenceFd); + mList->numHwLayers = 0; + return true; +} + +void +HwcComposer2D::Prepare(buffer_handle_t fbHandle, int fence) +{ + int idx = mList->numHwLayers - 1; const hwc_rect_t r = {0, 0, mScreenRect.width, mScreenRect.height}; - int idx = mList->numHwLayers; + hwc_display_contents_1_t *displays[HWC_NUM_DISPLAY_TYPES] = { nullptr }; displays[HWC_DISPLAY_PRIMARY] = mList; mList->flags = HWC_GEOMETRY_CHANGED; + mList->outbufAcquireFenceFd = -1; + mList->outbuf = nullptr; mList->retireFenceFd = -1; mList->hwLayers[idx].hints = 0; mList->hwLayers[idx].flags = 0; mList->hwLayers[idx].transform = 0; - mList->hwLayers[idx].handle = fbsurface->lastHandle; + mList->hwLayers[idx].handle = fbHandle; mList->hwLayers[idx].blending = HWC_BLENDING_PREMULT; mList->hwLayers[idx].compositionType = HWC_FRAMEBUFFER_TARGET; mList->hwLayers[idx].sourceCrop = r; mList->hwLayers[idx].displayFrame = r; mList->hwLayers[idx].visibleRegionScreen.numRects = 1; mList->hwLayers[idx].visibleRegionScreen.rects = &mList->hwLayers[idx].sourceCrop; - mList->hwLayers[idx].acquireFenceFd = -1; + mList->hwLayers[idx].acquireFenceFd = fence; mList->hwLayers[idx].releaseFenceFd = -1; mList->hwLayers[idx].planeAlpha = 0xFF; - mList->numHwLayers++; mHwc->prepare(mHwc, HWC_NUM_DISPLAY_TYPES, displays); +} - for (int j = 0; j < idx; j++) { - if (mList->hwLayers[j].compositionType == HWC_FRAMEBUFFER) { - LOGD("GPU or Partial MDP Composition"); - return false; - } - } +bool +HwcComposer2D::Commit() +{ + hwc_display_contents_1_t *displays[HWC_NUM_DISPLAY_TYPES] = { nullptr }; + displays[HWC_DISPLAY_PRIMARY] = mList; - // Full MDP Composition - mHwc->set(mHwc, HWC_NUM_DISPLAY_TYPES, displays); + int err = mHwc->set(mHwc, HWC_NUM_DISPLAY_TYPES, displays); for (int i = 0; i <= MAX_HWC_LAYERS; i++) { if (mPrevRelFd[i] <= 0) { @@ -504,18 +573,15 @@ HwcComposer2D::TryHwComposition() } mPrevRelFd[0] = mList->retireFenceFd; - for (uint32_t j = 0; j < idx; j++) { + for (uint32_t j = 0; j < (mList->numHwLayers - 1); j++) { if (mList->hwLayers[j].compositionType == HWC_OVERLAY) { mPrevRelFd[j + 1] = mList->hwLayers[j].releaseFenceFd; mList->hwLayers[j].releaseFenceFd = -1; } } - close(mList->hwLayers[idx].releaseFenceFd); - mList->hwLayers[idx].releaseFenceFd = -1; mList->retireFenceFd = -1; - mList->numHwLayers = 0; - return true; + return !err; } #else bool @@ -523,6 +589,12 @@ HwcComposer2D::TryHwComposition() { return !mHwc->set(mHwc, mDpy, mSur, mList); } + +bool +HwcComposer2D::Render(EGLDisplay dpy, EGLSurface sur) +{ + return GetGonkDisplay()->SwapBuffers(dpy, sur); +} #endif bool @@ -549,13 +621,13 @@ HwcComposer2D::TryRender(Layer* aRoot, aGLWorldTransform)) { LOGD("Render aborted. Nothing was drawn to the screen"); + mList->numHwLayers = 0; return false; } if (!TryHwComposition()) { - // Full MDP Composition - LOGE("H/W Composition failed"); - return false; + LOGD("H/W Composition failed"); + return false; } LOGD("Frame rendered"); diff --git a/widget/gonk/HwcComposer2D.h b/widget/gonk/HwcComposer2D.h index cfab6929a2a..625024e53fa 100644 --- a/widget/gonk/HwcComposer2D.h +++ b/widget/gonk/HwcComposer2D.h @@ -62,7 +62,11 @@ public: // by this composer so nothing was rendered at all bool TryRender(layers::Layer* aRoot, const gfxMatrix& aGLWorldTransform) MOZ_OVERRIDE; + bool Render(EGLDisplay dpy, EGLSurface sur); + private: + void Prepare(buffer_handle_t fbHandle, int fence); + bool Commit(); bool TryHwComposition(); bool ReallocLayerList(); bool PrepareLayerList(layers::Layer* aContainer, const nsIntRect& aClip, diff --git a/widget/gonk/libdisplay/GonkDisplay.h b/widget/gonk/libdisplay/GonkDisplay.h index 6d959516d81..63645ba56a7 100644 --- a/widget/gonk/libdisplay/GonkDisplay.h +++ b/widget/gonk/libdisplay/GonkDisplay.h @@ -43,6 +43,10 @@ public: virtual bool QueueBuffer(ANativeWindowBuffer* buf) = 0; + virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur) = 0; + + virtual void SetFBReleaseFd(int fd) = 0; + float xdpi; uint32_t surfaceformat; }; diff --git a/widget/gonk/libdisplay/GonkDisplayICS.cpp b/widget/gonk/libdisplay/GonkDisplayICS.cpp index 196337df7ac..2baae9fb5cb 100644 --- a/widget/gonk/libdisplay/GonkDisplayICS.cpp +++ b/widget/gonk/libdisplay/GonkDisplayICS.cpp @@ -196,6 +196,17 @@ GonkDisplayICS::QueueBuffer(ANativeWindowBuffer *buf) return !window->queueBuffer(window, buf); } +void +GonkDisplayICS::UpdateFBSurface(EGLDisplay dpy, EGLSurface sur) +{ + eglSwapBuffers(dpy, sur); +} + +void +GonkDisplayICS::SetFBReleaseFd(int fd) +{ +} + __attribute__ ((visibility ("default"))) GonkDisplay* GetGonkDisplay() diff --git a/widget/gonk/libdisplay/GonkDisplayICS.h b/widget/gonk/libdisplay/GonkDisplayICS.h index 3c90c3ae40e..fab3ca05c91 100644 --- a/widget/gonk/libdisplay/GonkDisplayICS.h +++ b/widget/gonk/libdisplay/GonkDisplayICS.h @@ -46,6 +46,10 @@ public: virtual bool QueueBuffer(ANativeWindowBuffer* handle); + virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur); + + virtual void SetFBReleaseFd(int fd); + private: hw_module_t const* mModule; hwc_composer_device_t* mHwc; diff --git a/widget/gonk/libdisplay/GonkDisplayJB.cpp b/widget/gonk/libdisplay/GonkDisplayJB.cpp index c51bb14563e..97612ae44a5 100644 --- a/widget/gonk/libdisplay/GonkDisplayJB.cpp +++ b/widget/gonk/libdisplay/GonkDisplayJB.cpp @@ -272,6 +272,20 @@ GonkDisplayJB::QueueBuffer(ANativeWindowBuffer* buf) return success; } +void +GonkDisplayJB::UpdateFBSurface(EGLDisplay dpy, EGLSurface sur) +{ + StopBootAnimation(); + mBootAnimBuffer = nullptr; + eglSwapBuffers(dpy, sur); +} + +void +GonkDisplayJB::SetFBReleaseFd(int fd) +{ + mFBSurface->setReleaseFenceFd(fd); +} + __attribute__ ((visibility ("default"))) GonkDisplay* GetGonkDisplay() diff --git a/widget/gonk/libdisplay/GonkDisplayJB.h b/widget/gonk/libdisplay/GonkDisplayJB.h index 8d3c9266958..6b02488932d 100644 --- a/widget/gonk/libdisplay/GonkDisplayJB.h +++ b/widget/gonk/libdisplay/GonkDisplayJB.h @@ -45,6 +45,10 @@ public: virtual bool QueueBuffer(ANativeWindowBuffer* buf); + virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur); + + virtual void SetFBReleaseFd(int fd); + bool Post(buffer_handle_t buf, int fence); private: From c1a8bb31b74960f1dce342082c8216243942465e Mon Sep 17 00:00:00 2001 From: ffxbld Date: Sat, 5 Oct 2013 03:20:47 -0700 Subject: [PATCH 6/9] No bug, Automated blocklist update from host bld-linux64-ec2-143 - a=blocklist-update --- browser/app/blocklist.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/app/blocklist.xml b/browser/app/blocklist.xml index f2a0a3e9bec..ccb865d6e68 100644 --- a/browser/app/blocklist.xml +++ b/browser/app/blocklist.xml @@ -1,5 +1,5 @@ - + @@ -1159,6 +1159,9 @@ + + + From 38af00b646e376a7511b8b57b262d8db4da82bfe Mon Sep 17 00:00:00 2001 From: ffxbld Date: Sat, 5 Oct 2013 03:24:02 -0700 Subject: [PATCH 7/9] No bug, Automated HSTS preload list update from host bld-linux64-ec2-165 - a=hsts-update --- security/manager/boot/src/nsSTSPreloadList.errors | 13 +++++++++++-- security/manager/boot/src/nsSTSPreloadList.inc | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/security/manager/boot/src/nsSTSPreloadList.errors b/security/manager/boot/src/nsSTSPreloadList.errors index 2f94f2cf0fc..ded80fbbc49 100644 --- a/security/manager/boot/src/nsSTSPreloadList.errors +++ b/security/manager/boot/src/nsSTSPreloadList.errors @@ -8,6 +8,7 @@ appengine.google.com: did not receive HSTS header bcrook.com: max-age too low: 86400 betnet.fr: could not connect to host bigshinylock.minazo.net: could not connect to host +bitbucket.org: max-age too low: 2592000 blueseed.co: did not receive HSTS header braintreegateway.com: did not receive HSTS header braintreepayments.com: did not receive HSTS header @@ -22,6 +23,9 @@ codereview.chromium.org: did not receive HSTS header crowdcurity.com: did not receive HSTS header crypto.is: did not receive HSTS header csawctf.poly.edu: did not receive HSTS header +cupcake.io: max-age too low: 3153600 +cupcake.is: max-age too low: 3153600 +cybozu.com: did not receive HSTS header dl.google.com: did not receive HSTS header docs.google.com: did not receive HSTS header drive.google.com: did not receive HSTS header @@ -41,6 +45,7 @@ grepular.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERR groups.google.com: did not receive HSTS header history.google.com: did not receive HSTS header hostedtalkgadget.google.com: did not receive HSTS header +id.atlassian.com: did not receive HSTS header iop.intuit.com: max-age too low: 86400 irccloud.com: did not receive HSTS header jitsi.org: did not receive HSTS header @@ -49,6 +54,7 @@ kiwiirc.com: max-age too low: 5256000 ledgerscope.net: max-age too low: 86400 lists.mayfirst.org: did not receive HSTS header logentries.com: did not receive HSTS header +lumi.do: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no] mail.google.com: did not receive HSTS header market.android.com: did not receive HSTS header my.alfresco.com: did not receive HSTS header @@ -82,18 +88,21 @@ sunshinepress.org: could not connect to host surfeasy.com: did not receive HSTS header talk.google.com: did not receive HSTS header talkgadget.google.com: did not receive HSTS header +tent.io: max-age too low: 3153600 torproject.org: did not receive HSTS header translate.google.com: did not receive HSTS header translate.googleapis.com: did not receive HSTS header uprotect.it: could not connect to host wallet.google.com: did not receive HSTS header whonix.org: did not receive HSTS header +www.cueup.com: did not receive HSTS header www.developer.mydigipass.com: could not connect to host www.dropcam.com: max-age too low: 2592000 www.elanex.biz: did not receive HSTS header www.gmail.com: did not receive HSTS header www.googlemail.com: did not receive HSTS header -www.greplin.com: did not receive HSTS header +www.gov.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no] +www.greplin.com: could not connect to host www.jitsi.org: did not receive HSTS header www.lastpass.com: did not receive HSTS header www.ledgerscope.net: max-age too low: 86400 @@ -104,4 +113,4 @@ www.paycheckrecords.com: max-age too low: 86400 www.paypal.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no] www.sandbox.mydigipass.com: could not connect to host www.surfeasy.com: did not receive HSTS header -zoo24.de: did not receive HSTS header +zoo24.de: max-age too low: 2592000 diff --git a/security/manager/boot/src/nsSTSPreloadList.inc b/security/manager/boot/src/nsSTSPreloadList.inc index 8f5a0b42f05..c421d67629e 100644 --- a/security/manager/boot/src/nsSTSPreloadList.inc +++ b/security/manager/boot/src/nsSTSPreloadList.inc @@ -8,7 +8,7 @@ /*****************************************************************************/ #include -const PRTime gPreloadListExpirationTime = INT64_C(1391250031831000); +const PRTime gPreloadListExpirationTime = INT64_C(1391854333088000); class nsSTSPreload { @@ -44,12 +44,14 @@ static const nsSTSPreload kSTSPreloadList[] = { { "crm.onlime.ch", false }, { "crypto.cat", false }, { "cyphertite.com", true }, + { "davidlyness.com", true }, { "developer.mydigipass.com", false }, { "dist.torproject.org", false }, { "dm.lookout.com", false }, { "dm.mylookout.com", false }, { "download.jitsi.org", false }, { "ebanking.indovinabank.com.vn", false }, + { "ecosystem.atlassian.net", true }, { "entropia.de", false }, { "espra.com", true }, { "factor.cc", false }, @@ -122,7 +124,6 @@ static const nsSTSPreload kSTSPreloadList[] = { { "writeapp.me", false }, { "www.apollo-auto.com", true }, { "www.braintreepayments.com", false }, - { "www.cueup.com", false }, { "www.cyveillance.com", true }, { "www.entropia.de", false }, { "www.gov.uk", false }, From 4dcdf6cb43a6095c29eb3f728f163d84bed72ea3 Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Sat, 5 Oct 2013 16:26:08 +0300 Subject: [PATCH 8/9] Bug 923779 - Native code event listeners can get listed multiple times in the events pane, r=past --- browser/devtools/debugger/debugger-panes.js | 13 ++- browser/devtools/debugger/test/browser.ini | 1 + .../test/browser_dbg_break-on-dom-07.js | 104 ++++++++++++++++++ 3 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 browser/devtools/debugger/test/browser_dbg_break-on-dom-07.js diff --git a/browser/devtools/debugger/debugger-panes.js b/browser/devtools/debugger/debugger-panes.js index 00633ca943b..6733549fb75 100644 --- a/browser/devtools/debugger/debugger-panes.js +++ b/browser/devtools/debugger/debugger-panes.js @@ -1552,6 +1552,13 @@ EventListenersView.prototype = Heritage.extend(WidgetMethods, { */ addListener: function(aListener, aOptions = {}) { let { node: { selector }, function: { url }, type } = aListener; + if (!type) return; + + // Some listener objects may be added from plugins, thus getting + // translated to native code. + if (!url) { + url = this._inNativeCodeString; + } // If an event item for this listener's url and type was already added, // avoid polluting the view and simply increase the "targets" count. @@ -1627,12 +1634,6 @@ EventListenersView.prototype = Heritage.extend(WidgetMethods, { group = L10N.getStr("otherEvents"); } - // Some listener objects may be added from plugins, thus getting - // translated to native code. - if (!url) { - url = this._inNativeCodeString; - } - // Create the element node for the event listener item. let itemView = this._createItemView(type, selector, url); diff --git a/browser/devtools/debugger/test/browser.ini b/browser/devtools/debugger/test/browser.ini index 2043b66647e..581cdc3d662 100644 --- a/browser/devtools/debugger/test/browser.ini +++ b/browser/devtools/debugger/test/browser.ini @@ -74,6 +74,7 @@ support-files = [browser_dbg_break-on-dom-04.js] [browser_dbg_break-on-dom-05.js] [browser_dbg_break-on-dom-06.js] +[browser_dbg_break-on-dom-07.js] [browser_dbg_breakpoints-actual-location.js] [browser_dbg_breakpoints-contextmenu.js] [browser_dbg_breakpoints-disabled-reload.js] diff --git a/browser/devtools/debugger/test/browser_dbg_break-on-dom-07.js b/browser/devtools/debugger/test/browser_dbg_break-on-dom-07.js new file mode 100644 index 00000000000..93778506691 --- /dev/null +++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-07.js @@ -0,0 +1,104 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests that system event listeners don't get duplicated in the view. + */ + +function test() { + initDebugger("about:blank").then(([aTab, aDebuggee, aPanel]) => { + let gDebugger = aPanel.panelWin; + let gView = gDebugger.DebuggerView; + let gEvents = gView.EventListeners; + let gL10N = gDebugger.L10N; + + is(gEvents.itemCount, 0, + "There are no events displayed in the corresponding pane yet."); + + gEvents.addListener({ + type: "foo", + node: { selector: "#first" }, + function: { url: null } + }); + + is(gEvents.itemCount, 1, + "There was a system event listener added in the view."); + is(gEvents.attachments[0].url, gL10N.getStr("eventNative"), + "The correct string is used as the event's url."); + is(gEvents.attachments[0].type, "foo", + "The correct string is used as the event's type."); + is(gEvents.attachments[0].selectors.toString(), "#first", + "The correct array of selectors is used as the event's target."); + + gEvents.addListener({ + type: "bar", + node: { selector: "#second" }, + function: { url: null } + }); + + is(gEvents.itemCount, 2, + "There was another system event listener added in the view."); + is(gEvents.attachments[1].url, gL10N.getStr("eventNative"), + "The correct string is used as the event's url."); + is(gEvents.attachments[1].type, "bar", + "The correct string is used as the event's type."); + is(gEvents.attachments[1].selectors.toString(), "#second", + "The correct array of selectors is used as the event's target."); + + gEvents.addListener({ + type: "foo", + node: { selector: "#first" }, + function: { url: null } + }); + + is(gEvents.itemCount, 2, + "There wasn't another system event listener added in the view."); + is(gEvents.attachments[0].url, gL10N.getStr("eventNative"), + "The correct string is used as the event's url."); + is(gEvents.attachments[0].type, "foo", + "The correct string is used as the event's type."); + is(gEvents.attachments[0].selectors.toString(), "#first", + "The correct array of selectors is used as the event's target."); + + gEvents.addListener({ + type: "foo", + node: { selector: "#second" }, + function: { url: null } + }); + + is(gEvents.itemCount, 2, + "There still wasn't another system event listener added in the view."); + is(gEvents.attachments[0].url, gL10N.getStr("eventNative"), + "The correct string is used as the event's url."); + is(gEvents.attachments[0].type, "foo", + "The correct string is used as the event's type."); + is(gEvents.attachments[0].selectors.toString(), "#first,#second", + "The correct array of selectors is used as the event's target."); + + + gEvents.addListener({ + type: null, + node: { selector: "#bogus" }, + function: { url: null } + }); + + is(gEvents.itemCount, 2, + "No bogus system event listener was added in the view."); + + is(gEvents.attachments[0].url, gL10N.getStr("eventNative"), + "The correct string is used as the first event's url."); + is(gEvents.attachments[0].type, "foo", + "The correct string is used as the first event's type."); + is(gEvents.attachments[0].selectors.toString(), "#first,#second", + "The correct array of selectors is used as the first event's target."); + + is(gEvents.attachments[1].url, gL10N.getStr("eventNative"), + "The correct string is used as the second event's url."); + is(gEvents.attachments[1].type, "bar", + "The correct string is used as the second event's type."); + is(gEvents.attachments[1].selectors.toString(), "#second", + "The correct array of selectors is used as the second event's target."); + + closeDebuggerAndFinish(aPanel); + }); +} From 35667137e04ad1f176ebd54f5d9fcfbed7ac0e7f Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Sat, 5 Oct 2013 10:43:06 -0400 Subject: [PATCH 9/9] Bug 919496 - [app manager] Once an app has been installed, it doesn't show up in the 'installed app' tab. r=ochameau --- browser/devtools/app-manager/webapps-store.js | 68 ++++++++++++++++++- toolkit/devtools/apps/tests/unit/head_apps.js | 2 - .../apps/tests/unit/test_webappsActor.js | 17 +++++ toolkit/devtools/server/actors/webapps.js | 27 ++++++++ 4 files changed, 109 insertions(+), 5 deletions(-) diff --git a/browser/devtools/app-manager/webapps-store.js b/browser/devtools/app-manager/webapps-store.js index ded3fac6c7a..34d35ec738b 100644 --- a/browser/devtools/app-manager/webapps-store.js +++ b/browser/devtools/app-manager/webapps-store.js @@ -8,9 +8,6 @@ const {Connection} = require("devtools/client/connection-manager"); const {Cu} = require("chrome"); const dbgClient = Cu.import("resource://gre/modules/devtools/dbg-client.jsm"); -dbgClient.UnsolicitedNotifications.appOpen = "appOpen"; -dbgClient.UnsolicitedNotifications.appClose = "appClose" - const _knownWebappsStores = new WeakMap(); let WebappsStore; @@ -103,6 +100,14 @@ WebappsStore.prototype = { this._onAppClose(manifestURL); }); + client.addListener("appInstall", (type, { manifestURL }) => { + this._onAppInstall(manifestURL); + }); + + client.addListener("appUninstall", (type, { manifestURL }) => { + this._onAppUninstall(manifestURL); + }); + return deferred.resolve(); }) return deferred.promise; @@ -177,6 +182,10 @@ WebappsStore.prototype = { let a = allApps[idx++]; request.manifestURL = a.manifestURL; return client.request(request, (res) => { + if (res.error) { + Cu.reportError(res.message || res.error); + } + if (res.url) { a.iconURL = res.url; } @@ -204,4 +213,57 @@ WebappsStore.prototype = { return m != manifest; }); }, + + _onAppInstall: function(manifest) { + let client = this._connection.client; + let request = { + to: this._webAppsActor, + type: "getApp", + manifestURL: manifest + }; + + client.request(request, (res) => { + if (res.error) { + if (res.error == "forbidden") { + // We got a notification for an app we don't have access to. + // Ignore. + return; + } + Cu.reportError(res.message || res.error); + return; + } + + let app = res.app; + app.running = false; + + let notFound = true; + let proxifiedApp; + for (let i = 0; i < this.object.all.length; i++) { + let storedApp = this.object.all[i]; + if (storedApp.manifestURL == app.manifestURL) { + this.object.all[i] = app; + proxifiedApp = this.object.all[i]; + notFound = false; + break; + } + } + if (notFound) { + this.object.all.push(app); + proxifiedApp = this.object.all[this.object.all.length - 1]; + } + + request.type = "getIconAsDataURL"; + client.request(request, (res) => { + if (res.url) { + proxifiedApp.iconURL = res.url; + } + }); + }); + }, + + _onAppUninstall: function(manifest) { + this.object.all = this.object.all.filter((app) => { + return (app.manifestURL != manifest); + }); + }, } diff --git a/toolkit/devtools/apps/tests/unit/head_apps.js b/toolkit/devtools/apps/tests/unit/head_apps.js index da41470ffc5..73e60f8835c 100644 --- a/toolkit/devtools/apps/tests/unit/head_apps.js +++ b/toolkit/devtools/apps/tests/unit/head_apps.js @@ -98,7 +98,6 @@ function do_get_webappsdir() { coreAppsDir.append("test_coreapps"); if (!coreAppsDir.exists()) coreAppsDir.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt("755", 8)); - var tmpDir = Services.dirsvc.get("TmpD", Ci.nsILocalFile); // Register our own provider for the profile directory. // It will return our special docshell profile directory. @@ -111,7 +110,6 @@ function do_get_webappsdir() { else if (prop == "coreAppsDir") { return coreAppsDir.clone(); } - return tmpDir.clone(); throw Cr.NS_ERROR_FAILURE; }, QueryInterface: function(iid) { diff --git a/toolkit/devtools/apps/tests/unit/test_webappsActor.js b/toolkit/devtools/apps/tests/unit/test_webappsActor.js index 09699f6ceb1..d91955c7bfa 100644 --- a/toolkit/devtools/apps/tests/unit/test_webappsActor.js +++ b/toolkit/devtools/apps/tests/unit/test_webappsActor.js @@ -57,6 +57,23 @@ add_test(function testGetAll() { }); }); +add_test(function testGetApp() { + let manifestURL = APP_ORIGIN + "/manifest.webapp"; + let request = {type: "getApp", manifestURL: manifestURL}; + webappActorRequest(request, function (aResponse) { + do_check_true("app" in aResponse); + let app = aResponse.app; + do_check_eq(app.id, gAppId); + do_check_eq(app.name, "Test app"); + do_check_eq(app.manifest.description, "Testing webapps actor"); + do_check_eq(app.manifest.launch_path, "/index.html"); + do_check_eq(app.origin, APP_ORIGIN); + do_check_eq(app.installOrigin, app.origin); + do_check_eq(app.manifestURL, app.origin + "/manifest.webapp"); + run_next_test(); + }); +}); + add_test(function testLaunchApp() { let manifestURL = APP_ORIGIN + "/manifest.webapp"; let startPoint = "/index.html"; diff --git a/toolkit/devtools/server/actors/webapps.js b/toolkit/devtools/server/actors/webapps.js index a264c069e31..fadac2d268e 100644 --- a/toolkit/devtools/server/actors/webapps.js +++ b/toolkit/devtools/server/actors/webapps.js @@ -544,6 +544,32 @@ WebappsActor.prototype = { return deferred.promise; }, + getApp: function wa_actorGetApp(aRequest) { + debug("getApp"); + + let manifestURL = aRequest.manifestURL; + if (!manifestURL) { + return { error: "missingParameter", + message: "missing parameter manifestURL" }; + } + + let reg = DOMApplicationRegistry; + let app = reg.getAppByManifestURL(manifestURL); + if (!app) { + return { error: "appNotFound" }; + } + + if (this._isAppAllowedForManifest(app.manifestURL)) { + let deferred = promise.defer(); + reg.getManifestFor(manifestURL, function (manifest) { + app.manifest = manifest; + deferred.resolve({app: app}); + }); + return deferred.promise; + } + return { error: "forbidden" }; + }, + _areCertifiedAppsAllowed: function wa__areCertifiedAppsAllowed() { let pref = "devtools.debugger.forbid-certified-apps"; return !Services.prefs.getBoolPref(pref); @@ -955,6 +981,7 @@ if (Services.prefs.getBoolPref("devtools.debugger.enable-content-actors")) { let requestTypes = WebappsActor.prototype.requestTypes; requestTypes.uploadPackage = WebappsActor.prototype.uploadPackage; requestTypes.getAll = WebappsActor.prototype.getAll; + requestTypes.getApp = WebappsActor.prototype.getApp; requestTypes.launch = WebappsActor.prototype.launch; requestTypes.close = WebappsActor.prototype.close; requestTypes.uninstall = WebappsActor.prototype.uninstall;