2010-08-03 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Aug 2010 07:32:53 +0000 (07:32 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Aug 2010 07:32:53 +0000 (07:32 +0000)
        Reviewed by Dan Bernstein.

        System color changes are not applied properly
        https://bugs.webkit.org/show_bug.cgi?id=43468

        * manual-tests/system-color-change.html: Added.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::platformColorsDidChange): Added a call to
        Page::setNeedsReapplyStyles, so all frames of all pages will recompute
        in case they use system colors. It's rare for these colors to change,
        so OK to do a little extra style computation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/manual-tests/system-color-change.html [new file with mode: 0644]
WebCore/rendering/RenderTheme.cpp

index 98b838e..1c0a279 100644 (file)
@@ -1,3 +1,18 @@
+2010-08-03  Darin Adler  <darin@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        System color changes are not applied properly
+        https://bugs.webkit.org/show_bug.cgi?id=43468
+
+        * manual-tests/system-color-change.html: Added.
+
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::platformColorsDidChange): Added a call to
+        Page::setNeedsReapplyStyles, so all frames of all pages will recompute
+        in case they use system colors. It's rare for these colors to change,
+        so OK to do a little extra style computation.
+
 2010-08-04  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed. Revert changed license in SVGFEOffsetElement.h, thanks Gabor for noticing.
diff --git a/WebCore/manual-tests/system-color-change.html b/WebCore/manual-tests/system-color-change.html
new file mode 100644 (file)
index 0000000..d06f242
--- /dev/null
@@ -0,0 +1,7 @@
+<body bgcolor="highlight">
+Change the system highlight color.
+
+On Mac OS X, go into System Preferences and change the Highlight color in the Appearance preference panel.
+
+If the background of this page changes color immediately, the test passed.
+</body>
index bd96d11..4d9f47b 100644 (file)
@@ -1038,6 +1038,8 @@ void RenderTheme::platformColorsDidChange()
     m_inactiveListBoxSelectionForegroundColor = Color();
     m_activeListBoxSelectionBackgroundColor = Color();
     m_inactiveListBoxSelectionForegroundColor = Color();
+
+    Page::setNeedsReapplyStyles();
 }
 
 Color RenderTheme::systemColor(int cssValueId) const