Bug 53206

Summary: SPI to temporarily disable updating the size of the drawing area during WKView frame resizes.
Product: WebKit Reporter: Jing <jingidy+wk>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
patch darin: review+

Jing
Reported 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.
Attachments
patch (9.44 KB, patch)
2011-01-26 17:11 PST, Jing
darin: review+
Jing
Comment 1 2011-01-26 17:11:54 PST
WebKit Review Bot
Comment 2 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.
Darin Adler
Comment 3 2011-01-26 17:22:09 PST
Comment on attachment 80270 [details] patch 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?
Jing
Comment 4 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.
mitz
Comment 5 2011-01-26 17:35:04 PST
Committed revision 76742.
Note You need to log in before you can comment on or make changes to this bug.