http://www.w3.org/TR/css3-mediaqueries/#orientation We don't yet implement orientation and aspect-ratio <rdar://problem/6791666>
Created attachment 29512 [details] patch obviously patch needs PNG pixel results too.
Hmmm.. Firefox reevaluates media queries as the page resizes.
Created attachment 29524 [details] patch now does live updating patch now links up viewport changes to re-evaluation
Comment on attachment 29524 [details] patch now does live updating > +static bool orientationMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix) > +{ > + if (value) { An early return if !(value) would make the code simpler. > + FrameView* view = frame->view(); > + int width = view->layoutWidth(); > + int height = view->layoutHeight(); > + if (width > height) // Square viewport is portrait > + return "landscape" == static_cast<CSSPrimitiveValue*>(value)->getStringValue(); > + else > + return "portrait" == static_cast<CSSPrimitiveValue*>(value)->getStringValue(); Don't use 'else' after 'return'. > +static bool aspect_ratioMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix op) > +{ > + if (value) { Prefer early return. r=me
Committed r43739 M WebCore/ChangeLog M WebCore/css/MediaQueryExp.h M WebCore/css/MediaFeatureNames.h M WebCore/css/MediaQueryEvaluator.cpp A LayoutTests/platform/mac/fast/media/mq-aspect-ratio-expected.checksum A LayoutTests/platform/mac/fast/media/mq-orientation-expected.png A LayoutTests/platform/mac/fast/media/mq-orientation-expected.txt A LayoutTests/platform/mac/fast/media/mq-aspect-ratio-expected.png A LayoutTests/platform/mac/fast/media/mq-orientation-expected.checksum A LayoutTests/platform/mac/fast/media/mq-aspect-ratio-expected.txt M LayoutTests/ChangeLog A LayoutTests/fast/media/mq-orientation.html A LayoutTests/fast/media/mq-aspect-ratio.html with early return fix, and no else