WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135010
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
https://bugs.webkit.org/show_bug.cgi?id=135010
Summary
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
Benjamin Poulain
Reported
2014-07-16 22:59:10 PDT
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
Attachments
Patch
(12.97 KB, patch)
2014-07-16 23:16 PDT
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(13.80 KB, patch)
2014-07-17 14:08 PDT
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2014-07-16 23:16:23 PDT
Created
attachment 235053
[details]
Patch
Benjamin Poulain
Comment 2
2014-07-16 23:17:37 PDT
I welcome any better name for the SPI :)
Ian Henderson
Comment 3
2014-07-17 04:16:07 PDT
(In reply to
comment #2
)
> I welcome any better name for the SPI :)
Maybe _resizeImmediatelyWithUpdates:? Or just _resizeWithUpdates:?
Darin Adler
Comment 4
2014-07-17 08:59:32 PDT
Comment on
attachment 235053
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235053&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:169 > + BOOL _hasCommitedAnyPageLoad;
Spelling error in this. The word committed has two "t"s.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:173 > + BOOL _isResizingWithDynamicViewportUpdate; > + BOOL _isDocumentHiddenDuringResize;
This would be better as a single field with three values. NotResizing, ResizingWithAnimation, or ResizingWithDocumentHidden. The flag _isDocumentHiddenDuringResize means nothing unless _isResizingWithDynamicViewportUpdate is also YES, but the _beginAnimatedResizeWithUpdates method relies on _isDocumentHiddenDuringResize being NO already. Another possibility is to not have the _isDocumentHiddenDuringResize flag at all, since we can tell if the content view is hidden by calling [_contentView hidden]. Can't think of a good reason to keep our own separate copy of that state.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:776 > + _hasCommitedAnyPageLoad = YES;
I think _hasCommittedLoadForMainFrame would be a better name since it matches the method name. No reason to use similar but different terminology for the same concept.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2287 > + [self _beginAnimatedResizeWithUpdates:updateBlock];
I think it’s strange that you went to the trouble to rename _isAnimatingResize but not to rename these methods, but the methods are used in both cases; presumably because the methods are directly exposed as SPI. I’m not sure the renaming is necessary. Treating the hidden document version as a special case of animating resizing seems OK to me.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:140 > +- (void)_resizeWhileHiddingContentWithUpdates:(void (^)(void))updateBlock;
Spelling mistake here. The word hiding has only one "d".
Benjamin Poulain
Comment 5
2014-07-17 14:08:14 PDT
Created
attachment 235091
[details]
Patch
Tim Horton
Comment 6
2014-07-17 14:18:50 PDT
Comment on
attachment 235091
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235091&action=review
Seems fine to me. Too bad the mechanism I added in
r171191
to hide the content until the next commit didn't also work to hide the content until an arbitrary commit ID too. I suppose you might have non-Web-layer-tree WKContentView children that you want to (and do) hide as well.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:122 > +enum class DynamicViewportUpdateMode {
is this a State or a Mode?
Benjamin Poulain
Comment 7
2014-07-17 15:09:07 PDT
Comment on
attachment 235091
[details]
Patch Clearing flags on attachment: 235091 Committed
r171201
: <
http://trac.webkit.org/changeset/171201
>
Benjamin Poulain
Comment 8
2014-07-17 15:09:10 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