lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

May 2017

  • 2 participants
  • 101 discussions
[tor-browser/tor-browser-52.1.1esr-7.0-1] Bug 22452: Isolate tab list menuitem favicons to content first party
by gk@torproject.org 31 May '17

31 May '17
commit 93469df805f4001dc837299bc3076855d7bff6ae Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Tue May 30 00:43:48 2017 -0700 Bug 22452: Isolate tab list menuitem favicons to content first party --- browser/base/content/tabbrowser.xml | 1 + toolkit/content/widgets/menu.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 2b3ac67..f82dd5a 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -7068,6 +7068,7 @@ aMenuitem.setAttribute("busy", aTab.getAttribute("busy")); aMenuitem.removeAttribute("image"); } else { + aMenuitem.setAttribute("iconLoadingPrincipal", aTab.getAttribute("iconLoadingPrincipal")); aMenuitem.setAttribute("image", aTab.getAttribute("image")); aMenuitem.removeAttribute("busy"); } diff --git a/toolkit/content/widgets/menu.xml b/toolkit/content/widgets/menu.xml index 26dcad4..6b0886c 100644 --- a/toolkit/content/widgets/menu.xml +++ b/toolkit/content/widgets/menu.xml @@ -214,7 +214,7 @@ <content> <xul:hbox class="menu-iconic-left" align="center" pack="center" xbl:inherits="selected,_moz-menuactive,disabled,checked"> - <xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/> + <xul:image class="menu-iconic-icon" xbl:inherits="src=image,loadingprincipal=iconLoadingPrincipal,validate,src"/> </xul:hbox> <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/> <children/>
1 0
0 0
[tor-browser/tor-browser-52.1.0esr-7.0-2] Bug 22452: Isolate tab list menuitem favicons to content first party
by gk@torproject.org 31 May '17

31 May '17
commit 1cb4d06b54d26e35c78b398abdd456444b26acd7 Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Tue May 30 00:43:48 2017 -0700 Bug 22452: Isolate tab list menuitem favicons to content first party --- browser/base/content/tabbrowser.xml | 1 + toolkit/content/widgets/menu.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 2b3ac67..f82dd5a 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -7068,6 +7068,7 @@ aMenuitem.setAttribute("busy", aTab.getAttribute("busy")); aMenuitem.removeAttribute("image"); } else { + aMenuitem.setAttribute("iconLoadingPrincipal", aTab.getAttribute("iconLoadingPrincipal")); aMenuitem.setAttribute("image", aTab.getAttribute("image")); aMenuitem.removeAttribute("busy"); } diff --git a/toolkit/content/widgets/menu.xml b/toolkit/content/widgets/menu.xml index 26dcad4..6b0886c 100644 --- a/toolkit/content/widgets/menu.xml +++ b/toolkit/content/widgets/menu.xml @@ -214,7 +214,7 @@ <content> <xul:hbox class="menu-iconic-left" align="center" pack="center" xbl:inherits="selected,_moz-menuactive,disabled,checked"> - <xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/> + <xul:image class="menu-iconic-icon" xbl:inherits="src=image,loadingprincipal=iconLoadingPrincipal,validate,src"/> </xul:hbox> <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/> <children/>
1 0
0 0
[tor-browser/tor-browser-52.1.0esr-7.0-2] Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku
by gk@torproject.org 31 May '17

