Title: [214305] trunk/Source/WebCore
- Revision
- 214305
- Author
- [email protected]
- Date
- 2017-03-23 11:15:58 -0700 (Thu, 23 Mar 2017)
Log Message
NeverDestroyed<MediaQueryEvaluator> must explicitly construct with a String
https://bugs.webkit.org/show_bug.cgi?id=169987
<rdar://problem/31211087>
Reviewed by Alex Christensen.
CSSDefaultStyleSheets creates a static MediaQueryEvaluator, but thanks
to the template magic of NeverDestroyed, it was converting the char*
argument into a bool, and calling the wrong constructor.
Unfortunately this is difficult to test because it only affects
the default UA style sheets, and they currently don't have
and @media rules (which would always evaluate to true given
the bug). I don't want to put in a useless rule just to check
if the bug is fixed. When one is added for bug 168447, this change
will be exercised.
* css/CSSDefaultStyleSheets.cpp: Explicitly construct with a String
rather than a char*.
(WebCore::screenEval):
(WebCore::printEval):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (214304 => 214305)
--- trunk/Source/WebCore/ChangeLog 2017-03-23 16:13:18 UTC (rev 214304)
+++ trunk/Source/WebCore/ChangeLog 2017-03-23 18:15:58 UTC (rev 214305)
@@ -1,3 +1,27 @@
+2017-03-22 Dean Jackson <[email protected]>
+
+ NeverDestroyed<MediaQueryEvaluator> must explicitly construct with a String
+ https://bugs.webkit.org/show_bug.cgi?id=169987
+ <rdar://problem/31211087>
+
+ Reviewed by Alex Christensen.
+
+ CSSDefaultStyleSheets creates a static MediaQueryEvaluator, but thanks
+ to the template magic of NeverDestroyed, it was converting the char*
+ argument into a bool, and calling the wrong constructor.
+
+ Unfortunately this is difficult to test because it only affects
+ the default UA style sheets, and they currently don't have
+ and @media rules (which would always evaluate to true given
+ the bug). I don't want to put in a useless rule just to check
+ if the bug is fixed. When one is added for bug 168447, this change
+ will be exercised.
+
+ * css/CSSDefaultStyleSheets.cpp: Explicitly construct with a String
+ rather than a char*.
+ (WebCore::screenEval):
+ (WebCore::printEval):
+
2017-03-23 Eric Carlson <[email protected]>
[MediaStream] Make mock video source work on iOS
Modified: trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp (214304 => 214305)
--- trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp 2017-03-23 16:13:18 UTC (rev 214304)
+++ trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp 2017-03-23 18:15:58 UTC (rev 214305)
@@ -84,13 +84,13 @@
static const MediaQueryEvaluator& screenEval()
{
- static NeverDestroyed<const MediaQueryEvaluator> staticScreenEval("screen");
+ static NeverDestroyed<const MediaQueryEvaluator> staticScreenEval(String(ASCIILiteral("screen")));
return staticScreenEval;
}
static const MediaQueryEvaluator& printEval()
{
- static NeverDestroyed<const MediaQueryEvaluator> staticPrintEval("print");
+ static NeverDestroyed<const MediaQueryEvaluator> staticPrintEval(String(ASCIILiteral("print")));
return staticPrintEval;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes