Bug 131863

Summary: [iOS WebKit2] Implement CSS viewport units
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, esprehn+autocc, glenn, kondapallykalyan, paulo, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
none
patch darin: review+

Tim Horton
Reported 2014-04-18 16:09:32 PDT
Attachments
WIP (13.99 KB, patch)
2014-04-18 17:38 PDT, Tim Horton
no flags
patch (12.45 KB, patch)
2014-04-18 21:58 PDT, Tim Horton
darin: review+
Tim Horton
Comment 1 2014-04-18 17:38:57 PDT
Benjamin Poulain
Comment 2 2014-04-18 20:07:45 PDT
Comment on attachment 229693 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=229693&action=review Looks good to me. > Source/WebCore/page/ViewportConfiguration.cpp:108 > +IntSize ViewportConfiguration::layoutSizeForMinimalUI() const This name is extremely misleading. The layout size is computed from the minimumLayoutSize and all the viewport parameters. I think I would do this computation out of ViewportConfiguration. ViewportConfiguration is already complicated enough as it is, and the fact that we can use the minimal UI for viewport unit is iOS specific.
Tim Horton
Comment 3 2014-04-18 21:58:05 PDT
Darin Adler
Comment 4 2014-04-19 14:56:28 PDT
Comment on attachment 229717 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=229717&action=review > Source/WebCore/rendering/RenderView.cpp:1050 > + IntSize viewportSize = frameView().frame().page()->viewportSize(); > + if (!viewportSize.isEmpty()) > + return viewportSize; Seems a little strange. I understand that we want to distinguish a size that is set from a size that is not. But it doesn’t seem right that “empty” is now we track “not set”. > Source/WebCore/rendering/RenderView.h:202 > + void setViewportSize(IntSize); In the old days we would invariably have used "const IntSize&", but I gather that’s just old fashioned attempt at optimizing that didn’t really work.
Benjamin Poulain
Comment 5 2014-04-19 16:04:59 PDT
Comment on attachment 229717 [details] patch Just a suggestion: maybe viewport size should be stored on FrameView instead of Page. It would make more sense for FrameView/ScrollView to know about the viewport geometry. RenderView::viewportSize() would just invoke frameView().viewportSize(), and FrameView::viewportSize() would make the decision between the visibleContentRectIncludingScrollbars() and the special viewport size override.
Simon Fraser (smfr)
Comment 6 2014-04-19 16:19:07 PDT
What should viewport units report for subframes?
Benjamin Poulain
Comment 7 2014-04-19 16:22:27 PDT
(In reply to comment #6) > What should viewport units report for subframes? viewportSize would be empty, RenderView would fallback to visibleContentRectIncludingScrollbars().
Tim Horton
Comment 8 2014-04-21 11:24:31 PDT
(In reply to comment #5) > (From update of attachment 229717 [details]) > Just a suggestion: maybe viewport size should be stored on FrameView instead of Page. It would make more sense for FrameView/ScrollView to know about the viewport geometry. > > RenderView::viewportSize() would just invoke frameView().viewportSize(), and FrameView::viewportSize() would make the decision between the visibleContentRectIncludingScrollbars() and the special viewport size override. OK, I think that sounds like a reasonable change.
Tim Horton
Comment 9 2014-04-21 13:23:36 PDT
Benjamin Poulain
Comment 10 2014-06-11 15:14:12 PDT
*** Bug 127446 has been marked as a duplicate of this bug. ***
Benjamin Poulain
Comment 11 2014-06-11 15:14:51 PDT
*** Bug 127771 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.