summaryrefslogtreecommitdiff
path: root/libre/iceweasel-libre/libre.patch
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-12-21 17:06:58 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-12-21 17:06:58 -0200
commit81cda5c8b9c43955d4d51c6c63def5353430d2d9 (patch)
treea04c470a7a95f2120ac851140828abd6040dff33 /libre/iceweasel-libre/libre.patch
parent4cd20c776138e95fbbc2cb6ca52453913ad065b7 (diff)
iceweasel-libre: add more fixes on libre.patch, remove extra contents due instability
Diffstat (limited to 'libre/iceweasel-libre/libre.patch')
-rw-r--r--libre/iceweasel-libre/libre.patch378
1 files changed, 297 insertions, 81 deletions
diff --git a/libre/iceweasel-libre/libre.patch b/libre/iceweasel-libre/libre.patch
index 7555cc8c4..ced25fcc5 100644
--- a/libre/iceweasel-libre/libre.patch
+++ b/libre/iceweasel-libre/libre.patch
@@ -1,8 +1,20 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
-index 331edc8..e18bd20 100644
+index 331edc8..226508d 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
-@@ -1283,14 +1283,6 @@ pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
+@@ -242,11 +242,6 @@ pref("browser.slowStartup.notificationDisabled", false);
+ pref("browser.slowStartup.timeThreshold", 60000);
+ pref("browser.slowStartup.maxSamples", 5);
+
+-// This url, if changed, MUST continue to point to an https url. Pulling arbitrary content to inject into
+-// this page over http opens us up to a man-in-the-middle attack that we'd rather not face. If you are a downstream
+-// repackager of this code using an alternate snippet url, please keep your users safe
+-pref("browser.aboutHomeSnippets.updateUrl", "https://snippets.mozilla.com/%STARTPAGE_VERSION%/%NAME%/%VERSION%/%APPBUILDID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/");
+-
+ pref("browser.enable_automatic_image_resizing", true);
+ pref("browser.chrome.site_icons", true);
+ pref("browser.chrome.favicons", true);
+@@ -1283,11 +1278,7 @@ pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
// (This is intentionally on the high side; see bug 746055.)
pref("image.mem.max_decoded_image_kb", 256000);
@@ -11,17 +23,15 @@ index 331edc8..e18bd20 100644
-
-pref("social.sidebar.open", true);
-pref("social.sidebar.unload_timeout_ms", 10000);
--
--pref("dom.identity.enabled", false);
--
- // Turn on the CSP 1.0 parser for Content Security Policy headers
- pref("security.csp.speccompliant", true);
++// removed facebook sidebar with Iceweasel.
+
+ pref("dom.identity.enabled", false);
diff --git a/browser/base/content/abouthome/aboutHome.css b/browser/base/content/abouthome/aboutHome.css
-index c270318..5175eaa 100644
+index c270318..d4ecde0 100644
--- a/browser/base/content/abouthome/aboutHome.css
+++ b/browser/base/content/abouthome/aboutHome.css
-@@ -49,11 +49,6 @@ a {
+@@ -49,15 +49,6 @@ a {
background-repeat: no-repeat;
}
@@ -30,10 +40,14 @@ index c270318..5175eaa 100644
- width: 470px;
-}
-
- #searchForm {
+-#searchForm {
+- display: -moz-box;
+-}
+-
+ #searchLogoContainer {
display: -moz-box;
- }
-@@ -72,8 +67,7 @@ a {
+ -moz-box-align: center;
+@@ -72,8 +63,7 @@ a {
#searchEngineLogo {
display: inline-block;
height: 28px;
@@ -43,7 +57,7 @@ index c270318..5175eaa 100644
}
#searchText {
-@@ -145,48 +139,6 @@ a {
+@@ -145,48 +135,6 @@ a {
transition-duration: 0ms;
}
@@ -92,16 +106,16 @@ index c270318..5175eaa 100644
#launcher {
display: -moz-box;
-moz-box-align: center;
-@@ -335,7 +287,7 @@ body[narrow] #restorePreviousSession::before {
+@@ -335,26 +283,25 @@ body[narrow] #restorePreviousSession::before {
width: 32px;
}
-#aboutMozilla {
+#aboutGNU {
display: block;
- position: relative; /* pin wordmark to edge of document, not of viewport */
+- position: relative; /* pin wordmark to edge of document, not of viewport */
-moz-box-ordinal-group: 0;
-@@ -343,18 +295,18 @@ body[narrow] #restorePreviousSession::before {
+ opacity: .5;
transition: opacity 150ms;
}
@@ -125,7 +139,7 @@ index c270318..5175eaa 100644
}
/* [HiDPI]
-@@ -366,22 +318,8 @@ body[narrow] #restorePreviousSession::before {
+@@ -366,26 +313,6 @@ body[narrow] #restorePreviousSession::before {
background-image: url("chrome://branding/content/about-logo@2x.png");
}
@@ -143,21 +157,23 @@ index c270318..5175eaa 100644
- background-image: url("chrome://browser/content/abouthome/snippet2@2x.png");
- }
-
- .launchButton::before,
+- .launchButton::before,
- #aboutMozilla::before {
-+ #aboutGNU::before {
- transform: scale(.5);
- transform-origin: 0 0;
+- transform: scale(.5);
+- transform-origin: 0 0;
+- }
+-
+ #downloads::before {
+ content: url("chrome://browser/content/abouthome/downloads@2x.png");
}
-@@ -422,8 +360,8 @@ body[narrow] #restorePreviousSession::before {
+@@ -421,9 +348,5 @@ body[narrow] #restorePreviousSession::before {
+ body[narrow] #restorePreviousSession::before {
content: url("chrome://browser/content/abouthome/restore@2x.png");
}
-
+-
- #aboutMozilla::before {
- content: url("chrome://browser/content/abouthome/mozilla@2x.png");
-+ #aboutGNU::before {
-+ content: url("chrome://browser/content/abouthome/gnu_headshadow.png");
- }
+- }
}
diff --git a/browser/base/content/abouthome/aboutHome.js b/browser/base/content/abouthome/aboutHome.js
@@ -727,10 +743,10 @@ index 432fcdc..8e85f1f 100644
function fitToWidth() {
diff --git a/browser/base/content/abouthome/aboutHome.xhtml b/browser/base/content/abouthome/aboutHome.xhtml
-index 1d03d38..4f9b6b2 100644
+index 1d03d38..fda3095 100644
--- a/browser/base/content/abouthome/aboutHome.xhtml
+++ b/browser/base/content/abouthome/aboutHome.xhtml
-@@ -43,15 +43,6 @@
+@@ -43,30 +43,9 @@
<input id="searchSubmit" type="submit" value="&abouthome.searchEngineButton.label;"/>
</form>
</div>
@@ -746,15 +762,264 @@ index 1d03d38..4f9b6b2 100644
</div>
<div class="spacer"/>
-@@ -66,7 +57,6 @@
- <div id="restorePreviousSessionSeparator"/>
- <button class="launchButton" id="restorePreviousSession">&historyRestoreLastSession.label;</button>
- </div>
+- <div id="launcher">
+- <button class="launchButton" id="downloads">&abouthome.downloadsButton.label;</button>
+- <button class="launchButton" id="bookmarks">&abouthome.bookmarksButton.label;</button>
+- <button class="launchButton" id="history">&abouthome.historyButton.label;</button>
+- <button class="launchButton" id="apps" hidden="true">&abouthome.appsButton.label;</button>
+- <button class="launchButton" id="addons">&abouthome.addonsButton.label;</button>
+- <button class="launchButton" id="sync">&abouthome.syncButton.label;</button>
+- <button class="launchButton" id="settings">&abouthome.settingsButton.label;</button>
+- <div id="restorePreviousSessionSeparator"/>
+- <button class="launchButton" id="restorePreviousSession">&historyRestoreLastSession.label;</button>
+- </div>
-
- <a id="aboutMozilla" href="https://www.mozilla.org/about/?utm_source=about-home&amp;utm_medium=Referral"/>
+ <a id="aboutGNU" href="http://gnu.org"></a>
</body>
</html>
+diff --git a/browser/base/content/content.js b/browser/base/content/content.js
+index 9428613..fc3c00a 100644
+--- a/browser/base/content/content.js
++++ b/browser/base/content/content.js
+@@ -50,216 +50,3 @@ if (Services.prefs.getBoolPref("browser.tabs.remote")) {
+ LoginManagerContent.onUsernameInput(event);
+ });
+ }
+-
+-let AboutHomeListener = {
+- init: function(chromeGlobal) {
+- chromeGlobal.addEventListener('AboutHomeLoad', () => this.onPageLoad(), false, true);
+- },
+-
+- handleEvent: function(aEvent) {
+- switch (aEvent.type) {
+- case "AboutHomeLoad":
+- this.onPageLoad();
+- break;
+- }
+- },
+-
+- receiveMessage: function(aMessage) {
+- switch (aMessage.name) {
+- case "AboutHome:Update":
+- this.onUpdate(aMessage.data);
+- break;
+- }
+- },
+-
+- onUpdate: function(aData) {
+- let doc = content.document;
+- if (doc.documentURI.toLowerCase() != "about:home")
+- return;
+-
+- if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isWindowPrivate(content))
+- doc.getElementById("launcher").setAttribute("session", "true");
+-
+- // Inject search engine and snippets URL.
+- let docElt = doc.documentElement;
+- // set the following attributes BEFORE searchEngineName, which triggers to
+- // show the snippets when it's set.
+- docElt.setAttribute("snippetsURL", aData.snippetsURL);
+- if (aData.showKnowYourRights)
+- docElt.setAttribute("showKnowYourRights", "true");
+- docElt.setAttribute("snippetsVersion", aData.snippetsVersion);
+- docElt.setAttribute("searchEngineName", Services.search.defaultEngine.name);
+- },
+-
+- onPageLoad: function() {
+- let doc = content.document;
+- if (doc.documentURI.toLowerCase() != "about:home" ||
+- doc.documentElement.hasAttribute("hasBrowserHandlers")) {
+- return;
+- }
+-
+- doc.documentElement.setAttribute("hasBrowserHandlers", "true");
+- let updateListener = this;
+- addMessageListener("AboutHome:Update", updateListener);
+- addEventListener("click", this.onClick, true);
+- addEventListener("pagehide", function onPageHide(event) {
+- if (event.target.defaultView.frameElement)
+- return;
+- removeMessageListener("AboutHome:Update", updateListener);
+- removeEventListener("click", this.onClick, true);
+- removeEventListener("pagehide", onPageHide, true);
+- if (event.target.documentElement)
+- event.target.documentElement.removeAttribute("hasBrowserHandlers");
+- }, true);
+-
+- // XXX bug 738646 - when Marketplace is launched, remove this statement and
+- // the hidden attribute set on the apps button in aboutHome.xhtml
+- if (Services.prefs.getPrefType("browser.aboutHome.apps") == Services.prefs.PREF_BOOL &&
+- Services.prefs.getBoolPref("browser.aboutHome.apps"))
+- doc.getElementById("apps").removeAttribute("hidden");
+-
+- sendAsyncMessage("AboutHome:RequestUpdate");
+-
+- doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
+- sendAsyncMessage("AboutHome:Search", { searchData: e.detail });
+- }, true, true);
+- },
+-
+- onClick: function(aEvent) {
+- if (!aEvent.isTrusted || // Don't trust synthetic events
+- aEvent.button == 2 || aEvent.target.localName != "button") {
+- return;
+- }
+-
+- let originalTarget = aEvent.originalTarget;
+- let ownerDoc = originalTarget.ownerDocument;
+- let elmId = originalTarget.getAttribute("id");
+-
+- switch (elmId) {
+- case "restorePreviousSession":
+- sendAsyncMessage("AboutHome:RestorePreviousSession");
+- ownerDoc.getElementById("launcher").removeAttribute("session");
+- break;
+-
+- case "downloads":
+- sendAsyncMessage("AboutHome:Downloads");
+- break;
+-
+- case "bookmarks":
+- sendAsyncMessage("AboutHome:Bookmarks");
+- break;
+-
+- case "history":
+- sendAsyncMessage("AboutHome:History");
+- break;
+-
+- case "apps":
+- sendAsyncMessage("AboutHome:Apps");
+- break;
+-
+- case "addons":
+- sendAsyncMessage("AboutHome:Addons");
+- break;
+-
+- case "sync":
+- sendAsyncMessage("AboutHome:Sync");
+- break;
+-
+- case "settings":
+- sendAsyncMessage("AboutHome:Settings");
+- break;
+- }
+- },
+-};
+-AboutHomeListener.init(this);
+-
+-
+-var global = this;
+-
+-let ClickEventHandler = {
+- init: function init() {
+- Cc["@mozilla.org/eventlistenerservice;1"]
+- .getService(Ci.nsIEventListenerService)
+- .addSystemEventListener(global, "click", this, true);
+- },
+-
+- handleEvent: function(event) {
+- // Bug 903016: Most of this code is an unfortunate duplication from
+- // contentAreaClick in browser.js.
+- if (!event.isTrusted || event.defaultPrevented || event.button == 2)
+- return;
+-
+- let [href, node] = this._hrefAndLinkNodeForClickEvent(event);
+-
+- let json = { button: event.button, shiftKey: event.shiftKey,
+- ctrlKey: event.ctrlKey, metaKey: event.metaKey,
+- altKey: event.altKey, href: null, title: null,
+- bookmark: false };
+-
+- if (href) {
+- json.href = href;
+- if (node) {
+- json.title = node.getAttribute("title");
+-
+- if (event.button == 0 && !event.ctrlKey && !event.shiftKey &&
+- !event.altKey && !event.metaKey) {
+- json.bookmark = node.getAttribute("rel") == "sidebar";
+- if (json.bookmark)
+- event.preventDefault(); // Need to prevent the pageload.
+- }
+- }
+-
+- sendAsyncMessage("Content:Click", json);
+- return;
+- }
+-
+- // This might be middle mouse navigation.
+- if (event.button == 1)
+- sendAsyncMessage("Content:Click", json);
+- },
+-
+- /**
+- * Extracts linkNode and href for the current click target.
+- *
+- * @param event
+- * The click event.
+- * @return [href, linkNode].
+- *
+- * @note linkNode will be null if the click wasn't on an anchor
+- * element (or XLink).
+- */
+- _hrefAndLinkNodeForClickEvent: function(event) {
+- function isHTMLLink(aNode) {
+- // Be consistent with what nsContextMenu.js does.
+- return ((aNode instanceof content.HTMLAnchorElement && aNode.href) ||
+- (aNode instanceof content.HTMLAreaElement && aNode.href) ||
+- aNode instanceof content.HTMLLinkElement);
+- }
+-
+- let node = event.target;
+- while (node && !isHTMLLink(node)) {
+- node = node.parentNode;
+- }
+-
+- if (node)
+- return [node.href, node];
+-
+- // If there is no linkNode, try simple XLink.
+- let href, baseURI;
+- node = event.target;
+- while (node && !href) {
+- if (node.nodeType == content.Node.ELEMENT_NODE) {
+- href = node.getAttributeNS("http://www.w3.org/1999/xlink", "href");
+- if (href)
+- baseURI = node.ownerDocument.baseURIObject;
+- }
+- node = node.parentNode;
+- }
+-
+- // In case of XLink, we don't return the node we got href from since
+- // callers expect <a>-like elements.
+- // Note: makeURI() will throw if aUri is not a valid URI.
+- return [href ? makeURI(href, null, baseURI).spec : null, null];
+- }
+-};
+-ClickEventHandler.init();
+diff --git a/browser/base/jar.mn b/browser/base/jar.mn
+index f2a820c..9478039 100644
+--- a/browser/base/jar.mn
++++ b/browser/base/jar.mn
+@@ -33,7 +33,7 @@ browser.jar:
+ content/browser/abouthome/settings.png (content/abouthome/settings.png)
+ content/browser/abouthome/restore.png (content/abouthome/restore.png)
+ content/browser/abouthome/restore-large.png (content/abouthome/restore-large.png)
+- content/browser/abouthome/mozilla.png (content/abouthome/mozilla.png)
++ content/browser/abouthome/gnu_headshadow.png (content/abouthome/gnu_headshadow.png)
+ content/browser/abouthome/snippet1@2x.png (content/abouthome/snippet1@2x.png)
+ content/browser/abouthome/snippet2@2x.png (content/abouthome/snippet2@2x.png)
+ content/browser/abouthome/downloads@2x.png (content/abouthome/downloads@2x.png)
+@@ -45,7 +45,6 @@ browser.jar:
+ content/browser/abouthome/settings@2x.png (content/abouthome/settings@2x.png)
+ content/browser/abouthome/restore@2x.png (content/abouthome/restore@2x.png)
+ content/browser/abouthome/restore-large@2x.png (content/abouthome/restore-large@2x.png)
+- content/browser/abouthome/mozilla@2x.png (content/abouthome/mozilla@2x.png)
+ #ifdef MOZ_SERVICES_HEALTHREPORT
+ content/browser/abouthealthreport/abouthealth.xhtml (content/abouthealthreport/abouthealth.xhtml)
+ content/browser/abouthealthreport/abouthealth.js (content/abouthealthreport/abouthealth.js)
diff --git a/browser/locales/en-US/chrome/browser/aboutHome.dtd b/browser/locales/en-US/chrome/browser/aboutHome.dtd
index e84341f..5476d32 100644
--- a/browser/locales/en-US/chrome/browser/aboutHome.dtd
@@ -957,52 +1222,3 @@ index 98c443d..0173762 100644
if (target) {
target.messageManager.sendAsyncMessage("AboutHome:Update", data);
} else {
-diff --git a/dom/ipc/test.xul b/dom/ipc/test.xul
-index 3eede17..1b47a70 100644
---- a/dom/ipc/test.xul
-+++ b/dom/ipc/test.xul
-@@ -302,6 +302,6 @@
- oncommand="document.getElementById('page').QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader.delayRemoteDialogs = this.checked;"/>
- </toolbar>
-
-- <browser type="content" src="http://www.google.com/" flex="1" id="page" remote="true"/>
-+ <browser type="content" src="https://duckduckgo.com/html" flex="1" id="page" remote="true"/>
- <label id="messageLog" value="" crop="center"/>
- </window>
-diff --git a/layout/ipc/test-ipcbrowser.xul b/layout/ipc/test-ipcbrowser.xul
-index 237ba61..7603d7d 100644
---- a/layout/ipc/test-ipcbrowser.xul
-+++ b/layout/ipc/test-ipcbrowser.xul
-@@ -73,6 +73,6 @@
- label="setViewportScale"/>
- </toolbar>
-
-- <browser type="content" src="http://www.google.com/" flex="1" id="content"
-+ <browser type="content" src="https://duckduckgo.com/html" flex="1" id="content"
- remote="true"/>
- </window>
-diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
-index 346c819..0605f34 100644
---- a/modules/libpref/src/init/all.js
-+++ b/modules/libpref/src/init/all.js
-@@ -4304,20 +4304,6 @@ pref("memory.ghost_window_timeout_seconds", 60);
- // Disable freeing dirty pages when minimizing memory.
- pref("memory.free_dirty_pages", false);
-
--pref("social.enabled", false);
--// comma separated list of domain origins (e.g. https://domain.com) for
--// providers that can install from their own website without user warnings.
--// entries are
--pref("social.whitelist", "https://mozsocial.cliqz.com,https://now.msn.com,https://mixi.jp");
--// omma separated list of domain origins (e.g. https://domain.com) for directory
--// websites (e.g. AMO) that can install providers for other sites
--pref("social.directories", "https://addons.mozilla.org");
--// remote-install allows any website to activate a provider, with extended UI
--// notifying user of installation. we can later pref off remote install if
--// necessary. This does not affect whitelisted and directory installs.
--pref("social.remote-install.enabled", true);
--pref("social.toast-notifications.enabled", true);
--
- // Disable idle observer fuzz, because only privileged content can access idle
- // observers (bug 780507).
- pref("dom.idle-observers-api.fuzz_time.disabled", true);