Bug 16138 - Reduce code duplication in WebView.cpp
Summary: Reduce code duplication in WebView.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Adam Roben (:aroben)
URL:
Keywords: PlatformOnly
Depends on:
Blocks:
 
Reported: 2007-11-25 22:49 PST by Adam Roben (:aroben)
Modified: 2007-11-25 23:03 PST (History)
1 user (show)

See Also:


Attachments
Refactor WebView's repaint rect code (10.17 KB, patch)
2007-11-25 22:50 PST, Adam Roben (:aroben)
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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