Bug 53206 - SPI to temporarily disable updating the size of the drawing area during WKView frame resizes.
Summary: SPI to temporarily disable updating the size of the drawing area during WKVie...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-01-26 17:10 PST by Jing
Modified: 2011-01-26 17:35 PST (History)
2 users (show)

See Also:

patch (9.44 KB, patch)
2011-01-26 17:11 PST, Jing
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jing 2011-01-26 17:10:07 PST
Clients that have to call setFrame multiple times can use this to enforce only one resize per group of actions, which can help performance.
Comment 1 Jing 2011-01-26 17:11:54 PST
Created attachment 80270 [details]
Comment 2 WebKit Review Bot 2011-01-26 17:14:41 PST
Attachment 80270 [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/API/mac/WKViewPrivate.h:26:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 1 in 6 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2011-01-26 17:22:09 PST
Comment on attachment 80270 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=80270&action=review

I am saying review+ here, but I don’t think this merits adding WKViewPrivate.

> Source/WebKit2/ChangeLog:5
> +        SPI to temporarily disable size updates to the page drawing area in WKView.

This is no more SPI than any other aspect of WebKit2. I suggest not using the term SPI.

>> Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h:26
>> +@interface WKView (Private)
> Extra space before ( in function call  [whitespace/parens] [4]

This is a bug in the style queue.

> Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h:34
> +// Stops updating the size of the page as the WKView frame size updates.
> +// This should always be followed by enableFrameSizeUpdates. Calls can be nested.
> +- (void)disableFrameSizeUpdates;
> +// Immediately updates the size of the page to match WKView's frame size
> +// and allows subsequent updates as the frame size is set. Calls can be nested.
> +- (void)enableFrameSizeUpdates;
> +- (BOOL)frameSizeUpdatesDisabled;

I don’t think these need to be in a separate private header. Why wouldn’t we make these public for any client of WKView?
Comment 4 Jing 2011-01-26 17:26:46 PST
I talked to Anders about making it API, but he preferred to keep it SPI in case we wanted to change it later, since this was created to solve a specific problem that may or may not remain.
Comment 5 mitz 2011-01-26 17:35:04 PST
Committed revision 76742.