diff --git a/browser/base/content/pageReport.js b/browser/base/content/pageReport.js
deleted file mode 100644
index 5205af4adf8..00000000000
--- a/browser/base/content/pageReport.js
+++ /dev/null
@@ -1,113 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998-1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# David Hyatt (hyatt@apple.com)
-# Dean Tessman (dean_tessman@hotmail.com)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-var gSiteBox;
-var gUnblockButton;
-var gPageReport;
-
-var permissionmanager =
- Components.classes["@mozilla.org/permissionmanager;1"]
- .getService(Components.interfaces.nsIPermissionManager);
-var nsIPermissionManager = Components.interfaces.nsIPermissionManager;
-
-function onLoad()
-{
- gSiteBox = document.getElementById("siteBox");
- gUnblockButton = document.getElementById("unblockButton");
- gPageReport = opener.gBrowser.pageReport;
-
- buildSiteBox();
- // select the first item using a delay, otherwise the listitems
- // don't paint as selected.
- setTimeout(selectFirstItem, 0);
-}
-
-function selectFirstItem()
-{
- gSiteBox.selectedIndex = 0;
-}
-
-function buildSiteBox()
-{
- for (var i = 0; i < gPageReport.length; i++) {
- var found = false;
- for (var j = 0; j < gSiteBox.childNodes.length; j++) {
- if (gSiteBox.childNodes[j].label == gPageReport[i]) {
- found = true;
- break;
- }
- }
-
- if (!found)
- gSiteBox.appendItem(gPageReport[i]);
- }
-}
-
-function siteSelected()
-{
- gUnblockButton.disabled = (gSiteBox.selectedItems.length == 0);
-}
-
-function whitelistSite()
-{
- var selectedItem = gSiteBox.selectedItems[0];
- if (!selectedItem)
- return;
-
- var selectedIndex = gSiteBox.getIndexOfItem(selectedItem);
-
- var uri = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService)
- .newURI(selectedItem.label, null, null);
-
- permissionmanager.add(uri, "popup", nsIPermissionManager.ALLOW_ACTION);
- gSiteBox.removeChild(selectedItem);
-
- if (gSiteBox.getRowCount() == 0) {
- // close if there are no other sites to whitelist
- window.close();
- return;
- }
-
- // make sure a site is selected
- if (selectedIndex > gSiteBox.getRowCount() - 1)
- selectedIndex -= 1;
- gSiteBox.selectedIndex = selectedIndex;
- document.documentElement.getButton("accept").focus()
-}
diff --git a/browser/base/content/pageReport.xul b/browser/base/content/pageReport.xul
deleted file mode 100644
index 6876ea2bd05..00000000000
--- a/browser/base/content/pageReport.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998-1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# David Hyatt (hyatt@apple.com)
-# Dean Tessman (dean_tessman@hotmail.com)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-
-
-
- %brandDTD;
-
- %openDialogDTD;
-]>
-
-
diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js
index e5ff2634763..30e1c45d1b8 100644
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -348,9 +348,9 @@ function resetPageInfo()
/* Reset Media tab */
var mediaTab = document.getElementById("mediaTab");
if (!mediaTab.hidden) {
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- os.removeObserver(imagePermissionObserver, "perm-changed");
+ Components.classes["@mozilla.org/observer-service;1"]
+ .getService(Components.interfaces.nsIObserverService)
+ .removeObserver(imagePermissionObserver, "perm-changed");
mediaTab.hidden = true;
}
gImageView.clear();
@@ -370,10 +370,11 @@ function resetPageInfo()
function onUnloadPageInfo()
{
+ // Remove the observer, only if there is at least 1 image.
if (!document.getElementById("mediaTab").hidden) {
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- os.removeObserver(imagePermissionObserver, "perm-changed");
+ Components.classes["@mozilla.org/observer-service;1"]
+ .getService(Components.interfaces.nsIObserverService)
+ .removeObserver(imagePermissionObserver, "perm-changed");
}
/* Call registered overlay unload functions */
@@ -542,6 +543,7 @@ function doGrab(iterator)
processFrames();
return;
}
+
setTimeout(doGrab, 16, iterator);
}
@@ -557,6 +559,7 @@ function addImage(url, type, alt, elem, isBg)
{
if (!url)
return;
+
if (!gImageHash.hasOwnProperty(url))
gImageHash[url] = { };
if (!gImageHash[url].hasOwnProperty(type))
@@ -584,11 +587,13 @@ function addImage(url, type, alt, elem, isBg)
else
sizeText = gStrings.unknown;
gImageView.addRow([url, type, sizeText, alt, 1, elem, isBg]);
+
+ // Add the observer, only once.
if (gImageView.data.length == 1) {
document.getElementById("mediaTab").hidden = false;
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- os.addObserver(imagePermissionObserver, "perm-changed", false);
+ Components.classes["@mozilla.org/observer-service;1"]
+ .getService(Components.interfaces.nsIObserverService)
+ .addObserver(imagePermissionObserver, "perm-changed", false);
}
}
else {
@@ -665,6 +670,7 @@ function onBeginLinkDrag(event,urlField,descField)
.createInstance(Components.interfaces.nsISupportsArray);
if (!transArray)
return;
+
var trans = Components.classes[TRANSFERABLE_CONTRACTID]
.createInstance(Components.interfaces.nsITransferable);
if (!trans)
@@ -1017,6 +1023,7 @@ var imagePermissionObserver = {
{
if (document.getElementById("mediaPreviewBox").collapsed)
return;
+
if (aTopic == "perm-changed") {
var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
if (permission.type == "image") {
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index 4535d1075d1..c21b26237a6 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -35,8 +35,6 @@ browser.jar:
* content/browser/pageinfo/security.js (content/pageinfo/security.js)
* content/browser/openLocation.js (content/openLocation.js)
* content/browser/openLocation.xul (content/openLocation.xul)
-* content/browser/pageReport.js (content/pageReport.js)
-* content/browser/pageReport.xul (content/pageReport.xul)
* content/browser/pageReportFirstTime.xul (content/pageReportFirstTime.xul)
* content/browser/safeMode.js (content/safeMode.js)
* content/browser/safeMode.xul (content/safeMode.xul)
diff --git a/browser/components/sessionstore/src/nsSessionStartup.js b/browser/components/sessionstore/src/nsSessionStartup.js
index 755654f0c2d..c8d194048d3 100644
--- a/browser/components/sessionstore/src/nsSessionStartup.js
+++ b/browser/components/sessionstore/src/nsSessionStartup.js
@@ -281,9 +281,8 @@ SessionStartup.prototype = {
}
else { // basic prompt with no options
// get app name from branding properties
- var brandStringBundle = this._getStringBundle("chrome://branding/locale/brand.properties");
- var brandShortName = brandStringBundle.GetStringFromName("brandShortName");
-
+ const brandShortName = this._getStringBundle("chrome://branding/locale/brand.properties")
+ .GetStringFromName("brandShortName");
// create prompt strings
var ssStringBundle = this._getStringBundle("chrome://browser/locale/sessionstore.properties");
var restoreTitle = ssStringBundle.formatStringFromName("restoredTitle", [brandShortName], 1);
@@ -293,12 +292,10 @@ SessionStartup.prototype = {
var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
getService(Ci.nsIPromptService);
-
// set the buttons that will appear on the dialog
var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +
promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +
promptService.BUTTON_POS_0_DEFAULT;
-
var buttonChoice = promptService.confirmEx(null, restoreTitle, restoreText,
flags, okTitle, cancelTitle, null,
null, {});
@@ -315,11 +312,8 @@ SessionStartup.prototype = {
* @returns nsIStringBundle
*/
_getStringBundle: function sss_getStringBundle(aURI) {
- var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].
- getService(Ci.nsIStringBundleService);
- var appLocale = Cc["@mozilla.org/intl/nslocaleservice;1"].
- getService(Ci.nsILocaleService).getApplicationLocale();
- return bundleService.createBundle(aURI, appLocale);
+ return Cc["@mozilla.org/intl/stringbundle;1"].
+ getService(Ci.nsIStringBundleService).createBundle(aURI);
},
/* ........ Storage API .............. */
diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js
index 373b30cdb36..2efc1764ce7 100644
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -2052,19 +2052,6 @@ SessionStoreService.prototype = {
return aWindow.document.documentElement.getAttribute(aAttribute) || dimension;
},
- /**
- * Convenience method to get localized string bundles
- * @param aURI
- * @returns nsIStringBundle
- */
- _getStringBundle: function sss_getStringBundle(aURI) {
- var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].
- getService(Ci.nsIStringBundleService);
- var appLocale = Cc["@mozilla.org/intl/nslocaleservice;1"].
- getService(Ci.nsILocaleService).getApplicationLocale();
- return bundleService.createBundle(aURI, appLocale);
- },
-
/**
* Get nsIURI from string
* @param string
diff --git a/browser/locales/en-US/chrome/browser/pageReport.dtd b/browser/locales/en-US/chrome/browser/pageReport.dtd
deleted file mode 100644
index 570e7f1673d..00000000000
--- a/browser/locales/en-US/chrome/browser/pageReport.dtd
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
index 56e398aef0c..02145c0826a 100644
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -14,7 +14,6 @@
locale/browser/openLocation.properties (%chrome/browser/openLocation.properties)
* locale/browser/pageInfo.dtd (%chrome/browser/pageInfo.dtd)
locale/browser/pageInfo.properties (%chrome/browser/pageInfo.properties)
- locale/browser/pageReport.dtd (%chrome/browser/pageReport.dtd)
locale/browser/pageReportFirstTime.dtd (%chrome/browser/pageReportFirstTime.dtd)
locale/browser/quitDialog.properties (%chrome/browser/quitDialog.properties)
* locale/browser/safeMode.dtd (%chrome/browser/safeMode.dtd)
diff --git a/browser/themes/gnomestripe/browser/preferences/preferences.css b/browser/themes/gnomestripe/browser/preferences/preferences.css
index 0d12362f6fb..f0790cf687c 100644
--- a/browser/themes/gnomestripe/browser/preferences/preferences.css
+++ b/browser/themes/gnomestripe/browser/preferences/preferences.css
@@ -103,11 +103,11 @@ filefield {
margin: 1px;
}
-filefield[disabled="true"] .fileFieldContentBox {
+.fileFieldContentBox[disabled="true"] {
opacity: 0.5;
}
-filefield[disabled="true"] .fileFieldIcon {
+.fileFieldIcon[disabled="true"] {
opacity: 0.2;
}
diff --git a/browser/themes/winstripe/browser/preferences/preferences.css b/browser/themes/winstripe/browser/preferences/preferences.css
index 10c940dae6b..1030c0ce335 100644
--- a/browser/themes/winstripe/browser/preferences/preferences.css
+++ b/browser/themes/winstripe/browser/preferences/preferences.css
@@ -130,11 +130,11 @@ filefield {
margin: 1px;
}
-filefield[disabled="true"] .fileFieldContentBox {
+.fileFieldContentBox[disabled="true"] {
opacity: 0.5;
}
-filefield[disabled="true"] .fileFieldIcon {
+.fileFieldIcon[disabled="true"] {
opacity: 0.2;
}
diff --git a/dom/public/nsDOMString.h b/dom/public/nsDOMString.h
index a3e91af2512..5a3e9fb33aa 100644
--- a/dom/public/nsDOMString.h
+++ b/dom/public/nsDOMString.h
@@ -40,7 +40,7 @@
#ifndef nsDOMString_h___
#define nsDOMString_h___
-#include "nsAString.h"
+#include "nsStringGlue.h"
inline PRBool DOMStringIsNull(const nsAString& aString)
{
diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp
index 049cf048c99..245764fa8bb 100644
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -1131,10 +1131,10 @@ nsTextControlFrame::PreDestroy()
}
//unregister self from content
- mTextListener->SetFrame(nsnull);
nsFormControlFrame::RegUnRegAccessKey(static_cast(this), PR_FALSE);
if (mTextListener)
{
+ mTextListener->SetFrame(nsnull);
if (mContent)
{
mContent->RemoveEventListenerByIID(static_cast(mTextListener), NS_GET_IID(nsIDOMFocusListener));
diff --git a/modules/plugin/base/public/npapi.h b/modules/plugin/base/public/npapi.h
index 6f783a1ddf6..abde20f5284 100644
--- a/modules/plugin/base/public/npapi.h
+++ b/modules/plugin/base/public/npapi.h
@@ -181,7 +181,7 @@ typedef unsigned short uint16;
#endif
#ifndef _UINT32
-# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
+# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) || defined(__LP64__)
typedef unsigned int uint32;
# else /* __alpha */
typedef unsigned long uint32;
@@ -197,7 +197,7 @@ typedef short int16;
#endif
#ifndef _INT32
-# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
+# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) || defined(__LP64__)
typedef int int32;
# else /* __alpha */
typedef long int32;
diff --git a/toolkit/components/places/src/nsNavHistoryResult.cpp b/toolkit/components/places/src/nsNavHistoryResult.cpp
index 143e562ca31..2e5f88628b5 100644
--- a/toolkit/components/places/src/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/src/nsNavHistoryResult.cpp
@@ -51,8 +51,6 @@
#include "nsIComponentManager.h"
#include "nsIDateTimeFormat.h"
#include "nsIDOMElement.h"
-#include "nsILocale.h"
-#include "nsILocaleService.h"
#include "nsILocalFile.h"
#include "nsIDynamicContainer.h"
#include "nsIServiceManager.h"
diff --git a/toolkit/components/viewconfig/content/config.js b/toolkit/components/viewconfig/content/config.js
index 39040ca23f1..92ecc73e42a 100644
--- a/toolkit/components/viewconfig/content/config.js
+++ b/toolkit/components/viewconfig/content/config.js
@@ -372,7 +372,11 @@ function ShowPrefs()
if (!document.getElementById("showWarningNextTime").checked)
gPrefBranch.setBoolPref("general.warnOnAboutConfig", false);
- document.getElementById("textbox").focus();
+ var textbox = document.getElementById("textbox");
+ if (textbox.value)
+ // somebody seems to already have tried to apply a filter
+ FilterPrefs();
+ textbox.focus();
}
function onConfigUnload()
diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js
index 31fa4e0efd5..34a7ef2b169 100644
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -653,17 +653,9 @@ function getPostData()
function getStringBundle()
{
- const bundleURL = "chrome://global/locale/contentAreaCommands.properties";
-
- const sbsContractID = "@mozilla.org/intl/stringbundle;1";
- const sbsIID = Components.interfaces.nsIStringBundleService;
- const sbs = Components.classes[sbsContractID].getService(sbsIID);
-
- const lsContractID = "@mozilla.org/intl/nslocaleservice;1";
- const lsIID = Components.interfaces.nsILocaleService;
- const ls = Components.classes[lsContractID].getService(lsIID);
- var appLocale = ls.getApplicationLocale();
- return sbs.createBundle(bundleURL, appLocale);
+ return Components.classes["@mozilla.org/intl/stringbundle;1"]
+ .getService(Components.interfaces.nsIStringBundleService)
+ .createBundle("chrome://global/locale/contentAreaCommands.properties");
}
function makeWebBrowserPersist()
diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml
index b32b9a5355d..1ce03ba01bf 100644
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -366,12 +366,9 @@
if (!this._mStrBundle) {
// need to create string bundle manually instead of using
// see bug 63370 for details
- var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
- .getService(Components.interfaces.nsILocaleService);
- var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
- .getService(Components.interfaces.nsIStringBundleService);
- var bundleURL = "chrome://global/locale/browser.properties";
- this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale());
+ this._mStrBundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
+ .getService(Components.interfaces.nsIStringBundleService)
+ .createBundle("chrome://global/locale/browser.properties");
}
return this._mStrBundle;
]]>
diff --git a/toolkit/content/widgets/dialog.xml b/toolkit/content/widgets/dialog.xml
index a177b268eba..275bc9eba54 100644
--- a/toolkit/content/widgets/dialog.xml
+++ b/toolkit/content/widgets/dialog.xml
@@ -196,12 +196,9 @@
if (!this._mStrBundle) {
// need to create string bundle manually instead of using
// see bug 63370 for details
- var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
- .getService(Components.interfaces.nsILocaleService);
- var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
- .getService(Components.interfaces.nsIStringBundleService);
- var bundleURL = "chrome://global/locale/dialog.properties";
- this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale());
+ this._mStrBundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
+ .getService(Components.interfaces.nsIStringBundleService)
+ .createBundle("chrome://global/locale/dialog.properties");
}
return this._mStrBundle;
]]>
diff --git a/toolkit/content/widgets/stringbundle.xml b/toolkit/content/widgets/stringbundle.xml
index c42f0b163a7..f139a38d455 100644
--- a/toolkit/content/widgets/stringbundle.xml
+++ b/toolkit/content/widgets/stringbundle.xml
@@ -45,9 +45,9 @@
-
-
-
-
-
-
// see bug 63370 for details
- var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
- .getService(Components.interfaces.nsILocaleService);
- var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
- .getService(Components.interfaces.nsIStringBundleService);
- var bundleURL = "chrome://global/locale/wizard.properties";
- this._bundle = stringBundleService.createBundle(bundleURL);
+ this._bundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
+ .getService(Components.interfaces.nsIStringBundleService)
+ .createBundle("chrome://global/locale/wizard.properties");
} catch (e) {
// This fails in remote XUL, which has to provide titles for all pages
// see bug 142502
diff --git a/toolkit/mozapps/preferences/preferences.xml b/toolkit/mozapps/preferences/preferences.xml
index d410e3e418a..8b9b5c21f78 100644
--- a/toolkit/mozapps/preferences/preferences.xml
+++ b/toolkit/mozapps/preferences/preferences.xml
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/widget/src/cocoa/nsWindowMap.mm b/widget/src/cocoa/nsWindowMap.mm
index 4ec867a1934..595de48ce6a 100644
--- a/widget/src/cocoa/nsWindowMap.mm
+++ b/widget/src/cocoa/nsWindowMap.mm
@@ -317,6 +317,8 @@
} else if ([window isSheet]) {
[TopLevelWindowData activateInWindow:window];
}
+
+ [[window contentView] setNeedsDisplay:YES];
}
- (void)windowResignedKey:(NSNotification*)inNotification
@@ -329,6 +331,8 @@
} else if ([window isSheet]) {
[TopLevelWindowData deactivateInWindow:window];
}
+
+ [[window contentView] setNeedsDisplay:YES];
}
// The appearance of a top-level window depends on its main state (not its key
diff --git a/widget/src/windows/nsNativeThemeWin.cpp b/widget/src/windows/nsNativeThemeWin.cpp
index 45a36dbadb1..fc4b54345cd 100644
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -666,6 +666,10 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
if (IsDisabled(aFrame)) {
aState = TS_DISABLED;
return NS_OK;
+ } else if (CheckBooleanAttr(aFrame, nsWidgetAtoms::open) ||
+ CheckBooleanAttr(aFrame, nsWidgetAtoms::checked)) {
+ aState = TS_ACTIVE;
+ return NS_OK;
}
aState = StandardGetState(aFrame, aWidgetType, PR_TRUE);
@@ -1091,6 +1095,12 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
aPart = mIsVistaOrLater ? CBP_DROPMARKER_VISTA : CBP_DROPMARKER;
+ // For HTML controls with author styling, we should fall
+ // back to the old dropmarker style to avoid clashes with
+ // author-specified backgrounds and borders (bug #441034)
+ if (isHTML && IsWidgetStyled(aFrame->PresContext(), aFrame, NS_THEME_DROPDOWN))
+ aPart = CBP_DROPMARKER;
+
if (IsDisabled(aFrame)) {
aState = TS_DISABLED;
return NS_OK;
@@ -1247,19 +1257,17 @@ nsNativeThemeWin::DrawWidgetBackground(nsIRenderingContext* aContext,
tr.ScaleInverse(p2a);
cr.ScaleInverse(p2a);
- if (mIsVistaOrLater) {
- /* See GetWidgetOverflow */
- if (aWidgetType == NS_THEME_DROPDOWN_BUTTON &&
- IsHTMLContent(aFrame))
- {
- tr.pos.y -= 1.0;
- tr.size.width += 1.0;
- tr.size.height += 2.0;
+ /* See GetWidgetOverflow */
+ if (aWidgetType == NS_THEME_DROPDOWN_BUTTON &&
+ part == CBP_DROPMARKER_VISTA && IsHTMLContent(aFrame))
+ {
+ tr.pos.y -= 1.0;
+ tr.size.width += 1.0;
+ tr.size.height += 2.0;
- cr.pos.y -= 1.0;
- cr.size.width += 1.0;
- cr.size.height += 2.0;
- }
+ cr.pos.y -= 1.0;
+ cr.size.width += 1.0;
+ cr.size.height += 2.0;
}
nsRefPtr ctx = aContext->ThebesContext();
@@ -1648,7 +1656,10 @@ nsNativeThemeWin::GetWidgetOverflow(nsIDeviceContext* aContext,
* like they're supposed to.
*/
if (aWidgetType == NS_THEME_DROPDOWN_BUTTON &&
- IsHTMLContent(aFrame))
+ IsHTMLContent(aFrame) &&
+ !IsWidgetStyled(aFrame->GetParent()->PresContext(),
+ aFrame->GetParent(),
+ NS_THEME_DROPDOWN))
{
PRInt32 p2a = aContext->AppUnitsPerDevPixel();
/* Note: no overflow on the left */
@@ -2227,6 +2238,10 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, PRUint8
contentState = GetContentState(aFrame, aWidgetType);
if (IsDisabled(aFrame))
aState |= DFCS_INACTIVE;
+ else if (CheckBooleanAttr(aFrame, nsWidgetAtoms::open))
+ aState |= DFCS_PUSHED;
+ else if (CheckBooleanAttr(aFrame, nsWidgetAtoms::checked))
+ aState |= DFCS_CHECKED;
else {
if (contentState & NS_EVENT_STATE_ACTIVE && contentState & NS_EVENT_STATE_HOVER) {
aState |= DFCS_PUSHED;