2011-01-22 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=52473 Auto-scaling to avoid orphans is broken, remove dysfunctional code * WebView/WebHTMLView.mm: (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]): (-[WebHTMLView _scaleFactorForPrintOperation:]): (-[WebHTMLView knowsPageRange:]): 2011-01-21 Mark Rowe Rubber-stamped by Jon Honeycutt. Fix the build when using Clang by removing some unused variables. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView updateAndSetWindow]): * WebView/WebFullScreenController.mm: (-[WebFullScreenController enterFullscreen:]): (-[WebFullScreenController exitFullscreen]): 2011-01-21 Chris Rogers Reviewed by Darin Fisher. Add run-time enable support for the web audio API https://bugs.webkit.org/show_bug.cgi?id=52741 * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences webAudioEnabled]): (-[WebPreferences setWebAudioEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2011-01-20 John Sullivan Reviewed by Mark Rowe. Shift-tab doesn't cycle through fields in http authentication panel https://bugs.webkit.org/show_bug.cgi?id=52850 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: Re-wired the key loop so that there aren't two views with the same nextKeyView. 2011-01-20 Beth Dakin Reviewed by Geoffrey Garen. Fix for Allow WebKitSystemInterface to draw scrollbars when appropriate. * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-01-19 Simon Fraser Reviewed by Sam Weinig. GraphicsLayers in subframes can get sync'd multiple times https://bugs.webkit.org/show_bug.cgi?id=52489 * WebView/WebView.mm: (-[WebView _syncCompositingChanges]): syncCompositingStateRecursive() was renamed to syncCompositingStateIncludingSubframes(). 2011-01-19 Darin Adler Reviewed by Sam Weinig. Would like script debugging protocol method to differentiate between caught and uncaught exceptions https://bugs.webkit.org/show_bug.cgi?id=52104 rdar://problem/8704226 * WebView/WebDelegateImplementationCaching.h: Fix type of second integer in CallScriptDebugDelegate function overload to be int to match the actual Objective-C method. Added a new overload that includes a BOOL in the right place. Added a boolean named exceptionWasRaisedExpectsHasHandlerFlag. * WebView/WebDelegateImplementationCaching.mm: (CallDelegate): Added overloads as above. (CallScriptDebugDelegate): Ditto. * WebView/WebScriptDebugDelegate.h: Added new method with the additional boolean argument. Marked the old method informally deprecated. * WebView/WebScriptDebugger.mm: (WebScriptDebugger::exception): Added code to call with or without the boolean depending on exceptionWasRaisedExpectsHasHandlerFlag. * WebView/WebView.mm: (-[WebView _cacheScriptDebugDelegateImplementations]): Set up the exceptionWasRaisedExpectsHasHandlerFlag. Also fixed old code that was not guaranteed to set didParseSourceExpectsBaseLineNumber to NO. 2011-01-19 Tony Gentilcore Reviewed by Mihai Parparita. Perform some forward declaration https://bugs.webkit.org/show_bug.cgi?id=52522 * Misc/WebKitNSStringExtras.mm: 2011-01-19 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: [JSC] scripts have incorrect starting line (always 1). https://bugs.webkit.org/show_bug.cgi?id=52721 * WebView/WebScriptDebugger.h: * WebView/WebScriptDebugger.mm: (toNSString): (WebScriptDebugger::sourceParsed): 2011-01-19 Levi Weintraub Reviewed by Ryosuke Niwa. Updating to use Position::parentAnchoredEquivalent instead of the old htmlediting rangeCompliantEquivalent. remove rangeCompliantEquivalent and replace it with Position methods https://bugs.webkit.org/show_bug.cgi?id=25057 * WebView/WebFrame.mm: (-[WebFrame _smartDeleteRangeForProposedRange:]): 2011-01-18 Chris Fleizach Reviewed by Darin Adler. REGRESSION: A problem with Voiceover and finding links https://bugs.webkit.org/show_bug.cgi?id=52324 * WebView/WebDynamicScrollBarsView.mm: (-[WebDynamicScrollBarsView accessibilityIsIgnored]): 2011-01-17 David Kilzer Add missing DOMDocument/DOMDocumentFragment headers to Xcode project Reviewed by Dan Bernstein. * MigrateHeaders.make: Copy DOMDocumentFragmentPrivate.h and DOMDocumentPrivate.h to the PrivateHeaders directory. 2011-01-17 Enrica Casucci Reviewed by Alexey Proskuryakov. Drag and drop support: refactoring of image from link and image from selection https://bugs.webkit.org/show_bug.cgi?id=52496 This work cleans up the Mac code and makes it more similar to the Windows implementation, avoiding the use of an NSView when the FrameView can be used. The refactoring is a necessary step towards the complete support of drag and drop in WebKit2. * WebCoreSupport/WebDragClient.mm: (WebDragClient::createDragImageForLink): Added. * WebView/WebHTMLView.mm: Removed dragImageFromLink and dragImageFromURL. * WebView/WebHTMLViewPrivate.h: Removed dragImageFromLink and dragImageFromURL. 2011-01-17 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: simplify debugger enabling routine. https://bugs.webkit.org/show_bug.cgi?id=52472 * WebInspector/WebInspector.mm: (-[WebInspector startDebuggingJavaScript:]): 2011-01-16 Dan Bernstein Reviewed by Simon Fraser. Assertion failure (!inSetWindow) with in-process plug-in in plugins/destroy-on-setwindow.html https://bugs.webkit.org/show_bug.cgi?id=52550 * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView setWindowIfNecessary]): Removed the assertion, making sure that inSetWindow remains YES until we exit the top-level setWindowIfNecessary. 2011-01-16 Simon Fraser Reviewed by Dan Bernstein. Issues with iframes and plugins when the WebView is scaled. When _scaleWebView has been called on a WebView, iframes in WebKit1 render and hit-test incorrectly, and plug-ins don't scale up. This is caused by AppKit NSViews not playing nicely with the scale applied through style. Work around most of these issues by adjusting the bounds size of widgets to allow iframe contents to paint with the correct scale, and fix various places in the code where we relied on coordinate transforms via NSViews (which ignore CSS transforms). * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView updateAndSetWindow]): * WebView/WebFrameView.mm: (-[WebFrameView setBoundsSize:]): 2011-01-16 Beth Dakin Reviewed by Kevin Decker. Fix for Don't try to save elasticity state. Just rely on NSScrollElasticityAutomatic to restore the correct state. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::WebFrameLoaderClient): (WebFrameLoaderClient::dispatchDidFirstLayout): (WebFrameLoaderClient::provisionalLoadStarted): 2011-01-14 Simon Fraser Reviewed by Dan Bernstein. Plugins render incorrectly with transformed ancestors https://bugs.webkit.org/show_bug.cgi?id=52507 -[NSView visibleRect] gives the wrong answer if there are CSS transforms in the ancestor chain of a plugin. So use of this method with calls to -actualVisibleRectInWindow, which maps rects through the render tree to compute the correct rect, clipping via windowClipRect() if necessary. Not testable, because doing so relies on the behavior of some plugins, which stop rendering if setWindow passes an empty rect. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView updateAndSetWindow]): * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView actualVisibleRectInWindow]): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): 2011-01-14 Yuzo Fujishima Reviewed by Antti Koivisto. Rename cache() to memoryCache() https://bugs.webkit.org/show_bug.cgi?id=52433 * Misc/WebCache.mm: (+[WebCache statistics]): (+[WebCache setDisabled:]): (+[WebCache isDisabled]): * WebView/WebView.mm: (+[WebView _setCacheModel:]): 2011-01-13 Geoffrey Garen Reviewed by Oliver Hunt. Split out a MarkedSpace strategy object from Heap. https://bugs.webkit.org/show_bug.cgi?id=52421 * Misc/WebCoreStatistics.mm: (+[WebCoreStatistics memoryStatistics]): Updated for class move. 2011-01-14 Dan Bernstein Reviewed by Simon Fraser. WebKit/mac part of Crash in -[NSView _invalidateGStatesForTree] * WebView/WebHTMLView.mm: (-[WebHTMLView _invalidateGStatesForTree]): Override this NSView method, and bracket the call to the superclass implementation with suspending WebCore Widget hierarchy updates. This ensures that the NSView tree doesn’t change from under AppKit as it traverses it. 2011-01-14 Beth Dakin Reviewed by Mark Rowe. Fix for Artifacts when scrolling page in Safari while page is loading Call setDrawsBackground:YES on the scrollView in dispatchDidFirstLayout() rather than waiting until frameLoadCompleted(). Also suspend scrolling elasticity between provisionalLoadStarted() and dispatchDidFirstLayout() * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::WebFrameLoaderClient): (WebFrameLoaderClient::dispatchDidFirstLayout): (WebFrameLoaderClient::provisionalLoadStarted): 2011-01-12 Enrica Casucci Reviewed by Darin Adler. WebKit2: Add support for drag and drop https://bugs.webkit.org/show_bug.cgi?id=52343 The DragData class has been extended to provide additional context from the application (keyboard state, modal windows, etc.) as well as information of the drag pasteboard being used. These are the changes to align the behavior for WebKit. * WebView/WebView.mm: (-[WebView applicationFlags:]): Added. (-[WebView draggingEntered:]): Added parameter to the DragData constructor. (-[WebView draggingUpdated:]): Added parameter to the DragData constructor. (-[WebView draggingExited:]): Added parameter to the DragData constructor. (-[WebView performDragOperation:]): Added parameter to the DragData constructor. 2011-01-12 Beth Dakin Reviewed by Anders Carlsson. Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose fixed layout through WebKit SPI -and corresponding- And now with getters! * WebView/WebView.mm: (-[WebView _useFixedLayout]): (-[WebView _fixedLayoutSize]): * WebView/WebViewPrivate.h: 2011-01-12 Beth Dakin Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose fixed layout through WebKit SPI -and corresponding- * WebView/WebView.mm: (-[WebView _setUseFixedLayout:]): (-[WebView _setFixedLayoutSize:]): * WebView/WebViewPrivate.h: 2011-01-07 Enrica Casucci Reviewed by Alexey Proskuryakov. Paste and drag and drop use different code paths to interact with the pasteboard. https://bugs.webkit.org/show_bug.cgi?id=52093 The change consists in a refactoring of the code to have only one class that deals with the pasteboard on Mac. * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality exposed by NSURLExtras. (WebEditorClient::canonicalizeURL): (WebEditorClient::canonicalizeURLString): * WebCoreSupport/WebPasteboardHelper.h: Removed. * WebCoreSupport/WebPasteboardHelper.mm: Removed. * WebView/WebHTMLView.mm: Removed comment. * WebView/WebView.mm: The following methods have been changed to use the new DragData constructor that doesn't use the WebPasteboardHelper reference. (-[WebView draggingEntered:]): (-[WebView draggingUpdated:]): (-[WebView draggingExited:]): (-[WebView performDragOperation:]): 2011-01-09 Tony Gentilcore Reviewed by Alexey Proskuryakov. Forward declare some headers where possible https://bugs.webkit.org/show_bug.cgi?id=52133 * WebView/WebFrame.mm: 2011-01-09 Xianzhu Wang Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=41441 createWindow method should only do window-creating without URL navigation * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::createWindow): 2011-01-08 Dan Bernstein Try to fix the Leopard build. * WebView/WebFullScreenController.mm: 2011-01-07 Jer Noble Yet another Leopard build fix: NSRect and CGRect are not inter- changable in 32-bit. * WebView/WebFullScreenController.mm: (-[WebFullScreenController exitFullscreen]): 2011-01-07 Jer Noble Fix the Leopard build: Replace CoreAnimation SL-only functions with Leopard equivalents. * WebView/WebFullScreenController.mm: (+[CATransaction setDisableActions:]): (+[CATransaction setAnimationDuration:]): (-[WebFullScreenController _animationDuration]): (-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]): 2010-12-21 Jer Noble Reviewed by Simon Fraser. Implement WebKit Full Screen support. https://bugs.webkit.org/show_bug.cgi?id=49481 rdar://problem/8247444 Support the new fullscreen Chrome client requests. WebView will pass through these requests to a WebFullscreenController. * WebCoreSupport/WebChromeClient.h: Add fullScreenRendererChanged(). * WebView/WebView.mm: (-[WebView _supportsFullScreenForElement:WebCore::]): Check to see if the fullscreen pref has been enabled. (-[WebView _enterFullScreenForElement:WebCore::]): Create a WebFullScreenController. (-[WebView _exitFullScreenForElement:WebCore::]): Request that the WebFullScreenController exit fullscreen. (-[WebView _fullScreenRendererChanged:WebCore::]): Notify the WebFullScreenController that its renderer has changed. * WebView/WebViewData.h: Add ivar newFullscreenController. 2010-12-17 Jer Noble Reviewed by Simon Fraser. Implement WebKit Full Screen support. https://bugs.webkit.org/show_bug.cgi?id=49481 rdar://problem/8247444 This patch implements the FullScreen APIs using the new RenderFullScreen renderer and the new Document client APIs. The RenderFullScreen renderer's CALayer is hosted in a new, fullscreen window, and a custom CAAnimation animates that layer between the initial screen rect of the full screen element, to its final value. WebFullscreenController will swap the WebView out of its original window, and into the fullscreen window. The controller will replace the WebView with a placeholder view, so that if the placeholder moves or resized while the WebView is absent, the WebView will move back to the correct location when exiting fullscreen. * WebView/WebFullscreenController.h: Added. * WebView/WebFullscreenController.mm: Added. (-[WebFullscreenController windowDidExitFullscreen:]): Close the fullscreen window. (-[WebFullscreenController windowDidEnterFullscreen:]): Swap the webView back into the fullscreen window. (-[WebFullscreenController animationDidStop:finished:]): Call windowDid{Exit|Enter}FullScreen as appropriate. (-[WebFullscreenController applicationDidResignActive:]): (-[WebFullscreenController applicationDidChangeScreenParameters:]): Resize the fullscreen window to match the new screen parameters. (-[WebFullscreenController enterFullscreen:]): Set up the animation that will take the fullscreen element from its original screen rect into fullscreen. (-[WebFullscreenController exitFullscreen]): Swap the webView back into its original window. Set up the animation that will take the fullscreen element back into its original screen rect. (-[WebFullscreenController _updatePowerAssertions]): Now checks _isAnyMoviePlaying to determine whether to disable screensaver and sleep. (-[WebFullscreenController _isAnyMoviePlaying]): Walks through the sub-tree starting at the fullscreen element looking for HTMLVideoElements; returns whether any are found to be playing. (-[WebFullscreenController _animationDuration]): Returns the current animation duration, affected by control and shift keys. (-[WebFullscreenWindow canBecomeKeyWindow]): Allow the window to become key. (-[WebFullscreenWindow keyDown:]): Handle the 'Esc' key. (-[WebFullscreenWindow cancelOperation:]): Request to exit fullscreen. (-[WebFullscreenWindow rendererLayer]): Convenience accessor. (-[WebFullscreenWindow setRendererLayer:]): Ditto. (-[WebFullscreenWindow backgroundLayer]): Ditto. (-[WebFullscreenWindow animationView]): Ditto. (MediaEventListener::MediaEventListener): Implements the EventListener protocol. (MediaEventListener::handleEvent): Tells its delegate to _updatePowerAssertions. 2011-01-07 James Robinson Revert "Implement mozilla's animationTime property" https://bugs.webkit.org/show_bug.cgi?id=51952 This approach isn't quite right. * WebView/WebHTMLView.mm: (-[WebHTMLView drawRect:]): * WebView/WebView.mm: (layerSyncRunLoopObserverCallBack): 2011-01-06 Gavin Barraclough Reviewed by Geoff Garen. Bug 52035 - Unregistering DOMWrapperWorlds is unsafe The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's destructor early, in order to release wrappers once we know we no longer intend to use them. Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to lose any state stored on them) it is not okay to deregister the world from the JSGlobalData. A sequence of events that triggers the bug would look like this: (1) Create a DOMWrapperWorld. (2) Register a timer in the world. (3) Call unregisterWorld() on the world. (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document. (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've called forgetWorld() none exists. (6) Attempt to add a wrapper to a NULL map. Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away. * WebView/WebScriptWorld.mm: (-[WebScriptWorld unregisterWorld]): 2011-01-04 Chris Fleizach Reviewed by Sam Weinig. WK2: Support Accessibility https://bugs.webkit.org/show_bug.cgi?id=51859 Use rootObject() method to get top of AX tree. * WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient::accessibilityRemoteObject): * WebView/WebFrame.mm: (-[WebFrame setAccessibleName:]): (-[WebFrame accessibilityRoot]): * WebView/WebFrameInternal.h: * WebView/WebFramePrivate.h: * WebView/WebHTMLView.mm: (-[WebHTMLView accessibilityAttributeValue:]): (-[WebHTMLView accessibilityFocusedUIElement]): (-[WebHTMLView accessibilityHitTest:]): (-[WebHTMLView _accessibilityParentForSubview:]): 2011-01-04 David Kilzer WebFrameLoaderClient::createMediaPlayerProxyPlugin() should use WebCore::PluginInfo.name Reviewed by Eric Carlson. This originally broke in r61581. It is inside an ENABLE(PLUGIN_PROXY_FOR_VIDEO) macro, so it didn't break the Mac build then. * WebCoreSupport/WebFrameLoaderClient.mm: Call (WebFrameLoaderClient::createMediaPlayerProxyPlugin): Updated to use WebCore::PluginInfo.name instead of -[WebBasePluginPackage name]. 2011-01-02 Dan Bernstein Rubber-stamped by Simon Fraser. Update copyright strings * Info.plist: 2010-12-29 Dan Bernstein Reviewed by Ada Chan. REGRESSION (r72887): Mail crashes when doing searches in a message due to method name conflict https://bugs.webkit.org/show_bug.cgi?id=51717 Renamed -findString:options: to -_findString:options: in the WebDocumentOptionsSearching protocol to avoid conflict with -[WebHTMLView(MailExtras) findString:options:] which Mail defines. * WebView/WebDocumentInternal.h: * WebView/WebHTMLView.mm: (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): (-[WebHTMLView _findString:options:]): * WebView/WebView.mm: (findString): 2010-12-28 Daniel Bates Reviewed by Sam Weinig. Substitute // MARK: for compiler-specific #pragma mark https://bugs.webkit.org/show_bug.cgi?id=51657 For consistency, we should substitute "// MARK:" for compiler- specific "#pragma mark" in the source files for the Mac port. * History/WebHistory.mm: * Plugins/WebBaseNetscapePluginView.mm: * Plugins/WebNetscapePluginView.mm: * WebCoreSupport/WebInspectorClient.mm: * WebCoreSupport/WebSecurityOrigin.mm: * WebView/WebPDFView.mm: * WebView/WebVideoFullscreenController.mm: * WebView/WebVideoFullscreenHUDWindowController.mm: 2010-12-23 Yongjun Zhang Reviewed by Darin Adler. WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe. https://bugs.webkit.org/show_bug.cgi?id=38535 WebScriptDebugger in WebKit has empty implementations for willExecuteProgram and didExecuteProgram. As a result, if the top call frame is from a program, WebKitScriptDebugger doesn't record that callframe as the top frame, and WebScriptDebugger's callframe stack is wrong from this point. That could cause crash if we trying to access the top call frame from this stack when an exception throws because the saved top frame could be invalid. To fix that, we need to maintain the call frame stack in willExecuteProgram and didExecuteProgram, as we did in callEvent and returnEvent. * WebView/WebScriptDebugger.mm: (WebScriptDebugger::willExecuteProgram): (WebScriptDebugger::didExecuteProgram): 2010-12-22 Sam Weinig Reviewed by Darin Adler. WebKit2 needs to mirror the frame tree in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=51546 - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::didSaveToPageCache): (WebFrameLoaderClient::didRestoreFromPageCache): 2010-12-22 Ryosuke Niwa Reviewed by Eric Seidel. Editor.h doesn't need to include SelectionController.h https://bugs.webkit.org/show_bug.cgi?id=51441 Renamed SelectionController::EDirection to SelectionDirection. * WebView/WebFrame.mm: (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:granularity:]): Takes SelectionDirection instead of SelectionController::EDirection. * WebView/WebFrameInternal.h: * WebView/WebTextCompletionController.mm: (-[WebTextCompletionController doCompletion]): Calls _rangeByAlteringCurrentSelection:SelectionController. 2010-12-22 Simon Fraser Reviewed by Darin Adler. Cache snapshots of plug-ins before painting, to avoid script running during painting https://bugs.webkit.org/show_bug.cgi?id=51493 When FrameView is asked to do a flattening paint (e.g. when Safari snapshots, or when printing), plug-ins which otherwise use the CA rendering model are sent a paint event. Some plug-ins may run script while handling this event, or out of process plug-ins may process queued requests at this time. Running script while inside layout or painting can have bad consequences, because it can result in arbitrary changes to the render tree. This patch avoids sending plug-ins paint events inside of painting. Instead, we ask the plug-ins to cache a snapshot before we paint, and then the software paint simply draws that snapshot. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView drawRect:]): If we have a cached snapshot, draw it. Also only send the snapshot message to the plugin proxy if we know we're snapshotting, since even if creating the snapshot image failed, we still don't want to call to the plug-in. * Plugins/WebBaseNetscapePluginView.h: Add a retained NSImage member for the snapshot. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView cacheSnapshot]): Create an image and draw the snapshot into it. (-[WebBaseNetscapePluginView clearCachedSnapshot]): Clear the snapshot. * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView drawRect:]): If we have a cached snapshot, use it. * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::notifyWidget): Implement notifyWidget() and use it to cache and clear the snapshots. 2010-12-21 Cameron Zwarich Reviewed by Darin Adler. -[WebBasePluginPackage isNativeLibraryData:] integer underflows on zero-sized data https://bugs.webkit.org/show_bug.cgi?id=51431 * Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage isNativeLibraryData:]): Change an arithmetic expression so it doesn't underflow. 2010-12-16 Ryosuke Niwa Reviewed by Cameron Zwarich. REGRESSION(r74172): 125 java tests fail on Mac https://bugs.webkit.org/show_bug.cgi?id=51214 The regression was caused by an incorrectly adding sizeof(struct fat_header) to a pointer for uint32_t as supposed to uint8_t. Fixed the bug by explicitly casting it to uint8_t* before the addition. * Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage isNativeLibraryData:]): 2010-12-15 Cameron Zwarich Reviewed by Darin Adler. Clang -Wcast-align gives an error in WebBasePluginPackage.mm https://bugs.webkit.org/show_bug.cgi?id=51144 Fix an alignment issue. OSSwapInt32 takes data that is 32-bit aligned on ARM, but we were calling it on a byte array 32 bits at a time. While this is okay in practice, since TCMalloc won't give us a non-32-bit aligned block array of bytes and Vector's inline storage is at the beginning of the Vector, it is still better to fix this and silence the warning. * Plugins/WebBasePluginPackage.mm: (swapIntsInHeader): (-[WebBasePluginPackage isNativeLibraryData:]): 2010-12-14 Mark Rowe Reviewed by Sam Weinig. Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading