[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
andersca at apple.com
andersca at apple.com
Sun Feb 20 23:35:21 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit c5d43006c3d117228aa46c447b548891a0b70672
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 21 22:09:19 2011 +0000
2011-01-21 Anders Carlsson <andersca at apple.com>
Reviewed by Dan Bernstein.
DrawingAreaProxyImpl::paint should return the unpainted region
https://bugs.webkit.org/show_bug.cgi?id=52918
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Add unpaintedRegion parameter.
* UIProcess/BackingStore.h:
(WebKit::BackingStore::size):
Add a size getter.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint):
Initialize the unpainted region to the dirty region, then subtract the painted region.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index ba20a01..3b4d998 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,5 +1,24 @@
2011-01-21 Anders Carlsson <andersca at apple.com>
+ Reviewed by Dan Bernstein.
+
+ DrawingAreaProxyImpl::paint should return the unpainted region
+ https://bugs.webkit.org/show_bug.cgi?id=52918
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView drawRect:]):
+ Add unpaintedRegion parameter.
+
+ * UIProcess/BackingStore.h:
+ (WebKit::BackingStore::size):
+ Add a size getter.
+
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::paint):
+ Initialize the unpainted region to the dirty region, then subtract the painted region.
+
+2011-01-21 Anders Carlsson <andersca at apple.com>
+
Reviewed by Dan Bernstein and Maciej Stachowiak.
Fix for <rdar://problem/8896057>
diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm
index 60dc40f..400239d 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm
@@ -37,6 +37,7 @@
#import "PageClientImpl.h"
#import "PasteboardTypes.h"
#import "PrintInfo.h"
+#import "Region.h"
#import "RunLoop.h"
#import "TextChecker.h"
#import "TextCheckerState.h"
@@ -1274,8 +1275,9 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
NSInteger numRectsBeingDrawn;
[self getRectsBeingDrawn:&rectsBeingDrawn count:&numRectsBeingDrawn];
for (NSInteger i = 0; i < numRectsBeingDrawn; ++i) {
+ Region unpaintedRegion;
IntRect rect = enclosingIntRect(rectsBeingDrawn[i]);
- drawingArea->paint(context, rect);
+ drawingArea->paint(context, rect, unpaintedRegion);
}
} else if (_data->_page->drawsBackground()) {
[_data->_page->drawsTransparentBackground() ? [NSColor clearColor] : [NSColor whiteColor] set];
diff --git a/Source/WebKit2/UIProcess/BackingStore.h b/Source/WebKit2/UIProcess/BackingStore.h
index 4164d33..a3ea065 100644
--- a/Source/WebKit2/UIProcess/BackingStore.h
+++ b/Source/WebKit2/UIProcess/BackingStore.h
@@ -51,6 +51,8 @@ public:
static PassOwnPtr<BackingStore> create(const WebCore::IntSize&, WebPageProxy*);
~BackingStore();
+ const WebCore::IntSize& size() const { return m_size; }
+
#if PLATFORM(MAC)
typedef CGContextRef PlatformGraphicsContext;
#endif
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
index 300136d..3207094 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
@@ -26,6 +26,7 @@
#include "DrawingAreaProxyImpl.h"
#include "DrawingAreaMessages.h"
+#include "Region.h"
#include "UpdateInfo.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
@@ -53,12 +54,15 @@ DrawingAreaProxyImpl::~DrawingAreaProxyImpl()
{
}
-void DrawingAreaProxyImpl::paint(BackingStore::PlatformGraphicsContext context, const IntRect& rect)
+void DrawingAreaProxyImpl::paint(BackingStore::PlatformGraphicsContext context, const IntRect& rect, Region& unpaintedRegion)
{
+ unpaintedRegion = rect;
+
if (!m_backingStore)
return;
m_backingStore->paint(context, rect);
+ unpaintedRegion.subtract(IntRect(IntPoint(), m_backingStore->size()));
}
void DrawingAreaProxyImpl::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
index d4c6841..bf7b878 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
@@ -31,12 +31,14 @@
namespace WebKit {
+class Region;
+
class DrawingAreaProxyImpl : public DrawingAreaProxy {
public:
static PassOwnPtr<DrawingAreaProxyImpl> create(WebPageProxy*);
virtual ~DrawingAreaProxyImpl();
- void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&);
+ void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&, Region& unpaintedRegion);
private:
explicit DrawingAreaProxyImpl(WebPageProxy*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list