Bug 16138

Summary: Reduce code duplication in WebView.cpp
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: WebKit Misc.Assignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: sam
Priority: P2 Keywords: PlatformOnly
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
Refactor WebView's repaint rect code sam: review+

Description Adam Roben (:aroben) 2007-11-25 22:49:26 PST
WebView.cpp contains some duplicated code for figuring out repaint rects. We should fix that.
Comment 1 Adam Roben (:aroben) 2007-11-25 22:50:45 PST
Created attachment 17525 [details]
        Refactor WebView's repaint rect code


        Reviewed by NOBODY (OOPS!).

        * WebView.cpp:
        (getUpdateRects): Factored code out of updateBackingStore and paint
        into this new helper function.
        (WebView::updateBackingStore): Use getUpdateRects.
        (WebView::paint): Ditto.
        (WebView::paintIntoBackingStore): Changed to take a const IntRect&.
        (WebView::paintIntoWindow): Ditto.
        * WebView.h:
---
 WebKit/win/ChangeLog   |   15 +++++
 WebKit/win/WebView.cpp |  143 ++++++++++++++++++++++++------------------------
 WebKit/win/WebView.h   |    4 +-
 3 files changed, 88 insertions(+), 74 deletions(-)
Comment 2 Sam Weinig 2007-11-25 22:59:00 PST
Comment on attachment 17525 [details]
        Refactor WebView's repaint rect code

r=me
Comment 3 Adam Roben (:aroben) 2007-11-25 23:03:22 PST
Landed as r28036