Skip to content

Commit

Permalink
Remove platform conditionals from MediaQueryFeatures
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264870

Reviewed by Darin Adler.

Theme is included by all platforms and already defaults to false for
these methods if they are not implemented for a particular platform.

* Source/WebCore/css/query/MediaQueryFeatures.cpp:
(WebCore::MQ::Features::prefersContrast):
(WebCore::MQ::Features::prefersReducedMotion):

Canonical link: https://commits.webkit.org/270833@main
  • Loading branch information
annevk committed Nov 16, 2023
1 parent d39420f commit 022982e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Source/WebCore/css/query/MediaQueryFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,7 @@ const FeatureSchema& prefersContrast()
case ForcedAccessibilityValue::Off:
return false;
case ForcedAccessibilityValue::System:
#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY) || PLATFORM(GTK)
return Theme::singleton().userPrefersContrast();
#else
return false;
#endif
}
return false;
}();
Expand Down Expand Up @@ -559,11 +555,7 @@ const FeatureSchema& prefersReducedMotion()
case ForcedAccessibilityValue::Off:
return false;
case ForcedAccessibilityValue::System:
#if USE(NEW_THEME) || PLATFORM(IOS_FAMILY)
return Theme::singleton().userPrefersReducedMotion();
#else
return false;
#endif
}
return false;
}();
Expand Down

0 comments on commit 022982e

Please sign in to comment.