Created attachment 176950 [details] test window.innerWidth should return valid value, when CSS viewport descriptors applied. Test is attached.
Created attachment 176958 [details] Test showing it works after scrolling
Created attachment 177137 [details] patch Might need splitting as it actually solves two problems: 1) initial viewport size detection in webcore 2) appropriate frame view initialization in WK2 WebPage However those fixes are very close so put them the same patch so far.
Comment on attachment 177137 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=177137&action=review > Source/WebCore/ChangeLog:10 > + descriptrors. Viewport descriptrors from new stylesheet were applied to the visibleContentRect spelling > Source/WebCore/page/FrameView.h:583 > +#if ENABLE(CSS_DEVICE_ADAPTATION) > + // Size of viewport before CSS viewport descriptors are applied. > + IntSize m_initialViewportSize; > +#endif Isn't it better to use the description from the spec? also link to the spec in the changelog > Source/WebKit2/ChangeLog:10 > + descriptrors. Viewport descriptrors from new stylesheet were applied to the visibleContentRect spelling > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1038 > contentFixedSize.scale(1 / m_page->deviceScaleFactor()); > +#if ENABLE(CSS_DEVICE_ADAPTATION) I would add a newline before this
Comment on attachment 177137 [details] patch I would like some tests that uses a non-1.0 deviceScaleFactor. I think it is possible to change that in tests.
Another question, doesn't this affect viewport meta as well? That would affect the ifdef's
(In reply to comment #5) > Another question, doesn't this affect viewport meta as well? That would affect the ifdef's I don't think it is possible to set/unset viewport meta properties for the same doc, so not I guess
Created attachment 177197 [details] patch v2 Took Kenneth feedback into consideration.
Comment on attachment 177197 [details] patch v2 Clearing flags on attachment: 177197 Committed r136373: <http://trac.webkit.org/changeset/136373>
All reviewed patches have been landed. Closing bug.