Changeset 150194 in webkit
- Timestamp:
- May 16, 2013 11:40:16 AM (11 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r150180 r150194 1 2013-05-16 Simon Fraser <simon.fraser@apple.com> 2 3 Re-land r150168 with some OS version guards. 4 5 * WebView/WebFrameView.mm: 6 (-[WebFrameView drawRect:]): 7 (-[WebFrameView wantsUpdateLayer]): 8 (-[WebFrameView updateLayer]): 9 1 10 2013-05-16 Commit Queue <commit-queue@webkit.org> 2 11 -
trunk/Source/WebKit/mac/WebView/WebFrameView.mm
r150180 r150194 80 80 @end 81 81 82 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 83 @interface NSView (Details) 84 - (void)setBackgroundColor:(NSColor *)color; 85 @end 86 #endif 87 82 88 enum { 83 89 SpaceKey = 0x0020 … … 459 465 - (void)drawRect:(NSRect)rect 460 466 { 461 if ( [self documentView] == nil) {467 if (![self documentView]) { 462 468 // Need to paint ourselves if there's no documentView to do it instead. 463 469 if ([[self _webView] drawsBackground]) { … … 474 480 } 475 481 } 482 483 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 484 - (BOOL)wantsUpdateLayer 485 { 486 return YES; 487 } 488 489 - (void)updateLayer 490 { 491 // Do what -drawRect: does but by setting a backgroundColor on the view. This avoids 492 // backing store for this view when the WebView is layer-backed. 493 if (![self documentView]) { 494 if ([[self _webView] drawsBackground]) { 495 [self setBackgroundColor:[[self _webView] backgroundColor]]; 496 return; 497 } 498 } else { 499 #ifndef NDEBUG 500 if ([[self _scrollView] drawsBackground]) { 501 [self setBackgroundColor:[NSColor cyanColor]]; 502 return; 503 } 504 #endif 505 } 506 507 [self setBackgroundColor:[NSColor clearColor]]; 508 } 509 #endif 476 510 477 511 - (NSRect)visibleRect
Note: See TracChangeset
for help on using the changeset viewer.