Commit 8cb1692b authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-18 Anders Carlsson <andersca@apple.com>

        Reviewed by Sam Weinig.

        Get and paint each individual rect in -[WKView drawRect:]
        https://bugs.webkit.org/show_bug.cgi?id=52660

        * UIProcess/API/mac/WKView.mm:
        (-[WKView drawRect:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b487e332
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Get and paint each individual rect in -[WKView drawRect:]
https://bugs.webkit.org/show_bug.cgi?id=52660
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
2011-01-18 Anders Carlsson <andersca@apple.com>
 
Reviewed by Darin Adler.
......@@ -1234,7 +1234,14 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
if (useNewDrawingArea()) {
if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(_data->_page->drawingArea())) {
CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
drawingArea->paint(context, enclosingIntRect(rect));
const NSRect *rectsBeingDrawn;
NSInteger numRectsBeingDrawn;
[self getRectsBeingDrawn:&rectsBeingDrawn count:&numRectsBeingDrawn];
for (NSInteger i = 0; i < numRectsBeingDrawn; ++i) {
IntRect rect = enclosingIntRect(rectsBeingDrawn[i]);
drawingArea->paint(context, rect);
}
} else if (_data->_page->drawsBackground()) {
[_data->_page->drawsTransparentBackground() ? [NSColor clearColor] : [NSColor whiteColor] set];
NSRectFill(rect);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment