2013-12-23 Matthew Hanson Merge 161003: 2013-12-23 Lucas Forschler Update copyright strings Reviewed by Dan Bernstein * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist: * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist: * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: * Info.plist: * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 2013-12-11 Lucas Forschler Merge r160197 2013-12-05 Chris Fleizach AX: Seed: safari extension installation crashes safari under voice over and freezes voice over https://bugs.webkit.org/show_bug.cgi?id=125308 Reviewed by Anders Carlsson. Much like Javascript alerts, we need to allow accessibility clients to continue to interact with the WebProcess thread when using dispatchDecidePolicyResponses. * Platform/CoreIPC/MessageSender.h: (CoreIPC::MessageSender::sendSync): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 2013-12-11 Lucas Forschler Merge r159460 2013-11-18 David Hyatt Add a quirk to not respect center text-align when positioning https://bugs.webkit.org/show_bug.cgi?id=124522 Reviewed by Simon Fraser. Added fast/block/legacy-text-align-position-quirk.html * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesUseLegacyTextAlignPositionedElementBehavior): (WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-12-11 Lucas Forschler Merge r159173 2013-11-12 Anders Carlsson fast/canvas/webgl/draw-arrays-out-of-bounds.html is flaky on Mavericks WK2 testers, fails about 20% of the time https://bugs.webkit.org/show_bug.cgi?id=124223 Reviewed by Tim Horton. It's wrong to use DataReferences in sync IPC replies; the underlying MessageDecoder will be freed after the call to sendSync returns and the DataReference will point to freed memory. Use a Vector instead. * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/SynchronousNetworkLoaderClient.cpp: (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer): (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply): * NetworkProcess/SynchronousNetworkLoaderClient.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): 2013-11-13 Lucas Forschler Merge r159248 2013-11-13 Anders Carlsson Plug-in processes hang around for 10 sec after Safari quits https://bugs.webkit.org/show_bug.cgi?id=124314 Reviewed by Simon Fraser. Call stopRunLoop instead of instead of RunLoop::stop(). * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didClose): 2013-11-08 Matt Hanson Merge r158101. 2013-10-27 Brady Eidson WebIconDatabase can miss private browsing state changes. and https://bugs.webkit.org/show_bug.cgi?id=123375 Reviewed by Alexey Proskuryakov. * UIProcess/WebContext.cpp: (WebKit::WebContext::willStartUsingPrivateBrowsing): Call setAnyPageGroupMightHavePrivateBrowsingEnabled(true) on each context. (WebKit::WebContext::willStopUsingPrivateBrowsing): Call setAnyPageGroupMightHavePrivateBrowsingEnabled(false) on each context. (WebKit::WebContext::setPrivateBrowsingEnabled): In addition to notifying other processes about private browsing sessions, notify the context’s WebIconDatabase about the change in value. * UIProcess/WebContext.h: * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::setDatabasePath): Prime the IconDatabase with an initial private browsing value. (WebKit::WebIconDatabase::setAnyPageGroupMightHavePrivateBrowsingEnabled): * UIProcess/WebIconDatabase.h: 2013-11-08 Lucas Forschler Merge r157137 2013-10-08 Anders Carlsson WebProcess crash on SAP WebCycle web app https://bugs.webkit.org/show_bug.cgi?id=122520 Reviewed by Darin Adler. Stop trying to use RunLoop to manage the top-level run loop and just have the child process and their delegate subclasses start and stop the run loops. This fixes a bug with showModalDialog where we would unintentionally call -[NSApp stop] when closing a modal dialog. This also lets us move all knowledge of NSApplication from RunLoop. (Both the web process and plug-in process need to use -[NSApp run] and -[NSApp stop:]). * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. Add a startRunLoop override that calls -[NSApp run]. * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: (PluginServiceInitializer): Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. * PluginProcess/PluginProcess.h: Add stopRunLoop() override on Mac. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::stopRunLoop): Call -[NSApp stop:] and tickle the event system. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::stopRunLoop): Add default implementation that just calls RunLoop::main()->stop(). (WebKit::ChildProcess::terminate): Call stopRunLoop(). * Shared/ChildProcess.h: * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: Add startRunLoop member function and call it instead of RunLoop::run(). * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: (WebKit::ChildProcessMainDelegate::startRunLoop): Call RunLoop::run(). * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. Add startRunLoop override that calls -[NSApp run]. * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (WebContentServiceInitializer): Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didClose): Call stopRunLoop(). * WebProcess/WebProcess.h: Add stopRunLoop override. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::stopRunLoop): Call -[NSApp stop:] and tickle the event system. 2013-11-06 Lucas Forschler Merge r154763 2013-08-28 Anders Carlsson Allow the Flash plug-in to open its preference pane https://bugs.webkit.org/show_bug.cgi?id=120431 Reviewed by Andreas Kling. Forward the -[NSWorkspace openFile:] call to the UI process and allow opening the Flash preference pane (if Flash asks for it). * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::replacedNSWorkspace_openFile): (WebKit::initializeCocoaOverrides): (WebKit::PluginProcess::openFile): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::openURL): (WebKit::shouldOpenFile): (WebKit::PluginProcessProxy::openFile): 2013-11-04 Lucas Forschler Merge change from * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPlugins): 2013-10-31 Lucas Forschler Merge r157056 2013-10-07 Tim Horton Animated images are not restarted when page visibility changes https://bugs.webkit.org/show_bug.cgi?id=122464 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::resumePainting): This is on Page now. 2013-10-28 Lucas Forschler Merge r157561 2013-10-17 Mark Rowe WebKit2 XPC services load the wrong frameworks when running from the staged frameworks location. Build the XPC services with DYLD_VERSIONED_FRAMEWORK_PATH when USE_STAGING_INSTALL_PATH is set to YES. This is necessary because there's no way to specify environment variables to be used when an XPC service is launched. Reviewed by Anders Carlsson. * Configurations/BaseTarget.xcconfig: Set OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH to contain the DYLD_VERSIONED_FRAMEWORK_PATH value when USE_STAGING_INSTALL_PATH is YES. * Configurations/BaseXPCService.xcconfig: Include OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH in the value of OTHER_LDFLAGS. * Configurations/PluginService.32.xcconfig: Ditto. * Configurations/PluginService.64.xcconfig: Ditto. 2013-10-28 Lucas Forschler Merge r156479 2013-09-25 Jer Noble [WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46 https://bugs.webkit.org/show_bug.cgi?id=121910 Reviewed by Darin Adler. Store a copy of the VoidCallback passed to WKPage, and invalidate the callback during dealloc. The VoidCallback class assumes that it will only ever be invalidated or invoked once, so change the ASSERTs into an early return. * UIProcess/GenericCallback.h: (WebKit::VoidCallback::performCallback): Exit early if previously invalidated. (WebKit::VoidCallback::invalidate): Ditto. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController dealloc]): Invalidate the repaint callback if present. (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto & create a new callback. (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Clear the callback. 2013-10-28 Lucas Forschler Merge r156302 2013-09-23 Patrick Gansterer use NOMINMAX instead of #define min min https://bugs.webkit.org/show_bug.cgi?id=73563 Reviewed by Brent Fulgham. Use NOMINMAX instead of #define min/max as a cleaner way of ensuring that Windows system header files don't define min/max as macro in the first place. * config.h: 2013-10-25 Lucas Forschler Merge r155153 2013-09-05 Alexey Proskuryakov WKFullScreenWindowController extends lifetime of WKView, deleting it at a wrong time https://bugs.webkit.org/show_bug.cgi?id=120792 Reviewed by Jer Noble. * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenWindowController]): Use a newly minted initializer for the controller. * UIProcess/mac/WKFullScreenWindowController.h: Removed unused web view accessors. Changed the class to take web view at initialization time. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController initWithWindow:webView:]): Initialize the controller inone step. (-[WKFullScreenWindowController dealloc]): WebView is now a raw pointer, no need to zero it. (-[WKFullScreenWindowController close]): Make sure to not leave a dangling WKView pointer (this method is indirectly but inevitably called when WKView is deallocated). 2013-10-24 Lucas Forschler Merge r154647 2013-08-23 Andy Estes Fix issues found by the Clang Static Analyzer https://bugs.webkit.org/show_bug.cgi?id=120230 Reviewed by Darin Adler. * UIProcess/API/mac/WKBrowsingContextController.mm: (autoreleased): Don't leak CFURLs when in Objective-C GC. * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): Don't leak CFStrings when in Objective-C GC. 2013-10-21 Lucas Forschler Merge r154183 2013-08-16 Brady Eidson (NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously https://bugs.webkit.org/show_bug.cgi?id=119493 Reviewed by Alexey Proskuryakov. This patch does the following: - Consolidates SchedulableLoader and NetworkResourceLoader into one class. - Removes SyncNetworkResourceLoader. - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader. - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads. The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses. The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess only when the load is complete. Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm): * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::scheduleResourceLoader): (WebKit::HostRecord::addLoaderInProgress): (WebKit::removeLoaderFromQueue): (WebKit::HostRecord::removeLoader): (WebKit::HostRecord::servePendingRequestsForQueue): (WebKit::HostRecord::limitsRequests): * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::removeLoader): (WebKit::NetworkResourceLoadScheduler::receivedRedirect): (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): * NetworkProcess/NetworkResourceLoadScheduler.h: Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::isSynchronous): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::didReceiveResponseAsync): (WebKit::NetworkResourceLoader::didReceiveBuffer): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::willSendRequestAsync): (WebKit::NetworkResourceLoader::continueWillSendRequest): (WebKit::NetworkResourceLoader::didSendData): (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): (WebKit::NetworkResourceLoader::consumeSandboxExtensions): (WebKit::NetworkResourceLoader::invalidateSandboxExtensions): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::create): (WebKit::NetworkResourceLoader::connectionToWebProcess): (WebKit::NetworkResourceLoader::priority): (WebKit::NetworkResourceLoader::request): (WebKit::NetworkResourceLoader::isLoadingMainResource): (WebKit::NetworkResourceLoader::setHostRecord): (WebKit::NetworkResourceLoader::hostRecord): (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous: * NetworkProcess/NetworkLoaderClient.h: (WebKit::NetworkLoaderClient::~NetworkLoaderClient): (WebKit::NetworkLoaderClient::isSynchronous): (WebKit::NetworkLoaderClient::NetworkLoaderClient): The asynchronous loader client, primarily to message progress back to the WebProcess as it happens: * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added. (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient): (WebKit::AsynchronousNetworkLoaderClient::willSendRequest): (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse): (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer): (WebKit::AsynchronousNetworkLoaderClient::didSendData): (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading): (WebKit::AsynchronousNetworkLoaderClient::didFail): * NetworkProcess/AsynchronousNetworkLoaderClient.h: (WebKit::AsynchronousNetworkLoaderClient::create): The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once: * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added. (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient): (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient): (WebKit::SynchronousNetworkLoaderClient::willSendRequest): (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse): (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer): (WebKit::SynchronousNetworkLoaderClient::didFinishLoading): (WebKit::SynchronousNetworkLoaderClient::didFail): (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply): * NetworkProcess/SynchronousNetworkLoaderClient.h: Added. (WebKit::SynchronousNetworkLoaderClient::create): * NetworkProcess/SchedulableLoader.cpp: Removed. * NetworkProcess/SchedulableLoader.h: Removed. * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed. * NetworkProcess/SyncNetworkResourceLoader.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2013-10-21 Lucas Forschler Merge r154085 2013-08-14 Dean Jackson Allow primary plug-in detection to run more than once if necessary Reviewed by Tim Horton. We occasionally see cases where the primary plug-in detection runs before the plugins have been added to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can run an arbitrary number of times if it fails. While here, also have the detection run if there has ever been a plugin in the page as opposed to any current views. We may have snapshotted a plugin by now and deleted its view. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): initialise new members. (WebKit::WebPage::addPluginView): Mark that we've seen a plugin. (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members. (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set a timer to run again (maximum of two attempts at the moment). * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts and m_hasSeenPlugin. 2013-10-21 Lucas Forschler Merge r154077 2013-08-14 Dean Jackson Add pluginView-related logging to WebPage Reviewed by Tim Horton. Add some more diagnostic output to help track down bugs. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addPluginView): More logging. (WebKit::WebPage::removePluginView): Ditto. 2013-10-21 Lucas Forschler Merge r153848 2013-08-08 Dean Jackson Add logging to the primary plugin detection https://bugs.webkit.org/show_bug.cgi?id=119594 Reviewed by Tim Horton. Add some simple logging to our primary plug-in detection. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 2013-10-21 Lucas Forschler Merge r154067 2013-08-14 Tim Horton REGRESSION (r153877): Plugin scanning slows creation of WebViews https://bugs.webkit.org/show_bug.cgi?id=119665 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::refreshPlugins): Don't repopulate the plugin cache in refreshPlugins, just invalidate it. It will be repopulated the next time something tries to use it. 2013-10-21 Lucas Forschler Merge r153877 2013-08-08 Tim Horton navigator.plugins has plugins in it when plugins are disabled https://bugs.webkit.org/show_bug.cgi?id=119607 Reviewed by Anders Carlsson. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPlugins): Return a list of all plugins, and a list of only application plugins. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::getPluginInfo): Add applicationPlugin parameter to getPlugins, and storage for the returned list. (WebKit::WebPlatformStrategies::populatePluginCache): If plugins are disabled for the given page, give WebCore the list that only includes application plugins. Otherwise, give it the whole list as we are doing currently. 2013-09-04 Dean Jackson Disable CSS_SHAPES on safari-537-branch Reviewed by Beth Dakin. * Configurations/FeatureDefines.xcconfig: 2013-08-26 Lucas Forschler Merge r154528 2013-08-23 Beth Dakin REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in Adobe Reader https://bugs.webkit.org/show_bug.cgi?id=120240 -and corresponding- Reviewed by Anders Carlsson. Hook up new WebSystemInterface API to find out if the current context is the PDF context. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-08-23 Lucas Forschler Merge r154473 2013-08-22 Simon Cooper Need to disable FakeSYSVSHM when sandboxing is not enabled https://bugs.webkit.org/show_bug.cgi?id=120182 Reviewed by Alexey Proskuryakov. When not in a sandbox do not enable the FakeSYSVSHIM. This allows LocalConnection to work when Flash Player is run in "Unsafe Mode". * PluginProcess/mac/PluginProcessShim.mm: (WebKit::shim_disabled): 2013-08-23 Lucas Forschler Merge r154433 2013-08-21 Tim Horton Another null-deref under WebDragClient::startDrag https://bugs.webkit.org/show_bug.cgi?id=120145 Reviewed by Simon Fraser. convertImageToBitmap can legitimately return null, so don't dereference it. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::startDrag): 2013-08-20 Lucas Forschler Merge r154302 2013-08-19 Beth Dakin AXObjectCache's accessibilityEnhancedUserInterfaceEnabled should be initialized on process creation Reviewed by Sam Weinig. Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends us a notification indicating that the value has changed. We should not have to rely on that to properly initialize this value. It should be done with the WebProcessCreationParamters. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2013-08-09 Lucas Forschler Merge r153907 2013-08-09 Beth Dakin AX: Not able to use arrow keys to read text in a WK2 app https://bugs.webkit.org/show_bug.cgi?id=119605 -and corresponding- Reviewed by Darin Adler. Make all of these scrolling functions actually return the WebCore bools that indicate whether or not scrolling happened. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scroll): (WebKit::WebPage::logicalScroll): (WebKit::WebPage::scrollBy): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::executeKeypressCommandsInternal): This function now gives accessibility a chance to handle the event too. And it also actually tracks whether or not the event was handled by scrolling instead of assuming that it was and universally returning true. (WebKit::WebPage::performNonEditingBehaviorForSelector): 2013-08-08 Lucas Forschler Merge r153856 2013-08-08 Gavin Barraclough Disable suppression of plugin process for Java https://bugs.webkit.org/show_bug.cgi?id=119604 Reviewed by Sam Weinig. Workaround, the Java plugin doesn't like this. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): - +1 active task count on the java plugin, to inhibit supression. 2013-08-07 Lucas Forschler Merge r153775 2013-08-06 Stephanie Lewis Update Order Files for Safari Unreviewed. * mac/WebKit2.order: 2013-08-07 Lucas Forschler Merge r153773 2013-08-06 Jer Noble Crash when entering fullscreen video playback from a WebView using WebKit2 https://bugs.webkit.org/show_bug.cgi?id=119531 Reviewed by Tim Horton. Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-08-06 Lucas Forschler Merge r153753 2013-08-06 Andreas Kling REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed. Reviewed by Simon Fraser. The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy of the window rect for fast access from DOMWindow APIs. We retain part of the optimization introduced in r151403, namely not computing the viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): 2013-08-05 Lucas Forschler Merge r153724 2013-08-05 Anders Carlsson Ignore the Apple Java placeholder plug-in https://bugs.webkit.org/show_bug.cgi?id=119494 Reviewed by Beth Dakin. Never attempt to load the Java placeholder plug-in. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::shouldUsePlugin): 2013-08-01 Lucas Forschler Merge r153499 2013-07-30 Anders Carlsson Speculative fix for crash due to string access on multiple threads https://bugs.webkit.org/show_bug.cgi?id=119279 Reviewed by Darin Adler. We can't use String::isolatedCopy for passing the local storage directory to the storage thread since that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window where the refcount can be accessed simultaneously from two threads. Work around this by passing a PassRefPtr to bind instead; the act of copying the PassRefPtr will clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null. * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): * UIProcess/Storage/LocalStorageDatabaseTracker.h: 2013-08-01 Lucas Forschler Merge r153488 2013-07-30 Anders Carlsson Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate https://bugs.webkit.org/show_bug.cgi?id=119270 Reviewed by Darin Adler. Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this since we don't know the plug-in or connection. Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): (CoreIPC::Connection::sendSyncMessage): * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::inSendSync): * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::destroy): 2013-08-01 Lucas Forschler Merge r153482 2013-07-30 Jeff Miller Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0 https://bugs.webkit.org/show_bug.cgi?id=119269 Reviewed by Anders Carlsson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processIdentifier): Return 0 if the page is closed instead of requiring isValid(). 2013-07-31 Lucas Forschler Merge r153511 2013-07-30 Tim Horton DHTML drag can result in a null-deref under WebDragClient::startDrag https://bugs.webkit.org/show_bug.cgi?id=119297 Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::convertImageToBitmap): ShareableBitmap::createShareable can return null, but shouldn't dereference that. 2013-07-31 Lucas Forschler Merge r153487 2013-07-30 Tim Horton Null deref under WebPage::scaledSnapshotWithOptions https://bugs.webkit.org/show_bug.cgi?id=119243 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scaledSnapshotWithOptions): WebFrame::coreFrame() can be null (if the Frame is already torn down), so we should check it. 2013-07-30 Lucas Forschler Merge r153486 2013-07-30 Tim Horton Null deref under PluginView::handlesPageScaleFactor() https://bugs.webkit.org/show_bug.cgi?id=119231 Reviewed by Darin Adler. Null-check the PluginView in the caller as well. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::handlesPageScaleGesture): 2013-07-30 Lucas Forschler Merge r153449 2013-07-29 Tim Horton Null deref under PluginView::handlesPageScaleFactor() https://bugs.webkit.org/show_bug.cgi?id=119231 Reviewed by Simon Fraser. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handlesPageScaleFactor): * WebProcess/Plugins/PluginView.h: Null-check m_plugin and check m_isInitialized. Make pageScaleFactor() and handlesPageScaleFactor const. 2013-07-29 Lucas Forschler Merge r153458 2013-07-29 Tim Horton [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync https://bugs.webkit.org/show_bug.cgi?id=119225 Reviewed by Simon Fraser. Tell CoreAnimation to flush the implicit transaction before replying when using endDeferringViewInWindowChangesSync, as that method's contract is that the WebProcess is totally ready to be in-window when it returns. * UIProcess/API/mac/WKView.mm: (-[WKView endDeferringViewInWindowChanges]): Adopt viewInWindowStateDidChange. (-[WKView endDeferringViewInWindowChangesSync]): Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewInWindowStateDidChange): (WebKit::WebPageProxy::viewStateDidChange): Pull viewInWindowStateDidChange out of viewStateDidChange. Request a reply from SetIsInWindow if we're told to. * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didUpdateInWindowStateTimerFired): Don't build this version on Mac, we'll have a WebPageMac version. (WebKit::WebPage::setIsInWindow): Only start the timer to send the didUpdateInWindowState reply if we're asked to. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add an argument to the SetIsInWindow message for whether the WebProcess should inform the UIProcess when SetIsInWindow completes or not. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::didUpdateInWindowStateTimerFired): Tell CA to flush the implicit transaction before telling the UIProcess that we're finished moving in-window. 2013-07-29 Lucas Forschler Merge r153449 2013-07-29 Tim Horton Null deref under PluginView::handlesPageScaleFactor() https://bugs.webkit.org/show_bug.cgi?id=119231 Reviewed by Simon Fraser. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handlesPageScaleFactor): * WebProcess/Plugins/PluginView.h: Null-check m_plugin and check m_isInitialized. Make pageScaleFactor() and handlesPageScaleFactor const. 2013-07-28 Lucas Forschler Merge r153404 2013-07-27 Chris Fleizach AX: VoiceOver not working with data detection page overlays https://bugs.webkit.org/show_bug.cgi?id=118680 Reviewed by Sam Weinig. Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay. This requires two methods in a new callback struct. One to copy the attribute names, and the other to copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the overlay at this time as there are no clients with such a need. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (PageOverlayClientImpl::setAccessibilityClient): (PageOverlayClientImpl::PageOverlayClientImpl): (PageOverlayClientImpl::copyAccessibilityAttributeValue): (PageOverlayClientImpl::copyAccessibilityAttributeNames): (WKBundlePageOverlaySetAccessibilityClient): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::copyAccessibilityAttributeValue): (WebKit::PageOverlay::copyAccessibilityAttributeNames): * WebProcess/WebPage/PageOverlay.h: (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue): (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames): (WebKit::PageOverlay::client): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue): (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]): (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 2013-07-28 Lucas Forschler Merge r153402 2013-07-27 Simon Fraser If entering fullscreen for a window fails, don't leave things in a bad state https://bugs.webkit.org/show_bug.cgi?id=119179 Reviewed by Sam Weinig. On Lion, attempting to take a video fullscreen when the Safari window is already fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen: When this happens we have to undo the work done when entering fullscreen, to avoid leaving things in a bad state. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 2013-07-26 Lucas Forschler Merge r153378 2013-07-26 Tim Horton Add a mode where autosizing fixes the FrameView height to at least the WKView height https://bugs.webkit.org/show_bug.cgi?id=119104 Reviewed by Anders Carlsson. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: Add autoSizingShouldExpandToViewHeight parameter. * UIProcess/API/mac/WKView.mm: (-[WKView minimumWidthForAutoLayout]): (-[WKView setMinimumWidthForAutoLayout:]): Un-deprecate these as they're still useful if not sending a height. (-[WKView shouldExpandToViewHeightForAutoLayout]): (-[WKView setShouldExpandToViewHeightForAutoLayout:]): * UIProcess/API/mac/WKViewPrivate.h: New property, forward to WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight): New property, forward to WebPage. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): If enabled, update the FrameView's autoSizeFixedMinimumHeight. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::autoSizingShouldExpandToViewHeight): New property; if enabled, set FrameView's autoSizeFixedMinimumHeight, otherwise reset it to 0. * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Retrieve intrinsic content size explicitly from the FrameView, as it may not have used it as its final contentsSize if autoSizeFixedMinimumHeight is set. Set the WebPage's size in case the load is committed so that the WebFrameLoaderClient doesn't reset us to the wrong size. Update autoSizeFixedMinimumHeight if enabled when the view size changes. 2013-07-26 Lucas Forschler Merge r153107 2013-07-24 Anders Carlsson Crash when calling WKPageGetProcessIdentifier after aborted process launch https://bugs.webkit.org/show_bug.cgi?id=119069 Reviewed by Andreas Kling. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processIdentifier): Check if the page is closed instead of checking whether we have a process - We'll always have a process. (WebKit::WebPageProxy::isValid): Make this const. * UIProcess/WebPageProxy.h: 2013-07-24 Lucas Forschler Merge r153096 2013-07-24 Jessie Berlin Remove WKPageGetPlugInInformation - it is not used anymore https://bugs.webkit.org/show_bug.cgi?id=119047 Reviewed by Alexey Proskuryakov. Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming and ref-churn issues introduced in r151043, and r151043, which added WKPageGetPlugInInformation. * UIProcess/API/C/mac/WKPagePrivateMac.cpp: (WKPageIsURLKnownHSTSHost): * UIProcess/API/C/mac/WKPagePrivateMac.h: * UIProcess/Plugins/PluginProcessManager.h: * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginView.h: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: 2013-07-24 Lucas Forschler Merge r153092 2013-07-24 Jessie Berlin Remove WKPageGetPlugInInformation - it is not used anymore https://bugs.webkit.org/show_bug.cgi?id=119047 Rubber-stamped by Alexey Proskuryakov. Revert r152328, which added a key used only in the callback info for WKPageGetPlugInInformation. * Shared/API/c/WKPluginInformation.cpp: * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: * Shared/Plugins/Netscape/PluginInformation.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::containsPlugInCallback): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): 2013-07-23 Lucas Forschler Merge r153070 2013-07-23 Simon Cooper 10.7: Java applets do not work due to sandbox violation/exception https://bugs.webkit.org/show_bug.cgi?id=118920 Reviewed by Alexey Proskuryakov. Introduce versioning into the common profile and use it to fix a number of issues with Java on 10.7 and 10.8. Allow writing the com.apple.java.util.prefs preference file. This change also introduces a "/Library/Application Support/Java/PublicFiles" area which Java can read without any restrictions. Files written to this location will need to be created and written to by a privileged process. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-07-22 Lucas Forschler Merge r152984 2013-07-22 Alexey Proskuryakov Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent https://bugs.webkit.org/show_bug.cgi?id=118976 Reviewed by Sam Weinig. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited): Clear m_gestureEventQueue, just like we clear all other event queues here. 2013-07-22 Lucas Forschler Merge r152950 2013-07-21 Anders Carlsson Java Updater not launched on Lion and Mountain Lion https://bugs.webkit.org/show_bug.cgi?id=118953 Reviewed by Sam Weinig. On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of them has "localhost" specified, even if the paths are otherwise equal. Work around this by comparing the paths directly. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isJavaUpdaterURL): 2013-07-22 Lucas Forschler Merge r152787 2013-07-17 Simon Cooper YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera https://bugs.webkit.org/show_bug.cgi?id=118787 Reviewed by Alexey Proskuryakov. Add support for built-in cameras, including the original iSight. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-22 Lucas Forschler Merge r152866 2013-07-18 Tim Horton [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes https://bugs.webkit.org/show_bug.cgi?id=118862 Reviewed by Anders Carlsson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::PluginView): Add m_pluginProcessHasCrashed. (WebKit::PluginView::platformLayer): Don't return the plugin's layer if it has crashed. (WebKit::PluginView::pluginProcessCrashed): Set m_pluginProcessHasCrashed. Cause a style recalc so that we rebuild the layer tree; our layer won't be included. * WebProcess/Plugins/PluginView.h: Add m_pluginProcessHasCrashed. 2013-07-22 Lucas Forschler Merge r152862 2013-07-18 Alexey Proskuryakov Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension https://bugs.webkit.org/show_bug.cgi?id=118855 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): Moved sandbox extension invalidation to cleanup() meaning that we won't fail to do this when aborting a loader that currently loading from network. * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): (WebKit::SchedulableLoader::consumeSandboxExtensions): (WebKit::SchedulableLoader::invalidateSandboxExtensions): * NetworkProcess/SchedulableLoader.h: Keep track of whether sandbox extensions are consumed, we don't want to revoke extensions that were never consumed (as used to be the case with sync loaders, and would be with async ones after the above fix). Also, get rid of extensions immediately when invalidating, we won't need them again. 2013-07-22 Lucas Forschler Merge r152824 2013-07-17 Tim Horton Update blocked/missing plug-in UI https://bugs.webkit.org/show_bug.cgi?id=118347 Reviewed by Sam Weinig. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add a 6 argument -> 4 reply message handler. (It seems that FindPlugin is getting a little out of hand.) * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: Add an unavailability description out-argument to a new version of pluginLoadPolicy, so clients can override the text of the unavailable plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Plumb the unavailability description through to the WebProcess via the FindPlugin message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Acquire the unavailability description from the client (via FindPlugin) and hand it to the RenderEmbeddedObject. 2013-07-22 Lucas Forschler Rollout r152701 2013-07-19 Lucas Forschler Merge r152877 2013-07-18 Simon Cooper Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg https://bugs.webkit.org/show_bug.cgi?id=118874 Reviewed by Alexey Proskuryakov. Silently deny access to FlashAuthor.cfg. This location contains files containing lists of paths that Flash Player will "allow" access to (without asking the user). Since the plugin sandbox won't permit the access to the listed paths it is better to silently block attempts to read this "whitelist". * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-18 Lucas Forschler Merge r152805 2013-07-17 Alexey Proskuryakov [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages() https://bugs.webkit.org/show_bug.cgi?id=118814 Reviewed by Brady Eidson. Speculative fix. It's unclear how we end up with an invalid URL when committing a load. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages): Added a null check. 2013-07-17 Lucas Forschler Merge r152740 2013-07-16 Alexey Proskuryakov REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com https://bugs.webkit.org/show_bug.cgi?id=118739 Reviewed by Daniel Bates. EditorState tracking on UI side is very fragile. This is a targeted fix just for this specific scenario. The issue was that we had a stale m_temporarilyClosedComposition flag, which was making UI process believe that a composition was closed from WebProcess side, and notify input method about that. It shouldn't have been a problem, because there is no composition at this point indeed, but this extra call is a problem for predictive input, which works in a somewhat unconventional way (). * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when getting new EditorState in response to performing this action. There is certainly no composition after insertText, and all interested parties are on the same page already. 2013-07-16 Lucas Forschler Merge r152701 2013-07-15 Tim Horton Update blocked/missing plug-in UI https://bugs.webkit.org/show_bug.cgi?id=118347 Reviewed by Sam Weinig. Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add a 6 argument -> 4 reply message handler. (It seems that FindPlugin is getting a little out of hand.) * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: Add an unavailability description out-argument to a new version of pluginLoadPolicy, so clients can override the text of the unavailable plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Plumb the unavailability description through to the WebProcess via the FindPlugin message. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didClose): Make a strongly referencing copy of the list of PluginProxies, so we can throw them away without the HashMap being mutated underneath us (see the comment). * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginProcessCrashed): Invalidate the plug-in's widget before setting the plugin unavailability reason, because doing so would cause the plug-in's renderer to be torn down, making invalidate() crash. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton): * WebProcess/WebCoreSupport/WebChromeClient.h: Rename from shouldUnavailablePluginMessageBeButton to shouldUnavailablePluginMessageIncludeButton for accuracy. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Acquire the unavailability description from the client (via FindPlugin) and hand it to the RenderEmbeddedObject. (WebKit::WebPage::canPluginHandleResponse): Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it. 2013-07-16 Lucas Forschler Merge r152698 2013-07-15 Simon Cooper PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust https://bugs.webkit.org/show_bug.cgi?id=118690 Reviewed by Dean Jackson. Silently deny access to FlashPlayerTrust. This location contains files containing lists of paths that Flash Player will "allow" access to (without asking the user). Since the plugin sandbox won't permit the access to the listed paths it is better to silently block attempts to read these "whitelists". The "whitelists" are created by other Adobe "installer" like applications. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-15 Lucas Forschler Rollout r152686. Previously merged. 2013-07-15 Lucas Forschler Merge r152382 2013-07-03 Gordon Sheridan Implement mechanism to detect (partially) hidden blocked plugins. https://bugs.webkit.org/show_bug.cgi?id=117998 Reviewed by Dean Jackson. * Shared/Plugins/Netscape/PluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::plugInInformationReplacementObscuredKey): Add key for plugInInformation dictionaries. (WebKit::createPluginInformationDictionary): Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary. * Shared/API/c/WKPluginInformation.h: * Shared/API/c/WKPluginInformation.cpp: (WKPluginInformationReplacementObscuredKey): Provide the C API for the plugInInformationReplacementObscuredKey(). * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary(). * UIProcess/WebPageProxy.messages.in: Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Invoke isReplacementObscured() method for blocked plugins. 2013-07-15 Lucas Forschler Merge r152642 2013-07-14 Jon Lee Calling Notification.requestPermission() without a callback crashes https://bugs.webkit.org/show_bug.cgi?id=118654 Reviewed by Alexey Proskuryakov. When requestPermission() is called, we short-circuit if we know the permission was already set. The callback handler gets invoked. But now that callbacks are optional, we need to check to make sure a callback was provided. * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback. 2013-07-15 Lucas Forschler Merge r152580 2013-07-10 Roger Fong Plugins that don't support snapshotting should not all autostart. https://bugs.webkit.org/show_bug.cgi?id=118572 . Reviewed by Dean Jackson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree. It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting. (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight to the the DisplayingSnapshot state. * WebProcess/Plugins/PluginView.h: 2013-07-15 Lucas Forschler Merge r152520 2013-07-09 Jer Noble Reviewed by Simon Fraser. Remember the scroll position and restore after exiting full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=61956 Call into the main FrameView to save the scroll position before swapping the WebView into the full-screen window, and restore the scroll position after swapping the WebView back into the browser window. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController beganExitFullScreenAnimation]): In WebKit2, this requires some communication between the WebProcess and the UIProcess, so add two new messages to WebFullScreenManager to be called by its proxy. * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::saveScrollPosition): (WebKit::WebFullScreenManagerProxy::restoreScrollPosition): * WebProcess/FullScreen/WebFullScreenManager.h: * WebProcess/FullScreen/WebFullScreenManager.messages.in: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::saveScrollPosition): (WebKit::WebFullScreenManager::restoreScrollPosition): 2013-07-15 Lucas Forschler Merge r152316 2013-07-02 Ada Chan Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage(). https://bugs.webkit.org/show_bug.cgi?id=118268 Reviewed by Beth Dakin. * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage() can be null if this method is called after the web page is closed. 2013-07-15 Lucas Forschler Merge r152249 2013-07-01 Ada Chan Properly hide the header and footer banners if they are set to null. https://bugs.webkit.org/show_bug.cgi?id=118219 Reviewed by Beth Dakin. Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when the footer banner is detached. Similarly for the header banner. * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::detachFromPage): 2013-07-12 Lucas Forschler Merge r152571 2013-07-11 Timothy Hatcher Revert r152267 and soft link WebInspectorUI.framework again. https://bugs.webkit.org/show_bug.cgi?id=118544 Reviewed by David Kilzer. * Configurations/WebKit2.xcconfig: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): 2013-07-10 Lucas Forschler Merge r152555 2013-07-10 Mark Rowe PluginProcess sometimes logs an error about being unable to load WebKit2.framework. Reviewed by Alexey Proskuryakov. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables specified in dynamic linker load commands are passed to the subprocess that we spawn to create the MIME type property list. 2013-07-10 Lucas Forschler Merge r152539 2013-07-10 Brady Eidson Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy. and https://bugs.webkit.org/show_bug.cgi?id=118535 Reviewed by Alexey Proskuryakov. * Shared/Plugins/NPObjectProxy.cpp: (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread. (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread. 2013-07-09 Lucas Forschler Merge r152425 2013-07-05 Tim Horton [wk2] Add API to lock the scroll position at the top or bottom of the page https://bugs.webkit.org/show_bug.cgi?id=118429 Reviewed by Anders Carlsson. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: Pass the current ScrollPinningBehavior across to the WebPage upon creation. * UIProcess/API/C/WKPage.cpp: (WKPageGetScrollPinningBehavior): (WKPageSetScrollPinningBehavior): * UIProcess/API/C/WKPagePrivate.h: SPI to get/set the WebPageProxy's current ScrollPinningBehavior. Convert between WK API type and WebCore enum. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): Send ScrollPinningBehavior when creating a WebPage. (WebKit::WebPageProxy::setScrollPinningBehavior): Pass ScrollPinningBehavior changes across to the WebProcess (and save it in WebPageProxy so it can be sent back across if the WebProcess crashes). * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::scrollPinningBehavior): Getter/setter and storage for m_scrollPinningBehavior. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Inform new FrameViews of the current ScrollPinningBehavior. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Set our ScrollPinningBehavior based on our creation parameters. (WebKit::WebPage::setScrollPinningBehavior): Inform the FrameView of ScrollPinningBehavior changes. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::scrollPinningBehavior): Added. (WebKit::WebPage::setScrollPinningBehavior): Added. Add storage for m_scrollPinningBehavior. * WebProcess/WebPage/WebPage.messages.in: Add SetScrollPinningBehavior message. 2013-07-09 Lucas Forschler Merge r152407 2013-07-04 Anders Carlsson Paint the page background if we haven't received our first update https://bugs.webkit.org/show_bug.cgi?id=118402 Reviewed by Simon Fraser. Make sure that we always paint something when we haven't received our first update from the web process. * UIProcess/API/mac/WKView.mm: (-[WKView drawRect:]): * UIProcess/DrawingAreaProxyImpl.h: (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate): 2013-07-09 Lucas Forschler Merge r152403 2013-07-04 Anders Carlsson Crash when createPluginInternal ends up destroying the plug-in https://bugs.webkit.org/show_bug.cgi?id=118397 Reviewed by Simon Fraser. Keep the WebProcessConnection object alive while calling createPluginInternal and handle the IPC connection going away. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginAsynchronously): 2013-07-09 Lucas Forschler Merge r152382 2013-07-03 Gordon Sheridan Implement mechanism to detect (partially) hidden blocked plugins. https://bugs.webkit.org/show_bug.cgi?id=117998 Reviewed by Dean Jackson. * Shared/Plugins/Netscape/PluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::plugInInformationReplacementObscuredKey): Add key for plugInInformation dictionaries. (WebKit::createPluginInformationDictionary): Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary. * Shared/API/c/WKPluginInformation.h: * Shared/API/c/WKPluginInformation.cpp: (WKPluginInformationReplacementObscuredKey): Provide the C API for the plugInInformationReplacementObscuredKey(). * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary(). * UIProcess/WebPageProxy.messages.in: Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Invoke isReplacementObscured() method for blocked plugins. 2013-07-08 Lucas Forschler Merge r152267 2013-07-01 Timothy Hatcher Link to WebInspectorUI.framework at build time instead of soft linking. https://bugs.webkit.org/show_bug.cgi?id=118261 Reviewed by Joseph Pecoraro. * Configurations/WebKit2.xcconfig: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): 2013-07-03 Lucas Forschler Merge r152375 2013-07-03 Alexey Proskuryakov Flash Player: deny ipc-posix-sem 59918130 Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites Reviewed by Sam Weinig. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now). 2013-07-03 Lucas Forschler Merge r152317 2013-07-02 Alexey Proskuryakov security/block-test.html fails when NetworkProcess is enabled https://bugs.webkit.org/show_bug.cgi?id=118320 Reviewed by Geoff Garen. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::wasBlocked): (WebKit::NetworkResourceLoader::cannotShowURL): Implemented missing ResourceHandleClient functions. 2013-07-02 Lucas Forschler Merge r152328 2013-07-02 Jessie Berlin The callback for WKPageGetPlugInInformation needs info about whether or not there are any non-playing instances of the plug-in on the page https://bugs.webkit.org/show_bug.cgi?id=118330 Reviewed by Anders Carlsson. Add another key value pair to the dictionary passed to the callback. * Shared/API/c/WKPluginInformation.cpp: (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey): * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey): (WebKit::createPlugInInformationDictionary): Add the information about whether or not the page contains a non-playing instance of that plug-in to the plug-in information dictionary. * Shared/Plugins/Netscape/PluginInformation.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::containsPlugInCallback): Check if any of the MIME types of the plug-in instances that are present on the page but are not playing match the instance of plug-in being searched for. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns): Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in HTMLPlugInImageElement.cpp. (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns. 2013-07-01 Lucas Forschler Merge r152273 2013-07-01 Alexey Proskuryakov Clean up private browsing session tracking https://bugs.webkit.org/show_bug.cgi?id=118266 Reviewed by Brady Eidson. Instead of counting API calls, we now watch actual WebPreferences objects. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled): Removed code that used to notify WebContext. It's now done by WebPreferences. * UIProcess/WebContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times API was called, rely on WebPreferences tracking. (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is now only called when we detect a change in private browsing state. (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto. (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private browsing session if needed. * UIProcess/WebPreferences.h: * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::addPageGroup): Count how many page groups use private browsing, and notify WebContext when a session is needed. Note that we don't notify WebContext about WebPreferences without any page groups, because it's likely that preferences will be updated by the client before groups are associated. (WebKit::WebPreferences::removePageGroup): Ditto. (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for private browsing mode changes. (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when it's time to create or destroy a private browsing session. (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for WebContext to know when any page groups are in private browsing mode. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Don't create a private browsing session implicitly, UI process takes care of it. 2013-07-01 Lucas Forschler Merge r152266 2013-07-01 Tim Horton [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect https://bugs.webkit.org/show_bug.cgi?id=118173 Reviewed by Anders Carlsson. Offset the exposed rect passed from the WKView by the main frame's current scroll position before sending it to our TiledBackings, so that it is in the same coordinate space as their ordinary visibleRects. This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Add updateScrolledExposedRect() and m_scrolledExposedRect. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): Call updateScrolledExposedRect when the main frame scrolls. (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Remove a FIXME about this change. Call updateScrolledExposedRect instead of passing down the unscrolled rect. (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): Call updateScrolledExposedRect, because that method will short-circuit if setClipsToExposedRect is false, so we need to update here for correctness if we get a setExposedRect(), setClipsToExposedRect(true) pair. (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): Update m_scrolledExposedRect and propagate it to our TiledBackings. (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): Use the scrolled exposed rect. 2013-07-01 Lucas Forschler Merge r152077 2013-06-26 Simon Cooper Sometimes the Flash Player plugin cannot make outgoing connections https://bugs.webkit.org/show_bug.cgi?id=118110 Reviewed by Alexey Proskuryakov. Allow outgoing and incoming UDP data. Tidy up the QuickTime profile as it gets the UDP ability from the common profile. * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-07-01 Lucas Forschler Merge r152230 2013-07-01 Sam Weinig WKPageLoadDataWithUserData neglects to set the base URL that is passed in https://bugs.webkit.org/show_bug.cgi?id=118256 Reviewed by Anders Carlsson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadData): Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1. 2013-07-01 Lucas Forschler Merge r152187 2013-06-28 Gavin Barraclough Stale occlusion state after moving page back into window https://bugs.webkit.org/show_bug.cgi?id=118202 Reviewed by Anders Carlsson. We need to update the occlusion state when the page goes back into the window. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): - update occlusion state. 2013-07-01 Lucas Forschler Merge r152182 2013-06-28 Anders Carlsson Make the UI process run the Java Updater https://bugs.webkit.org/show_bug.cgi?id=118197 Reviewed by Sam Weinig. Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process. * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error): (WebKit::initializeCocoaOverrides): (WebKit::PluginProcess::launchApplicationAtURL): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isJavaUpdaterURL): (WebKit::shouldLaunchApplicationAtURL): (WebKit::PluginProcessProxy::launchApplicationAtURL): 2013-07-01 Lucas Forschler Merge r152075 2013-06-26 Simon Cooper Flash Player: deny ipc-posix-sem 59918130 https://bugs.webkit.org/show_bug.cgi?id=118107 Reviewed by Alexey Proskuryakov. Allow same-sandbox scoped semaphores on Mavericks. Permit the named semaphore for older releases. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-01 Lucas Forschler Merge r152073 2013-06-26 Simon Cooper Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos https://bugs.webkit.org/show_bug.cgi?id=118102 Reviewed by Alexey Proskuryakov. Allow same-sandbox scoped semaphores on Mavericks. Permit the named semaphore for older releases. * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 2013-07-01 Lucas Forschler Merge r152072 2013-06-26 Simon Cooper Update ColorSync shared memory names in plug-in sandbox profile https://bugs.webkit.org/show_bug.cgi?id=118099 Reviewed by Alexey Proskuryakov. Update the common profile to use the names used in Mavericks * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-07-01 Lucas Forschler Merge r152063 2013-06-26 Simon Cooper QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file https://bugs.webkit.org/show_bug.cgi?id=118098 Reviewed by Alexey Proskuryakov. Allow the preference file to be written * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 2013-07-01 Lucas Forschler Merge r152234 2013-06-27 Jer Noble Audio in apps which embed WebViews is corrupted. https://bugs.webkit.org/show_bug.cgi?id=118163 Reviewed by Maciej Stachowiak. Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients. * Shared/WebPreferencesStore.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-07-01 Lucas Forschler Merge r152190 2013-06-28 Tim Horton [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set https://bugs.webkit.org/show_bug.cgi?id=118174 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView _updateViewExposedRect]): Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy. (-[WKView setMinimumSizeForAutoLayout:]): Disable scrolling when using autolayout instead of when using clips-to-visibleRect. (-[WKView setShouldClipToVisibleRect:]): Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled, and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view is big enough to fit the content (the case clip-to-visibleRect was added for). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::viewExposedRectChanged): (WebKit::WebPageProxy::exposedRectChangedTimerFired): Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setClipsToExposedRect): Added. (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewExposedRectChanged): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Forward clips-to-visibleRect enabled state to the drawing area. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Add storage for m_clipsToExposedRect. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine whether we should tell our TiledBackings to clip to the exposed rect we provide. We don't need to listen to mainFrameScrollabilityChanged anymore. 2013-07-01 Lucas Forschler Merge r152177 2013-06-28 Tim Horton WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to https://bugs.webkit.org/show_bug.cgi?id=118196 Reviewed by Anders Carlsson. * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2013-06-26 Lucas Forschler Merge r151952 2013-06-24 Simon Cooper Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0 https://bugs.webkit.org/show_bug.cgi?id=117966 Reviewed by Sam Weinig. Allow assigning (via bind) an ephemeral port before connecting * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-06-26 Lucas Forschler Merge r151950 2013-06-24 Simon Cooper PluginProcess deny file-read-data /Network/Library under addVolumeTracker https://bugs.webkit.org/show_bug.cgi?id=117965 Reviewed by Alexey Proskuryakov. Silently deny reading /Network/Applications and /Network/Library. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151948 2013-06-24 Simon Cooper deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL https://bugs.webkit.org/show_bug.cgi?id=117964 Reviewed by Alexey Proskuryakov. Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL subdirectory. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151944 2013-06-24 Simon Cooper Repeating sandbox violations when playing Amazon Prime videos with Flash https://bugs.webkit.org/show_bug.cgi?id=117953 Reviewed by Alexey Proskuryakov. Add some missing "standard" files for network service lookups * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151943 2013-06-24 Simon Cooper Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist https://bugs.webkit.org/show_bug.cgi?id=117963 Reviewed by Alexey Proskuryakov. Permit the reading of the com.apple.CoreGraphics preference file * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151941 2013-06-24 Simon Cooper com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile https://bugs.webkit.org/show_bug.cgi?id=117961 Reviewed by Alexey Proskuryakov. Remove the trailing extraneous .plist from the preference file rule * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-06-26 Lucas Forschler Merge r151940 2013-06-24 Simon Cooper PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari https://bugs.webkit.org/show_bug.cgi?id=117958 Reviewed by Alexey Proskuryakov. Allow reading the com.apple.networkConnect plist. * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 2013-06-26 Lucas Forschler Merge r151939 2013-06-24 Simon Cooper Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67 https://bugs.webkit.org/show_bug.cgi?id=117954 Reviewed by Alexey Proskuryakov. Permit read access to this shared memory segment * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151938 2013-06-24 Simon Cooper Plugin Sandbox violation in /Library/Audio/Sounds/Banks https://bugs.webkit.org/show_bug.cgi?id=117957 Reviewed by Alexey Proskuryakov. Permit read access to subdirectories under /Library/Audio/Sounds * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Lucas Forschler Merge r151927 2013-06-24 Anders Carlsson REGRESSION (r147591): can't type in Adobe Connect https://bugs.webkit.org/show_bug.cgi?id=117947 Reviewed by Andreas Kling. With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in starts. Handle this by focusing the plug-in right after it's started if necessary. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didInitializePlugin): 2013-06-26 Lucas Forschler Merge r151877 2013-06-22 Simon Fraser screen.availWidth always returns width of primary display https://bugs.webkit.org/show_bug.cgi?id=117863 Reviewed by Geoffrey Garen. In WebKit2, Widgets have no platformWidget, so trying to get to the NSScreen via the platform widget's window never succeeded, and we always fell back on getting info for the main display. However, we were already pushing the WKView's displayID down to the WebProcess for the requestAnimationFrame infrastructure, so use that. The WebProcess would not receive a displayID for a WKView until the window was activated; fix by calling -doWindowDidChangeScreen when the view moves to a window, rather than doing it from -_windowDidBecomeKey:. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): (-[WKView _windowDidBecomeKey:]): 2013-06-26 Lucas Forschler Merge r151881 2013-06-22 Dean Jackson Slightly reduce width threshold on detection of primary snapshotted Plug-In https://bugs.webkit.org/show_bug.cgi?id=117914 Reviewed by Simon Fraser. We've noticed some content that should be detected as the primary snapshotted plug-in, but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400. * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400. 2013-06-26 Lucas Forschler Merge r151832 2013-06-21 Christophe Dumez REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere https://bugs.webkit.org/show_bug.cgi?id=117825 Reviewed by Kentaro Hara. Use Settings to enable Web Audio instead of RuntimeEnabledFeatures. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-06-26 Lucas Forschler Merge r151795 2013-06-20 Brady Eidson WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it). and https://bugs.webkit.org/show_bug.cgi?id=117842 Reviewed by Alexey Proskuryakov. * NetworkProcess/HostRecord.cpp: (WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue. (WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending. (WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup. (WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then allow serving a synchronous loader to go exactly one beyond the limit. * NetworkProcess/HostRecord.h: Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler): (WebKit::NetworkResourceLoadScheduler::hostForURL): * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow 7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit. 2013-06-26 Lucas Forschler Merge r151767 2013-06-19 Sam Weinig Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary https://bugs.webkit.org/show_bug.cgi?id=117816 Reviewed by Geoffrey Garen. - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey(). * Shared/API/c/WKPluginInformation.cpp: (WKPluginInformationBundleShortVersionKey): * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::pluginInformationBundleShortVersionKey): * Shared/Plugins/Netscape/PluginInformation.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::getPluginInfo): * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: (WebKit::getPlatformPluginModuleInformation): * Shared/Plugins/PluginModuleInfo.h: 2013-06-26 Lucas Forschler Merge r151748 2013-06-19 Anders Carlsson REGRESSION: Cannot open Silverlight preferences via context menu https://bugs.webkit.org/show_bug.cgi?id=117806 Reviewed by Beth Dakin. Hook the LSOpenCFURLRef function and make the UI process open the URL if it's the URL for the Silverlight Preferences application. This is what we do for the Flash updater. * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::openCFURLRef): (WebKit::initializeShim): (WebKit::PluginProcess::openURL): * PluginProcess/mac/PluginProcessShim.h: * PluginProcess/mac/PluginProcessShim.mm: (WebKit::shimLSOpenCFURLRef): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isSilverlightPreferencesURL): (WebKit::shouldOpenURL): (WebKit::PluginProcessProxy::openURL): 2013-06-25 Lucas Forschler Merge r151929 2013-06-24 Ruth Fong Expose the mediaHasAudio() function in WK2 https://bugs.webkit.org/show_bug.cgi?id=117946 Reviewed by Beth Dakin. Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function in WK2. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultMediaHasAudio): Added. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2013-06-25 Lucas Forschler Merge r151760 2013-06-19 Ruth Fong Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765) https://bugs.webkit.org/show_bug.cgi?id=117765 Patch by Ruth Fong . Reviewed by Brady Eidson. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultGetMediaType): Updated to use mediaType(). * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::mediaType): Updated. Renamed getMediaType() to mediaType() and now handles !ENABLE(VIDEO) platforms. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2013-06-18 Roger Fong Disable some feature flags. . Rubberstamped by Jon Lee. * Configurations/FeatureDefines.xcconfig: 2013-06-18 Roger Fong Unreviewed. Fix a typo that may be causing some test failures. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): 2013-06-18 Anders Carlsson Make it possible to set a minimum height for auto-layout https://bugs.webkit.org/show_bug.cgi?id=117758 Reviewed by Tim Horton. Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property. If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/API/mac/WKView.mm: (-[WKView _setIntrinsicContentSize:]): (-[WKView minimumLayoutWidth]): (-[WKView setMinimumLayoutWidth:]): (-[WKView minimumWidthForAutoLayout]): (-[WKView setMinimumWidthForAutoLayout:]): (-[WKView minimumSizeForAutoLayout]): (-[WKView setMinimumSizeForAutoLayout:]): * UIProcess/API/mac/WKViewPrivate.h: * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setMinimumLayoutSize): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::minimumLayoutSize): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setMinimumLayoutSize): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::minimumLayoutSize): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2013-06-18 Simon Cooper sandbox violation when Flash runs for the first time https://bugs.webkit.org/show_bug.cgi?id=117753 Reviewed by Alexey Proskuryakov. Allow flash to try and change the ownership of directories it has just created. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-06-18 Ruth Fong Expose a getMediaType method in WebKit https://bugs.webkit.org/show_bug.cgi?id=117667 Reviewed by Brady Eidson. * GNUmakefile.list.am: * Target.pri: Updated to include the added header file InjectedBundleHitTestResultMediaType.h * UIProcess/API/C/WKAPICast.h: (WebKit::toBundleHitTestResultMediaType): (WebKit::toAPI): Added methods to convert between BundleHitTestResultMediaType and WKBundleHitTestResultMediaType. * WebKit2.xcodeproj/project.pbxproj: Updated to include InjectedBundleHitTestResultMediaType.h in the WebKit2 project. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and hooks into InjectedBundleHitTestResult::getMediaType. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::getMediaType): Added to return what type, if any, a media element is. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added to contain new BundleHitTestResultMediaType enums. 2013-06-18 Roger Fong Re-implement WebFrameNetworkingContext. . Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added. (WebKit::WebFrameNetworkingContext::create): (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added. (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled): (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): (WebKit::WebFrameNetworkingContext::blockedError): (WebKit::WebFrameNetworkingContext::storageSession): 2013-06-18 Alexey Proskuryakov Remove files with an incorrect license. Rubber-stamped by Maciej Stachowiak. This will break the build, stay tuned for a fix coming soon. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Removed. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Removed. 2013-06-17 Santosh Mahto Extra whitespace in blank line in PlatformPopupMenuData.cpp https://bugs.webkit.org/show_bug.cgi?id=117627 Reviewed by Brent Fulgham. * Shared/PlatformPopupMenuData.cpp: (WebKit::PlatformPopupMenuData::decode): Removing extra space 2013-06-17 Beth Dakin PageBanners appear over HTML5 video when media element is in full screen mode https://bugs.webkit.org/show_bug.cgi?id=117721 -and corresponding- Reviewed by Sam Weinig. When an element enters fullscreen, hide the banners. Show them again when the element exits fullscreen. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::willEnterFullScreen): (WebKit::WebFullScreenManager::willExitFullScreen): Handle hiding and showing by removing or re-creating a parent layer for m_layer. * WebProcess/WebPage/PageBanner.cpp: (WebKit::PageBanner::hide): (WebKit::PageBanner::showIfHidden): * WebProcess/WebPage/PageBanner.h: * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::PageBanner): (WebKit::PageBanner::hide): (WebKit::PageBanner::showIfHidden): (WebKit::PageBanner::mouseEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hidePageBanners): (WebKit::WebPage::showPageBanners): * WebProcess/WebPage/WebPage.h: 2013-06-17 Ruth Fong REGRESSION: Important controls are missing from