WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102790
PageViewportControllerClient::didChangeViewportAttributes called twice
https://bugs.webkit.org/show_bug.cgi?id=102790
Summary
PageViewportControllerClient::didChangeViewportAttributes called twice
Allan Sandfeld Jensen
Reported
2012-11-20 03:44:00 PST
Both PageViewportController::updateMinimumScaleToFit and PageViewportController::didChangeViewportAttributes calls didChangeViewportAttributes on the PageViewportControllerClient, and since the former calls the later this means we end up firing didChangeViewportAttributes twice on the client.
Attachments
Patch
(3.78 KB, patch)
2012-11-20 03:46 PST
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Patch
(3.16 KB, patch)
2012-11-20 03:47 PST
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
Patch
(3.44 KB, patch)
2012-11-20 06:59 PST
,
Allan Sandfeld Jensen
kenneth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Allan Sandfeld Jensen
Comment 1
2012-11-20 03:46:32 PST
Created
attachment 175181
[details]
Patch
Allan Sandfeld Jensen
Comment 2
2012-11-20 03:47:42 PST
Created
attachment 175182
[details]
Patch Accidently uploaded unrelated change
Kenneth Rohde Christiansen
Comment 3
2012-11-20 04:48:38 PST
Comment on
attachment 175182
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=175182&action=review
> Source/WebKit2/UIProcess/PageViewportController.cpp:218 > + updateMinimumScaleToFit(false);
wouldn't it be nicer if it returned a bool instead?
Allan Sandfeld Jensen
Comment 4
2012-11-20 04:57:39 PST
(In reply to
comment #3
)
> (From update of
attachment 175182
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=175182&action=review
> > > Source/WebKit2/UIProcess/PageViewportController.cpp:218 > > + updateMinimumScaleToFit(false); > > wouldn't it be nicer if it returned a bool instead?
Perhaps. I am fine with either way.
Andras Becsi
Comment 5
2012-11-20 05:36:19 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (From update of
attachment 175182
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=175182&action=review
> > > > > Source/WebKit2/UIProcess/PageViewportController.cpp:218 > > > + updateMinimumScaleToFit(false); > > > > wouldn't it be nicer if it returned a bool instead? > > Perhaps. I am fine with either way.
I also think returning a bool indicating whether it updated the minimum size or not is the preferred pattern instead of a bool argument.
Allan Sandfeld Jensen
Comment 6
2012-11-20 06:59:10 PST
Created
attachment 175209
[details]
Patch
Kenneth Rohde Christiansen
Comment 7
2012-11-20 07:58:29 PST
Comment on
attachment 175209
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=175209&action=review
> Source/WebKit2/UIProcess/PageViewportController.cpp:108 > + if (updateMinimumScaleToFit())
Maybe that should ahve IfNeeded() added?
Allan Sandfeld Jensen
Comment 8
2012-11-20 08:15:34 PST
(In reply to
comment #7
)
> (From update of
attachment 175209
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=175209&action=review
> > > Source/WebKit2/UIProcess/PageViewportController.cpp:108 > > + if (updateMinimumScaleToFit()) > > Maybe that should ahve IfNeeded() added?
I don't feel that is necessary for a method name starting with update, since update usually means to change something if needed.
Allan Sandfeld Jensen
Comment 9
2012-11-20 08:23:47 PST
Committed
r135283
: <
http://trac.webkit.org/changeset/135283
>
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