Changeset 58847 in webkit
- Timestamp:
- May 5, 2010, 5:37:03 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r58845 r58847 1 2010-05-05 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1) 6 https://bugs.webkit.org/show_bug.cgi?id=38427 7 8 * compositing/iframes/iframe-in-composited-layer.html: Added. 9 * platform/mac/compositing/iframes/iframe-in-composited-layer-expected.checksum: Added. 10 * platform/mac/compositing/iframes/iframe-in-composited-layer-expected.png: Added. 11 * platform/mac/compositing/iframes/iframe-in-composited-layer-expected.txt: Added. 12 1 13 2010-05-05 Chris Marrin <cmarrin@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r58845 r58847 1 2010-05-05 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1) 6 https://bugs.webkit.org/show_bug.cgi?id=38427 7 8 Test: compositing/iframes/iframe-in-composited-layer.html 9 10 * WebCore.base.exp: Export FrameView::isEnclosedInCompositingLayer(). 11 * page/FrameView.cpp: 12 (WebCore::FrameView::isEnclosedInCompositingLayer): Added this predicate. 13 * page/FrameView.h: 14 1 15 2010-05-05 Chris Marrin <cmarrin@apple.com> 2 16 -
trunk/WebCore/WebCore.base.exp
r58821 r58847 600 600 __ZN7WebCore6Widget12setFrameRectERKNS_7IntRectE 601 601 __ZN7WebCore6Widget16removeFromParentEv 602 __ZN7WebCore6Widget17frameRectsChangedEv 602 603 __ZN7WebCore6Widget20retainPlatformWidgetEv 603 604 __ZN7WebCore6Widget21releasePlatformWidgetEv … … 610 611 __ZN7WebCore6WidgetC2EP6NSView 611 612 __ZN7WebCore6WidgetD2Ev 612 __ZN7WebCore6Widget17frameRectsChangedEv613 613 __ZN7WebCore7Console21shouldPrintExceptionsEv 614 614 __ZN7WebCore7Console24setShouldPrintExceptionsEb … … 999 999 __ZNK7WebCore9FrameView13paintBehaviorEv 1000 1000 __ZNK7WebCore9FrameView20isSoftwareRenderableEv 1001 __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv 1001 1002 __ZNK7WebCore9PageCache10frameCountEv 1002 1003 __ZNK7WebCore9PageCache21autoreleasedPageCountEv -
trunk/WebCore/page/FrameView.cpp
r58445 r58847 476 476 page->chrome()->client()->setNeedsOneShotDrawingSynchronization(); 477 477 } 478 479 bool FrameView::isEnclosedInCompositingLayer() const 480 { 481 RenderObject* frameOwnerRenderer = m_frame->ownerRenderer(); 482 return frameOwnerRenderer && frameOwnerRenderer->containerForRepaint(); 483 } 484 478 485 #endif // USE(ACCELERATED_COMPOSITING) 479 486 -
trunk/WebCore/page/FrameView.h
r58615 r58847 104 104 // content rendered via the normal painting path. 105 105 void setNeedsOneShotDrawingSynchronization(); 106 107 bool isEnclosedInCompositingLayer() const; 106 108 #endif 107 109 // Only used with accelerated compositing, but outside the #ifdef to make linkage easier. -
trunk/WebKit/ChangeLog
r58778 r58847 1 2010-05-05 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1) 6 https://bugs.webkit.org/show_bug.cgi?id=38427 7 8 * WebKit.xcodeproj/project.pbxproj: Renamed WebClipView.m to WebClipView.mm and changed it to 9 Objective-C++. 10 1 11 2010-05-03 Darin Adler <darin@apple.com> 2 12 -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r58350 r58847 270 270 939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */; }; 271 271 939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7174D02885C5B018635CA /* WebViewFactory.mm */; }; 272 939810EB0824BF01008DF038 /* WebClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.m */; };272 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.mm */; }; 273 273 939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446071020F50ED0ECA1767 /* WebDataSource.mm */; }; 274 274 939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.mm */; }; … … 577 577 9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = IDNScriptWhiteList.txt; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 578 578 933D659903413FF2008635CE /* WebClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebClipView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 579 933D659A03413FF2008635CE /* WebClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebClipView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };579 933D659A03413FF2008635CE /* WebClipView.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebClipView.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 580 580 9345D17C0365BF35008635CE /* English */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = wrapper.nib; name = English; path = Panels/English.lproj/WebAuthenticationPanel.nib; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 581 581 9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebJavaScriptTextInputPanel.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 1102 1102 8373435B0624EE0D00F3B289 /* WebArchive.mm */, 1103 1103 933D659903413FF2008635CE /* WebClipView.h */, 1104 933D659A03413FF2008635CE /* WebClipView.m */,1104 933D659A03413FF2008635CE /* WebClipView.mm */, 1105 1105 39446070020F50ED0ECA1767 /* WebDataSource.h */, 1106 1106 39446071020F50ED0ECA1767 /* WebDataSource.mm */, … … 1791 1791 5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */, 1792 1792 14D825300AF955090004F057 /* WebChromeClient.mm in Sources */, 1793 939810EB0824BF01008DF038 /* WebClipView.m in Sources */,1793 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */, 1794 1794 065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */, 1795 1795 939810BF0824BF01008DF038 /* WebCoreStatistics.mm in Sources */, -
trunk/WebKit/mac/ChangeLog
r58846 r58847 1 2010-05-05 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1) 6 https://bugs.webkit.org/show_bug.cgi?id=38427 7 8 * WebView/WebClipView.m: Renamed to WebClipView.mm. 9 * WebView/WebClipView.mm: 10 (-[WebClipView visibleRect]): Added this override, which for instances used for WebFrameViews in 11 composited layers, returns the clip view’s entire bounds. This prevents drawing from being clipped to 12 AppKit’s idea of what part of the view would be visible if it was drawn as part of the view hierarchy. 13 Since it is drawn into a compositing layer, that’s irrelevant, and we should not be clipping. 14 * WebView/WebHTMLView.mm: 15 (setCursor): Style tweak. 16 (setNeedsDisplayInRect): Added. Replaces the default implementation of -[NSView setNeedsDisplayInRect:], 17 so that if the receiver is a descendant of a WebFrameView that draws into a composited layer, the invalidation 18 is routed back through the WebCore FrameView, which propagates it to the layer. 19 (+[WebHTMLViewPrivate initialize]): Swizzle the setNeedsDisplayInRect: override in. 20 (-[WebHTMLView visibleRect]): Removed whitespace. 21 * WebView/WebView.mm: 22 (layerSyncRunLoopObserverCallBack): If we bailed out on syncing, due to pending layout, do an eager layout 23 in preparation for the displaying of compositing layers. 24 1 25 2010-05-05 John Sullivan <sullivan@apple.com> 2 26 -
trunk/WebKit/mac/WebView/WebClipView.mm
r58764 r58847 29 29 #import "WebClipView.h" 30 30 31 #import <WebKit/WebHTMLView.h>32 #import <WebKit/WebNSViewExtras.h>33 #import <WebKit/WebViewPrivate.h>34 #import < wtf/Assertions.h>31 #import "WebFrameInternal.h" 32 #import "WebFrameView.h" 33 #import "WebViewPrivate.h" 34 #import <WebCore/FrameView.h> 35 35 36 36 // WebClipView's entire reason for existing is to set the clip used by focus ring redrawing. … … 41 41 42 42 // FIXME: Change terminology from "additional clip" to "focus ring clip". 43 44 using namespace WebCore; 43 45 44 46 @interface NSView (WebViewMethod) … … 67 69 return self; 68 70 } 71 72 #if USE(ACCELERATED_COMPOSITING) 73 - (NSRect)visibleRect 74 { 75 WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview]; 76 if (![webFrameView isKindOfClass:[WebFrameView class]]) 77 return [super visibleRect]; 78 79 if (Frame* coreFrame = core([webFrameView webFrame])) { 80 if (FrameView* frameView = coreFrame->view()) { 81 if (frameView->isEnclosedInCompositingLayer()) 82 return [self bounds]; 83 } 84 } 85 86 return [super visibleRect]; 87 } 88 #endif 69 89 70 90 - (void)resetAdditionalClip -
trunk/WebKit/mac/WebView/WebHTMLView.mm
r58802 r58847 181 181 182 182 // Overriding an internal method is a hack; <rdar://problem/7662987> tracks finding a better solution. 183 static void setCursor(NSWindow *self, SEL cmd, NSPoint point)183 static void setCursor(NSWindow *self, SEL cmd, NSPoint point) 184 184 { 185 185 if (needsCursorRectsSupportAtPoint(self, point)) … … 223 223 - (NSRect)_dirtyRect; 224 224 - (void)_setDrawsOwnDescendants:(BOOL)drawsOwnDescendants; 225 - (BOOL)_drawnByAncestor; 225 226 - (void)_propagateDirtyRectsToOpaqueAncestors; 226 227 - (void)_windowChangedKeyState; … … 229 230 #endif 230 231 @end 232 233 #if USE(ACCELERATED_COMPOSITING) 234 static IMP oldSetNeedsDisplayInRectIMP; 235 236 static void setNeedsDisplayInRect(NSView *self, SEL cmd, NSRect invalidRect) 237 { 238 if (![self _drawnByAncestor]) { 239 oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect); 240 return; 241 } 242 243 static Class webFrameViewClass = [WebFrameView class]; 244 WebFrameView *enclosingWebFrameView = (WebFrameView *)self; 245 while (enclosingWebFrameView && ![enclosingWebFrameView isKindOfClass:webFrameViewClass]) 246 enclosingWebFrameView = (WebFrameView *)[enclosingWebFrameView superview]; 247 248 if (!enclosingWebFrameView) { 249 oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect); 250 return; 251 } 252 253 FrameView* frameView = core([enclosingWebFrameView webFrame])->view(); 254 if (!frameView || !frameView->isEnclosedInCompositingLayer()) { 255 oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect); 256 return; 257 } 258 259 NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self]; 260 IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates); 261 if (![enclosingWebFrameView isFlipped]) 262 invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.bottom()); 263 264 frameView->invalidateRect(invalidRectInFrameViewCoordinates); 265 } 266 #endif // USE(ACCELERATED_COMPOSITING) 231 267 232 268 @interface NSApplication (WebNSApplicationDetails) … … 504 540 ASSERT(oldSetCursorForMouseLocationIMP); 505 541 } 506 #else 542 543 #if USE(ACCELERATED_COMPOSITING) 544 if (!oldSetNeedsDisplayInRectIMP) { 545 Method setNeedsDisplayInRectMethod = class_getInstanceMethod([NSView class], @selector(setNeedsDisplayInRect:)); 546 ASSERT(setNeedsDisplayInRectMethod); 547 oldSetNeedsDisplayInRectIMP = method_setImplementation(setNeedsDisplayInRectMethod, (IMP)setNeedsDisplayInRect); 548 ASSERT(oldSetNeedsDisplayInRectIMP); 549 } 550 #endif // USE(ACCELERATED_COMPOSITING) 551 552 #else // defined(BUILDING_ON_TIGER) 507 553 if (!oldSetCursorIMP) { 508 554 Method setCursorMethod = class_getInstanceMethod([NSCursor class], @selector(set)); … … 3334 3380 if (!([[self superview] isKindOfClass:[WebClipView class]])) 3335 3381 return [super visibleRect]; 3336 3382 3337 3383 WebClipView *clipView = (WebClipView *)[self superview]; 3338 3384 -
trunk/WebKit/mac/WebView/WebView.mm
r58846 r58847 5623 5623 if ([webView _syncCompositingChanges]) 5624 5624 [webView _clearLayerSyncLoopObserver]; 5625 else { 5626 // Since the WebView does not need display, -viewWillDraw will not be called. Perform pending layout now, 5627 // so that the layers draw with up-to-date layout. 5628 [webView _viewWillDrawInternal]; 5629 } 5625 5630 } 5626 5631
Note:
See TracChangeset
for help on using the changeset viewer.