Changeset 18997 in webkit
- Timestamp:
- Jan 19, 2007 7:21:32 PM (17 years ago)
- Location:
- branches/Safari-2-0-branch/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Safari-2-0-branch/WebKit/ChangeLog
r18929 r18997 1 2007-01-09 Kevin Decker <kdecker@apple.com> 2 3 Reviewed by Adam. 4 5 Merged r10259 and r15845 from TOT to Safari-2-0-branch. 6 7 2006-08-11 Tim Omernick <timo@apple.com> 8 9 Reviewed by Darin. 10 11 <http://bugzilla.opendarwin.org/show_bug.cgi?id=10111> - Menu flickers over Flash content 12 <rdar://problem/3052546> Plugins don't work with z-index (overlapping elements, etc.) 13 14 * Plugins/WebBaseNetscapePluginView.m: 15 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): 16 Don't just clip to the dirty region for "transparent" plug-ins -- do it for all plug-ins. This is a 17 generally useful thing to do, as it prevents the plug-in from drawing over parts of the window that 18 have already been drawn and are not expected to be redrawn in the same update. 19 20 2005-09-13 Tim Omernick <tomernick@apple.com> 21 22 Reviewed by Justin Garcia, Darin Adler. 23 24 - <rdar://problem/3163393> Safari does not support Windowless mode in Flash 25 26 * Plugins.subproj/WebBaseNetscapePluginView.h: 27 Added 'isTransparent' instance variable. 28 29 * Plugins.subproj/WebBaseNetscapePluginView.m: 30 (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]): 31 When updating a plugin in "windowless" (transparent) mode, clip drawing to the dirty 32 region of the opaque ancestor. This means that a partially-transparent plugin, which 33 by definition does not clear its port on redraw, will not overdraw the valid parts 34 of its port. 35 (-[WebBaseNetscapePluginView sendEvent:]): 36 Disabled the "green debug background" for transparent plugins -- since they are not 37 expected to cover their entire port every redraw, this debug code makes no sense. 38 (-[WebBaseNetscapePluginView setVariable:value:]): 39 Implemented -setVariable:value:, which is called from NPN_SetValue() (previously 40 unimplemented). 41 Right now we only handle NPPVpluginTransparentBool; if we choose to handle the other 42 plugin variables, then we may do so here. 43 * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h: 44 Added SPI for -[WebBaseNetscapePluginView setVariable:value]. 45 * Plugins.subproj/npapi.m: 46 (NPN_SetValue): 47 Implemented this function so that plugins may set state (such as window mode). 48 1 49 2007-01-18 Mark Rowe <mrowe@apple.com> 2 50 … … 9904 9952 9905 9953 Work on text-align API. Marked these bugs fixed: 9906 <rdar://problem/3655380>: (Editing: Ê-alignCenter:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI))9907 <rdar://problem/3655381>: (Editing: Ê-alignJustified:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI))9908 <rdar://problem/3655383>: (Editing: Ê-alignLeft:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI))9909 <rdar://problem/3655384>: (Editing: Ê-alignRight:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI))9954 <rdar://problem/3655380>: (Editing: -alignCenter: method unimplemented (WebKit editing API)) 9955 <rdar://problem/3655381>: (Editing: -alignJustified: method unimplemented (WebKit editing API)) 9956 <rdar://problem/3655383>: (Editing: -alignLeft: method unimplemented (WebKit editing API)) 9957 <rdar://problem/3655384>: (Editing: -alignRight: method unimplemented (WebKit editing API)) 9910 9958 9911 9959 in favor of opening this bug: … … 9934 9982 Reviewed by Ken. 9935 9983 9936 - fixed <rdar://problem/3655378>: (Editing: Ê-changeDocumentBackgroundColor:Ê9937 method ÊunimplementedÊ(WebKitÊeditingÊAPI))9984 - fixed <rdar://problem/3655378>: (Editing: -changeDocumentBackgroundColor: 9985 method unimplemented (WebKit editing API)) 9938 9986 - made startSpeaking: actually work; previous implementation raised a DOMException 9939 9987 -
branches/Safari-2-0-branch/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
r8639 r18997 1 1 /* 2 2 WebBaseNetscapePluginView.h 3 3 Copyright 2002, Apple, Inc. All rights reserved. 4 4 */ 5 5 … … 37 37 BOOL hasFocus; 38 38 BOOL currentEventIsUserGesture; 39 39 BOOL isTransparent; 40 40 41 int32 specifiedHeight; 41 42 int32 specifiedWidth; -
branches/Safari-2-0-branch/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
r14154 r18997 297 297 window.clipRect.right + nPort.portx, window.clipRect.bottom + nPort.porty); 298 298 299 // Clip to dirty region so plug-in does not draw over already-drawn regions of the window that are 300 // not going to be redrawn this update. This forces plug-ins to play nice with z-index ordering. 301 if (forUpdate) { 302 RgnHandle viewClipRegion = NewRgn(); 303 304 // Get list of dirty rects from the opaque ancestor -- WebKit does some tricks with invalidation and 305 // display to enable z-ordering for NSViews; a side-effect of this is that only the WebHTMLView 306 // knows about the true set of dirty rects. 307 NSView *opaqueAncestor = [self opaqueAncestor]; 308 const NSRect *dirtyRects; 309 int dirtyRectCount, dirtyRectIndex; 310 [opaqueAncestor getRectsBeingDrawn:&dirtyRects count:&dirtyRectCount]; 311 312 for (dirtyRectIndex = 0; dirtyRectIndex < dirtyRectCount; dirtyRectIndex++) { 313 NSRect dirtyRect = [self convertRect:dirtyRects[dirtyRectIndex] fromView:opaqueAncestor]; 314 if (!NSEqualSizes(dirtyRect.size, NSZeroSize)) { 315 // Create a region for this dirty rect 316 RgnHandle dirtyRectRegion = NewRgn(); 317 SetRectRgn(dirtyRectRegion, NSMinX(dirtyRect), NSMinY(dirtyRect), NSMaxX(dirtyRect), NSMaxY(dirtyRect)); 318 319 // Union this dirty rect with the rest of the dirty rects 320 UnionRgn(viewClipRegion, dirtyRectRegion, viewClipRegion); 321 DisposeRgn(dirtyRectRegion); 322 } 323 } 324 325 // Intersect the dirty region with the clip region, so that we only draw over dirty parts 326 SectRgn(clipRegion, viewClipRegion, clipRegion); 327 DisposeRgn(viewClipRegion); 328 } 329 299 330 portState.forUpdate = forUpdate; 300 331 … … 395 426 // Draw green to help debug. 396 427 // If we see any green we know something's wrong. 397 if ( event->what == updateEvt) {428 if (!isTransparent && event->what == updateEvt) { 398 429 ForeColor(greenColor); 399 430 const Rect bigRect = { -10000, -10000, 10000, 10000 }; … … 1780 1811 } 1781 1812 1813 - (NPError)setVariable:(NPPVariable)variable value:(void *)value 1814 { 1815 switch (variable) { 1816 case NPPVpluginTransparentBool: 1817 { 1818 BOOL newTransparent = (value != 0); 1819 1820 // Redisplay if transparency is changing 1821 if (isTransparent != newTransparent) 1822 [self setNeedsDisplay:YES]; 1823 1824 isTransparent = newTransparent; 1825 1826 return NPERR_NO_ERROR; 1827 } 1828 1829 default: 1830 return NPERR_GENERIC_ERROR; 1831 } 1832 } 1833 1782 1834 @end 1783 1835 -
branches/Safari-2-0-branch/WebKit/Plugins.subproj/WebBaseNetscapePluginViewPrivate.h
r7755 r18997 1 1 /* 2 2 WebBaseNetscapePluginView.h 3 3 Copyright 2002, Apple, Inc. All rights reserved. 4 4 */ 5 5 … … 24 24 - (void)forceRedraw; 25 25 - (NPError)getVariable:(NPNVariable)variable value:(void *)value; 26 - (NPError)setVariable:(NPPVariable)variable value:(void *)value; 26 27 @end -
branches/Safari-2-0-branch/WebKit/Plugins.subproj/npapi.m
r8157 r18997 1 1 /* 2 2 npapi.m 3 3 Copyright (c) 2002, Apple, Inc. All rights reserved. 4 4 */ 5 5 … … 81 81 } 82 82 83 SInt32 83 SInt32 NPN_Write(NPP instance, NPStream* stream, SInt32 len, void* buffer) 84 84 { 85 85 return [pluginViewForInstance(instance) write:stream len:len buffer:buffer]; … … 121 121 } 122 122 123 // Unsupported functions124 123 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) 125 124 { 126 LOG(Plugins, "NPN_SetValue"); 127 return NPERR_GENERIC_ERROR; 128 } 125 return [pluginViewForInstance(instance) setVariable:variable value:value]; 126 } 127 128 // Unsupported functions 129 129 130 130 void* NPN_GetJavaEnv(void) -
branches/Safari-2-0-branch/WebKit/WebKit.xcodeproj/project.pbxproj
r18929 r18997 302 302 DD9CC6C609FECEC600F1FCA3 /* WebPluginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DD9CC6C509FECEC600F1FCA3 /* WebPluginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 303 303 /* End PBXBuildFile section */ 304 305 /* Begin PBXBuildStyle section */ 306 0A4EC8CC0B61B19D005921FA /* Development */ = { 307 isa = PBXBuildStyle; 308 buildSettings = { 309 COPY_PHASE_STRIP = NO; 310 }; 311 name = Development; 312 }; 313 0A4EC8CD0B61B19D005921FA /* Deployment */ = { 314 isa = PBXBuildStyle; 315 buildSettings = { 316 COPY_PHASE_STRIP = YES; 317 }; 318 name = Deployment; 319 }; 320 /* End PBXBuildStyle section */ 304 321 305 322 /* Begin PBXFileReference section */ … … 1353 1370 isa = PBXProject; 1354 1371 buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */; 1372 buildSettings = { 1373 }; 1374 buildStyles = ( 1375 0A4EC8CC0B61B19D005921FA /* Development */, 1376 0A4EC8CD0B61B19D005921FA /* Deployment */, 1377 ); 1355 1378 hasScannedForEncodings = 1; 1356 1379 knownRegions = (
Note: See TracChangeset
for help on using the changeset viewer.