From 451a96d1a9c850903d2e7d9c5d0e625dce9dbded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Wed, 18 Jan 2012 15:35:28 -0500 Subject: [PATCH 01/13] Bug 715397 - ability to build m-c on 10.7 (lion). r=ted. Use the 10.6 sdk. --- build/macosx/mozconfig.leopard | 2 +- build/macosx/universal/mozconfig.common | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/macosx/mozconfig.leopard b/build/macosx/mozconfig.leopard index 64e834e882e1..2a20531945e8 100644 --- a/build/macosx/mozconfig.leopard +++ b/build/macosx/mozconfig.leopard @@ -29,4 +29,4 @@ fi # Note, the version (10) is used by libffi's configure. ac_add_options --target=i386-apple-darwin10 -ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk +ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk diff --git a/build/macosx/universal/mozconfig.common b/build/macosx/universal/mozconfig.common index c40642798077..7a0e4a473dea 100644 --- a/build/macosx/universal/mozconfig.common +++ b/build/macosx/universal/mozconfig.common @@ -42,8 +42,7 @@ mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk ac_add_app_options i386 --target=i386-apple-darwin10 ac_add_app_options x86_64 --target=x86_64-apple-darwin10 -ac_add_app_options i386 --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk -ac_add_app_options x86_64 --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk +ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk . $topsrcdir/build/macosx/common From 12e4caf72c3bce695bea26acb53539671853fa2e Mon Sep 17 00:00:00 2001 From: Margaret Leibovic Date: Wed, 18 Jan 2012 12:53:12 -0800 Subject: [PATCH 02/13] Bug 718499 - Save as PDF saves content from the wrong tab. r=mfinkle --- mobile/android/chrome/content/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 6ed5ec5bb44d..982bf48de060 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -556,7 +556,8 @@ var BrowserApp = { let ms = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService); let mimeInfo = ms.getFromTypeAndExtension("application/pdf", "pdf"); - let webBrowserPrint = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebBrowserPrint); + let webBrowserPrint = aBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebBrowserPrint); let cancelable = { cancel: function (aReason) { From 04f6254c78e4c4cd4d8c0e5eb2436b66a5cffe1f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 18 Jan 2012 16:10:06 -0500 Subject: [PATCH 03/13] Bug 713427. Don't assume things about lazy frame construction bits that just aren't true when doing IsVisible() testing. r=tnikkel --- .../libeditor/base/crashtests/713427-1.html | 9 ++++ .../libeditor/base/crashtests/713427-2.xhtml | 28 ++++++++++++ .../libeditor/base/crashtests/crashtests.list | 2 + editor/libeditor/base/nsEditor.cpp | 43 +++++++++++-------- 4 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 editor/libeditor/base/crashtests/713427-1.html create mode 100644 editor/libeditor/base/crashtests/713427-2.xhtml diff --git a/editor/libeditor/base/crashtests/713427-1.html b/editor/libeditor/base/crashtests/713427-1.html new file mode 100644 index 000000000000..21da24693aad --- /dev/null +++ b/editor/libeditor/base/crashtests/713427-1.html @@ -0,0 +1,9 @@ + + +
+ + + +
+ + diff --git a/editor/libeditor/base/crashtests/713427-2.xhtml b/editor/libeditor/base/crashtests/713427-2.xhtml new file mode 100644 index 000000000000..b04a5d7736a2 --- /dev/null +++ b/editor/libeditor/base/crashtests/713427-2.xhtml @@ -0,0 +1,28 @@ + + + + + + + diff --git a/editor/libeditor/base/crashtests/crashtests.list b/editor/libeditor/base/crashtests/crashtests.list index 054f51183cf2..3bc98101d0aa 100644 --- a/editor/libeditor/base/crashtests/crashtests.list +++ b/editor/libeditor/base/crashtests/crashtests.list @@ -8,3 +8,5 @@ load 459613.html load 475132-1.xhtml asserts-if(!Android,1) load 633709.xhtml # Bug 695364 asserts-if(!Android,6) load 636074-1.html # Bug 439258, charged to the wrong test due to bug 635550 +load 713427-1.html +load 713427-2.xhtml diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index a0496f7782fe..ae368b0dee9b 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -3605,32 +3605,37 @@ IsElementVisible(dom::Element* aElement) nsIContent *cur = aElement; for (; ;) { + // Walk up the tree looking for the nearest ancestor with a frame. + // The state of the child right below it will determine whether + // we might possibly have a frame or not. + bool haveLazyBitOnChild = cur->HasFlag(NODE_NEEDS_FRAME); cur = cur->GetFlattenedTreeParent(); if (!cur) { - // None of our ancestors have lazy bits set, so we shouldn't have a frame - return false; + if (!haveLazyBitOnChild) { + // None of our ancestors have lazy bits set, so we shouldn't + // have a frame + return false; + } + + // The root has a lazy frame construction bit. We need to check + // our style. + break; } if (cur->GetPrimaryFrame()) { - // None of our ancestors up to the nearest ancestor with a frame have - // lazy bits; that means we won't get a frame - return false; - } - - if (cur->HasFlag(NODE_NEEDS_FRAME)) { - // Double-check that the parent doesn't have a leaf frame - nsIContent *parent = cur->GetFlattenedTreeParent(); - if (parent) { - NS_ASSERTION(parent->GetPrimaryFrame(), - "Why does our parent not have a frame?"); - if (parent->GetPrimaryFrame()->IsLeaf()) { - // No frame for us - return false; - } + if (!haveLazyBitOnChild) { + // Our ancestor directly under |cur| doesn't have lazy bits; + // that means we won't get a frame + return false; } - // |cur| will get a frame sometime. What does that mean for us? - // |We have to figure that out! + if (cur->GetPrimaryFrame()->IsLeaf()) { + // Nothing under here will ever get frames + return false; + } + + // Otherwise, we might end up with a frame when that lazy bit is + // processed. Figure out our actual style. break; } } From a708223dfb646dc0d8860b14d57dbe647725e38a Mon Sep 17 00:00:00 2001 From: Jignesh Kakadiya Date: Wed, 18 Jan 2012 16:10:06 -0500 Subject: [PATCH 04/13] Bug 717066 - Make nsGenericHTMLElement::GetLayoutHistoryAndKey return void. r=ms2ger --- .../html/content/src/nsGenericHTMLElement.cpp | 31 +++++++------------ .../html/content/src/nsGenericHTMLElement.h | 10 +++--- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index c6dfd5be2781..67123b86e777 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1551,9 +1551,8 @@ nsGenericHTMLElement::GetPrimaryPresState(nsGenericHTMLElement* aContent, nsresult result = NS_OK; - nsCOMPtr history; nsCAutoString key; - GetLayoutHistoryAndKey(aContent, false, getter_AddRefs(history), key); + nsCOMPtr history = GetLayoutHistoryAndKey(aContent, false, key); if (history) { // Get the pres state for this key, if it doesn't exist, create one @@ -1568,10 +1567,9 @@ nsGenericHTMLElement::GetPrimaryPresState(nsGenericHTMLElement* aContent, } -nsresult +already_AddRefed nsGenericHTMLElement::GetLayoutHistoryAndKey(nsGenericHTMLElement* aContent, bool aRead, - nsILayoutHistoryState** aHistory, nsACString& aKey) { // @@ -1579,20 +1577,19 @@ nsGenericHTMLElement::GetLayoutHistoryAndKey(nsGenericHTMLElement* aContent, // nsCOMPtr doc = aContent->GetDocument(); if (!doc) { - return NS_OK; + return nsnull; } // // Get the history (don't bother with the key if the history is not there) // - *aHistory = doc->GetLayoutHistoryState().get(); - if (!*aHistory) { - return NS_OK; + nsCOMPtr history = doc->GetLayoutHistoryState(); + if (!history) { + return nsnull; } - if (aRead && !(*aHistory)->HasStates()) { - NS_RELEASE(*aHistory); - return NS_OK; + if (aRead && !history->HasStates()) { + return nsnull; } // @@ -1602,31 +1599,27 @@ nsGenericHTMLElement::GetLayoutHistoryAndKey(nsGenericHTMLElement* aContent, nsIStatefulFrame::eNoID, aKey); if (NS_FAILED(rv)) { - NS_RELEASE(*aHistory); - return rv; + return nsnull; } // If the state key is blank, this is anonymous content or for // whatever reason we are not supposed to save/restore state. if (aKey.IsEmpty()) { - NS_RELEASE(*aHistory); - return NS_OK; + return nsnull; } // Add something unique to content so layout doesn't muck us up aKey += "-C"; - return rv; + return history.forget(); } bool nsGenericHTMLElement::RestoreFormControlState(nsGenericHTMLElement* aContent, nsIFormControl* aControl) { - nsCOMPtr history; nsCAutoString key; - GetLayoutHistoryAndKey(aContent, true, - getter_AddRefs(history), key); + nsCOMPtr history = GetLayoutHistoryAndKey(aContent, true, key); if (!history) { return false; } diff --git a/content/html/content/src/nsGenericHTMLElement.h b/content/html/content/src/nsGenericHTMLElement.h index 8a6bdc4155fa..7e8a0c68f612 100644 --- a/content/html/content/src/nsGenericHTMLElement.h +++ b/content/html/content/src/nsGenericHTMLElement.h @@ -471,10 +471,10 @@ public: * @param aState the history state object (out param) * @param aKey the key (out param) */ - static nsresult GetLayoutHistoryAndKey(nsGenericHTMLElement* aContent, - bool aRead, - nsILayoutHistoryState** aState, - nsACString& aKey); + static already_AddRefed + GetLayoutHistoryAndKey(nsGenericHTMLElement* aContent, + bool aRead, + nsACString& aKey); /** * Restore the state for a form control. Ends up calling * nsIFormControl::RestoreState(). @@ -869,7 +869,7 @@ public: { return NS_OK; } - + virtual bool RestoreState(nsPresState* aState) { return false; From 2751128160fdc21c9543b63f7e8288b758518502 Mon Sep 17 00:00:00 2001 From: Till Schneidereit Date: Wed, 18 Jan 2012 16:10:39 -0500 Subject: [PATCH 05/13] Bug 718518. Remove in-tree uses of the nonstandard third argument to String.prototype.replace. r=dcamp,jgriffin,dao,ted,dtownsend --- browser/devtools/styleinspector/CssRuleView.jsm | 2 +- services/sync/tps/extensions/tps/modules/tps.jsm | 2 +- toolkit/content/LightweightThemeConsumer.jsm | 2 +- toolkit/content/tests/chrome/test_bug253481.xul | 6 +++--- toolkit/crashreporter/CrashSubmit.jsm | 2 +- toolkit/mozapps/extensions/AddonRepository.jsm | 4 ++-- toolkit/mozapps/extensions/XPIProvider.jsm | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/browser/devtools/styleinspector/CssRuleView.jsm b/browser/devtools/styleinspector/CssRuleView.jsm index 9b523ee1d9de..50d28596b689 100644 --- a/browser/devtools/styleinspector/CssRuleView.jsm +++ b/browser/devtools/styleinspector/CssRuleView.jsm @@ -1271,7 +1271,7 @@ InplaceEditor.prototype = { // Replace spaces with non-breaking spaces. Otherwise setting // the span's textContent will collapse spaces and the measurement // will be wrong. - this._measurement.textContent = this.input.value.replace(' ', '\u00a0', 'g'); + this._measurement.textContent = this.input.value.replace(/ /g, '\u00a0'); // We add a bit of padding to the end. Should be enough to fit // any letter that could be typed, otherwise we'll scroll before diff --git a/services/sync/tps/extensions/tps/modules/tps.jsm b/services/sync/tps/extensions/tps/modules/tps.jsm index e53184ea31eb..218116017643 100644 --- a/services/sync/tps/extensions/tps/modules/tps.jsm +++ b/services/sync/tps/extensions/tps/modules/tps.jsm @@ -648,7 +648,7 @@ let TPS = .createInstance(CI.nsILocalFile); if (hh.oscpu.toLowerCase().indexOf('windows') > -1) { let re = /\/(\w)\/(.*)/; - this.config.testdir = this.config.testdir.replace(re, "$1://$2").replace("/", "\\", "g"); + this.config.testdir = this.config.testdir.replace(re, "$1://$2").replace(/\//g, "\\"); } mozmillfile.initWithPath(this.config.testdir); mozmillfile.appendRelativePath(testfile); diff --git a/toolkit/content/LightweightThemeConsumer.jsm b/toolkit/content/LightweightThemeConsumer.jsm index 758cc9a0ca45..0e9ce2c7fa4f 100644 --- a/toolkit/content/LightweightThemeConsumer.jsm +++ b/toolkit/content/LightweightThemeConsumer.jsm @@ -108,7 +108,7 @@ LightweightThemeConsumer.prototype = { function _setImage(aElement, aActive, aURL) { aElement.style.backgroundImage = - (aActive && aURL) ? 'url("' + aURL.replace('"', '\\"', "g") + '")' : ""; + (aActive && aURL) ? 'url("' + aURL.replace(/"/g, '\\"') + '")' : ""; } function _parseRGB(aColorString) { diff --git a/toolkit/content/tests/chrome/test_bug253481.xul b/toolkit/content/tests/chrome/test_bug253481.xul index 12662cb74413..8567bce21320 100644 --- a/toolkit/content/tests/chrome/test_bug253481.xul +++ b/toolkit/content/tests/chrome/test_bug253481.xul @@ -56,11 +56,11 @@ var expectedResults = { // "pastetofirst" strips leading newlines "pastetofirst": testString.replace(/^\n/, '').split(/\n/)[0], // "replacewithspaces" strips trailing newlines first - bug 432415 -"replacewithspaces": testString.replace(/\n$/, '').replace('\n',' ','g'), +"replacewithspaces": testString.replace(/\n$/, '').replace(/\n/g,' '), // "strip" is pretty straightforward -"strip": testString.replace('\n','','g'), +"strip": testString.replace(/\n/g,''), // "replacewithcommas" strips leading and trailing newlines first -"replacewithcommas": testString.replace(/^\n/, '').replace(/\n$/, '').replace('\n',',','g'), +"replacewithcommas": testString.replace(/^\n/, '').replace(/\n$/, '').replace(/\n/g,','), // "stripsurroundingwhitespace" strips all newlines and whitespace around them "stripsurroundingwhitespace": testString.replace(/\s*\n\s*/g,'') }; diff --git a/toolkit/crashreporter/CrashSubmit.jsm b/toolkit/crashreporter/CrashSubmit.jsm index 6d60e5398619..558478d2fd16 100644 --- a/toolkit/crashreporter/CrashSubmit.jsm +++ b/toolkit/crashreporter/CrashSubmit.jsm @@ -67,7 +67,7 @@ function parseKeyValuePairs(text) { let [key, value] = [lines[i].substring(0, eq), lines[i].substring(eq + 1)]; if (key && value) - data[key] = value.replace("\\n", "\n", "g").replace("\\\\", "\\", "g"); + data[key] = value.replace(/\\n/g, "\n").replace(/\\\\/g, "\\"); } } return data; diff --git a/toolkit/mozapps/extensions/AddonRepository.jsm b/toolkit/mozapps/extensions/AddonRepository.jsm index 11573851fcfc..9f89575da1f7 100644 --- a/toolkit/mozapps/extensions/AddonRepository.jsm +++ b/toolkit/mozapps/extensions/AddonRepository.jsm @@ -148,14 +148,14 @@ function convertHTMLToPlainText(html) { var input = Cc["@mozilla.org/supports-string;1"]. createInstance(Ci.nsISupportsString); - input.data = html.replace("\n", "
", "g"); + input.data = html.replace(/\n/g, "
"); var output = {}; converter.convert("text/html", input, input.data.length, "text/unicode", output, {}); if (output.value instanceof Ci.nsISupportsString) - return output.value.data.replace("\r\n", "\n", "g"); + return output.value.data.replace(/\r\n/g, "\n"); return html; } diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm index 530add649a09..517f8a68855a 100644 --- a/toolkit/mozapps/extensions/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/XPIProvider.jsm @@ -828,8 +828,8 @@ function loadManifestFromRDF(aUri, aStream) { let byte_string = [String.fromCharCode(byte) for each (byte in bytes)] .join(""); // Base64 encode - addon.syncGUID = btoa(byte_string).replace('+', '-', 'g') - .replace('/', '_', 'g'); + addon.syncGUID = btoa(byte_string).replace(/\+/g, '-') + .replace(/\//g, '_'); return addon; } From 1d96b605569f20808084541011d3501f9fa93053 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Wed, 18 Jan 2012 21:18:10 +0000 Subject: [PATCH 06/13] bug 718513 - [dwrite] implement synthetic bolding for fonts loaded via @font-face with src:local(). r=bas --- gfx/thebes/gfxDWriteFontList.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 3cab64ec363d..5c3c8dfca375 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -431,6 +431,36 @@ gfxDWriteFontEntry::CreateFontFace(IDWriteFontFace **aFontFace, HRESULT hr; if (mFont) { hr = mFont->CreateFontFace(aFontFace); + if (SUCCEEDED(hr) && (aSimulations & DWRITE_FONT_SIMULATIONS_BOLD) && + !((*aFontFace)->GetSimulations() & DWRITE_FONT_SIMULATIONS_BOLD)) { + // need to replace aFontFace with a version that has the Bold + // simulation - unfortunately, DWrite doesn't provide a simple API + // for this + nsRefPtr origFace = (*aFontFace); + (*aFontFace)->Release(); + *aFontFace = NULL; + UINT32 numberOfFiles = 0; + hr = origFace->GetFiles(&numberOfFiles, NULL); + if (FAILED(hr)) { + return NS_ERROR_FAILURE; + } + nsAutoTArray files; + files.AppendElements(numberOfFiles); + hr = origFace->GetFiles(&numberOfFiles, files.Elements()); + if (FAILED(hr)) { + return NS_ERROR_FAILURE; + } + hr = gfxWindowsPlatform::GetPlatform()->GetDWriteFactory()-> + CreateFontFace(origFace->GetType(), + numberOfFiles, + files.Elements(), + origFace->GetIndex(), + aSimulations, + aFontFace); + for (UINT32 i = 0; i < numberOfFiles; ++i) { + files[i]->Release(); + } + } } else if (mFontFile) { IDWriteFontFile *fontFile = mFontFile.get(); hr = gfxWindowsPlatform::GetPlatform()->GetDWriteFactory()-> From f37ba5fbc21f1631ddf219763caab169d4716518 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Wed, 18 Jan 2012 21:18:11 +0000 Subject: [PATCH 07/13] bug 718513 - reftest for synthetic bolding of src:local() font. r=bas --- layout/reftests/text/reftest.list | 1 + .../text/synthetic-bold-papyrus-01-ref.html | 23 +++++++++++++++ .../text/synthetic-bold-papyrus-01.html | 28 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 layout/reftests/text/synthetic-bold-papyrus-01-ref.html create mode 100644 layout/reftests/text/synthetic-bold-papyrus-01.html diff --git a/layout/reftests/text/reftest.list b/layout/reftests/text/reftest.list index 49e5b803a21f..3efb1cc4f760 100644 --- a/layout/reftests/text/reftest.list +++ b/layout/reftests/text/reftest.list @@ -50,6 +50,7 @@ skip-if(!(d2d||cocoaWidget)) random-if(d2d) != subpixel-glyphs-x-2a.html subpixe == subpixel-lineheight-1a.html subpixel-lineheight-1b.html == swash-1.html swash-1-ref.html HTTP(..) != synthetic-bold-metrics-01.html synthetic-bold-metrics-01-notref.html +== synthetic-bold-papyrus-01.html synthetic-bold-papyrus-01-ref.html # Tests for text-align-last == text-align-last-start.html text-align-last-start-ref.html == text-align-last-end.html text-align-last-end-ref.html diff --git a/layout/reftests/text/synthetic-bold-papyrus-01-ref.html b/layout/reftests/text/synthetic-bold-papyrus-01-ref.html new file mode 100644 index 000000000000..38c7dbc38d01 --- /dev/null +++ b/layout/reftests/text/synthetic-bold-papyrus-01-ref.html @@ -0,0 +1,23 @@ + + + +Test + + + + + + + +

