Commit 9d05e15f authored by bdakin's avatar bdakin

Reviewed by Darin.

        We had a bug where html4.css was ignoring Media Queries. In the ned 
        the problem was that we were trying to send a char* to the 
        MediaQueryEvaluator constructor that expects a String, but the 
        char* got interpreted as a bool, the wrong constructor was called, 
        and the media type was never set.

        No test case possible since this only affects html4.css

        * css/MediaQueryEvaluator.cpp: New constructor that expects takes a 
        char*
        (WebCore::MediaQueryEvaluator):
        * css/MediaQueryEvaluator.h: Same.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eb140e63
2006-09-29 Beth Dakin <bdakin@apple.com>
Reviewed by Darin.
We had a bug where html4.css was ignoring Media Queries. In the ned
the problem was that we were trying to send a char* to the
MediaQueryEvaluator constructor that expects a String, but the
char* got interpreted as a bool, the wrong constructor was called,
and the media type was never set.
No test case possible since this only affects html4.css
* css/MediaQueryEvaluator.cpp: New constructor that expects takes a
char*
(WebCore::MediaQueryEvaluator):
* css/MediaQueryEvaluator.h: Same.
2006-09-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by John, Maciej.
......@@ -83,6 +83,14 @@ MediaQueryEvaluator:: MediaQueryEvaluator(const String& acceptedMediaType, bool
{
}
MediaQueryEvaluator:: MediaQueryEvaluator(const char* acceptedMediaType, bool mediaFeatureResult)
: m_mediaType(acceptedMediaType)
, m_page(0)
, m_style(0)
, m_expResult(mediaFeatureResult)
{
}
MediaQueryEvaluator:: MediaQueryEvaluator(const String& acceptedMediaType, Page* page, RenderStyle* style)
: m_mediaType(acceptedMediaType.lower())
, m_page(page)
......
......@@ -62,6 +62,7 @@ public:
* for any media features
*/
MediaQueryEvaluator(const String& acceptedMediaType, bool mediaFeatureResult = false);
MediaQueryEvaluator(const char* acceptedMediaType, bool mediaFeatureResult = false);
/** Creates evaluator which evaluates full media queries
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment