Bug 106601

Summary: Clamp TileCache visibleRect to WKView's visibleRect
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, eric, ojan.autocc, sam, simon.fraser, webkit-ews, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
take one
none
preemptive style fix
webkit-ews: commit-queue-
patch
none
patch after talking to smfr simon.fraser: review+

Description Tim Horton 2013-01-10 14:11:50 PST
In the case where we have a very large WKView which is mostly clipped, we create tons of tiles (covering the whole view!). We should only make tiles in the visible area.

Part of <rdar://problem/12843164>.
Comment 1 Tim Horton 2013-01-15 12:40:03 PST
Created attachment 182827 [details]
take one
Comment 2 WebKit Review Bot 2013-01-15 12:42:37 PST
Attachment 182827 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit2/WebProcess/WebPage/WebPage.h:723:  The parameter name "isScrollable" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/UIProcess/WebPageProxy.h:392:  The parameter name "isScrollable" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2013-01-15 12:42:39 PST
Created attachment 182828 [details]
preemptive style fix
Comment 4 Early Warning System Bot 2013-01-15 12:53:15 PST
Comment on attachment 182828 [details]
preemptive style fix

Attachment 182828 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15908017
Comment 5 Tim Horton 2013-01-15 13:33:56 PST
Created attachment 182840 [details]
patch
Comment 6 Tim Horton 2013-01-15 17:13:16 PST
Created attachment 182880 [details]
patch after talking to smfr
Comment 7 WebKit Review Bot 2013-01-15 17:16:30 PST
Attachment 182880 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h:54:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Simon Fraser (smfr) 2013-01-15 17:28:43 PST
Comment on attachment 182880 [details]
patch after talking to smfr

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

> Source/WebCore/platform/graphics/ca/mac/TileCache.h:173
> +    IntRect m_exposedRect;

A comment to say what this is would be nice.

> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:418
> +    IntRect intersectedVisibleRect = m_visibleRect;

I think it would be fine to call this visibleRect.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:213
> +    BOOL _expandsToFitContent;

Maybe this should contain 'autoLayout' in the words.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:3100
> +    _data->_page->setMinimumLayoutWidth(expandsToFit ? minimumLayoutWidth : 0);

Isn't this the same as _data->_page->setMinimumLayoutWidth(minimumLayoutWidth); ?

> Source/WebKit2/WebProcess/WebPage/WebPage.h:607
> +    bool mainFrameIsScrollable() { return m_mainFrameIsScrollable; }

const

> Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:347
> +    m_exposedRect = exposedRect;
> +    mainFrameTiledBacking()->setExposedRect(exposedRect);

Shouldn't this map through the scroll offset?
Comment 9 Tim Horton 2013-01-15 18:53:12 PST
http://trac.webkit.org/changeset/139822