31 May '17
commit ef0f9d150d4210bed5b517763cf8872e7f729649 Author: Ehsan Akhgari <ehsan(a)mozilla.com> Date: Wed Dec 14 15:52:57 2016 -0500 Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku This patch makes nsMenuItemIconX also participate in the setup introduced in bug 1277803. --- browser/base/content/browser-places.js | 5 +++++ dom/base/nsContentUtils.cpp | 31 +++++++++++++++++++++++++++++++ dom/base/nsContentUtils.h | 10 ++++++++++ layout/xul/nsImageBoxFrame.cpp | 28 +++++----------------------- widget/cocoa/nsMenuItemIconX.h | 3 +++ widget/cocoa/nsMenuItemIconX.mm | 14 ++++++++++---- 6 files changed, 64 insertions(+), 27 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 14e90cd..3998b5b 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1509,6 +1509,10 @@ var BookmarkingUI = { options.maxResults = kMaxResults; let query = PlacesUtils.history.getNewQuery(); + let sh = Cc["@mozilla.org/network/serialization-helper;1"] + .getService(Ci.nsISerializationHelper); + let loadingPrincipal = sh.serializeToString(document.nodePrincipal); + let fragment = document.createDocumentFragment(); let root = PlacesUtils.history.executeQuery(query, options).root; root.containerOpen = true; @@ -1528,6 +1532,7 @@ var BookmarkingUI = { aExtraCSSClass); if (icon) { item.setAttribute("image", icon); + item.setAttribute("loadingprincipal", loadingPrincipal); } item._placesNode = node; fragment.appendChild(item); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 539d189..48f7991 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -189,6 +189,7 @@ #include "nsReferencedElement.h" #include "nsSandboxFlags.h" #include "nsScriptSecurityManager.h" +#include "nsSerializationHelper.h" #include "nsStreamUtils.h" #include "nsTextEditorState.h" #include "nsTextFragment.h" @@ -9870,3 +9871,33 @@ nsContentUtils::AttemptLargeAllocationLoad(nsIHttpChannel* aChannel) return reloadSucceeded; } + +/* static */ void +nsContentUtils::GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, + nsIPrincipal** aLoadingPrincipal, + nsContentPolicyType& aContentPolicyType) +{ + // Use the serialized loadingPrincipal from the image element. Fall back + // to mContent's principal (SystemPrincipal) if not available. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; + nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadingNode->NodePrincipal(); + nsAutoString imageLoadingPrincipal; + aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, + imageLoadingPrincipal); + if (!imageLoadingPrincipal.IsEmpty()) { + nsCOMPtr<nsISupports> serializedPrincipal; + NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), + getter_AddRefs(serializedPrincipal)); + loadingPrincipal = do_QueryInterface(serializedPrincipal); + + if (loadingPrincipal) { + // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for + // indicating it's a favicon loading. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; + } else { + // Fallback if the deserialization is failed. + loadingPrincipal = aLoadingNode->NodePrincipal(); + } + } + loadingPrincipal.forget(aLoadingPrincipal); +} diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index e991fb7..3c7d9eb 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2736,6 +2736,16 @@ public: static bool AttemptLargeAllocationLoad(nsIHttpChannel* aChannel); + /** + * Returns the content policy type that should be used for loading images + * for displaying in the UI. The sources of such images can be <xul:image>, + * <xul:menuitem> on OSX where we load the image through nsMenuItemIconX, etc. + */ + static void + GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, + nsIPrincipal** aLoadingPrincipal, + nsContentPolicyType& aContentPolicyType); + private: static bool InitializeEventTable(); diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index fd7c7be..89b583c 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -48,7 +48,6 @@ #include "nsIContent.h" #include "nsContentUtils.h" -#include "nsSerializationHelper.h" #include "mozilla/BasicEvents.h" #include "mozilla/EventDispatcher.h" @@ -227,28 +226,11 @@ nsImageBoxFrame::UpdateImage() if (mUseSrcAttr) { nsIDocument* doc = mContent->GetComposedDoc(); if (doc) { - // Use the serialized loadingPrincipal from the image element. Fall back - // to mContent's principal (SystemPrincipal) if not available. - nsContentPolicyType contentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; - nsCOMPtr<nsIPrincipal> loadingPrincipal = mContent->NodePrincipal(); - nsAutoString imageLoadingPrincipal; - mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, - imageLoadingPrincipal); - if (!imageLoadingPrincipal.IsEmpty()) { - nsCOMPtr<nsISupports> serializedPrincipal; - NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), - getter_AddRefs(serializedPrincipal)); - loadingPrincipal = do_QueryInterface(serializedPrincipal); - - if (loadingPrincipal) { - // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for - // indicating it's a favicon loading. - contentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; - } else { - // Fallback if the deserialization is failed. - loadingPrincipal = mContent->NodePrincipal(); - } - } + nsContentPolicyType contentPolicyType; + nsCOMPtr<nsIPrincipal> loadingPrincipal; + nsContentUtils::GetContentPolicyTypeForUIImageLoading(mContent, + getter_AddRefs(loadingPrincipal), + contentPolicyType); nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI(); nsCOMPtr<nsIURI> uri; diff --git a/widget/cocoa/nsMenuItemIconX.h b/widget/cocoa/nsMenuItemIconX.h index 7352a94..3bbe5d9 100644 --- a/widget/cocoa/nsMenuItemIconX.h +++ b/widget/cocoa/nsMenuItemIconX.h @@ -13,6 +13,7 @@ #include "mozilla/RefPtr.h" #include "nsCOMPtr.h" #include "imgINotificationObserver.h" +#include "nsIContentPolicy.h" class nsIURI; class nsIContent; @@ -55,6 +56,8 @@ protected: nsresult OnFrameComplete(imgIRequest* aRequest); nsCOMPtr<nsIContent> mContent; + nsCOMPtr<nsIPrincipal> mLoadingPrincipal; + nsContentPolicyType mContentType; RefPtr<imgRequestProxy> mIconRequest; nsMenuObjectX* mMenuObject; // [weak] nsIntRect mImageRegionRect; diff --git a/widget/cocoa/nsMenuItemIconX.mm b/widget/cocoa/nsMenuItemIconX.mm index 7589c27..261e63b 100644 --- a/widget/cocoa/nsMenuItemIconX.mm +++ b/widget/cocoa/nsMenuItemIconX.mm @@ -59,6 +59,8 @@ nsMenuItemIconX::nsMenuItemIconX(nsMenuObjectX* aMenuItem, nsIContent* aContent, NSMenuItem* aNativeMenuItem) : mContent(aContent) +, mLoadingPrincipal(aContent->NodePrincipal()) +, mContentType(nsIContentPolicy::TYPE_INTERNAL_IMAGE) , mMenuObject(aMenuItem) , mLoadedIcon(false) , mSetIcon(false) @@ -209,6 +211,10 @@ nsMenuItemIconX::GetIconURI(nsIURI** aIconURI) rv = primitiveValue->GetStringValue(imageURIString); if (NS_FAILED(rv)) return rv; + } else { + nsContentUtils::GetContentPolicyTypeForUIImageLoading(mContent, + getter_AddRefs(mLoadingPrincipal), + mContentType); } // Empty the mImageRegionRect initially as the image region CSS could @@ -310,10 +316,10 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI) } nsresult rv = loader->LoadImage(aIconURI, nullptr, nullptr, - mozilla::net::RP_Default, - nullptr, loadGroup, this, - nullptr, nullptr, nsIRequest::LOAD_NORMAL, nullptr, - nsIContentPolicy::TYPE_INTERNAL_IMAGE, EmptyString(), + mozilla::net::RP_Unset, + mLoadingPrincipal, loadGroup, this, + mContent, document, nsIRequest::LOAD_NORMAL, nullptr, + mContentType, EmptyString(), getter_AddRefs(mIconRequest)); if (NS_FAILED(rv)) return rv;
1 0
0 0
[tor-browser/tor-browser-52.1.0esr-7.0-2] Bug 22327: Isolate Page Info media previews to content first party
by gk@torproject.org 31 May '17

31 May '17
commit af4e5af7cfa3cfd73ff53fd6ec1be4e97e43f630 Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Wed May 10 17:10:23 2017 -0700 Bug 22327: Isolate Page Info media previews to content first party --- browser/base/content/pageinfo/pageInfo.js | 9 +++++ dom/base/nsContentUtils.cpp | 63 ++++++++++++++++++++++--------- dom/base/nsContentUtils.h | 7 ++++ dom/html/HTMLMediaElement.cpp | 2 + dom/media/MediaResource.cpp | 2 + 5 files changed, 66 insertions(+), 17 deletions(-) diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index 7a6d0a0..fc3e3bb 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -4,6 +4,11 @@ Components.utils.import("resource://gre/modules/LoadContextInfo.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +XPCOMUtils.defineLazyServiceGetter(this, "gSerializationHelper", + "@mozilla.org/network/serialization-helper;1", + "nsISerializationHelper"); // define a js object to implement nsITreeView function pageInfoTreeView(treeid, copycol) @@ -881,6 +886,8 @@ function makePreview(row) var newImage = new Image; newImage.id = "thepreviewimage"; + let loadingPrincipalString = gSerializationHelper.serializeToString(gDocInfo.principal); + newImage.setAttribute("loadingprincipal", loadingPrincipalString); var physWidth = 0, physHeight = 0; var width = 0, height = 0; @@ -928,6 +935,7 @@ function makePreview(row) else if (item.HTMLVideoElement && isProtocolAllowed) { newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "video"); newImage.id = "thepreviewimage"; + newImage.setAttribute("loadingprincipal", loadingPrincipalString); newImage.src = url; newImage.controls = true; width = physWidth = item.videoWidth; @@ -939,6 +947,7 @@ function makePreview(row) else if (item.HTMLAudioElement && isProtocolAllowed) { newImage = new Audio; newImage.id = "thepreviewimage"; + newImage.setAttribute("loadingprincipal", loadingPrincipalString); newImage.src = url; newImage.controls = true; isAudio = true; diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 48f7991..f932742 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -3367,6 +3367,15 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsINode* aContext, NS_PRECONDITION(aLoadingPrincipal, "Must have a principal"); NS_PRECONDITION(aRequest, "Null out param"); + // If the image is in a chrome document and the image node has been assigned a + // "loadingprincipal" attribute, we should use that principal instead. + if (IsSystemPrincipal(aLoadingPrincipal) && aContext->IsContent()) { + nsContentPolicyType contentPolicyType; + GetContentPolicyTypeForUIImageLoading(aContext->AsContent(), + &aLoadingPrincipal, contentPolicyType); + aContentPolicyType = (int32_t) contentPolicyType; + } + imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument); if (!imgLoader) { // nothing we can do here @@ -9879,25 +9888,45 @@ nsContentUtils::GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, { // Use the serialized loadingPrincipal from the image element. Fall back // to mContent's principal (SystemPrincipal) if not available. - aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadingNode->NodePrincipal(); - nsAutoString imageLoadingPrincipal; - aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, - imageLoadingPrincipal); - if (!imageLoadingPrincipal.IsEmpty()) { - nsCOMPtr<nsISupports> serializedPrincipal; - NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), - getter_AddRefs(serializedPrincipal)); - loadingPrincipal = do_QueryInterface(serializedPrincipal); - - if (loadingPrincipal) { - // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for - // indicating it's a favicon loading. - aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; - } else { - // Fallback if the deserialization is failed. - loadingPrincipal = aLoadingNode->NodePrincipal(); + if (IsSystemPrincipal(loadingPrincipal)) { + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; + nsAutoString imageLoadingPrincipal; + aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, + imageLoadingPrincipal); + if (!imageLoadingPrincipal.IsEmpty()) { + nsCOMPtr<nsISupports> serializedPrincipal; + NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), + getter_AddRefs(serializedPrincipal)); + loadingPrincipal = do_QueryInterface(serializedPrincipal); + + if (loadingPrincipal) { + // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for + // indicating it's a favicon loading. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; + } else { + // Fallback if the deserialization is failed. + loadingPrincipal = aLoadingNode->NodePrincipal(); + } } } loadingPrincipal.forget(aLoadingPrincipal); } + +/* static */ void +nsContentUtils::ApplyCustomLoadPrincipalToChannel(Element* aElement, nsIChannel* aChannel) +{ + nsCOMPtr<nsIPrincipal> loadingPrincipal = aElement->NodePrincipal(); + if (loadingPrincipal && nsContentUtils::IsSystemPrincipal(loadingPrincipal)) { + nsContentPolicyType dummyContentPolicyType; + nsContentUtils::GetContentPolicyTypeForUIImageLoading( + aElement, getter_AddRefs(loadingPrincipal), dummyContentPolicyType); + NeckoOriginAttributes neckoAttrs; + neckoAttrs.InheritFromDocToNecko( + BasePrincipal::Cast(loadingPrincipal)->OriginAttributesRef()); + nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo(); + if (loadInfo) { + Unused << loadInfo->SetOriginAttributes(neckoAttrs); + } + } +} diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 3c7d9eb..08c5cbf 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2746,6 +2746,13 @@ public: nsIPrincipal** aLoadingPrincipal, nsContentPolicyType& aContentPolicyType); + /** + * If aElement has a "loadprincipal" attribute, apply the origin attributes + * to the loadInfo belonging to aChannel. + */ + static void + ApplyCustomLoadPrincipalToChannel(Element* aElement, nsIChannel* aChannel); + private: static bool InitializeEventTable(); diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 2f4f73f..37deffc 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -586,6 +586,8 @@ public: return; } + nsContentUtils::ApplyCustomLoadPrincipalToChannel(aElement, channel); + // The listener holds a strong reference to us. This creates a // reference cycle, once we've set mChannel, which is manually broken // in the listener's OnStartRequest method after it is finished with diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index d36783b..a8f600f 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -833,6 +833,8 @@ ChannelMediaResource::RecreateChannel() loadFlags); NS_ENSURE_SUCCESS(rv, rv); + nsContentUtils::ApplyCustomLoadPrincipalToChannel(element, mChannel); + // We have cached the Content-Type, which should not change. Give a hint to // the channel to avoid a sniffing failure, which would be expected because we // are probably seeking in the middle of the bitstream, and sniffing relies
1 0
0 0
[tor-browser/tor-browser-52.1.1esr-7.0-1] Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku
by gk@torproject.org 31 May '17

31 May '17
commit 24862c15f6f719cd05a42d784ed7a7b7bb05c567 Author: Ehsan Akhgari <ehsan(a)mozilla.com> Date: Wed Dec 14 15:52:57 2016 -0500 Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku This patch makes nsMenuItemIconX also participate in the setup introduced in bug 1277803. --- browser/base/content/browser-places.js | 5 +++++ dom/base/nsContentUtils.cpp | 31 +++++++++++++++++++++++++++++++ dom/base/nsContentUtils.h | 10 ++++++++++ layout/xul/nsImageBoxFrame.cpp | 28 +++++----------------------- widget/cocoa/nsMenuItemIconX.h | 3 +++ widget/cocoa/nsMenuItemIconX.mm | 14 ++++++++++---- 6 files changed, 64 insertions(+), 27 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 14e90cd..3998b5b 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1509,6 +1509,10 @@ var BookmarkingUI = { options.maxResults = kMaxResults; let query = PlacesUtils.history.getNewQuery(); + let sh = Cc["@mozilla.org/network/serialization-helper;1"] + .getService(Ci.nsISerializationHelper); + let loadingPrincipal = sh.serializeToString(document.nodePrincipal); + let fragment = document.createDocumentFragment(); let root = PlacesUtils.history.executeQuery(query, options).root; root.containerOpen = true; @@ -1528,6 +1532,7 @@ var BookmarkingUI = { aExtraCSSClass); if (icon) { item.setAttribute("image", icon); + item.setAttribute("loadingprincipal", loadingPrincipal); } item._placesNode = node; fragment.appendChild(item); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 539d189..48f7991 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -189,6 +189,7 @@ #include "nsReferencedElement.h" #include "nsSandboxFlags.h" #include "nsScriptSecurityManager.h" +#include "nsSerializationHelper.h" #include "nsStreamUtils.h" #include "nsTextEditorState.h" #include "nsTextFragment.h" @@ -9870,3 +9871,33 @@ nsContentUtils::AttemptLargeAllocationLoad(nsIHttpChannel* aChannel) return reloadSucceeded; } + +/* static */ void +nsContentUtils::GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, + nsIPrincipal** aLoadingPrincipal, + nsContentPolicyType& aContentPolicyType) +{ + // Use the serialized loadingPrincipal from the image element. Fall back + // to mContent's principal (SystemPrincipal) if not available. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; + nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadingNode->NodePrincipal(); + nsAutoString imageLoadingPrincipal; + aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, + imageLoadingPrincipal); + if (!imageLoadingPrincipal.IsEmpty()) { + nsCOMPtr<nsISupports> serializedPrincipal; + NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), + getter_AddRefs(serializedPrincipal)); + loadingPrincipal = do_QueryInterface(serializedPrincipal); + + if (loadingPrincipal) { + // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for + // indicating it's a favicon loading. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; + } else { + // Fallback if the deserialization is failed. + loadingPrincipal = aLoadingNode->NodePrincipal(); + } + } + loadingPrincipal.forget(aLoadingPrincipal); +} diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index e991fb7..3c7d9eb 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2736,6 +2736,16 @@ public: static bool AttemptLargeAllocationLoad(nsIHttpChannel* aChannel); + /** + * Returns the content policy type that should be used for loading images + * for displaying in the UI. The sources of such images can be <xul:image>, + * <xul:menuitem> on OSX where we load the image through nsMenuItemIconX, etc. + */ + static void + GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, + nsIPrincipal** aLoadingPrincipal, + nsContentPolicyType& aContentPolicyType); + private: static bool InitializeEventTable(); diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index fd7c7be..89b583c 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -48,7 +48,6 @@ #include "nsIContent.h" #include "nsContentUtils.h" -#include "nsSerializationHelper.h" #include "mozilla/BasicEvents.h" #include "mozilla/EventDispatcher.h" @@ -227,28 +226,11 @@ nsImageBoxFrame::UpdateImage() if (mUseSrcAttr) { nsIDocument* doc = mContent->GetComposedDoc(); if (doc) { - // Use the serialized loadingPrincipal from the image element. Fall back - // to mContent's principal (SystemPrincipal) if not available. - nsContentPolicyType contentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; - nsCOMPtr<nsIPrincipal> loadingPrincipal = mContent->NodePrincipal(); - nsAutoString imageLoadingPrincipal; - mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, - imageLoadingPrincipal); - if (!imageLoadingPrincipal.IsEmpty()) { - nsCOMPtr<nsISupports> serializedPrincipal; - NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), - getter_AddRefs(serializedPrincipal)); - loadingPrincipal = do_QueryInterface(serializedPrincipal); - - if (loadingPrincipal) { - // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for - // indicating it's a favicon loading. - contentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; - } else { - // Fallback if the deserialization is failed. - loadingPrincipal = mContent->NodePrincipal(); - } - } + nsContentPolicyType contentPolicyType; + nsCOMPtr<nsIPrincipal> loadingPrincipal; + nsContentUtils::GetContentPolicyTypeForUIImageLoading(mContent, + getter_AddRefs(loadingPrincipal), + contentPolicyType); nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI(); nsCOMPtr<nsIURI> uri; diff --git a/widget/cocoa/nsMenuItemIconX.h b/widget/cocoa/nsMenuItemIconX.h index 7352a94..3bbe5d9 100644 --- a/widget/cocoa/nsMenuItemIconX.h +++ b/widget/cocoa/nsMenuItemIconX.h @@ -13,6 +13,7 @@ #include "mozilla/RefPtr.h" #include "nsCOMPtr.h" #include "imgINotificationObserver.h" +#include "nsIContentPolicy.h" class nsIURI; class nsIContent; @@ -55,6 +56,8 @@ protected: nsresult OnFrameComplete(imgIRequest* aRequest); nsCOMPtr<nsIContent> mContent; + nsCOMPtr<nsIPrincipal> mLoadingPrincipal; + nsContentPolicyType mContentType; RefPtr<imgRequestProxy> mIconRequest; nsMenuObjectX* mMenuObject; // [weak] nsIntRect mImageRegionRect; diff --git a/widget/cocoa/nsMenuItemIconX.mm b/widget/cocoa/nsMenuItemIconX.mm index 7589c27..261e63b 100644 --- a/widget/cocoa/nsMenuItemIconX.mm +++ b/widget/cocoa/nsMenuItemIconX.mm @@ -59,6 +59,8 @@ nsMenuItemIconX::nsMenuItemIconX(nsMenuObjectX* aMenuItem, nsIContent* aContent, NSMenuItem* aNativeMenuItem) : mContent(aContent) +, mLoadingPrincipal(aContent->NodePrincipal()) +, mContentType(nsIContentPolicy::TYPE_INTERNAL_IMAGE) , mMenuObject(aMenuItem) , mLoadedIcon(false) , mSetIcon(false) @@ -209,6 +211,10 @@ nsMenuItemIconX::GetIconURI(nsIURI** aIconURI) rv = primitiveValue->GetStringValue(imageURIString); if (NS_FAILED(rv)) return rv; + } else { + nsContentUtils::GetContentPolicyTypeForUIImageLoading(mContent, + getter_AddRefs(mLoadingPrincipal), + mContentType); } // Empty the mImageRegionRect initially as the image region CSS could @@ -310,10 +316,10 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI) } nsresult rv = loader->LoadImage(aIconURI, nullptr, nullptr, - mozilla::net::RP_Default, - nullptr, loadGroup, this, - nullptr, nullptr, nsIRequest::LOAD_NORMAL, nullptr, - nsIContentPolicy::TYPE_INTERNAL_IMAGE, EmptyString(), + mozilla::net::RP_Unset, + mLoadingPrincipal, loadGroup, this, + mContent, document, nsIRequest::LOAD_NORMAL, nullptr, + mContentType, EmptyString(), getter_AddRefs(mIconRequest)); if (NS_FAILED(rv)) return rv;
1 0
0 0
[tor-browser/tor-browser-52.1.1esr-7.0-1] Bug 22327: Isolate Page Info media previews to content first party
by gk@torproject.org 31 May '17

31 May '17
commit 2d4d11e1e6bad5f384c409fa0391e97a9c202439 Author: Arthur Edelstein <arthuredelstein(a)gmail.com> Date: Wed May 10 17:10:23 2017 -0700 Bug 22327: Isolate Page Info media previews to content first party --- browser/base/content/pageinfo/pageInfo.js | 9 +++++ dom/base/nsContentUtils.cpp | 63 ++++++++++++++++++++++--------- dom/base/nsContentUtils.h | 7 ++++ dom/html/HTMLMediaElement.cpp | 2 + dom/media/MediaResource.cpp | 2 + 5 files changed, 66 insertions(+), 17 deletions(-) diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index 7a6d0a0..fc3e3bb 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -4,6 +4,11 @@ Components.utils.import("resource://gre/modules/LoadContextInfo.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); + +XPCOMUtils.defineLazyServiceGetter(this, "gSerializationHelper", + "@mozilla.org/network/serialization-helper;1", + "nsISerializationHelper"); // define a js object to implement nsITreeView function pageInfoTreeView(treeid, copycol) @@ -881,6 +886,8 @@ function makePreview(row) var newImage = new Image; newImage.id = "thepreviewimage"; + let loadingPrincipalString = gSerializationHelper.serializeToString(gDocInfo.principal); + newImage.setAttribute("loadingprincipal", loadingPrincipalString); var physWidth = 0, physHeight = 0; var width = 0, height = 0; @@ -928,6 +935,7 @@ function makePreview(row) else if (item.HTMLVideoElement && isProtocolAllowed) { newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "video"); newImage.id = "thepreviewimage"; + newImage.setAttribute("loadingprincipal", loadingPrincipalString); newImage.src = url; newImage.controls = true; width = physWidth = item.videoWidth; @@ -939,6 +947,7 @@ function makePreview(row) else if (item.HTMLAudioElement && isProtocolAllowed) { newImage = new Audio; newImage.id = "thepreviewimage"; + newImage.setAttribute("loadingprincipal", loadingPrincipalString); newImage.src = url; newImage.controls = true; isAudio = true; diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 48f7991..f932742 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -3367,6 +3367,15 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsINode* aContext, NS_PRECONDITION(aLoadingPrincipal, "Must have a principal"); NS_PRECONDITION(aRequest, "Null out param"); + // If the image is in a chrome document and the image node has been assigned a + // "loadingprincipal" attribute, we should use that principal instead. + if (IsSystemPrincipal(aLoadingPrincipal) && aContext->IsContent()) { + nsContentPolicyType contentPolicyType; + GetContentPolicyTypeForUIImageLoading(aContext->AsContent(), + &aLoadingPrincipal, contentPolicyType); + aContentPolicyType = (int32_t) contentPolicyType; + } + imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument); if (!imgLoader) { // nothing we can do here @@ -9879,25 +9888,45 @@ nsContentUtils::GetContentPolicyTypeForUIImageLoading(nsIContent* aLoadingNode, { // Use the serialized loadingPrincipal from the image element. Fall back // to mContent's principal (SystemPrincipal) if not available. - aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadingNode->NodePrincipal(); - nsAutoString imageLoadingPrincipal; - aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, - imageLoadingPrincipal); - if (!imageLoadingPrincipal.IsEmpty()) { - nsCOMPtr<nsISupports> serializedPrincipal; - NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), - getter_AddRefs(serializedPrincipal)); - loadingPrincipal = do_QueryInterface(serializedPrincipal); - - if (loadingPrincipal) { - // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for - // indicating it's a favicon loading. - aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; - } else { - // Fallback if the deserialization is failed. - loadingPrincipal = aLoadingNode->NodePrincipal(); + if (IsSystemPrincipal(loadingPrincipal)) { + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE; + nsAutoString imageLoadingPrincipal; + aLoadingNode->GetAttr(kNameSpaceID_None, nsGkAtoms::loadingprincipal, + imageLoadingPrincipal); + if (!imageLoadingPrincipal.IsEmpty()) { + nsCOMPtr<nsISupports> serializedPrincipal; + NS_DeserializeObject(NS_ConvertUTF16toUTF8(imageLoadingPrincipal), + getter_AddRefs(serializedPrincipal)); + loadingPrincipal = do_QueryInterface(serializedPrincipal); + + if (loadingPrincipal) { + // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for + // indicating it's a favicon loading. + aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON; + } else { + // Fallback if the deserialization is failed. + loadingPrincipal = aLoadingNode->NodePrincipal(); + } } } loadingPrincipal.forget(aLoadingPrincipal); } + +/* static */ void +nsContentUtils::ApplyCustomLoadPrincipalToChannel(Element* aElement, nsIChannel* aChannel) +{ + nsCOMPtr<nsIPrincipal> loadingPrincipal = aElement->NodePrincipal(); + if (loadingPrincipal && nsContentUtils::IsSystemPrincipal(loadingPrincipal)) { + nsContentPolicyType dummyContentPolicyType; + nsContentUtils::GetContentPolicyTypeForUIImageLoading( + aElement, getter_AddRefs(loadingPrincipal), dummyContentPolicyType); + NeckoOriginAttributes neckoAttrs; + neckoAttrs.InheritFromDocToNecko( + BasePrincipal::Cast(loadingPrincipal)->OriginAttributesRef()); + nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo(); + if (loadInfo) { + Unused << loadInfo->SetOriginAttributes(neckoAttrs); + } + } +} diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 3c7d9eb..08c5cbf 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2746,6 +2746,13 @@ public: nsIPrincipal** aLoadingPrincipal, nsContentPolicyType& aContentPolicyType); + /** + * If aElement has a "loadprincipal" attribute, apply the origin attributes + * to the loadInfo belonging to aChannel. + */ + static void + ApplyCustomLoadPrincipalToChannel(Element* aElement, nsIChannel* aChannel); + private: static bool InitializeEventTable(); diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 2f4f73f..37deffc 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -586,6 +586,8 @@ public: return; } + nsContentUtils::ApplyCustomLoadPrincipalToChannel(aElement, channel); + // The listener holds a strong reference to us. This creates a // reference cycle, once we've set mChannel, which is manually broken // in the listener's OnStartRequest method after it is finished with diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index d36783b..a8f600f 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -833,6 +833,8 @@ ChannelMediaResource::RecreateChannel() loadFlags); NS_ENSURE_SUCCESS(rv, rv); + nsContentUtils::ApplyCustomLoadPrincipalToChannel(element, mChannel); + // We have cached the Content-Type, which should not change. Give a hint to // the channel to avoid a sniffing failure, which would be expected because we // are probably seeking in the middle of the bitstream, and sniffing relies
1 0
0 0
[tor-browser-build/master] Bug 22444: use hardening-wrapper when building gcc for the Linux build
by boklm@torproject.org 30 May '17

30 May '17
commit 6378afdeb4e15607bedebe5270137657c7961be7 Author: Nicolas Vigier <boklm(a)torproject.org> Date: Tue May 30 14:51:46 2017 +0200 Bug 22444: use hardening-wrapper when building gcc for the Linux build --- projects/gcc/build | 11 +++++++++++ projects/gcc/config | 2 ++ 2 files changed, 13 insertions(+) diff --git a/projects/gcc/build b/projects/gcc/build index e509aac..e2902ad 100644 --- a/projects/gcc/build +++ b/projects/gcc/build @@ -1,6 +1,17 @@ #!/bin/sh [% c("var/set_default_env") -%] [% c("var/setarch") -%] +[% IF c("var/linux") -%] + # Config options for hardening-wrapper + export DEB_BUILD_HARDENING=1 + export DEB_BUILD_HARDENING_STACKPROTECTOR=1 + export DEB_BUILD_HARDENING_FORTIFY=1 + export DEB_BUILD_HARDENING_PIE=1 + # We need to disable `-Werror=format-security` as GCC does not build with it + # anymore. It seems it got audited for those problems already: + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48817. + export DEB_BUILD_HARDENING_FORMAT=0 +[% END -%] distdir=/var/tmp/dist/[% project %] mkdir /var/tmp/build tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.bz2 diff --git a/projects/gcc/config b/projects/gcc/config index 3871455..d97afbf 100644 --- a/projects/gcc/config +++ b/projects/gcc/config @@ -47,12 +47,14 @@ targets: var: configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib arch_deps: + - hardening-wrapper - libc6-dev - zlib1g-dev linux-x86_64: var: configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686 arch_deps: + - hardening-wrapper - libc6-dev-i386 input_files: - project: container-image
1 0
0 0
[tor-browser/tor-browser-52.1.1esr-7.0-1] Bug 21972: about:support is partially broken
by gk@torproject.org 30 May '17

30 May '17
commit 8bd3ef487932654d78bfab848b65fb04b0094e3b Author: Georg Koppen <gk(a)torproject.org> Date: Mon May 29 13:31:07 2017 +0000 Bug 21972: about:support is partially broken --- toolkit/modules/Troubleshoot.jsm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index cc545b4..364d5e1 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -469,8 +469,11 @@ var dataProviders = { // Eagerly free resources. let loseExt = gl.getExtension("WEBGL_lose_context"); - loseExt.loseContext(); - + // This extension is not necessarily available. Check for it. Fixes bug + // 21972. + if (loseExt) { + loseExt.loseContext(); + } return contextInfo; }
1 0
0 0
[tor-browser/tor-browser-52.1.0esr-7.0-2] Bug 21972: about:support is partially broken
by gk@torproject.org 30 May '17

30 May '17
commit 4fef8cc56573a8513479bfb821406e7e8dfffcc5 Author: Georg Koppen <gk(a)torproject.org> Date: Mon May 29 13:31:07 2017 +0000 Bug 21972: about:support is partially broken --- toolkit/modules/Troubleshoot.jsm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index cc545b4..364d5e1 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -469,8 +469,11 @@ var dataProviders = { // Eagerly free resources. let loseExt = gl.getExtension("WEBGL_lose_context"); - loseExt.loseContext(); - + // This extension is not necessarily available. Check for it. Fixes bug + // 21972. + if (loseExt) { + loseExt.loseContext(); + } return contextInfo; }
1 0
0 0
[tor-browser/tor-browser-52.1.0esr-7.0-2] squash! Bug 18821: Disable libmdns for Android and Desktop
by gk@torproject.org 30 May '17

30 May '17
commit a979fd68b78a17814bde3544b7d8896c6089cf6e Author: Georg Koppen <gk(a)torproject.org> Date: Wed May 24 13:45:47 2017 +0000 squash! Bug 18821: Disable libmdns for Android and Desktop Bug 21861: Disable additional mDNS code to avoid proxy bypasses --- dom/presentation/provider/moz.build | 16 ---------------- mobile/android/installer/package-manifest.in | 4 ---- netwerk/dns/mdns/libmdns/moz.build | 16 ---------------- 3 files changed, 36 deletions(-) diff --git a/dom/presentation/provider/moz.build b/dom/presentation/provider/moz.build index 18428b5..7f82700 100644 --- a/dom/presentation/provider/moz.build +++ b/dom/presentation/provider/moz.build @@ -12,8 +12,6 @@ EXTRA_COMPONENTS += [ UNIFIED_SOURCES += [ 'DeviceProviderHelpers.cpp', 'DisplayDeviceProvider.cpp', - 'MulticastDNSDeviceProvider.cpp', - 'PresentationDeviceProviderModule.cpp', ] EXTRA_JS_MODULES.presentation += [ @@ -22,19 +20,5 @@ EXTRA_JS_MODULES.presentation += [ 'StateMachineHelper.jsm', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - EXTRA_COMPONENTS += [ - # For android presentation device - 'AndroidCastDeviceProvider.js', - 'AndroidCastDeviceProvider.manifest', - # for TV 2.5 device backward capability - 'LegacyPresentationControlService.js', - 'LegacyProviders.manifest', - ] - - UNIFIED_SOURCES += [ - 'LegacyMDNSDeviceProvider.cpp', - ] - include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 417d34a..025094c 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -404,10 +404,6 @@ @BINPATH@/components/PresentationNetworkHelper.manifest @BINPATH@/components/PresentationDataChannelSessionTransport.js @BINPATH@/components/PresentationDataChannelSessionTransport.manifest -@BINPATH@/components/LegacyProviders.manifest -@BINPATH@/components/LegacyPresentationControlService.js -@BINPATH@/components/AndroidCastDeviceProvider.manifest -@BINPATH@/components/AndroidCastDeviceProvider.js @BINPATH@/components/TVSimulatorService.js @BINPATH@/components/TVSimulatorService.manifest diff --git a/netwerk/dns/mdns/libmdns/moz.build b/netwerk/dns/mdns/libmdns/moz.build index f14e411..422621f 100644 --- a/netwerk/dns/mdns/libmdns/moz.build +++ b/netwerk/dns/mdns/libmdns/moz.build @@ -22,22 +22,6 @@ if (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16' ] -else: - EXTRA_JS_MODULES += [ - 'fallback/DataReader.jsm', - 'fallback/DataWriter.jsm', - 'fallback/DNSPacket.jsm', - 'fallback/DNSRecord.jsm', - 'fallback/DNSResourceRecord.jsm', - 'fallback/DNSTypes.jsm', - 'fallback/MulticastDNS.jsm', - ] - - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - EXTRA_JS_MODULES += [ - 'MulticastDNSAndroid.jsm', - ] - UNIFIED_SOURCES += [ 'nsDNSServiceInfo.cpp', 'nsMulticastDNSModule.cpp',
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 11
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.