WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
88320
[Qt][WK2] Make viewport related experimental.test properties encapsulated.
https://bugs.webkit.org/show_bug.cgi?id=88320
Summary
[Qt][WK2] Make viewport related experimental.test properties encapsulated.
alan baradlay
Reported
2012-06-05 04:27:32 PDT
instead of having multiple properties such as QVariant contentsScale() const; QVariant devicePixelRatio() const; QVariant initialScale() const; QVariant isScalable() const; QVariant layoutSize() const; QVariant maximumScale() const; QVariant minimumScale() const; use experimental.test.viewport and expose it as an QJsonObject (list of key-value pairs) and consolidate experimental API as follows: experimental.test.contentsScale experimental.test.viewport experimental.devicePixelRatio (as the result of removing target-densitydpi from viewport meta)
Attachments
Patch
(10.75 KB, patch)
2012-08-23 09:14 PDT
,
Michael Brüning
no flags
Details
Formatted Diff
Diff
Patch
(10.26 KB, patch)
2012-08-24 02:23 PDT
,
Michael Brüning
no flags
Details
Formatted Diff
Diff
Patch
(10.25 KB, patch)
2012-08-24 03:04 PDT
,
Michael Brüning
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Michael Brüning
Comment 1
2012-08-23 08:15:13 PDT
I'll take this one if you don't mind, Zalan.
Michael Brüning
Comment 2
2012-08-23 09:14:54 PDT
Created
attachment 160181
[details]
Patch
Andras Becsi
Comment 3
2012-08-23 09:53:44 PDT
Comment on
attachment 160181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=160181&action=review
LGTM, just a few comments
> Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:140 > +static QJsonObject qSizeFToJsonObject(const QSizeF& sizeF)
inline maybe?
> Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp:237 > + float devicePixelRatio = m_devicePixelRatio; > + if (!qFuzzyCompare(devicePixelRatio, m_rawAttributes.devicePixelRatio)) {
Why not compare to m_devicePixelRatio directly instead of creating a temporary variable?
> Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml:87 > - text: "Initial scale: " + formatScale(test.initialScale) > + text: "Initial scale: " + formatScale(test.viewport.initialScale)
I think having m_rawAttributes.initialScale in the info item makes not much sense since it is almost always -1 as soon as it is applied in the viewport handler. We could either remove it from the info item or change the way it is marked as used when applied.
Michael Brüning
Comment 4
2012-08-23 11:40:29 PDT
(In reply to
comment #3
)
> (From update of
attachment 160181
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=160181&action=review
> > LGTM, just a few comments > > > Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:140 > > +static QJsonObject qSizeFToJsonObject(const QSizeF& sizeF) > > inline maybe?
Good idea :).
> > > Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp:237 > > + float devicePixelRatio = m_devicePixelRatio; > > + if (!qFuzzyCompare(devicePixelRatio, m_rawAttributes.devicePixelRatio)) { > > Why not compare to m_devicePixelRatio directly instead of creating a temporary variable?
Basically, I was following a pattern that was used further down because the two data types are different (float and qreal), but realized that that place calls a method to store in the temporary variable. I'll replace it with a cast.
> > > Tools/MiniBrowser/qt/qml/ViewportInfoItem.qml:87 > > - text: "Initial scale: " + formatScale(test.initialScale) > > + text: "Initial scale: " + formatScale(test.viewport.initialScale) > > I think having m_rawAttributes.initialScale in the info item makes not much sense since it is almost always -1 as soon as it is applied in the viewport handler. > We could either remove it from the info item or change the way it is marked as used when applied.
True. I have no strong opinion on whether it should stay or not, maybe one of the others on cc (Kenneth? :)) has an opinion on this?
Michael Brüning
Comment 5
2012-08-24 02:23:17 PDT
Created
attachment 160365
[details]
Patch
Kenneth Rohde Christiansen
Comment 6
2012-08-24 02:32:10 PDT
Comment on
attachment 160365
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=160365&action=review
> Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:140 > +static inline QJsonObject qSizeFToJsonObject(const QSizeF& sizeF)
you could just call it toJSonObject() as you might have more of these in the future. toJsonObject(QSizeF()) is pretty clear
Michael Brüning
Comment 7
2012-08-24 03:04:35 PDT
Created
attachment 160372
[details]
Patch
WebKit Review Bot
Comment 8
2012-08-24 04:03:29 PDT
Comment on
attachment 160372
[details]
Patch Rejecting
attachment 160372
[details]
from commit-queue.
michaelbruening@gmail.com
does not have committer permissions according to
http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py
. - If you do not have committer rights please read
http://webkit.org/coding/contributing.html
for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
WebKit Review Bot
Comment 9
2012-08-24 04:27:28 PDT
Comment on
attachment 160372
[details]
Patch Clearing flags on attachment: 160372 Committed
r126570
: <
http://trac.webkit.org/changeset/126570
>
WebKit Review Bot
Comment 10
2012-08-24 04:27:31 PDT
All reviewed patches have been landed. Closing 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