diff --git a/accessible/src/base/AccEvent.cpp b/accessible/src/base/AccEvent.cpp index 661a8d46d147..e28cdfecb625 100644 --- a/accessible/src/base/AccEvent.cpp +++ b/accessible/src/base/AccEvent.cpp @@ -12,6 +12,7 @@ #include "States.h" #include "nsEventStateManager.h" +#include "mozilla/Selection.h" using namespace mozilla; using namespace mozilla::a11y; @@ -126,13 +127,22 @@ AccShowEvent:: //////////////////////////////////////////////////////////////////////////////// AccTextSelChangeEvent::AccTextSelChangeEvent(HyperTextAccessible* aTarget, - nsISelection* aSelection) : + Selection* aSelection, + int32_t aReason) : AccEvent(nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED, aTarget, eAutoDetect, eCoalesceTextSelChange), - mSel(aSelection) {} + mSel(aSelection), mReason(aReason) {} AccTextSelChangeEvent::~AccTextSelChangeEvent() { } +bool +AccTextSelChangeEvent::IsCaretMoveOnly() const +{ + return mSel->GetRangeCount() == 1 && mSel->IsCollapsed() && + ((mReason & (nsISelectionListener::COLLAPSETOSTART_REASON | + nsISelectionListener::COLLAPSETOEND_REASON)) == 0); +} + //////////////////////////////////////////////////////////////////////////////// // AccSelChangeEvent //////////////////////////////////////////////////////////////////////////////// diff --git a/accessible/src/base/AccEvent.h b/accessible/src/base/AccEvent.h index 10a9e0ce9b0c..15a48be201d1 100644 --- a/accessible/src/base/AccEvent.h +++ b/accessible/src/base/AccEvent.h @@ -10,9 +10,10 @@ #include "mozilla/a11y/Accessible.h" -class nsISelection; - namespace mozilla { + +class Selection; + namespace a11y { class DocAccessible; @@ -366,7 +367,8 @@ private: class AccTextSelChangeEvent : public AccEvent { public: - AccTextSelChangeEvent(HyperTextAccessible* aTarget, nsISelection* aSelection); + AccTextSelChangeEvent(HyperTextAccessible* aTarget, Selection* aSelection, + int32_t aReason); virtual ~AccTextSelChangeEvent(); // AccEvent @@ -376,8 +378,16 @@ public: return AccEvent::GetEventGroups() | (1U << eTextSelChangeEvent); } + // AccTextSelChangeEvent + + /** + * Return true if the text selection change wasn't caused by pure caret move. + */ + bool IsCaretMoveOnly() const; + private: - nsCOMPtr mSel; + nsRefPtr mSel; + int32_t mReason; friend class EventQueue; friend class SelectionManager; diff --git a/accessible/src/base/Logging.cpp b/accessible/src/base/Logging.cpp index 435b79f358b1..330581b16c7b 100644 --- a/accessible/src/base/Logging.cpp +++ b/accessible/src/base/Logging.cpp @@ -582,7 +582,8 @@ logging::FocusDispatched(Accessible* aTarget) } void -logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument) +logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument, + int16_t aReason) { nsCOMPtr privSel(do_QueryInterface(aSelection)); @@ -598,8 +599,10 @@ logging::SelChange(nsISelection* aSelection, DocAccessible* aDocument) strType = "unknown"; bool isIgnored = !aDocument || !aDocument->IsContentLoaded(); - printf("\nSelection changed, selection type: %s, notification %s\n", - strType, (isIgnored ? "ignored" : "pending")); + printf("\nSelection changed, selection type: %s, notification %s, reason: %d\n", + strType, (isIgnored ? "ignored" : "pending"), aReason); + + Stack(); } void diff --git a/accessible/src/base/Logging.h b/accessible/src/base/Logging.h index 35705bd90718..09fc7767ee25 100644 --- a/accessible/src/base/Logging.h +++ b/accessible/src/base/Logging.h @@ -118,7 +118,8 @@ void FocusDispatched(Accessible* aTarget); /** * Log the selection change. */ -void SelChange(nsISelection* aSelection, DocAccessible* aDocument); +void SelChange(nsISelection* aSelection, DocAccessible* aDocument, + int16_t aReason); /** * Log the message ('title: text' format) on new line. Print the start and end diff --git a/accessible/src/base/SelectionManager.cpp b/accessible/src/base/SelectionManager.cpp index 5ea58d4bdc60..afc556b286e7 100644 --- a/accessible/src/base/SelectionManager.cpp +++ b/accessible/src/base/SelectionManager.cpp @@ -14,13 +14,23 @@ #include "nsIAccessibleTypes.h" #include "nsIDOMDocument.h" #include "nsIPresShell.h" -#include "nsISelectionPrivate.h" #include "mozilla/Selection.h" #include "mozilla/dom/Element.h" using namespace mozilla; using namespace mozilla::a11y; +struct mozilla::a11y::SelData +{ + SelData(Selection* aSel, int32_t aReason) : + mSel(aSel), mReason(aReason) {} + + nsRefPtr mSel; + int16_t mReason; + + NS_INLINE_DECL_REFCOUNTING(SelData); +}; + void SelectionManager::ClearControlSelectionListener() { @@ -110,17 +120,16 @@ SelectionManager::RemoveDocSelectionListener(nsIPresShell* aPresShell) void SelectionManager::ProcessTextSelChangeEvent(AccEvent* aEvent) { + // Fire selection change event if it's not pure caret-move selection change, + // i.e. the accessible has or had not collapsed selection. AccTextSelChangeEvent* event = downcast_accEvent(aEvent); - Selection* sel = static_cast(event->mSel.get()); - - // Fire selection change event if it's not pure caret-move selection change. - if (sel->GetRangeCount() != 1 || !sel->IsCollapsed()) + if (!event->IsCaretMoveOnly()) nsEventShell::FireEvent(aEvent); // Fire caret move event if there's a caret in the selection. nsINode* caretCntrNode = - nsCoreUtils::GetDOMNodeFromDOMPoint(sel->GetFocusNode(), - sel->FocusOffset()); + nsCoreUtils::GetDOMNodeFromDOMPoint(event->mSel->GetFocusNode(), + event->mSel->FocusOffset()); if (!caretCntrNode) return; @@ -150,7 +159,7 @@ SelectionManager::NotifySelectionChanged(nsIDOMDocument* aDOMDocument, #ifdef A11Y_LOG if (logging::IsEnabled(logging::eSelection)) - logging::SelChange(aSelection, document); + logging::SelChange(aSelection, document, aReason); #endif // Don't fire events until document is loaded. @@ -158,17 +167,19 @@ SelectionManager::NotifySelectionChanged(nsIDOMDocument* aDOMDocument, // Selection manager has longer lifetime than any document accessible, // so that we are guaranteed that the notification is processed before // the selection manager is destroyed. - document->HandleNotification - (this, &SelectionManager::ProcessSelectionChanged, aSelection); + nsRefPtr selData = + new SelData(static_cast(aSelection), aReason); + document->HandleNotification + (this, &SelectionManager::ProcessSelectionChanged, selData); } return NS_OK; } void -SelectionManager::ProcessSelectionChanged(nsISelection* aSelection) +SelectionManager::ProcessSelectionChanged(SelData* aSelData) { - Selection* selection = static_cast(aSelection); + Selection* selection = aSelData->mSel; if (!selection->GetPresShell()) return; @@ -176,11 +187,12 @@ SelectionManager::ProcessSelectionChanged(nsISelection* aSelection) nsINode* cntrNode = nullptr; if (range) cntrNode = range->GetCommonAncestor(); + if (!cntrNode) { cntrNode = selection->GetFrameSelection()->GetAncestorLimiter(); if (!cntrNode) { cntrNode = selection->GetPresShell()->GetDocument(); - NS_ASSERTION(selection->GetPresShell()->ConstFrameSelection() == selection->GetFrameSelection(), + NS_ASSERTION(aSelData->mSel->GetPresShell()->ConstFrameSelection() == selection->GetFrameSelection(), "Wrong selection container was used!"); } } @@ -192,7 +204,8 @@ SelectionManager::ProcessSelectionChanged(nsISelection* aSelection) } if (selection->GetType() == nsISelectionController::SELECTION_NORMAL) { - nsRefPtr event = new AccTextSelChangeEvent(text, aSelection); + nsRefPtr event = + new AccTextSelChangeEvent(text, selection, aSelData->mReason); text->Document()->FireDelayedEvent(event); } else if (selection->GetType() == nsISelectionController::SELECTION_SPELLCHECK) { diff --git a/accessible/src/base/SelectionManager.h b/accessible/src/base/SelectionManager.h index 7d2f5c6fff85..1fc9b28b1063 100644 --- a/accessible/src/base/SelectionManager.h +++ b/accessible/src/base/SelectionManager.h @@ -38,6 +38,8 @@ class AccEvent; * selection change events. */ +struct SelData; + class SelectionManager : public nsISelectionListener { public: @@ -83,7 +85,7 @@ protected: /** * Process DOM selection change. Fire selection and caret move events. */ - void ProcessSelectionChanged(nsISelection* aSelection); + void ProcessSelectionChanged(SelData* aSelData); private: // Currently focused control. diff --git a/accessible/src/jsat/EventManager.jsm b/accessible/src/jsat/EventManager.jsm index a67192ea98eb..5774ab7e234a 100644 --- a/accessible/src/jsat/EventManager.jsm +++ b/accessible/src/jsat/EventManager.jsm @@ -155,12 +155,18 @@ this.EventManager.prototype = { let event = aEvent. QueryInterface(Ci.nsIAccessibleVirtualCursorChangeEvent); let reason = event.reason; + let oldAccessible = event.oldAccessible; + + if (oldAccessible && oldAccessible.role == Roles.INTERNAL_FRAME) { + let mm = Utils.getMessageManager(oldAccessible.DOMNode); + mm.sendAsyncMessage('AccessFu:ClearCursor', {}); + } if (this.editState.editing) { aEvent.accessibleDocument.takeFocus(); } this.present( - Presentation.pivotChanged(position, event.oldAccessible, reason, + Presentation.pivotChanged(position, oldAccessible, reason, pivot.startOffset, pivot.endOffset)); break; @@ -184,7 +190,7 @@ this.EventManager.prototype = { } case Events.SCROLLING_START: { - let vc = Utils.getVirtualCursor(aEvent.accessibleDocument); + let vc = Utils.getVirtualCursor(this.contentScope.content.document); vc.moveNext(TraversalRules.Simple, aEvent.accessible, true); break; } @@ -275,7 +281,7 @@ this.EventManager.prototype = { let doc = aEvent.accessibleDocument; if (acc.role != Roles.DOCUMENT && doc.role != Roles.CHROME_WINDOW) { this.contentScope.content.clearTimeout(this._autoMove); - let vc = Utils.getVirtualCursor(doc); + let vc = Utils.getVirtualCursor(this.contentScope.content.document); vc.moveNext(TraversalRules.Simple, acc, true); } break; @@ -283,7 +289,7 @@ this.EventManager.prototype = { case Events.DOCUMENT_LOAD_COMPLETE: { this._autoMove = this.contentScope.content.setTimeout(() => { - Utils.getVirtualCursor(aEvent.accessibleDocument) + Utils.getVirtualCursor(this.contentScope.content.document) .moveNext(TraversalRules.Simple, aEvent.accessible, true); }, 500); break; diff --git a/accessible/src/jsat/content-script.js b/accessible/src/jsat/content-script.js index 953fc24b4ea8..a61f68934a6a 100644 --- a/accessible/src/jsat/content-script.js +++ b/accessible/src/jsat/content-script.js @@ -27,6 +27,15 @@ Logger.debug('content-script.js'); let eventManager = null; +function clearCursor(aMessage) { + try { + Utils.getVirtualCursor(content.document).position = null; + forwardToChild(aMessage); + } catch (x) { + Logger.logException(x); + } +} + function moveCursor(aMessage) { if (Logger.logLevel >= Logger.DEBUG) { Logger.debug(aMessage.name, JSON.stringify(aMessage.json, null, ' ')); @@ -144,7 +153,11 @@ function forwardToChild(aMessage, aListener, aVCPosition) { } let mm = Utils.getMessageManager(acc.DOMNode); - mm.addMessageListener(aMessage.name, aListener); + + if (aListener) { + mm.addMessageListener(aMessage.name, aListener); + } + // XXX: This is a silly way to make a deep copy let newJSON = JSON.parse(JSON.stringify(aMessage.json)); newJSON.origin = 'parent'; @@ -381,6 +394,7 @@ addMessageListener( addMessageListener('AccessFu:AdjustRange', adjustRange); addMessageListener('AccessFu:MoveCaret', moveCaret); addMessageListener('AccessFu:MoveByGranularity', moveByGranularity); + addMessageListener('AccessFu:ClearCursor', clearCursor); if (!eventManager) { eventManager = new EventManager(this); @@ -401,6 +415,7 @@ addMessageListener( removeMessageListener('AccessFu:Scroll', scroll); removeMessageListener('AccessFu:MoveCaret', moveCaret); removeMessageListener('AccessFu:MoveByGranularity', moveByGranularity); + removeMessageListener('AccessFu:ClearCursor', clearCursor); eventManager.stop(); }); diff --git a/accessible/src/windows/msaa/nsWinUtils.cpp b/accessible/src/windows/msaa/nsWinUtils.cpp index 42ad3d6076e1..bafe0d46a808 100644 --- a/accessible/src/windows/msaa/nsWinUtils.cpp +++ b/accessible/src/windows/msaa/nsWinUtils.cpp @@ -16,7 +16,7 @@ #include "nsIArray.h" #include "nsIDocument.h" #include "nsIDocShellTreeItem.h" -#include "nsIXULRuntime.h" +#include "nsXULAppAPI.h" using namespace mozilla; using namespace mozilla::a11y; @@ -59,7 +59,7 @@ nsWinUtils::MaybeStartWindowEmulation() // with tabs. if (Compatibility::IsJAWS() || Compatibility::IsWE() || Compatibility::IsDolphin() || - BrowserTabsRemote()) { + XRE_GetProcessType() == GeckoProcessType_Content) { RegisterNativeWindow(kClassNameTabContent); sHWNDCache = new nsRefPtrHashtable, DocAccessible>(4); return true; diff --git a/accessible/tests/mochitest/events.js b/accessible/tests/mochitest/events.js index 525d56d6631d..9029a7605900 100644 --- a/accessible/tests/mochitest/events.js +++ b/accessible/tests/mochitest/events.js @@ -1212,17 +1212,17 @@ function synthUpKey(aNodeOrID, aCheckerOrEventSeq, aArgs) /** * Left arrow key invoker. */ -function synthLeftKey(aNodeOrID, aCheckerOrEventSeq) +function synthLeftKey(aNodeOrID, aCheckerOrEventSeq, aArgs) { - this.__proto__ = new synthKey(aNodeOrID, "VK_LEFT", null, aCheckerOrEventSeq); + this.__proto__ = new synthKey(aNodeOrID, "VK_LEFT", aArgs, aCheckerOrEventSeq); } /** * Right arrow key invoker. */ -function synthRightKey(aNodeOrID, aCheckerOrEventSeq) +function synthRightKey(aNodeOrID, aCheckerOrEventSeq, aArgs) { - this.__proto__ = new synthKey(aNodeOrID, "VK_RIGHT", null, aCheckerOrEventSeq); + this.__proto__ = new synthKey(aNodeOrID, "VK_RIGHT", aArgs, aCheckerOrEventSeq); } /** @@ -1764,7 +1764,12 @@ function textSelectionChecker(aID, aStartOffset, aEndOffset) this.check = function textSelectionChecker_check(aEvent) { - testTextGetSelection(aID, aStartOffset, aEndOffset, 0); + if (aStartOffset == aEndOffset) { + is(getAccessible(aID, [nsIAccessibleText]).caretOffset, aStartOffset, + "Wrong collapsed selection!"); + } else { + testTextGetSelection(aID, aStartOffset, aEndOffset, 0); + } } } diff --git a/accessible/tests/mochitest/events/test_textselchange.html b/accessible/tests/mochitest/events/test_textselchange.html index 62b9ec263927..9347f7d3c697 100644 --- a/accessible/tests/mochitest/events/test_textselchange.html +++ b/accessible/tests/mochitest/events/test_textselchange.html @@ -24,19 +24,30 @@ // gA11yEventDumpID = "eventdump"; // debug stuff //gA11yEventDumpToConsole = true; + function getOnclickSeq(aID) + { + return [ + new caretMoveChecker(0, aID), + new unexpectedInvokerChecker(EVENT_TEXT_SELECTION_CHANGED, aID) + ]; + } + function doTests() { // test caret move events and caret offsets gQueue = new eventQueue(); - var onclickSeq = [ - new caretMoveChecker(0, "c1_p1"), - new unexpectedInvokerChecker(EVENT_TEXT_SELECTION_CHANGED, "c1_p1") - ]; - gQueue.push(new synthClick("c1_p1", onclickSeq)); + gQueue.push(new synthClick("c1_p1", getOnclickSeq("c1_p1"))); gQueue.push(new synthDownKey("c1", new textSelectionChecker("c1", 0, 1), { shiftKey: true })); gQueue.push(new synthDownKey("c1", new textSelectionChecker("c1", 0, 2), { shiftKey: true })); + gQueue.push(new synthClick("ta1", getOnclickSeq("ta1"))); + gQueue.push(new synthRightKey("ta1", + new textSelectionChecker("ta1", 0, 1), + { shiftKey: true })); + gQueue.push(new synthLeftKey("ta1", + new textSelectionChecker("ta1", 0, 0))); + gQueue.invoke(); // Will call SimpleTest.finish(); } @@ -52,6 +63,11 @@ title="Text selection change event has a wrong target when selection is spanned through several objects"> Bug 762934 + + Bug 956032 +

