Bug 60743

Summary: Replace docTop/Right/Bottom/Left/Width/Height with documentRect
Product: WebKit Reporter: Emil A Eklund <eae>
Component: Layout and RenderingAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, eric, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Emil A Eklund
Reported 2011-05-12 18:39:45 PDT
RenderView has six methods for getting the document location and size, namely docTop, docRight, docBottom, docLeft, docWidth and docHeight. The current implementation of documentRect calls four of those, in effect computing the rect four times.
Attachments
Patch (8.93 KB, patch)
2011-05-12 19:40 PDT, Emil A Eklund
no flags
Patch (11.33 KB, patch)
2011-05-16 11:17 PDT, Emil A Eklund
no flags
Patch for landing (11.33 KB, patch)
2011-05-16 15:18 PDT, Emil A Eklund
no flags
Emil A Eklund
Comment 1 2011-05-12 19:40:36 PDT
WebKit Review Bot
Comment 2 2011-05-12 20:11:26 PDT
Eric Seidel (no email)
Comment 3 2011-05-16 11:05:37 PDT
Comment on attachment 93392 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=93392&action=review Fantastic! > Source/WebCore/page/FrameView.cpp:491 > + ScrollView::setScrollOrigin(IntPoint(-rect.x(), -rect.y()), !m_frame->document()->printing(), size == contentsSize()); Is there a helper for producing -x, -y from x, y? What about just IntSize() - rect.location()? I'm not sure that's more clear though, so that may be a bad idea.... just brainstorming. :) > Source/WebCore/rendering/RenderLayerCompositor.cpp:1143 > + m_rootPlatformLayer->setSize(FloatSize(documentRect.size())); Do you need the explicit FloatSize conversion here? I doubt it.
Simon Fraser (smfr)
Comment 4 2011-05-16 11:09:07 PDT
The Mac failure suggests that you need to fix the exports and WebKit.
Emil A Eklund
Comment 5 2011-05-16 11:10:21 PDT
> The Mac failure suggests that you need to fix the exports and WebKit. Yeah, working on that now. Thanks
Emil A Eklund
Comment 6 2011-05-16 11:17:42 PDT
Eric Seidel (no email)
Comment 7 2011-05-16 11:18:56 PDT
Comment on attachment 93673 [details] Patch LGTM.
Emil A Eklund
Comment 8 2011-05-16 11:19:34 PDT
> Is there a helper for producing -x, -y from x, y? No but I could add one, it's something we do in quite a few places so a helper might be useful. > Do you need the explicit FloatSize conversion here? I doubt it. Turns out I don't, good catch.
Emil A Eklund
Comment 9 2011-05-16 15:18:37 PDT
Created attachment 93704 [details] Patch for landing
WebKit Commit Bot
Comment 10 2011-05-16 15:51:11 PDT
Comment on attachment 93704 [details] Patch for landing Rejecting attachment 93704 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-8', 'apply-..." exit_code: 1 Last 500 characters of output: autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain result = func(*args) File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open return self.do_open(conn_factory, req) File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 60] Operation timed out> Full output: http://queues.webkit.org/results/8707083
WebKit Commit Bot
Comment 11 2011-05-16 16:34:03 PDT
Comment on attachment 93704 [details] Patch for landing Clearing flags on attachment: 93704 Committed r86632: <http://trac.webkit.org/changeset/86632>
WebKit Commit Bot
Comment 12 2011-05-16 16:34:08 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.