Test for Papyrus font within a bold tag.

+ + + diff --git a/layout/reftests/text/synthetic-bold-papyrus-01.html b/layout/reftests/text/synthetic-bold-papyrus-01.html new file mode 100644 index 000000000000..1784fc7073f4 --- /dev/null +++ b/layout/reftests/text/synthetic-bold-papyrus-01.html @@ -0,0 +1,28 @@ + + + +Test + + + + + + + +

Test for Papyrus font within a bold tag.

+ + + From 3ba2497f763e0d2a4d19c94df56c8d15429e21a0 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 18 Jan 2012 13:22:12 -0800 Subject: [PATCH 08/13] Bug 718679 - ipToString in nsWifiWorker.js uses wrong byte order, r=mrbkap --- dom/wifi/nsWifiWorker.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/wifi/nsWifiWorker.js b/dom/wifi/nsWifiWorker.js index 14586abaddd6..32784a7e23b9 100644 --- a/dom/wifi/nsWifiWorker.js +++ b/dom/wifi/nsWifiWorker.js @@ -757,10 +757,10 @@ var WifiManager = (function() { } function ipToString(n) { - return String((n & (0xff << 24)) >> 24) + "." + - ((n & (0xff << 16)) >> 16) + "." + - ((n & (0xff << 8)) >> 8) + "." + - ((n & (0xff << 0)) >> 0); + return String((n >> 0) & 0xFF) + "." + + ((n >> 8) & 0xFF) + "." + + ((n >> 16) & 0xFF) + "." + + ((n >> 24) & 0xFF); } manager.enableNetwork = function(netId, disableOthers, callback) { From 699c871905f014adbfdee705a50798de2f43a6e0 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 18 Jan 2012 13:22:12 -0800 Subject: [PATCH 09/13] Bug 718631 - Fix Gonk build after bug 598482, r=cjones --- widget/gonk/nsWindow.cpp | 21 ++++----------------- widget/gonk/nsWindow.h | 4 +--- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 5d6c58c5c742..c4b0cccdf089 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -296,8 +296,7 @@ nsWindow::ConfigureChildren(const nsTArray&) } NS_IMETHODIMP -nsWindow::Invalidate(const nsIntRect &aRect, - bool aIsSynchronous) +nsWindow::Invalidate(const nsIntRect &aRect) { nsWindow *parent = mParent; while (parent && parent != sTopWindows[0]) @@ -307,20 +306,8 @@ nsWindow::Invalidate(const nsIntRect &aRect, mDirtyRegion.Or(mDirtyRegion, aRect); gWindowToRedraw = this; - if (aIsSynchronous) { - gDrawRequest = false; - DoDraw(); - } else { - gDrawRequest = true; - mozilla::NotifyEvent(); - } - return NS_OK; -} - -NS_IMETHODIMP -nsWindow::Update() -{ - Invalidate(gScreenBounds, false); + gDrawRequest = true; + mozilla::NotifyEvent(); return NS_OK; } @@ -442,7 +429,7 @@ nsWindow::BringToTop() nsGUIEvent event(true, NS_ACTIVATE, this); (*mEventCallback)(&event); - Update(); + Invalidate(gScreenBounds); } void diff --git a/widget/gonk/nsWindow.h b/widget/gonk/nsWindow.h index ac899962667d..5bd12a962c0b 100644 --- a/widget/gonk/nsWindow.h +++ b/widget/gonk/nsWindow.h @@ -98,9 +98,7 @@ public: NS_IMETHOD IsEnabled(bool *aState); NS_IMETHOD SetFocus(bool aRaise = false); NS_IMETHOD ConfigureChildren(const nsTArray&); - NS_IMETHOD Invalidate(const nsIntRect &aRect, - bool aIsSynchronous); - NS_IMETHOD Update(); + NS_IMETHOD Invalidate(const nsIntRect &aRect); virtual void* GetNativeData(PRUint32 aDataType); NS_IMETHOD SetTitle(const nsAString& aTitle) { From 9e025c5063e72c461ee11592618dd392fd9df588 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Tue, 17 Jan 2012 02:55:25 -0800 Subject: [PATCH 10/13] Bug 708191 - Don't draw when the screen is off on gonk, r=cjones --- widget/gonk/nsWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index c4b0cccdf089..ef2512e6194c 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -41,6 +41,7 @@ #include "android/log.h" #include "ui/FramebufferNativeWindow.h" +#include "mozilla/Hal.h" #include "Framebuffer.h" #include "gfxContext.h" #include "gfxUtils.h" @@ -101,6 +102,11 @@ nsWindow::~nsWindow() void nsWindow::DoDraw(void) { + if (!hal::GetScreenEnabled()) { + gDrawRequest = true; + return; + } + if (!gWindowToRedraw) { LOG(" no window to draw, bailing"); return; From b26075ab70d126d774536f9b9f96a50273472a59 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Wed, 18 Jan 2012 16:33:42 -0500 Subject: [PATCH 11/13] Bug 545015 - Attempt to work around the configure breakage on Windows 7 with errors about not being able to write to conftest.exe; r=ted --- configure.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.in b/configure.in index f3e153cc9617..dfbdc396b015 100644 --- a/configure.in +++ b/configure.in @@ -566,6 +566,11 @@ if test -n "$CROSS_COMPILE" -a "$target" != "$host"; then AC_DEFINE(CROSS_COMPILE) else AC_PROG_CC + case "$target" in + *-mingw*) + # Work around the conftest.exe access problem on Windows + sleep 1 + esac AC_PROG_CXX AC_PROG_RANLIB MOZ_PATH_PROGS(AS, $AS as, $CC) From 891396a8af4eb8c29b5cf307f7fb94837aa51f31 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Fri, 6 Jan 2012 09:36:49 -0800 Subject: [PATCH 12/13] Remove tracer bits from InterpMode (no bug, r=dvander) --HG-- extra : rebase_source : a7d4938398584a21daa369bf6409decd647ac295 --- js/src/jsinterp.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/src/jsinterp.h b/js/src/jsinterp.h index c26b412ba8f7..c4cf50081e6c 100644 --- a/js/src/jsinterp.h +++ b/js/src/jsinterp.h @@ -215,10 +215,8 @@ Execute(JSContext *cx, JSScript *script, JSObject &scopeChain, Value *rval); enum InterpMode { JSINTERP_NORMAL = 0, /* interpreter is running normally */ - JSINTERP_RECORD = 1, /* interpreter has been started to record/run traces */ - JSINTERP_PROFILE = 2, /* interpreter should profile a loop */ - JSINTERP_REJOIN = 3, /* as normal, but the frame has already started */ - JSINTERP_SKIP_TRAP = 4 /* as REJOIN, but skip trap at first opcode */ + JSINTERP_REJOIN = 1, /* as normal, but the frame has already started */ + JSINTERP_SKIP_TRAP = 2 /* as REJOIN, but skip trap at first opcode */ }; /* From 96369eaeb160c2f05b258e8ef48c4a5dd6ea06e9 Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Wed, 18 Jan 2012 17:50:30 -0500 Subject: [PATCH 13/13] Bug 719239 - Gecko Profiler: Stackwalk feature isn't reported properly. r=ehsan --- tools/profiler/sps/TableTicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/profiler/sps/TableTicker.cpp b/tools/profiler/sps/TableTicker.cpp index c12880d9b5b3..1c701d7b7ee4 100644 --- a/tools/profiler/sps/TableTicker.cpp +++ b/tools/profiler/sps/TableTicker.cpp @@ -592,7 +592,7 @@ char* mozilla_sampler_get_profile() const char** mozilla_sampler_get_features() { static const char* features[] = { -#if defined(MOZ_PROFILING) && defined(USE_BACKTRACE) +#if defined(MOZ_PROFILING) && (defined(USE_BACKTRACE) || defined(USE_NS_STACKWALK)) "stackwalk", #endif NULL