diff --git a/mozilla/layout/style/nsCSSLoader.cpp b/mozilla/layout/style/nsCSSLoader.cpp index 272c20ba400..36465237962 100644 --- a/mozilla/layout/style/nsCSSLoader.cpp +++ b/mozilla/layout/style/nsCSSLoader.cpp @@ -1656,10 +1656,11 @@ CSSLoaderImpl::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, data = data->mNext; } - // Now that it's marked complete, put the sheet in our cache + // Now that it's marked complete, put the sheet in our cache, but + // only if we parsed it case-sensitively. if (NS_SUCCEEDED(aStatus) && aLoadData->mURI) { #ifdef MOZ_XUL - if (IsChromeURI(aLoadData->mURI)) { + if (IsChromeURI(aLoadData->mURI) && mCaseSensitive) { nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance(); if (cache && cache->IsEnabled()) { if (!cache->GetStyleSheet(aLoadData->mURI)) { diff --git a/mozilla/layout/style/test/Makefile.in b/mozilla/layout/style/test/Makefile.in index 298a2a17dea..af1935a90f1 100644 --- a/mozilla/layout/style/test/Makefile.in +++ b/mozilla/layout/style/test/Makefile.in @@ -45,6 +45,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = layout +DIRS += chrome \ + $(NULL) + # XXX Yuck. We can't transfer everything from autoconf to HOST_CFLAGS, # but it would be nice to pick up anything affecting nsCSSPropList.h # automatically. diff --git a/mozilla/layout/style/test/chrome/Makefile.in b/mozilla/layout/style/test/chrome/Makefile.in new file mode 100644 index 00000000000..e17e3329def --- /dev/null +++ b/mozilla/layout/style/test/chrome/Makefile.in @@ -0,0 +1,54 @@ +# ***** 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.org code. +# +# The Initial Developer of the Original Code is +# Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2009 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either of 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 ***** + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = layout/style/test/chrome + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +_CHROME_FILES = \ + test_bug535806.xul \ + bug535806-css.css \ + bug535806-html.html \ + bug535806-xul.xul \ + $(NULL) + +libs:: $(_CHROME_FILES) + $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir) diff --git a/mozilla/layout/style/test/chrome/bug535806-css.css b/mozilla/layout/style/test/chrome/bug535806-css.css new file mode 100644 index 00000000000..bda339f7766 --- /dev/null +++ b/mozilla/layout/style/test/chrome/bug535806-css.css @@ -0,0 +1 @@ +fooBar[fooBar] { color: green; } diff --git a/mozilla/layout/style/test/chrome/bug535806-html.html b/mozilla/layout/style/test/chrome/bug535806-html.html new file mode 100644 index 00000000000..e4395da3f3b --- /dev/null +++ b/mozilla/layout/style/test/chrome/bug535806-html.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/mozilla/layout/style/test/chrome/bug535806-xul.xul b/mozilla/layout/style/test/chrome/bug535806-xul.xul new file mode 100644 index 00000000000..3d9a82b91ec --- /dev/null +++ b/mozilla/layout/style/test/chrome/bug535806-xul.xul @@ -0,0 +1,8 @@ + + + + + + + diff --git a/mozilla/layout/style/test/chrome/test_bug535806.xul b/mozilla/layout/style/test/chrome/test_bug535806.xul new file mode 100644 index 00000000000..d335b7a6df1 --- /dev/null +++ b/mozilla/layout/style/test/chrome/test_bug535806.xul @@ -0,0 +1,44 @@ + + + + + + + diff --git a/mozilla/testing/mochitest/gen_template.pl b/mozilla/testing/mochitest/gen_template.pl index 18aced47fc3..d351b6e64d2 100644 --- a/mozilla/testing/mochitest/gen_template.pl +++ b/mozilla/testing/mochitest/gen_template.pl @@ -19,6 +19,8 @@ if ($template_type eq "xul") { $template_type = "$FindBin::RealBin/static/xul.template.txt"; } elsif ($template_type eq "xhtml") { $template_type = "$FindBin::RealBin/static/xhtml.template.txt"; +} elsif ($template_type eq "chrome") { + $template_type = "$FindBin::RealBin/static/chrome.template.txt"; } else { $template_type = "$FindBin::RealBin/static/test.template.txt"; } diff --git a/mozilla/testing/mochitest/static/chrome.template.txt b/mozilla/testing/mochitest/static/chrome.template.txt new file mode 100644 index 00000000000..4f36e16d0f1 --- /dev/null +++ b/mozilla/testing/mochitest/static/chrome.template.txt @@ -0,0 +1,27 @@ + + + + + + +