Add html{color:text} to the simpleUserAgentStyleSheet on macOS.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 20:13:24 +0000 (20:13 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 20:13:24 +0000 (20:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191760

Reviewed by Antti Koivisto.

* css/CSSDefaultStyleSheets.cpp: Added html{color:text} to simpleUserAgentStyleSheet inside
a PLATFORM(MAC) copy of the string.

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

Source/WebCore/ChangeLog
Source/WebCore/css/CSSDefaultStyleSheets.cpp

index ac137d8..6b4b281 100644 (file)
@@ -1,3 +1,13 @@
+2018-11-16  Timothy Hatcher  <timothy@apple.com>
+
+        Add html{color:text} to the simpleUserAgentStyleSheet on macOS.
+        https://bugs.webkit.org/show_bug.cgi?id=191760
+
+        Reviewed by Antti Koivisto.
+
+        * css/CSSDefaultStyleSheets.cpp: Added html{color:text} to simpleUserAgentStyleSheet inside
+        a PLATFORM(MAC) copy of the string.
+
 2018-11-16  Jer Noble  <jer.noble@apple.com>
 
         An early return from updateSchedulingInfo can leave some variables uninitialized.
index 524270e..9445e91 100644 (file)
@@ -80,7 +80,12 @@ StyleSheetContents* CSSDefaultStyleSheets::colorInputStyleSheet;
 #endif
 
 // FIXME: It would be nice to use some mechanism that guarantees this is in sync with the real UA stylesheet.
+#if PLATFORM(MAC)
+// The only difference in the simple style sheet for macOS is the addition of html{color:text}.
+static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}html{color:text}head{display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto 5px -webkit-focus-ring-color}a:any-link{color:-webkit-link;text-decoration:underline}a:any-link:active{color:-webkit-activelink}";
+#else
 static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}head{display:none}body{margin:8px}div:focus,span:focus,a:focus{outline:auto 5px -webkit-focus-ring-color}a:any-link{color:-webkit-link;text-decoration:underline}a:any-link:active{color:-webkit-activelink}";
+#endif
 
 static inline bool elementCanUseSimpleDefaultStyle(const Element& element)
 {