@@ -62,6 +78,8 @@
     

paragraph

+ +
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index cb949b078fda..92acb511009b 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -978,7 +978,16 @@ pref("dom.ipc.plugins.enabled.x86_64", true); pref("dom.ipc.plugins.enabled", true); #endif +#if defined(NIGHTLY_BUILD) && defined(XP_MACOSX) +// In Nightly, browser.tabs.remote is enabled on platforms that +// support OMTC. However, users won't actually get remote tabs unless +// they enable browser.tabs.remote.autostart or they use the "New OOP +// Window" menu option. +pref("browser.tabs.remote", true); +#else pref("browser.tabs.remote", false); +#endif +pref("browser.tabs.remote.autostart", false); // This pref governs whether we attempt to work around problems caused by // plugins using OS calls to manipulate the cursor while running out-of- diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 72518385787c..80522d0efe2d 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -27,6 +27,14 @@ accesskey="&newPrivateWindow.accesskey;" command="Tools:PrivateBrowsing" key="key_privatebrowsing"/> +
diff --git a/toolkit/devtools/server/actors/script.js b/toolkit/devtools/server/actors/script.js index 62ad77dc7719..945684ff0649 100644 --- a/toolkit/devtools/server/actors/script.js +++ b/toolkit/devtools/server/actors/script.js @@ -2460,7 +2460,14 @@ SourceActor.prototype = { // XXX bug 865252: Don't load from the cache if this is a source mapped // source because we can't guarantee that the cache has the most up to date // content for this source like we can if it isn't source mapped. - return fetch(this._url, { loadFromCache: !this._sourceMap }); + let sourceFetched = fetch(this._url, { loadFromCache: !this._sourceMap }); + + // Record the contentType we just learned during fetching + sourceFetched.then(({ contentType }) => { + this._contentType = contentType; + }); + + return sourceFetched; }, /** diff --git a/toolkit/mozapps/update/common/pathhash.cpp b/toolkit/mozapps/update/common/pathhash.cpp index 5892e9b3074e..89a004cdef82 100644 --- a/toolkit/mozapps/update/common/pathhash.cpp +++ b/toolkit/mozapps/update/common/pathhash.cpp @@ -42,14 +42,15 @@ CalculateMD5(const char *data, DWORD dataSize, HCRYPTPROV hProv = 0; HCRYPTHASH hHash = 0; - if (!CryptAcquireContext(&hProv, nullptr, nullptr, PROV_RSA_FULL, 0)) { + if (!CryptAcquireContext(&hProv, nullptr, nullptr, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT)) { if (NTE_BAD_KEYSET != GetLastError()) { return FALSE; } // Maybe it doesn't exist, try to create it. if (!CryptAcquireContext(&hProv, nullptr, nullptr, PROV_RSA_FULL, - CRYPT_NEWKEYSET)) { + CRYPT_VERIFYCONTEXT | CRYPT_NEWKEYSET)) { return FALSE; } } diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index dd16597dece1..79904ad9dbbf 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -3846,11 +3846,6 @@ XREMain::XRE_mainRun() mDirProvider.DoStartup(); #ifdef MOZ_CRASHREPORTER - if (BrowserTabsRemote()) { - CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("DOMIPCEnabled"), - NS_LITERAL_CSTRING("1")); - } - nsCString userAgentLocale; if (NS_SUCCEEDED(Preferences::GetCString("general.useragent.locale", &userAgentLocale))) { CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("useragent_locale"), userAgentLocale); diff --git a/uriloader/prefetch/OfflineCacheUpdateParent.cpp b/uriloader/prefetch/OfflineCacheUpdateParent.cpp index 86b4e3ea73fa..6dd062d9fb9b 100644 --- a/uriloader/prefetch/OfflineCacheUpdateParent.cpp +++ b/uriloader/prefetch/OfflineCacheUpdateParent.cpp @@ -233,6 +233,18 @@ OfflineCacheUpdateParent::SetPrivateBrowsing(bool aUsePrivateBrowsing) return NS_ERROR_NOT_IMPLEMENTED; } +NS_IMETHODIMP +OfflineCacheUpdateParent::GetUseRemoteTabs(bool *aUseRemoteTabs) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +OfflineCacheUpdateParent::SetRemoteTabs(bool aUseRemoteTabs) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + NS_IMETHODIMP OfflineCacheUpdateParent::GetIsInBrowserElement(bool *aIsInBrowserElement) { diff --git a/widget/tests/test_plugin_scroll_consistency.html b/widget/tests/test_plugin_scroll_consistency.html index a026bf3352f7..6feab9e53421 100644 --- a/widget/tests/test_plugin_scroll_consistency.html +++ b/widget/tests/test_plugin_scroll_consistency.html @@ -25,7 +25,7 @@ for (var tag of pluginTags) {

 
@@ -40,10 +40,10 @@ function consistencyCheck(state) { ok(s == "", "Consistency check: " + state + ": " + s); } -consistencyCheck("Initial state"); - function runTests() { + consistencyCheck("Initial state"); + var scroll = document.getElementById("scroll"); scroll.scrollTop = 10; consistencyCheck("Scrolled down a bit"); @@ -52,7 +52,7 @@ function runTests() consistencyCheck("Before scrolling back to top"); scroll.scrollTop = 0; consistencyCheck("Scrolled to top"); - + setTimeout(function() { consistencyCheck("After scrolling to top"); diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 1544492f2490..f29699fdddaf 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3351,26 +3351,11 @@ gfxASurface *nsWindow::GetThebesSurface() if (mPaintDC) return (new gfxWindowsSurface(mPaintDC)); -#ifdef CAIRO_HAS_D2D_SURFACE - if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() == - gfxWindowsPlatform::RENDER_DIRECT2D) { - gfxContentType content = gfxContentType::COLOR; -#if defined(MOZ_XUL) - if (mTransparencyMode != eTransparencyOpaque) { - content = gfxContentType::COLOR_ALPHA; - } -#endif - return (new gfxD2DSurface(mWnd, content)); - } else { -#endif - uint32_t flags = gfxWindowsSurface::FLAG_TAKE_DC; - if (mTransparencyMode != eTransparencyOpaque) { - flags |= gfxWindowsSurface::FLAG_IS_TRANSPARENT; - } - return (new gfxWindowsSurface(mWnd, flags)); -#ifdef CAIRO_HAS_D2D_SURFACE + uint32_t flags = gfxWindowsSurface::FLAG_TAKE_DC; + if (mTransparencyMode != eTransparencyOpaque) { + flags |= gfxWindowsSurface::FLAG_IS_TRANSPARENT; } -#endif + return (new gfxWindowsSurface(mWnd, flags)); } /************************************************************** @@ -6751,21 +6736,10 @@ void nsWindow::ResizeTranslucentWindow(int32_t aNewWidth, int32_t aNewHeight, bo if (!force && aNewWidth == mBounds.width && aNewHeight == mBounds.height) return; -#ifdef CAIRO_HAS_D2D_SURFACE - if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() == - gfxWindowsPlatform::RENDER_DIRECT2D) { - nsRefPtr newSurface = - new gfxD2DSurface(gfxIntSize(aNewWidth, aNewHeight), gfxImageFormat::ARGB32); - mTransparentSurface = newSurface; - mMemoryDC = nullptr; - } else -#endif - { - nsRefPtr newSurface = - new gfxWindowsSurface(gfxIntSize(aNewWidth, aNewHeight), gfxImageFormat::ARGB32); - mTransparentSurface = newSurface; - mMemoryDC = newSurface->GetDC(); - } + nsRefPtr newSurface = + new gfxWindowsSurface(gfxIntSize(aNewWidth, aNewHeight), gfxImageFormat::ARGB32); + mTransparentSurface = newSurface; + mMemoryDC = newSurface->GetDC(); } void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode) @@ -6857,13 +6831,6 @@ nsresult nsWindow::UpdateTranslucentWindow() RECT winRect; ::GetWindowRect(hWnd, &winRect); -#ifdef CAIRO_HAS_D2D_SURFACE - if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() == - gfxWindowsPlatform::RENDER_DIRECT2D) { - mMemoryDC = static_cast(mTransparentSurface.get())-> - GetDC(true); - } -#endif // perform the alpha blend bool updateSuccesful = ::UpdateLayeredWindow(hWnd, nullptr, (POINT*)&winRect, &winSize, mMemoryDC, diff --git a/xpcom/base/Debug.cpp b/xpcom/base/Debug.cpp index 4e2dd42f4356..19065ab39ee6 100644 --- a/xpcom/base/Debug.cpp +++ b/xpcom/base/Debug.cpp @@ -6,61 +6,16 @@ #include "mozilla/Debug.h" #ifdef XP_WIN -#include #include #endif -#ifdef ANDROID -#include -#endif - -void mozilla::PrintToDebugger(const nsAString& aStr, FILE* aStream, - LogOptions aOptions) -{ - nsString msg(aStr); - if (aOptions & kPrintNewLine) { - msg.AppendLiteral("\n"); - } - #ifdef XP_WIN - if ((aOptions & kPrintToDebugger) && ::IsDebuggerPresent()) { - ::OutputDebugStringW(msg.get()); - } - if (!(aOptions & kPrintToStream)) { - return; +void mozilla::PrintToDebugger(const char* aStr) +{ + if (::IsDebuggerPresent()) { + ::OutputDebugStringA(aStr); } - - int fd = _fileno(aStream); - if (_isatty(fd)) { - fflush(aStream); - DWORD writtenCount; - WriteConsoleW(reinterpret_cast(_get_osfhandle(fd)), - msg.BeginReading(), msg.Length(), - &writtenCount, nullptr); - return; - } -#endif - NS_ConvertUTF16toUTF8 cstr(msg); -#ifdef ANDROID - if (aOptions & (kPrintInfoLog | kPrintErrorLog)) { - __android_log_write(aOptions & kPrintErrorLog ? ANDROID_LOG_ERROR - : ANDROID_LOG_INFO, - "GeckoDump", cstr.get()); - } -#endif - -#ifndef XP_WIN - if (!(aOptions & kPrintToStream)) { - return; - } -#endif - -#if defined(XP_MACOSX) - // have to convert \r to \n so that printing to the console works - cstr.ReplaceChar('\r', '\n'); -#endif - - fputs(cstr.get(), aStream); - fflush(aStream); } + +#endif diff --git a/xpcom/base/Debug.h b/xpcom/base/Debug.h index 356cf4a84991..a70c384aaccc 100644 --- a/xpcom/base/Debug.h +++ b/xpcom/base/Debug.h @@ -3,40 +3,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef mozilla_Debug_h -#define mozilla_Debug_h - -#include "nsString.h" -#include +#ifndef mozilla_Debug_h__ +#define mozilla_Debug_h__ namespace mozilla { -typedef uint32_t LogOptions; - -// Print a message to the specified stream. -const LogOptions kPrintToStream = 1 << 0; - -// Print a message to a debugger if the debugger is attached. -// At the moment, only meaningful on Windows. -const LogOptions kPrintToDebugger = 1 << 1; - -// Print an info-level message to the log. -// At the moment, only meaningful on Andriod. -const LogOptions kPrintInfoLog = 1 << 2; - -// Print an error-level message to the log. -// At the moment, only meaningful on Andriod. -const LogOptions kPrintErrorLog = 1 << 3; - -// Print a new line after the message. -const LogOptions kPrintNewLine = 1 << 4; +#ifdef XP_WIN // Print aStr to a debugger if the debugger is attached. -void PrintToDebugger(const nsAString& aStr, FILE* aStream, - LogOptions aOptions = kPrintToStream - | kPrintToDebugger - | kPrintInfoLog); +void PrintToDebugger(const char* aStr); + +#endif } // namespace mozilla -#endif // mozilla_Debug_h +#endif // mozilla_Debug_h__ diff --git a/xpcom/base/WindowsVersion.h b/xpcom/base/WindowsVersion.h index 0186f592d964..0d860be0b259 100644 --- a/xpcom/base/WindowsVersion.h +++ b/xpcom/base/WindowsVersion.h @@ -11,10 +11,10 @@ namespace mozilla { inline bool - IsWindowsVersionOrLater(uint64_t aVersion) + IsWindowsVersionOrLater(uint32_t aVersion) { - static uint64_t minVersion = 0; - static uint64_t maxVersion = UINT64_MAX; + static uint32_t minVersion = 0; + static uint32_t maxVersion = UINT32_MAX; if (minVersion >= aVersion) { return true; @@ -27,10 +27,10 @@ namespace mozilla OSVERSIONINFOEX info; ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - info.dwMajorVersion = aVersion >> 48; - info.dwMinorVersion = (aVersion >> 32) & 0xFFFF; - info.wServicePackMajor = (aVersion >> 16) & 0xFFFF; - info.wServicePackMinor = aVersion & 0xFFFF; + info.dwMajorVersion = aVersion >> 24; + info.dwMinorVersion = (aVersion >> 16) & 0xFF; + info.wServicePackMajor = (aVersion >> 8) & 0xFF; + info.wServicePackMinor = aVersion & 0xFF; DWORDLONG conditionMask = 0; VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); @@ -50,37 +50,75 @@ namespace mozilla return false; } + inline bool + IsWindowsBuildOrLater(uint32_t aBuild) + { + static uint32_t minBuild = 0; + static uint32_t maxBuild = UINT32_MAX; + + if (minBuild >= aBuild) { + return true; + } + + if (aBuild >= maxBuild) { + return false; + } + + OSVERSIONINFOEX info; + ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + info.dwBuildNumber = aBuild; + + DWORDLONG conditionMask = 0; + VER_SET_CONDITION(conditionMask, VER_BUILDNUMBER, VER_GREATER_EQUAL); + + if (VerifyVersionInfo(&info, VER_BUILDNUMBER, conditionMask)) { + minBuild = aBuild; + return true; + } + + maxBuild = aBuild; + return false; + } + MOZ_ALWAYS_INLINE bool IsXPSP3OrLater() - { return IsWindowsVersionOrLater(0x0005000100030000ull); } + { return IsWindowsVersionOrLater(0x05010300ul); } MOZ_ALWAYS_INLINE bool IsWin2003OrLater() - { return IsWindowsVersionOrLater(0x0005000200000000ull); } + { return IsWindowsVersionOrLater(0x05020000ul); } MOZ_ALWAYS_INLINE bool IsWin2003SP2OrLater() - { return IsWindowsVersionOrLater(0x0005000200020000ull); } + { return IsWindowsVersionOrLater(0x05020200ul); } MOZ_ALWAYS_INLINE bool IsVistaOrLater() - { return IsWindowsVersionOrLater(0x0006000000000000ull); } + { return IsWindowsVersionOrLater(0x06000000ul); } MOZ_ALWAYS_INLINE bool IsVistaSP1OrLater() - { return IsWindowsVersionOrLater(0x0006000000010000ull); } + { return IsWindowsVersionOrLater(0x06000100ul); } MOZ_ALWAYS_INLINE bool IsWin7OrLater() - { return IsWindowsVersionOrLater(0x0006000100000000ull); } + { return IsWindowsVersionOrLater(0x06010000ul); } MOZ_ALWAYS_INLINE bool IsWin7SP1OrLater() - { return IsWindowsVersionOrLater(0x0006000100010000ull); } + { return IsWindowsVersionOrLater(0x06010100ul); } MOZ_ALWAYS_INLINE bool IsWin8OrLater() - { return IsWindowsVersionOrLater(0x0006000200000000ull); } + { return IsWindowsVersionOrLater(0x06020000ul); } + + MOZ_ALWAYS_INLINE bool + IsWin7RTMOrLater() + { + return IsWin7SP1OrLater() || + (IsWin7OrLater() && IsWindowsBuildOrLater(7600)); + } } #endif /* mozilla_WindowsVersion_h */ diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp index 3f092bad9f0c..d3394f86df3e 100644 --- a/xpcom/base/nsConsoleService.cpp +++ b/xpcom/base/nsConsoleService.cpp @@ -20,9 +20,15 @@ #include "nsIConsoleListener.h" #include "nsPrintfCString.h" -#include "mozilla/Debug.h" #include "mozilla/Preferences.h" +#if defined(ANDROID) +#include +#endif +#ifdef XP_WIN +#include +#endif + using namespace mozilla; NS_IMPL_ADDREF(nsConsoleService) @@ -185,13 +191,24 @@ nsConsoleService::LogMessageWithMode(nsIConsoleMessage *message, nsConsoleServic { MutexAutoLock lock(mLock); - nsString msg; - message->GetMessageMoz(getter_Copies(msg)); - LogOptions options = kPrintToDebugger | kPrintNewLine; - if (outputMode == OutputToLog) { - options |= kPrintErrorLog; +#if defined(ANDROID) + if (outputMode == OutputToLog) + { + nsXPIDLString msg; + message->GetMessageMoz(getter_Copies(msg)); + __android_log_print(ANDROID_LOG_ERROR, "GeckoConsole", + "%s", + NS_LossyConvertUTF16toASCII(msg).get()); } - PrintToDebugger(msg, nullptr, options); +#endif +#ifdef XP_WIN + if (IsDebuggerPresent()) { + nsString msg; + message->GetMessageMoz(getter_Copies(msg)); + msg.AppendLiteral("\n"); + OutputDebugStringW(msg.get()); + } +#endif /* * If there's already a message in the slot we're about to replace, diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index aa39e31dd9e5..9367d62c98db 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -1103,6 +1103,7 @@ class nsCycleCollector : public nsIMemoryReporter NS_DECL_NSIMEMORYREPORTER bool mActivelyCollecting; + bool mFreeingSnowWhite; // mScanInProgress should be false when we're collecting white objects. bool mScanInProgress; CycleCollectorResults mResults; @@ -2464,6 +2465,13 @@ nsCycleCollector::FreeSnowWhite(bool aUntilNoSWInPurpleBuffer) { CheckThreadSafety(); + if (mFreeingSnowWhite) { + return false; + } + + AutoRestore ar(mFreeingSnowWhite); + mFreeingSnowWhite = true; + bool hadSnowWhiteObjects = false; do { SnowWhiteKiller visitor(this, mPurpleBuf.Count()); @@ -2982,6 +2990,7 @@ nsCycleCollector::CollectReports(nsIHandleReportCallback* aHandleReport, nsCycleCollector::nsCycleCollector() : mActivelyCollecting(false), + mFreeingSnowWhite(false), mScanInProgress(false), mJSRuntime(nullptr), mIncrementalPhase(IdlePhase), @@ -3159,9 +3168,10 @@ nsCycleCollector::Collect(ccType aCCType, CheckThreadSafety(); // This can legitimately happen in a few cases. See bug 383651. - if (mActivelyCollecting) { + if (mActivelyCollecting || mFreeingSnowWhite) { return false; } + AutoRestore ar(mActivelyCollecting); mActivelyCollecting = true; bool startedIdle = (mIncrementalPhase == IdlePhase); @@ -3202,8 +3212,6 @@ nsCycleCollector::Collect(ccType aCCType, } } while (!aBudget.checkOverBudget() && !finished); - mActivelyCollecting = false; - if (aCCType != SliceCC && !startedIdle) { // We were in the middle of an incremental CC (using its own listener). // Somebody has forced a CC, so after having finished out the current CC, diff --git a/xpcom/ds/nsHashtable.h b/xpcom/ds/nsHashtable.h index 318d0afdc727..5e31b1d98b31 100644 --- a/xpcom/ds/nsHashtable.h +++ b/xpcom/ds/nsHashtable.h @@ -258,43 +258,6 @@ public: uint32_t GetValue() { return mKey; } }; -//////////////////////////////////////////////////////////////////////////////// -// nsVoidKey: Where keys are void* objects that don't get refcounted. - -class nsVoidKey : public nsHashKey { - protected: - void* mKey; - - public: - nsVoidKey(const nsVoidKey& aKey) : mKey(aKey.mKey) { -#ifdef DEBUG - mKeyType = aKey.mKeyType; -#endif - } - - nsVoidKey(void* key) { -#ifdef DEBUG - mKeyType = VoidKey; -#endif - mKey = key; - } - - uint32_t HashCode(void) const { - return NS_PTR_TO_INT32(mKey); - } - - bool Equals(const nsHashKey *aKey) const { - NS_ASSERTION(aKey->GetKeyType() == VoidKey, "mismatched key types"); - return (mKey == ((const nsVoidKey *) aKey)->mKey); - } - - nsHashKey *Clone() const { - return new nsVoidKey(mKey); - } - - void* GetValue() { return mKey; } -}; - // for null-terminated c-strings class nsCStringKey : public nsHashKey { public: diff --git a/xpcom/glue/pldhash.h b/xpcom/glue/pldhash.h index 311a78d17e05..67949e922b9e 100644 --- a/xpcom/glue/pldhash.h +++ b/xpcom/glue/pldhash.h @@ -12,10 +12,6 @@ #include "mozilla/Types.h" #include "nscore.h" -#ifdef __cplusplus -extern "C" { -#endif - #if defined(__GNUC__) && defined(__i386__) #define PL_DHASH_FASTCALL __attribute__ ((regparm (3),stdcall)) #elif defined(XP_WIN) @@ -575,8 +571,4 @@ NS_COM_GLUE void PL_DHashTableDumpMeter(PLDHashTable *table, PLDHashEnumerator dump, FILE *fp); #endif -#ifdef __cplusplus -} -#endif - #endif /* pldhash_h___ */ diff --git a/xpfe/components/windowds/nsWindowDataSource.cpp b/xpfe/components/windowds/nsWindowDataSource.cpp index dd62664b8647..55a7abf70924 100644 --- a/xpfe/components/windowds/nsWindowDataSource.cpp +++ b/xpfe/components/windowds/nsWindowDataSource.cpp @@ -126,22 +126,17 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, const char16_t *newTitle) { nsresult rv; - - nsVoidKey key(window); - nsCOMPtr sup = - dont_AddRef(mWindowResources.Get(&key)); + nsCOMPtr windowResource; + mWindowResources.Get(window, getter_AddRefs(windowResource)); // oops, make sure this window is in the hashtable! - if (!sup) { + if (!windowResource) { OnOpenWindow(window); - sup = dont_AddRef(mWindowResources.Get(&key)); + mWindowResources.Get(window, getter_AddRefs(windowResource)); } - - NS_ENSURE_TRUE(sup, NS_ERROR_UNEXPECTED); - nsCOMPtr windowResource = - do_QueryInterface(sup); + NS_ENSURE_TRUE(windowResource, NS_ERROR_UNEXPECTED); nsCOMPtr newTitleLiteral; rv = gRDFService->GetLiteral(newTitle, getter_AddRefs(newTitleLiteral)); @@ -151,7 +146,7 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, nsCOMPtr oldTitleNode; rv = GetTarget(windowResource, kNC_Name, true, getter_AddRefs(oldTitleNode)); - + // assert the change if (NS_SUCCEEDED(rv) && oldTitleNode) // has an existing window title, update it @@ -164,7 +159,7 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, { NS_ERROR("unable to set window name"); } - + return NS_OK; } @@ -178,8 +173,7 @@ nsWindowDataSource::OnOpenWindow(nsIXULWindow *window) nsCOMPtr windowResource; gRDFService->GetResource(windowId, getter_AddRefs(windowResource)); - nsVoidKey key(window); - mWindowResources.Put(&key, windowResource); + mWindowResources.Put(window, windowResource); // assert the new window if (mContainer) @@ -192,38 +186,39 @@ nsWindowDataSource::OnOpenWindow(nsIXULWindow *window) NS_IMETHODIMP nsWindowDataSource::OnCloseWindow(nsIXULWindow *window) { - nsVoidKey key(window); - nsCOMPtr resource; - nsresult rv; - - if (!mWindowResources.Remove(&key, getter_AddRefs(resource))) + nsCOMPtr resource; + mWindowResources.Get(window, getter_AddRefs(resource)); + if (!resource) { return NS_ERROR_UNEXPECTED; + } + + mWindowResources.Remove(window); // make sure we're not shutting down if (!mContainer) return NS_OK; - + nsCOMPtr oldKeyNode; nsCOMPtr oldKeyInt; - + // get the old keyIndex, if any rv = GetTarget(resource, kNC_KeyIndex, true, getter_AddRefs(oldKeyNode)); if (NS_SUCCEEDED(rv) && (rv != NS_RDF_NO_VALUE)) oldKeyInt = do_QueryInterface(oldKeyNode); - + // update RDF and keyindex - from this point forward we'll ignore // errors, because they just indicate some kind of RDF inconsistency int32_t winIndex = -1; rv = mContainer->IndexOf(resource, &winIndex); - + if (NS_FAILED(rv)) return NS_OK; - + // unassert the old window, ignore any error mContainer->RemoveElement(resource, true); - + nsCOMPtr children; rv = mContainer->GetElements(getter_AddRefs(children)); if (NS_FAILED(rv)) @@ -264,12 +259,12 @@ nsWindowDataSource::OnCloseWindow(nsIXULWindow *window) // from (none) to "9" else if (newKeyInt) Assert(windowResource, kNC_KeyIndex, newKeyInt, true); - + // somehow inserting a window above this one, // "9" to (none) else if (oldKeyInt) Unassert(windowResource, kNC_KeyIndex, oldKeyInt); - + } return NS_OK; } @@ -279,24 +274,16 @@ struct findWindowClosure { nsIXULWindow *resultWindow; }; -static bool -findWindow(nsHashKey* aKey, void *aData, void* aClosure) +static PLDHashOperator +findWindow(nsIXULWindow* aWindow, nsIRDFResource* aResource, void* aClosure) { - nsVoidKey *thisKey = static_cast(aKey); + findWindowClosure* closure = static_cast(aClosure); - nsIRDFResource *resource = - static_cast(aData); - - findWindowClosure* closure = - static_cast(aClosure); - - if (resource == closure->targetResource) { - closure->resultWindow = - static_cast - (thisKey->GetValue()); - return false; // stop enumerating + if (aResource == closure->targetResource) { + closure->resultWindow = aWindow; + return PL_DHASH_STOP; } - return true; + return PL_DHASH_NEXT; } // nsIWindowDataSource implementation @@ -311,7 +298,7 @@ nsWindowDataSource::GetWindowForResource(const char *aResourceString, // now reverse-lookup in the hashtable findWindowClosure closure = { windowResource.get(), nullptr }; - mWindowResources.Enumerate(findWindow, (void*)&closure); + mWindowResources.EnumerateRead(findWindow, &closure); if (closure.resultWindow) { // this sucks, we have to jump through docshell to go from @@ -321,7 +308,7 @@ nsWindowDataSource::GetWindowForResource(const char *aResourceString, if (docShell) { nsCOMPtr result = do_GetInterface(docShell); - + *aResult = result; NS_IF_ADDREF(*aResult); } @@ -341,12 +328,12 @@ nsWindowDataSource::GetWindowForResource(const char *aResourceString, NS_IMETHODIMP nsWindowDataSource::GetURI(char * *aURI) { NS_ENSURE_ARG_POINTER(aURI); - + *aURI = ToNewCString(NS_LITERAL_CSTRING("rdf:window-mediator")); if (!*aURI) return NS_ERROR_OUT_OF_MEMORY; - + return NS_OK; } @@ -373,11 +360,10 @@ NS_IMETHODIMP nsWindowDataSource::GetTarget(nsIRDFResource *aSource, nsIRDFResou rv = gRDFService->GetIntLiteral(theIndex, getter_AddRefs(indexInt)); if (NS_FAILED(rv)) return(rv); if (!indexInt) return(NS_ERROR_FAILURE); - + return CallQueryInterface(indexInt, _retval); } - return mInner->GetTarget(aSource, aProperty, aTruthValue, _retval); } @@ -532,7 +518,7 @@ NS_IMETHODIMP nsWindowDataSource::BeginUpdateBatch() return mInner->BeginUpdateBatch(); return NS_OK; } - + /* void endUpdateBatch (); */ NS_IMETHODIMP nsWindowDataSource::EndUpdateBatch() { @@ -561,7 +547,7 @@ static const mozilla::Module::CategoryEntry kWindowDSCategories[] = { { "app-startup", "Window Data Source", "service," NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator" }, { nullptr } }; - + static const mozilla::Module kWindowDSModule = { mozilla::Module::kVersion, kWindowDSCIDs, diff --git a/xpfe/components/windowds/nsWindowDataSource.h b/xpfe/components/windowds/nsWindowDataSource.h index 9aca0fd9461b..d27f09f949bf 100644 --- a/xpfe/components/windowds/nsWindowDataSource.h +++ b/xpfe/components/windowds/nsWindowDataSource.h @@ -8,9 +8,10 @@ #include "nsIWindowDataSource.h" #include "nsIObserver.h" +#include "nsHashKeys.h" #include "nsIRDFService.h" #include "nsIRDFContainer.h" -#include "nsHashtable.h" +#include "nsInterfaceHashtable.h" #include "nsCycleCollectionParticipant.h" // {C744CA3D-840B-460a-8D70-7CE63C51C958} @@ -29,7 +30,7 @@ class nsWindowDataSource : public nsIRDFDataSource, virtual ~nsWindowDataSource(); nsresult Init(); - + NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsWindowDataSource, nsIRDFDataSource) @@ -41,11 +42,11 @@ class nsWindowDataSource : public nsIRDFDataSource, private: // mapping of window -> RDF resource - nsSupportsHashtable mWindowResources; + nsInterfaceHashtable, nsIRDFResource> mWindowResources; static uint32_t windowCount; static uint32_t gRefCnt; - + nsCOMPtr mInner; nsCOMPtr mContainer; @@ -54,5 +55,3 @@ class nsWindowDataSource : public nsIRDFDataSource, static nsIRDFResource* kNC_WindowRoot; static nsIRDFService* gRDFService; }; - -