WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 131863
[iOS WebKit2] Implement CSS viewport units
https://bugs.webkit.org/show_bug.cgi?id=131863
Summary
[iOS WebKit2] Implement CSS viewport units
Tim Horton
Reported
2014-04-18 16:09:32 PDT
<
rdar://problem/16279088
>
Attachments
WIP
(13.99 KB, patch)
2014-04-18 17:38 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch
(12.45 KB, patch)
2014-04-18 21:58 PDT
,
Tim Horton
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2014-04-18 17:38:57 PDT
Created
attachment 229693
[details]
WIP
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
Created
attachment 229717
[details]
patch
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
http://trac.webkit.org/changeset/167616
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.
Top of Page
Format For Printing
XML
Clone This Bug