WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137376
Defer resolution of viewport size
https://bugs.webkit.org/show_bug.cgi?id=137376
Summary
Defer resolution of viewport size
Martin Hock
Reported
2014-10-02 18:33:57 PDT
Defer resolution of viewport size.
Attachments
patch
(21.18 KB, patch)
2014-10-03 14:33 PDT
,
Martin Hock
no flags
Details
Formatted Diff
Diff
simplify patch, add description to ChangeLog
(5.05 KB, patch)
2014-10-05 15:26 PDT
,
Martin Hock
benjamin
: review-
Details
Formatted Diff
Diff
resolve on configuration update
(6.27 KB, patch)
2014-10-06 20:18 PDT
,
Martin Hock
benjamin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Martin Hock
Comment 1
2014-10-03 14:33:24 PDT
Created
attachment 239238
[details]
patch
Tim Horton
Comment 2
2014-10-03 15:45:17 PDT
Comment on
attachment 239238
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239238&action=review
> Source/WebCore/ChangeLog:7 > +
Definitely needs more justification here.
Martin Hock
Comment 3
2014-10-05 15:26:46 PDT
Created
attachment 239301
[details]
simplify patch, add description to ChangeLog
Benjamin Poulain
Comment 4
2014-10-05 15:47:14 PDT
Comment on
attachment 239301
[details]
simplify patch, add description to ChangeLog View in context:
https://bugs.webkit.org/attachment.cgi?id=239301&action=review
I believe this is incomplete. There can be no use of m_configuration.width/height without resolving it to a real value.
> Source/WebCore/page/ViewportConfiguration.cpp:293 > +double ViewportConfiguration::configLength(double length) const
Avoid abbreviations in WebKit.
> Source/WebCore/page/ViewportConfiguration.cpp:298 > + if (length == ViewportArguments::ValueDeviceWidth) > + return activeMinimumLayoutSizeInScrollViewCoordinates().width(); > + if (length == ViewportArguments::ValueDeviceHeight) > + return activeMinimumLayoutSizeInScrollViewCoordinates().height();
This is fragile. I would just have 2 getters that resolve the configuration to a real value, for width and height.
Martin Hock
Comment 5
2014-10-06 20:18:27 PDT
Created
attachment 239379
[details]
resolve on configuration update
Martin Hock
Comment 6
2014-10-06 20:21:54 PDT
(In reply to
comment #4
)
> (From update of
attachment 239301
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=239301&action=review
> > I believe this is incomplete. There can be no use of m_configuration.width/height without resolving it to a real value.
I've refactored it in my new patch to apply when the configuration is changed.
> > Source/WebCore/page/ViewportConfiguration.cpp:293 > > +double ViewportConfiguration::configLength(double length) const > > Avoid abbreviations in WebKit.
Renamed.
> > Source/WebCore/page/ViewportConfiguration.cpp:298 > > + if (length == ViewportArguments::ValueDeviceWidth) > > + return activeMinimumLayoutSizeInScrollViewCoordinates().width(); > > + if (length == ViewportArguments::ValueDeviceHeight) > > + return activeMinimumLayoutSizeInScrollViewCoordinates().height(); > > This is fragile. > > I would just have 2 getters that resolve the configuration to a real value, for width and height.
Based on our discussion and the fact that we can set width or height to be device-width or device-height, this logic seems correct.
Benjamin Poulain
Comment 7
2014-10-07 13:24:06 PDT
Comment on
attachment 239379
[details]
resolve on configuration update LGTM.
Martin Hock
Comment 8
2014-10-07 13:52:35 PDT
Committed
r174405
: <
http://trac.webkit.org/changeset/174405
>
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