return false;
FrameView* view = frame->view();
+ if (!view)
+ return false;
+
int width = view->layoutWidth();
int height = view->layoutHeight();
if (width > height) // Square viewport is portrait
{
if (value) {
FrameView* view = frame->view();
+ if (!view)
+ return true;
+
int width = view->layoutWidth();
int height = view->layoutHeight();
int h = 0;
// this method only got called if this media type matches the one defined
// in the query. Thus, if if the document's media type is "print", the
// media type of the query will either be "print" or "all".
- String mediaType = frame->view()->mediaType();
+ FrameView* view = frame->view();
+ if (!view)
+ return false;
+
+ String mediaType = view->mediaType();
if (equalIgnoringCase(mediaType, "screen")) {
Screen* screen = frame->document()->domWindow()->screen();
horiDPI = screen->horizontalDPI();
static bool heightMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op)
{
FrameView* view = frame->view();
+ if (!view)
+ return false;
if (value) {
RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
static bool widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op)
{
FrameView* view = frame->view();
+ if (!view)
+ return false;
if (value) {
RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
bool MediaQueryEvaluator::eval(const MediaQueryExp* expr) const
{
- if (!m_frame || !m_style)
+ if (!m_frame || !m_frame->view() || !m_style)
return m_expResult;
if (!expr->isValid())