Title: [245368] trunk/Source/WebCore
- Revision
- 245368
- Author
- [email protected]
- Date
- 2019-05-15 16:50:34 -0700 (Wed, 15 May 2019)
Log Message
REGRESSION (r245072): Missing code in Document::styleColorOptions to propagate StyleColor::Options::UseInactiveAppearance
https://bugs.webkit.org/show_bug.cgi?id=197930
rdar://problem/49833954
Reviewed by Wenson Hsieh and Megan Gardner.
Add some code that was missing from Document in my original patch for r245072.
* dom/Document.cpp:
(WebCore::Document::useSystemAppearance const): Drive-by fix code style.
(WebCore::Document::useInactiveAppearance const): Added.
(WebCore::Document::styleColorOptions const): Add StyleColor::Options::UseInactiveAppearance.
* dom/Document.h: Added useInactiveAppearance().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (245367 => 245368)
--- trunk/Source/WebCore/ChangeLog 2019-05-15 23:31:26 UTC (rev 245367)
+++ trunk/Source/WebCore/ChangeLog 2019-05-15 23:50:34 UTC (rev 245368)
@@ -1,3 +1,19 @@
+2019-05-15 Timothy Hatcher <[email protected]>
+
+ REGRESSION (r245072): Missing code in Document::styleColorOptions to propagate StyleColor::Options::UseInactiveAppearance
+ https://bugs.webkit.org/show_bug.cgi?id=197930
+ rdar://problem/49833954
+
+ Reviewed by Wenson Hsieh and Megan Gardner.
+
+ Add some code that was missing from Document in my original patch for r245072.
+
+ * dom/Document.cpp:
+ (WebCore::Document::useSystemAppearance const): Drive-by fix code style.
+ (WebCore::Document::useInactiveAppearance const): Added.
+ (WebCore::Document::styleColorOptions const): Add StyleColor::Options::UseInactiveAppearance.
+ * dom/Document.h: Added useInactiveAppearance().
+
2019-05-15 Devin Rousso <[email protected]>
Web Inspector: user gesture toggle should also force user interaction flag
Modified: trunk/Source/WebCore/dom/Document.cpp (245367 => 245368)
--- trunk/Source/WebCore/dom/Document.cpp 2019-05-15 23:31:26 UTC (rev 245367)
+++ trunk/Source/WebCore/dom/Document.cpp 2019-05-15 23:50:34 UTC (rev 245368)
@@ -6891,10 +6891,9 @@
bool Document::useSystemAppearance() const
{
- bool useSystemAppearance = false;
- if (Page* documentPage = page())
- useSystemAppearance = documentPage->useSystemAppearance();
- return useSystemAppearance;
+ if (auto* documentPage = page())
+ return documentPage->useSystemAppearance();
+ return false;
}
bool Document::useDarkAppearance(const RenderStyle* style) const
@@ -6935,6 +6934,13 @@
return false;
}
+bool Document::useInactiveAppearance() const
+{
+ if (auto* documentPage = page())
+ return documentPage->useInactiveAppearance();
+ return false;
+}
+
OptionSet<StyleColor::Options> Document::styleColorOptions(const RenderStyle* style) const
{
OptionSet<StyleColor::Options> options;
@@ -6942,6 +6948,8 @@
options.add(StyleColor::Options::UseSystemAppearance);
if (useDarkAppearance(style))
options.add(StyleColor::Options::UseDarkAppearance);
+ if (useInactiveAppearance())
+ options.add(StyleColor::Options::UseInactiveAppearance);
return options;
}
Modified: trunk/Source/WebCore/dom/Document.h (245367 => 245368)
--- trunk/Source/WebCore/dom/Document.h 2019-05-15 23:31:26 UTC (rev 245367)
+++ trunk/Source/WebCore/dom/Document.h 2019-05-15 23:50:34 UTC (rev 245368)
@@ -567,6 +567,7 @@
float deviceScaleFactor() const;
WEBCORE_EXPORT bool useSystemAppearance() const;
+ WEBCORE_EXPORT bool useInactiveAppearance() const;
WEBCORE_EXPORT bool useDarkAppearance(const RenderStyle*) const;
OptionSet<StyleColor::Options> styleColorOptions(const RenderStyle*) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes