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 84591
[Qt] Restore x-position when restoring previous zoom-level
https://bugs.webkit.org/show_bug.cgi?id=84591
Summary
[Qt] Restore x-position when restoring previous zoom-level
Allan Sandfeld Jensen
Reported
2012-04-23 06:17:02 PDT
When zooming out on tap to zoom the previous zoom-level is reestablished, but the previous position is not. The X-position needs to be restored to ensure the columns that were visible before zooming-in will be visible again after zooming out. Y-position does not need to be restored since zooming is fit-to-width, and moving Y-position is an intended feature of double-tap.
Attachments
Patch
(5.98 KB, patch)
2012-04-23 06:25 PDT
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Patch
(6.18 KB, patch)
2012-04-23 08:48 PDT
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Patch
(6.02 KB, patch)
2012-04-23 09:14 PDT
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Patch
(6.21 KB, patch)
2012-04-24 01:12 PDT
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Allan Sandfeld Jensen
Comment 1
2012-04-23 06:25:25 PDT
Created
attachment 138333
[details]
Patch
Alexis Menard (darktears)
Comment 2
2012-04-23 06:51:50 PDT
Comment on
attachment 138333
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138333&action=review
> Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:96 > +static inline bool fuzzyCompare(qreal a, qreal b, qreal f)
qFuzzyCompare is not good enough?
Allan Sandfeld Jensen
Comment 3
2012-04-23 06:56:44 PDT
(In reply to
comment #2
)
> (From update of
attachment 138333
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=138333&action=review
> > > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:96 > > +static inline bool fuzzyCompare(qreal a, qreal b, qreal f) > > qFuzzyCompare is not good enough?
I tried it, but I still had cases where a double-tap didn't zoom out, and qFuzzyCompare couldn't take an argument for epsilon. I am kinda of surprised I couldn't find a proper Qt floating-point compare with epsilon argument.
Allan Sandfeld Jensen
Comment 4
2012-04-23 08:48:05 PDT
Created
attachment 138355
[details]
Patch
WebKit Review Bot
Comment 5
2012-04-23 08:51:42 PDT
Attachment 138355
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:27: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andras Becsi
Comment 6
2012-04-23 09:04:44 PDT
Comment on
attachment 138355
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138355&action=review
> Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:99 > + return std::abs(a - b) < epsilon;
I think you could use qAbs() here, then you wouldn't need cmath. Looks good otherwise.
Allan Sandfeld Jensen
Comment 7
2012-04-23 09:06:19 PDT
(In reply to
comment #5
)
>
Attachment 138355
[details]
did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:27: Alphabetical sorting problem. [build/include_order] [4] > Total errors found: 1 in 3 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
Style-bot is wrong by the way. The includes are sorted with system-includes after other includes.
Andras Becsi
Comment 8
2012-04-23 09:14:15 PDT
(In reply to
comment #7
)
> (In reply to
comment #5
) > >
Attachment 138355
[details]
[details] did not pass style-queue: > > > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 > > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:27: Alphabetical sorting problem. [build/include_order] [4] > > Total errors found: 1 in 3 files > > > > > > If any of these errors are false positives, please file a bug against check-webkit-style. > > Style-bot is wrong by the way. The includes are sorted with system-includes after other includes.
I think the bot uses C locale for sort (LC_COLLATE=C) which would expect cmath after QWheelEvent.
Allan Sandfeld Jensen
Comment 9
2012-04-23 09:14:43 PDT
Created
attachment 138361
[details]
Patch
Allan Sandfeld Jensen
Comment 10
2012-04-23 09:32:58 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (In reply to
comment #5
) > > >
Attachment 138355
[details]
[details] [details] did not pass style-queue: > > > > > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 > > > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:27: Alphabetical sorting problem. [build/include_order] [4] > > > Total errors found: 1 in 3 files > > > > > > > > > If any of these errors are false positives, please file a bug against check-webkit-style. > > > > Style-bot is wrong by the way. The includes are sorted with system-includes after other includes. > > I think the bot uses C locale for sort (LC_COLLATE=C) which would expect cmath after QWheelEvent.
That was where I first placed it. There was no place the style-checker would accept it. Anyway it is gone now, qAbs was a better choice.
Andras Becsi
Comment 11
2012-04-23 09:47:36 PDT
(In reply to
comment #10
)
> (In reply to
comment #8
) > > (In reply to
comment #7
) > > > (In reply to
comment #5
) > > > >
Attachment 138355
[details]
[details] [details] [details] did not pass style-queue: > > > > > > > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 > > > > Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp:27: Alphabetical sorting problem. [build/include_order] [4] > > > > Total errors found: 1 in 3 files > > > > > > > > > > > > If any of these errors are false positives, please file a bug against check-webkit-style. > > > > > > Style-bot is wrong by the way. The includes are sorted with system-includes after other includes. > > > > I think the bot uses C locale for sort (LC_COLLATE=C) which would expect cmath after QWheelEvent. > > That was where I first placed it. There was no place the style-checker would accept it. Anyway it is gone now, qAbs was a better choice.
That's probably because your system has something like en_US.UTF-8 as a locale, using LC_COLLATE=C Tools/Scripts/check-webkit-style might give the correct result.
Allan Sandfeld Jensen
Comment 12
2012-04-24 01:12:08 PDT
Created
attachment 138512
[details]
Patch
zalan
Comment 13
2012-04-24 01:13:51 PDT
discussed on #irc. the updated(coming) patch looks good. :)
WebKit Review Bot
Comment 14
2012-04-24 02:41:51 PDT
Comment on
attachment 138512
[details]
Patch Clearing flags on attachment: 138512 Committed
r115022
: <
http://trac.webkit.org/changeset/115022
>
WebKit Review Bot
Comment 15
2012-04-24 02:41:57 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