12014-07-22 Dana Burkart <dburkart@apple.com> 2 3 Merge r152704. 4 5 2013-07-15 Kangil Han <kangil.han@samsung.com> 6 7 Introduce toHTMLIFrameElement 8 https://bugs.webkit.org/show_bug.cgi?id=118672 9 10 Reviewed by Ryosuke Niwa. 11 12 To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup. 13 14 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: 15 (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame): 16 172014-07-22 Dana Burkart <dburkart@apple.com> 18 19 Merge r169448 20 21 2014-05-29 Alexey Proskuryakov <ap@apple.com> 22 23 [Mac] Always use plug-in sandbox with sandboxed clients 24 https://bugs.webkit.org/show_bug.cgi?id=133358 25 <rdar://problem/15637695> 26 27 Reviewed by Anders Carlsson. 28 29 * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox): 30 Refuse to start if parent process is sandboxed, and plug-in process is not going to be. 31 None of this should run in normal case, because there are also checks on UI process side. 32 33 * Shared/Plugins/PluginModuleInfo.h: 34 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 35 (WebKit::NetscapePluginModule::getPluginInfo): 36 Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile. 37 38 * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: 39 (WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member, 40 we no longer need to check the file system here. 41 42 * WebKit2.xcodeproj/project.pbxproj: 43 * Shared/mac/SandboxUtilities.h: Added. 44 * Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed): 45 This code is simple, but include magic is not. Moved it to a separate file to 46 avoid repeating. 47 48 * UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include. 49 50 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: 51 (WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in 52 sandboxed applications. 53 54 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 55 (WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox 56 from sandboxed processes. 57 58 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: 59 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed): 60 Use the new shared code in SandboxUtilities.h. 61 622014-07-19 Lucas Forschler <lforschler@apple.com> 63 64 Merge r169448 65 66 2014-05-29 Alexey Proskuryakov <ap@apple.com> 67 68 Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin 69 https://bugs.webkit.org/show_bug.cgi?id=133360 70 71 Reviewed by Sam Weinig. 72 73 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like 74 anyone using camera would need access to CoreMedia preferences. 75 76 * Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added. 77 78 * WebKit2.xcodeproj/project.pbxproj: Added the profile. 79 802014-07-19 Lucas Forschler <lforschler@apple.com> 81 82 Merge r169757 83 84 2014-06-10 Alexey Proskuryakov <ap@apple.com> 85 86 Fix crashes on some plug-in tests. 87 https://bugs.webkit.org/show_bug.cgi?id=133691 88 <rdar://problem/17255836> 89 90 Reviewed by Anders Carlsson. 91 92 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize): 93 Cannot use TemporaryChange here, because the object may go away before stack unwinds. 94 952014-05-23 Lucas Forschler <lforschler@apple.com> 96 97 Rollout r169219 98 992014-05-22 Lucas Forschler <lforschler@apple.com> 100 101 Merge r167635 102 103 2014-04-21 Dan Bernstein <mitz@apple.com> 104 105 WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process 106 https://bugs.webkit.org/show_bug.cgi?id=131939 107 108 Reviewed by David Kilzer. 109 110 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 111 (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to 112 the NetworkResourceLoader. 113 * NetworkProcess/NetworkConnectionToWebProcess.h: 114 115 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message. 116 117 * NetworkProcess/NetworkResourceLoader.cpp: 118 (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable 119 m_defersLoading from the new field in the loader parameters. 120 (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is 121 deferred, keep the request in m_deferredRequest and bail out. 122 (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to 123 WebCore::ResourceLoader::setDefersLoading. 124 * NetworkProcess/NetworkResourceLoader.h: 125 (WebKit::NetworkResourceLoader::defersLoading): 126 127 * Shared/Network/NetworkResourceLoadParameters.cpp: 128 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field 129 defersLoading to false. 130 (WebKit::NetworkResourceLoadParameters::encode): Encode new field. 131 (WebKit::NetworkResourceLoadParameters::decode): Decode new field. 132 * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field. 133 134 * WebProcess/Network/WebResourceLoadScheduler.cpp: 135 (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load 136 parameters. 137 (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process. 138 * WebProcess/Network/WebResourceLoadScheduler.h: 139 1402014-04-30 Lucas Forschler <lforschler@apple.com> 141 142 Merge r166810 143 144 2014-04-04 Alexey Proskuryakov <ap@apple.com> 145 146 Improve error checking in WebPageProxy::didReceiveEvent 147 https://bugs.webkit.org/show_bug.cgi?id=131243 148 <rdar://problem/16529207> 149 150 Reviewed by Anders Carlsson. 151 152 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent): 153 1542014-03-21 Matthew Hanson <matthew_hanson@apple.com> 155 156 Merge r166026. 157 158 2014-03-20 Alexey Proskuryakov <ap@apple.com> 159 160 Generalize WebInspector check in maybeInitializeSandboxExtensionHandle(). 161 https://bugs.webkit.org/show_bug.cgi?id=130079 162 <rdar://problem/16286683> 163 164 Reviewed by Anders Carlsson. 165 166 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): 167 Perform an early return for all paths that don't need a sandbox extension due to 168 access being assumed, not only for WebInspector pages. 169 170 * UIProcess/WebProcessProxy.cpp: 171 (WebKit::WebProcessProxy::hasAssumedReadAccessToURL): 172 (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): 173 * UIProcess/WebProcessProxy.h: 174 Factored out m_localPathsWithAssumedReadAccess iteration to a public function. 175 1762014-03-18 Matthew Hanson <matthew_hanson@apple.com> 177 178 Add a newline to the end of WKPreferences.cpp to suppress -Werror, -pedantic, and -Wnewline-eof. 179 180 Unreviewed build fix. 181 182 * UIProcess/API/C/WKPreferences.cpp: 183 (WKPreferencesGetEnableInheritURIQueryComponent): 184 1852014-03-18 Matthew Hanson <matthew_hanson@apple.com> 186 187 Remove consecutive single quotations, as the C compiler does not recognize scheme comments. 188 189 Unreviewed build fix. 190 191 * WebProcess/com.apple.WebProcess.sb.in: 192 1932014-03-18 Jer Noble <jer.noble@apple.com> 194 195 Unreviewed Mountain Lion build fix. Work around "empty character constant" error 196 by replacing double single-quotes with single double-quotes. 197 198 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 199 2002014-03-17 Matthew Hanson <matthew_hanson@apple.com> 201 202 Merge r165753. 203 204 2014-03-17 Brent Fulgham <bfulgham@apple.com> 205 206 Provide preference to enable additional AVFoundation options 207 https://bugs.webkit.org/show_bug.cgi?id=130275 208 209 Reviewed by Eric Carlson. 210 211 * Shared/WebPreferencesStore.h: Added new preference. 212 * UIProcess/API/C/WKPreferences.cpp: 213 (WKPreferencesSetEnableInheritURIQueryComponent): Added. 214 (WKPreferencesGetEnableInheritURIQueryComponent): Added. 215 * UIProcess/API/C/WKPreferencesPrivate.h: 216 * WebProcess/WebPage/WebPage.cpp: 217 (WebKit::WebPage::updatePreferences): Handle new preference. 218 2192014-03-17 Matthew Hanson <matthew_hanson@apple.com> 220 221 Merge r165657. 222 223 2014-03-14 Alexey Proskuryakov <ap@apple.com> 224 225 [Mac] Sync extended attribute related rules with AppSandbox profile 226 https://bugs.webkit.org/show_bug.cgi?id=130263 227 <rdar://problem/16318965> 228 229 Reviewed by Sam Weinig. 230 231 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 232 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 233 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 234 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 235 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 236 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 237 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 238 * WebProcess/com.apple.WebProcess.sb.in: 239 2402014-02-12 Matthew Hanson <matthew_hanson@apple.com> 241 242 Merge r162679. 243 244 2014-01-23 Jon Honeycutt <jhoneycutt@apple.com> 245 246 Assertion failure in WebCore::PseudoElement::didRecalcStyle() 247 <https://bugs.webkit.org/show_bug.cgi?id=126761> 248 <rdar://problem/15793540> 249 250 Reviewed by Andy Estes. 251 252 * WebProcess/WebPage/ios/WebPageIOS.mm: 253 (WebKit::WebPage::getPositionInformation): 254 Check isRenderImage() rather than isImage() before casting to 255 RenderImage. 256 2572014-02-12 Matthew Hanson <matthew_hanson@apple.com> 258 259 Merge r162904. 260 2612014-01-27 Andy Estes <aestes@apple.com> 262 263 [WebKit2] Add SPI to disable the WebCore memory cache 264 https://bugs.webkit.org/show_bug.cgi?id=127747 265 266 Reviewed by Tim Horton. 267 268 * Shared/WebProcessCreationParameters.cpp: 269 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): 270 Initialized memoryCacheDisabled to false. 271 (WebKit::WebProcessCreationParameters::encode): 272 Encoded memoryCacheDisabled. 273 (WebKit::WebProcessCreationParameters::decode): 274 Decoded memoryCacheDisabled. 275 * Shared/WebProcessCreationParameters.h: 276 * UIProcess/API/C/WKContext.cpp: 277 (WKContextSetMemoryCacheDisabled): 278 Called WebContext::setMemoryCacheDisabled(). 279 * UIProcess/API/C/WKContextPrivate.h: Declared new SPI. 280 * UIProcess/WebContext.cpp: 281 (WebKit::WebContext::WebContext): Initialized m_memoryCacheDisabled to false. 282 (WebKit::WebContext::createNewWebProcess): 283 Set WebProcessCreationParameters::memoryCacheDisabled to m_memoryCacheDisabled. 284 (WebKit::WebContext::setMemoryCacheDisabled): Set m_memoryCacheDisabled 285 and sent new value to all existing processes. 286 * UIProcess/WebContext.h: 287 * WebProcess/WebProcess.cpp: 288 (WebKit::WebProcess::initializeWebProcess): 289 Called WebProcess::setMemoryCacheDisabled(). 290 (WebKit::WebProcess::setMemoryCacheDisabled): 291 Called MemoryCache::setDisabled() if the disabled state changed. 292 * WebProcess/WebProcess.h: 293 * WebProcess/WebProcess.messages.in: 294 2952013-12-23 Matthew Hanson <matthew_hanson@apple.com> 296 297 Merge 161003: <rdar://problem/15719584> 298 299 2013-12-23 Lucas Forschler <lforschler@apple.com> 300 301 <rdar://problem/15682948> Update copyright strings 302 303 Reviewed by Dan Bernstein 304 305 * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist: 306 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist: 307 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: 308 * Info.plist: 309 * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist: 310 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: 311 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: 312 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: 313 * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: 314 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: 315 * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: 316 * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: 317 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: 318 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: 319 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 320 3212013-12-11 Lucas Forschler <lforschler@apple.com> 322 323 Merge r160197 324 325 2013-12-05 Chris Fleizach <cfleizach@apple.com> 326 327 AX: Seed: safari extension installation crashes safari under voice over and freezes voice over 328 https://bugs.webkit.org/show_bug.cgi?id=125308 329 330 Reviewed by Anders Carlsson. 331 332 Much like Javascript alerts, we need to allow accessibility clients to continue to interact with the WebProcess thread 333 when using dispatchDecidePolicyResponses. 334 335 * Platform/CoreIPC/MessageSender.h: 336 (CoreIPC::MessageSender::sendSync): 337 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 338 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 339 3402013-12-11 Lucas Forschler <lforschler@apple.com> 341 342 Merge r159460 343 344 2013-11-18 David Hyatt <hyatt@apple.com> 345 346 Add a quirk to not respect center text-align when positioning 347 348 <rdar://problem/15427571> 349 https://bugs.webkit.org/show_bug.cgi?id=124522 350 351 Reviewed by Simon Fraser. 352 353 Added fast/block/legacy-text-align-position-quirk.html 354 355 * Shared/WebPreferencesStore.h: 356 * UIProcess/API/C/WKPreferences.cpp: 357 (WKPreferencesUseLegacyTextAlignPositionedElementBehavior): 358 (WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior): 359 * UIProcess/API/C/WKPreferencesPrivate.h: 360 * WebProcess/WebPage/WebPage.cpp: 361 (WebKit::WebPage::updatePreferences): 362 3632013-12-11 Lucas Forschler <lforschler@apple.com> 364 365 Merge r159173 366 367 2013-11-12 Anders Carlsson <andersca@apple.com> 368 369 fast/canvas/webgl/draw-arrays-out-of-bounds.html is flaky on Mavericks WK2 testers, fails about 20% of the time 370 https://bugs.webkit.org/show_bug.cgi?id=124223 371 <rdar://problem/15333977> 372 373 Reviewed by Tim Horton. 374 375 It's wrong to use DataReferences in sync IPC replies; the underlying MessageDecoder will be freed after the call to 376 sendSync returns and the DataReference will point to freed memory. Use a Vector<char> instead. 377 378 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 379 * NetworkProcess/SynchronousNetworkLoaderClient.cpp: 380 (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer): 381 (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply): 382 * NetworkProcess/SynchronousNetworkLoaderClient.h: 383 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 384 (WebKit::WebPlatformStrategies::loadResourceSynchronously): 385 3862013-11-13 Lucas Forschler <lforschler@apple.com> 387 388 Merge r159248 389 390 2013-11-13 Anders Carlsson <andersca@apple.com> 391 392 Plug-in processes hang around for 10 sec after Safari quits 393 https://bugs.webkit.org/show_bug.cgi?id=124314 394 <rdar://problem/15460613> 395 396 Reviewed by Simon Fraser. 397 398 Call stopRunLoop instead of instead of RunLoop::stop(). 399 400 * PluginProcess/PluginProcess.cpp: 401 (WebKit::PluginProcess::didClose): 402 4032013-11-08 Matt Hanson <matthew_hanson@apple.com> 404 405 Merge r158101. 406 407 2013-10-27 Brady Eidson <beidson@apple.com> 408 409 WebIconDatabase can miss private browsing state changes. 410 <rdar://problem/15322318> and https://bugs.webkit.org/show_bug.cgi?id=123375 411 412 Reviewed by Alexey Proskuryakov. 413 414 * UIProcess/WebContext.cpp: 415 (WebKit::WebContext::willStartUsingPrivateBrowsing): Call setAnyPageGroupMightHavePrivateBrowsingEnabled(true) on each context. 416 (WebKit::WebContext::willStopUsingPrivateBrowsing): Call setAnyPageGroupMightHavePrivateBrowsingEnabled(false) on each context. 417 (WebKit::WebContext::setPrivateBrowsingEnabled): In addition to notifying other processes about private browsing 418 sessions, notify the context’s WebIconDatabase about the change in value. 419 * UIProcess/WebContext.h: 420 421 * UIProcess/WebIconDatabase.cpp: 422 (WebKit::WebIconDatabase::setDatabasePath): Prime the IconDatabase with an initial private browsing value. 423 (WebKit::WebIconDatabase::setAnyPageGroupMightHavePrivateBrowsingEnabled): 424 * UIProcess/WebIconDatabase.h: 425 4262013-11-08 Lucas Forschler <lforschler@apple.com> 427 428 Merge r157137 429 430 2013-10-08 Anders Carlsson <andersca@apple.com> 431 432 WebProcess crash on SAP WebCycle web app 433 https://bugs.webkit.org/show_bug.cgi?id=122520 434 <rdar://problem/15030605> 435 436 Reviewed by Darin Adler. 437 438 Stop trying to use RunLoop to manage the top-level run loop and just have the child process and their 439 delegate subclasses start and stop the run loops. This fixes a bug with showModalDialog where we would 440 unintentionally call -[NSApp stop] when closing a modal dialog. 441 442 This also lets us move all knowledge of NSApplication from RunLoop. (Both the web process and plug-in process 443 need to use -[NSApp run] and -[NSApp stop:]). 444 445 * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: 446 (WebKit::PluginProcessMainDelegate::doPreInitializationWork): 447 Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. Add a startRunLoop override that calls 448 -[NSApp run]. 449 450 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: 451 (PluginServiceInitializer): 452 Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. 453 454 * PluginProcess/PluginProcess.h: 455 Add stopRunLoop() override on Mac. 456 457 * PluginProcess/mac/PluginProcessMac.mm: 458 (WebKit::PluginProcess::stopRunLoop): 459 Call -[NSApp stop:] and tickle the event system. 460 461 * Shared/ChildProcess.cpp: 462 (WebKit::ChildProcess::stopRunLoop): 463 Add default implementation that just calls RunLoop::main()->stop(). 464 465 (WebKit::ChildProcess::terminate): 466 Call stopRunLoop(). 467 468 * Shared/ChildProcess.h: 469 * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: 470 Add startRunLoop member function and call it instead of RunLoop::run(). 471 472 * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: 473 (WebKit::ChildProcessMainDelegate::startRunLoop): 474 Call RunLoop::run(). 475 476 * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: 477 (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): 478 Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. 479 Add startRunLoop override that calls -[NSApp run]. 480 481 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: 482 (WebContentServiceInitializer): 483 Remove call to RunLoop::setUseApplicationRunLoopOnMainRunLoop. 484 485 * WebProcess/WebProcess.cpp: 486 (WebKit::WebProcess::didClose): 487 Call stopRunLoop(). 488 489 * WebProcess/WebProcess.h: 490 Add stopRunLoop override. 491 492 * WebProcess/mac/WebProcessMac.mm: 493 (WebKit::WebProcess::stopRunLoop): 494 Call -[NSApp stop:] and tickle the event system. 495 4962013-11-06 Lucas Forschler <lforschler@apple.com> 497 498 Merge r154763 499 500 2013-08-28 Anders Carlsson <andersca@apple.com> 501 502 Allow the Flash plug-in to open its preference pane 503 https://bugs.webkit.org/show_bug.cgi?id=120431 504 <rdar://problem/14857039> 505 506 Reviewed by Andreas Kling. 507 508 Forward the -[NSWorkspace openFile:] call to the UI process and allow opening 509 the Flash preference pane (if Flash asks for it). 510 511 * PluginProcess/PluginProcess.h: 512 * PluginProcess/mac/PluginProcessMac.mm: 513 (WebKit::replacedNSWorkspace_openFile): 514 (WebKit::initializeCocoaOverrides): 515 (WebKit::PluginProcess::openFile): 516 * UIProcess/Plugins/PluginProcessProxy.h: 517 * UIProcess/Plugins/PluginProcessProxy.messages.in: 518 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 519 (WebKit::PluginProcessProxy::openURL): 520 (WebKit::shouldOpenFile): 521 (WebKit::PluginProcessProxy::openFile): 522 5232013-11-04 Lucas Forschler <lforschler@apple.com> 524 525 Merge change from <rdar://problem/15374298> 526 527 * UIProcess/WebProcessProxy.cpp: 528 (WebKit::WebProcessProxy::getPlugins): 529 5302013-10-31 Lucas Forschler <lforschler@apple.com> 531 532 Merge r157056 533 534 2013-10-07 Tim Horton <timothy_horton@apple.com> 535 536 Animated images are not restarted when page visibility changes 537 https://bugs.webkit.org/show_bug.cgi?id=122464 538 <rdar://problem/14293474> 539 540 Reviewed by Simon Fraser. 541 542 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 543 (WebKit::TiledCoreAnimationDrawingArea::resumePainting): 544 This is on Page now. 545 5462013-10-28 Lucas Forschler <lforschler@apple.com> 547 548 Merge r157561 549 550 2013-10-17 Mark Rowe <mrowe@apple.com> 551 552 <rdar://problem/15183901> WebKit2 XPC services load the wrong frameworks when running 553 from the staged frameworks location. 554 555 Build the XPC services with DYLD_VERSIONED_FRAMEWORK_PATH when USE_STAGING_INSTALL_PATH 556 is set to YES. This is necessary because there's no way to specify environment variables 557 to be used when an XPC service is launched. 558 559 Reviewed by Anders Carlsson. 560 561 * Configurations/BaseTarget.xcconfig: Set OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH to contain the 562 DYLD_VERSIONED_FRAMEWORK_PATH value when USE_STAGING_INSTALL_PATH is YES. 563 * Configurations/BaseXPCService.xcconfig: Include OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH in the 564 value of OTHER_LDFLAGS. 565 * Configurations/PluginService.32.xcconfig: Ditto. 566 * Configurations/PluginService.64.xcconfig: Ditto. 567 5682013-10-28 Lucas Forschler <lforschler@apple.com> 569 570 Merge r156479 571 572 2013-09-25 Jer Noble <jer.noble@apple.com> 573 574 [WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46 575 https://bugs.webkit.org/show_bug.cgi?id=121910 576 577 Reviewed by Darin Adler. 578 579 Store a copy of the VoidCallback passed to WKPage, and invalidate the callback 580 during dealloc. The VoidCallback class assumes that it will only ever be 581 invalidated or invoked once, so change the ASSERTs into an early return. 582 583 * UIProcess/GenericCallback.h: 584 (WebKit::VoidCallback::performCallback): Exit early if previously invalidated. 585 (WebKit::VoidCallback::invalidate): Ditto. 586 * UIProcess/mac/WKFullScreenWindowController.h: 587 * UIProcess/mac/WKFullScreenWindowController.mm: 588 (-[WKFullScreenWindowController dealloc]): Invalidate the repaint callback if present. 589 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto & create a new callback. 590 (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Clear the callback. 591 5922013-10-28 Lucas Forschler <lforschler@apple.com> 593 594 Merge r156302 595 596 2013-09-23 Patrick Gansterer <paroga@webkit.org> 597 598 use NOMINMAX instead of #define min min 599 https://bugs.webkit.org/show_bug.cgi?id=73563 600 601 Reviewed by Brent Fulgham. 602 603 Use NOMINMAX instead of #define min/max as a cleaner 604 way of ensuring that Windows system header files don't 605 define min/max as macro in the first place. 606 607 * config.h: 608 6092013-10-25 Lucas Forschler <lforschler@apple.com> 610 611 Merge r155153 612 613 2013-09-05 Alexey Proskuryakov <ap@apple.com> 614 615 WKFullScreenWindowController extends lifetime of WKView, deleting it at a wrong time 616 https://bugs.webkit.org/show_bug.cgi?id=120792 617 <rdar://problem/14884666> 618 619 Reviewed by Jer Noble. 620 621 * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenWindowController]): 622 Use a newly minted initializer for the controller. 623 624 * UIProcess/mac/WKFullScreenWindowController.h: Removed unused web view accessors. 625 Changed the class to take web view at initialization time. 626 627 * UIProcess/mac/WKFullScreenWindowController.mm: 628 (-[WKFullScreenWindowController initWithWindow:webView:]): Initialize the controller 629 inone step. 630 (-[WKFullScreenWindowController dealloc]): WebView is now a raw pointer, no need 631 to zero it. 632 (-[WKFullScreenWindowController close]): Make sure to not leave a dangling WKView 633 pointer (this method is indirectly but inevitably called when WKView is deallocated). 634 6352013-10-24 Lucas Forschler <lforschler@apple.com> 636 637 Merge r154647 638 639 2013-08-23 Andy Estes <aestes@apple.com> 640 641 Fix issues found by the Clang Static Analyzer 642 https://bugs.webkit.org/show_bug.cgi?id=120230 643 644 Reviewed by Darin Adler. 645 646 * UIProcess/API/mac/WKBrowsingContextController.mm: 647 (autoreleased): Don't leak CFURLs when in Objective-C GC. 648 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: 649 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 650 Don't leak CFStrings when in Objective-C GC. 651 6522013-10-21 Lucas Forschler <lforschler@apple.com> 653 654 Merge r154183 655 656 2013-08-16 Brady Eidson <beidson@apple.com> 657 658 (NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously 659 https://bugs.webkit.org/show_bug.cgi?id=119493 660 661 Reviewed by Alexey Proskuryakov. 662 663 This patch does the following: 664 - Consolidates SchedulableLoader and NetworkResourceLoader into one class. 665 - Removes SyncNetworkResourceLoader. 666 - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader. 667 - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads. 668 669 The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses. 670 The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess 671 only when the load is complete. 672 673 Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm): 674 * NetworkProcess/HostRecord.cpp: 675 (WebKit::HostRecord::scheduleResourceLoader): 676 (WebKit::HostRecord::addLoaderInProgress): 677 (WebKit::removeLoaderFromQueue): 678 (WebKit::HostRecord::removeLoader): 679 (WebKit::HostRecord::servePendingRequestsForQueue): 680 (WebKit::HostRecord::limitsRequests): 681 * NetworkProcess/HostRecord.h: 682 683 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 684 (WebKit::NetworkConnectionToWebProcess::didClose): 685 (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): 686 (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): 687 * NetworkProcess/NetworkConnectionToWebProcess.h: 688 689 * NetworkProcess/NetworkProcess.cpp: 690 * NetworkProcess/NetworkResourceLoadScheduler.cpp: 691 (WebKit::NetworkResourceLoadScheduler::scheduleLoader): 692 (WebKit::NetworkResourceLoadScheduler::removeLoader): 693 (WebKit::NetworkResourceLoadScheduler::receivedRedirect): 694 (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): 695 (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): 696 * NetworkProcess/NetworkResourceLoadScheduler.h: 697 698 Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader: 699 * NetworkProcess/NetworkResourceLoader.cpp: 700 (WebKit::NetworkResourceLoader::NetworkResourceLoader): 701 (WebKit::NetworkResourceLoader::~NetworkResourceLoader): 702 (WebKit::NetworkResourceLoader::isSynchronous): 703 (WebKit::NetworkResourceLoader::start): 704 (WebKit::NetworkResourceLoader::didReceiveResponseAsync): 705 (WebKit::NetworkResourceLoader::didReceiveBuffer): 706 (WebKit::NetworkResourceLoader::didFinishLoading): 707 (WebKit::NetworkResourceLoader::didFail): 708 (WebKit::NetworkResourceLoader::willSendRequestAsync): 709 (WebKit::NetworkResourceLoader::continueWillSendRequest): 710 (WebKit::NetworkResourceLoader::didSendData): 711 (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): 712 (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): 713 (WebKit::NetworkResourceLoader::consumeSandboxExtensions): 714 (WebKit::NetworkResourceLoader::invalidateSandboxExtensions): 715 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): 716 * NetworkProcess/NetworkResourceLoader.h: 717 (WebKit::NetworkResourceLoader::create): 718 (WebKit::NetworkResourceLoader::connectionToWebProcess): 719 (WebKit::NetworkResourceLoader::priority): 720 (WebKit::NetworkResourceLoader::request): 721 (WebKit::NetworkResourceLoader::isLoadingMainResource): 722 (WebKit::NetworkResourceLoader::setHostRecord): 723 (WebKit::NetworkResourceLoader::hostRecord): 724 (WebKit::NetworkResourceLoader::sendAbortingOnFailure): 725 726 Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous: 727 * NetworkProcess/NetworkLoaderClient.h: 728 (WebKit::NetworkLoaderClient::~NetworkLoaderClient): 729 (WebKit::NetworkLoaderClient::isSynchronous): 730 (WebKit::NetworkLoaderClient::NetworkLoaderClient): 731 732 The asynchronous loader client, primarily to message progress back to the WebProcess as it happens: 733 * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added. 734 (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient): 735 (WebKit::AsynchronousNetworkLoaderClient::willSendRequest): 736 (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): 737 (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse): 738 (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer): 739 (WebKit::AsynchronousNetworkLoaderClient::didSendData): 740 (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading): 741 (WebKit::AsynchronousNetworkLoaderClient::didFail): 742 * NetworkProcess/AsynchronousNetworkLoaderClient.h: 743 (WebKit::AsynchronousNetworkLoaderClient::create): 744 745 The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once: 746 * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added. 747 (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient): 748 (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient): 749 (WebKit::SynchronousNetworkLoaderClient::willSendRequest): 750 (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): 751 (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse): 752 (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer): 753 (WebKit::SynchronousNetworkLoaderClient::didFinishLoading): 754 (WebKit::SynchronousNetworkLoaderClient::didFail): 755 (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply): 756 * NetworkProcess/SynchronousNetworkLoaderClient.h: Added. 757 (WebKit::SynchronousNetworkLoaderClient::create): 758 759 * NetworkProcess/SchedulableLoader.cpp: Removed. 760 * NetworkProcess/SchedulableLoader.h: Removed. 761 * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed. 762 * NetworkProcess/SyncNetworkResourceLoader.h: Removed. 763 764 * WebKit2.xcodeproj/project.pbxproj: 765 7662013-10-21 Lucas Forschler <lforschler@apple.com> 767 768 Merge r154085 769 770 2013-08-14 Dean Jackson <dino@apple.com> 771 772 <https://webkit.org/b/119827> Allow primary plug-in detection to run more than once if necessary 773 774 Reviewed by Tim Horton. 775 776 We occasionally see cases where the primary plug-in detection runs before the plugins have been added 777 to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can 778 run an arbitrary number of times if it fails. 779 780 While here, also have the detection run if there has ever been a plugin in the page as opposed to any 781 current views. We may have snapshotted a plugin by now and deleted its view. 782 783 * WebProcess/WebPage/WebPage.cpp: 784 (WebKit::WebPage::WebPage): initialise new members. 785 (WebKit::WebPage::addPluginView): Mark that we've seen a plugin. 786 (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members. 787 (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never 788 seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set 789 a timer to run again (maximum of two attempts at the moment). 790 * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts 791 and m_hasSeenPlugin. 792 7932013-10-21 Lucas Forschler <lforschler@apple.com> 794 795 Merge r154077 796 797 2013-08-14 Dean Jackson <dino@apple.com> 798 799 <https://webkit.org/b/119820> Add pluginView-related logging to WebPage 800 801 Reviewed by Tim Horton. 802 803 Add some more diagnostic output to help track down bugs. 804 805 * WebProcess/WebPage/WebPage.cpp: 806 (WebKit::WebPage::addPluginView): More logging. 807 (WebKit::WebPage::removePluginView): Ditto. 808 8092013-10-21 Lucas Forschler <lforschler@apple.com> 810 811 Merge r153848 812 813 2013-08-08 Dean Jackson <dino@apple.com> 814 815 Add logging to the primary plugin detection 816 https://bugs.webkit.org/show_bug.cgi?id=119594 817 818 Reviewed by Tim Horton. 819 820 Add some simple logging to our primary plug-in detection. 821 822 * WebProcess/WebPage/WebPage.cpp: 823 (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 824 8252013-10-21 Lucas Forschler <lforschler@apple.com> 826 827 Merge r154067 828 829 2013-08-14 Tim Horton <timothy_horton@apple.com> 830 831 REGRESSION (r153877): Plugin scanning slows creation of WebViews 832 https://bugs.webkit.org/show_bug.cgi?id=119665 833 <rdar://problem/14716549> 834 835 Reviewed by Darin Adler. 836 837 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 838 (WebKit::WebPlatformStrategies::refreshPlugins): 839 Don't repopulate the plugin cache in refreshPlugins, just invalidate it. 840 It will be repopulated the next time something tries to use it. 841 8422013-10-21 Lucas Forschler <lforschler@apple.com> 843 844 Merge r153877 845 846 2013-08-08 Tim Horton <timothy_horton@apple.com> 847 848 navigator.plugins has plugins in it when plugins are disabled 849 https://bugs.webkit.org/show_bug.cgi?id=119607 850 <rdar://problem/14678030> 851 852 Reviewed by Anders Carlsson. 853 854 * UIProcess/WebProcessProxy.cpp: 855 (WebKit::WebProcessProxy::getPlugins): 856 Return a list of all plugins, and a list of only application plugins. 857 858 * UIProcess/WebProcessProxy.h: 859 * UIProcess/WebProcessProxy.messages.in: 860 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 861 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 862 (WebKit::WebPlatformStrategies::getPluginInfo): 863 Add applicationPlugin parameter to getPlugins, and storage for the returned list. 864 865 (WebKit::WebPlatformStrategies::populatePluginCache): 866 If plugins are disabled for the given page, give WebCore the list that 867 only includes application plugins. Otherwise, give it the whole list 868 as we are doing currently. 869 8702013-09-04 Dean Jackson <dino@apple.com> 871 872 <rdar://problem/14910916> Disable CSS_SHAPES on safari-537-branch 873 874 Reviewed by Beth Dakin. 875 876 * Configurations/FeatureDefines.xcconfig: 877 8782013-08-26 Lucas Forschler <lforschler@apple.com> 879 880 Merge r154528 881 882 2013-08-23 Beth Dakin <bdakin@apple.com> 883 884 REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 885 Adobe Reader 886 https://bugs.webkit.org/show_bug.cgi?id=120240 887 -and corresponding- 888 <rdar://problem/14634453> 889 890 Reviewed by Anders Carlsson. 891 892 Hook up new WebSystemInterface API to find out if the current context is the PDF 893 context. 894 895 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 896 (InitWebCoreSystemInterface): 897 8982013-08-23 Lucas Forschler <lforschler@apple.com> 899 900 Merge r154473 901 902 2013-08-22 Simon Cooper <scooper@apple.com> 903 904 Need to disable FakeSYSVSHM when sandboxing is not enabled 905 https://bugs.webkit.org/show_bug.cgi?id=120182 906 <rdar://problem/14814461> 907 908 Reviewed by Alexey Proskuryakov. 909 910 When not in a sandbox do not enable the FakeSYSVSHIM. This 911 allows LocalConnection to work when Flash Player is run in 912 "Unsafe Mode". 913 914 * PluginProcess/mac/PluginProcessShim.mm: 915 (WebKit::shim_disabled): 916 9172013-08-23 Lucas Forschler <lforschler@apple.com> 918 919 Merge r154433 920 921 2013-08-21 Tim Horton <timothy_horton@apple.com> 922 923 Another null-deref under WebDragClient::startDrag 924 https://bugs.webkit.org/show_bug.cgi?id=120145 925 <rdar://problem/14650652> 926 927 Reviewed by Simon Fraser. 928 929 convertImageToBitmap can legitimately return null, so don't dereference it. 930 931 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: 932 (WebKit::WebDragClient::startDrag): 933 9342013-08-20 Lucas Forschler <lforschler@apple.com> 935 936 Merge r154302 937 938 2013-08-19 Beth Dakin <bdakin@apple.com> 939 940 <https://webkit.org/b/120027> AXObjectCache's 941 accessibilityEnhancedUserInterfaceEnabled should be initialized on process 942 creation 943 944 Reviewed by Sam Weinig. 945 946 Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends 947 us a notification indicating that the value has changed. We should not have to 948 rely on that to properly initialize this value. It should be done with the 949 WebProcessCreationParamters. 950 951 * Shared/WebProcessCreationParameters.cpp: 952 (WebKit::WebProcessCreationParameters::encode): 953 (WebKit::WebProcessCreationParameters::decode): 954 * Shared/WebProcessCreationParameters.h: 955 * UIProcess/mac/WebContextMac.mm: 956 (WebKit::WebContext::platformInitializeWebProcess): 957 * WebProcess/mac/WebProcessMac.mm: 958 (WebKit::WebProcess::platformInitializeWebProcess): 959 9602013-08-09 Lucas Forschler <lforschler@apple.com> 961 962 Merge r153907 963 964 2013-08-09 Beth Dakin <bdakin@apple.com> 965 966 AX: Not able to use arrow keys to read text in a WK2 app 967 https://bugs.webkit.org/show_bug.cgi?id=119605 968 -and corresponding- 969 <rdar://problem/14281275> 970 971 Reviewed by Darin Adler. 972 973 Make all of these scrolling functions actually return the WebCore bools that 974 indicate whether or not scrolling happened. 975 * WebProcess/WebPage/WebPage.cpp: 976 (WebKit::WebPage::scroll): 977 (WebKit::WebPage::logicalScroll): 978 (WebKit::WebPage::scrollBy): 979 * WebProcess/WebPage/WebPage.h: 980 * WebProcess/WebPage/mac/WebPageMac.mm: 981 (WebKit::WebPage::executeKeypressCommandsInternal): 982 983 This function now gives accessibility a chance to handle the event too. And it 984 also actually tracks whether or not the event was handled by scrolling instead of 985 assuming that it was and universally returning true. 986 (WebKit::WebPage::performNonEditingBehaviorForSelector): 987 9882013-08-08 Lucas Forschler <lforschler@apple.com> 989 990 Merge r153856 991 992 2013-08-08 Gavin Barraclough <barraclough@apple.com> 993 994 Disable suppression of plugin process for Java 995 https://bugs.webkit.org/show_bug.cgi?id=119604 996 997 Reviewed by Sam Weinig. 998 999 Workaround, the Java plugin doesn't like this. 1000 1001 * PluginProcess/mac/PluginProcessMac.mm: 1002 (WebKit::PluginProcess::platformInitializeProcess): 1003 - +1 active task count on the java plugin, to inhibit supression. 1004 10052013-08-07 Lucas Forschler <lforschler@apple.com> 1006 1007 Merge r153775 1008 1009 2013-08-06 Stephanie Lewis <slewis@apple.com> 1010 1011 Update Order Files for Safari 1012 <rdar://problem/14517392> 1013 1014 Unreviewed. 1015 1016 * mac/WebKit2.order: 1017 10182013-08-07 Lucas Forschler <lforschler@apple.com> 1019 1020 Merge r153773 1021 1022 2013-08-06 Jer Noble <jer.noble@apple.com> 1023 1024 Crash when entering fullscreen video playback from a WebView using WebKit2 1025 https://bugs.webkit.org/show_bug.cgi?id=119531 1026 1027 Reviewed by Tim Horton. 1028 1029 Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface. 1030 1031 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 1032 (InitWebCoreSystemInterface): 1033 10342013-08-06 Lucas Forschler <lforschler@apple.com> 1035 1036 Merge r153753 1037 1038 2013-08-06 Andreas Kling <akling@apple.com> 1039 1040 REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed. 1041 <http://webkit.org/b/119516> 1042 <rdar://problem/14648086> 1043 1044 Reviewed by Simon Fraser. 1045 1046 The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy 1047 of the window rect for fast access from DOMWindow APIs. 1048 1049 We retain part of the optimization introduced in r151403, namely not computing the 1050 viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them. 1051 1052 * UIProcess/API/mac/WKView.mm: 1053 (-[WKView _updateWindowAndViewFrames]): 1054 10552013-08-05 Lucas Forschler <lforschler@apple.com> 1056 1057 Merge r153724 1058 1059 2013-08-05 Anders Carlsson <andersca@apple.com> 1060 1061 Ignore the Apple Java placeholder plug-in 1062 https://bugs.webkit.org/show_bug.cgi?id=119494 1063 <rdar://problem/14610818> 1064 1065 Reviewed by Beth Dakin. 1066 1067 Never attempt to load the Java placeholder plug-in. 1068 1069 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: 1070 (WebKit::PluginInfoStore::shouldUsePlugin): 1071 10722013-08-01 Lucas Forschler <lforschler@apple.com> 1073 1074 Merge r153499 1075 1076 2013-07-30 Anders Carlsson <andersca@apple.com> 1077 1078 Speculative fix for crash due to string access on multiple threads 1079 https://bugs.webkit.org/show_bug.cgi?id=119279 1080 <rdar://problem/14267833> 1081 1082 Reviewed by Darin Adler. 1083 1084 We can't use String::isolatedCopy for passing the local storage directory to the storage thread since 1085 that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window 1086 where the refcount can be accessed simultaneously from two threads. 1087 1088 Work around this by passing a PassRefPtr<StringImpl> to bind instead; the act of copying the PassRefPtr will 1089 clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null. 1090 1091 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 1092 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): 1093 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): 1094 * UIProcess/Storage/LocalStorageDatabaseTracker.h: 1095 10962013-08-01 Lucas Forschler <lforschler@apple.com> 1097 1098 Merge r153488 1099 1100 2013-07-30 Anders Carlsson <andersca@apple.com> 1101 1102 Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate 1103 https://bugs.webkit.org/show_bug.cgi?id=119270 1104 <rdar://problem/13368226> 1105 1106 Reviewed by Darin Adler. 1107 1108 Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while 1109 they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this 1110 since we don't know the plug-in or connection. 1111 1112 Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in 1113 destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector). 1114 1115 * Platform/CoreIPC/Connection.cpp: 1116 (CoreIPC::Connection::Connection): 1117 (CoreIPC::Connection::sendSyncMessage): 1118 * Platform/CoreIPC/Connection.h: 1119 (CoreIPC::Connection::inSendSync): 1120 * PluginProcess/PluginControllerProxy.cpp: 1121 (WebKit::PluginControllerProxy::destroy): 1122 11232013-08-01 Lucas Forschler <lforschler@apple.com> 1124 1125 Merge r153482 1126 1127 2013-07-30 Jeff Miller <jeffm@apple.com> 1128 1129 Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0 1130 https://bugs.webkit.org/show_bug.cgi?id=119269 1131 <rdar://problem/14582393> 1132 1133 Reviewed by Anders Carlsson. 1134 1135 * UIProcess/WebPageProxy.cpp: 1136 (WebKit::WebPageProxy::processIdentifier): 1137 Return 0 if the page is closed instead of requiring isValid(). 1138 11392013-07-31 Lucas Forschler <lforschler@apple.com> 1140 1141 Merge r153511 1142 1143 2013-07-30 Tim Horton <timothy_horton@apple.com> 1144 1145 DHTML drag can result in a null-deref under WebDragClient::startDrag 1146 https://bugs.webkit.org/show_bug.cgi?id=119297 1147 <rdar://problem/14213012> 1148 1149 Reviewed by Simon Fraser. 1150 1151 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: 1152 (WebKit::convertImageToBitmap): 1153 ShareableBitmap::createShareable can return null, but shouldn't dereference that. 1154 11552013-07-31 Lucas Forschler <lforschler@apple.com> 1156 1157 Merge r153487 1158 1159 2013-07-30 Tim Horton <timothy_horton@apple.com> 1160 1161 Null deref under WebPage::scaledSnapshotWithOptions 1162 https://bugs.webkit.org/show_bug.cgi?id=119243 1163 <rdar://problem/14502050> 1164 1165 Reviewed by Darin Adler. 1166 1167 * WebProcess/WebPage/WebPage.cpp: 1168 (WebKit::WebPage::scaledSnapshotWithOptions): 1169 WebFrame::coreFrame() can be null (if the Frame is already torn down), 1170 so we should check it. 1171 11722013-07-30 Lucas Forschler <lforschler@apple.com> 1173 1174 Merge r153486 1175 1176 2013-07-30 Tim Horton <timothy_horton@apple.com> 1177 1178 Null deref under PluginView::handlesPageScaleFactor() 1179 https://bugs.webkit.org/show_bug.cgi?id=119231 1180 <rdar://problem/14440207> 1181 1182 Reviewed by Darin Adler. 1183 1184 Null-check the PluginView in the caller as well. 1185 1186 * WebProcess/WebPage/WebFrame.cpp: 1187 (WebKit::WebFrame::handlesPageScaleGesture): 1188 11892013-07-30 Lucas Forschler <lforschler@apple.com> 1190 1191 Merge r153449 1192 1193 2013-07-29 Tim Horton <timothy_horton@apple.com> 1194 1195 Null deref under PluginView::handlesPageScaleFactor() 1196 https://bugs.webkit.org/show_bug.cgi?id=119231 1197 <rdar://problem/14440207> 1198 1199 Reviewed by Simon Fraser. 1200 1201 * WebProcess/Plugins/PluginView.cpp: 1202 (WebKit::PluginView::handlesPageScaleFactor): 1203 * WebProcess/Plugins/PluginView.h: 1204 Null-check m_plugin and check m_isInitialized. 1205 Make pageScaleFactor() and handlesPageScaleFactor const. 1206 12072013-07-29 Lucas Forschler <lforschler@apple.com> 1208 1209 Merge r153458 1210 1211 2013-07-29 Tim Horton <timothy_horton@apple.com> 1212 1213 [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync 1214 https://bugs.webkit.org/show_bug.cgi?id=119225 1215 <rdar://problem/14568841> 1216 1217 Reviewed by Simon Fraser. 1218 1219 Tell CoreAnimation to flush the implicit transaction before replying 1220 when using endDeferringViewInWindowChangesSync, as that method's contract 1221 is that the WebProcess is totally ready to be in-window when it returns. 1222 1223 * UIProcess/API/mac/WKView.mm: 1224 (-[WKView endDeferringViewInWindowChanges]): 1225 Adopt viewInWindowStateDidChange. 1226 1227 (-[WKView endDeferringViewInWindowChangesSync]): 1228 Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one. 1229 1230 * UIProcess/WebPageProxy.cpp: 1231 (WebKit::WebPageProxy::viewInWindowStateDidChange): 1232 (WebKit::WebPageProxy::viewStateDidChange): 1233 Pull viewInWindowStateDidChange out of viewStateDidChange. 1234 Request a reply from SetIsInWindow if we're told to. 1235 1236 * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange. 1237 * WebProcess/WebPage/WebPage.cpp: 1238 (WebKit::WebPage::didUpdateInWindowStateTimerFired): 1239 Don't build this version on Mac, we'll have a WebPageMac version. 1240 1241 (WebKit::WebPage::setIsInWindow): 1242 Only start the timer to send the didUpdateInWindowState reply if we're asked to. 1243 1244 * WebProcess/WebPage/WebPage.h: 1245 * WebProcess/WebPage/WebPage.messages.in: 1246 Add an argument to the SetIsInWindow message for whether the WebProcess 1247 should inform the UIProcess when SetIsInWindow completes or not. 1248 1249 * WebProcess/WebPage/mac/WebPageMac.mm: 1250 (WebKit::WebPage::didUpdateInWindowStateTimerFired): 1251 Tell CA to flush the implicit transaction before telling the UIProcess that 1252 we're finished moving in-window. 1253 12542013-07-29 Lucas Forschler <lforschler@apple.com> 1255 1256 Merge r153449 1257 1258 2013-07-29 Tim Horton <timothy_horton@apple.com> 1259 1260 Null deref under PluginView::handlesPageScaleFactor() 1261 https://bugs.webkit.org/show_bug.cgi?id=119231 1262 <rdar://problem/14440207> 1263 1264 Reviewed by Simon Fraser. 1265 1266 * WebProcess/Plugins/PluginView.cpp: 1267 (WebKit::PluginView::handlesPageScaleFactor): 1268 * WebProcess/Plugins/PluginView.h: 1269 Null-check m_plugin and check m_isInitialized. 1270 Make pageScaleFactor() and handlesPageScaleFactor const. 1271 12722013-07-28 Lucas Forschler <lforschler@apple.com> 1273 1274 Merge r153404 1275 1276 2013-07-27 Chris Fleizach <cfleizach@apple.com> 1277 1278 AX: VoiceOver not working with data detection page overlays 1279 https://bugs.webkit.org/show_bug.cgi?id=118680 1280 1281 Reviewed by Sam Weinig. 1282 1283 Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay. 1284 This requires two methods in a new callback struct. One to copy the attribute names, and the other to 1285 copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method 1286 with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the 1287 overlay at this time as there are no clients with such a need. 1288 1289 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: 1290 (PageOverlayClientImpl::setAccessibilityClient): 1291 (PageOverlayClientImpl::PageOverlayClientImpl): 1292 (PageOverlayClientImpl::copyAccessibilityAttributeValue): 1293 (PageOverlayClientImpl::copyAccessibilityAttributeNames): 1294 (WKBundlePageOverlaySetAccessibilityClient): 1295 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 1296 * WebProcess/WebPage/PageOverlay.cpp: 1297 (WebKit::PageOverlay::copyAccessibilityAttributeValue): 1298 (WebKit::PageOverlay::copyAccessibilityAttributeNames): 1299 * WebProcess/WebPage/PageOverlay.h: 1300 (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue): 1301 (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames): 1302 (WebKit::PageOverlay::client): 1303 * WebProcess/WebPage/WebPage.cpp: 1304 (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue): 1305 (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames): 1306 * WebProcess/WebPage/WebPage.h: 1307 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: 1308 (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): 1309 (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]): 1310 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 1311 13122013-07-28 Lucas Forschler <lforschler@apple.com> 1313 1314 Merge r153402 1315 1316 2013-07-27 Simon Fraser <simon.fraser@apple.com> 1317 1318 If entering fullscreen for a window fails, don't leave things in a bad state 1319 https://bugs.webkit.org/show_bug.cgi?id=119179 1320 1321 Reviewed by Sam Weinig. 1322 1323 On Lion, attempting to take a video fullscreen when the Safari window is already 1324 fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen: 1325 1326 When this happens we have to undo the work done when entering fullscreen, to 1327 avoid leaving things in a bad state. 1328 1329 * UIProcess/mac/WKFullScreenWindowController.mm: 1330 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 1331 13322013-07-26 Lucas Forschler <lforschler@apple.com> 1333 1334 Merge r153378 1335 1336 2013-07-26 Tim Horton <timothy_horton@apple.com> 1337 1338 Add a mode where autosizing fixes the FrameView height to at least the WKView height 1339 https://bugs.webkit.org/show_bug.cgi?id=119104 1340 <rdar://problem/14549021> 1341 1342 Reviewed by Anders Carlsson. 1343 1344 * Shared/WebPageCreationParameters.cpp: 1345 (WebKit::WebPageCreationParameters::encode): 1346 (WebKit::WebPageCreationParameters::decode): 1347 * Shared/WebPageCreationParameters.h: 1348 Add autoSizingShouldExpandToViewHeight parameter. 1349 1350 * UIProcess/API/mac/WKView.mm: 1351 (-[WKView minimumWidthForAutoLayout]): 1352 (-[WKView setMinimumWidthForAutoLayout:]): 1353 Un-deprecate these as they're still useful if not sending a height. 1354 1355 (-[WKView shouldExpandToViewHeightForAutoLayout]): 1356 (-[WKView setShouldExpandToViewHeightForAutoLayout:]): 1357 * UIProcess/API/mac/WKViewPrivate.h: 1358 New property, forward to WebPageProxy. 1359 1360 * UIProcess/WebPageProxy.cpp: 1361 (WebKit::WebPageProxy::WebPageProxy): 1362 (WebKit::WebPageProxy::creationParameters): 1363 (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight): 1364 * UIProcess/WebPageProxy.h: 1365 (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight): 1366 New property, forward to WebPage. 1367 1368 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 1369 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 1370 If enabled, update the FrameView's autoSizeFixedMinimumHeight. 1371 1372 * WebProcess/WebPage/WebPage.cpp: 1373 (WebKit::WebPage::WebPage): 1374 (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight): 1375 * WebProcess/WebPage/WebPage.h: 1376 (WebKit::WebPage::autoSizingShouldExpandToViewHeight): 1377 New property; if enabled, set FrameView's autoSizeFixedMinimumHeight, 1378 otherwise reset it to 0. 1379 1380 * WebProcess/WebPage/WebPage.messages.in: 1381 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 1382 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): 1383 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 1384 Retrieve intrinsic content size explicitly from the FrameView, as 1385 it may not have used it as its final contentsSize if 1386 autoSizeFixedMinimumHeight is set. 1387 1388 Set the WebPage's size in case the load is committed so that the 1389 WebFrameLoaderClient doesn't reset us to the wrong size. 1390 1391 Update autoSizeFixedMinimumHeight if enabled when the view size changes. 1392 13932013-07-26 Lucas Forschler <lforschler@apple.com> 1394 1395 Merge r153107 1396 1397 2013-07-24 Anders Carlsson <andersca@apple.com> 1398 1399 Crash when calling WKPageGetProcessIdentifier after aborted process launch 1400 https://bugs.webkit.org/show_bug.cgi?id=119069 1401 <rdar://problem/14494064> 1402 1403 Reviewed by Andreas Kling. 1404 1405 * UIProcess/WebPageProxy.cpp: 1406 (WebKit::WebPageProxy::processIdentifier): 1407 Check if the page is closed instead of checking whether we have a process - We'll always have a process. 1408 1409 (WebKit::WebPageProxy::isValid): 1410 Make this const. 1411 1412 * UIProcess/WebPageProxy.h: 1413 14142013-07-24 Lucas Forschler <lforschler@apple.com> 1415 1416 Merge r153096 1417 1418 2013-07-24 Jessie Berlin <jberlin@apple.com> 1419 1420 Remove WKPageGetPlugInInformation - it is not used anymore 1421 https://bugs.webkit.org/show_bug.cgi?id=119047 1422 1423 Reviewed by Alexey Proskuryakov. 1424 1425 Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming 1426 and ref-churn issues introduced in r151043, and r151043, which added 1427 WKPageGetPlugInInformation. 1428 1429 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: 1430 (WKPageIsURLKnownHSTSHost): 1431 * UIProcess/API/C/mac/WKPagePrivateMac.h: 1432 * UIProcess/Plugins/PluginProcessManager.h: 1433 * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: 1434 * UIProcess/WebPageProxy.cpp: 1435 (WebKit::WebPageProxy::close): 1436 * UIProcess/WebPageProxy.h: 1437 * UIProcess/WebPageProxy.messages.in: 1438 * UIProcess/mac/WebPageProxyMac.mm: 1439 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 1440 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: 1441 * WebProcess/Plugins/Plugin.h: 1442 * WebProcess/Plugins/PluginProxy.h: 1443 * WebProcess/Plugins/PluginView.h: 1444 * WebProcess/WebPage/WebPage.h: 1445 * WebProcess/WebPage/WebPage.messages.in: 1446 * WebProcess/WebPage/mac/WebPageMac.mm: 1447 14482013-07-24 Lucas Forschler <lforschler@apple.com> 1449 1450 Merge r153092 1451 1452 2013-07-24 Jessie Berlin <jberlin@apple.com> 1453 1454 Remove WKPageGetPlugInInformation - it is not used anymore 1455 https://bugs.webkit.org/show_bug.cgi?id=119047 1456 1457 Rubber-stamped by Alexey Proskuryakov. 1458 1459 Revert r152328, which added a key used only in the callback info for 1460 WKPageGetPlugInInformation. 1461 1462 * Shared/API/c/WKPluginInformation.cpp: 1463 * Shared/API/c/WKPluginInformation.h: 1464 * Shared/Plugins/Netscape/PluginInformation.cpp: 1465 * Shared/Plugins/Netscape/PluginInformation.h: 1466 * UIProcess/WebPageProxy.h: 1467 * UIProcess/WebPageProxy.messages.in: 1468 * UIProcess/mac/WebPageProxyMac.mm: 1469 (WebKit::WebPageProxy::containsPlugInCallback): 1470 * WebProcess/WebPage/mac/WebPageMac.mm: 1471 (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): 1472 14732013-07-23 Lucas Forschler <lforschler@apple.com> 1474 1475 Merge r153070 1476 1477 2013-07-23 Simon Cooper <scooper@apple.com> 1478 1479 10.7: Java applets do not work due to sandbox violation/exception 1480 https://bugs.webkit.org/show_bug.cgi?id=118920 1481 <rdar://problem/14471541&12910934&14223830&14260729&14267679> 1482 1483 Reviewed by Alexey Proskuryakov. 1484 1485 Introduce versioning into the common profile and use it to fix 1486 a number of issues with Java on 10.7 and 10.8. Allow writing the 1487 com.apple.java.util.prefs preference file. This change also 1488 introduces a "/Library/Application Support/Java/PublicFiles" 1489 area which Java can read without any restrictions. Files written 1490 to this location will need to be created and written to by 1491 a privileged process. 1492 1493 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 1494 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 1495 14962013-07-22 Lucas Forschler <lforschler@apple.com> 1497 1498 Merge r152984 1499 1500 2013-07-22 Alexey Proskuryakov <ap@apple.com> 1501 1502 Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent 1503 https://bugs.webkit.org/show_bug.cgi?id=118976 1504 <rdar://problem/14155030> 1505 1506 Reviewed by Sam Weinig. 1507 1508 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited): 1509 Clear m_gestureEventQueue, just like we clear all other event queues here. 1510 15112013-07-22 Lucas Forschler <lforschler@apple.com> 1512 1513 Merge r152950 1514 1515 2013-07-21 Anders Carlsson <andersca@apple.com> 1516 1517 Java Updater not launched on Lion and Mountain Lion 1518 https://bugs.webkit.org/show_bug.cgi?id=118953 1519 <rdar://problem/14496721> 1520 1521 Reviewed by Sam Weinig. 1522 1523 On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of 1524 them has "localhost" specified, even if the paths are otherwise equal. Work around this by 1525 comparing the paths directly. 1526 1527 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 1528 (WebKit::isJavaUpdaterURL): 1529 15302013-07-22 Lucas Forschler <lforschler@apple.com> 1531 1532 Merge r152787 1533 1534 2013-07-17 Simon Cooper <scooper@apple.com> 1535 1536 YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera 1537 https://bugs.webkit.org/show_bug.cgi?id=118787 1538 <rdar://problem/14418799> 1539 1540 Reviewed by Alexey Proskuryakov. 1541 1542 Add support for built-in cameras, including the original iSight. 1543 1544 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 1545 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 1546 15472013-07-22 Lucas Forschler <lforschler@apple.com> 1548 1549 Merge r152866 1550 1551 2013-07-18 Tim Horton <timothy_horton@apple.com> 1552 1553 [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes 1554 https://bugs.webkit.org/show_bug.cgi?id=118862 1555 1556 Reviewed by Anders Carlsson. 1557 1558 * WebProcess/Plugins/PluginView.cpp: 1559 (WebKit::PluginView::PluginView): 1560 Add m_pluginProcessHasCrashed. 1561 1562 (WebKit::PluginView::platformLayer): 1563 Don't return the plugin's layer if it has crashed. 1564 1565 (WebKit::PluginView::pluginProcessCrashed): 1566 Set m_pluginProcessHasCrashed. 1567 Cause a style recalc so that we rebuild the layer tree; our layer won't be included. 1568 1569 * WebProcess/Plugins/PluginView.h: 1570 Add m_pluginProcessHasCrashed. 1571 15722013-07-22 Lucas Forschler <lforschler@apple.com> 1573 1574 Merge r152862 1575 1576 2013-07-18 Alexey Proskuryakov <ap@apple.com> 1577 1578 <rdar://problem/13886443> Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader 1579 <rdar://problem/13826348> ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension 1580 https://bugs.webkit.org/show_bug.cgi?id=118855 1581 1582 Reviewed by Brady Eidson. 1583 1584 * NetworkProcess/NetworkResourceLoader.cpp: 1585 (WebKit::NetworkResourceLoader::cleanup): 1586 (WebKit::NetworkResourceLoader::didFinishLoading): 1587 (WebKit::NetworkResourceLoader::didFail): 1588 Moved sandbox extension invalidation to cleanup() meaning that we won't fail to 1589 do this when aborting a loader that currently loading from network. 1590 1591 * NetworkProcess/SchedulableLoader.cpp: 1592 (WebKit::SchedulableLoader::SchedulableLoader): 1593 (WebKit::SchedulableLoader::consumeSandboxExtensions): 1594 (WebKit::SchedulableLoader::invalidateSandboxExtensions): 1595 * NetworkProcess/SchedulableLoader.h: 1596 Keep track of whether sandbox extensions are consumed, we don't want to revoke 1597 extensions that were never consumed (as used to be the case with sync loaders, 1598 and would be with async ones after the above fix). Also, get rid of extensions 1599 immediately when invalidating, we won't need them again. 1600 16012013-07-22 Lucas Forschler <lforschler@apple.com> 1602 1603 Merge r152824 1604 1605 2013-07-17 Tim Horton <timothy_horton@apple.com> 1606 1607 Update blocked/missing plug-in UI 1608 https://bugs.webkit.org/show_bug.cgi?id=118347 1609 <rdar://problem/14209318> 1610 1611 Reviewed by Sam Weinig. 1612 1613 * Platform/CoreIPC/HandleMessage.h: 1614 (CoreIPC::callMemberFunction): 1615 Add a 6 argument -> 4 reply message handler. 1616 (It seems that FindPlugin is getting a little out of hand.) 1617 1618 * Shared/APIClientTraits.cpp: 1619 * Shared/APIClientTraits.h: 1620 * UIProcess/API/C/WKPage.h: 1621 * UIProcess/WebLoaderClient.cpp: 1622 (WebKit::WebLoaderClient::pluginLoadPolicy): 1623 * UIProcess/WebLoaderClient.h: 1624 Add an unavailability description out-argument to a new version of 1625 pluginLoadPolicy, so clients can override the text of the unavailable 1626 plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. 1627 1628 * UIProcess/WebPageProxy.cpp: 1629 (WebKit::WebPageProxy::findPlugin): 1630 * UIProcess/WebPageProxy.h: 1631 * UIProcess/WebPageProxy.messages.in: 1632 Plumb the unavailability description through to the WebProcess via 1633 the FindPlugin message. 1634 1635 * WebProcess/WebPage/WebPage.cpp: 1636 (WebKit::WebPage::createPlugin): 1637 Acquire the unavailability description from the client 1638 (via FindPlugin) and hand it to the RenderEmbeddedObject. 1639 16402013-07-22 Lucas Forschler <lforschler@apple.com> 1641 1642 Rollout r152701 1643 16442013-07-19 Lucas Forschler <lforschler@apple.com> 1645 1646 Merge r152877 1647 1648 2013-07-18 Simon Cooper <scooper@apple.com> 1649 1650 Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg 1651 https://bugs.webkit.org/show_bug.cgi?id=118874 1652 <rdar://problem/14271327> 1653 1654 Reviewed by Alexey Proskuryakov. 1655 1656 Silently deny access to FlashAuthor.cfg. This location contains 1657 files containing lists of paths that Flash Player will 1658 "allow" access to (without asking the user). Since the plugin 1659 sandbox won't permit the access to the listed paths it is better 1660 to silently block attempts to read this "whitelist". 1661 1662 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 1663 16642013-07-18 Lucas Forschler <lforschler@apple.com> 1665 1666 Merge r152805 1667 1668 2013-07-17 Alexey Proskuryakov <ap@apple.com> 1669 1670 [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages() 1671 https://bugs.webkit.org/show_bug.cgi?id=118814 1672 <rdar://problem/14173389> 1673 1674 Reviewed by Brady Eidson. 1675 1676 Speculative fix. It's unclear how we end up with an invalid URL when committing 1677 a load. 1678 1679 * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages): 1680 Added a null check. 1681 16822013-07-17 Lucas Forschler <lforschler@apple.com> 1683 1684 Merge r152740 1685 1686 2013-07-16 Alexey Proskuryakov <ap@apple.com> 1687 1688 REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com 1689 https://bugs.webkit.org/show_bug.cgi?id=118739 1690 <rdar://problem/14300350> 1691 1692 Reviewed by Daniel Bates. 1693 1694 EditorState tracking on UI side is very fragile. This is a targeted fix just for 1695 this specific scenario. 1696 1697 The issue was that we had a stale m_temporarilyClosedComposition flag, which was 1698 making UI process believe that a composition was closed from WebProcess side, 1699 and notify input method about that. It shouldn't have been a problem, because there 1700 is no composition at this point indeed, but this extra call is a problem for 1701 predictive input, which works in a somewhat unconventional way (<rdar://problem/14458297>). 1702 1703 * UIProcess/mac/WebPageProxyMac.mm: 1704 (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when 1705 getting new EditorState in response to performing this action. There is certainly 1706 no composition after insertText, and all interested parties are on the same page 1707 already. 1708 17092013-07-16 Lucas Forschler <lforschler@apple.com> 1710 1711 Merge r152701 1712 1713 2013-07-15 Tim Horton <timothy_horton@apple.com> 1714 1715 Update blocked/missing plug-in UI 1716 https://bugs.webkit.org/show_bug.cgi?id=118347 1717 <rdar://problem/14209318> 1718 1719 Reviewed by Sam Weinig. 1720 Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself. 1721 1722 * Platform/CoreIPC/HandleMessage.h: 1723 (CoreIPC::callMemberFunction): 1724 Add a 6 argument -> 4 reply message handler. 1725 (It seems that FindPlugin is getting a little out of hand.) 1726 1727 * Shared/APIClientTraits.cpp: 1728 * Shared/APIClientTraits.h: 1729 * UIProcess/API/C/WKPage.h: 1730 * UIProcess/WebLoaderClient.cpp: 1731 (WebKit::WebLoaderClient::pluginLoadPolicy): 1732 * UIProcess/WebLoaderClient.h: 1733 Add an unavailability description out-argument to a new version of 1734 pluginLoadPolicy, so clients can override the text of the unavailable 1735 plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. 1736 1737 * UIProcess/WebPageProxy.cpp: 1738 (WebKit::WebPageProxy::findPlugin): 1739 * UIProcess/WebPageProxy.h: 1740 * UIProcess/WebPageProxy.messages.in: 1741 Plumb the unavailability description through to the WebProcess via 1742 the FindPlugin message. 1743 1744 * WebProcess/Plugins/PluginProcessConnection.cpp: 1745 (WebKit::PluginProcessConnection::didClose): 1746 Make a strongly referencing copy of the list of PluginProxies, so we can 1747 throw them away without the HashMap being mutated underneath us (see the comment). 1748 1749 * WebProcess/Plugins/PluginView.cpp: 1750 (WebKit::PluginView::pluginProcessCrashed): 1751 Invalidate the plug-in's widget before setting the plugin unavailability reason, 1752 because doing so would cause the plug-in's renderer to be torn down, making 1753 invalidate() crash. 1754 1755 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 1756 (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton): 1757 * WebProcess/WebCoreSupport/WebChromeClient.h: 1758 Rename from shouldUnavailablePluginMessageBeButton to 1759 shouldUnavailablePluginMessageIncludeButton for accuracy. 1760 1761 * WebProcess/WebPage/WebPage.cpp: 1762 (WebKit::WebPage::createPlugin): 1763 Acquire the unavailability description from the client 1764 (via FindPlugin) and hand it to the RenderEmbeddedObject. 1765 (WebKit::WebPage::canPluginHandleResponse): 1766 Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it. 1767 17682013-07-16 Lucas Forschler <lforschler@apple.com> 1769 1770 Merge r152698 1771 1772 2013-07-15 Simon Cooper <scooper@apple.com> 1773 1774 PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust 1775 https://bugs.webkit.org/show_bug.cgi?id=118690 1776 <rdar://problem/14255963> 1777 1778 Reviewed by Dean Jackson. 1779 1780 Silently deny access to FlashPlayerTrust. This location contains 1781 files containing lists of paths that Flash Player will 1782 "allow" access to (without asking the user). Since the plugin 1783 sandbox won't permit the access to the listed paths it is better 1784 to silently block attempts to read these "whitelists". The 1785 "whitelists" are created by other Adobe "installer" like 1786 applications. 1787 1788 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 1789 17902013-07-15 Lucas Forschler <lforschler@apple.com> 1791 1792 Rollout r152686. Previously merged. 1793 17942013-07-15 Lucas Forschler <lforschler@apple.com> 1795 1796 Merge r152382 1797 1798 2013-07-03 Gordon Sheridan <gordon_sheridan@apple.com> 1799 1800 Implement mechanism to detect (partially) hidden blocked plugins. 1801 https://bugs.webkit.org/show_bug.cgi?id=117998 1802 1803 Reviewed by Dean Jackson. 1804 1805 * Shared/Plugins/Netscape/PluginInformation.h: 1806 * Shared/Plugins/Netscape/PluginInformation.cpp: 1807 (WebKit::plugInInformationReplacementObscuredKey): 1808 Add key for plugInInformation dictionaries. 1809 1810 (WebKit::createPluginInformationDictionary): 1811 Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary. 1812 1813 * Shared/API/c/WKPluginInformation.h: 1814 * Shared/API/c/WKPluginInformation.cpp: 1815 (WKPluginInformationReplacementObscuredKey): 1816 Provide the C API for the plugInInformationReplacementObscuredKey(). 1817 1818 * UIProcess/WebPageProxy.h: 1819 * UIProcess/WebPageProxy.cpp: 1820 (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 1821 Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary(). 1822 1823 * UIProcess/WebPageProxy.messages.in: 1824 Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message. 1825 1826 * WebProcess/WebPage/WebPage.cpp: 1827 (WebKit::WebPage::createPlugin): 1828 Invoke isReplacementObscured() method for blocked plugins. 1829 18302013-07-15 Lucas Forschler <lforschler@apple.com> 1831 1832 Merge r152642 1833 1834 2013-07-14 Jon Lee <jonlee@apple.com> 1835 1836 Calling Notification.requestPermission() without a callback crashes 1837 https://bugs.webkit.org/show_bug.cgi?id=118654 1838 <rdar://problem/14293352> 1839 1840 Reviewed by Alexey Proskuryakov. 1841 1842 When requestPermission() is called, we short-circuit if we know the permission was already set. 1843 The callback handler gets invoked. But now that callbacks are optional, we need to check to make 1844 sure a callback was provided. 1845 1846 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: 1847 (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback. 1848 18492013-07-15 Lucas Forschler <lforschler@apple.com> 1850 1851 Merge r152580 1852 1853 2013-07-10 Roger Fong <roger_fong@apple.com> 1854 1855 Plugins that don't support snapshotting should not all autostart. 1856 https://bugs.webkit.org/show_bug.cgi?id=118572 1857 <rdar://problem/14324391>. 1858 1859 Reviewed by Dean Jackson. 1860 1861 * WebProcess/Plugins/PluginView.cpp: 1862 (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree. 1863 It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting. 1864 (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight 1865 to the the DisplayingSnapshot state. 1866 * WebProcess/Plugins/PluginView.h: 1867 18682013-07-15 Lucas Forschler <lforschler@apple.com> 1869 1870 Merge r152520 1871 1872 2013-07-09 Jer Noble <jer.noble@apple.com> 1873 1874 Reviewed by Simon Fraser. 1875 1876 Remember the scroll position and restore after exiting full-screen mode. 1877 https://bugs.webkit.org/show_bug.cgi?id=61956 1878 <rdar://problem/9544461> 1879 1880 Call into the main FrameView to save the scroll position before swapping the 1881 WebView into the full-screen window, and restore the scroll position after 1882 swapping the WebView back into the browser window. 1883 1884 * UIProcess/mac/WKFullScreenWindowController.mm: 1885 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 1886 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): 1887 1888 In WebKit2, this requires some communication between the WebProcess and the 1889 UIProcess, so add two new messages to WebFullScreenManager to be called by 1890 its proxy. 1891 1892 * UIProcess/WebFullScreenManagerProxy.h: 1893 * UIProcess/WebFullScreenManagerProxy.cpp: 1894 (WebKit::WebFullScreenManagerProxy::saveScrollPosition): 1895 (WebKit::WebFullScreenManagerProxy::restoreScrollPosition): 1896 * WebProcess/FullScreen/WebFullScreenManager.h: 1897 * WebProcess/FullScreen/WebFullScreenManager.messages.in: 1898 * WebProcess/FullScreen/WebFullScreenManager.cpp: 1899 (WebKit::WebFullScreenManager::saveScrollPosition): 1900 (WebKit::WebFullScreenManager::restoreScrollPosition): 1901 19022013-07-15 Lucas Forschler <lforschler@apple.com> 1903 1904 Merge r152316 1905 1906 2013-07-02 Ada Chan <adachan@apple.com> 1907 1908 Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage(). 1909 https://bugs.webkit.org/show_bug.cgi?id=118268 1910 1911 Reviewed by Beth Dakin. 1912 1913 * WebProcess/WebPage/mac/PageBannerMac.mm: 1914 (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage() 1915 can be null if this method is called after the web page is closed. 1916 19172013-07-15 Lucas Forschler <lforschler@apple.com> 1918 1919 Merge r152249 1920 1921 2013-07-01 Ada Chan <adachan@apple.com> 1922 1923 Properly hide the header and footer banners if they are set to null. 1924 https://bugs.webkit.org/show_bug.cgi?id=118219 1925 1926 Reviewed by Beth Dakin. 1927 1928 Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when 1929 the footer banner is detached. Similarly for the header banner. 1930 1931 * WebProcess/WebPage/mac/PageBannerMac.mm: 1932 (WebKit::PageBanner::detachFromPage): 1933 19342013-07-12 Lucas Forschler <lforschler@apple.com> 1935 1936 Merge r152571 1937 1938 2013-07-11 Timothy Hatcher <timothy@apple.com> 1939 1940 Revert r152267 and soft link WebInspectorUI.framework again. 1941 1942 https://bugs.webkit.org/show_bug.cgi?id=118544 1943 1944 Reviewed by David Kilzer. 1945 1946 * Configurations/WebKit2.xcconfig: 1947 * UIProcess/mac/WebInspectorProxyMac.mm: 1948 (WebKit::inspectorReallyUsesWebKitUserInterface): 1949 * WebKit2.xcodeproj/project.pbxproj: 1950 * WebProcess/WebPage/mac/WebInspectorMac.mm: 1951 (WebKit::inspectorReallyUsesWebKitUserInterface): 1952 19532013-07-10 Lucas Forschler <lforschler@apple.com> 1954 1955 Merge r152555 1956 1957 2013-07-10 Mark Rowe <mrowe@apple.com> 1958 1959 <rdar://problem/14395759> PluginProcess sometimes logs an error about being unable to load WebKit2.framework. 1960 1961 Reviewed by Alexey Proskuryakov. 1962 1963 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 1964 (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables 1965 specified in dynamic linker load commands are passed to the subprocess that we spawn to create 1966 the MIME type property list. 1967 19682013-07-10 Lucas Forschler <lforschler@apple.com> 1969 1970 Merge r152539 1971 1972 2013-07-10 Brady Eidson <beidson@apple.com> 1973 1974 Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy. 1975 <rdar://problem/14286390> and https://bugs.webkit.org/show_bug.cgi?id=118535 1976 1977 Reviewed by Alexey Proskuryakov. 1978 1979 * Shared/Plugins/NPObjectProxy.cpp: 1980 (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread. 1981 (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread. 1982 19832013-07-09 Lucas Forschler <lforschler@apple.com> 1984 1985 Merge r152425 1986 1987 2013-07-05 Tim Horton <timothy_horton@apple.com> 1988 1989 [wk2] Add API to lock the scroll position at the top or bottom of the page 1990 https://bugs.webkit.org/show_bug.cgi?id=118429 1991 <rdar://problem/14120323> 1992 1993 Reviewed by Anders Carlsson. 1994 1995 * Shared/WebPageCreationParameters.cpp: 1996 (WebKit::WebPageCreationParameters::encode): 1997 (WebKit::WebPageCreationParameters::decode): 1998 * Shared/WebPageCreationParameters.h: 1999 Pass the current ScrollPinningBehavior across to the WebPage upon creation. 2000 2001 * UIProcess/API/C/WKPage.cpp: 2002 (WKPageGetScrollPinningBehavior): 2003 (WKPageSetScrollPinningBehavior): 2004 * UIProcess/API/C/WKPagePrivate.h: 2005 SPI to get/set the WebPageProxy's current ScrollPinningBehavior. 2006 Convert between WK API type and WebCore enum. 2007 2008 * UIProcess/WebPageProxy.cpp: 2009 (WebKit::WebPageProxy::WebPageProxy): 2010 (WebKit::WebPageProxy::creationParameters): 2011 Send ScrollPinningBehavior when creating a WebPage. 2012 2013 (WebKit::WebPageProxy::setScrollPinningBehavior): 2014 Pass ScrollPinningBehavior changes across to the WebProcess (and save it 2015 in WebPageProxy so it can be sent back across if the WebProcess crashes). 2016 2017 * UIProcess/WebPageProxy.h: 2018 (WebKit::WebPageProxy::scrollPinningBehavior): 2019 Getter/setter and storage for m_scrollPinningBehavior. 2020 2021 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 2022 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2023 Inform new FrameViews of the current ScrollPinningBehavior. 2024 2025 * WebProcess/WebPage/WebPage.cpp: 2026 (WebKit::WebPage::WebPage): 2027 Set our ScrollPinningBehavior based on our creation parameters. 2028 2029 (WebKit::WebPage::setScrollPinningBehavior): 2030 Inform the FrameView of ScrollPinningBehavior changes. 2031 2032 * WebProcess/WebPage/WebPage.h: 2033 (WebKit::WebPage::scrollPinningBehavior): Added. 2034 (WebKit::WebPage::setScrollPinningBehavior): Added. 2035 Add storage for m_scrollPinningBehavior. 2036 2037 * WebProcess/WebPage/WebPage.messages.in: 2038 Add SetScrollPinningBehavior message. 2039 20402013-07-09 Lucas Forschler <lforschler@apple.com> 2041 2042 Merge r152407 2043 2044 2013-07-04 Anders Carlsson <andersca@apple.com> 2045 2046 Paint the page background if we haven't received our first update 2047 https://bugs.webkit.org/show_bug.cgi?id=118402 2048 <rdar://problem/13893308> 2049 2050 Reviewed by Simon Fraser. 2051 2052 Make sure that we always paint something when we haven't received our first update from the web process. 2053 2054 * UIProcess/API/mac/WKView.mm: 2055 (-[WKView drawRect:]): 2056 * UIProcess/DrawingAreaProxyImpl.h: 2057 (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate): 2058 20592013-07-09 Lucas Forschler <lforschler@apple.com> 2060 2061 Merge r152403 2062 2063 2013-07-04 Anders Carlsson <andersca@apple.com> 2064 2065 Crash when createPluginInternal ends up destroying the plug-in 2066 https://bugs.webkit.org/show_bug.cgi?id=118397 2067 <rdar://problem/14155051> 2068 2069 Reviewed by Simon Fraser. 2070 2071 Keep the WebProcessConnection object alive while calling createPluginInternal and handle 2072 the IPC connection going away. 2073 2074 * PluginProcess/WebProcessConnection.cpp: 2075 (WebKit::WebProcessConnection::createPluginAsynchronously): 2076 20772013-07-09 Lucas Forschler <lforschler@apple.com> 2078 2079 Merge r152382 2080 2081 2013-07-03 Gordon Sheridan <gordon_sheridan@apple.com> 2082 2083 Implement mechanism to detect (partially) hidden blocked plugins. 2084 https://bugs.webkit.org/show_bug.cgi?id=117998 2085 2086 Reviewed by Dean Jackson. 2087 2088 * Shared/Plugins/Netscape/PluginInformation.h: 2089 * Shared/Plugins/Netscape/PluginInformation.cpp: 2090 (WebKit::plugInInformationReplacementObscuredKey): 2091 Add key for plugInInformation dictionaries. 2092 2093 (WebKit::createPluginInformationDictionary): 2094 Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary. 2095 2096 * Shared/API/c/WKPluginInformation.h: 2097 * Shared/API/c/WKPluginInformation.cpp: 2098 (WKPluginInformationReplacementObscuredKey): 2099 Provide the C API for the plugInInformationReplacementObscuredKey(). 2100 2101 * UIProcess/WebPageProxy.h: 2102 * UIProcess/WebPageProxy.cpp: 2103 (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 2104 Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary(). 2105 2106 * UIProcess/WebPageProxy.messages.in: 2107 Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message. 2108 2109 * WebProcess/WebPage/WebPage.cpp: 2110 (WebKit::WebPage::createPlugin): 2111 Invoke isReplacementObscured() method for blocked plugins. 2112 21132013-07-08 Lucas Forschler <lforschler@apple.com> 2114 2115 Merge r152267 2116 2117 2013-07-01 Timothy Hatcher <timothy@apple.com> 2118 2119 Link to WebInspectorUI.framework at build time instead of soft linking. 2120 2121 https://bugs.webkit.org/show_bug.cgi?id=118261 2122 2123 Reviewed by Joseph Pecoraro. 2124 2125 * Configurations/WebKit2.xcconfig: 2126 * UIProcess/mac/WebInspectorProxyMac.mm: 2127 (WebKit::inspectorReallyUsesWebKitUserInterface): 2128 * WebKit2.xcodeproj/project.pbxproj: 2129 * WebProcess/WebPage/mac/WebInspectorMac.mm: 2130 (WebKit::inspectorReallyUsesWebKitUserInterface): 2131 21322013-07-03 Lucas Forschler <lforschler@apple.com> 2133 2134 Merge r152375 2135 2136 2013-07-03 Alexey Proskuryakov <ap@apple.com> 2137 2138 <rdar://problem/14271105> Flash Player: deny ipc-posix-sem 59918130 2139 <rdar://problem/14349560> Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites 2140 2141 Reviewed by Sam Weinig. 2142 2143 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2144 semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now). 2145 21462013-07-03 Lucas Forschler <lforschler@apple.com> 2147 2148 Merge r152317 2149 2150 2013-07-02 Alexey Proskuryakov <ap@apple.com> 2151 2152 security/block-test.html fails when NetworkProcess is enabled 2153 https://bugs.webkit.org/show_bug.cgi?id=118320 2154 <rdar://problem/14309423> 2155 2156 Reviewed by Geoff Garen. 2157 2158 * NetworkProcess/NetworkResourceLoader.cpp: 2159 (WebKit::NetworkResourceLoader::wasBlocked): 2160 (WebKit::NetworkResourceLoader::cannotShowURL): 2161 Implemented missing ResourceHandleClient functions. 2162 21632013-07-02 Lucas Forschler <lforschler@apple.com> 2164 2165 Merge r152328 2166 2167 2013-07-02 Jessie Berlin <jberlin@apple.com> 2168 2169 The callback for WKPageGetPlugInInformation needs info about whether or not there are any 2170 non-playing instances of the plug-in on the page 2171 https://bugs.webkit.org/show_bug.cgi?id=118330 2172 2173 Reviewed by Anders Carlsson. 2174 2175 Add another key value pair to the dictionary passed to the callback. 2176 2177 * Shared/API/c/WKPluginInformation.cpp: 2178 (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey): 2179 * Shared/API/c/WKPluginInformation.h: 2180 2181 * Shared/Plugins/Netscape/PluginInformation.cpp: 2182 (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey): 2183 (WebKit::createPlugInInformationDictionary): 2184 Add the information about whether or not the page contains a non-playing instance of that 2185 plug-in to the plug-in information dictionary. 2186 * Shared/Plugins/Netscape/PluginInformation.h: 2187 2188 * UIProcess/WebPageProxy.h: 2189 * UIProcess/WebPageProxy.messages.in: 2190 * UIProcess/mac/WebPageProxyMac.mm: 2191 (WebKit::WebPageProxy::containsPlugInCallback): 2192 Check if any of the MIME types of the plug-in instances that are present on the page but are 2193 not playing match the instance of plug-in being searched for. 2194 * WebProcess/WebPage/mac/WebPageMac.mm: 2195 (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns): 2196 Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in 2197 HTMLPlugInImageElement.cpp. 2198 (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): 2199 Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns. 2200 22012013-07-01 Lucas Forschler <lforschler@apple.com> 2202 2203 Merge r152273 2204 2205 2013-07-01 Alexey Proskuryakov <ap@apple.com> 2206 2207 Clean up private browsing session tracking 2208 https://bugs.webkit.org/show_bug.cgi?id=118266 2209 <rdar://problem/13078036> 2210 2211 Reviewed by Brady Eidson. 2212 2213 Instead of counting API calls, we now watch actual WebPreferences objects. 2214 2215 * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled): 2216 Removed code that used to notify WebContext. It's now done by WebPreferences. 2217 2218 * UIProcess/WebContext.h: 2219 * UIProcess/WebContext.cpp: 2220 (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times 2221 API was called, rely on WebPreferences tracking. 2222 (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is 2223 now only called when we detect a change in private browsing state. 2224 (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto. 2225 (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private 2226 browsing session if needed. 2227 2228 * UIProcess/WebPreferences.h: 2229 * UIProcess/WebPreferences.cpp: 2230 (WebKit::WebPreferences::addPageGroup): Count how many page groups use private 2231 browsing, and notify WebContext when a session is needed. Note that we don't notify 2232 WebContext about WebPreferences without any page groups, because it's likely 2233 that preferences will be updated by the client before groups are associated. 2234 (WebKit::WebPreferences::removePageGroup): Ditto. 2235 (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for 2236 private browsing mode changes. 2237 (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when 2238 it's time to create or destroy a private browsing session. 2239 (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for 2240 WebContext to know when any page groups are in private browsing mode. 2241 2242 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2243 Don't create a private browsing session implicitly, UI process takes care of it. 2244 22452013-07-01 Lucas Forschler <lforschler@apple.com> 2246 2247 Merge r152266 2248 2249 2013-07-01 Tim Horton <timothy_horton@apple.com> 2250 2251 [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect 2252 https://bugs.webkit.org/show_bug.cgi?id=118173 2253 <rdar://problem/14301166> 2254 2255 Reviewed by Anders Carlsson. 2256 2257 Offset the exposed rect passed from the WKView by the main frame's current scroll position 2258 before sending it to our TiledBackings, so that it is in the same coordinate space as their 2259 ordinary visibleRects. 2260 2261 This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari. 2262 2263 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: 2264 Add updateScrolledExposedRect() and m_scrolledExposedRect. 2265 2266 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 2267 (WebKit::TiledCoreAnimationDrawingArea::scroll): 2268 Call updateScrolledExposedRect when the main frame scrolls. 2269 2270 (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): 2271 Remove a FIXME about this change. 2272 Call updateScrolledExposedRect instead of passing down the unscrolled rect. 2273 2274 (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): 2275 Call updateScrolledExposedRect, because that method will short-circuit if 2276 setClipsToExposedRect is false, so we need to update here for correctness 2277 if we get a setExposedRect(), setClipsToExposedRect(true) pair. 2278 2279 (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): 2280 Update m_scrolledExposedRect and propagate it to our TiledBackings. 2281 2282 (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2283 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2284 (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2285 (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): 2286 Use the scrolled exposed rect. 2287 22882013-07-01 Lucas Forschler <lforschler@apple.com> 2289 2290 Merge r152077 2291 2292 2013-06-26 Simon Cooper <scooper@apple.com> 2293 2294 Sometimes the Flash Player plugin cannot make outgoing connections 2295 https://bugs.webkit.org/show_bug.cgi?id=118110 2296 <rdar://problem/14270933> 2297 2298 Reviewed by Alexey Proskuryakov. 2299 2300 Allow outgoing and incoming UDP data. Tidy up the QuickTime 2301 profile as it gets the UDP ability from the common profile. 2302 2303 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 2304 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2305 23062013-07-01 Lucas Forschler <lforschler@apple.com> 2307 2308 Merge r152230 2309 2310 2013-07-01 Sam Weinig <sam@webkit.org> 2311 2312 WKPageLoadDataWithUserData neglects to set the base URL that is passed in 2313 <rdar://problem/14306784> 2314 https://bugs.webkit.org/show_bug.cgi?id=118256 2315 2316 Reviewed by Anders Carlsson. 2317 2318 * WebProcess/WebPage/WebPage.cpp: 2319 (WebKit::WebPage::loadData): 2320 Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1. 2321 23222013-07-01 Lucas Forschler <lforschler@apple.com> 2323 2324 Merge r152187 2325 2326 2013-06-28 Gavin Barraclough <barraclough@apple.com> 2327 2328 Stale occlusion state after moving page back into window 2329 https://bugs.webkit.org/show_bug.cgi?id=118202 2330 2331 Reviewed by Anders Carlsson. 2332 2333 We need to update the occlusion state when the page goes back into the window. 2334 2335 * UIProcess/API/mac/WKView.mm: 2336 (-[WKView viewDidMoveToWindow]): 2337 - update occlusion state. 2338 23392013-07-01 Lucas Forschler <lforschler@apple.com> 2340 2341 Merge r152182 2342 2343 2013-06-28 Anders Carlsson <andersca@apple.com> 2344 2345 Make the UI process run the Java Updater 2346 https://bugs.webkit.org/show_bug.cgi?id=118197 2347 <rdar://problem/14255677> 2348 2349 Reviewed by Sam Weinig. 2350 2351 Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process. 2352 2353 * PluginProcess/PluginProcess.h: 2354 * PluginProcess/mac/PluginProcessMac.mm: 2355 (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error): 2356 (WebKit::initializeCocoaOverrides): 2357 (WebKit::PluginProcess::launchApplicationAtURL): 2358 * UIProcess/Plugins/PluginProcessProxy.h: 2359 * UIProcess/Plugins/PluginProcessProxy.messages.in: 2360 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 2361 (WebKit::isJavaUpdaterURL): 2362 (WebKit::shouldLaunchApplicationAtURL): 2363 (WebKit::PluginProcessProxy::launchApplicationAtURL): 2364 23652013-07-01 Lucas Forschler <lforschler@apple.com> 2366 2367 Merge r152075 2368 2369 2013-06-26 Simon Cooper <scooper@apple.com> 2370 2371 Flash Player: deny ipc-posix-sem 59918130 2372 https://bugs.webkit.org/show_bug.cgi?id=118107 2373 <rdar://problem/14271105> 2374 2375 Reviewed by Alexey Proskuryakov. 2376 2377 Allow same-sandbox scoped semaphores on Mavericks. Permit the 2378 named semaphore for older releases. 2379 2380 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2381 23822013-07-01 Lucas Forschler <lforschler@apple.com> 2383 2384 Merge r152073 2385 2386 2013-06-26 Simon Cooper <scooper@apple.com> 2387 2388 Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos 2389 https://bugs.webkit.org/show_bug.cgi?id=118102 2390 <rdar://problem/14194077> 2391 2392 Reviewed by Alexey Proskuryakov. 2393 2394 Allow same-sandbox scoped semaphores on Mavericks. Permit the 2395 named semaphore for older releases. 2396 2397 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 2398 23992013-07-01 Lucas Forschler <lforschler@apple.com> 2400 2401 Merge r152072 2402 2403 2013-06-26 Simon Cooper <scooper@apple.com> 2404 2405 Update ColorSync shared memory names in plug-in sandbox profile 2406 https://bugs.webkit.org/show_bug.cgi?id=118099 2407 2408 Reviewed by Alexey Proskuryakov. 2409 2410 Update the common profile to use the names used in Mavericks 2411 2412 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2413 24142013-07-01 Lucas Forschler <lforschler@apple.com> 2415 2416 Merge r152063 2417 2418 2013-06-26 Simon Cooper <scooper@apple.com> 2419 2420 QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file 2421 https://bugs.webkit.org/show_bug.cgi?id=118098 2422 <rdar://problem/13888138> 2423 2424 Reviewed by Alexey Proskuryakov. 2425 2426 Allow the preference file to be written 2427 2428 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 2429 24302013-07-01 Lucas Forschler <lforschler@apple.com> 2431 2432 Merge r152234 2433 2434 2013-06-27 Jer Noble <jer.noble@apple.com> 2435 2436 Audio in apps which embed WebViews is corrupted. 2437 https://bugs.webkit.org/show_bug.cgi?id=118163 2438 2439 Reviewed by Maciej Stachowiak. 2440 2441 Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients. 2442 2443 * Shared/WebPreferencesStore.h: 2444 * WebProcess/WebPage/WebPage.cpp: 2445 (WebKit::WebPage::updatePreferences): 2446 24472013-07-01 Lucas Forschler <lforschler@apple.com> 2448 2449 Merge r152190 2450 2451 2013-06-28 Tim Horton <timothy_horton@apple.com> 2452 2453 [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set 2454 https://bugs.webkit.org/show_bug.cgi?id=118174 2455 <rdar://problem/14301175> 2456 2457 Reviewed by Anders Carlsson. 2458 2459 * UIProcess/API/mac/WKView.mm: 2460 (-[WKView _updateViewExposedRect]): 2461 Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy. 2462 2463 (-[WKView setMinimumSizeForAutoLayout:]): 2464 Disable scrolling when using autolayout instead of when using clips-to-visibleRect. 2465 2466 (-[WKView setShouldClipToVisibleRect:]): 2467 Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled, 2468 and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view 2469 is big enough to fit the content (the case clip-to-visibleRect was added for). 2470 2471 * UIProcess/WebPageProxy.cpp: 2472 (WebKit::WebPageProxy::WebPageProxy): 2473 * UIProcess/WebPageProxy.h: 2474 * UIProcess/mac/WebPageProxyMac.mm: 2475 (WebKit::WebPageProxy::viewExposedRectChanged): 2476 (WebKit::WebPageProxy::exposedRectChangedTimerFired): 2477 Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled. 2478 2479 * WebProcess/WebPage/DrawingArea.h: 2480 (WebKit::DrawingArea::setClipsToExposedRect): Added. 2481 (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space. 2482 2483 * WebProcess/WebPage/WebPage.cpp: 2484 (WebKit::WebPage::viewExposedRectChanged): 2485 * WebProcess/WebPage/WebPage.h: 2486 * WebProcess/WebPage/WebPage.messages.in: 2487 Forward clips-to-visibleRect enabled state to the drawing area. 2488 2489 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: 2490 Add storage for m_clipsToExposedRect. 2491 2492 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 2493 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 2494 (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2495 (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): 2496 (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect): 2497 (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2498 (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): 2499 Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine 2500 whether we should tell our TiledBackings to clip to the exposed rect we provide. 2501 2502 We don't need to listen to mainFrameScrollabilityChanged anymore. 2503 25042013-07-01 Lucas Forschler <lforschler@apple.com> 2505 2506 Merge r152177 2507 2508 2013-06-28 Tim Horton <timothy_horton@apple.com> 2509 2510 WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to 2511 https://bugs.webkit.org/show_bug.cgi?id=118196 2512 <rdar://problem/14303613> 2513 2514 Reviewed by Anders Carlsson. 2515 2516 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2517 25182013-06-26 Lucas Forschler <lforschler@apple.com> 2519 2520 Merge r151952 2521 2522 2013-06-24 Simon Cooper <scooper@apple.com> 2523 2524 Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0 2525 https://bugs.webkit.org/show_bug.cgi?id=117966 2526 <rdar://problem/13927918> 2527 2528 Reviewed by Sam Weinig. 2529 2530 Allow assigning (via bind) an ephemeral port before connecting 2531 2532 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 2533 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2534 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 2535 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2536 25372013-06-26 Lucas Forschler <lforschler@apple.com> 2538 2539 Merge r151950 2540 2541 2013-06-24 Simon Cooper <scooper@apple.com> 2542 2543 PluginProcess deny file-read-data /Network/Library under addVolumeTracker 2544 https://bugs.webkit.org/show_bug.cgi?id=117965 2545 <rdar://problem/14121247> 2546 2547 Reviewed by Alexey Proskuryakov. 2548 2549 Silently deny reading /Network/Applications and 2550 /Network/Library. 2551 2552 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2553 25542013-06-26 Lucas Forschler <lforschler@apple.com> 2555 2556 Merge r151948 2557 2558 2013-06-24 Simon Cooper <scooper@apple.com> 2559 2560 deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL 2561 https://bugs.webkit.org/show_bug.cgi?id=117964 2562 <rdar://problem/14036864> 2563 2564 Reviewed by Alexey Proskuryakov. 2565 2566 Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL 2567 subdirectory. 2568 2569 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2570 25712013-06-26 Lucas Forschler <lforschler@apple.com> 2572 2573 Merge r151944 2574 2575 2013-06-24 Simon Cooper <scooper@apple.com> 2576 2577 Repeating sandbox violations when playing Amazon Prime videos with Flash 2578 https://bugs.webkit.org/show_bug.cgi?id=117953 2579 <rdar://problem/14193693> 2580 2581 Reviewed by Alexey Proskuryakov. 2582 2583 Add some missing "standard" files for network service lookups 2584 2585 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2586 25872013-06-26 Lucas Forschler <lforschler@apple.com> 2588 2589 Merge r151943 2590 2591 2013-06-24 Simon Cooper <scooper@apple.com> 2592 2593 Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist 2594 https://bugs.webkit.org/show_bug.cgi?id=117963 2595 <rdar://problem/14084234> 2596 2597 Reviewed by Alexey Proskuryakov. 2598 2599 Permit the reading of the com.apple.CoreGraphics preference file 2600 2601 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2602 26032013-06-26 Lucas Forschler <lforschler@apple.com> 2604 2605 Merge r151941 2606 2607 2013-06-24 Simon Cooper <scooper@apple.com> 2608 2609 com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile 2610 https://bugs.webkit.org/show_bug.cgi?id=117961 2611 <rdar://problem/14223823> 2612 2613 Reviewed by Alexey Proskuryakov. 2614 2615 Remove the trailing extraneous .plist from the preference file rule 2616 2617 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2618 26192013-06-26 Lucas Forschler <lforschler@apple.com> 2620 2621 Merge r151940 2622 2623 2013-06-24 Simon Cooper <scooper@apple.com> 2624 2625 PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari 2626 https://bugs.webkit.org/show_bug.cgi?id=117958 2627 <rdar://problem/13938149> 2628 2629 Reviewed by Alexey Proskuryakov. 2630 2631 Allow reading the com.apple.networkConnect plist. 2632 2633 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 2634 26352013-06-26 Lucas Forschler <lforschler@apple.com> 2636 2637 Merge r151939 2638 2639 2013-06-24 Simon Cooper <scooper@apple.com> 2640 2641 Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67 2642 https://bugs.webkit.org/show_bug.cgi?id=117954 2643 <rdar://problem/14166577> 2644 2645 Reviewed by Alexey Proskuryakov. 2646 2647 Permit read access to this shared memory segment 2648 2649 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2650 26512013-06-26 Lucas Forschler <lforschler@apple.com> 2652 2653 Merge r151938 2654 2655 2013-06-24 Simon Cooper <scooper@apple.com> 2656 2657 Plugin Sandbox violation in /Library/Audio/Sounds/Banks 2658 https://bugs.webkit.org/show_bug.cgi?id=117957 2659 <rdar://problem/14163582> 2660 2661 Reviewed by Alexey Proskuryakov. 2662 2663 Permit read access to subdirectories under /Library/Audio/Sounds 2664 2665 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2666 26672013-06-26 Lucas Forschler <lforschler@apple.com> 2668 2669 Merge r151927 2670 2671 2013-06-24 Anders Carlsson <andersca@apple.com> 2672 2673 REGRESSION (r147591): can't type in Adobe Connect 2674 https://bugs.webkit.org/show_bug.cgi?id=117947 2675 <rdar://problem/14223539> 2676 2677 Reviewed by Andreas Kling. 2678 2679 With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in 2680 starts. Handle this by focusing the plug-in right after it's started if necessary. 2681 2682 * WebProcess/Plugins/PluginView.cpp: 2683 (WebKit::PluginView::didInitializePlugin): 2684 26852013-06-26 Lucas Forschler <lforschler@apple.com> 2686 2687 Merge r151877 2688 2689 2013-06-22 Simon Fraser <simon.fraser@apple.com> 2690 2691 screen.availWidth always returns width of primary display 2692 https://bugs.webkit.org/show_bug.cgi?id=117863 2693 2694 Reviewed by Geoffrey Garen. 2695 2696 In WebKit2, Widgets have no platformWidget, so trying to get to the 2697 NSScreen via the platform widget's window never succeeded, and we always 2698 fell back on getting info for the main display. 2699 2700 However, we were already pushing the WKView's displayID down to the 2701 WebProcess for the requestAnimationFrame infrastructure, so use that. 2702 2703 The WebProcess would not receive a displayID for a WKView until the window 2704 was activated; fix by calling -doWindowDidChangeScreen when the view 2705 moves to a window, rather than doing it from -_windowDidBecomeKey:. 2706 2707 * UIProcess/API/mac/WKView.mm: 2708 (-[WKView viewDidMoveToWindow]): 2709 (-[WKView _windowDidBecomeKey:]): 2710 27112013-06-26 Lucas Forschler <lforschler@apple.com> 2712 2713 Merge r151881 2714 2715 2013-06-22 Dean Jackson <dino@apple.com> 2716 2717 Slightly reduce width threshold on detection of primary snapshotted Plug-In 2718 https://bugs.webkit.org/show_bug.cgi?id=117914 2719 <rdar://problem/14136687> 2720 2721 Reviewed by Simon Fraser. 2722 2723 We've noticed some content that should be detected as the primary snapshotted plug-in, 2724 but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400. 2725 2726 * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400. 2727 27282013-06-26 Lucas Forschler <lforschler@apple.com> 2729 2730 Merge r151832 2731 2732 2013-06-21 Christophe Dumez <ch.dumez@sisa.samsung.com> 2733 2734 REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere 2735 https://bugs.webkit.org/show_bug.cgi?id=117825 2736 2737 Reviewed by Kentaro Hara. 2738 2739 Use Settings to enable Web Audio instead of RuntimeEnabledFeatures. 2740 2741 * WebProcess/InjectedBundle/InjectedBundle.cpp: 2742 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 2743 * WebProcess/WebPage/WebPage.cpp: 2744 (WebKit::WebPage::updatePreferences): 2745 27462013-06-26 Lucas Forschler <lforschler@apple.com> 2747 2748 Merge r151795 2749 2750 2013-06-20 Brady Eidson <beidson@apple.com> 2751 2752 WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it). 2753 <rdar://problem/14112329> and https://bugs.webkit.org/show_bug.cgi?id=117842 2754 2755 Reviewed by Alexey Proskuryakov. 2756 2757 * NetworkProcess/HostRecord.cpp: 2758 (WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue. 2759 (WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending. 2760 (WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup. 2761 (WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then 2762 allow serving a synchronous loader to go exactly one beyond the limit. 2763 * NetworkProcess/HostRecord.h: 2764 2765 Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead: 2766 * NetworkProcess/NetworkResourceLoadScheduler.cpp: 2767 (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler): 2768 (WebKit::NetworkResourceLoadScheduler::hostForURL): 2769 * NetworkProcess/NetworkResourceLoadScheduler.h: 2770 2771 * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: 2772 (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow 2773 7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit. 2774 27752013-06-26 Lucas Forschler <lforschler@apple.com> 2776 2777 Merge r151767 2778 2779 2013-06-19 Sam Weinig <sam@webkit.org> 2780 2781 Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary 2782 https://bugs.webkit.org/show_bug.cgi?id=117816 2783 2784 Reviewed by Geoffrey Garen. 2785 2786 - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey(). 2787 2788 * Shared/API/c/WKPluginInformation.cpp: 2789 (WKPluginInformationBundleShortVersionKey): 2790 * Shared/API/c/WKPluginInformation.h: 2791 * Shared/Plugins/Netscape/PluginInformation.cpp: 2792 (WebKit::pluginInformationBundleShortVersionKey): 2793 * Shared/Plugins/Netscape/PluginInformation.h: 2794 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 2795 (WebKit::NetscapePluginModule::getPluginInfo): 2796 * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: 2797 (WebKit::getPlatformPluginModuleInformation): 2798 * Shared/Plugins/PluginModuleInfo.h: 2799 28002013-06-26 Lucas Forschler <lforschler@apple.com> 2801 2802 Merge r151748 2803 2804 2013-06-19 Anders Carlsson <andersca@apple.com> 2805 2806 REGRESSION: Cannot open Silverlight preferences via context menu 2807 https://bugs.webkit.org/show_bug.cgi?id=117806 2808 <rdar://problem/14166644> 2809 2810 Reviewed by Beth Dakin. 2811 2812 Hook the LSOpenCFURLRef function and make the UI process open the URL if it's the URL for the 2813 Silverlight Preferences application. This is what we do for the Flash updater. 2814 2815 * PluginProcess/PluginProcess.h: 2816 * PluginProcess/mac/PluginProcessMac.mm: 2817 (WebKit::openCFURLRef): 2818 (WebKit::initializeShim): 2819 (WebKit::PluginProcess::openURL): 2820 * PluginProcess/mac/PluginProcessShim.h: 2821 * PluginProcess/mac/PluginProcessShim.mm: 2822 (WebKit::shimLSOpenCFURLRef): 2823 * UIProcess/Plugins/PluginProcessProxy.h: 2824 * UIProcess/Plugins/PluginProcessProxy.messages.in: 2825 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 2826 (WebKit::isSilverlightPreferencesURL): 2827 (WebKit::shouldOpenURL): 2828 (WebKit::PluginProcessProxy::openURL): 2829 28302013-06-25 Lucas Forschler <lforschler@apple.com> 2831 2832 Merge r151929 2833 2834 2013-06-24 Ruth Fong <ruth_fong@apple.com> 2835 2836 Expose the mediaHasAudio() function in WK2 2837 https://bugs.webkit.org/show_bug.cgi?id=117946 2838 <rdar://problem/14250527> 2839 2840 Reviewed by Beth Dakin. 2841 2842 Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function 2843 in WK2. 2844 2845 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: 2846 (WKBundleHitTestResultMediaHasAudio): Added. 2847 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: 2848 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: 2849 (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added. 2850 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2851 28522013-06-25 Lucas Forschler <lforschler@apple.com> 2853 2854 Merge r151760 2855 2856 2013-06-19 Ruth Fong <ruth_fong@apple.com> 2857 2858 <rdar://problem/14197983> Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765) 2859 https://bugs.webkit.org/show_bug.cgi?id=117765 2860 2861 Patch by Ruth Fong <ruth_fong@apple.com>. 2862 Reviewed by Brady Eidson. 2863 2864 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: 2865 (WKBundleHitTestResultGetMediaType): Updated to use mediaType(). 2866 2867 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: 2868 (WebKit::InjectedBundleHitTestResult::mediaType): Updated. 2869 Renamed getMediaType() to mediaType() and now handles !ENABLE(VIDEO) platforms. 2870 2871 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2872 28732013-06-18 Roger Fong <roger_fong@apple.com> 2874 2875 Disable some feature flags. 2876 <rdar://problem/14171207>. 2877 2878 Rubberstamped by Jon Lee. 2879 2880 * Configurations/FeatureDefines.xcconfig: 2881 28822013-06-18 Roger Fong <roger_fong@apple.com> 2883 2884 Unreviewed. Fix a typo that may be causing some test failures. 2885 2886 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 2887 (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): 2888 28892013-06-18 Anders Carlsson <andersca@apple.com> 2890 2891 Make it possible to set a minimum height for auto-layout 2892 https://bugs.webkit.org/show_bug.cgi?id=117758 2893 <rdar://problem/12849080> 2894 2895 Reviewed by Tim Horton. 2896 2897 Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property. 2898 If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view. 2899 2900 * Shared/WebPageCreationParameters.cpp: 2901 (WebKit::WebPageCreationParameters::encode): 2902 (WebKit::WebPageCreationParameters::decode): 2903 * Shared/WebPageCreationParameters.h: 2904 * UIProcess/API/mac/WKView.mm: 2905 (-[WKView _setIntrinsicContentSize:]): 2906 (-[WKView minimumLayoutWidth]): 2907 (-[WKView setMinimumLayoutWidth:]): 2908 (-[WKView minimumWidthForAutoLayout]): 2909 (-[WKView setMinimumWidthForAutoLayout:]): 2910 (-[WKView minimumSizeForAutoLayout]): 2911 (-[WKView setMinimumSizeForAutoLayout:]): 2912 * UIProcess/API/mac/WKViewPrivate.h: 2913 * UIProcess/DrawingAreaProxy.h: 2914 (WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange): 2915 * UIProcess/WebPageProxy.cpp: 2916 (WebKit::WebPageProxy::WebPageProxy): 2917 (WebKit::WebPageProxy::creationParameters): 2918 (WebKit::WebPageProxy::setMinimumLayoutSize): 2919 * UIProcess/WebPageProxy.h: 2920 (WebKit::WebPageProxy::minimumLayoutSize): 2921 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: 2922 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: 2923 (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): 2924 (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange): 2925 (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): 2926 (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange): 2927 (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): 2928 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 2929 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2930 * WebProcess/WebPage/WebPage.cpp: 2931 (WebKit::WebPage::WebPage): 2932 (WebKit::WebPage::setMinimumLayoutSize): 2933 * WebProcess/WebPage/WebPage.h: 2934 (WebKit::WebPage::minimumLayoutSize): 2935 * WebProcess/WebPage/WebPage.messages.in: 2936 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 2937 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): 2938 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2939 29402013-06-18 Simon Cooper <scooper@apple.com> 2941 2942 sandbox violation when Flash runs for the first time 2943 https://bugs.webkit.org/show_bug.cgi?id=117753 2944 <rdar://problem/14165466> 2945 2946 Reviewed by Alexey Proskuryakov. 2947 2948 Allow flash to try and change the ownership of directories it has just created. 2949 2950 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2951 29522013-06-18 Ruth Fong <ruth_fong@apple.com> 2953 2954 Expose a getMediaType method in WebKit 2955 https://bugs.webkit.org/show_bug.cgi?id=117667 2956 2957 Reviewed by Brady Eidson. 2958 2959 * GNUmakefile.list.am: 2960 * Target.pri: 2961 Updated to include the added header file InjectedBundleHitTestResultMediaType.h 2962 2963 * UIProcess/API/C/WKAPICast.h: 2964 (WebKit::toBundleHitTestResultMediaType): 2965 (WebKit::toAPI): 2966 Added methods to convert between BundleHitTestResultMediaType 2967 and WKBundleHitTestResultMediaType. 2968 2969 * WebKit2.xcodeproj/project.pbxproj: Updated to include 2970 InjectedBundleHitTestResultMediaType.h in the WebKit2 project. 2971 2972 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: 2973 (WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and 2974 hooks into InjectedBundleHitTestResult::getMediaType. 2975 2976 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: 2977 2978 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: 2979 (WebKit::InjectedBundleHitTestResult::getMediaType): Added to return 2980 what type, if any, a media element is. 2981 2982 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2983 2984 * WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added 2985 to contain new BundleHitTestResultMediaType enums. 2986 29872013-06-18 Roger Fong <roger_fong@apple.com> 2988 2989 Re-implement WebFrameNetworkingContext. 2990 <rdar://problem/13174821>. 2991 2992 Reviewed by Alexey Proskuryakov. 2993 2994 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added. 2995 (WebKit::WebFrameNetworkingContext::create): 2996 (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): 2997 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added. 2998 (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): 2999 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): 3000 (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): 3001 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): 3002 (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): 3003 (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled): 3004 (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): 3005 (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): 3006 (WebKit::WebFrameNetworkingContext::blockedError): 3007 (WebKit::WebFrameNetworkingContext::storageSession): 3008 30092013-06-18 Alexey Proskuryakov <ap@apple.com> 3010 3011 <rdar://problem/13174821> Remove files with an incorrect license. 3012 3013 Rubber-stamped by Maciej Stachowiak. 3014 3015 This will break the build, stay tuned for a fix coming soon. 3016 3017 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Removed. 3018 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Removed. 3019 30202013-06-17 Santosh Mahto <santosh.ma@samsung.com> 3021 3022 Extra whitespace in blank line in PlatformPopupMenuData.cpp 3023 https://bugs.webkit.org/show_bug.cgi?id=117627 3024 3025 Reviewed by Brent Fulgham. 3026 3027 * Shared/PlatformPopupMenuData.cpp: 3028 (WebKit::PlatformPopupMenuData::decode): 3029 Removing extra space 3030 30312013-06-17 Beth Dakin <bdakin@apple.com> 3032 3033 PageBanners appear over HTML5 video when media element is in full screen mode 3034 https://bugs.webkit.org/show_bug.cgi?id=117721 3035 -and corresponding- 3036 <rdar://problem/13686998> 3037 3038 Reviewed by Sam Weinig. 3039 3040 When an element enters fullscreen, hide the banners. Show them again when the 3041 element exits fullscreen. 3042 * WebProcess/FullScreen/WebFullScreenManager.cpp: 3043 (WebKit::WebFullScreenManager::willEnterFullScreen): 3044 (WebKit::WebFullScreenManager::willExitFullScreen): 3045 3046 Handle hiding and showing by removing or re-creating a parent layer for m_layer. 3047 * WebProcess/WebPage/PageBanner.cpp: 3048 (WebKit::PageBanner::hide): 3049 (WebKit::PageBanner::showIfHidden): 3050 * WebProcess/WebPage/PageBanner.h: 3051 * WebProcess/WebPage/mac/PageBannerMac.mm: 3052 (WebKit::PageBanner::PageBanner): 3053 (WebKit::PageBanner::hide): 3054 (WebKit::PageBanner::showIfHidden): 3055 (WebKit::PageBanner::mouseEvent): 3056 * WebProcess/WebPage/WebPage.cpp: 3057 (WebKit::WebPage::hidePageBanners): 3058 (WebKit::WebPage::showPageBanners): 3059 * WebProcess/WebPage/WebPage.h: 3060 30612013-06-17 Ruth Fong <ruth_fong@apple.com> 3062 3063 REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime 3064 https://bugs.webkit.org/show_bug.cgi?id=20599 3065 3066 Add a "Download Video"/"Download Audio" context menu item to download media 3067 elements. 3068 3069 Reviewed by Beth Dakin. 3070 3071 * Shared/API/c/WKContextMenuItemTypes.h: Updated to include 3072 an enum type for the "Download Video/Audio" context menu item. 3073 3074 * Shared/API/c/WKSharedAPICast.h: Updated to associate 3075 the enums in WebKit and WebCore that handle the "Download Video/Audio" 3076 context menu item. 3077 3078 * UIProcess/API/efl/ewk_context_menu.cpp: 3079 * UIProcess/API/efl/ewk_context_menu_item.cpp: 3080 * UIProcess/API/efl/ewk_context_menu_item.h: 3081 Updated to include new EWK enum type for "Download Video/Audio" context menu item. 3082 3083 * UIProcess/WebPageProxy.cpp: Updated to 3084 handle the "Download Video/Audio" context menu item mouse click 3085 and download the media item in the UI process. 3086 30872013-06-17 Ralph Thomas <ralpht@gmail.com> 3088 3089 [CoordinatedGraphics][CSS Shaders] Use forwarding header for TextureMapperPlatformCompiledProgram.h 3090 https://bugs.webkit.org/show_bug.cgi?id=117712 3091 3092 Reviewed by Noam Rosenthal. 3093 3094 * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h: 3095 30962013-06-17 Mark Rowe <mrowe@apple.com> 3097 3098 <rdar://problem/13145014> Allow CoreIPC messages to transmit importance boosts 3099 3100 Transmitting the importance boost from the UI process to the web process is particularly 3101 important when disabling process suppression on a web process, as it will minimize the 3102 delays that can occur before the message instructing process suppression to be disabled 3103 is processed by the web process. 3104 3105 We keep the importance boost alive for the duration of the CoreIPC message handler. We 3106 achieve this by having an ImportanceAssertion object that owns the assertion, and whose 3107 lifetime is tied to that of the MessageDecoder. 3108 3109 Reviewed by Anders Carlsson. 3110 3111 * Platform/CoreIPC/MessageDecoder.cpp: 3112 (CoreIPC::MessageDecoder::setImportanceAssertion): Associate an importance assertion 3113 with this message. 3114 * Platform/CoreIPC/MessageDecoder.h: 3115 * Platform/CoreIPC/mac/ConnectionMac.cpp: 3116 (CoreIPC::Connection::open): Mark our receive port as allowing importance boosts to be received. 3117 (CoreIPC::Connection::receiveSourceEventHandler): 3118 * Platform/CoreIPC/mac/ImportanceAssertion.h: 3119 (CoreIPC::ImportanceAssertion::create): 3120 (CoreIPC::ImportanceAssertion::~ImportanceAssertion): Release the assertion. 3121 (CoreIPC::ImportanceAssertion::ImportanceAssertion): Take an assertion if a boost was present in 3122 the Mach message. 3123 31242013-06-17 Mark Rowe <mrowe@apple.com> 3125 3126 <rdar://problem/14051357> Web processes sometimes remain in a suppressed 3127 state after their window is unoccluded. 3128 3129 The code in WKView that responds to occlusion notifications was incorrectly 3130 treating the window's occlusion state as being an enum rather than the set of 3131 flags that it is. 3132 3133 Reviewed by Oliver Hunt. 3134 3135 * UIProcess/API/mac/WKView.mm: 3136 (-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state. 3137 (-[WKView setWindowOcclusionDetectionEnabled:]): Ditto. 3138 31392013-06-17 Michael Brüning <michael.bruning@digia.com> 3140 3141 [Qt] Remove Qt specific QTKIT flagged code. 3142 https://bugs.webkit.org/show_bug.cgi?id=117635 3143 3144 Reviewed by Simon Hausmann. 3145 3146 Due to disabling QTKIT for Qt in r151546, the 3147 code the flags that are not taken into account 3148 anymore and the code that has been rendered 3149 unreachable by this are removed. 3150 3151 * Target.pri: 3152 * UIProcess/qt/WebContextQt.cpp: 3153 (WebKit::WebContext::platformInitializeWebProcess): 3154 * WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Removed. 3155 * WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Removed. 3156 * WebProcess/WebPage/WebPage.cpp: 3157 (WebKit::WebPage::updatePreferences): 3158 * WebProcess/qt/WebProcessMainQt.cpp: 3159 (WebKit::WebProcessMainQt): 3160 31612013-06-17 Grzegorz Czajkowski <g.czajkowski@samsung.com> 3162 3163 Unreviewed, rolling out r151632. 3164 http://trac.webkit.org/changeset/151632 3165 https://bugs.webkit.org/show_bug.cgi?id=117585 3166 3167 Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC 3168 platforms 3169 3170 * Shared/API/c/WKSharedAPICast.h: 3171 (WebKit::toAPI): 3172 (WebKit::toImpl): 3173 * UIProcess/API/efl/ewk_context_menu_item.cpp: 3174 (getEwkActionFromWKTag): 3175 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: 3176 (onContextMenuShow): 3177 (TEST_F): 3178 * UIProcess/API/gtk/WebKitContextMenuActions.cpp: 3179 (webkitContextMenuActionGetActionTag): 3180 (webkitContextMenuActionGetForContextMenuItem): 3181 (webkitContextMenuActionGetLabel): 3182 * UIProcess/WebPageProxy.cpp: 3183 (WebKit::WebPageProxy::contextMenuItemSelected): 3184 31852013-06-14 Grzegorz Czajkowski <g.czajkowski@samsung.com> 3186 3187 Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off 3188 https://bugs.webkit.org/show_bug.cgi?id=117585 3189 3190 Reviewed by Anders Carlsson. 3191 3192 Add GRAMMAR_CHECKING guard to the context menu grammar items. 3193 3194 * Shared/API/c/WKSharedAPICast.h: 3195 (WebKit::toAPI): 3196 (WebKit::toImpl): 3197 * UIProcess/API/efl/ewk_context_menu_item.cpp: 3198 (getEwkActionFromWKTag): 3199 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: 3200 (checkSpellingItemsAvailability): 3201 Change callback name, to be consistent with a newly added. 3202 3203 (checkSpellingAndGrammarSubmenuAvailability): 3204 (checkGrammarWithSpellingItemAvailability): 3205 Add two unit tests for EFL to check whether context menu grammar items are 3206 available only when GRAMMAR_CHECKING macro is enabled. 3207 3208 * UIProcess/API/gtk/WebKitContextMenuActions.cpp: 3209 (webkitContextMenuActionGetActionTag): 3210 (webkitContextMenuActionGetForContextMenuItem): 3211 (webkitContextMenuActionGetLabel): 3212 * UIProcess/WebPageProxy.cpp: 3213 (WebKit::WebPageProxy::contextMenuItemSelected): 3214 32152013-06-14 Dean Jackson <dino@apple.com> 3216 3217 Crash in supportsSnapshotting 3218 https://bugs.webkit.org/show_bug.cgi?id=117670 3219 <rdar://problem/14059711> 3220 3221 Reviewed by Darin Adler. 3222 3223 Speculative fix for deferencing a null RefPtr in supportsSnapshotting. 3224 It seems like it was possible to get in a state where the plugin machinery 3225 would fire up and attempt to get a screenshot before there was an active 3226 connection to the plugin process (usually under periods of high load, such 3227 as opening a lot of tabs at once). In this case we're now returning false 3228 from supportsSnapshotting, which will trigger the plugin to restart, but 3229 that's better than requesting a snapshot on something that doesn't yet exist. 3230 3231 * WebProcess/Plugins/PluginProxy.cpp: 3232 (WebKit::PluginProxy::supportsSnapshotting): Guard for an empty connection object. 3233 32342013-06-14 Enrica Casucci <enrica@apple.com> 3235 3236 WKPageFindStringMatches ignores the kWKFindOptionsBackwards option. 3237 https://bugs.webkit.org/show_bug.cgi?id=117647 3238 <rdar://problem/13881024> 3239 3240 Reviewed by Darin Adler. 3241 3242 The API returns the matched ranges in the DOM order regardless of the 3243 find direction, but the index of the first match after the user selection 3244 should take the find direction into account. 3245 3246 Extended existing test in TestWebKitAPI. 3247 3248 * Shared/API/c/WKFindOptions.h: Added enum for the case where there are 3249 no matches after the user selection in the direction of the find. 3250 32512013-06-14 Andres Gomez <agomez@igalia.com> 3252 3253 [GTK] Compilation problems - hb.h not found 3254 https://bugs.webkit.org/show_bug.cgi?id=117636 3255 3256 Unreviewed GTK+ build fix. 3257 3258 * GNUmakefile.am: Added freetype cflags for WebKit2 GTK+ Platform 3259 library. 3260 32612013-06-13 Michał Pakuła vel Rutka <m.pakula@samsung.com> 3262 3263 [EFL][WK2] Wrong context menu and popup menu positions when scroll is applied 3264 https://bugs.webkit.org/show_bug.cgi?id=116610 3265 3266 Reviewed by Noam Rosenthal. 3267 3268 WebKit2 EFL uses fixed layout - because of this ScrollView::contentsToWindow, does 3269 not take scroll into account, as it is meant to be handled by UI application. 3270 When popup and context menu are created, after calling contentsToWindow their position 3271 are not adjusted to page scroll. 3272 Added two functions to EwkView and WKView, converting contents position to user viewport 3273 coordinates, to adjust popup and context menu positions. 3274 3275 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: 3276 (WKViewContentsToUserViewport): 3277 * UIProcess/API/C/CoordinatedGraphics/WKView.h: 3278 * UIProcess/API/efl/EwkView.cpp: 3279 (EwkView::showContextMenu): 3280 (EwkView::requestPopupMenu): 3281 * UIProcess/CoordinatedGraphics/WebView.cpp: 3282 (WebKit::WebView::contentsToUserViewport): 3283 * UIProcess/CoordinatedGraphics/WebView.h: 3284 32852013-06-12 Anders Carlsson <andersca@apple.com> 3286 3287 Remove the notion of inactive plug-ins 3288 https://bugs.webkit.org/show_bug.cgi?id=117570 3289 <rdar://problem/13484213> 3290 3291 Reviewed by Tim Horton. 3292 3293 Remove code that deals with inactive plug-ins. We still keep around the kWKPluginLoadPolicyInactive API enum for now. 3294 3295 * Shared/Plugins/PluginModuleInfo.h: 3296 * UIProcess/API/C/WKAPICast.h: 3297 (WebKit::toWKPluginLoadPolicy): 3298 (WebKit::toPluginModuleLoadPolicy): 3299 * UIProcess/Plugins/PluginInfoStore.cpp: 3300 * UIProcess/Plugins/PluginInfoStore.h: 3301 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: 3302 (WebKit::PluginInfoStore::shouldUsePlugin): 3303 (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin): 3304 * UIProcess/WebPageProxy.cpp: 3305 (WebKit::WebPageProxy::findPlugin): 3306 (WebKit::WebPageProxy::unavailablePluginButtonClicked): 3307 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 3308 (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton): 3309 (WebKit::WebChromeClient::unavailablePluginButtonClicked): 3310 * WebProcess/WebPage/WebPage.cpp: 3311 (WebKit::WebPage::createPlugin): 3312 33132013-06-12 Hugo Parente Lima <hugo.lima@openbossa.org> 3314 3315 [GTK] Explicit include glib.h to avoid compilation errors if libsoup isn't used. 3316 https://bugs.webkit.org/show_bug.cgi?id=117564 3317 3318 Reviewed by Martin Robinson. 3319 3320 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: 3321 33222013-06-12 Zan Dobersek <zdobersek@igalia.com> 3323 3324 [GTK] Move more build targets for source code that's free of layer violations into libPlatform 3325 https://bugs.webkit.org/show_bug.cgi?id=115936 3326 3327 Reviewed by Martin Robinson. 3328 3329 * GNUmakefile.am: Add GStreamer dependency's CFLAGS to the list of libPlatformGtk2 CPPFLAGS. 3330 33312013-06-12 Ruth Fong <ruth_fong@apple.com> 3332 3333 "Open Video in New Window" doesn't make sense in fullscreen 3334 https://bugs.webkit.org/show_bug.cgi?id=117556 3335 3336 Reviewed by Beth Dakin. 3337 3338 Adds method mediaIsInFullscreen() that checks if a media element is in 3339 fullscreen mode, which is needed to decide when to display the 3340 "Open Video in New Window" context menu item. 3341 3342 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: 3343 (WKBundleHitTestResultMediaIsInFullscreen): Added. 3344 Hooks into new InjectedBundleHitTestResult::mediaIsInFullscreen() method. 3345 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: 3346 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: 3347 (WebKit::InjectedBundleHitTestResult::mediaIsInFullscreen): Added. 3348 Checks if media element is in fullscreen. 3349 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 3350 33512013-06-12 Ruth Fong <ruth_fong@apple.com> 3352 3353 Allow for toggling fullscreen on <video> elements 3354 https://bugs.webkit.org/show_bug.cgi?id=117220 3355 3356 Reviewed by Dean Jackson. 3357 3358 * Shared/API/c/WKContextMenuItemTypes.h: 3359 * Shared/API/c/WKSharedAPICast.h: 3360 Added variables to support the toggle-ability of the fullscreen 3361 video context menu item. 3362 33632013-06-12 Carlos Garcia Campos <cgarcia@igalia.com> 3364 3365 [GTK] Invalidate the ProcessLauncher when the process is terminated before it has finished launching 3366 https://bugs.webkit.org/show_bug.cgi?id=117412 3367 3368 Reviewed by Anders Carlsson. 3369 3370 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: 3371 (WebKit::ProcessLauncher::terminateProcess): If process is still 3372 launching just invalidate the launcher. Reset the process 3373 identifier after killing the process. 3374 33752013-06-12 Jae Hyun Park <jae.park@company100.net> 3376 3377 [Coordinated Graphics] Remove unused headers in CoordinatedLayerTreeHostProxy 3378 https://bugs.webkit.org/show_bug.cgi?id=117539 3379 3380 Reviewed by Noam Rosenthal. 3381 3382 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 3383 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 3384 33852013-06-12 Zan Dobersek <zdobersek@igalia.com> 3386 3387 [GTK] Remove the WebCoreLayer(Gtk2).a archives before regenerating them 3388 https://bugs.webkit.org/show_bug.cgi?id=116723 3389 3390 Reviewed by Carlos Garcia Campos. 3391 3392 * GNUmakefile.am: When generating the WebCoreLayerGtk2.a archive from all the dependency archives, remove the 3393 current archive (if any). Updating an existent archive in an incremental build is not bulletproof and can lead 3394 to corrupt archives and subsequent build failures. On the other hand, the archive generation is not expensive 3395 and produces a working archive without problems even on incremental builds. 3396 33972013-06-12 Zan Dobersek <zdobersek@igalia.com> 3398 3399 Unreviewed GTK build fix. 3400 3401 * GNUmakefile.list.am: Adding missing build targets to the plugin process after r151480. 3402 34032013-06-11 Gavin Barraclough <barraclough@apple.com> 3404 3405 Add NSSupportsAppNap keys to WebProcess, PluginProcess 3406 https://bugs.webkit.org/show_bug.cgi?id=117528 3407 3408 Reviewed by Mark Rowe. 3409 3410 * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: 3411 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: 3412 * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: 3413 * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: 3414 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: 3415 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 3416 - add NSSupportsAppNap key. 3417 34182013-06-11 Oliver Hunt <oliver@apple.com> 3419 3420 Make sure we aren't throttling plugin timers during initialisation and destruction 3421 https://bugs.webkit.org/show_bug.cgi?id=117522 3422 3423 Reviewed by Darin Adler. 3424 3425 Add a new ActivityAssertion RAII class to handle allowing/disallowing 3426 timer throttling. Then make use of it during plugin initialisation 3427 and destruction, as well as any synchronous messages (on the basis 3428 that if another process is waiting for the plugin we shouldn't be 3429 throttling timers). 3430 3431 * CMakeLists.txt: 3432 * GNUmakefile.list.am: 3433 * PluginProcess/WebProcessConnection.cpp: 3434 (WebKit::WebProcessConnection::didReceiveSyncMessage): 3435 (WebKit::WebProcessConnection::destroyPlugin): 3436 (WebKit::WebProcessConnection::createPlugin): 3437 * Shared/ActivityAssertion.cpp: Added. 3438 (WebKit::ActivityAssertion::ActivityAssertion): 3439 (WebKit::ActivityAssertion::~ActivityAssertion): 3440 * Shared/ActivityAssertion.h: Added. 3441 * Target.pri: 3442 * WebKit2.xcodeproj/project.pbxproj: 3443 34442013-06-06 Timothy Hatcher <timothy@apple.com> 3445 3446 Update the framework bundle identifier for the Web Inspector. 3447 3448 Reviewed by Mark Rowe. 3449 3450 * UIProcess/mac/WebInspectorProxyMac.mm: 3451 (WebKit::inspectorReallyUsesWebKitUserInterface): 3452 (WebKit::WebInspectorProxy::inspectorPageURL): 3453 (WebKit::WebInspectorProxy::inspectorBaseURL): 3454 * WebProcess/WebPage/mac/WebInspectorMac.mm: 3455 (WebKit::inspectorReallyUsesWebKitUserInterface): 3456 (WebKit::WebInspector::localizedStringsURL): 3457 34582013-06-11 Jer Noble <jer.noble@apple.com> 3459 3460 Do not filter cookies requested through the CookieStorageShim. 3461 https://bugs.webkit.org/show_bug.cgi?id=117511 3462 <rdar://problem/13603433> 3463 3464 Reviewed by Beth Dakin. 3465 3466 Since the shim function is called when the underlying media engine is 3467 creating an HTTPRequest, use CookieRequestHeaderFieldValue (which does 3468 not filter out HTTP-only cookies) rather than CookiesForDOM (which does). 3469 3470 * Shared/mac/CookieStorageShim.cpp: 3471 (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): 3472 34732013-06-11 Seokju Kwon <seokju.kwon@gmail.com> 3474 3475 Remove leftover wxWebkit code 3476 https://bugs.webkit.org/show_bug.cgi?id=117471 3477 3478 Reviewed by Andreas Kling. 3479 3480 * Scripts/generate-forwarding-headers.pl: 3481 34822013-06-11 Changhyup Jwa <ch.jwa@samsung.com> 3483 3484 [EFL][WK2] Add fallback for EWK2UnitTestBase if opengl is not available. 3485 https://bugs.webkit.org/show_bug.cgi?id=117504 3486 3487 Reviewed by Christophe Dumez. 3488 3489 There're many fails on efl webkit2 unit test if opengl is not available. 3490 So, add fallback to non-opengl evas engine. 3491 3492 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: 3493 (EWK2UnitTest::EWK2UnitTestBase::SetUp): 3494 34952013-06-11 Csaba Osztrogonác <ossy@webkit.org> 3496 3497 Make WTR use its own temporary directory for application cache 3498 https://bugs.webkit.org/show_bug.cgi?id=117143 3499 3500 Reviewed by Alexey Proskuryakov. 3501 3502 * UIProcess/API/C/WKContext.cpp: 3503 (WKContextSetApplicationCacheDirectory): 3504 * UIProcess/API/C/WKContextPrivate.h: 3505 * UIProcess/WebContext.cpp: 3506 (WebKit::WebContext::applicationCacheDirectory): 3507 * UIProcess/WebContext.h: 3508 (WebKit::WebContext::setApplicationCacheDirectory): 3509 * UIProcess/efl/WebContextEfl.cpp: 3510 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): 3511 * UIProcess/gtk/WebContextGtk.cpp: 3512 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): 3513 * UIProcess/mac/WebContextMac.mm: 3514 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): 3515 * UIProcess/qt/WebContextQt.cpp: 3516 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): 3517 35182013-06-11 Michał Pakuła vel Rutka <m.pakula@samsung.com> 3519 3520 [EFL][WK2] Fix test_ewk2_context_menu 3521 https://bugs.webkit.org/show_bug.cgi?id=116601 3522 3523 Reviewed by Gyuyoung Kim. 3524 3525 test_ewk2_context_menu is always passing, it does not test any context menu feature 3526 as it ends before context menu is called. 3527 One single test was divided into two tests: testing WebKit2 created context menu and 3528 testing menus and items created by application. 3529 3530 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: 3531 (EWK2UnitTest::EWK2UnitTestBase::waitUntilTrue): added function introducing internal loop until boolean value is changed to true 3532 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: 3533 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: 3534 (customItemSelected): 3535 (showContextMenu): 3536 (showContextMenuForRemoveAndAppend): 3537 (showContextMenuForSubmenu): 3538 (hideContextMenu): 3539 (TEST_F): 3540 35412013-06-11 Ryuan Choi <ryuan.choi@samsung.com> 3542 3543 [EFL][WK2] Add ewk_view_navigate API 3544 https://bugs.webkit.org/show_bug.cgi?id=117467 3545 3546 Reviewed by Christophe Dumez. 3547 3548 The applications will use this API to navigate history more than one step. 3549 3550 * UIProcess/API/efl/ewk_back_forward_list_item_private.h: 3551 (EwkBackForwardListItem::wkItem): Return WKBackForwardListItemRef for page to navigate. 3552 * UIProcess/API/efl/ewk_view.cpp: 3553 (ewk_view_navigate_to): Added new API. 3554 * UIProcess/API/efl/ewk_view.h: 3555 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 3556 (TEST_F): Added more test case for navigation. 3557 35582013-06-10 Jae Hyun Park <jae.park@company100.net> 3559 3560 [CoordinatedGraphics] Typos in custom shader support 3561 https://bugs.webkit.org/show_bug.cgi?id=117413 3562 3563 Reviewed by Noam Rosenthal. 3564 3565 Wrong keyframe is passed when assigning filterValue. 3566 3567 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 3568 (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded): 3569 35702013-06-10 Seokju Kwon <seokju.kwon@gmail.com> 3571 3572 [Qt][GTK] Build fix after r151403 3573 https://bugs.webkit.org/show_bug.cgi?id=117452 3574 3575 Reviewed by Csaba Osztrogonác. 3576 3577 * UIProcess/API/gtk/PageClientImpl.cpp: 3578 (WebKit::PageClientImpl::preferencesDidChange): 3579 * UIProcess/API/gtk/PageClientImpl.h: 3580 * UIProcess/API/qt/raw/qrawwebview_p_p.h: 3581 (QRawWebViewPrivate::preferencesDidChange): 3582 * UIProcess/qt/QtPageClient.h: 3583 (WebKit::QtPageClient::preferencesDidChange): 3584 35852013-06-10 Commit Queue <commit-queue@webkit.org> 3586 3587 Unreviewed, rolling out r151411. 3588 http://trac.webkit.org/changeset/151411 3589 https://bugs.webkit.org/show_bug.cgi?id=117453 3590 3591 because it is duplicated with Bug 117441 (Requested by 3592 gyuyoung_ on #webkit). 3593 3594 * UIProcess/efl/WebViewEfl.cpp: 3595 * UIProcess/efl/WebViewEfl.h: 3596 35972013-06-10 Jaehun Lim <ljaehun.lim@samsung.com> 3598 3599 Fix build error and warning 3600 https://bugs.webkit.org/show_bug.cgi?id=117441 3601 3602 Reviewed by Anders Carlsson. 3603 3604 * UIProcess/CoordinatedGraphics/WebView.cpp: 3605 (WebKit::WebView::preferencesDidChange): Added. 3606 (WebKit::WebView::createPopupMenuProxy): Remove 'page'. 3607 * UIProcess/CoordinatedGraphics/WebView.h: 3608 36092013-06-10 Gyuyoung Kim <gyuyoung.kim@samsung.com> 3610 3611 Unreviewed, EFL Build fix after r151403. 3612 3613 Added preferencesDidChange to WebViewEfl. 3614 3615 * UIProcess/efl/WebViewEfl.cpp: 3616 (WebKit::WebViewEfl::preferencesDidChange): 3617 * UIProcess/efl/WebViewEfl.h: 3618 36192013-06-10 Anders Carlsson <andersca@apple.com> 3620 3621 Crash in StorageAreaMap::applyChange when clearing local storage in another web process 3622 https://bugs.webkit.org/show_bug.cgi?id=117440 3623 <rdar://problem/13961548> 3624 3625 Reviewed by Tim Horton. 3626 3627 Add an early return so we won't try to look up a null key in the m_pendingValueChanges map. 3628 Also, fix an assertion - it's fine for m_storageMap to be null in applyChange. 3629 3630 * WebProcess/Storage/StorageAreaMap.cpp: 3631 (WebKit::StorageAreaMap::applyChange): 3632 36332013-06-10 Sergio Correia <sergio.correia@openbossa.org> 3634 3635 [WK2][CoordinatedGraphics] Add default case to switches to fix strict build 3636 https://bugs.webkit.org/show_bug.cgi?id=117416 3637 3638 Reviewed by Noam Rosenthal. 3639 3640 This patch fixes a strict build by asserting on the default case of two 3641 switch statements where gcc was previously complaining of unhandled cases. 3642 3643 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 3644 (CoreIPC::::encode): 3645 (CoreIPC::::decode): 3646 36472013-06-10 Anders Carlsson <andersca@apple.com> 3648 3649 -[WKView _updateWindowAndViewFrames] should avoid updating the view frame in window coordinates if we don't have plugins 3650 https://bugs.webkit.org/show_bug.cgi?id=117420 3651 <rdar://problem/14073034> 3652 3653 Reviewed by Tim Horton. 3654 3655 If plug-ins are disabled there's no need for the web process to know about the view frame in window coordinates so only 3656 send it when plug-ins are enabled. In addition, if accessibility is disabled we don't need to send a message at all. 3657 3658 * UIProcess/API/mac/PageClientImpl.h: 3659 * UIProcess/API/mac/PageClientImpl.mm: 3660 (WebKit::PageClientImpl::preferencesDidChange): 3661 Call through to -[WKView _preferencesDidChange]. 3662 3663 * UIProcess/API/mac/WKView.mm: 3664 (-[WKView _updateWindowAndViewFrames]): 3665 Don't compute viewFrameInWindowCoordinates or accessibilityPosition unless they're required. If neither are required, 3666 don't even send a message to the web process. 3667 3668 (-[WKView _preferencesDidChange]): 3669 Update _needsViewFrameInWindowCoordinates and call -[WKView _updateWindowAndViewFrames] if needed. 3670 3671 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 3672 Set _needsViewFrameInWindowCoordinates based on whether plug-ins are enabled or not. 3673 3674 * UIProcess/WebPageProxy.cpp: 3675 (WebKit::WebPageProxy::preferencesDidChange): 3676 Call the page client. 3677 36782013-06-10 Bear Travis <betravis@adobe.com> 3679 3680 [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code 3681 https://bugs.webkit.org/show_bug.cgi?id=117162 3682 3683 Reviewed by Alexandru Chiculita. 3684 3685 Adding the WebCore/rendering/shapes directory to the include list. 3686 3687 * CMakeLists.txt: 3688 36892013-06-10 Iago Toral Quiroga <itoral@igalia.com> 3690 3691 Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland 3692 https://bugs.webkit.org/show_bug.cgi?id=116717 3693 3694 Reviewed by Martin Robinson. 3695 3696 Decide which implementation of WidgetBackingStore to use (X11 or Cairo) 3697 depending on whether we are running on X11 or not. Select Cairo 3698 implementation when not running in X11. 3699 3700 * UIProcess/cairo/BackingStoreCairo.cpp: 3701 (WebKit): 3702 (WebKit::createBackingStoreForGTK): 3703 (WebKit::BackingStore::incorporateUpdate): 3704 37052013-06-09 Jae Hyun Park <jae.park@company100.net> 3706 3707 [CoordinatedGraphics] Typo in argument decoder for CoordinatedGraphicsState 3708 https://bugs.webkit.org/show_bug.cgi?id=117384 3709 3710 Reviewed by Noam Rosenthal. 3711 3712 For CSS Shaders, it must decode state.customFiltersToRemove instead of 3713 state.updateAtlasesToRemove. 3714 3715 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 3716 (CoreIPC::::decode): 3717 37182013-06-08 Jae Hyun Park <jae.park@company100.net> 3719 3720 [Coordinated Graphics] Pass the ownership of GraphicsSurface explicitly 3721 https://bugs.webkit.org/show_bug.cgi?id=117379 3722 3723 Reviewed by Noam Rosenthal. 3724 3725 When creating WebCoordinatedSurface with GraphicsSurface, it is clearer 3726 to pass the ownership of the created GraphicsSurface explicitly. 3727 3728 * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: 3729 (WebKit::WebCoordinatedSurface::create): 3730 37312013-06-07 Anders Carlsson <andersca@apple.com> 3732 3733 Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged 3734 https://bugs.webkit.org/show_bug.cgi?id=117364 3735 <rdar://problem/14042099> 3736 3737 Reviewed by Geoffrey Garen. 3738 3739 -[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls 3740 to WebPageProxy::windowAndViewFrames using dispatch_async. 3741 3742 * UIProcess/API/mac/WKView.mm: 3743 (-[WKView _updateWindowAndViewFrames]): 3744 37452013-06-07 Thomas Deniau <deniau@apple.com> 3746 3747 Reproducible crash with triple-finger-tap "define word" gesture on a Netflix video 3748 https://bugs.webkit.org/show_bug.cgi?id=117020 3749 3750 Reviewed by Ryosuke Niwa. 3751 3752 * WebProcess/WebPage/mac/WebPageMac.mm: 3753 (WebKit::WebPage::performDictionaryLookupAtLocation): 3754 Don't invoke the Dictionary lookup when we failed to extract the range of the token 3755 surrounding the tapped position. 3756 37572013-06-07 Enrique Ocana Gonzalez <eocanha@igalia.com> 3758 3759 [GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened 3760 https://bugs.webkit.org/show_bug.cgi?id=117063 3761 3762 Reviewed by Anders Carlsson. 3763 3764 Log error message when the shared memory file can't be opened in 3765 Unix platform using a release build 3766 3767 * Platform/unix/SharedMemoryUnix.cpp: 3768 (WebKit::SharedMemory::create): 3769 37702013-06-07 Grzegorz Czajkowski <g.czajkowski@samsung.com> 3771 3772 [EFL][WK2] Context menu spellchecking items are not available when "Check Spelling While Typing" is off 3773 https://bugs.webkit.org/show_bug.cgi?id=117190 3774 3775 Reviewed by Christophe Dumez. 3776 3777 Context menu items (suggestions, learn and ignore word) are not available 3778 due to missing dictionary. To get the suggestions for the misspelled word, 3779 the dictionary has to be loaded first. 3780 3781 WebKit loads the default dictionary when check spelling while typing is being enabled. 3782 However, context menu spellchecking items should be present even if this setting is off. 3783 3784 * UIProcess/API/efl/ewk_context.cpp: 3785 (EwkContext::EwkContext): 3786 Load the user's default dictionary to ensure context menu spellchecking items. 3787 The dictionary is loaded asynchronously so it shouldn't delay application. 3788 3789 * UIProcess/API/efl/ewk_text_checker.h: 3790 Update doc. Spelling suggestions, learn and ignore word should be available 3791 independently of checking spelling while typing setting. 3792 3793 * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: 3794 (onContextMenuShow): 3795 (TEST_F): 3796 Add two unit tests to check whether the default dictionary is loaded and 3797 whether the context menu spelling items are available. 3798 3799 * UIProcess/efl/TextCheckerEfl.cpp: 3800 (WebKit::TextChecker::setContinuousSpellCheckingEnabled): 3801 (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged): 3802 Not set the default dictionary while enabling the setting, it's already loaded. 3803 38042013-06-07 Michał Pakuła vel Rutka <m.pakula@samsung.com> 3805 3806 [EFL][WK2] Implement customContextMenuItemSelected 3807 https://bugs.webkit.org/show_bug.cgi?id=117298 3808 3809 Reviewed by Christophe Dumez. 3810 3811 When custom context menu item is selected using ewk API, the feedback is not 3812 sent back to application, as customContextMenuItemSelected was unimplemented in 3813 contextMenuClientEfl. 3814 3815 * UIProcess/API/efl/EwkView.cpp: 3816 (EwkView::customContextMenuItemSelected): 3817 * UIProcess/API/efl/EwkView.h: 3818 * UIProcess/API/efl/ewk_view.h: added custom_item_selected callback. 3819 * UIProcess/efl/ContextMenuClientEfl.cpp: 3820 (customContextMenuItemSelected): 3821 (ContextMenuClientEfl::ContextMenuClientEfl): 3822 38232013-06-06 Oliver Hunt <oliver@apple.com> 3824 3825 Completely initialize ChildProcess state on launch 3826 https://bugs.webkit.org/show_bug.cgi?id=117328 3827 3828 Reviewed by Sam Weinig. 3829 3830 Use setProcessSuppressionEnabledInternal to avoid setProcessSuppressionEnabled 3831 "optimizing" our initialization away. 3832 3833 * Shared/mac/ChildProcessMac.mm: 3834 (WebKit::ChildProcess::platformInitialize): 3835 38362013-06-06 Rafael Brandao <rafael.lobo@openbossa.org> 3837 3838 [Gtk] Connection is leaking when WebProcess is terminated 3839 https://bugs.webkit.org/show_bug.cgi?id=117293 3840 3841 Reviewed by Martin Robinson. 3842 3843 Connection is leaking because WorkQueue::SocketEventSource inherits from 3844 WorkQueue::EventSource but when it is destroyed, the actual destructor running 3845 is the one from base class; however, subclass contains a function binded from 3846 Connection (m_closeFunction) and we need to do this extra cleanup, otherwise 3847 WorkQueue will keep Connection alive. A better explanation of this fix is provided 3848 on http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors 3849 3850 A quick way to see the leak is to change WK2 test "ReloadPageAfterCrash" to terminate 3851 WebProcess N times and add a printf on Connection destructor. 3852 3853 * Platform/gtk/WorkQueueGtk.cpp: 3854 (WorkQueue::EventSource::~EventSource): Adds a virtual destructor to enable 3855 the subclass to do its own cleanup. 3856 38572013-06-06 Jae Hyun Park <jae.park@company100.net> 3858 3859 Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext 3860 https://bugs.webkit.org/show_bug.cgi?id=108899 3861 3862 Reviewed by Noam Rosenthal. 3863 3864 This is a preparation patch for Threaded Coordinated Graphics. 3865 3866 This patch changes CoordinatedSurface to be responsible for the 3867 lifecycle of GraphicsContext used in Coordinated Graphics System. 3868 CoordinatedImageBacking and UpdateAtlas do not ask for the ownership 3869 of GraphicsContext anymore. Instead, those classes use client pattern to 3870 ask the CoordiantedSurface to paint to the GraphicsContext. 3871 3872 This refactoring is needed to implement CoordinatedSurface for Threaded 3873 Coordinated Graphics. 3874 3875 * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: 3876 (WebKit::WebCoordinatedSurface::paintToSurface): 3877 * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: 3878 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 3879 (WebKit::CoordinatedLayerTreeHost::paintToSurface): 3880 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 3881 38822013-06-05 Kangil Han <kangil.han@samsung.com> 3883 3884 [EFL][WK2] Fix test_ewk2_view unit test timed out issue 3885 https://bugs.webkit.org/show_bug.cgi?id=117251 3886 3887 Reviewed by Christophe Dumez. 3888 3889 'ewk_view_contents_size_changed' unit test case has been timed out since r150802 because 3890 same size is filtered by WebView class. So create one different test html string that has 3891 different size to continue unit tests. 3892 3893 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 3894 (onContentsSizeChangedPortrait): 3895 (onContentsSizeChangedLandscape): 3896 (TEST_F): 3897 38982013-06-05 Bear Travis <betravis@adobe.com> 3899 3900 [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags 3901 https://bugs.webkit.org/show_bug.cgi?id=117172 3902 3903 Reviewed by Alexandru Chiculita. 3904 3905 Adding the CSS_SHAPES compile flag. 3906 3907 * Configurations/FeatureDefines.xcconfig: 3908 39092013-06-05 Anders Carlsson <andersca@apple.com> 3910 3911 Crash if an IPC connection is invalidated before it's completely set up 3912 https://bugs.webkit.org/show_bug.cgi?id=117274 3913 <rdar://problem/13319035> 3914 3915 Reviewed by Andreas Kling. 3916 3917 Resume our dispatch sources on the connection queue so we won't get invalidation callbacks before 3918 all sources have been set up. 3919 3920 * Platform/CoreIPC/mac/ConnectionMac.cpp: 3921 (CoreIPC::Connection::open): 3922 (CoreIPC::Connection::sendOutgoingMessage): 3923 (CoreIPC::Connection::initializeDeadNameSource): 3924 (CoreIPC::Connection::receiveSourceEventHandler): 3925 39262013-06-05 Tim Horton <timothy_horton@apple.com> 3927 3928 [wk2] WebProcess' page-in-window count can be wrong 3929 https://bugs.webkit.org/show_bug.cgi?id=117106 3930 <rdar://problem/14040991> 3931 3932 Reviewed by Anders Carlsson. 3933 3934 If we're using a single WebProcess and a window is closed, we were 3935 not decrementing the page-in-window count (because we apparently don't 3936 setIsInWindow(false) a WebPage in a closing window before tearing it down). 3937 3938 Turn the page-in-window count into a HashSet of pageIDs instead. 3939 3940 * WebProcess/WebPage/WebPage.cpp: 3941 (WebKit::WebPage::WebPage): 3942 (WebKit::WebPage::setIsInWindow): 3943 Send the pageID instead (this change is just so that I don't need to 3944 fetch the WebPage in WebProcess::removeWebPage). 3945 3946 * WebProcess/WebProcess.cpp: 3947 (WebKit::WebProcess::WebProcess): 3948 Remove m_inWindowPageCount. 3949 3950 (WebKit::WebProcess::removeWebPage): 3951 Ensure that WebPages being torn-down are removed from the in-window WebPage set. 3952 3953 (WebKit::WebProcess::pageDidEnterWindow): 3954 (WebKit::WebProcess::pageWillLeaveWindow): 3955 Use our new HashSet instead of a count. 3956 3957 (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): 3958 Make sure that we don't have any visible pages before doing cleanup. 3959 3960 * WebProcess/WebProcess.h: 3961 Remove m_inWindowPageCount. 3962 Add m_inWindowPageSet. 3963 Make pageDidEnterWindow/pageWillLeaveWindow take pageID instead of WebPage. 3964 39652013-06-05 Tim Horton <timothy_horton@apple.com> 3966 3967 REGRESSION (r148713): Crash under waitForDidUpdateInWindowState 3968 https://bugs.webkit.org/show_bug.cgi?id=117268 3969 <rdar://problem/13822353> 3970 3971 Reviewed by Anders Carlsson. 3972 3973 Check if the WebProcess is valid before waiting for a message from it. 3974 Reset the bool that tells us that we have an outstanding didUpdateInWindowState message if the WebProcess quits. 3975 3976 * UIProcess/WebPageProxy.cpp: 3977 (WebKit::WebPageProxy::waitForDidUpdateInWindowState): 3978 (WebKit::WebPageProxy::resetStateAfterProcessExited): 3979 39802013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 3981 3982 [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer 3983 https://bugs.webkit.org/show_bug.cgi?id=117222 3984 3985 Reviewed by Noam Rosenthal. 3986 3987 CoordinatedGraphicsLayer::flushCompositingState() will cross frame 3988 boundaries if the GraphicsLayers are connected. In this case, 3989 updateContentBuffers will invoke a painting of a sub-frame that causes 3990 flushCompositingState recursively. 3991 3992 To prevent this behavior this patch extracts updateContentBuffers from 3993 flushCompositingState, and places it in 3994 updateContentBuffersIncludeSublayers, which traverses the tree 3995 separately from flushing the state for painting. 3996 3997 No new tests, covered by existing tests. 3998 3999 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 4000 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): 4001 40022013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 4003 4004 [Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas. 4005 https://bugs.webkit.org/show_bug.cgi?id=111948 4006 4007 Reviewed by Noam Rosenthal. 4008 4009 This patch renames CoordinatedImageBacking::Coordinator to 4010 CoordinatedImageBacking::Client, and UpdateAtlasClient to 4011 UpdateAtlas::Client for naming consistency and clarification. 4012 4013 No new tests, covered by existing tests. 4014 4015 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 4016 40172013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 4018 4019 [Coordinated Graphics] Unify messages related object's lifecycles into CoordinatedGraphicsState. 4020 https://bugs.webkit.org/show_bug.cgi?id=111919 4021 4022 Reviewed by Noam Rosenthal. 4023 4024 CoordinatedLayerTreeHostProxy has several methods, which simply passes 4025 these calls to CoordinatedGraphicsScene. 4026 4027 This patch removes methods in CoordinatedLayerTreeHostProxy just for 4028 message chaining. Instead of that, messages for creation/deletion of objects 4029 (Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into 4030 CommitCoordinatedGraphicsState. 4031 4032 And this patch also removes codes for WebCoordinatedSurface in 4033 CoordinatedLayerTreeHost, except for a factory method. 4034 CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself 4035 using WebCoordinatedSurface. 4036 4037 No new tests, covered by existing tests. 4038 4039 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 4040 (CoreIPC::encodeCoordinatedSurface): 4041 (CoreIPC::decodeCoordinatedSurface): 4042 (CoreIPC::::encode): 4043 (CoreIPC::::decode): 4044 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 4045 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 4046 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: 4047 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 4048 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): 4049 (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges): 4050 (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): 4051 (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy): 4052 (WebKit::CoordinatedLayerTreeHost::detachLayer): 4053 (WebKit::CoordinatedLayerTreeHost::createImageBacking): 4054 (WebKit::CoordinatedLayerTreeHost::updateImageBacking): 4055 (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents): 4056 (WebKit::CoordinatedLayerTreeHost::removeImageBacking): 4057 (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): 4058 (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas): 4059 (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas): 4060 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 4061 40622013-06-04 Simon Cooper <scooper@apple.com> 4063 4064 Tighten plugin sandbox profiles against symlink attacks 4065 https://bugs.webkit.org/show_bug.cgi?id=117219 4066 <rdar://problem/13044569> 4067 4068 Reviewed by Sam Weinig. 4069 4070 This inserts deny rules for creating symbolic links. The rules are 4071 inserted at the end of sandbox profile compilation by overriding the 4072 finalizer. The initial value of %finalize must be the last function 4073 called. 4074 4075 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 4076 40772013-06-04 Chris Fleizach <cfleizach@apple.com> 4078 4079 AX: WK2: accessibility position is calculated every time window frame is updated 4080 https://bugs.webkit.org/show_bug.cgi?id=117201 4081 4082 Reviewed by Tim Horton. 4083 4084 Only calculate the AX position if AX has already been enabled when updating the 4085 WKView's window and frame. 4086 4087 * UIProcess/API/mac/WKView.mm: 4088 (-[WKView _updateWindowAndViewFrames]): 4089 (-[WKView _accessibilityRegisterUIProcessTokens]): 4090 Don't call accessibilityAttributeValue: here because it could enable accessibility prematurely. 4091 (-[WKView enableAccessibilityIfNecessary]): 4092 After enabling AX for the first time, also update the frame so that the AX position is correct. 4093 (-[WKView accessibilityFocusedUIElement]): 4094 (-[WKView accessibilityHitTest:]): 4095 (-[WKView accessibilityAttributeValue:]): 4096 Tell the AXObjectCache that AX is now enabled. 4097 40982013-06-04 Mark Rowe <mrowe@apple.com> 4099 4100 REGRESSION (r151043): Frequent crashes inside WebPageProxy::getPlugInInformation 4101 <http://webkit.org/b/117180> 4102 4103 Reviewed by Brady Eidson. 4104 4105 * UIProcess/mac/WebPageProxyMac.mm: 4106 (WebKit::WebPageProxy::getPlugInInformation): Return early when plugInProcessProxy is null 4107 since there's nothing we can do. 4108 41092013-06-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 4110 4111 [EFl][WK2] Sub menu items should be of EWK_SUBMENU_TYPE and not checkable 4112 https://bugs.webkit.org/show_bug.cgi?id=116959 4113 4114 Reviewed by Gyuyoung Kim. 4115 4116 Currently using ewk API it is possible to create a sub menu item which is not an EWK_SUBMENU_TYPE 4117 or set checkable flag for it, while it is not possible for items created by WebKit. 4118 This patch changes ewk context menu API to match WebKit2 behaviour, by creating sub menus with 4119 proper type and checkable flags. 4120 4121 * UIProcess/API/efl/ewk_context_menu_item.cpp: 4122 (ewk_context_menu_item_new_with_submenu): 4123 * UIProcess/API/efl/ewk_context_menu_item.h: 4124 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: 4125 (showContextMenu): 4126 41272013-06-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 4128 4129 [EFL][WK2] Custom context menu items cannot be selected 4130 https://bugs.webkit.org/show_bug.cgi?id=116830 4131 4132 Reviewed by Gyuyoung Kim. 4133 4134 Custom item added using ewk_context_menu_item_append had no 4135 pointer to parent menu, and custom submenu added using with the 4136 the same function had no pointer to EwkView. Both issues 4137 prevented items to be selected. 4138 4139 * UIProcess/API/efl/ewk_context_menu.cpp: 4140 (EwkContextMenu::appendItem): 4141 (EwkContextMenu::contextMenuItemSelected): 4142 (ewk_context_menu_item_append): 4143 (ewk_context_menu_item_select): 4144 * UIProcess/API/efl/ewk_context_menu_private.h: 4145 (EwkContextMenu): 4146 (EwkContextMenu::setEwkView): 4147 41482013-06-03 Simon Cooper <scooper@apple.com> 4149 4150 Unable to play videos in Safari using QuickTime plug-in until I've played those videos in Chrome first 4151 https://bugs.webkit.org/show_bug.cgi?id=117174 4152 <rdar://problem/13711687> 4153 4154 Reviewed by Alexey Proskuryakov. 4155 4156 Pull in fixes that allow https connections within the plugin 4157 environment. 4158 4159 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 4160 41612013-06-03 Marcelo Lira <marcelo.lira@openbossa.org> 4162 4163 [WK2] REGRESSION(r150798): scrolling coordinator is not being enabled when WebPage is set to use fixed layout 4164 https://bugs.webkit.org/show_bug.cgi?id=117163 4165 4166 Reviewed by Darin Adler. 4167 4168 Moved call to WebPage::settings()->setScrollingCoordinatorEnabled() 4169 from CoordinatedLayerTreeHost constructor to WebPage::setUseFixedLayout(). 4170 The scrolling coordinator must be enabled or disabled following the 4171 WebPage's use of fixed layout. 4172 4173 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 4174 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 4175 * WebProcess/WebPage/WebPage.cpp: 4176 (WebKit::WebPage::setUseFixedLayout): 4177 41782013-06-03 Anders Carlsson <andersca@apple.com> 4179 4180 Send mouse events to the banner for as long as the mouse button is down 4181 https://bugs.webkit.org/show_bug.cgi?id=117161 4182 <rdar://problem/13821220> 4183 4184 Reviewed by Beth Dakin. 4185 4186 Keep track of whether the mouse was pressed in a banner and keep sending mouse events to it, 4187 even if they are outside the banner's bounds for as long as the mouse is down. 4188 4189 * WebProcess/WebPage/PageBanner.h: 4190 * WebProcess/WebPage/mac/PageBannerMac.mm: 4191 (WebKit::PageBanner::PageBanner): 4192 (WebKit::PageBanner::mouseEvent): 4193 41942013-06-03 Sergio Correia <sergio.correia@openbossa.org> 4195 4196 [EFL][WK2] Process launcher uses system() for wrapping the WebProcess when using WEB_PROCESS_CMD_PREFIX 4197 https://bugs.webkit.org/show_bug.cgi?id=105156 4198 4199 Reviewed by Christophe Dumez. 4200 4201 When using WEB_PROCESS_CMD_PREFIX - which allows us for instance to analyze 4202 WebProcess under tools like valgrind or gdb -, the ProcessLauncher would 4203 spawn the new process using system(), which would, among other things, keep 4204 an extra UIProcess waiting and executing the shell. 4205 4206 This patch handles the normal case and the case where we have something to 4207 prefix WebProcess (i.e., by using WEB_PROCESS_CMD_PREFIX in a debug build) 4208 the same way, through a call to execvp(). 4209 4210 To achieve this a function was introduced to create an array with the given 4211 arguments to the full command to be executed, to be used by execvp(). We use 4212 a Vector<OwnArrayPtr<char>>, so that we can take advantage of the destructor 4213 of OwnArrayPtr to handle the memory deallocation when it goes out of scope. 4214 4215 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: 4216 (WebKit::createArgsArray): This function creates the array to be used by 4217 execvp(), out of the Strings given as arguments. 4218 (WebKit::ProcessLauncher::launchProcess): Rework the logic to accomodate 4219 both the cases with and without WEB_PROCESS_CMD_PREFIX. The execl() call 4220 was replaced with an execvp() call, since now we should deal with having 4221 a variable number of arguments (WEB_PROCESS_CMD_PREFIX) as well. 4222 42232013-06-02 Arunprasad Rajkumar <arurajku@cisco.com> 4224 4225 [Qt] Move Qt port off legacy clipboard 4226 https://bugs.webkit.org/show_bug.cgi?id=116416 4227 4228 Reviewed by Darin Adler. 4229 4230 * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: 4231 (WebKit::WebDragClient::startDrag): 4232 42332013-06-02 Sergio Correia <sergio.correia@openbossa.org> 4234 4235 [WK2][CoordinatedGraphics]: Use a properly initialized WebPage when creating a PageClient 4236 https://bugs.webkit.org/show_bug.cgi?id=117116 4237 4238 Reviewed by Tim Horton. 4239 4240 Valgrind reported a "conditional jump or move depends on uninitialised value" 4241 at WebPageProxy constructor, when checking the m_isVisible variable inside 4242 the ENABLE(PAGE_VISIBILITY_API) guard. 4243 4244 The issue was tracked down to the WebView constructor, which was creating a 4245 WebKit::PageClient* making use of `this' before having initialized all of its 4246 attributes. 4247 4248 The solution was to move the initialization of the `page' member to inside the 4249 constructor itself - out of the initialization list -, where we can guarantee 4250 all the relevant stuff has already been properly initialized. 4251 4252 Here's the relevant valgrind trace for reference: 4253 4254 Conditional jump or move depends on uninitialised value(s) 4255 at 0x65A35A4: WebKit::WebPageProxy::WebPageProxy(WebKit::PageClient*, 4256 WTF::PassRefPtr<WebKit::WebProcessProxy>, 4257 WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:322) 4258 by 0x65A2BA2: WebKit::WebPageProxy::create(WebKit::PageClient*, 4259 WTF::PassRefPtr<WebKit::WebProcessProxy>, 4260 WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:233) 4261 by 0x65E94BB: WebKit::WebProcessProxy::createWebPage(WebKit::PageClient*, 4262 WebKit::WebContext*, WebKit::WebPageGroup*) 4263 (WebProcessProxy.cpp:172) 4264 by 0x6570957: WebKit::WebContext::createWebPage(WebKit::PageClient*, 4265 WebKit::WebPageGroup*, WebKit::WebPageProxy*) 4266 (WebContext.cpp:735) 4267 by 0x67673E3: WebKit::WebView::WebView(WebKit::WebContext*, 4268 WebKit::WebPageGroup*) (WebView.cpp:52) 4269 by 0x6775F18: WebKit::WebViewEfl::WebViewEfl(WebKit::WebContext*, 4270 WebKit::WebPageGroup*) (WebViewEfl.cpp:54) 4271 by 0x6775EB4: WebKit::WebView::create(WebKit::WebContext*, 4272 WebKit::WebPageGroup*) (WebViewEfl.cpp:49) 4273 by 0x673E13D: WKViewCreate (WKView.cpp:33) 4274 by 0x6763ECE: EWKViewCreate (ewk_view.cpp:92) 4275 4276 * UIProcess/CoordinatedGraphics/WebView.cpp: 4277 (WebKit::WebView::WebView): 4278 42792013-05-31 Gyuyoung Kim <gyuyoung.kim@samsung.com> 4280 4281 [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu 4282 https://bugs.webkit.org/show_bug.cgi?id=117014 4283 4284 Reviewed by Christophe Dumez. 4285 4286 m_viewImpl is able to be null. So, we need to protect this function against such case. 4287 4288 * UIProcess/API/efl/ewk_context_menu.cpp: 4289 (EwkContextMenu::hide): 4290 (ewk_context_menu_hide): 4291 * UIProcess/API/efl/ewk_context_menu_private.h: 4292 (EwkContextMenu): 4293 42942013-05-31 Oliver Hunt <oliver@apple.com> 4295 4296 Fix bug in active page tracking that lead to plugins hanging during destruction 4297 https://bugs.webkit.org/show_bug.cgi?id=117099 4298 4299 Reviewed by Anders Carlsson. 4300 4301 NPRuntimeObjectMap no longer keeps its own reference to the 4302 throttler, and no longer reports activity during destruction. 4303 4304 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 4305 (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): 4306 (WebKit::NPRuntimeObjectMap::evaluate): 4307 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 4308 * WebProcess/Plugins/PluginView.cpp: 4309 (WebKit::PluginView::PluginView): 4310 43112013-05-31 Tim Horton <timothy_horton@apple.com> 4312 4313 [wk2] All intrinsic content size changes should go through the 0-delay timer 4314 https://bugs.webkit.org/show_bug.cgi?id=117058 4315 <rdar://problem/13935042> 4316 4317 Reviewed by Anders Carlsson. 4318 4319 In r146913, I added a 0-delay timer so that we'd coalesce intrinsic 4320 content size changes. However, didUpdateGeometry was still immediately 4321 invalidating the intrinsic content size without coalescing. 4322 4323 Move that update to the WebProcess to share the timer. 4324 4325 * UIProcess/DrawingAreaProxy.h: 4326 (WebKit::DrawingAreaProxy::didUpdateGeometry): 4327 * UIProcess/DrawingAreaProxy.messages.in: 4328 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: 4329 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: 4330 (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): 4331 Remove the newIntrinsicContentSize argument, and don't invalidate intrinsic 4332 content size inside didUpdateGeometry. 4333 4334 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 4335 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 4336 Start the intrinsic content size update timer when we finish updateGeometry. 4337 43382013-05-31 Alexey Proskuryakov <ap@apple.com> 4339 4340 Sandbox violations when trying to access fonts in non-standard locations 4341 https://bugs.webkit.org/show_bug.cgi?id=117097 4342 <rdar://problem/9264746> 4343 4344 Reviewed by Anders Carlsson. 4345 4346 The issue was that lack of a main xib was resulting in font machinery being 4347 initialized too early, before we entered sandbox. 4348 4349 * Resources/WebContentProcess.xib: Added. 4350 * WebKit2.xcodeproj/project.pbxproj: 4351 * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: 4352 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: 4353 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 4354 43552013-05-31 Alexey Proskuryakov <ap@apple.com> 4356 4357 <rdar://problem/14036464> Sandbox violation when using Web SpeechSynthesis 4358 4359 Reviewed by Anders Carlsson 4360 4361 * WebProcess/com.apple.WebProcess.sb.in: Allow com.apple.speech.synthesis.console. 4362 43632013-05-31 Jessie Berlin <jberlin@apple.com> 4364 4365 Need the ability to get the information for a plug-in with a particular process id that may 4366 be running on a page 4367 https://bugs.webkit.org/show_bug.cgi?id=117090 4368 4369 Rubber-stamped by Anders Carlsson. 4370 4371 Follow-up to r151043 incorprating some feedback I got from Darin after I had already 4372 committed the patch. 4373 4374 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: 4375 (callGetPlugInInformationBlockAndDispose): 4376 Renamed to be less wordy. 4377 (WKPageGetPlugInInformation): 4378 Ditto. 4379 * UIProcess/API/C/mac/WKPagePrivateMac.h: 4380 Ditto. 4381 4382 * UIProcess/Plugins/PluginProcessManager.h: 4383 * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: 4384 (WebKit::PluginProcessManager::findPlugInProcessByID): 4385 Renamed to not use "Cocoa method style" in non-Cocoa functions. 4386 (WebKit::PluginProcessManager::findPlugInProcessByToken): 4387 Ditto. 4388 4389 * UIProcess/WebPageProxy.h: 4390 * UIProcess/mac/WebPageProxyMac.mm: 4391 (WebKit::WebPageProxy::getPlugInInformation): 4392 Reduce ref count churn and fix a variable name. 4393 Updated for the change to findPlugInProcessByID. 4394 (WebKit::WebPageProxy::containsPlugInCallback): 4395 Updated for the change to findPlugInProcessByToken. 4396 4397 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: 4398 Move the override of a virtual function to the private section. 4399 44002013-05-31 Jessie Berlin <jberlin@apple.com> 4401 4402 Need the ability to get the information for a plug-in with a particular process id that may 4403 be running on a page 4404 https://bugs.webkit.org/show_bug.cgi?id=117090 4405 4406 Reviewed by Anders Carlsson. 4407 4408 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: 4409 (callGetInformationForPlugInWithProcessIDBlockAndDispose): 4410 Get the block from the context, invoke it with the result, and dispose of it. 4411 (WKPageGetInformationForPlugInWithProcessID): 4412 Ask the WebPageProxy and provide it with a dictionary callback that uses the 4413 above function to invoke the passed in block. 4414 * UIProcess/API/C/mac/WKPagePrivateMac.h: 4415 Add WKPageGetInformationForPlugInWithProcessID and a typedef for the callback block. 4416 4417 * UIProcess/Plugins/PluginProcessManager.h: 4418 Add ways to get the PluginProcessProxy associated with a process id or process token. 4419 * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: 4420 (WebKit::PluginProcessManager::plugInProcessWithProcessID): 4421 Return the first PluginProcessProxy with the passed in process ID. 4422 (WebKit::PluginProcessManager::plugInProcessWithToken): 4423 Return the first PluginProcessProxy with the passed in process token. 4424 4425 * UIProcess/WebPageProxy.cpp: 4426 (WebKit::WebPageProxy::close): 4427 Invalidate any outstanding requests for plug-in information. 4428 * UIProcess/WebPageProxy.h: 4429 Keep track of the callbacks for the requests for plug-in information. 4430 * UIProcess/WebPageProxy.messages.in: 4431 * UIProcess/mac/WebPageProxyMac.mm: 4432 (WebKit::WebPageProxy::getInformationForPlugInWithProcessID): 4433 If there are no known plug-ins with the provided process ID, invoke the callback with a null 4434 dictionary of plug-in information. 4435 Otherwise, keep track of the callback and send a message to the web process asking for the 4436 information. 4437 (WebKit::WebPageProxy::containsPlugInCallback): 4438 If the page did not contain the plug-in, invoke the callback with a null dictionary of 4439 plug-in information. 4440 Invoke the callback with a dictionary containing the PlugInModuleInfo. 4441 4442 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 4443 Return 0 for the plugInProcessToken. 4444 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: 4445 Ditto. 4446 * WebProcess/Plugins/Plugin.h: 4447 Add a pure virtual method for plugInProcessToken so it can be accessed from from the Plugin 4448 on the PluginView. 4449 * WebProcess/Plugins/PluginProxy.h: 4450 Return the actual plug-in process token. 4451 4452 * WebProcess/Plugins/PluginView.h: 4453 (WebKit::PluginView::plugIn): 4454 Make it possible to get at the plug-in process token through the Plugin. 4455 4456 * WebProcess/WebPage/WebPageMac.mm: 4457 (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): 4458 If there is an instance of the plug-in with that token, send a confirmation to the ui 4459 process. 4460 * WebProcess/WebPage/WebPage.h: 4461 * WebProcess/WebPage/WebPage.messages.in: 4462 44632013-05-31 Alexey Proskuryakov <ap@apple.com> 4464 4465 REGRESSION (r141445): MPEG-4 videos do not play on certain hardware configurations 4466 https://bugs.webkit.org/show_bug.cgi?id=117089 4467 <rdar://problem/13839717> 4468 4469 Reviewed by Mark Rowe. 4470 4471 * Configurations/WebContentProcess.xcconfig: Statically link to a framework that 4472 uses an XPC service to work around a libxpc limitation on Lion. 4473 44742013-05-31 Dean Jackson <dino@apple.com> 4475 4476 Don't create an accelerated compositing layer unless we have to for snapshotting plug-ins 4477 https://bugs.webkit.org/show_bug.cgi?id=117076 4478 <rdar://problem/14030364> 4479 4480 Reviewed by Beth Dakin and Anders Carlsson. 4481 4482 If a plug-in can support software snapshotting, then don't create an 4483 accelerated compositing layer for it while in snapshot mode. This is a 4484 better user experience -- otherwise the page/plug-in looks like it broke. 4485 4486 * WebProcess/Plugins/PluginView.cpp: 4487 (WebKit::PluginView::isAcceleratedCompositingEnabled): If we are in snapshotting mode 4488 and we are a Flash plugin (the only one that supports software snapshots at the moment) 4489 then do not create an accelerated compositing layer. 4490 44912013-05-30 Tim Horton <timothy_horton@apple.com> 4492 4493 It's easy to hit ASSERT_NOT_REACHED in WKDOMNodeClass 4494 https://bugs.webkit.org/show_bug.cgi?id=117051 4495 4496 Reviewed by Anders Carlsson. 4497 4498 Re-add the ASSERT_NOT_REACHED, and return [WKDOMNode class] in the case 4499 where we don't have a specific subclass. 4500 4501 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: 4502 (WebKit::WKDOMNodeClass): 4503 45042013-05-31 Stephanie Lewis <slewis@apple.com> 4505 4506 Update low memory handler to use new memory pressure notifications on new OS versions. 4507 <rdar://problem/14027095> 4508 4509 Reviewed by Mark Rowe. 4510 4511 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 4512 (InitWebCoreSystemInterface): 4513 45142013-05-30 Tim Horton <timothy_horton@apple.com> 4515 4516 Remove ASSERT_NOT_REACHED from WKDOMNodeClass 4517 https://bugs.webkit.org/show_bug.cgi?id=117051 4518 4519 Reviewed by Anders Carlsson. 4520 4521 It's easy to fail this assertion in seemingly-legitimate cases. 4522 4523 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: 4524 (WebKit::WKDOMNodeClass): 4525 45262013-05-29 Jeffrey Pfau <jpfau@apple.com> 4527 4528 [Mac] Enable cache partitioning and the public suffix list on 10.8 4529 <rdar://problem/13679019> 4530 4531 Rubber-stamped by David Kilzer. 4532 4533 * Configurations/FeatureDefines.xcconfig: 4534 45352013-05-30 Andreas Kling <akling@apple.com> 4536 4537 Fix double hash lookup in WebPage::determinePrimarySnapshottedPlugIn() loop. 4538 <http://webkit.org/b/117032> 4539 4540 Reviewed by Anders Carlsson. 4541 4542 * WebProcess/WebPage/WebPage.cpp: 4543 (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 4544 45452013-05-29 Tim Horton <timothy_horton@apple.com> 4546 4547 Expose incrementalRenderingSuppressionTimeout via WK2 4548 https://bugs.webkit.org/show_bug.cgi?id=117015 4549 <rdar://problem/13992853> 4550 4551 Reviewed by Darin Adler. 4552 4553 * Shared/WebPreferencesStore.h: 4554 * UIProcess/API/C/WKPreferencesPrivate.h: 4555 Add IncrementalRenderingSuppressionTimeout preference. 4556 4557 * UIProcess/API/C/WKPreferences.cpp: 4558 (WKPreferencesSetIncrementalRenderingSuppressionTimeout): Added. 4559 (WKPreferencesGetIncrementalRenderingSuppressionTimeout): Added. 4560 4561 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 4562 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 4563 (WebKit::WebFrameLoaderClient::forcePageTransitionIfNeeded): Added. 4564 Call didCompletePageTransition, which un-freezes the layer tree. 4565 4566 * WebProcess/WebPage/WebPage.cpp: 4567 (WebKit::WebPage::didCompletePageTransition): 4568 Fix some indentation. 4569 4570 (WebKit::WebPage::updatePreferences): 4571 Forward the timeout value through to WebCore. 4572 45732013-05-29 Simon Fraser <simon.fraser@apple.com> 4574 4575 Fix paint-related milestones to not fire when the layer tree is frozen 4576 https://bugs.webkit.org/show_bug.cgi?id=117012 4577 4578 Reviewed by Tim Horton. 4579 4580 Implement ChromeClient::layerTreeStateIsFrozen() to return 4581 the frozen state of the drawing area. 4582 4583 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 4584 (WebKit::WebChromeClient::layerTreeStateIsFrozen): 4585 * WebProcess/WebCoreSupport/WebChromeClient.h: 4586 (WebChromeClient): 4587 45882013-05-29 Anders Carlsson <andersca@apple.com> 4589 4590 WebKit should expose HSTS APIs to determine whether a host is in the HSTS cache and to reset HSTS policies 4591 https://bugs.webkit.org/show_bug.cgi?id=117010 4592 <rdar://problem/13689666> 4593 4594 Reviewed by Tim Horton. 4595 4596 * UIProcess/API/C/mac/WKContextPrivateMac.h: 4597 * UIProcess/API/C/mac/WKContextPrivateMac.mm: 4598 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: 4599 * UIProcess/API/C/mac/WKPagePrivateMac.h: 4600 * UIProcess/WebContext.h: 4601 (WebContext): 4602 * UIProcess/mac/WebContextMac.mm: 4603 (WebKit): 4604 (WebKit::privateBrowsingSession): 4605 (WebKit::WebContext::isURLKnownHSTSHost): 4606 (WebKit::WebContext::resetHSTSHosts): 4607 46082013-05-29 Tim Horton <timothy_horton@apple.com> 4609 4610 WKViews using shouldClipToVisibleRect=YES should respect prepareContentInRect: if called 4611 https://bugs.webkit.org/show_bug.cgi?id=116989 4612 <rdar://problem/14007440> 4613 4614 Reviewed by Anders Carlsson. 4615 4616 * UIProcess/API/mac/WKView.mm: 4617 (-[WKView prepareContentInRect:]): 4618 If prepareContentInRect: is called, save the rect and set a flag so we know we should use it. 4619 4620 (-[WKView _updateViewExposedRect]): 4621 Give the WebPage (and later the DrawingArea) the union of the rect handed to prepareContentInRect: 4622 and the WKView's visibleRect, if we're in that mode, so that applications that do their own scrolling 4623 can cause tiles to be created in currently offscreen views (for overdraw). 4624 4625 (-[WKView setFrameSize:]): 4626 (-[WKView _updateWindowAndViewFrames]): 4627 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 4628 (-[WKView enableFrameSizeUpdates]): 4629 (-[WKView setShouldClipToVisibleRect:]): 4630 (-[WKView forceAsyncDrawingAreaSizeUpdate:]): 4631 Use [_updateViewExposedRect]. 4632 46332013-05-28 Oliver Hunt <oliver@apple.com> 4634 4635 Add more accurate activity state tracking 4636 https://bugs.webkit.org/show_bug.cgi?id=116893 4637 4638 Reviewed by Gavin Barraclough. 4639 4640 This extends the logic in WebCore from a Page to Process 4641 granularity, so we will avoid lowering the child process 4642 priority if there is active content. This also plumbs in 4643 the logic to allow plugins to report that they have done 4644 something "interesting". Currently this is somewhat conservative 4645 but even this is sufficient to fix some stuttering issues 4646 that we've seen. 4647 4648 * Shared/ChildProcess.cpp: 4649 (WebKit::ChildProcess::ChildProcess): 4650 * Shared/ChildProcess.h: 4651 (ChildProcess): 4652 (WebKit::ChildProcess::processSuppressionEnabled): 4653 (WebKit::ChildProcess::incrementActiveTaskCount): 4654 (WebKit::ChildProcess::decrementActiveTaskCount): 4655 * Shared/mac/ChildProcessMac.mm: 4656 (WebKit): 4657 (WebKit::ChildProcess::setProcessSuppressionEnabledInternal): 4658 (WebKit::ChildProcess::setProcessSuppressionEnabled): 4659 (WebKit::ChildProcess::incrementActiveTaskCount): 4660 (WebKit::ChildProcess::decrementActiveTaskCount): 4661 (WebKit::ChildProcess::suspensionHysteresisTimerFired): 4662 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 4663 (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): 4664 (WebKit::NPRuntimeObjectMap::evaluate): 4665 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 4666 (WebCore): 4667 (NPRuntimeObjectMap): 4668 * WebProcess/Plugins/PluginView.cpp: 4669 (WebKit::PluginView::PluginView): 4670 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 4671 (WebKit::WebChromeClient::incrementActivePageCount): 4672 (WebKit): 4673 (WebKit::WebChromeClient::decrementActivePageCount): 4674 * WebProcess/WebCoreSupport/WebChromeClient.h: 4675 (WebChromeClient): 4676 46772013-05-29 Anders Carlsson <andersca@apple.com> 4678 4679 Return earlier if there's no session storage namespace 4680 https://bugs.webkit.org/show_bug.cgi?id=116984 4681 <rdar://problem/13976781> 4682 4683 Reviewed by Tim Horton. 4684 4685 If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection 4686 hash map since then we'll crash trying to remove it later. 4687 4688 * UIProcess/Storage/StorageManager.cpp: 4689 (WebKit::StorageManager::createSessionStorageMap): 4690 46912013-05-29 Martin Robinson <mrobinson@igalia.com> 4692 4693 Fix more CMake GTK+ build issues after r150336 4694 4695 * CMakeLists.txt: We need to allow for setting the WebProcess output name, since 4696 WebKitGTK+ expects it to be called WebKitWebProcess. 4697 * PlatformGTK.cmake: No longer set WebProcess_EXECUTABLE_NAME as it's been replaced 4698 by WebKit2_WebProcess_OUTPUT_NAME. 4699 47002013-05-29 Marcelo Lira <marcelo.lira@openbossa.org> 4701 4702 [WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn't do what it says 4703 https://bugs.webkit.org/show_bug.cgi?id=116683 4704 4705 Reviewed by Noam Rosenthal. 4706 4707 WKViewUserViewportToContents now converts WebView coordinates to 4708 page contents coordinates, taking into account factors as content 4709 scale and scroll, and also device scale. 4710 4711 The function WKViewUserViewportToScene was added to convert WebView 4712 coordinates to the coordinates of the canvas/scene where the view 4713 is drawn, and EwkView was fixed to use it, instead of 4714 WKViewUserViewportToContents. 4715 4716 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: 4717 (WKViewUserViewportToScene): 4718 * UIProcess/API/C/CoordinatedGraphics/WKView.h: 4719 * UIProcess/API/efl/EwkView.cpp: 4720 (EwkView::createGLSurface): 4721 * UIProcess/CoordinatedGraphics/WebView.cpp: 4722 (WebKit::WebView::userViewportToContents): 4723 (WebKit): 4724 (WebKit::WebView::userViewportToScene): 4725 (WebKit::WebView::transformToScene): 4726 * UIProcess/CoordinatedGraphics/WebView.h: 4727 (WebView): 4728 47292013-05-29 Carlos Garcia Campos <cgarcia@igalia.com> 4730 4731 Unreviewed. Fix make distcheck. 4732 4733 * GNUmakefile.am: Add WebCoreLayerGtk2.a to DISTCLEANFILES. 4734 47352013-05-29 Seokju Kwon <seokju.kwon@gmail.com> 4736 4737 [GTK] Clean up WebKit2 GNUmakefile.am 4738 https://bugs.webkit.org/show_bug.cgi?id=116907 4739 4740 Reviewed by Martin Robinson. 4741 4742 Removed WebNotificationManagerProxy.messages.in after r150785. 4743 4744 * GNUmakefile.am: 4745 47462013-05-28 Alexey Proskuryakov <ap@apple.com> 4747 4748 Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled 4749 https://bugs.webkit.org/show_bug.cgi?id=116887 4750 <rdar://problem/12965959> 4751 4752 Reviewed by Darin Adler. 4753 4754 * Shared/cf/ArgumentCodersCF.cpp: 4755 (CoreIPC::encode): 4756 (CoreIPC::decode): 4757 Fix for the bug: use good shared WebCore code to manipulate CFURLs. Also, added 4758 a FIXME about empty URLs. 4759 4760 * Shared/API/c/cf/WKURLCF.cpp: (WKURLCreateWithCFURL): Fixed to not use 4761 CFURLGetString, as that could prevent loading certain resources, like ones with 4762 curly braces in resource specifiers. We want KURL normalization, not CFURL one. 4763 47642013-05-28 Tim Horton <timothy_horton@apple.com> 4765 4766 Rendering suppression extension tokens shouldn't be 0, should handle overflow 4767 https://bugs.webkit.org/show_bug.cgi?id=116886 4768 <rdar://problem/14004474> 4769 4770 Reviewed by Darin Adler. 4771 4772 Don't use invalid HashSet values as tokens, and ensure that 4773 we're not already using a token before returning it. 4774 4775 * WebProcess/WebPage/WebPage.cpp: 4776 (WebKit::WebPage::extendIncrementalRenderingSuppression): 4777 47782013-05-28 Lauro Neto <lauro.neto@openbossa.org> 4779 4780 [GTK] Connection issues in repeated WebProcess crash/reloads. 4781 https://bugs.webkit.org/show_bug.cgi?id=115880 4782 4783 Reviewed by Anders Carlsson. 4784 4785 When stressing the WebProcess creation/destruction, WebKitGTK can 4786 often run into socket issues like bad file descriptor errors or 4787 polling a socket indefinitely. 4788 4789 Currently WebKitGTK has three places where a socket can be 4790 closed. 4791 4792 - childFinishedFunction (in ProcessLauncherGtk.cpp) 4793 - Connection::platformInvalidate (in ConnectionUnix.cpp) 4794 - WorkQueue EventSource destruction (in WorkQueueGtk.cpp) 4795 4796 To avoid these race conditions, socket closing will be handled 4797 by the event source callback in WorkQueueGtk.cpp. 4798 4799 * Platform/CoreIPC/unix/ConnectionUnix.cpp: 4800 (CoreIPC::Connection::platformInvalidate): Do not close the socket 4801 when the connection is invalidated, the socket event source is 4802 unregistered in this method and the socket is closed when the 4803 GSocket associated to the event source is destroyed. 4804 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: 4805 (WebKit::ProcessLauncher::launchProcess): Do not monitor child 4806 process to close the connection on termination. This was needed in 4807 the past when we used DGRAM sockets, we currently use always 4808 connection oriented sockets, so that when the other end closes 4809 the connection we are notified and the connection is invalidated. 4810 48112013-05-28 Martin Robinson <mrobinson@igalia.com> 4812 4813 Fix GTK+ CMake build 4814 4815 * PlatformGTK.cmake: After r150336, the name of the WebKit2 4816 library target is simply "WebKit2." 4817 48182013-05-28 Marcelo Lira <marcelo.lira@openbossa.org> 4819 4820 [WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes 4821 https://bugs.webkit.org/show_bug.cgi?id=116845 4822 4823 Reviewed by Noam Rosenthal. 4824 4825 * UIProcess/CoordinatedGraphics/WebView.cpp: 4826 (WebKit::WebView::didChangeContentsSize): 4827 48282013-05-28 Noam Rosenthal <noam@webkit.org> 4829 4830 [Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode 4831 https://bugs.webkit.org/show_bug.cgi?id=116597 4832 4833 ScrollingCoordinatorCoordinatedGraphics is tailored specifically for 4834 fixedLayout mode. When fixedLayout is not set, it should be turned off. 4835 4836 Reviewed by Allan Sandfeld Jensen. 4837 4838 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 4839 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 4840 48412013-05-28 Andreas Kling <akling@apple.com> 4842 4843 Document::setFocusedNode() should be setFocusedElement(). 4844 <http://webkit.org/b/116857> 4845 4846 Reviewed by Antti Koivisto. 4847 4848 * WebProcess/Plugins/PluginView.cpp: 4849 (WebKit::PluginView::focusPluginElement): 4850 * WebProcess/WebPage/WebPage.cpp: 4851 (WebKit::WebPage::focusedPluginViewForFrame): 4852 (WebKit::WebPage::setInitialFocus): 4853 48542013-05-28 Gyuyoung Kim <gyuyoung.kim@samsung.com> 4855 4856 [EFL][WK2] Clean up duplicated include files. 4857 https://bugs.webkit.org/show_bug.cgi?id=116851 4858 4859 Reviewed by Christophe Dumez. 4860 4861 Remove some of duplicated include file in ewk files. 4862 4863 * UIProcess/API/efl/EwkView.h: 4864 * UIProcess/API/efl/ewk_color_picker.cpp: 4865 * UIProcess/API/efl/ewk_context_menu.cpp: 4866 * UIProcess/API/efl/ewk_security_origin_private.h: 4867 48682013-05-28 Ryuan Choi <ryuan.choi@samsung.com> 4869 4870 [EFL] pc files should have harfbuzz dependency. 4871 https://bugs.webkit.org/show_bug.cgi?id=116852 4872 4873 Reviewed by Gyuyoung Kim. 4874 4875 * efl/ewebkit2.pc.in: Added harfbuzz as Required package. 4876 48772013-05-27 Gyuyoung Kim <gyuyoung.kim@samsung.com> 4878 4879 [EFL][WK2] Remove unneeded WebCore namespace use in ewk 4880 https://bugs.webkit.org/show_bug.cgi?id=116707 4881 4882 Reviewed by Christophe Dumez. 4883 4884 * UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore". 4885 * UIProcess/API/efl/ewk_text_checker.cpp: ditto. 4886 48872013-05-26 Jon Lee <jonlee@apple.com> 4888 4889 [WK2] Notifications clobber each other with multiple processes 4890 https://bugs.webkit.org/show_bug.cgi?id=116428 4891 <rdar://problem/13935191> 4892 4893 Reviewed by Darin Adler. 4894 4895 With multiple processes, the notification IDs, when passed up to the UI process, can clobber 4896 each other. To fix this, we need to maintain a global map of notification IDs. This map is 4897 keyed by its own unique notification ID, and maps to a pair containing the web page ID and that 4898 web page's ID for the notification. 4899 4900 Now that we maintain groups of notifications based on the web page, we no longer send IPC messages 4901 from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the 4902 WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver. 4903 4904 When a page closes, all of the web notifications are cleared out. However, by the time the 4905 WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since 4906 the WebPage is told to close from the UI process anyway, we clear out the notifications separately, 4907 instead of waiting for a message from the WebPage. 4908 4909 * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the 4910 notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message 4911 handlers as public functions, since they will be called from WebPageProxy. Add a new map that 4912 associates a global ID with a notification ID that came from a web page. 4913 There are now two flavors of clearNotifications(). One clears out all notifications associated 4914 with a web page. This is called when the page is closed. The other clears out a subset of 4915 notifications associated with a web page. This is called when notifications associated with a sub-frame 4916 is closed. 4917 * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from 4918 the web process go to WebPageProxy now. 4919 4920 * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the 4921 notification's web page. 4922 4923 (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification 4924 ID generator. 4925 (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a 4926 message receiver. Remove code that registers it as such. 4927 4928 (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID 4929 that came from the web process, and the global notification ID the proxy maintains. Add the mapping 4930 from the global ID to the (web page ID, notification ID) pair. 4931 (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page. 4932 (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration 4933 the web page. Fixes a leak where we did not remove the item from the maps. This function is called 4934 from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps 4935 before we pass the message along to the provider. 4936 4937 Helper functions that evaluate when a given notification in the map matches the desired parameters. 4938 (WebKit::pageIDsMatch): The notification is associated with the provided page. 4939 (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is 4940 contained within the list of provided notifications. 4941 4942 (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications 4943 associated with the provided web page, and could include a specific list of notifications. This latter 4944 situation occurs if notifications were associated with an iframe, and that iframe was removed. 4945 There is an O(n) walk that could be make more efficient using another hash map, but that's overhead 4946 for a map that should be small in size anyway. 4947 4948 (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into 4949 consideration the web page. 4950 (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into 4951 consideration the web page. 4952 (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through 4953 the list of global IDs and put them in buckets based on the notification's web pages. After that 4954 is done we can send the DidCloseNotifications() to those pages' processes. There is a possible 4955 extra optimization here where we group based on the page's process instead, to reduce the number 4956 of messages sent to processes. 4957 4958 * UIProcess/WebPageProxy.cpp: 4959 (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated 4960 with the page. 4961 (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy. 4962 (WebKit::WebPageProxy::clearNotifications): Ditto. 4963 (WebKit::WebPageProxy::didDestroyNotification): Ditto. 4964 * UIProcess/WebPageProxy.h: 4965 * UIProcess/WebPageProxy.messages.in: 4966 4967 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: 4968 * WebProcess/Notifications/WebNotificationManager.cpp: 4969 (WebKit::WebNotificationManager::cancel): 4970 (WebKit::WebNotificationManager::clearNotifications): 4971 (WebKit::WebNotificationManager::didDestroyNotification): 4972 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include. 4973 4974 * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files. 4975 * DerivedSources.pri: Ditto. 4976 * DerivedSources.make: Ditto. 4977 * GNUmakefile.list.am: Ditto. 4978 * WebKit2.xcodeproj/project.pbxproj: Ditto. 4979 49802013-05-27 Tim Horton <timothy_horton@apple.com> 4981 4982 Unreviewed build fix take 2. 4983 4984 * WebProcess/Plugins/PDF/PDFPlugin.mm: 4985 49862013-05-27 Tim Horton <timothy_horton@apple.com> 4987 4988 Unreviewed build fix. 4989 4990 * WebProcess/Plugins/PDF/PDFPlugin.mm: 4991 49922013-05-27 Tim Horton <timothy_horton@apple.com> 4993 4994 PDFPlugin: Main-frame PDFPlugin Accessibility 4995 https://bugs.webkit.org/show_bug.cgi?id=116563 4996 <rdar://problem/13458534> 4997 4998 Reviewed by Sam Weinig. 4999 5000 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: 5001 Forward-declare a variety of accessibility methods. 5002 5003 * WebProcess/Plugins/PDF/PDFPlugin.h: 5004 Add convertFromPDFViewToScreen, boundsOnScreen, accessibilityObject, and 5005 storage for our accessibility wrapper. 5006 * WebProcess/Plugins/PDF/PDFPlugin.mm: 5007 Add WKPDFPluginAccessibilityObject. 5008 5009 (-[WKPDFPluginAccessibilityObject accessibilityIsIgnored]): 5010 We want to be included in the accessibility tree. 5011 5012 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]): 5013 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]): 5014 Grab values for accessibility attributes from the relevant sources 5015 (mostly from PDFLayerController). 5016 5017 (-[WKPDFPluginAccessibilityObject readingModel]): Ditto. 5018 (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]): 5019 (-[WKPDFPluginAccessibilityObject accessibilityParameterizedAttributeNames]): 5020 (-[WKPDFPluginAccessibilityObject accessibilityActionNames]): 5021 Return the set of accessibility attributes, actions, and parameterized 5022 attributes that we support. 5023 5024 (-[WKPDFPluginAccessibilityObject accessibilityIsAttributeSettable:]): 5025 (-[WKPDFPluginAccessibilityObject accessibilitySetValue:forAttribute:]): 5026 Forward some other accessibility methods to PDFLayerController. 5027 5028 (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]): 5029 (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]): 5030 We have no children, so if a hit test makes it to us, it's ours. 5031 5032 (WebKit::PDFPlugin::PDFPlugin): 5033 Make a WKPDFPluginAccessibilityObject and hook it up. 5034 [FIXME: this could use some de-crapifying] 5035 5036 (WebKit::PDFPlugin::convertFromPluginToPDFView): 5037 Transform a point from plugin space to PDFLayerController space. 5038 5039 (WebKit::PDFPlugin::convertFromPDFViewToRootView): 5040 (WebKit::PDFPlugin::convertFromPDFViewToScreen): Added. 5041 (WebKit::PDFPlugin::boundsOnScreen): 5042 Return the PDFPlugin's frame in screen coordinates. 5043 5044 (WebKit::PDFPlugin::accessibilityObject): 5045 Return our accessibility wrapper. 5046 5047 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: 5048 * WebProcess/Plugins/Plugin.h: 5049 (WebKit::Plugin::accessibilityObject): 5050 * WebProcess/Plugins/PluginView.cpp: 5051 (WebKit::PluginView::accessibilityObject): 5052 * WebProcess/Plugins/PluginView.h: 5053 Add accessibilityObject(), to acquire accessibility wrappers from plugins. 5054 5055 * WebProcess/WebPage/WebPage.h: 5056 (WebPage): Add accessibilityObjectForMainFramePlugin(); 5057 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: 5058 (-[WKAccessibilityWebPageObject accessibilityRootObjectWrapper]): 5059 If the main frame has a PluginDocument that has an accessibilityObject, 5060 use that one instead of the WebPage's. 5061 5062 * WebProcess/WebPage/mac/WebPageMac.mm: 5063 (WebKit::WebPage::accessibilityObjectForMainFramePlugin): 5064 Return the accessibilityObject from the main-frame PluginDocument, if 5065 there is one. 5066 50672013-05-27 Marcelo Lira <marcelo.lira@openbossa.org> 5068 5069 [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize() 5070 https://bugs.webkit.org/show_bug.cgi?id=116688 5071 5072 Reviewed by Noam Rosenthal. 5073 5074 Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect() 5075 must be calculated including the page scale factor and avoid crossing the 5076 boundaries of the page contents size. In other words the DrawingArea 5077 must know the actual dimensions of what it being drawn. If the 5078 DrawingArea thinks the visible rectangle is bigger than it is, the 5079 contents will be drawn pixelated and blurry. 5080 5081 * UIProcess/CoordinatedGraphics/WebView.cpp: 5082 (WebKit::WebView::didChangeContentsSize): 5083 (WebKit::WebView::updateViewportSize): 5084 (WebKit::WebView::visibleContentsSize): 5085 (WebKit): 5086 * UIProcess/CoordinatedGraphics/WebView.h: 5087 (WebKit::WebView::contentsSize): 5088 (WebView): 5089 50902013-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 5091 5092 [GTK] WebKitWebView child widgets are not rendered with recent GTK+ 5093 https://bugs.webkit.org/show_bug.cgi?id=116794 5094 5095 Reviewed by Xan Lopez. 5096 5097 Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose 5098 events are not propagated to child GdkWindows anymore, and child 5099 widgets are rendered via gtk_container_propagate_draw(). Since all 5100 our children have its own GdkWindow (auth widget, inspector view 5101 and windowed plugins) we don't propagate the draw signal making 5102 them invisible with current GTK+. 5103 5104 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 5105 (webkitWebViewBaseDraw): Chain up to the parent draw(), so it's 5106 propagated to the children. This shouldn't have any effect in 5107 previous versions of GTK+ because gtk_container_propagate_draw() 5108 returned early when the child widget had its own GdkWindow. 5109 51102013-05-27 Xan Lopez <xlopez@igalia.com> 5111 5112 Reset all clients on WebPage close 5113 https://bugs.webkit.org/show_bug.cgi?id=112334 5114 5115 Reviewed by Anders Carlsson. 5116 5117 We do not reset the clients on WebPage::close(), so there's a 5118 small chance that someone will try to access them after that. This 5119 won't work and will generally cause runtime warnings, crashes or 5120 other issues. Reset them all to null to prevent this situation. 5121 5122 * WebProcess/WebPage/WebPage.cpp: 5123 (WebKit::WebPage::close): 5124 51252013-05-27 Manuel Rego Casasnovas <rego@igalia.com> 5126 5127 [GTK] Notify WebProcess in WebKitURISchemeRequest when we fail to read the user InputStream 5128 https://bugs.webkit.org/show_bug.cgi?id=114347 5129 5130 Reviewed by Carlos Garcia Campos. 5131 5132 While processing a WebKitURISchemeRequest if there is any error reading 5133 the InputStream provided by the user (for example the stream is already 5134 closed) we have to notify the WebProcess that the request has failed. 5135 5136 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: 5137 (webkitURISchemeRequestReadCallback): Get the error from 5138 g_input_stream_read_finish() and use it to call 5139 webkit_uri_scheme_request_finish_error() in order to finish the failing 5140 WebKitURISchemeRequest properly. 5141 * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: 5142 (testWebContextURIScheme): Modify test to check the new situation using 5143 an already closed InputStream. 5144 51452013-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 5146 5147 Unreviewed. Fix make distcheck. 5148 5149 * GNUmakefile.list.am: Add missing header file. 5150 51512013-05-26 Changhun Kang <temoochin@company100.net> 5152 5153 The public WK header file should not include WKAPICast.h 5154 https://bugs.webkit.org/show_bug.cgi?id=115230 5155 5156 Reviewed by Darin Adler. 5157 5158 Otherwise, WebKit internal headers are exposed. 5159 No new tests. No change in behavior. 5160 * UIProcess/API/C/soup/WKSoupRequestManager.h: 5161 * UIProcess/soup/WebSoupRequestManagerClient.h: 5162 51632013-05-26 Andreas Kling <akling@apple.com> 5164 5165 FocusController::setFocusedNode() should be setFocusedElement(). 5166 <http://webkit.org/b/116780> 5167 5168 Reviewed by Antti Koivisto. 5169 5170 * WebProcess/Plugins/PluginView.cpp: 5171 (WebKit::PluginView::focusPluginElement): 5172 51732013-05-25 Andreas Kling <akling@apple.com> 5174 5175 PluginDocument::pluginNode() should be pluginElement() instead. 5176 <http://webkit.org/b/116774> 5177 5178 Reviewed by Anders Carlsson. 5179 5180 * WebProcess/WebPage/WebPage.cpp: 5181 (WebKit::WebPage::focusedPluginViewForFrame): 5182 51832013-05-25 Simon Fraser <simon.fraser@apple.com> 5184 5185 Unprefix Page Visibility API 5186 https://bugs.webkit.org/show_bug.cgi?id=102340 5187 5188 Reviewed by Tim Horton. 5189 5190 Renaming of the "preview" state to "unloaded". 5191 5192 * Shared/API/c/WKPageVisibilityTypes.h: 5193 * Shared/API/c/WKSharedAPICast.h: 5194 (WebKit::toPageVisibilityState): 5195 51962013-05-25 Andreas Kling <akling@apple.com> 5197 5198 Move Node::isMouseFocusable() to Element. 5199 <http://webkit.org/b/116762> 5200 5201 Reviewed by Anders Carlsson. 5202 5203 * WebProcess/WebPage/WebPage.cpp: 5204 (WebKit::WebPage::highlightPotentialActivation): 5205 5206 Check that the potentially activated Node is an Element before asking if it's mouse-focusable. 5207 52082013-05-25 Andreas Kling <akling@apple.com> 5209 5210 REGRESSION: WebProcess is terminated when all Safari windows are closed. 5211 <rdar://problem/13990901> 5212 <http://webkit.org/b/116766> 5213 5214 Reviewed by Alexey Proskuryakov. 5215 5216 When closing the last page, only disconnect the web process if we're using a network process. 5217 Otherwise there might be session state in the web process getting lost. 5218 5219 * UIProcess/WebProcessProxy.cpp: 5220 (WebKit::WebProcessProxy::removeWebPage): 5221 52222013-05-25 Santosh Mahto <santosh.ma@samsung.com> 5223 5224 WebFrameProxy::didFailLoad clears frame title for no apparent reason 5225 https://bugs.webkit.org/show_bug.cgi?id=116655 5226 5227 Reviewed by Alexey Proskuryakov. 5228 5229 * UIProcess/WebFrameProxy.cpp: 5230 (WebKit::WebFrameProxy::didFailLoad): 5231 52322013-05-24 Seokju Kwon <seokju.kwon@gmail.com> 5233 5234 [Qt][GTK] Build fix after r150669 5235 https://bugs.webkit.org/show_bug.cgi?id=116751 5236 5237 Reviewed by Christophe Dumez. 5238 5239 * GNUmakefile.list.am: 5240 * Target.pri: 5241 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: 5242 (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): 5243 52442013-05-24 Seokju Kwon <seokju.kwon@gmail.com> 5245 5246 [EFL] Build fix after r150669 5247 https://bugs.webkit.org/show_bug.cgi?id=116750 5248 5249 Reviewed by Anders Carlsson. 5250 5251 * CMakeLists.txt: 5252 * WebProcess/Battery/WebBatteryManager.cpp: 5253 (WebKit::WebBatteryManager::registerWebPage): 5254 (WebKit::WebBatteryManager::unregisterWebPage): 5255 * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: 5256 (WebKit::WebNetworkInfoManager::registerWebPage): 5257 (WebKit::WebNetworkInfoManager::unregisterWebPage): 5258 (WebKit::WebNetworkInfoManager::bandwidth): 5259 (WebKit::WebNetworkInfoManager::metered): 5260 * WebProcess/WebCoreSupport/WebVibrationClient.cpp: 5261 (WebKit::WebVibrationClient::vibrate): 5262 (WebKit::WebVibrationClient::cancelVibration): 5263 * WebProcess/soup/WebSoupRequestManager.cpp: 5264 (WebKit::WebSoupRequestManager::didReceiveURIRequestData): 5265 (WebKit::WebSoupRequestManager::send): 5266 52672013-05-24 Anders Carlsson <andersca@apple.com> 5268 5269 MessageSender shouldn't be a class template 5270 https://bugs.webkit.org/show_bug.cgi?id=116743 5271 5272 Reviewed by Andreas Kling. 5273 5274 Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must 5275 implement messageSenderConnection() as well as messageSenderDestinationID(). 5276 5277 This reduces code size and will allow us to be more flexible with MessageSender in the future. 5278 5279 * NetworkProcess/NetworkResourceLoader.cpp: 5280 (WebKit::NetworkResourceLoader::sendAbortingOnFailure): 5281 (WebKit::NetworkResourceLoader::messageSenderConnection): 5282 (WebKit): 5283 (WebKit::NetworkResourceLoader::messageSenderDestinationID): 5284 * NetworkProcess/NetworkResourceLoader.h: 5285 (NetworkResourceLoader): 5286 * NetworkProcess/mac/DiskCacheMonitor.h: 5287 (DiskCacheMonitor): 5288 * NetworkProcess/mac/DiskCacheMonitor.mm: 5289 (WebKit::DiskCacheMonitor::messageSenderConnection): 5290 (WebKit::DiskCacheMonitor::messageSenderDestinationID): 5291 (WebKit): 5292 * Platform/CoreIPC/MessageSender.h: 5293 (CoreIPC): 5294 (MessageSender): 5295 (CoreIPC::MessageSender::send): 5296 (CoreIPC::MessageSender::sendSync): 5297 * Shared/ChildProcess.cpp: 5298 (WebKit::ChildProcess::messageSenderConnection): 5299 (WebKit): 5300 (WebKit::ChildProcess::messageSenderDestinationID): 5301 * Shared/ChildProcess.h: 5302 (ChildProcess): 5303 * Shared/Downloads/Download.cpp: 5304 (WebKit::Download::messageSenderConnection): 5305 (WebKit): 5306 (WebKit::Download::messageSenderDestinationID): 5307 * Shared/Downloads/Download.h: 5308 (Download): 5309 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 5310 (WebKit::CustomProtocolManager::initialize): 5311 * Shared/WebConnection.h: 5312 (WebConnection): 5313 * Shared/mac/SecItemShim.cpp: 5314 (WebKit::sendSecItemRequest): 5315 * UIProcess/WebConnectionToWebProcess.cpp: 5316 (WebKit::WebConnectionToWebProcess::hasValidConnection): 5317 (WebKit::WebConnectionToWebProcess::messageSenderConnection): 5318 (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): 5319 * UIProcess/WebConnectionToWebProcess.h: 5320 (WebConnectionToWebProcess): 5321 * WebKit2.xcodeproj/project.pbxproj: 5322 * WebProcess/Geolocation/WebGeolocationManager.cpp: 5323 (WebKit::WebGeolocationManager::registerWebPage): 5324 (WebKit::WebGeolocationManager::unregisterWebPage): 5325 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: 5326 (WebKit::WebIconDatabaseProxy::retainIconForPageURL): 5327 (WebKit::WebIconDatabaseProxy::releaseIconForPageURL): 5328 (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): 5329 (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): 5330 (WebKit::WebIconDatabaseProxy::setIconURLForPageURL): 5331 (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): 5332 * WebProcess/InjectedBundle/InjectedBundle.cpp: 5333 (WebKit::InjectedBundle::postMessage): 5334 (WebKit::InjectedBundle::postSynchronousMessage): 5335 * WebProcess/Network/WebResourceLoader.cpp: 5336 (WebKit::WebResourceLoader::messageSenderConnection): 5337 (WebKit::WebResourceLoader::messageSenderDestinationID): 5338 * WebProcess/Network/WebResourceLoader.h: 5339 (WebResourceLoader): 5340 * WebProcess/Notifications/WebNotificationManager.cpp: 5341 (WebKit::WebNotificationManager::show): 5342 (WebKit::WebNotificationManager::cancel): 5343 (WebKit::WebNotificationManager::clearNotifications): 5344 (WebKit::WebNotificationManager::didDestroyNotification): 5345 * WebProcess/Plugins/PDF/PDFPlugin.mm: 5346 (WebKit::PDFPlugin::writeItemsToPasteboard): 5347 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 5348 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 5349 * WebProcess/Storage/StorageAreaMap.cpp: 5350 (WebKit::StorageAreaMap::StorageAreaMap): 5351 (WebKit::StorageAreaMap::~StorageAreaMap): 5352 (WebKit::StorageAreaMap::setItem): 5353 (WebKit::StorageAreaMap::removeItem): 5354 (WebKit::StorageAreaMap::clear): 5355 (WebKit::StorageAreaMap::loadValuesIfNeeded): 5356 * WebProcess/WebConnectionToUIProcess.cpp: 5357 (WebKit::WebConnectionToUIProcess::hasValidConnection): 5358 (WebKit::WebConnectionToUIProcess::messageSenderConnection): 5359 (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): 5360 * WebProcess/WebConnectionToUIProcess.h: 5361 (WebConnectionToUIProcess): 5362 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 5363 (WebKit::WebChromeClient::windowRect): 5364 (WebKit::WebChromeClient::focusedFrameChanged): 5365 (WebKit::WebChromeClient::createWindow): 5366 (WebKit::WebChromeClient::toolbarsVisible): 5367 (WebKit::WebChromeClient::statusbarVisible): 5368 (WebKit::WebChromeClient::menubarVisible): 5369 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): 5370 (WebKit::WebChromeClient::runJavaScriptAlert): 5371 (WebKit::WebChromeClient::runJavaScriptConfirm): 5372 (WebKit::WebChromeClient::runJavaScriptPrompt): 5373 (WebKit::WebChromeClient::shouldInterruptJavaScript): 5374 (WebKit::WebChromeClient::exceededDatabaseQuota): 5375 * WebProcess/WebCoreSupport/WebColorChooser.cpp: 5376 (WebKit::WebColorChooser::WebColorChooser): 5377 (WebKit::WebColorChooser::setSelectedColor): 5378 (WebKit::WebColorChooser::endChooser): 5379 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 5380 (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): 5381 (WebKit::WebFrameLoaderClient::updateGlobalHistory): 5382 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): 5383 (WebKit::WebFrameLoaderClient::setTitle): 5384 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 5385 (WebKit::WebPlatformStrategies::populatePluginCache): 5386 (WebKit::WebPlatformStrategies::getTypes): 5387 (WebKit::WebPlatformStrategies::bufferForType): 5388 (WebKit::WebPlatformStrategies::getPathnamesForType): 5389 (WebKit::WebPlatformStrategies::stringForType): 5390 (WebKit::WebPlatformStrategies::copy): 5391 (WebKit::WebPlatformStrategies::changeCount): 5392 (WebKit::WebPlatformStrategies::uniqueName): 5393 (WebKit::WebPlatformStrategies::color): 5394 (WebKit::WebPlatformStrategies::url): 5395 (WebKit::WebPlatformStrategies::addTypes): 5396 (WebKit::WebPlatformStrategies::setTypes): 5397 (WebKit::WebPlatformStrategies::setBufferForType): 5398 (WebKit::WebPlatformStrategies::setPathnamesForType): 5399 (WebKit::WebPlatformStrategies::setStringForType): 5400 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: 5401 (WebKit::WebPopupMenu::show): 5402 (WebKit::WebPopupMenu::hide): 5403 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: 5404 (WebKit::WebSearchPopupMenu::saveRecentSearches): 5405 (WebKit::WebSearchPopupMenu::loadRecentSearches): 5406 * WebProcess/WebPage/EventDispatcher.cpp: 5407 (WebKit::EventDispatcher::sendDidReceiveEvent): 5408 * WebProcess/WebPage/WebBackForwardListProxy.cpp: 5409 (WebKit::updateBackForwardItem): 5410 (WebKit::WebBackForwardListProxy::itemAtIndex): 5411 (WebKit::WebBackForwardListProxy::backListCount): 5412 (WebKit::WebBackForwardListProxy::forwardListCount): 5413 * WebProcess/WebPage/WebInspector.cpp: 5414 (WebKit::WebInspector::createInspectorPage): 5415 (WebKit::WebInspector::didClose): 5416 (WebKit::WebInspector::bringToFront): 5417 (WebKit::WebInspector::inspectedURLChanged): 5418 (WebKit::WebInspector::save): 5419 (WebKit::WebInspector::append): 5420 (WebKit::WebInspector::attachBottom): 5421 (WebKit::WebInspector::attachRight): 5422 (WebKit::WebInspector::detach): 5423 (WebKit::WebInspector::setAttachedWindowHeight): 5424 (WebKit::WebInspector::setAttachedWindowWidth): 5425 (WebKit::WebInspector::setToolbarHeight): 5426 (WebKit::WebInspector::updateDockingAvailability): 5427 (WebKit::WebInspector::sendMessageToRemoteFrontend): 5428 * WebProcess/WebPage/WebPage.cpp: 5429 (WebKit::WebPage::messageSenderConnection): 5430 (WebKit): 5431 (WebKit::WebPage::messageSenderDestinationID): 5432 * WebProcess/WebPage/WebPage.h: 5433 (WebPage): 5434 * WebProcess/WebPage/mac/WebPageMac.mm: 5435 (WebKit::WebPage::executeKeypressCommandsInternal): 5436 (WebKit::WebPage::handleEditingKeyboardEvent): 5437 * WebProcess/WebProcess.cpp: 5438 (WebKit::WebProcess::ensureNetworkProcessConnection): 5439 (WebKit::WebProcess::shouldTerminate): 5440 54412013-05-24 Tim Horton <timothy_horton@apple.com> 5442 5443 Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting 5444 https://bugs.webkit.org/show_bug.cgi?id=116744 5445 <rdar://problem/13973514> 5446 5447 Reviewed by Simon Fraser. 5448 5449 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 5450 (WebKit::TiledCoreAnimationDrawingArea::resumePainting): 5451 Force WebCore to repaint animated images when painting is resumed. 5452 54532013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com> 5454 5455 Remove custom code for webkitAudioContext global constructor getter 5456 https://bugs.webkit.org/show_bug.cgi?id=116530 5457 5458 Reviewed by Geoffrey Garen. 5459 5460 Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support. 5461 5462 * WebProcess/InjectedBundle/InjectedBundle.cpp: 5463 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 5464 * WebProcess/WebPage/WebPage.cpp: 5465 (WebKit::WebPage::updatePreferences): 5466 54672013-05-24 Thomas Deniau <deniau@apple.com> 5468 5469 Add more lines to the context during Dictionary lookups 5470 https://bugs.webkit.org/show_bug.cgi?id=115256 5471 5472 Reviewed by Ryosuke Niwa. 5473 5474 * WebProcess/WebPage/mac/WebPageMac.mm: 5475 (WebKit::WebPage::performDictionaryLookupAtLocation): 5476 Instead of using the current paragraph as the context (which stops at 5477 line breaks), get a few lines before and after the point, so that the 5478 context contains at least four lines in each direction. 5479 This way the Dictionary will be able to look up things that extend past 5480 the current line. 5481 54822013-05-24 Anders Carlsson <andersca@apple.com> 5483 5484 Intermittent crash when typing in Address Bar 5485 https://bugs.webkit.org/show_bug.cgi?id=116728 5486 <rdar://problem/13976781> 5487 5488 Reviewed by Sam Weinig. 5489 5490 If a web process connection has been removed from the storage manager because we disconnected it 5491 since there were no more active pages associated with the web process, we'll fail to find it here 5492 so just return early instead of crashing. 5493 5494 * UIProcess/Storage/StorageManager.cpp: 5495 (WebKit::StorageManager::destroyStorageMap): 5496 54972013-05-24 Andreas Kling <akling@apple.com> 5498 5499 Typing in Safari's unified field causes unnecessary web content repaints. 5500 <http://webkit.org/b/116703> 5501 5502 Reviewed by Andy Estes. 5503 5504 * WebProcess/WebPage/FindController.cpp: 5505 (WebKit::FindController::countStringMatches): 5506 5507 Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string 5508 is found inside the page content, the renderer containing that text will no longer be repainted. 5509 55102013-05-23 Ryuan Choi <ryuan.choi@samsung.com> 5511 5512 [WK2][EFL][QT] Build break after r150610 5513 https://bugs.webkit.org/show_bug.cgi?id=116699 5514 5515 Reviewed by Csaba Osztrogonác. 5516 5517 * UIProcess/WebPageProxy.cpp: 5518 (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy. 5519 55202013-05-23 Anders Carlsson <andersca@apple.com> 5521 5522 Shim Flash plug-in to allow its updater to run 5523 https://bugs.webkit.org/show_bug.cgi?id=116692 5524 <rdar://problem/13938510> 5525 5526 Reviewed by Sam Weinig. 5527 5528 * PluginProcess/PluginProcess.h: 5529 * PluginProcess/mac/PluginProcessMac.mm: 5530 (WebKit::replacedNSConcreteTask_launch): 5531 (WebKit::initializeCocoaOverrides): 5532 Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess. 5533 5534 (WebKit::PluginProcess::launchProcess): 5535 Send a LaunchProcess message to the UI process. 5536 5537 * UIProcess/Plugins/PluginProcessProxy.cpp: 5538 * UIProcess/Plugins/PluginProcessProxy.h: 5539 Remove PluginProcessProxy::didReceiveMessage. 5540 5541 (PluginProcessProxy): 5542 * UIProcess/Plugins/PluginProcessProxy.messages.in: 5543 Add LaunchProcess message and remove LegacyReceiver attribute. 5544 5545 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 5546 (WebKit::isFlashUpdater): 5547 Helper function to determine whether the process is the flash updater. 5548 5549 (WebKit::shouldLaunchProcess): 5550 Return whether we should launch this process. 5551 5552 (WebKit::PluginProcessProxy::launchProcess): 5553 Determine if we should launch this process and then do so. 5554 55552013-05-23 Anders Carlsson <andersca@apple.com> 5556 5557 Don't run all plug-ins unsandboxed 5558 https://bugs.webkit.org/show_bug.cgi?id=116690 5559 <rdar://problem/13975569> 5560 5561 Reviewed by Jessie Berlin. 5562 5563 Remove debugging code. 5564 5565 * UIProcess/WebPageProxy.cpp: 5566 (WebKit::WebPageProxy::findPlugin): 5567 55682013-05-23 Anders Carlsson <andersca@apple.com> 5569 5570 Crash in convertMainResourceLoadToDownload when downloading file by option-return 5571 https://bugs.webkit.org/show_bug.cgi?id=116451 5572 5573 Reviewed by Andreas Kling. 5574 5575 If the main resource loader is null, create a new download instead since there's no existing loader to convert. 5576 5577 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 5578 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): 5579 * WebProcess/WebPage/WebFrame.cpp: 5580 (WebKit::WebFrame::convertMainResourceLoadToDownload): 5581 55822013-05-22 Alexey Proskuryakov <ap@apple.com> 5583 5584 <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding 5585 5586 Reviewed by Dan Bernstein. 5587 5588 * WebProcess/com.apple.WebProcess.sb.in: Allow this. 5589 55902013-05-23 Gavin Barraclough <barraclough@apple.com> 5591 5592 Move posix_spawn onto a zero delay timer 5593 https://bugs.webkit.org/show_bug.cgi?id=116682 5594 5595 Reviewed by Anders Carlson. 5596 5597 <rdar://problem/13973468> 5598 5599 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: 5600 (ReexecInfo): 5601 - struct to hold info from the XPC message. 5602 (WebKit::reexec): 5603 - moved call to posix_spawn out to this helper. 5604 (WebKit::reexecCallBack): 5605 - calls reexec. 5606 (WebKit::XPCServiceEventHandler): 5607 - removed call to posix_spawn; schedule a call to reexecCallBack. 5608 56092013-05-23 Csaba Osztrogonác <ossy@webkit.org> 5610 5611 [cmake] Fix generating-forwarding-headers rule after r150460 5612 https://bugs.webkit.org/show_bug.cgi?id=116659 5613 5614 Reviewed by Christophe Dumez. 5615 5616 * CMakeLists.txt: Typo fix. 5617 56182013-05-23 Anton Obzhirov <a.obzhirov@samsung.com> 5619 5620 [GTK] Remote Web Inspector sometimes won't serve any content 5621 https://bugs.webkit.org/show_bug.cgi?id=116225 5622 5623 Reviewed by Gustavo Noronha Silva. 5624 5625 Added an option to use environment variable to set up path to 5626 inspector server files. Implementation is similar to InspectorClientGtk 5627 implementation. 5628 5629 * UIProcess/InspectorServer/WebInspectorServer.h: 5630 (WebInspectorServer): 5631 * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: 5632 (WebKit::WebInspectorServer::platformResourceForPath): 5633 (WebKit::WebInspectorServer::inspectorServerFilesPath): 5634 (WebKit): 5635 56362013-05-23 Gyuyoung Kim <gyuyoung.kim@samsung.com> 5637 5638 [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get 5639 https://bugs.webkit.org/show_bug.cgi?id=116657 5640 5641 Reviewed by Christophe Dumez. 5642 5643 WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for 5644 ewk_view_pagination_mode_set|get. 5645 5646 Besides we don't need to use WebCore namespace anymore. 5647 5648 * UIProcess/API/efl/ewk_view.cpp: 5649 (ewk_view_pagination_mode_set): 5650 (ewk_view_pagination_mode_get): 5651 56522013-05-23 Roland Takacs <rtakacs@inf.u-szeged.hu> 5653 5654 Support frame instrumentation for coordinated graphics 5655 https://bugs.webkit.org/show_bug.cgi?id=115260 5656 5657 Reviewed by Andreas Kling. 5658 5659 Enabled supportsFrameInstrumentation on ports that use coordinated graphics 5660 by calling didBeginFrame(). 5661 5662 * WebProcess/WebCoreSupport/WebInspectorClient.cpp: 5663 (WebKit::WebInspectorClient::supportsFrameInstrumentation): 5664 (WebKit): 5665 * WebProcess/WebCoreSupport/WebInspectorClient.h: 5666 (WebInspectorClient): 5667 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 5668 (WebKit::CoordinatedLayerTreeHost::syncDisplayState): 5669 56702013-05-22 Dean Jackson <dino@apple.com> 5671 5672 Don't snapshot plugins that can't be snapshotted 5673 https://bugs.webkit.org/show_bug.cgi?id=116490 5674 5675 Reviewed by Tim Horton. 5676 5677 Some plugins, such as QuickTime, don't support snapshotting. We're 5678 planning on another way to capture snapshots, but in the meantime make 5679 sure that they don't fail to initialise because they were told to 5680 not use accelerated rendering. 5681 5682 Expose a new message on the plugins so that they can tell the PluginView 5683 if they support snapshotting or not. 5684 5685 * PluginProcess/PluginControllerProxy.cpp: 5686 (WebKit::PluginControllerProxy::supportsSnapshotting): New method. 5687 * PluginProcess/PluginControllerProxy.h: Ditto. 5688 * PluginProcess/PluginControllerProxy.messages.in: Message signature. 5689 5690 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting. 5691 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto. 5692 * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here. 5693 5694 * WebProcess/Plugins/PluginProxy.cpp: 5695 (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results. 5696 * WebProcess/Plugins/PluginProxy.h: 5697 5698 * WebProcess/Plugins/PluginView.cpp: 5699 (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make 5700 sure to add it to the tree. 5701 (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use 5702 accelerated compositing, just like normal plugins. 5703 (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting, 5704 immediately restart it. 5705 57062013-05-22 Anders Carlsson <andersca@apple.com> 5707 5708 Fix crash when closing a page that's trying to access session storage 5709 https://bugs.webkit.org/show_bug.cgi?id=116634 5710 <rdar://problem/13904054> 5711 5712 Reviewed by Geoffrey Garen. 5713 5714 It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process. 5715 If that happens, just ignore the messages. 5716 5717 * UIProcess/Storage/StorageManager.cpp: 5718 (WebKit::StorageManager::createSessionStorageMap): 5719 (WebKit::StorageManager::getValues): 5720 (WebKit::StorageManager::setItem): 5721 (WebKit::StorageManager::removeItem): 5722 (WebKit::StorageManager::clear): 5723 (WebKit::StorageManager::destroySessionStorageNamespaceInternal): 5724 57252013-05-22 Alexey Proskuryakov <ap@apple.com> 5726 5727 Crashes in NetworkProcess due to incorrect private browsing session tracking 5728 https://bugs.webkit.org/show_bug.cgi?id=116628 5729 5730 Reviewed by Brady Eidson. 5731 5732 The current API for private browsing makes it extremely difficult to track sessions. 5733 Private browsing is enabled via WKPreferences, but the session is shared, so it 5734 has to be maintained while there is any chance that any page group anywhere still 5735 needs it. 5736 5737 This patch fixes some of the issues, but ultimately, I think that we'll just need 5738 to deprecate and replace the API. 5739 5740 * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession): 5741 There are valid scenarios where privateBrowsingEnabled is true, but there is no 5742 private browsing session. Handle that without crashing, although this unfortunately 5743 means that it will be harder to spot logic errors when using a wrong session. 5744 (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME. 5745 5746 * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession() 5747 to return a pointer, as no caller could know when it was safe to call it. 5748 5749 * NetworkProcess/mac/RemoteNetworkingContext.mm: 5750 (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private 5751 browsing session is unexpectedly missing without crashing. 5752 (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer. 5753 5754 * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): 5755 Actually initialize privateBrowsingEnabled creation parameter. It would be very 5756 difficult to figure out 100% reliably whether NetworkProcess needs a private browsing 5757 session with the current API, but for existing clients, looking at 5758 m_privateBrowsingEnterCount is good enough. Certainly better than not initializing. 5759 5760 * WebProcess/InjectedBundle/InjectedBundle.cpp: 5761 (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME. 5762 57632013-05-22 Tim Horton <timothy_horton@apple.com> 5764 5765 [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout 5766 https://bugs.webkit.org/show_bug.cgi?id=116625 5767 <rdar://problem/13962816> 5768 5769 Reviewed by Anders Carlsson. 5770 5771 The two modes are not dependent; it should be possible to enable 5772 clips-to-exposed-rect without using autolayout. This enables apps to 5773 make very large tiled WKViews that don't create tiles for the whole 5774 area of the view (and also disables scrolling, since that is currently 5775 incompatible with clipping to the exposed rect). 5776 5777 * UIProcess/API/mac/WKView.mm: 5778 (-[WKView setFrameSize:]): 5779 (-[WKView _updateWindowAndViewFrames]): 5780 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 5781 (-[WKView enableFrameSizeUpdates]): 5782 (-[WKView forceAsyncDrawingAreaSizeUpdate:]): 5783 Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy. 5784 5785 (-[WKView setMinimumWidthForAutoLayout:]): 5786 Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect. 5787 5788 (-[WKView shouldClipToVisibleRect]): 5789 (-[WKView setShouldClipToVisibleRect:]): 5790 Allow setting clips-to-visible-rect without autolayout. 5791 5792 * UIProcess/API/mac/WKViewPrivate.h: 5793 Add shouldClipToVisibleRect property. 5794 57952013-05-22 Alexey Proskuryakov <ap@apple.com> 5796 5797 Remove unused private browsing override support 5798 <rdar://problem/11969491> 5799 5800 Rubber-stamped by Sam Weinig. 5801 5802 Private browsing override is unused, and it complicates tracking of private 5803 browsing sessions in UI process (in fact, it doesn't plug into this tracking at all, 5804 so we would just assert if we used the API). 5805 5806 * Shared/WebPageCreationParameters.cpp: 5807 (WebKit::WebPageCreationParameters::encode): 5808 (WebKit::WebPageCreationParameters::decode): 5809 * Shared/WebPageCreationParameters.h: 5810 * UIProcess/API/C/WKPage.cpp: 5811 * UIProcess/API/C/WKPagePrivate.h: 5812 * UIProcess/WebPageProxy.cpp: 5813 (WebKit::WebPageProxy::WebPageProxy): 5814 (WebKit::WebPageProxy::creationParameters): 5815 * UIProcess/WebPageProxy.h: 5816 * WebProcess/WebPage/WebPage.cpp: 5817 (WebKit::WebPage::WebPage): 5818 (WebKit::WebPage::updatePreferences): 5819 * WebProcess/WebPage/WebPage.h: 5820 * WebProcess/WebPage/WebPage.messages.in: 5821 58222013-05-22 Michał Pakuła vel Rutka <m.pakula@samsung.com> 5823 5824 [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer 5825 https://bugs.webkit.org/show_bug.cgi?id=116549 5826 5827 Reviewed by Christophe Dumez. 5828 5829 A context menu item should have only a pointer to parent menu instead 5830 of owning parent menu. 5831 5832 * UIProcess/API/efl/ewk_context_menu_item.cpp: 5833 (EwkContextMenuItem::EwkContextMenuItem): 5834 * UIProcess/API/efl/ewk_context_menu_item_private.h: 5835 (EwkContextMenuItem::create): 5836 (EwkContextMenuItem::parentMenu): 5837 (EwkContextMenuItem): 5838 58392013-05-22 Csaba Osztrogonác <ossy@webkit.org> 5840 5841 [Qt][WK2] Unreviewed buildfix after r150484. 5842 5843 * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: 5844 (WebKit::PluginProcessProxy::platformGetLaunchOptions): 5845 58462013-05-21 Andreas Kling <akling@apple.com> 5847 5848 REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess(). 5849 <http://webkit.org/b/116588> 5850 5851 Reviewed by Sam Weinig. 5852 5853 Do an early return from WebProcessProxy::requestTermination() if there is no child process 5854 connection to terminate. 5855 5856 * UIProcess/WebProcessProxy.cpp: 5857 (WebKit::WebProcessProxy::requestTermination): 5858 58592013-05-21 Mark Rowe <mrowe@apple.com> 5860 5861 <rdar://problem/13915556> Sluggish scrolling in web content 5862 5863 Reviewed by Gavin Barraclough. 5864 5865 * Shared/mac/ChildProcessMac.mm: 5866 (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important. 5867 58682013-05-21 Gyuyoung Kim <gyuyoung.kim@samsung.com> 5869 5870 Fix build break after r150484 5871 5872 Unreviewed, fix build break on EFL, GTK. 5873 5874 * UIProcess/Plugins/PluginInfoStore.cpp: 5875 (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin): 5876 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: 5877 (WebKit::PluginProcessProxy::platformGetLaunchOptions): 5878 58792013-05-21 Andreas Kling <akling@apple.com> 5880 5881 PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess. 5882 <http://webkit.org/b/116464> 5883 <rdar://problem/10103795> 5884 5885 Reviewed by Anders Carlsson. 5886 5887 Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes, 5888 just shut down the CoreIPC connection from the UI process. The web process, upon noticing this, 5889 will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down. 5890 5891 (WebKit::WebProcessProxy::removeWebPage): 5892 5893 When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off 5894 eventually, even if the WebPage::Close message never gets properly handled. 5895 5896 * Shared/ChildProcessProxy.h: 5897 * Shared/ChildProcessProxy.cpp: 5898 (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): 5899 5900 Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race 5901 where the exiting web process may get re-used for a new tab. 5902 5903 * UIProcess/WebProcessProxy.h: 5904 * UIProcess/WebProcessProxy.cpp: 5905 (WebKit::WebProcessProxy::WebProcessProxy): 5906 (WebKit::WebProcessProxy::enableSuddenTermination): 5907 (WebKit::WebProcessProxy::disableSuddenTermination): 5908 5909 Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in 5910 response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though. 5911 59122013-05-21 Anders Carlsson <andersca@apple.com> 5913 5914 Fix build. 5915 5916 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 5917 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 5918 Stop using lambdas :( 5919 59202013-05-21 Anders Carlsson <andersca@apple.com> 5921 5922 Provide an API to run sandboxed plug-ins outside of their sandbox 5923 https://bugs.webkit.org/show_bug.cgi?id=116578 5924 5925 Reviewed by Andreas Kling. 5926 5927 * Platform/CoreIPC/HandleMessage.h: 5928 (CoreIPC::callMemberFunction): 5929 Add new overload. 5930 5931 * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: 5932 (WebKit::PluginProcessMainDelegate::getExtraInitializationData): 5933 Handle "disable-sandbox". 5934 5935 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: 5936 (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData): 5937 Handle "disable-sandbox". 5938 5939 * PluginProcess/PluginProcess.h: 5940 Move Type to PluginProcessAttributes and remove hash traits for type. 5941 5942 * PluginProcess/mac/PluginProcessMac.mm: 5943 (WebKit::PluginProcess::platformInitializePluginProcess): 5944 Update for new type name. 5945 5946 (WebKit::PluginProcess::initializeSandbox): 5947 Return early if the sandbox is disabled. 5948 5949 * Shared/Plugins/Netscape/PluginInformation.cpp: 5950 (WebKit::getPluginModuleInformation): 5951 PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin. 5952 5953 * Shared/Plugins/PluginModuleInfo.h: 5954 Add PluginModuleLoadUnsandboxed. 5955 5956 * Shared/Plugins/PluginProcessAttributes.h: Added. 5957 Add new header with various plug-in process attributes. 5958 5959 * Shared/Plugins/PluginProcessCreationParameters.h: 5960 Change type enum. 5961 5962 * UIProcess/API/C/WKAPICast.h: 5963 (WebKit::toWKPluginLoadPolicy): 5964 (WebKit::toPluginModuleLoadPolicy): 5965 Handle the unsandboxed enum. 5966 5967 * UIProcess/API/C/WKPage.h: 5968 Add kWKPluginLoadPolicyLoadUnsandboxed. 5969 5970 * UIProcess/Plugins/PluginInfoStore.h: 5971 Rename policyForPlugin to defaultLoadPolicyForPlugin. 5972 5973 * UIProcess/Plugins/PluginProcessManager.cpp: 5974 (WebKit::PluginProcessManager::pluginProcessToken): 5975 Add new helper function for getting a token given plug-in attributes. 5976 5977 (WebKit::PluginProcessManager::getPluginProcessConnection): 5978 This now takes a pluginProcessToken. 5979 5980 (WebKit::PluginProcessManager::getSitesWithData): 5981 Make sure to call pluginProcessToken. 5982 5983 (WebKit::PluginProcessManager::clearSiteData): 5984 Ditto. 5985 5986 (WebKit::PluginProcessManager::getOrCreatePluginProcess): 5987 This now takes a token. 5988 5989 * UIProcess/Plugins/PluginProcessProxy.cpp: 5990 (WebKit::PluginProcessProxy::create): 5991 (WebKit::PluginProcessProxy::PluginProcessProxy): 5992 Pass the PluginProcessAttributes as well as the plug-in process token. 5993 5994 (WebKit::PluginProcessProxy::getLaunchOptions): 5995 Pass the plug-in process attributes to platformGetLaunchOptions. 5996 5997 (WebKit::PluginProcessProxy::didClose): 5998 Pass the token to PluginProcessCrashed. 5999 6000 (WebKit::PluginProcessProxy::didFinishLaunching): 6001 Update for type change. 6002 6003 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: 6004 (WebKit::shouldBlockPlugin): 6005 (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin): 6006 Rename policyForPlugin to defaultLoadPolicyForPlugin. 6007 6008 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 6009 (WebKit::PluginProcessProxy::platformGetLaunchOptions): 6010 Set the "disable-sandbox" data if needed. 6011 6012 (WebKit::PluginProcessProxy::platformInitializePluginProcess): 6013 (WebKit::PluginProcessProxy::openPluginPreferencePane): 6014 Get the module info from m_pluginProcessAttributes. 6015 6016 * UIProcess/WebPageProxy.cpp: 6017 (WebKit::WebPageProxy::findPlugin): 6018 This now returns a token. 6019 6020 * UIProcess/WebPageProxy.messages.in: 6021 FindPlugin now returns a token instead of the path. 6022 6023 * UIProcess/WebProcessProxy.cpp: 6024 (WebKit::WebProcessProxy::getPluginProcessConnection): 6025 Pass the token to the plug-in process manager. 6026 6027 * UIProcess/WebProcessProxy.messages.in: 6028 This now takes a token. 6029 6030 * WebKit2.xcodeproj/project.pbxproj: 6031 Add new files. 6032 6033 * WebProcess/Plugins/PluginProcessConnection.cpp: 6034 (WebKit::PluginProcessConnection::PluginProcessConnection): 6035 This now takes a token. 6036 6037 * WebProcess/Plugins/PluginProcessConnection.h: 6038 (WebKit::PluginProcessConnection::create): 6039 (WebKit::PluginProcessConnection::pluginProcessToken): 6040 Create this with a token instead of a path and process type. 6041 6042 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 6043 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 6044 This now takes a token. 6045 6046 (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): 6047 Ditto. 6048 6049 * WebProcess/Plugins/PluginProcessConnectionManager.messages.in: 6050 PluginProcessCrashed now takes a token. 6051 6052 * WebProcess/Plugins/PluginProxy.cpp: 6053 (WebKit::PluginProxy::create): 6054 (WebKit::PluginProxy::PluginProxy): 6055 These now take tokens. 6056 6057 (WebKit::PluginProxy::initialize): 6058 Pass the token when getting the connection. 6059 6060 * WebProcess/WebPage/WebPage.cpp: 6061 (WebKit::WebPage::createPlugin): 6062 Get the token from the UI process and pass it to the PluginProxy. 6063 6064 (WebKit::WebPage::canPluginHandleResponse): 6065 Update now that FindPlugin returns a token. 6066 60672013-05-21 Martin Robinson <mrobinson@igalia.com> 6068 6069 [GTK] [CMake] Add support for building WebKit2 6070 https://bugs.webkit.org/show_bug.cgi?id=116372 6071 6072 Reviewed by Gustavo Noronha Silva. 6073 6074 * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp 6075 from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header 6076 dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake 6077 installed header step. 6078 * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source 6079 list. Fix up forwarding header dependencies now. 6080 * PlatformGTK.cmake: Added. 6081 * config.h: First check whether this is a CMake build and then fall back to the autotools header. 6082 60832013-05-21 Zan Dobersek <zdobersek@igalia.com> 6084 6085 [GTK] Compile everything in C++11 mode 6086 https://bugs.webkit.org/show_bug.cgi?id=116452 6087 6088 Reviewed by Anders Carlsson. 6089 6090 * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified 6091 by default for all the C++ source code in SetupCompilerFlags.m4. 6092 60932013-05-21 Jessie Berlin <jberlin@apple.com> 6094 6095 Expose a way to know when forms are added to a page or when form controls are added to a form 6096 in the injected bundle 6097 https://bugs.webkit.org/show_bug.cgi?id=116334 6098 6099 Reviewed by Alexey Proskuryakov. 6100 6101 Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient. 6102 6103 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 6104 Add the new callbacks as part of version 2 of the WKBundlePageFormClient. 6105 6106 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: 6107 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls): 6108 Pass the message along to the client if the client has a handler. 6109 (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges): 6110 Ditto. 6111 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: 6112 6113 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 6114 (WebKit::WebChromeClient::didAssociateFormControls): 6115 Tell the injected bundle form client for the page. 6116 (WebKit::WebChromeClient::shouldNotifyOnFormChanges): 6117 Ditto. 6118 * WebProcess/WebCoreSupport/WebChromeClient.h: 6119 61202013-05-21 Michael Brüning <michael.bruning@digia.com> 6121 6122 [Qt][WK2] Fix Mountain Lion builds after r150277. 6123 https://bugs.webkit.org/show_bug.cgi?id=116467 6124 6125 Reviewed by Jocelyn Turcotte. 6126 6127 * Shared/API/c/WKBase.h: 6128 61292013-05-20 Lucas Forschler <lforschler@apple.com> 6130 6131 Rollout r150398. 6132 61332013-05-20 Zan Dobersek <zdobersek@igalia.com> 6134 6135 [GTK] Fix concatenations of string literals that are not C++11-compliant 6136 https://bugs.webkit.org/show_bug.cgi?id=116449 6137 6138 Reviewed by Martin Robinson. 6139 6140 Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This 6141 is simply a matter of separating the string and the string literal that are being concatenated with a space. 6142 6143 * UIProcess/API/gtk/tests/TestPrinting.cpp: 6144 (testPrintOperationPrint): 6145 * UIProcess/API/gtk/tests/WebExtensionTest.cpp: 6146 (methodCallCallback): 6147 61482013-05-20 Commit Queue <commit-queue@webkit.org> 6149 6150 Unreviewed, rolling out r150384. 6151 http://trac.webkit.org/changeset/150384 6152 https://bugs.webkit.org/show_bug.cgi?id=116513 6153 6154 Not ready for primetime. (Requested by kling on #webkit). 6155 6156 * UIProcess/WebProcessProxy.cpp: 6157 (WebKit::WebProcessProxy::WebProcessProxy): 6158 (WebKit::WebProcessProxy::removeWebPage): 6159 * UIProcess/WebProcessProxy.h: 6160 (WebProcessProxy): 6161 61622013-05-20 Martin Robinson <mrobinson@igalia.com> 6163 6164 Remove SharedMemoryGtk.cpp 6165 https://bugs.webkit.org/show_bug.cgi?id=116457 6166 6167 Reviewed by Andreas Kling. 6168 6169 * Platform/gtk/SharedMemoryGtk.cpp: Removed. 6170 61712013-05-20 Jessie Berlin <jberlin@apple.com> 6172 6173 Expose a way to know when forms are added to a page or when form controls are added to a form 6174 in the injected bundle 6175 https://bugs.webkit.org/show_bug.cgi?id=116334 6176 6177 Reviewed by Alexey Proskuryakov. 6178 6179 Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient. 6180 6181 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 6182 Add the new callbacks as part of version 2 of the WKBundlePageFormClient. 6183 6184 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: 6185 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls): 6186 Pass the message along to the client if the client has a handler. 6187 (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges): 6188 Ditto. 6189 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: 6190 6191 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 6192 (WebKit::WebChromeClient::didAssociateFormControls): 6193 Tell the injected bundle form client for the page. 6194 (WebKit::WebChromeClient::shouldNotifyOnFormChanges): 6195 Ditto. 6196 * WebProcess/WebCoreSupport/WebChromeClient.h: 6197 61982013-05-20 Tim Horton <timothy_horton@apple.com> 6199 6200 Clients should have a way to extend rendering suppression 6201 https://bugs.webkit.org/show_bug.cgi?id=116463 6202 <rdar://problem/13738496> 6203 6204 Reviewed by Andy Estes. 6205 6206 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 6207 (WKBundlePageExtendIncrementalRenderingSuppression): Added. 6208 (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added. 6209 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 6210 These only have any effect if SuppressesIncrementalRendering is also enabled. 6211 6212 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 6213 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 6214 Inform the FrameView if there are any outstanding rendering suppression tokens. 6215 6216 * WebProcess/WebPage/WebPage.cpp: 6217 (WebKit::WebPage::WebPage): 6218 (WebKit::WebPage::extendIncrementalRenderingSuppression): 6219 Return the next available rendering suppression token. 6220 Add it to the list of active tokens. 6221 Inform the FrameView that we want to suppress rendering. 6222 6223 (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): 6224 Remove the given token from the list of active tokens. 6225 Un-suppress rendering if appropriate. 6226 6227 * WebProcess/WebPage/WebPage.h: 6228 (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression): 6229 Return if there are any active rendering suppression tokens. 6230 62312013-05-20 Andreas Kling <akling@apple.com> 6232 6233 PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess. 6234 <http://webkit.org/b/116464> 6235 <rdar://problem/10103795> 6236 6237 Reviewed by Anders Carlsson. 6238 6239 Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it. 6240 This code only runs if there was something on the page (e.g an unload/beforeunload event handler) 6241 preventing the UI process from killing it right away. 6242 6243 * UIProcess/WebProcessProxy.cpp: 6244 (WebKit::WebProcessProxy::WebProcessProxy): 6245 (WebKit::WebProcessProxy::removeWebPage): 6246 (WebKit::WebProcessProxy::forcefulTerminationTimerFired): 6247 * UIProcess/WebProcessProxy.h: 6248 (WebProcessProxy): 6249 62502013-05-20 Anders Carlsson <andersca@apple.com> 6251 6252 Add helper function for converting a KeyedCodingValue to a CFTypeRef 6253 https://bugs.webkit.org/show_bug.cgi?id=116461 6254 6255 Reviewed by Tim Horton. 6256 6257 * Shared/cf/KeyedCodingValueCF.cpp: Added. 6258 * Shared/cf/KeyedCodingValueCF.h: Added. 6259 6260 * WebKit2.xcodeproj/project.pbxproj: 6261 62622013-05-20 Anders Carlsson <andersca@apple.com> 6263 6264 Begin stubbing out a new KeyedEncoder class 6265 https://bugs.webkit.org/show_bug.cgi?id=116456 6266 6267 Reviewed by Sam Weinig. 6268 6269 This class (and it's coming counterpart, KeyedDecoder) will be used for serializing 6270 object graphs to a tree-like structure of dictionaries. It is up to individual ports to 6271 serialize them further (for example, on Mac they could be serialized to CFPropertyList objects). 6272 6273 This will be used for serializing session storage state but I hope that it can be used for serializing 6274 back forward state in the future as our current implementation of back forward state serialization 6275 is fragile and depends on our IPC layer's binary encoding(!). 6276 6277 * Shared/KeyedCodingValue.h: Added. 6278 * Shared/KeyedEncoder.cpp: Added. 6279 * Shared/KeyedEncoder.h: Added. 6280 6281 * WebKit2.xcodeproj/project.pbxproj: 6282 62832013-05-19 Sam Weinig <sam@webkit.org> 6284 6285 Bump WKBundlePageLoaderClient version number so as not to break some clients 6286 https://bugs.webkit.org/show_bug.cgi?id=116426 6287 6288 Reviewed by Anders Carlsson. 6289 6290 * Shared/APIClientTraits.cpp: 6291 (WebKit): 6292 * Shared/APIClientTraits.h: 6293 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 6294 62952013-05-19 Anders Carlsson <andersca@apple.com> 6296 6297 Remove link prerendering code 6298 https://bugs.webkit.org/show_bug.cgi?id=116415 6299 6300 Reviewed by Darin Adler. 6301 6302 This code was only used by Chromium and is dead now. 6303 6304 * Configurations/FeatureDefines.xcconfig: 6305 63062013-05-18 Anders Carlsson <andersca@apple.com> 6307 6308 Simplify the StorageArea setter functions 6309 https://bugs.webkit.org/show_bug.cgi?id=116402 6310 6311 Reviewed by Sam Weinig. 6312 6313 Remove security checking code that lives in Storage now. 6314 6315 * WebProcess/Storage/StorageAreaImpl.cpp: 6316 (WebKit::StorageAreaImpl::setItem): 6317 (WebKit::StorageAreaImpl::removeItem): 6318 (WebKit::StorageAreaImpl::clear): 6319 * WebProcess/Storage/StorageAreaImpl.h: 6320 63212013-05-18 Sam Weinig <sam@webkit.org> 6322 6323 Fix some builds. 6324 6325 * UIProcess/API/mac/WKTypeRefWrapper.mm: 6326 63272013-05-18 Carlos Garcia Campos <cgarcia@igalia.com> 6328 6329 REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled 6330 https://bugs.webkit.org/show_bug.cgi?id=116389 6331 6332 Reviewed by Martin Robinson. 6333 6334 There's no longer WebKeyValueStorageManager in the web process 6335 after r150305. 6336 6337 * WebProcess/WebPage/WebPageGroupProxy.cpp: 6338 (WebKit::WebPageGroupProxy::WebPageGroupProxy): 6339 63402013-05-17 Sam Weinig <sam@webkit.org> 6341 6342 Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages 6343 https://bugs.webkit.org/show_bug.cgi?id=116345 6344 6345 Reviewed by Anders Carlsson. 6346 6347 In order to efficiently send a WKImageRef to another process when using the 6348 Objective-C WKConnection (or other user data messages), we need a way to encode 6349 WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper. 6350 6351 * Shared/mac/ObjCObjectGraphCoders.mm: 6352 (WebKit::typeFromObject): 6353 (WebKit::WebContextObjCObjectGraphEncoderImpl::encode): 6354 (WebKit::WebContextObjCObjectGraphDecoderImpl::decode): 6355 (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode): 6356 (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode): 6357 * UIProcess/API/mac/WKTypeRefWrapper.h: Added. 6358 * UIProcess/API/mac/WKTypeRefWrapper.mm: Added. 6359 (-[WKTypeRefWrapper initWithObject:]): 6360 (-[WKTypeRefWrapper object]): 6361 * WebKit2.xcodeproj/project.pbxproj: 6362 63632013-05-18 Anders Carlsson <andersca@apple.com> 6364 6365 Simplify StorageArea getter functions 6366 https://bugs.webkit.org/show_bug.cgi?id=116399 6367 6368 Reviewed by Sam Weinig. 6369 6370 Remove security and private browsing checks. 6371 6372 * WebProcess/Storage/StorageAreaImpl.cpp: 6373 (WebKit::StorageAreaImpl::key): 6374 (WebKit::StorageAreaImpl::item): 6375 (WebKit::StorageAreaImpl::contains): 6376 * WebProcess/Storage/StorageAreaImpl.h: 6377 63782013-05-18 Patrick Gansterer <paroga@webkit.org> 6379 6380 [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME 6381 https://bugs.webkit.org/show_bug.cgi?id=114554 6382 6383 Reviewed by Gyuyoung Kim. 6384 6385 Using variables as target names is very uncommon in CMake. 6386 The usual way to specify the name of the resulting binary 6387 is to set the OUTPUT_NAME target property. 6388 6389 * CMakeLists.txt: 6390 * PlatformEfl.cmake: 6391 * efl/ewebkit2.pc.in: 6392 63932013-05-18 Carlos Garcia Campos <cgarcia@igalia.com> 6394 6395 [GTK] Move GTK port off legacy clipboard 6396 https://bugs.webkit.org/show_bug.cgi?id=116221 6397 6398 Reviewed by Martin Robinson. 6399 6400 * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h 6401 include. 6402 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: 6403 (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the 6404 Pasteboard associated to the given Clipboard. 6405 64062013-05-18 Jinwoo Song <jinwoo7.song@samsung.com> 6407 6408 [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API 6409 https://bugs.webkit.org/show_bug.cgi?id=116386 6410 6411 Reviewed by Christophe Dumez. 6412 6413 Refactor the API to handle 'const char*' parameter in right way and 6414 enable the unit test which was disabled in r136230 as there is no assertion now. 6415 6416 * UIProcess/API/efl/EwkView.cpp: 6417 (EwkView::setCustomTextEncodingName): 6418 * UIProcess/API/efl/EwkView.h: 6419 (EwkView::customTextEncodingName): 6420 (EwkView): 6421 * UIProcess/API/efl/ewk_view.cpp: 6422 (ewk_view_custom_encoding_set): 6423 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 6424 (TEST_F): 6425 64262013-05-18 Csaba Osztrogonác <ossy@webkit.org> 6427 6428 [CMake] Unreviewed speculative build fix after r150305 and r150306. 6429 6430 * CMakeLists.txt: 6431 64322013-05-18 Csaba Osztrogonác <ossy@webkit.org> 6433 6434 [Qt][WK2] Unreviewed build fix after r150305 and r150306. 6435 6436 * DerivedSources.pri: 6437 * Target.pri: 6438 64392013-05-18 Zan Dobersek <zdobersek@igalia.com> 6440 6441 Unreviewed build fix for the GTK port after r150305 and r150306. 6442 6443 * GNUmakefile.list.am: 6444 64452013-05-17 Alexey Proskuryakov <ap@apple.com> 6446 6447 <rdar://problem/13819878> Disable SharedWorker when in multiple web process model 6448 https://bugs.webkit.org/show_bug.cgi?id=116359 6449 6450 The condition was accidentally negated, fixing. 6451 6452 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 6453 (WebKit::WebPlatformStrategies::isAvailable): 6454 64552013-05-17 Gavin Barraclough <barraclough@apple.com> 6456 6457 Only allow 1 WebProcess to hold a PageCache 6458 https://bugs.webkit.org/show_bug.cgi?id=116368 6459 <rdar://problem/13392600> 6460 6461 Reviewed by Geoff Garen & Anders Carlson. 6462 6463 * UIProcess/WebContext.cpp: 6464 (WebKit::WebContext::WebContext): 6465 (WebKit::WebContext::processDidSaveToPageCache): 6466 (WebKit): 6467 (WebKit::WebContext::disconnectProcess): 6468 * UIProcess/WebContext.h: 6469 - Added m_processWithPageCache, only allow one process to keep a PageCache. 6470 (WebContext): 6471 * UIProcess/WebPageProxy.cpp: 6472 (WebKit::WebPageProxy::didSaveToPageCache): 6473 (WebKit): 6474 * UIProcess/WebPageProxy.h: 6475 (WebPageProxy): 6476 * UIProcess/WebPageProxy.messages.in: 6477 - Forward didSaveToPageCache to the WebProcessProxy. 6478 * UIProcess/WebProcessProxy.cpp: 6479 (WebKit::WebProcessProxy::addBackForwardItem): 6480 (WebKit::WebProcessProxy::didSaveToPageCache): 6481 (WebKit): 6482 (WebKit::WebProcessProxy::releasePageCache): 6483 - Forward releasePageCache to the WebProcess. 6484 - Forward didSaveToPageCache to the WebContext. 6485 * UIProcess/WebProcessProxy.h: 6486 (WebProcessProxy): 6487 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 6488 (WebKit::WebFrameLoaderClient::didSaveToPageCache): 6489 - Forward didSaveToPageCache to the WebPageProxy. 6490 * WebProcess/WebProcess.cpp: 6491 (WebKit::WebProcess::releasePageCache): 6492 (WebKit): 6493 * WebProcess/WebProcess.h: 6494 (WebProcess): 6495 * WebProcess/WebProcess.messages.in: 6496 - Added 'ReleasePageCache' to instruct a web process to drop any cached pages. 6497 64982013-05-17 Anders Carlsson <andersca@apple.com> 6499 6500 Share code between WebKit1 and WebKit2 StorageArea subclasses 6501 https://bugs.webkit.org/show_bug.cgi?id=116367 6502 6503 Reviewed by Andreas Kling. 6504 6505 * WebProcess/Storage/StorageAreaImpl.cpp: 6506 (WebKit::StorageAreaImpl::length): 6507 Remove code that's now in Storage::length. 6508 6509 (WebKit::StorageAreaImpl::storageType): 6510 Make this a virtual member function. 6511 6512 * WebProcess/Storage/StorageAreaImpl.h: 6513 65142013-05-17 Alexey Proskuryakov <ap@apple.com> 6515 6516 <rdar://problem/13819878> Disable SharedWorker when in multiple web process model 6517 https://bugs.webkit.org/show_bug.cgi?id=116359 6518 6519 Reviewed by Anders Carlsson. 6520 6521 Implement SharedWorkerStrategy::isAvailable. 6522 6523 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 6524 (WebKit::WebPlatformStrategies::isAvailable): 6525 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 6526 65272013-05-17 Beth Dakin <bdakin@apple.com> 6528 6529 Headers and footers will sometimes disappear and re-appear during page loads 6530 https://bugs.webkit.org/show_bug.cgi?id=116336 6531 -and corresponding- 6532 <rdar://problem/13886753> 6533 6534 Reviewed by Simon Fraser. 6535 6536 This patch changes the WebCore-level API that WebKit uses to create a banner. 6537 Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 6538 and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 6539 layer has been created, it will call back into WK2 via ChromeClient. This will 6540 allow WebCore to re-create the header/footer layers as needed whenever the 6541 FrameView/RenderLayerCompositor have been destroyed and recreated. 6542 6543 Send the layers over to PageBanner. 6544 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 6545 (WebKit::WebChromeClient::didAddHeaderLayer): 6546 (WebKit::WebChromeClient::didAddFooterLayer): 6547 * WebProcess/WebCoreSupport/WebChromeClient.h: 6548 (WebChromeClient): 6549 6550 PageBanner::addToPage() now does much less work since it can’t get the parent 6551 layer right away. The work that is used to do once it had the parent layer is now 6552 performed in didAddParentLayer() 6553 * WebProcess/WebPage/PageBanner.cpp: 6554 (WebKit::PageBanner::didAddParentLayer): 6555 * WebProcess/WebPage/PageBanner.h: 6556 * WebProcess/WebPage/mac/PageBannerMac.mm: 6557 (WebKit::PageBanner::addToPage): 6558 (WebKit::PageBanner::didAddParentLayer): 6559 65602013-05-17 Anders Carlsson <andersca@apple.com> 6561 6562 Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager 6563 https://bugs.webkit.org/show_bug.cgi?id=116361 6564 6565 Reviewed by Andreas Kling. 6566 6567 There's nothing proxy about this class anymore! 6568 6569 * UIProcess/API/C/WKAPICast.h: 6570 * UIProcess/API/C/WKContext.cpp: 6571 * UIProcess/API/C/WKKeyValueStorageManager.cpp: 6572 * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp. 6573 * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h. 6574 * WebKit2.xcodeproj/project.pbxproj: 6575 65762013-05-17 Anders Carlsson <andersca@apple.com> 6577 6578 Remove dead local storage code 6579 https://bugs.webkit.org/show_bug.cgi?id=116360 6580 6581 Reviewed by Beth Dakin. 6582 6583 Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process. 6584 6585 * DerivedSources.make: 6586 * UIProcess/WebKeyValueStorageManagerProxy.cpp: 6587 (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy): 6588 (WebKit): 6589 (WebKit::didGetKeyValueStorageOrigins): 6590 (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins): 6591 * UIProcess/WebKeyValueStorageManagerProxy.h: 6592 (WebKeyValueStorageManagerProxy): 6593 * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed. 6594 * WebKit2.xcodeproj/project.pbxproj: 6595 * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed. 6596 * WebProcess/Storage/WebKeyValueStorageManager.h: Removed. 6597 * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed. 6598 * WebProcess/WebPage/WebPage.cpp: 6599 (WebKit::WebPage::updatePreferences): 6600 * WebProcess/WebProcess.cpp: 6601 (WebKit::WebProcess::WebProcess): 6602 66032013-05-17 Anders Carlsson <andersca@apple.com> 6604 6605 Use the UI process storage manager for deleting local storage data 6606 https://bugs.webkit.org/show_bug.cgi?id=116358 6607 <rdar://problem/13852829> 6608 6609 Reviewed by Andreas Kling. 6610 6611 * Shared/WebSecurityOrigin.h: 6612 (WebKit::WebSecurityOrigin::protocol): 6613 (WebKit::WebSecurityOrigin::host): 6614 (WebKit::WebSecurityOrigin::databaseIdentifier): 6615 (WebKit::WebSecurityOrigin::toString): 6616 Remove unneeded consts. 6617 6618 (WebKit::WebSecurityOrigin::securityOrigin): 6619 Add getter. 6620 6621 * UIProcess/Storage/LocalStorageDatabase.cpp: 6622 (WebKit::LocalStorageDatabase::close): 6623 deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin. 6624 6625 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 6626 (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin): 6627 Rename since this is no longer used only for empty databases. 6628 6629 (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases): 6630 Loop over the tracker database and delete all database files. 6631 6632 * UIProcess/Storage/StorageManager.cpp: 6633 (WebKit::StorageManager::StorageArea::clear): 6634 Clear the map, close the database and tell all event listeners to reset their caches. 6635 6636 (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin): 6637 Loop over all storage areas and call clear on those matching the security origin. 6638 6639 (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas): 6640 Loop over all storage areas and call clear on them. 6641 6642 (WebKit::StorageManager::deleteEntriesForOrigin): 6643 Dispatch deleteEntriesForOriginInternal on the work queue. 6644 6645 (WebKit::StorageManager::deleteAllEntries): 6646 Dispatch deleteAllEntriesInternal on the work queue. 6647 6648 (WebKit::StorageManager::deleteEntriesForOriginInternal): 6649 Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database. 6650 6651 (WebKit::StorageManager::deleteAllEntriesInternal): 6652 Call clearAllStorageAreas on all local storage namespaces and then delete all databases. 6653 6654 * UIProcess/WebKeyValueStorageManagerProxy.cpp: 6655 (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin): 6656 Call out to the storage manager. 6657 6658 (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries): 6659 Ditto. 6660 6661 * WebProcess/Storage/StorageAreaMap.cpp: 6662 (WebKit::StorageAreaMap::clearCache): 6663 Call resetValues which will null out the storage map. 6664 6665 * WebProcess/Storage/StorageAreaMap.messages.in: 6666 Add ClearCache message. 6667 66682013-05-17 Anders Carlsson <andersca@apple.com> 6669 6670 Only import local storage items from the database once 6671 https://bugs.webkit.org/show_bug.cgi?id=116354 6672 6673 Reviewed by Andreas Kling. 6674 6675 We import items from the database over and over, when we only want to do it once. Use a 6676 boolean flag to guard against doing it more than once. 6677 6678 Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now 6679 also opens the database (even if it doesn't need to import anything). This is preparation for an 6680 upcoming patch where the database will be closed when it's cleared. 6681 6682 * UIProcess/Storage/StorageManager.cpp: 6683 (StorageManager::StorageArea): 6684 (WebKit::StorageManager::StorageArea::StorageArea): 6685 (WebKit::StorageManager::StorageArea::setItem): 6686 (WebKit::StorageManager::StorageArea::removeItem): 6687 (WebKit::StorageManager::StorageArea::clear): 6688 (WebKit::StorageManager::StorageArea::items): 6689 (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded): 6690 66912013-05-17 Alexey Proskuryakov <ap@apple.com> 6692 6693 <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID. 6694 6695 Reviewed by Anders Carlsson. 6696 6697 * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories. 6698 66992013-05-17 Anders Carlsson <andersca@apple.com> 6700 6701 WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process 6702 https://bugs.webkit.org/show_bug.cgi?id=116346 6703 <rdar://problem/13852829> 6704 6705 Reviewed by Andreas Kling. 6706 6707 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 6708 (WebKit::LocalStorageDatabaseTracker::origins): 6709 New helper function to return all the tracked origins. 6710 6711 * UIProcess/Storage/StorageManager.cpp: 6712 (WebKit::StorageManager::StorageManager): 6713 Initialize the UTF-8 encoding. 6714 6715 (WebKit::StorageManager::getOrigins): 6716 Call getOriginsInternal on our queue. 6717 6718 (WebKit::callCallbackFunction): 6719 Helper function for calling the callback function. 6720 6721 (WebKit::StorageManager::getOriginsInternal): 6722 Get the origins and make sure we call the callback with the given function dispatcher. 6723 6724 * UIProcess/WebKeyValueStorageManagerProxy.cpp: 6725 (WebKit::didGetKeyValueStorageOriginsCallback): 6726 Construct the array of WebSecurityOrigin objects and call the callback. 6727 6728 (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins): 6729 Call StorageManager::getOrigins. 6730 67312013-05-16 Alexey Proskuryakov <ap@apple.com> 6732 6733 Text input is largely broken when there are subframes loading 6734 http://bugs.webkit.org/show_bug.cgi?id=59121 6735 <rdar://problem/9320468> 6736 6737 Reviewed by Darin Adler. 6738 6739 * UIProcess/PageClient.h: 6740 * UIProcess/API/mac/PageClientImpl.h: 6741 * UIProcess/API/mac/PageClientImpl.mm: 6742 (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state 6743 updating into a separate function. Removed updateTextInputState, we don't need 6744 to go through PageClient to implement its behavior at all. 6745 (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME. 6746 6747 * UIProcess/API/mac/WKView.mm: 6748 * UIProcess/API/mac/WKViewInternal.h: 6749 Removed _updateTextInputStateIncludingSecureInputState. 6750 6751 * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps 6752 to figure out that WebCore decided to close a composition. The issue is that WebCore 6753 would first send an EditorState with hasComposition set to false, and with 6754 shouldIgnoreCompositionSelectionChange set to true, at which time we forget the 6755 previous m_editorState, but can't make any decisions based on this transient state. 6756 We should find a way to simplify this (maybe not send these updates with 6757 shouldIgnoreCompositionSelectionChange at all?) 6758 6759 * UIProcess/WebPageProxy.cpp: 6760 (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition. 6761 (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition 6762 when any frame commits a load, which made no sense (along with surrounding code, 6763 which will unfortunately survive longer). 6764 (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here, 6765 we don't need to go to WKView.mm to implement this logic. Figure out when WebCore 6766 discards a composition, and notify input methods about this. 6767 (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition. 6768 Added some FIXMEs. 6769 67702013-05-17 Manuel Rego Casasnovas <rego@igalia.com> 6771 6772 [WK2] Add support for selectTrailingWhitespaceEnabled setting 6773 https://bugs.webkit.org/show_bug.cgi?id=112426 6774 6775 Reviewed by Ryosuke Niwa. 6776 6777 * Shared/WebPreferencesStore.h: 6778 (WebKit): Add macro for selectTrailingWhitespaceEnabled. 6779 * UIProcess/API/C/WKPreferences.cpp: 6780 (WKPreferencesSetSelectTrailingWhitespaceEnabled): 6781 (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods 6782 using the new setting. 6783 * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers. 6784 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 6785 (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement 6786 method delegating in WebPage. 6787 * WebProcess/WebPage/WebPage.cpp: 6788 (WebKit::WebPage::updatePreferences): Set 6789 selectTrailingWhitespaceEnabled setting. 6790 (WebKit::WebPage::setSmartInsertDeleteEnabled): Set 6791 selectTrailingWhitespaceEnabled as they are mutually exclusive. 6792 (WebKit): 6793 (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method 6794 using settings. 6795 (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method 6796 using settings and set smartInsertDeleteEnabled as they are mutually 6797 exclusive. 6798 * WebProcess/WebPage/WebPage.h: 6799 (WebPage): Add new methods headers. 6800 68012013-05-17 Brady Eidson <beidson@apple.com> 6802 6803 Fix crash introduced by http://trac.webkit.org/changeset/150282 6804 Followup to https://bugs.webkit.org/show_bug.cgi?id=116253 6805 6806 Reviewed by Andreas Kling. 6807 6808 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 6809 (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null. 6810 68112013-05-17 Brady Eidson <beidson@apple.com> 6812 6813 Replace WebFrameLoaderClient static_casts with a function that might return null. 6814 https://bugs.webkit.org/show_bug.cgi?id=116253 6815 6816 The general approach here is: 6817 1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null. 6818 2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*> 6819 3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0. 6820 4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT. 6821 6822 Reviewed by Alexey Proskuryakov. 6823 6824 Add the utility function to cast: 6825 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 6826 (WebKit::toWebFrameLoaderClient): 6827 6828 Adopt it everywhere: 6829 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: 6830 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation): 6831 6832 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: 6833 (WebKit::InjectedBundleNodeHandle::documentFrame): 6834 (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame): 6835 (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame): 6836 6837 * WebProcess/InjectedBundle/InjectedBundle.cpp: 6838 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 6839 6840 * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: 6841 (WebKit::InjectedBundleDOMWindowExtension::frame): 6842 6843 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: 6844 (WebKit::InjectedBundleHitTestResult::frame): 6845 (WebKit::InjectedBundleHitTestResult::targetFrame): 6846 6847 * WebProcess/Network/WebResourceLoadScheduler.cpp: 6848 (WebKit::WebResourceLoadScheduler::scheduleLoad): 6849 6850 * WebProcess/Plugins/PluginView.cpp: 6851 (WebKit::webPage): 6852 (WebKit::PluginView::performFrameLoadURLRequest): 6853 6854 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 6855 (WebKit::WebChromeClient::focusedNodeChanged): 6856 (WebKit::WebChromeClient::focusedFrameChanged): 6857 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): 6858 (WebKit::WebChromeClient::runJavaScriptAlert): 6859 (WebKit::WebChromeClient::runJavaScriptConfirm): 6860 (WebKit::WebChromeClient::runJavaScriptPrompt): 6861 (WebKit::WebChromeClient::print): 6862 (WebKit::WebChromeClient::exceededDatabaseQuota): 6863 (WebKit::WebChromeClient::runOpenPanel): 6864 6865 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 6866 (WebKit::WebEditorClient::textFieldDidBeginEditing): 6867 (WebKit::WebEditorClient::textFieldDidEndEditing): 6868 (WebKit::WebEditorClient::textDidChangeInTextField): 6869 (WebKit::WebEditorClient::textDidChangeInTextArea): 6870 (WebKit::WebEditorClient::doTextFieldCommandFromEvent): 6871 (WebKit::WebEditorClient::textWillBeDeletedInTextField): 6872 6873 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 6874 (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent): 6875 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 6876 6877 * WebProcess/WebPage/WebFrame.cpp: 6878 (WebKit::WebFrame::contentsAsString): 6879 (WebKit::WebFrame::parentFrame): 6880 (WebKit::WebFrame::childFrames): 6881 (WebKit::WebFrame::frameForContext): 6882 (WebKit::WebFrameFilter::shouldIncludeSubframe): 6883 6884 * WebProcess/WebPage/WebPage.cpp: 6885 (WebKit::WebPage::mainFrameHasCustomRepresentation): 6886 68872013-05-17 Sam Weinig <sam@webkit.org> 6888 6889 Expose new load-with-userData API to Objective-C 6890 https://bugs.webkit.org/show_bug.cgi?id=116335 6891 6892 Reviewed by Anders Carlsson. 6893 6894 - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData: 6895 loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData. 6896 - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped 6897 in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks. 6898 6899 * Shared/API/c/WKBase.h: 6900 * Shared/API/c/WKSharedAPICast.h: 6901 * Shared/API/c/mac/WKBaseMac.h: Added. 6902 * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added. 6903 * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added. 6904 (WKObjCTypeWrapperGetTypeID): 6905 (WKObjCTypeWrapperCreate): 6906 (WKObjCTypeWrapperGetObject): 6907 * UIProcess/API/mac/WKBrowsingContextController.h: 6908 * UIProcess/API/mac/WKBrowsingContextController.mm: 6909 (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): 6910 (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): 6911 (-[WKBrowsingContextController loadRequest:]): 6912 (-[WKBrowsingContextController loadRequest:userData:]): 6913 (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]): 6914 (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]): 6915 (-[WKBrowsingContextController loadHTMLString:baseURL:]): 6916 (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]): 6917 (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]): 6918 (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]): 6919 * WebKit2.xcodeproj/project.pbxproj: 6920 69212013-05-17 Sam Weinig <sam@webkit.org> 6922 6923 Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs 6924 https://bugs.webkit.org/show_bug.cgi?id=116325 6925 6926 Reviewed by Simon Fraser. 6927 6928 * UIProcess/API/C/WKPage.cpp: 6929 (WKPageLoadData): 6930 (WKPageLoadDataWithUserData): 6931 Add new SPI. 6932 6933 * UIProcess/API/C/WKPage.h: 6934 * UIProcess/WebPageProxy.cpp: 6935 (WebKit::WebPageProxy::loadData): 6936 * UIProcess/WebPageProxy.h: 6937 Pipe through to the WebProcess. 6938 6939 * WebProcess/WebPage/WebPage.h: 6940 * WebProcess/WebPage/WebPage.messages.in: 6941 * WebProcess/WebPage/WebPage.cpp: 6942 (WebKit::WebPage::loadDataImpl): 6943 (WebKit::WebPage::loadData): 6944 (WebKit::WebPage::loadHTMLString): 6945 (WebKit::WebPage::loadAlternateHTMLString): 6946 (WebKit::WebPage::loadPlainTextString): 6947 (WebKit::WebPage::loadWebArchiveData): 6948 Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict 6949 from IPC magic. 6950 6951 69522013-05-17 Michał Pakuła vel Rutka <m.pakula@samsung.com> 6953 6954 [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item 6955 https://bugs.webkit.org/show_bug.cgi?id=116321 6956 6957 Reviewed by Christophe Dumez. 6958 6959 During sub menu creation, after initializing m_parentMenu, parentMenu 6960 pointer became null which may cause segfaults. This patch fixes it by 6961 using m_parentMenu. 6962 6963 * UIProcess/API/efl/ewk_context_menu_item.cpp: 6964 (EwkContextMenuItem::EwkContextMenuItem): 6965 69662013-05-17 Michał Pakuła vel Rutka <m.pakula@samsung.com> 6967 6968 [EFL][WK2] Support sub menu in ewk context menus 6969 https://bugs.webkit.org/show_bug.cgi?id=114729 6970 6971 Reviewed by Christophe Dumez. 6972 6973 Added submenu support in EwkContextMenu and an API function to receive 6974 Ewk_Context_Menu from submenu context menu item. A test case was added 6975 for new API function. 6976 EwkContextMenu is now an EwkObject allowing multiple instances of submenu 6977 to be used in different submenu type context menu items. 6978 6979 * UIProcess/API/efl/ewk_context_menu_item.cpp: 6980 (EwkContextMenuItem::EwkContextMenuItem): 6981 (ewk_context_menu_item_new): 6982 (ewk_context_menu_item_parent_menu_get): 6983 (ewk_context_menu_item_submenu_get): 6984 * UIProcess/API/efl/ewk_context_menu_item.h: 6985 * UIProcess/API/efl/ewk_context_menu_item_private.h: 6986 (EwkContextMenuItem::create): 6987 (EwkContextMenuItem::parentMenu): 6988 (EwkContextMenuItem::subMenu): 6989 (EwkContextMenuItem): 6990 * UIProcess/API/efl/ewk_context_menu_private.h: 6991 (EwkContextMenu::ewkView): 6992 (EwkContextMenu): 6993 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: 6994 (showContextMenu): 6995 69962013-05-17 Zoltan Arvai <zarvai@inf.u-szeged.hu>, Ádám Kallai <kadam@inf.u-szeged.hu> 6997 6998 [Qt] Unreviewed build fix. 6999 7000 Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest. 7001 7002 * WebProcess/qt/QtBuiltinBundlePage.cpp: 7003 (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 7004 70052013-05-16 Beth Dakin <bdakin@apple.com> 7006 7007 Remove WKBundlePageGetHeaderLayer/Footer SPI 7008 https://bugs.webkit.org/show_bug.cgi?id=116254 7009 7010 Reviewed by Benjamin Poulain. 7011 7012 We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 7013 recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer. 7014 7015 * WebKit2.xcodeproj/project.pbxproj: 7016 * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed. 7017 * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed. 7018 * WebProcess/WebPage/WebPage.h: 7019 (WebPage): 7020 * WebProcess/WebPage/mac/WebPageMac.mm: 7021 (WebKit): 7022 (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange): 7023 70242013-05-14 Sam Weinig <sam@webkit.org> 7025 7026 Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them 7027 https://bugs.webkit.org/show_bug.cgi?id=116132 7028 7029 Reviewed by Anders Carlsson. 7030 7031 Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions, 7032 willLoadURLRequest and willLoadDataRequest to let the bundle access them. 7033 7034 Adds WebKit2WillLoadTest.* API tests. 7035 7036 * UIProcess/API/C/WKPage.cpp: 7037 (WKPageLoadURLWithUserData): 7038 (WKPageLoadURLRequestWithUserData): 7039 (WKPageLoadFile): 7040 (WKPageLoadFileWithUserData): 7041 (WKPageLoadHTMLStringWithUserData): 7042 (WKPageLoadAlternateHTMLStringWithUserData): 7043 (WKPageLoadPlainTextStringWithUserData): 7044 (WKPageLoadWebArchiveDataWithUserData): 7045 * UIProcess/API/C/WKPage.h: 7046 * UIProcess/WebPageProxy.cpp: 7047 * UIProcess/WebPageProxy.h: 7048 (WebPageProxy): 7049 * WebKit2.xcodeproj/project.pbxproj: 7050 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 7051 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: 7052 (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest): 7053 (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest): 7054 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: 7055 (WebCore): 7056 (InjectedBundlePageLoaderClient): 7057 * WebProcess/WebPage/WebPage.cpp: 7058 * WebProcess/WebPage/WebPage.h: 7059 * WebProcess/WebPage/WebPage.messages.in: 7060 70612013-05-16 Manuel Rego Casasnovas <rego@igalia.com> 7062 7063 [GTK] Fix memory leak in WebKitBackForwardList 7064 https://bugs.webkit.org/show_bug.cgi?id=116222 7065 7066 Reviewed by Carlos Garcia Campos. 7067 7068 Due to the use of leakRef() the ImmutableArray is not being released 7069 automatically. Adding a local variable in the methods to make sure that 7070 the ImmutableArray is freed. 7071 7072 * UIProcess/API/gtk/WebKitBackForwardList.cpp: 7073 (webkit_back_forward_list_get_back_list_with_limit): Add local variable 7074 RefPtr and pass the ImmutableArray to 7075 WebKitBackForwardList::webkitBackForwardListCreateList() using 7076 RefPtr::get(). 7077 (webkit_back_forward_list_get_forward_list_with_limit): Ditto. 7078 70792013-05-16 Commit Queue <commit-queue@webkit.org> 7080 7081 Unreviewed, rolling out r150034. 7082 http://trac.webkit.org/changeset/150034 7083 https://bugs.webkit.org/show_bug.cgi?id=116257 7084 7085 This work around doesn't work due to another bug NSUndoManager 7086 has (Requested by rniwa on #webkit). 7087 7088 * UIProcess/API/mac/PageClientImpl.mm: 7089 (WebKit::PageClientImpl::registerEditCommand): 7090 70912013-05-16 Tim Horton <timothy_horton@apple.com> 7092 7093 PDFPlugins don't load when plugins are disabled, but they should 7094 https://bugs.webkit.org/show_bug.cgi?id=75790 7095 <rdar://problem/11650197> 7096 7097 Reviewed by Anders Carlsson. 7098 7099 Support loading "application" plug-ins even if plug-ins are explicitly disabled. 7100 7101 Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can 7102 be loaded even if plug-ins are disabled. 7103 7104 * Platform/CoreIPC/HandleMessage.h: 7105 (CoreIPC::callMemberFunction): 7106 Add a 5-argument, 3-reply version of callMemberFunction. 7107 7108 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 7109 (WebKit::NetscapePluginModule::getPluginInfo): 7110 NPAPI plug-ins are not application plug-ins. 7111 7112 * Shared/WebCoreArgumentCoders.cpp: 7113 (CoreIPC::::encode): 7114 (CoreIPC::::decode): 7115 Encode/decode the new isApplicationPlugin field on PluginInfo. 7116 7117 * UIProcess/Plugins/PluginInfoStore.cpp: 7118 (WebKit::PluginInfoStore::findPluginForMIMEType): 7119 (WebKit::PluginInfoStore::findPluginForExtension): 7120 (WebKit::PluginInfoStore::findPlugin): 7121 * UIProcess/Plugins/PluginInfoStore.h: 7122 (PluginInfoStore): 7123 Give PluginInfoStore's findPlugin method and its private helper 7124 methods an argument allowing them to only match application plug-ins. 7125 7126 (WebKit::WebPageProxy::findPlugin): 7127 * UIProcess/WebPageProxy.h: 7128 (WebPageProxy): 7129 * UIProcess/WebPageProxy.messages.in: 7130 Add an argument allowing findPlugin to restrict its search to only application plug-ins. 7131 7132 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 7133 (WebKit::WebFrameLoaderClient::objectContentType): 7134 Previously, this caller depended on pluginData() returning null if 7135 plug-ins were disabled. Since that is no longer the case, we have to 7136 check if we can use plug-ins, and otherwise ignore non-application-plug-ins. 7137 7138 * WebProcess/WebPage/WebPage.cpp: 7139 (WebKit::WebPage::createPlugin): 7140 When going to search for a plug-in, ask subframeLoader whether or not 7141 it's OK to use ordinary non-application plug-ins, and pass that information 7142 on to the UIProcess when performing the search. 7143 7144 (WebKit::WebPage::canPluginHandleResponse): Ditto. 7145 (WebKit::WebPage::canShowMIMEType): 7146 Ensure that canShowMIMEType returns true if we have an application plug-in 7147 that can display a particular MIME type, even if we're not allowed to load plug-ins. 7148 71492013-05-16 Michał Pakuła vel Rutka <m.pakula@samsung.com> 7150 7151 [EFL][WK2] Make Ewk_Context_Menu Ewk_Object 7152 https://bugs.webkit.org/show_bug.cgi?id=116097 7153 7154 Reviewed by Gyuyoung Kim. 7155 7156 Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu 7157 object can be shared between different modules. 7158 7159 * UIProcess/API/efl/EwkView.cpp: 7160 (EwkView::showContextMenu): 7161 * UIProcess/API/efl/EwkView.h: 7162 (EwkView): 7163 * UIProcess/API/efl/ewk_context_menu.cpp: 7164 (EwkContextMenu::appendItem): 7165 (EwkContextMenu::removeItem): 7166 (ewk_context_menu_new): 7167 (ewk_context_menu_new_with_items): 7168 (ewk_context_menu_item_append): 7169 (ewk_context_menu_item_remove): 7170 (ewk_context_menu_hide): 7171 (ewk_context_menu_items_get): 7172 (ewk_context_menu_item_select): 7173 * UIProcess/API/efl/ewk_context_menu_item.cpp: 7174 (EwkContextMenuItem::EwkContextMenuItem): 7175 (ewk_context_menu_item_new_with_submenu): 7176 * UIProcess/API/efl/ewk_context_menu_item_private.h: 7177 (EwkContextMenuItem): 7178 * UIProcess/API/efl/ewk_context_menu_private.h: 7179 (EwkContextMenu): 7180 (EwkContextMenu::create): 7181 * UIProcess/API/efl/ewk_defines.h: 7182 71832013-05-16 Andreas Kling <akling@apple.com> 7184 7185 Page::chrome() should return a reference. 7186 <http://webkit.org/b/116185> 7187 7188 Reviewed by Anders Carlsson. 7189 71902013-05-16 Brady Eidson <beidson@apple.com> 7191 7192 svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled. 7193 <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917 7194 7195 Reviewed by Sam Weinig. 7196 7197 * NetworkProcess/SchedulableLoader.cpp: 7198 (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or 7199 that the client cannot be asked for credentials. 7200 7201 * WebProcess/Network/WebResourceLoadScheduler.cpp: 7202 (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage 7203 if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are 7204 available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both 7205 a frame and page ID or that the client won’t be asked for credentials. 7206 72072013-05-16 Timothy Hatcher <timothy@apple.com> 7208 7209 Make the Find Banner in Safari work again with the docked Web Inspector. 7210 7211 https://webkit.org/b/116182 7212 rdar://problem/13857423 7213 7214 Reviewed by Benjamin Poulain. 7215 7216 * UIProcess/mac/WebInspectorProxyMac.mm: 7217 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): 7218 (WebKit::WebInspectorProxy::platformDetach): 7219 Preserve the top position of the inspected view so banners in Safari still work. 7220 72212013-05-16 Tim Horton <timothy_horton@apple.com> 7222 7223 [wk2] didGetImageForFindMatch can return a null image 7224 https://bugs.webkit.org/show_bug.cgi?id=116251 7225 <rdar://problem/13277246> 7226 7227 Reviewed by Simon Fraser. 7228 7229 Don't send didGetImageForFindMatch if we didn't get an image for 7230 the find match, which can happen if the selection is not visible. 7231 7232 * WebProcess/WebPage/FindController.cpp: 7233 (WebKit::FindController::getImageForFindMatch): 7234 72352013-05-16 Tim Horton <timothy_horton@apple.com> 7236 7237 [wk2] Minimum layout width is lost if the WebProcess crashes 7238 https://bugs.webkit.org/show_bug.cgi?id=116202 7239 <rdar://problem/13202320> 7240 7241 Reviewed by Darin Adler. 7242 7243 Send the minimum layout width to the WebProcess upon initialization, 7244 so that crashed-and-restarted WebProcesses have the correct width. 7245 7246 * Shared/WebPageCreationParameters.cpp: 7247 (WebKit::WebPageCreationParameters::encode): 7248 (WebKit::WebPageCreationParameters::decode): 7249 * Shared/WebPageCreationParameters.h: 7250 (WebPageCreationParameters): 7251 Add minimumLayoutWidth WebPage creation parameter. 7252 7253 * UIProcess/WebPageProxy.cpp: 7254 (WebKit::WebPageProxy::creationParameters): 7255 Send the current minimumLayoutWidth to the WebPage when it's created. 7256 7257 (WebKit::WebPageProxy::setMinimumLayoutWidth): 7258 Store minimumLayoutWidth changes that come in while the WebProcess is 7259 not valid, so that the correct width is sent once it is restarted. 7260 7261 * WebProcess/WebPage/WebPage.cpp: 7262 (WebKit::WebPage::WebPage): 7263 Set minimumLayoutWidth to the value provided by our creation parameters. 7264 72652013-05-16 Zoltan Arvai <zarvai@inf.u-szeged.hu> 7266 7267 [Win] Unreviewed buildfix after r150161. 7268 7269 'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC, 7270 because it is also defined in MS SDK 7.1 winioctl.h. 7271 7272 * UIProcess/InspectorServer/HTTPRequest.cpp: 7273 (WebKit::HTTPRequest::HTTPRequest): 7274 72752013-05-16 Andras Becsi <andras.becsi@digia.com> 7276 7277 [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard 7278 https://bugs.webkit.org/show_bug.cgi?id=116018 7279 7280 Rubber-stamped by Jocelyn Turcotte. 7281 7282 * Shared/Plugins/Netscape/PluginInformation.cpp: 7283 (WebKit::getPluginModuleInformation): 7284 72852013-05-15 Simon Cooper <scooper@apple.com> 7286 7287 Enable printing in plugins 7288 https://bugs.webkit.org/show_bug.cgi?id=116201 7289 <rdar://problem/12347902> 7290 7291 Reviewed by Alexey Proskuryakov. 7292 7293 Add the printing entitlement so that legacy printing drivers can 7294 customize the print panel. Update the printing rules and enable them 7295 for the plugins. 7296 7297 * Configurations/PluginService.entitlements: 7298 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 7299 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 7300 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 7301 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 7302 73032013-05-15 Anders Carlsson <andersca@apple.com> 7304 7305 Move HTTPRequest class to WebKit2 7306 https://bugs.webkit.org/show_bug.cgi?id=116192 7307 7308 Reviewed by Darin Adler. 7309 7310 Move HTTPRequest to WebKit2 and put it in the WebKit namespace. 7311 7312 * CMakeLists.txt: 7313 * GNUmakefile.list.am: 7314 * Target.pri: 7315 * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp. 7316 * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h. 7317 * UIProcess/InspectorServer/WebInspectorServer.cpp: 7318 * UIProcess/InspectorServer/WebInspectorServer.h: 7319 (WebInspectorServer): 7320 * UIProcess/InspectorServer/WebSocketServerClient.h: 7321 (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest): 7322 (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest): 7323 (WebKit::WebSocketServerClient::didEstablishWebSocketConnection): 7324 * UIProcess/InspectorServer/WebSocketServerConnection.cpp: 7325 * UIProcess/InspectorServer/WebSocketServerConnection.h: 7326 (WebKit): 7327 (WebSocketServerConnection): 7328 73292013-05-15 Arnaud Renevier <a.renevier@sisa.samsung.com> 7330 7331 [GTK] [WebKit2] enable displaying console.log messages to system console 7332 https://bugs.webkit.org/show_bug.cgi?id=115578 7333 7334 Reviewed by Martin Robinson. 7335 7336 Add a setting to enable/disable displaying of page messages to system 7337 console. Property is called enable-write-console-messages-to-stdout. 7338 Getter API function is 7339 webkit_settings_get_enable_write_console_messages_to_stdout 7340 Setter API function is 7341 webkit_settings_set_enable_write_console_messages_to_stdout 7342 7343 * UIProcess/API/gtk/WebKitSettings.cpp: 7344 (webKitSettingsSetProperty): 7345 (webKitSettingsGetProperty): 7346 (webkit_settings_class_init): 7347 (webkit_settings_get_enable_write_console_messages_to_stdout): 7348 (webkit_settings_set_enable_write_console_messages_to_stdout): 7349 * UIProcess/API/gtk/WebKitSettings.h: 7350 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: 7351 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: 7352 (testWebKitSettings): 7353 73542013-05-08 Gavin Barraclough <barraclough@apple.com> 7355 7356 Process suppression should throttle scripted animations 7357 https://bugs.webkit.org/show_bug.cgi?id=115812 7358 7359 Reviewed by Simon Fraser. 7360 7361 <rdar://problem/13799726> 7362 7363 * WebProcess/WebPage/WebPage.cpp: 7364 (WebKit::WebPage::setThrottled): 7365 (WebKit): 7366 * WebProcess/WebPage/WebPage.h: 7367 (WebPage): 7368 - Added setThrottled, forwards to WebCore::Page. 7369 * WebProcess/WebProcess.cpp: 7370 (WebKit): 7371 (WebKit::WebProcess::setProcessSuppressionEnabled): 7372 * WebProcess/WebProcess.h: 7373 (WebProcess): 7374 - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled. 7375 73762013-05-15 Anders Carlsson <andersca@apple.com> 7377 7378 WKPageGetPluginInformationDisplayNameKey doesn't return the right key 7379 https://bugs.webkit.org/show_bug.cgi?id=116188 7380 7381 Reviewed by Andreas Kling. 7382 7383 * UIProcess/API/C/WKPage.cpp: 7384 (WKPageGetPluginInformationDisplayNameKey): 7385 73862013-05-15 Alexey Proskuryakov <ap@apple.com> 7387 7388 More fixing after WebProcessShim renaming in r149074. 7389 7390 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: 7391 (WebContentServiceInitializer): Updated a comment to mention the shim by its new name. 7392 73932013-05-15 Alexey Proskuryakov <ap@apple.com> 7394 7395 <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when 7396 launching Safari 7397 7398 Reviewed by Anders Carlsson. 7399 7400 * WebProcess/com.apple.WebProcess.sb.in: Silence the violation. 7401 74022013-05-13 Anders Carlsson <andersca@apple.com> 7403 7404 Frame::editor() should return a reference 7405 https://bugs.webkit.org/show_bug.cgi?id=116037 7406 7407 Reviewed by Darin Adler. 7408 7409 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: 7410 (WebKit::WebContextMenuClient::searchWithGoogle): 7411 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 7412 (WebKit::WebEditorClient::updateGlobalSelection): 7413 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: 7414 (WebKit::WebEditorClient::handleInputMethodKeydown): 7415 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: 7416 (WebKit::WebEditorClient::executePendingEditorCommands): 7417 (WebKit::WebEditorClient::handleKeyboardEvent): 7418 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: 7419 (WebKit::WebContextMenuClient::searchWithGoogle): 7420 (WebKit::WebContextMenuClient::searchWithSpotlight): 7421 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 7422 (WebKit::changeWordCase): 7423 * WebProcess/WebPage/WebFrame.cpp: 7424 (WebKit::WebFrame::selectionAsString): 7425 (WebKit::WebFrame::setTextDirection): 7426 * WebProcess/WebPage/WebPage.cpp: 7427 (WebKit::WebPage::editorState): 7428 (WebKit::WebPage::executeEditingCommand): 7429 (WebKit::WebPage::isEditingCommandEnabled): 7430 (WebKit::WebPage::validateCommand): 7431 (WebKit::WebPage::handleEditingKeyboardEvent): 7432 (WebKit::WebPage::advanceToNextMisspelling): 7433 (WebKit::WebPage::uppercaseWord): 7434 (WebKit::WebPage::lowercaseWord): 7435 (WebKit::WebPage::capitalizeWord): 7436 (WebKit::WebPage::replaceSelectionWithText): 7437 (WebKit::WebPage::handleAlternativeTextUIResult): 7438 (WebKit::WebPage::setCompositionForTesting): 7439 (WebKit::WebPage::hasCompositionForTesting): 7440 (WebKit::WebPage::confirmCompositionForTesting): 7441 (WebKit::WebPage::setComposition): 7442 (WebKit::WebPage::cancelComposition): 7443 * WebProcess/WebPage/efl/WebPageEfl.cpp: 7444 (WebKit::WebPage::confirmComposition): 7445 (WebKit::WebPage::setComposition): 7446 (WebKit::WebPage::cancelComposition): 7447 * WebProcess/WebPage/mac/WebPageMac.mm: 7448 (WebKit::WebPage::executeKeypressCommandsInternal): 7449 (WebKit::WebPage::handleEditingKeyboardEvent): 7450 (WebKit::WebPage::setComposition): 7451 (WebKit::WebPage::confirmComposition): 7452 (WebKit::WebPage::cancelComposition): 7453 (WebKit::WebPage::insertText): 7454 (WebKit::WebPage::insertDictatedText): 7455 (WebKit::WebPage::getMarkedRange): 7456 (WebKit::WebPage::firstRectForCharacterRange): 7457 (WebKit::WebPage::readSelectionFromPasteboard): 7458 (WebKit::WebPage::getStringSelectionForPasteboard): 7459 (WebKit::WebPage::getDataSelectionForPasteboard): 7460 74612013-05-15 Anders Carlsson <andersca@apple.com> 7462 7463 Need a way for NPAPI plug-ins to open preference panes 7464 https://bugs.webkit.org/show_bug.cgi?id=116173 7465 <rdar://problem/13503848> 7466 7467 Reviewed by Sam Weinig. 7468 7469 * PluginProcess/PluginControllerProxy.h: 7470 Add openPluginPreferencePane(). 7471 7472 * PluginProcess/mac/PluginControllerProxyMac.mm: 7473 (WebKit::PluginControllerProxy::openPluginPreferencePane): 7474 Send OpenPluginPreferencePane to the UI process. 7475 7476 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 7477 (WebKit::NetscapePluginModule::getPluginInfo): 7478 Get the preference pane path. 7479 7480 * Shared/Plugins/PluginModuleInfo.h: 7481 Add preferencePanePath member variable. 7482 7483 * UIProcess/Plugins/PluginProcessProxy.h: 7484 Add openPluginPreferencePane message handler. 7485 7486 * UIProcess/Plugins/PluginProcessProxy.messages.in: 7487 ADd OpenPluginPreferencePane message. 7488 7489 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 7490 (WebKit::PluginProcessProxy::openPluginPreferencePane): 7491 Get the path to the preference pane and use LS to open it. 7492 7493 * WebKit2.xcodeproj/project.pbxproj: 7494 Add new files. 7495 7496 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 7497 (WebKit::NPN_GetValue): 7498 Handle WKNVPlugInContainer. 7499 7500 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 7501 Add WKNVPlugInContainer member variable. 7502 7503 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 7504 (WebKit::NetscapePlugin::openPluginPreferencePane): 7505 Call through to the plug-in controller. 7506 7507 (WebKit::NetscapePlugin::plugInContainer): 7508 Create a WKNPAPIPlugInContainer object if necessary. 7509 7510 (WebKit::NetscapePlugin::platformDestroy): 7511 Invalidate the WKNPAPIPlugInContainer object. 7512 7513 * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h: 7514 New file with the protocol definition. 7515 7516 * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm: 7517 (-[WKNPAPIPlugInContainer dealloc]): 7518 Assert that the plug-in is null (that we've been invalidated). 7519 7520 (-[WKNPAPIPlugInContainer _invalidate]): 7521 Set the plug-in to null. 7522 7523 (-[WKNPAPIPlugInContainer openPlugInPreferencePane]): 7524 Call through to the plug-in. 7525 7526 * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h: 7527 New file with the interface declaration for the object that implements the protocol. 7528 7529 * WebProcess/Plugins/PluginController.h: 7530 Add openPluginPreferencePane member function. 7531 7532 * WebProcess/Plugins/PluginView.cpp: 7533 (WebKit::PluginView::openPluginPreferencePane): 7534 Add stub; this should never be called since we always go through the UI process. 7535 75362013-05-15 Alexey Proskuryakov <ap@apple.com> 7537 7538 [WK2][Mac] Split resetTextInputState into two functions 7539 https://bugs.webkit.org/show_bug.cgi?id=116174 7540 7541 Reviewed by Anders Carlsson. 7542 7543 Splitting resetTextInputState into resetSecureInputState and 7544 notifyInputContextAboutDiscardedComposition, paving the way for a fix where these 7545 won't be happening simultaneously. 7546 7547 * UIProcess/API/mac/PageClientImpl.h: 7548 * UIProcess/API/mac/PageClientImpl.mm: 7549 (WebKit::PageClientImpl::resetSecureInputState): 7550 (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition): 7551 * UIProcess/API/mac/WKView.mm: 7552 (-[WKView resignFirstResponder]): 7553 (-[WKView _resetSecureInputState]): 7554 (-[WKView _notifyInputContextAboutDiscardedComposition]): 7555 * UIProcess/API/mac/WKViewInternal.h: 7556 * UIProcess/PageClient.h: 7557 * UIProcess/WebPageProxy.cpp: 7558 (WebKit::WebPageProxy::didCommitLoadForFrame): 7559 75602013-05-15 Carlos Garcia Campos <cgarcia@igalia.com> 7561 7562 [GTK] Add padding to all public class structs for future expansion without breaking ABI 7563 https://bugs.webkit.org/show_bug.cgi?id=112565 7564 7565 Reviewed by Anders Carlsson. 7566 7567 Use 4 pointers for most of the classes that are unlikely to grow 7568 and 8 for WebKitWebView and WebKitWebContext. 7569 7570 * UIProcess/API/gtk/WebKitBackForwardList.h: 7571 (_WebKitBackForwardListClass): 7572 * UIProcess/API/gtk/WebKitBackForwardListItem.h: 7573 (_WebKitBackForwardListItemClass): 7574 * UIProcess/API/gtk/WebKitContextMenu.h: 7575 (_WebKitContextMenuClass): 7576 * UIProcess/API/gtk/WebKitContextMenuItem.h: 7577 (_WebKitContextMenuItemClass): 7578 * UIProcess/API/gtk/WebKitCookieManager.h: 7579 (_WebKitCookieManagerClass): 7580 * UIProcess/API/gtk/WebKitDownload.h: 7581 (_WebKitDownloadClass): 7582 * UIProcess/API/gtk/WebKitFaviconDatabase.h: 7583 (_WebKitFaviconDatabaseClass): 7584 * UIProcess/API/gtk/WebKitFileChooserRequest.h: 7585 (_WebKitFileChooserRequestClass): 7586 * UIProcess/API/gtk/WebKitFindController.h: 7587 (_WebKitFindControllerClass): 7588 * UIProcess/API/gtk/WebKitFormSubmissionRequest.h: 7589 (_WebKitFormSubmissionRequestClass): 7590 * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h: 7591 (_WebKitGeolocationPermissionRequestClass): 7592 * UIProcess/API/gtk/WebKitHitTestResult.h: 7593 (_WebKitHitTestResultClass): 7594 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h: 7595 (_WebKitNavigationPolicyDecisionClass): 7596 * UIProcess/API/gtk/WebKitPlugin.h: 7597 (_WebKitPluginClass): 7598 * UIProcess/API/gtk/WebKitPolicyDecision.h: 7599 (_WebKitPolicyDecisionClass): 7600 * UIProcess/API/gtk/WebKitPrintOperation.h: 7601 (_WebKitPrintOperationClass): 7602 * UIProcess/API/gtk/WebKitResponsePolicyDecision.h: 7603 (_WebKitResponsePolicyDecisionClass): 7604 * UIProcess/API/gtk/WebKitSecurityManager.h: 7605 (_WebKitSecurityManagerClass): 7606 * UIProcess/API/gtk/WebKitSettings.h: 7607 (_WebKitSettingsClass): 7608 * UIProcess/API/gtk/WebKitURIRequest.h: 7609 (_WebKitURIRequestClass): 7610 * UIProcess/API/gtk/WebKitURIResponse.h: 7611 (_WebKitURIResponseClass): 7612 * UIProcess/API/gtk/WebKitURISchemeRequest.h: 7613 (_WebKitURISchemeRequestClass): 7614 * UIProcess/API/gtk/WebKitWebContext.h: 7615 (_WebKitWebContextClass): 7616 * UIProcess/API/gtk/WebKitWebInspector.h: 7617 (_WebKitWebInspectorClass): 7618 * UIProcess/API/gtk/WebKitWebResource.h: 7619 (_WebKitWebResourceClass): 7620 * UIProcess/API/gtk/WebKitWebView.h: 7621 (_WebKitWebViewClass): 7622 * UIProcess/API/gtk/WebKitWebViewBase.h: 7623 (_WebKitWebViewBaseClass): 7624 * UIProcess/API/gtk/WebKitWebViewGroup.h: 7625 (_WebKitWebViewGroupClass): 7626 * UIProcess/API/gtk/WebKitWindowProperties.h: 7627 (_WebKitWindowPropertiesClass): 7628 76292013-05-14 Carlos Garcia Campos <cgarcia@igalia.com> 7630 7631 Remove WTF_USE_PLATFORM_STRATEGIES 7632 https://bugs.webkit.org/show_bug.cgi?id=114431 7633 7634 Reviewed by Darin Adler. 7635 7636 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 7637 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 7638 * WebProcess/WebProcess.cpp: 7639 (WebKit::WebProcess::WebProcess): 7640 76412013-05-14 Simon Cooper <scooper@apple.com> 7642 7643 Add a preference that can disable the fake SYSV SHM shim 7644 https://bugs.webkit.org/show_bug.cgi?id=116127 7645 <rdar://problem/13810524> 7646 7647 Reviewed by Alexey Proskuryakov. 7648 7649 * PluginProcess/mac/PluginProcessShim.mm: 7650 (WebKit::shim_disabled): 7651 (WebKit::shim_shmdt): 7652 (WebKit::shim_shmat): 7653 (WebKit::shim_shmget): 7654 (WebKit::shim_shmctl): 7655 76562013-05-14 Tim Horton <timothy_horton@apple.com> 7657 7658 [wk2] Not updating tiled backing coverage when main frame scrollability changes 7659 https://bugs.webkit.org/show_bug.cgi?id=116123 7660 <rdar://problem/13836559> 7661 7662 Reviewed by Simon Fraser. 7663 7664 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: 7665 (TiledCoreAnimationDrawingArea): 7666 Add updateMainFrameClipsToExposedRect. 7667 7668 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 7669 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 7670 (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 7671 Remove m_clipsToExposedRect. We don't actually need it. 7672 7673 (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): 7674 Call updateMainFrameClipsToExposedRect so that we can always update 7675 tiled backing coverage and can factor out our calls to setClipsToExposedRect. 7676 7677 (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect): 7678 Factor out setClipsToExposedRect calls to here, and also call 7679 FrameView::adjustTiledBackingCoverage so that the FrameView's tiled 7680 backing is informed to allow overdraw in the UI-process-scrolling case. 7681 7682 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 7683 Use updateMainFrameClipsToExposedRect. 7684 76852013-05-14 Alexey Proskuryakov <ap@apple.com> 7686 7687 [Mac] Add a testing shim for secure event input functions 7688 https://bugs.webkit.org/show_bug.cgi?id=116122 7689 7690 Reviewed by Mark Rowe. 7691 7692 Moved DyldInterpose.h to WebCore, as we now use it there too. 7693 7694 * PluginProcess/mac/PluginProcessShim.mm: 7695 * Shared/mac/CookieStorageShimLibrary.cpp: 7696 * Shared/mac/DyldInterpose.h: Removed. 7697 * WebKit2.xcodeproj/project.pbxproj: 7698 * WebProcess/mac/SecItemShimLibrary.mm: 7699 77002013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com> 7701 7702 [Win] REGRESSION(r149944): mmap is not available on Windows 7703 https://bugs.webkit.org/show_bug.cgi?id=116015 7704 7705 Reviewed by Anders Carlsson. 7706 7707 Use fastAlloc/fastFree for platforms other than OS(DARWIN) where 7708 using mmap is not necessary and maybe not available. 7709 7710 * Platform/CoreIPC/ArgumentEncoder.cpp: 7711 (CoreIPC::allocBuffer): 7712 (CoreIPC::freeBuffer): 7713 (CoreIPC::ArgumentEncoder::~ArgumentEncoder): 7714 (CoreIPC::ArgumentEncoder::grow): 7715 77162013-05-14 Zan Dobersek <zdobersek@igalia.com> 7717 7718 [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform 7719 https://bugs.webkit.org/show_bug.cgi?id=115921 7720 7721 Reviewed by Gustavo Noronha Silva. 7722 7723 * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS. 7724 77252013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com> 7726 7727 [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...) 7728 https://bugs.webkit.org/show_bug.cgi?id=116039 7729 7730 Reviewed by Benjamin Poulain. 7731 7732 According to the documentation, DeleteTimerQueueTimer can be expected to return 7733 false with an ERROR_IO_PENDING error when called from the timer's callback. 7734 7735 * Platform/win/WorkQueueWin.cpp: 7736 (WorkQueue::timerCallback): 7737 77382013-05-14 Alexey Proskuryakov <ap@apple.com> 7739 7740 Remove unused "type" field from DictionaryPopupInfo 7741 https://bugs.webkit.org/show_bug.cgi?id=116011 7742 7743 Reviewed by Darin Adler. 7744 7745 It is unused, and furthermore, PDFPlugin sets it incorrectly anyway. 7746 7747 * Shared/DictionaryPopupInfo.cpp: 7748 (WebKit::DictionaryPopupInfo::encode): 7749 (WebKit::DictionaryPopupInfo::decode): 7750 * Shared/DictionaryPopupInfo.h: 7751 * WebProcess/Plugins/PDF/PDFPlugin.mm: 7752 (WebKit::PDFPlugin::showDefinitionForAttributedString): 7753 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: 7754 (WebKit::WebContextMenuClient::lookUpInDictionary): 7755 * WebProcess/WebPage/WebPage.h: 7756 * WebProcess/WebPage/mac/WebPageMac.mm: 7757 (WebKit::WebPage::performDictionaryLookupAtLocation): 7758 (WebKit::WebPage::performDictionaryLookupForSelection): 7759 (WebKit::WebPage::performDictionaryLookupForRange): 7760 77612013-05-14 Michael Brüning <michael.bruning@digia.com> 7762 7763 [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters(). 7764 https://bugs.webkit.org/show_bug.cgi?id=110218 7765 7766 Reviewed by Darin Adler. 7767 7768 Make the WebPageProxy::creationParameters use the accessor 7769 deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor 7770 directly. This will restore the custom device scale factor when 7771 reattaching to the WebProcess after a crash. 7772 7773 Moreover, it will enable the Qt and ELF ports to use the 7774 existing C API for overriding the device scale factor instead 7775 of using the WebPageProxy directly or adding new C API to set 7776 the intrinsic device scale factor. 7777 7778 * UIProcess/API/efl/EwkView.cpp: 7779 (EwkView::setDeviceScaleFactor): 7780 * UIProcess/API/qt/qquickwebpage.cpp: 7781 (QQuickWebPage::updatePaintNode): 7782 * UIProcess/WebPageProxy.cpp: 7783 (WebKit::WebPageProxy::creationParameters): 7784 77852013-05-13 Alex Christensen <achristensen@apple.com> 7786 7787 Added testRunner.setPrinting. 7788 https://bugs.webkit.org/show_bug.cgi?id=42693 7789 rdar://problem/8213845 7790 7791 Reviewed by Darin Adler. 7792 7793 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 7794 (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added. 7795 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 7796 Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration. 7797 * WebProcess/WebPage/WebPage.cpp: 7798 (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added. 7799 * WebProcess/WebPage/WebPage.h: 7800 Added renderTreeExternalRepresentationForPrinting declaration. 7801 78022013-05-13 Timothy Hatcher <timothy@apple.com> 7803 7804 Add support for updating the Web Inspector toolbar height. 7805 7806 https://bugs.webkit.org/show_bug.cgi?id=115996 7807 7808 Reviewed by Joseph Pecoraro and Benjamin Poulain. 7809 7810 * UIProcess/WebInspectorProxy.h: 7811 (WebKit::WebInspectorProxy::setToolbarHeight): 7812 (WebInspectorProxy): 7813 * UIProcess/WebInspectorProxy.messages.in: 7814 * UIProcess/efl/WebInspectorProxyEfl.cpp: 7815 (WebKit::WebInspectorProxy::platformSetToolbarHeight): 7816 * UIProcess/gtk/WebInspectorProxyGtk.cpp: 7817 (WebKit::WebInspectorProxy::platformSetToolbarHeight): 7818 (WebKit): 7819 * UIProcess/mac/WebInspectorProxyMac.mm: 7820 (WebKit::WebInspectorProxy::platformSetToolbarHeight): 7821 * UIProcess/qt/WebInspectorProxyQt.cpp: 7822 (WebKit::WebInspectorProxy::platformSetToolbarHeight): 7823 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: 7824 (WebKit::WebInspectorFrontendClient::setToolbarHeight): 7825 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: 7826 (WebInspectorFrontendClient): 7827 * WebProcess/WebPage/WebInspector.cpp: 7828 (WebKit::WebInspector::setToolbarHeight): 7829 * WebProcess/WebPage/WebInspector.h: 7830 78312013-05-13 Ryosuke Niwa <rniwa@webkit.org> 7832 7833 Sometimes NSUndoManager can get into an inconsistent state 7834 https://bugs.webkit.org/show_bug.cgi?id=116050 7835 7836 Reviewed by Enrica Casucci. 7837 7838 Always group undo items to work around a bug in NSUndoManager that manifests 7839 when we call removeAllActionsWithTarget. 7840 7841 * UIProcess/API/mac/PageClientImpl.mm: 7842 (WebKit::PageClientImpl::registerEditCommand): 7843 78442013-05-13 Anders Carlsson <andersca@apple.com> 7845 7846 [WK2] Crash in WebKit::StorageAreaMap::didSetItem() 7847 https://bugs.webkit.org/show_bug.cgi?id=116026 7848 7849 Reviewed by Andreas Kling. 7850 7851 Make sure that we ignore any leftover messages from the UI process after we've reset 7852 the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented 7853 everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 7854 notification messages from the UI process if the seeds are different. 7855 7856 * Platform/CoreIPC/HandleMessage.h: 7857 (CoreIPC): 7858 (CoreIPC::callMemberFunction): 7859 * UIProcess/Storage/StorageManager.cpp: 7860 (WebKit::StorageManager::getValues): 7861 (WebKit::StorageManager::setItem): 7862 (WebKit::StorageManager::removeItem): 7863 (WebKit::StorageManager::clear): 7864 * UIProcess/Storage/StorageManager.h: 7865 (StorageManager): 7866 * UIProcess/Storage/StorageManager.messages.in: 7867 * WebProcess/Storage/StorageAreaMap.cpp: 7868 (WebKit::StorageAreaMap::StorageAreaMap): 7869 (WebKit::StorageAreaMap::setItem): 7870 (WebKit::StorageAreaMap::removeItem): 7871 (WebKit::StorageAreaMap::clear): 7872 (WebKit::StorageAreaMap::resetValues): 7873 (WebKit::StorageAreaMap::loadValuesIfNeeded): 7874 (WebKit::StorageAreaMap::didGetValues): 7875 (WebKit::StorageAreaMap::didSetItem): 7876 (WebKit::StorageAreaMap::didRemoveItem): 7877 (WebKit::StorageAreaMap::didClear): 7878 (WebKit::StorageAreaMap::applyChange): 7879 * WebProcess/Storage/StorageAreaMap.h: 7880 (StorageAreaMap): 7881 * WebProcess/Storage/StorageAreaMap.messages.in: 7882 78832013-05-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 7884 7885 [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize() 7886 https://bugs.webkit.org/show_bug.cgi?id=116045 7887 7888 Reviewed by Darin Adler. 7889 7890 * UIProcess/CoordinatedGraphics/WebView.cpp: 7891 (WebKit::WebView::setSize): 7892 78932013-05-13 Jon Lee <jonlee@apple.com> 7894 7895 [WK2] Notification manager removal should not be tied to termination of web processes 7896 https://bugs.webkit.org/show_bug.cgi?id=116038 7897 <rdar://problem/10968680> 7898 7899 Reviewed by Ryosuke Niwa. 7900 7901 WebNotificationManagerProxy incorrectly removes the manager when web processes close. 7902 Since it is a supplemental on the web context, the manager should only be removed 7903 when the context is destroyed. 7904 7905 * UIProcess/Notifications/WebNotificationManagerProxy.cpp: 7906 * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of 7907 processDidClose(). 7908 79092013-05-13 Martin Robinson <mrobinson@igalia.com> 7910 7911 [GTK] [WebKit2] Use a template file for generated GObject enum files 7912 https://bugs.webkit.org/show_bug.cgi?id=115867 7913 7914 Reviewed by Carlos Garcia Campos. 7915 7916 * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line. 7917 * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added. 7918 * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added. 7919 * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h. 7920 79212013-05-13 Noam Rosenthal <noam@webkit.org> 7922 7923 [CoordGfx] requestAnimationFrame performance issues 7924 https://bugs.webkit.org/show_bug.cgi?id=112345 7925 7926 Reviewed by Jocelyn Turcotte. 7927 7928 Changed the logic of requestAnimationFrame in Coordinated Graphics. 7929 We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things: 7930 - If there is already a frame pending in the UI process, do nothing, as the animations would 7931 be serviced when the frame is returned to the web process. 7932 - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 7933 least 1/60 seconds after the last animation service, so that we don't get an infinite loop 7934 of flushes. 7935 7936 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: 7937 (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame): 7938 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: 7939 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 7940 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 7941 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): 7942 (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): 7943 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 7944 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: 7945 79462013-05-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 7947 7948 [WK2][CoordinatedGraphics] WKView needs API for handling opacity 7949 https://bugs.webkit.org/show_bug.cgi?id=116032 7950 7951 Reviewed by Kenneth Rohde Christiansen. 7952 7953 Add WKViewSetOpacity and WKViewOpacity APIs and use them in 7954 WebView.cpp. 7955 7956 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: 7957 (WKViewSetOpacity): 7958 (WKViewOpacity): 7959 * UIProcess/API/C/CoordinatedGraphics/WKView.h: 7960 * UIProcess/CoordinatedGraphics/WebView.cpp: 7961 (WebKit::WebView::WebView): 7962 (WebKit::WebView::paintToCurrentGLContext): 7963 * UIProcess/CoordinatedGraphics/WebView.h: 7964 (WebKit::WebView::setOpacity): 7965 (WebKit::WebView::opacity): 7966 (WebView): 7967 79682013-05-13 Zan Dobersek <zdobersek@igalia.com> 7969 7970 [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess 7971 https://bugs.webkit.org/show_bug.cgi?id=115918 7972 7973 Reviewed by Gustavo Noronha Silva. 7974 7975 Due to layer violations and circular dependencies the WebKitPluginProcess requires for the 7976 libraries containing the built code of the intertwining Platform and WebCore layers to be 7977 specified multiple times when linking. This can be avoided by packing the two layers' archives 7978 into one big archive, named after the WebCore layer due to no clear boundary between it and the 7979 Platform layer. The big archive can then be specified only once when linking, simplifying the code 7980 and suppressing all the layering violations so they do not cause build problems. 7981 7982 First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on 7983 are specified. These are then used as dependencies for the archive creation rule as well as the list 7984 from which the archive file paths are constructed and then used to dump the member files from these archives. 7985 The member files are then added to the big archive. The latter is added to the list of libraries the 7986 WebKitPluginProcess requires to successfully link. 7987 7988 * GNUmakefile.am: 7989 79902013-05-13 Zalan Bujtas <zalan@apple.com> 7991 7992 WebProcess consuming very high CPU on linkedin.com 7993 https://bugs.webkit.org/show_bug.cgi?id=115601 7994 7995 Reviewed by Andreas Kling. 7996 7997 Disable WEB_TIMING_MINIMAL. 7998 Turn off window.performance and performance.now(). Some JS frameworks expect 7999 additional Web Timing APIs, when performance.now() is available. 8000 8001 * Configurations/FeatureDefines.xcconfig: 8002 80032013-05-12 Anders Carlsson <andersca@apple.com> 8004 8005 Stop including UnusedParam.h 8006 https://bugs.webkit.org/show_bug.cgi?id=116003 8007 8008 Reviewed by Sam Weinig. 8009 8010 UnusedParam.h is empty now so there's no need to include it anymore. 8011 8012 * UIProcess/API/C/WKContext.cpp: 8013 * UIProcess/API/C/WKInspector.cpp: 8014 * UIProcess/API/C/WKPage.cpp: 8015 * UIProcess/API/efl/ewk_text_checker.cpp: 8016 * UIProcess/API/efl/ewk_view.cpp: 8017 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: 8018 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 8019 * UIProcess/mac/WKFullScreenWindowController.mm: 8020 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 8021 * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 8022 80232013-05-12 Andreas Kling <akling@apple.com> 8024 8025 Unload event listeners should prevent Safari from insta-killing the web process on last tab close. 8026 <http://webkit.org/b/115988> 8027 <rdar://problem/13870943> 8028 8029 Reviewed by Anders Carlsson. 8030 8031 Let WebCore control the UI process's suppression of the sudden termination mechanism. 8032 This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages 8033 over to the UI process where the appropriate NSProcessInfo calls are made. 8034 8035 We also use this information when deciding whether to insta-kill a web process when its last 8036 page is closed. This mechanism is re-usable in WebCore to protect against sudden termination 8037 by the UI process. 8038 8039 * UIProcess/WebProcessProxy.cpp: 8040 (WebKit::WebProcessProxy::WebProcessProxy): 8041 (WebKit::WebProcessProxy::removeWebPage): 8042 (WebKit::WebProcessProxy::enableSuddenTermination): 8043 (WebKit::WebProcessProxy::disableSuddenTermination): 8044 * UIProcess/WebProcessProxy.h: 8045 (WebProcessProxy): 8046 * UIProcess/WebProcessProxy.messages.in: 8047 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 8048 (WebKit::WebChromeClient::enableSuddenTermination): 8049 (WebKit::WebChromeClient::disableSuddenTermination): 8050 * WebProcess/WebCoreSupport/WebChromeClient.h: 8051 (WebChromeClient): 8052 80532013-05-12 Alexey Proskuryakov <ap@apple.com> 8054 8055 <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion. 8056 8057 Reviewed by Dan Bernstein. 8058 8059 * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only). 8060 80612013-05-12 Carlos Garcia Campos <cgarcia@igalia.com> 8062 8063 [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs 8064 https://bugs.webkit.org/show_bug.cgi?id=115914 8065 8066 Reviewed by Martin Robinson. 8067 8068 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 8069 (webkitWebViewBaseRealize): 8070 80712013-05-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 8072 8073 Unreviewed build fix after r149944. 8074 8075 * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2). 8076 80772013-05-11 Anders Carlsson <andersca@apple.com> 8078 8079 Don't pass malloced pointers as out-of-line data when sending Mach messages 8080 https://bugs.webkit.org/show_bug.cgi?id=115970 8081 <rdar://problem/13144680> 8082 8083 Reviewed by Sam Weinig. 8084 8085 Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data 8086 since that gives us fresh zero-filled memory that we can safely share. 8087 8088 * Platform/CoreIPC/ArgumentEncoder.cpp: 8089 (CoreIPC::ArgumentEncoder::ArgumentEncoder): 8090 Set up the buffer pointers to point to the inline buffer. 8091 8092 (CoreIPC::ArgumentEncoder::~ArgumentEncoder): 8093 Unmap the buffer if necessary. 8094 8095 (CoreIPC::ArgumentEncoder::grow): 8096 Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the 8097 current strategy, but most messages are either tiny in which case they will fit inside the inline buffer, 8098 or big in which case we'll end up doing less allocations + memory copying. 8099 8100 * Platform/CoreIPC/ArgumentEncoder.h: 8101 (ArgumentEncoder): 8102 81032013-05-11 Zan Dobersek <zdobersek@igalia.com> 8104 8105 Unreviewed GTK build fix after r149904. 8106 8107 * GNUmakefile.list.am: Adding missing build targets. 8108 81092013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com> 8110 8111 Unreviewed, Fix WK2 EFL build after r149904. 8112 8113 Add new PluginInformation.cpp file to CMake. 8114 8115 * CMakeLists.txt: 8116 81172013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com> 8118 8119 Unreviewed, fix WK2 EFL build after r149904. 8120 8121 Add new WKPluginInformation.cpp file to CMake. 8122 8123 * CMakeLists.txt: 8124 81252013-05-11 Andreas Kling <akling@apple.com> 8126 8127 When possible, terminate web processes immediately when closing their last page. 8128 <http://webkit.org/b/115964> 8129 <rdar://problem/13869266> 8130 8131 Reviewed by Geoffrey Garen. 8132 8133 When we're using a network process, there's no need for the UI process to wait for web processes 8134 to clear resource caches and terminate nicely. 8135 8136 We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed. 8137 8138 * UIProcess/WebProcessProxy.cpp: 8139 (WebKit::WebProcessProxy::removeWebPage): 8140 8141 Terminate the child process immediately if possible. 8142 8143 * UIProcess/WebProcessProxy.h: 8144 (WebKit::WebProcessProxy::canTerminateChildProcess): 8145 (WebKit::WebProcessProxy::shouldTerminate): 8146 8147 Broke out the logic from the shouldTerminate() IPC message handler into a separate function 8148 so we can call it from removeWebPage(). 8149 81502013-05-11 Anders Carlsson <andersca@apple.com> 8151 8152 Crash when terminating a process that has not been fully launched 8153 https://bugs.webkit.org/show_bug.cgi?id=115962 8154 <rdar://problem/13660916> 8155 8156 Reviewed by Andreas Kling. 8157 8158 Handle terminating a process that has not been fully launched. 8159 8160 * UIProcess/Launcher/ProcessLauncher.cpp: 8161 (WebKit::ProcessLauncher::didFinishLaunchingProcess): 8162 If we have been invalidated, dispose the connection identifier. 8163 8164 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 8165 (WebKit::ProcessLauncher::terminateProcess): 8166 If we're still launching the process, invalidate so the client won't get an unexpected 8167 didFinishLaunching callback. 8168 8169 * UIProcess/WebProcessProxy.cpp: 8170 (WebKit::WebProcessProxy::requestTermination): 8171 Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched). 8172 81732013-05-10 Brian J. Burg <burg@cs.washington.edu> 8174 8175 Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save 8176 https://bugs.webkit.org/show_bug.cgi?id=115564 8177 8178 Reviewed by Benjamin Poulain. 8179 8180 Implement InspectorFrontendHost's save() and append() methods for 8181 Mac WebKit2. Add canSave() for all ports. 8182 8183 * UIProcess/WebInspectorProxy.cpp: 8184 (WebKit::WebInspectorProxy::save): 8185 (WebKit): 8186 (WebKit::WebInspectorProxy::append): 8187 * UIProcess/WebInspectorProxy.h: 8188 (WebInspectorProxy): 8189 * UIProcess/WebInspectorProxy.messages.in: 8190 * UIProcess/efl/WebInspectorProxyEfl.cpp: 8191 (WebKit::WebInspectorProxy::platformSave): 8192 (WebKit): 8193 (WebKit::WebInspectorProxy::platformAppend): 8194 * UIProcess/gtk/WebInspectorProxyGtk.cpp: 8195 (WebKit::WebInspectorProxy::platformSave): 8196 (WebKit): 8197 (WebKit::WebInspectorProxy::platformAppend): 8198 * UIProcess/mac/WebInspectorProxyMac.mm: 8199 (WebKit::WebInspectorProxy::platformSave): 8200 (WebKit): 8201 (WebKit::WebInspectorProxy::platformAppend): 8202 * UIProcess/qt/WebInspectorProxyQt.cpp: 8203 (WebKit::WebInspectorProxy::platformSave): 8204 (WebKit): 8205 (WebKit::WebInspectorProxy::platformAppend): 8206 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: 8207 (WebKit::WebInspectorFrontendClient::canSave): 8208 (WebKit): 8209 (WebKit::WebInspectorFrontendClient::save): 8210 (WebKit::WebInspectorFrontendClient::append): 8211 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: 8212 (WebInspectorFrontendClient): 8213 * WebProcess/WebPage/WebInspector.cpp: 8214 (WebKit::WebInspector::save): 8215 (WebKit): 8216 (WebKit::WebInspector::append): 8217 (WebKit::WebInspector::didSave): 8218 (WebKit::WebInspector::didAppend): 8219 * WebProcess/WebPage/WebInspector.h: 8220 (WebInspector): 8221 * WebProcess/WebPage/WebInspector.messages.in: 8222 * WebProcess/WebPage/efl/WebInspectorEfl.cpp: 8223 (WebKit::WebInspector::canSave): 8224 (WebKit): 8225 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: 8226 (WebKit::WebInspector::canSave): 8227 (WebKit): 8228 * WebProcess/WebPage/mac/WebInspectorMac.mm: 8229 (WebKit::WebInspector::canSave): 8230 (WebKit): 8231 * WebProcess/WebPage/qt/WebInspectorQt.cpp: 8232 (WebKit::WebInspector::canSave): 8233 (WebKit): 8234 82352013-05-10 Remy Demarest <rdemarest@apple.com> 8236 8237 Copy WKPluginInformation.h header to the WebKit2 Framework private headers. 8238 https://bugs.webkit.org/show_bug.cgi?id=115940 8239 8240 Reviewed by Darin Adler. 8241 8242 * WebKit2.xcodeproj/project.pbxproj: 8243 Move WKPluginInformation.h file from the framework's Project Headers to 8244 Private Headers. 8245 82462013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu> 8247 8248 [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912. 8249 8250 * Target.pri: 8251 82522013-05-10 Simon Cooper <scooper@apple.com> 8253 8254 Fix AppleConnect issues for WiFi interfaces 8255 <rdar://problem/13776227&13776240&13776281> 8256 https://bugs.webkit.org/show_bug.cgi?id=115932 8257 8258 Reviewed by Alexey Proskuryakov. 8259 8260 Add support for WiFi interfaces for the AppleConnect plugin. 8261 Remove the FIXME. 8262 8263 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 8264 82652013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu> 8266 8267 [Qt][Mac] Unreviewed speculative build fix after r149904. 8268 8269 * Target.pri: 8270 82712013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu> 8272 8273 [Qt] Unreviewed buildfix after r149904. 8274 8275 * Target.pri: 8276 82772013-05-09 Sam Weinig <sam@webkit.org> 8278 8279 Unify plug-in information dictionaries 8280 <rdar://problem/13852080> 8281 https://bugs.webkit.org/show_bug.cgi?id=115891 8282 8283 Reviewed by Anders Carlsson. 8284 8285 This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier 8286 and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient. 8287 8288 All the old keys will continue to work, but have been deprecated in favor of new keys defined in 8289 WKPluginInformation.h 8290 8291 * Shared/API/c/WKPluginInformation.cpp: Added. 8292 * Shared/API/c/WKPluginInformation.h: Added. 8293 Export new keys as SPI. 8294 8295 * Shared/Plugins/Netscape/PluginInformation.h: Added. 8296 * Shared/Plugins/Netscape/PluginInformation.cpp: Added. 8297 (WebKit::pluginInformationBundleIdentifierKey): 8298 (WebKit::pluginInformationBundleVersionKey): 8299 (WebKit::pluginInformationPathKey): 8300 (WebKit::pluginInformationDisplayNameKey): 8301 (WebKit::pluginInformationDefaultLoadPolicyKey): 8302 (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey): 8303 (WebKit::pluginInformationHasSandboxProfileKey): 8304 (WebKit::pluginInformationFrameURLKey): 8305 (WebKit::pluginInformationMIMETypeKey): 8306 (WebKit::pluginInformationPageURLKey): 8307 (WebKit::pluginInformationPluginspageAttributeURLKey): 8308 (WebKit::pluginInformationPluginURLKey): 8309 Add new keys. 8310 8311 (WebKit::pluginModuleInformation): 8312 (WebKit::createPluginInformationDictionary): 8313 Add creation functions to simplify multiple sites. 8314 8315 * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added. 8316 (WebKit::platformPluginModuleInformation): 8317 Add platform specific data to the dictionary. 8318 8319 * UIProcess/API/C/WKPage.cpp: 8320 (WKPageGetPluginInformationBundleIdentifierKey): 8321 (WKPageGetPluginInformationBundleVersionKey): 8322 (WKPageGetPluginInformationDisplayNameKey): 8323 (WKPageGetPluginInformationFrameURLKey): 8324 (WKPageGetPluginInformationMIMETypeKey): 8325 (WKPageGetPluginInformationPageURLKey): 8326 (WKPageGetPluginInformationPluginspageAttributeURLKey): 8327 (WKPageGetPluginInformationPluginURLKey): 8328 * UIProcess/API/C/WKPage.h: 8329 Deprecate the old keys. 8330 8331 * UIProcess/API/C/mac/WKContextPrivateMac.h: 8332 * UIProcess/API/C/mac/WKContextPrivateMac.mm: 8333 (WKContextCopyPlugInInfoForBundleIdentifier): 8334 (WKContextGetInfoForInstalledPlugIns): 8335 Simplify by using the new createPluginInformationDictionary functions. 8336 8337 (WKPlugInInfoPathKey): 8338 (WKPlugInInfoBundleIdentifierKey): 8339 (WKPlugInInfoVersionKey): 8340 (WKPlugInInfoLoadPolicyKey): 8341 (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey): 8342 (WKPlugInInfoIsSandboxedKey): 8343 Deprecate the old keys. 8344 8345 * UIProcess/WebLoaderClient.cpp: 8346 (WebKit::WebLoaderClient::didFailToInitializePlugin): 8347 (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): 8348 (WebKit::WebLoaderClient::pluginLoadPolicy): 8349 * UIProcess/WebLoaderClient.h: 8350 * UIProcess/WebUIClient.cpp: 8351 (WebKit::WebUIClient::unavailablePluginButtonClicked): 8352 * UIProcess/WebUIClient.h: 8353 Optimize for the most recent callback type which takes a dictionary, 8354 and pull out the necessary bits from it for deprecated callbacks as necessary. 8355 8356 * UIProcess/WebPageProxy.h: 8357 * UIProcess/WebPageProxy.cpp: 8358 (WebKit::WebPageProxy::findPlugin): 8359 (WebKit::WebPageProxy::unavailablePluginButtonClicked): 8360 (WebKit::WebPageProxy::didFailToInitializePlugin): 8361 (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 8362 Use createPluginInformationDictionary() consistently, to get consistent results for callbacks. 8363 8364 * WebKit2.xcodeproj/project.pbxproj: 8365 Add new files. 8366 83672013-05-10 Brian J. Burg <burg@cs.washington.edu> 8368 8369 Web Inspector: implement runOpenPanel callback for WebKit2 inspector 8370 https://bugs.webkit.org/show_bug.cgi?id=115865 8371 8372 Reviewed by Sam Weinig. 8373 8374 * UIProcess/WebInspectorProxy.h: 8375 (WebKit::WebInspectorProxy::inspectorWindow): 8376 Add an accessor for m_inspectorWindow. 8377 8378 * UIProcess/mac/WebInspectorProxyMac.mm: 8379 (WebKit::runOpenPanel): 8380 Show the open panel dialog when requested. 8381 8382 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 8383 Register the callback when the inspector page is created. 8384 83852013-05-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 8386 8387 [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific 8388 https://bugs.webkit.org/show_bug.cgi?id=115928 8389 8390 Reviewed by Kenneth Rohde Christiansen. 8391 8392 WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific. 8393 8394 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: 8395 * UIProcess/API/C/CoordinatedGraphics/WKView.h: 8396 * UIProcess/API/C/efl/WKViewEfl.cpp: 8397 (WKViewSetThemePath): 8398 * UIProcess/API/C/efl/WKViewEfl.h: 8399 * UIProcess/CoordinatedGraphics/WebView.cpp: 8400 * UIProcess/CoordinatedGraphics/WebView.h: 8401 (WebView): 8402 * UIProcess/efl/ViewClientEfl.cpp: 8403 * UIProcess/efl/WebInspectorProxyEfl.cpp: 8404 * UIProcess/efl/WebViewEfl.cpp: 8405 (WebKit::WebViewEfl::setThemePath): 8406 * UIProcess/efl/WebViewEfl.h: 8407 (WebViewEfl): 8408 84092013-05-10 Jer Noble <jer.noble@apple.com> 8410 8411 REGRESSION (r149439): Video turns blank upon entering full screen for the first time 8412 https://bugs.webkit.org/show_bug.cgi?id=115617 8413 8414 Reviewed by Eric Carlson. 8415 8416 Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these 8417 platforms, create a window with a NSZeroSize initial frame, which fixes the "blank" 8418 first-full screen behavior. 8419 8420 * UIProcess/API/mac/WKView.mm: 8421 (-[WKView createFullScreenWindow]): 8422 84232013-05-10 Zan Dobersek <zdobersek@igalia.com> 8424 8425 [WK2] Make the WebSoupRequestManager a supplement to the WebProcess 8426 https://bugs.webkit.org/show_bug.cgi?id=115717 8427 8428 Reviewed by Andreas Kling. 8429 8430 WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such 8431 by the WebProcess. This removes the need for the m_soupRequestManager member variable in 8432 the WebProcess class and brings the WebSoupRequestManager in line with other manager classes 8433 of which instances are controlled by the WebProcess class. 8434 8435 * WebProcess/WebProcess.cpp: 8436 (WebKit::WebProcess::WebProcess): Add the WebSoupRequestManager as a supplement. 8437 * WebProcess/WebProcess.h: 8438 (WebProcess): Remove the m_soupRequestManager member variable and its getter method. 8439 * WebProcess/soup/WebKitSoupRequestGeneric.cpp: 8440 (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement. 8441 (webkitSoupRequestGenericSendFinish): Ditto. 8442 * WebProcess/soup/WebProcessSoup.cpp: 8443 (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement. 8444 * WebProcess/soup/WebSoupRequestManager.cpp: 8445 (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name. 8446 * WebProcess/soup/WebSoupRequestManager.h: 8447 (WebSoupRequestManager): Inherit from the WebProcessSupplement interface. 8448 84492013-05-10 Carlos Garcia Campos <cgarcia@igalia.com> 8450 8451 [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs 8452 https://bugs.webkit.org/show_bug.cgi?id=115904 8453 8454 Reviewed by Martin Robinson. 8455 8456 * UIProcess/API/gtk/tests/TestInspectorServer.cpp: 8457 (startTestServerMonitor): 8458 * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: 8459 (startTestServerMonitor): 8460 84612013-05-09 Anders Carlsson <andersca@apple.com> 8462 8463 Fix build. 8464 8465 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: 8466 84672013-05-09 Anders Carlsson <andersca@apple.com> 8468 8469 Enable UI process storage 8470 https://bugs.webkit.org/show_bug.cgi?id=115879 8471 <rdar://problem/12239765> 8472 8473 Reviewed by Beth Dakin. 8474 8475 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 8476 Flip the switch. 8477 84782013-05-09 Anders Carlsson <andersca@apple.com> 8479 8480 Remove extra spaces between right angle brackets in template declarations 8481 https://bugs.webkit.org/show_bug.cgi?id=115877 8482 8483 Reviewed by Beth Dakin. 8484 8485 C++11 doesn't require spaces between right angle brackets so remove all of them. 8486 8487 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: 8488 (WebKit::NetworkBlobRegistry::registerBlobURL): 8489 (WebKit::NetworkBlobRegistry::sandboxExtensions): 8490 * NetworkProcess/FileAPI/NetworkBlobRegistry.h: 8491 (NetworkBlobRegistry): 8492 * NetworkProcess/HostRecord.h: 8493 (HostRecord): 8494 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 8495 (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): 8496 (WebKit::NetworkConnectionToWebProcess::didClose): 8497 (WebKit::NetworkConnectionToWebProcess::registerBlobURL): 8498 * NetworkProcess/NetworkConnectionToWebProcess.h: 8499 (NetworkConnectionToWebProcess): 8500 * NetworkProcess/NetworkProcess.h: 8501 (NetworkProcess): 8502 * NetworkProcess/NetworkResourceLoadScheduler.cpp: 8503 (WebKit::NetworkResourceLoadScheduler::servePendingRequests): 8504 (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): 8505 * NetworkProcess/NetworkResourceLoadScheduler.h: 8506 * NetworkProcess/SchedulableLoader.cpp: 8507 (WebKit::SchedulableLoader::SchedulableLoader): 8508 * NetworkProcess/SchedulableLoader.h: 8509 (SchedulableLoader): 8510 * Platform/CoreIPC/ArgumentCoders.h: 8511 * Platform/CoreIPC/Connection.cpp: 8512 (Connection::SyncMessageState): 8513 (CoreIPC::Connection::waitForMessage): 8514 (CoreIPC::Connection::processIncomingMessage): 8515 * Platform/CoreIPC/Connection.h: 8516 (Connection): 8517 * Platform/WorkQueue.h: 8518 (WorkQueue): 8519 * PluginProcess/PluginProcess.h: 8520 (PluginProcess): 8521 * Scripts/webkit2/messages_unittest.py: 8522 (CoreIPC): 8523 * Shared/BlockingResponseMap.h: 8524 (BlockingResponseMap): 8525 * Shared/ChildProcessProxy.h: 8526 (ChildProcessProxy): 8527 * Shared/ImmutableArray.cpp: 8528 (WebKit::ImmutableArray::ImmutableArray): 8529 * Shared/ImmutableArray.h: 8530 (WebKit::ImmutableArray::adopt): 8531 (ImmutableArray): 8532 * Shared/ImmutableDictionary.cpp: 8533 (WebKit::ImmutableDictionary::keys): 8534 * Shared/ImmutableDictionary.h: 8535 (ImmutableDictionary): 8536 * Shared/Network/CustomProtocols/CustomProtocolManager.h: 8537 (CustomProtocolManager): 8538 * Shared/SecurityOriginData.cpp: 8539 (WebKit::performAPICallbackWithSecurityOriginDataVector): 8540 * Shared/SessionState.cpp: 8541 * Shared/StatisticsData.h: 8542 (StatisticsData): 8543 * Shared/UserMessageCoders.h: 8544 (WebKit::UserMessageDecoder::baseDecode): 8545 * Shared/WebArchive.cpp: 8546 (WebKit::WebArchive::WebArchive): 8547 (WebKit::WebArchive::subresources): 8548 (WebKit::WebArchive::subframeArchives): 8549 * Shared/WebContextMenuItem.cpp: 8550 (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray): 8551 * Shared/WebOpenPanelParameters.cpp: 8552 (WebKit::WebOpenPanelParameters::acceptMIMETypes): 8553 (WebKit::WebOpenPanelParameters::selectedFileNames): 8554 * Shared/mac/ArgumentCodersMac.mm: 8555 (CoreIPC::encode): 8556 * SharedWorkerProcess/SharedWorkerProcess.h: 8557 (SharedWorkerProcess): 8558 * UIProcess/API/mac/WKPrintingView.h: 8559 (WebFrameProxy): 8560 * UIProcess/API/mac/WKPrintingView.mm: 8561 (-[WKPrintingView _drawPreview:]): 8562 * UIProcess/API/mac/WKView.mm: 8563 (WebKit): 8564 * UIProcess/Downloads/DownloadProxyMap.cpp: 8565 (WebKit::DownloadProxyMap::processDidClose): 8566 * UIProcess/Downloads/DownloadProxyMap.h: 8567 (DownloadProxyMap): 8568 * UIProcess/GeolocationPermissionRequestManagerProxy.h: 8569 (GeolocationPermissionRequestManagerProxy): 8570 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: 8571 (DynamicLinkerEnvironmentExtractor): 8572 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: 8573 (CustomProtocolManagerProxy): 8574 * UIProcess/Network/NetworkProcessProxy.h: 8575 (NetworkProcessProxy): 8576 * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: 8577 (NotificationPermissionRequestManagerProxy): 8578 * UIProcess/Notifications/WebNotificationManagerProxy.h: 8579 (WebNotificationManagerProxy): 8580 * UIProcess/Plugins/PluginProcessManager.h: 8581 (PluginProcessManager): 8582 * UIProcess/Plugins/PluginProcessProxy.h: 8583 (PluginProcessProxy): 8584 * UIProcess/Plugins/WebPluginSiteDataManager.cpp: 8585 (WebKit::WebPluginSiteDataManager::didGetSitesWithData): 8586 * UIProcess/Plugins/WebPluginSiteDataManager.h: 8587 (WebPluginSiteDataManager): 8588 * UIProcess/SharedWorkers/SharedWorkerProcessManager.h: 8589 (SharedWorkerProcessManager): 8590 * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: 8591 (SharedWorkerProcessProxy): 8592 * UIProcess/StatisticsRequest.cpp: 8593 (WebKit::StatisticsRequest::completedRequest): 8594 * UIProcess/Storage/StorageManager.cpp: 8595 (StorageManager::StorageArea): 8596 (WebKit::StorageManager::StorageArea::dispatchEvents): 8597 (StorageManager::SessionStorageNamespace): 8598 (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): 8599 (WebKit::StorageManager::SessionStorageNamespace::cloneTo): 8600 (WebKit::StorageManager::createLocalStorageMap): 8601 (WebKit::StorageManager::createSessionStorageMap): 8602 (WebKit::StorageManager::destroyStorageMap): 8603 (WebKit::StorageManager::invalidateConnectionInternal): 8604 (WebKit::StorageManager::findStorageArea): 8605 (WebKit::StorageManager::getOrCreateLocalStorageNamespace): 8606 * UIProcess/Storage/StorageManager.h: 8607 (StorageManager): 8608 * UIProcess/WebApplicationCacheManagerProxy.h: 8609 (WebApplicationCacheManagerProxy): 8610 * UIProcess/WebBackForwardList.cpp: 8611 (WebKit::WebBackForwardList::addItem): 8612 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit): 8613 (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit): 8614 (WebKit::WebBackForwardList::clear): 8615 * UIProcess/WebBackForwardList.h: 8616 (WebKit): 8617 * UIProcess/WebContext.cpp: 8618 (WebKit::WebContext::createNewWebProcess): 8619 (WebKit::WebContext::enableProcessTermination): 8620 (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): 8621 * UIProcess/WebContext.h: 8622 (WebContext): 8623 * UIProcess/WebCookieManagerProxy.cpp: 8624 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): 8625 * UIProcess/WebCookieManagerProxy.h: 8626 (WebCookieManagerProxy): 8627 * UIProcess/WebDatabaseManagerProxy.cpp: 8628 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin): 8629 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins): 8630 * UIProcess/WebDatabaseManagerProxy.h: 8631 (WebDatabaseManagerProxy): 8632 * UIProcess/WebFormClient.cpp: 8633 (WebKit::WebFormClient::willSubmitForm): 8634 * UIProcess/WebFormClient.h: 8635 (WebFormClient): 8636 * UIProcess/WebKeyValueStorageManagerProxy.h: 8637 (WebKeyValueStorageManagerProxy): 8638 * UIProcess/WebLoaderClient.cpp: 8639 (WebKit::WebLoaderClient::didChangeBackForwardList): 8640 * UIProcess/WebLoaderClient.h: 8641 (WebLoaderClient): 8642 * UIProcess/WebMediaCacheManagerProxy.cpp: 8643 (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): 8644 * UIProcess/WebMediaCacheManagerProxy.h: 8645 (WebMediaCacheManagerProxy): 8646 * UIProcess/WebPageContextMenuClient.cpp: 8647 (WebKit::WebPageContextMenuClient::showContextMenu): 8648 * UIProcess/WebPageProxy.cpp: 8649 (ExceededDatabaseQuotaRecords): 8650 (WebKit::WebPageProxy::relatedPages): 8651 (WebKit::WebPageProxy::didChangeBackForwardList): 8652 (WebKit::WebPageProxy::handleWheelEvent): 8653 (WebKit::WebPageProxy::processNextQueuedWheelEvent): 8654 (WebKit::WebPageProxy::findStringMatches): 8655 (WebKit::WebPageProxy::willSubmitForm): 8656 (WebKit::WebPageProxy::pluginInformationDictionary): 8657 (WebKit::WebPageProxy::didFindStringMatches): 8658 (WebKit::WebPageProxy::didReceiveEvent): 8659 * UIProcess/WebPageProxy.h: 8660 (WebPageProxy): 8661 * UIProcess/WebPageProxy.messages.in: 8662 * UIProcess/WebProcessProxy.cpp: 8663 (WebKit::WebProcessProxy::disconnect): 8664 (WebKit::WebProcessProxy::didClose): 8665 (WebKit::WebProcessProxy::didBecomeUnresponsive): 8666 (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): 8667 (WebKit::WebProcessProxy::didBecomeResponsive): 8668 (WebKit::WebProcessProxy::disconnectFramesFromPage): 8669 (WebKit::WebProcessProxy::frameCountInPage): 8670 * UIProcess/WebProcessProxy.h: 8671 (WebProcessProxy): 8672 * UIProcess/WebResourceCacheManagerProxy.h: 8673 (WebResourceCacheManagerProxy): 8674 * UIProcess/mac/WebContextMenuProxyMac.mm: 8675 (WebKit::populateNSMenu): 8676 (WebKit::nsMenuItemVector): 8677 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: 8678 (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): 8679 * WebProcess/Geolocation/WebGeolocationManager.cpp: 8680 (WebKit::WebGeolocationManager::didChangePosition): 8681 (WebKit::WebGeolocationManager::didFailToDeterminePosition): 8682 * WebProcess/IconDatabase/WebIconDatabaseProxy.h: 8683 (WebIconDatabaseProxy): 8684 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: 8685 * WebProcess/InjectedBundle/InjectedBundle.cpp: 8686 (WebKit::InjectedBundle::originsWithApplicationCache): 8687 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp: 8688 (WebKit::InjectedBundleBackForwardListItem::children): 8689 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: 8690 (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): 8691 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: 8692 (InjectedBundlePageEditorClient): 8693 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: 8694 (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent): 8695 (WebKit::InjectedBundlePageFormClient::willSubmitForm): 8696 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: 8697 (InjectedBundlePageFormClient): 8698 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: 8699 (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage): 8700 * WebProcess/Network/WebResourceLoadScheduler.cpp: 8701 (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired): 8702 (WebKit::WebResourceLoadScheduler::networkProcessCrashed): 8703 * WebProcess/Network/WebResourceLoadScheduler.h: 8704 (WebResourceLoadScheduler): 8705 * WebProcess/Notifications/NotificationPermissionRequestManager.h: 8706 (NotificationPermissionRequestManager): 8707 * WebProcess/Notifications/WebNotificationManager.h: 8708 (WebNotificationManager): 8709 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 8710 (WebKit::NPRuntimeObjectMap::invalidate): 8711 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 8712 (NPRuntimeObjectMap): 8713 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 8714 (WebKit::NetscapePlugin::stopAllStreams): 8715 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 8716 (NetscapePlugin): 8717 * WebProcess/Plugins/Netscape/NetscapePluginStream.h: 8718 (NetscapePluginStream): 8719 * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: 8720 (getAllScriptsInPDFDocument): 8721 (WebKit::SimplePDFPlugin::runScriptsInPDFDocument): 8722 * WebProcess/Plugins/PluginProcessConnectionManager.h: 8723 (PluginProcessConnectionManager): 8724 * WebProcess/Plugins/PluginView.cpp: 8725 (WebKit::PluginView::cancelAllStreams): 8726 * WebProcess/Plugins/PluginView.h: 8727 (PluginView): 8728 * WebProcess/Storage/StorageAreaMap.cpp: 8729 (WebKit::StorageAreaMap::dispatchSessionStorageEvent): 8730 (WebKit::StorageAreaMap::dispatchLocalStorageEvent): 8731 * WebProcess/Storage/StorageNamespaceImpl.cpp: 8732 (WebKit::StorageNamespaceImpl::storageArea): 8733 * WebProcess/Storage/StorageNamespaceImpl.h: 8734 (StorageNamespaceImpl): 8735 * WebProcess/Storage/WebKeyValueStorageManager.cpp: 8736 (WebKit::keyValueStorageOriginIdentifiers): 8737 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: 8738 (WebKit::WebDatabaseManager::getDatabasesByOrigin): 8739 (WebKit::WebDatabaseManager::getDatabaseOrigins): 8740 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 8741 (WebKit::WebEditorClient::getClientPasteboardDataForRange): 8742 * WebProcess/WebCoreSupport/WebEditorClient.h: 8743 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 8744 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 8745 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 8746 (WebKit::WebEditorClient::documentFragmentFromAttributedString): 8747 * WebProcess/WebPage/EventDispatcher.h: 8748 (EventDispatcher): 8749 * WebProcess/WebPage/FindController.cpp: 8750 (WebKit::FindController::findStringMatches): 8751 * WebProcess/WebPage/FindController.h: 8752 (FindController): 8753 * WebProcess/WebPage/WebBackForwardListProxy.cpp: 8754 (WebKit): 8755 * WebProcess/WebPage/WebFrame.cpp: 8756 (WebKit::WebFrame::childFrames): 8757 * WebProcess/WebPage/WebPage.cpp: 8758 (WebKit::WebPage::trackedRepaintRects): 8759 * WebProcess/WebPage/WebPage.h: 8760 (WebKit): 8761 (WebPage): 8762 * WebProcess/WebPage/mac/LayerTreeHostMac.h: 8763 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: 8764 (TiledCoreAnimationDrawingArea): 8765 * WebProcess/WebProcess.cpp: 8766 (WebKit::WebProcess::visitedLinkStateChanged): 8767 (WebKit::WebProcess::allVisitedLinkStateChanged): 8768 (WebKit::WebProcess::focusedWebPage): 8769 (WebKit::WebProcess::createWebPage): 8770 (WebKit::WebProcess::didClose): 8771 (WebKit::WebProcess::webPageGroup): 8772 (WebKit::addCaseFoldedCharacters): 8773 (WebKit::getWebCoreMemoryCacheStatistics): 8774 (WebKit::WebProcess::setTextCheckerState): 8775 * WebProcess/WebProcess.h: 8776 (WebProcess): 8777 87782013-05-09 Anders Carlsson <andersca@apple.com> 8779 8780 Implement WebPlatformStrategies::transientLocalStorageNamespace 8781 https://bugs.webkit.org/show_bug.cgi?id=115876 8782 <rdar://problem/13852871> 8783 8784 Reviewed by Beth Dakin. 8785 8786 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 8787 (WebKit::WebPlatformStrategies::transientLocalStorageNamespace): 8788 Return a session storage namespace for a random page when UI process storage is enabled, 8789 otherwise call the base class implementation. 8790 87912013-05-09 Anders Carlsson <andersca@apple.com> 8792 8793 Use explicit qualifiers for names in the std:: namespace 8794 https://bugs.webkit.org/show_bug.cgi?id=115868 8795 8796 Reviewed by Andreas Kling. 8797 8798 * Shared/mac/ArgumentCodersMac.mm: 8799 (CoreIPC::encode): 8800 * UIProcess/API/C/WKPluginSiteDataManager.cpp: 8801 (WKPluginSiteDataManagerClearAllSiteData): 8802 * UIProcess/Plugins/PluginInfoStore.cpp: 8803 (WebKit::PluginInfoStore::findPluginForExtension): 8804 * UIProcess/WebFrameProxy.cpp: 8805 * UIProcess/WebProcessProxy.cpp: 8806 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 8807 (WebKit::parsePostBuffer): 8808 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 8809 (WebKit::NetscapePlugin::loadURL): 8810 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: 8811 (WebKit::NetscapePluginStream::deliverDataToPlugin): 8812 * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: 8813 * WebProcess/WebPage/DrawingAreaImpl.cpp: 8814 * WebProcess/WebPage/FindController.cpp: 8815 (WebKit::FindController::countStringMatches): 8816 (WebKit::FindController::updateFindUIAfterPageScroll): 8817 * WebProcess/WebPage/WebPage.cpp: 8818 * WebProcess/WebPage/mac/WebPageMac.mm: 8819 (WebKit::drawPDFPage): 8820 * WebProcess/mac/WebProcessMac.mm: 8821 88222013-05-09 Max Feil <mfeil@rim.com> 8823 8824 shouldUsePluginDocument() needs to be respected when a document is created 8825 https://bugs.webkit.org/show_bug.cgi?id=110308 8826 8827 Reviewed by Rob Buis. 8828 8829 Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument() 8830 for clarity. 8831 8832 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 8833 (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument): 8834 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 8835 (WebFrameLoaderClient): 8836 88372013-05-09 Timothy Hatcher <timothy@apple.com> 8838 8839 Make dragging off a tab in Safari with a docked Inspector reattach the Inspector. 8840 8841 https://webkit.org/b/115832 8842 rdar://problem/13605661 8843 8844 Reviewed by Benjamin Poulain. 8845 8846 * UIProcess/mac/WebInspectorProxyMac.mm: 8847 (WebKit::WebInspectorProxy::platformBringToFront): 8848 If the Web Inspector is no longer in the same window as the inspected view, 8849 then we need to reopen the Inspector to get it attached to the right window. 8850 88512013-05-08 Anders Carlsson <andersca@apple.com> 8852 8853 Fix a typo in a comment. 8854 8855 Rubber-stamped by Darin Adler. 8856 8857 * WebProcess/WebProcess.cpp: 8858 (WebKit::WebProcess::initializeConnection): 8859 88602013-05-08 Anders Carlsson <andersca@apple.com> 8861 8862 Remove bogus StorageAreaMap assertions 8863 https://bugs.webkit.org/show_bug.cgi?id=115838 8864 8865 Reviewed by Sam Weinig. 8866 8867 It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions. 8868 8869 * WebProcess/Storage/StorageAreaMap.cpp: 8870 (WebKit::StorageAreaMap::didGetValues): 8871 (WebKit::StorageAreaMap::didClear): 8872 88732013-05-08 Anders Carlsson <andersca@apple.com> 8874 8875 Handle incoming clear operations 8876 https://bugs.webkit.org/show_bug.cgi?id=115829 8877 8878 Reviewed by Sam Weinig. 8879 8880 Handle clear by building up a new storage map with our pending changes. 8881 8882 * WebProcess/Storage/StorageAreaMap.cpp: 8883 (WebKit::StorageAreaMap::applyChange): 8884 88852013-05-08 Anders Carlsson <andersca@apple.com> 8886 8887 Don't apply changes while we're clearing the database 8888 https://bugs.webkit.org/show_bug.cgi?id=115826 8889 8890 Reviewed by Darin Adler. 8891 8892 * UIProcess/Storage/LocalStorageDatabase.cpp: 8893 (WebKit::LocalStorageDatabase::openDatabase): 8894 Only call didOpenDatabaseWithOrigin if we actually did open the database. 8895 8896 (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems): 8897 Create the database if needed. 8898 8899 * UIProcess/Storage/StorageManager.cpp: 8900 (WebKit::StorageManager::getValues): 8901 Send back a DidGetValues message. 8902 8903 * WebProcess/Storage/StorageAreaMap.cpp: 8904 (WebKit::StorageAreaMap::StorageAreaMap): 8905 Initialize m_hasPendingClear. 8906 8907 (WebKit::StorageAreaMap::clear): 8908 Set m_hasPendingClear to true. 8909 8910 (WebKit::StorageAreaMap::resetValues): 8911 Set m_hasPendingClear back to false. 8912 8913 (WebKit::StorageAreaMap::loadValuesIfNeeded): 8914 Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items. 8915 8916 (WebKit::StorageAreaMap::didGetValues): 8917 Set m_hasPendingClear back to false. 8918 8919 (WebKit::StorageAreaMap::didClear): 8920 Set m_hasPendingClear back to false. 8921 8922 (WebKit::StorageAreaMap::applyChange): 8923 Don't apply the change if m_hasPendingClear is true. 8924 8925 * WebProcess/Storage/StorageAreaMap.messages.in: 8926 Add DidGetValues message. 8927 89282013-05-08 Andy Estes <aestes@apple.com> 8929 8930 [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme 8931 https://bugs.webkit.org/show_bug.cgi?id=115790 8932 8933 Reviewed by Alexey Proskuryakov. 8934 8935 NSMutableSet does not support adding or removing nil objects, and 8936 WTF::HashSet does not support adding, removing, or checking for null 8937 WTF::Strings. 8938 8939 For the NSMutableSet case, make sure that we don't try to add or remove 8940 nil NSStrings. 8941 8942 For the WTF::HashSet case, NSURL will return a nil NSString if we ask 8943 it for its scheme when it is invalid, which we will convert to a null 8944 WTF::String. Don't try to check if our HashSet of registered schemes 8945 contains a null String. 8946 8947 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 8948 (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme 8949 isn't null. We reject null schemes at the WKBrowsingContextController level. 8950 (WebKit::CustomProtocolManager::unregisterScheme): Ditto. 8951 (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false. 8952 * UIProcess/API/mac/WKBrowsingContextController.mm: 8953 (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme. 8954 (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto. 8955 89562013-05-08 Anders Carlsson <andersca@apple.com> 8957 8958 Apply remote changes to storage maps locally 8959 https://bugs.webkit.org/show_bug.cgi?id=115825 8960 8961 Reviewed by Beth Dakin. 8962 8963 * WebProcess/Storage/StorageAreaMap.cpp: 8964 (WebKit::StorageAreaMap::resetValues): 8965 Clear the pending values map. 8966 8967 (WebKit::StorageAreaMap::didSetItem): 8968 If we failed to set the item, forget everything we know about this storage map. 8969 Otherwise, remove the pending item. 8970 8971 (WebKit::StorageAreaMap::didRemoveItem): 8972 Remove the pending item. 8973 8974 (WebKit::StorageAreaMap::shouldApplyChangeForKey): 8975 Helper function that returns whether a change for a given key should be applied. 8976 8977 (WebKit::StorageAreaMap::applyChange): 8978 Apply the change. Currently only adds and removes are handled. 8979 8980 (WebKit::StorageAreaMap::dispatchStorageEvent): 8981 Apply the change locally as well if needed. 8982 8983 * WebProcess/Storage/StorageAreaMap.h: 8984 89852013-05-08 Anders Carlsson <andersca@apple.com> 8986 8987 Assert at compile time that we don't pass Objective-C object pointers to adoptCF 8988 https://bugs.webkit.org/show_bug.cgi?id=115823 8989 8990 Reviewed by Geoffrey Garen. 8991 8992 Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr, 8993 but this will do for now. 8994 8995 * Shared/mac/ArgumentCodersMac.mm: 8996 (CoreIPC::decode): 8997 89982013-05-08 Sam Weinig <sam@webkit.org> 8999 9000 Add SPI to determine if a plugin is sandboxed 9001 https://bugs.webkit.org/show_bug.cgi?id=115810 9002 9003 Reviewed by Anders Carlsson. 9004 9005 * PluginProcess/mac/PluginProcessMac.mm: 9006 (WebKit::PluginProcess::initializeSandbox): 9007 * Shared/Plugins/mac/PluginSandboxProfile.h: Added. 9008 * Shared/Plugins/mac/PluginSandboxProfile.mm: Added. 9009 (WebKit::pluginSandboxProfileDefaultDirectory): 9010 (WebKit::pluginSandboxProfileDirectories): 9011 (WebKit::pluginSandboxProfileName): 9012 (WebKit::pluginSandboxCommonProfile): 9013 (WebKit::pluginSandboxProfileForDirectory): 9014 (WebKit::pluginSandboxProfile): 9015 (WebKit::pluginHasSandboxProfileForDirectory): 9016 (WebKit::pluginHasSandboxProfile): 9017 Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function 9018 which uses the newly refactored code. 9019 9020 * UIProcess/API/C/mac/WKContextPrivateMac.h: 9021 * UIProcess/API/C/mac/WKContextPrivateMac.mm: 9022 (WKPlugInInfoIsSandboxedKey): 9023 (createInfoDictionary): 9024 Add WKPlugInInfoIsSandboxedKey. 9025 9026 * WebKit2.xcodeproj/project.pbxproj: 9027 Add new files. 9028 90292013-05-08 Anders Carlsson <andersca@apple.com> 9030 9031 Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction) 9032 https://bugs.webkit.org/show_bug.cgi?id=115814 9033 <rdar://problem/12331258> 9034 9035 Reviewed by Andreas Kling. 9036 9037 To ensure that any asynchronous messages are delivered to the UI process before 9038 synchronous messages (except when doing so would lead to a deadlock), Call 9039 setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections. 9040 9041 * WebProcess/WebProcess.cpp: 9042 (WebKit::WebProcess::initializeConnection): 9043 90442013-05-08 Tim Horton <timothy_horton@apple.com> 9045 9046 Coalesce WKView visibleRect changes 9047 https://bugs.webkit.org/show_bug.cgi?id=115792 9048 <rdar://problem/13776842> 9049 9050 Reviewed by Simon Fraser. 9051 9052 The system can call renewGState much more often than we actually want 9053 to update the WebProcess' notion of the exposed rect. Most importantly, 9054 within an autolayout pass it is called many times, and often sees 9055 [WKView visibleRect] be an intermediate value which will never be 9056 flushed to the screen. We only care about the final value, so we should 9057 wait until AppKit has finished - with a zero-delay timer - to inform the 9058 WebProcess of exposed rect changes. 9059 9060 * UIProcess/WebPageProxy.cpp: 9061 (WebKit::WebPageProxy::WebPageProxy): 9062 Add exposedRectChangedTimer. 9063 (WebKit::WebPageProxy::close): 9064 Cancel exposedRectChangedTimer when tearing down the WebPageProxy. 9065 * UIProcess/WebPageProxy.h: 9066 (WebPageProxy): 9067 Add exposedRectChangedTimerFired, the timer itself, and two rects: 9068 the most recent exposed rect from the WKView, and the last one we actually 9069 sent across to the WebProcess. 9070 * UIProcess/mac/WebPageProxyMac.mm: 9071 (WebKit::WebPageProxy::viewExposedRectChanged): 9072 Instead of immediately sending exposed rect changes to the WebProcess, 9073 start a zero-delay timer to do so. 9074 (WebKit::WebPageProxy::exposedRectChangedTimerFired): 9075 Once the zero-delay timer fires, send the new exposed rect to the WebProcess. 9076 90772013-05-08 Alexey Proskuryakov <ap@apple.com> 9078 9079 <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers 9080 <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices 9081 9082 Reviewed by Anders Carlsson. 9083 9084 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more 9085 TextServices and NSInputManager directories. 9086 90872013-05-08 Anders Carlsson <andersca@apple.com> 9088 9089 Remove BinarySemaphoreWin.cpp. 9090 9091 Rubber-stamped by Beth Dakin. 9092 9093 BinarySemaphoreWin has been moved to WTF, but the original was never removed. 9094 9095 * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed. 9096 90972013-05-08 Zan Dobersek <zdobersek@igalia.com> 9098 9099 [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess 9100 https://bugs.webkit.org/show_bug.cgi?id=115716 9101 9102 Reviewed by Andreas Kling. 9103 9104 WebNetworkInfoManager should inherit from WebProcessSupplement and should be used 9105 as such by the WebProcess. This removes the need for the m_networkInfoManager member 9106 variable in the WebProcess class and brings the WebNetworkInfoManager in line with 9107 other manager classes of which instances are controlled by the WebProcess class. 9108 9109 * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: 9110 (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name. 9111 (WebKit): 9112 * WebProcess/NetworkInfo/WebNetworkInfoManager.h: 9113 (WebKit): Alphabetically reorder the two forwarding declarations. 9114 (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface. 9115 * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: 9116 (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement. 9117 (WebKit::WebNetworkInfoClient::metered): Ditto. 9118 (WebKit::WebNetworkInfoClient::startUpdating): Ditto. 9119 (WebKit::WebNetworkInfoClient::stopUpdating): Ditto. 9120 (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto. 9121 * WebProcess/WebProcess.cpp: 9122 (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement. 9123 * WebProcess/WebProcess.h: 9124 (WebProcess): Remove the m_networkInfoManager member variable and its getter method. 9125 91262013-05-08 Zan Dobersek <zdobersek@igalia.com> 9127 9128 [WK2] Make the WebBatteryManager a supplement to the WebProcess 9129 https://bugs.webkit.org/show_bug.cgi?id=115715 9130 9131 Reviewed by Andreas Kling. 9132 9133 WebBatteryManager should inherit from WebProcessSupplement and should be used as such 9134 by the WebProcess. This removes the need for the m_batteryManager member variable in 9135 the WebProcess class and brings the WebBatteryManager in line with other manager classes 9136 of which instances are controlled by the WebProcess class. 9137 9138 * WebProcess/Battery/WebBatteryManager.cpp: 9139 (WebKit::WebBatteryManager::supplementName): Specify the supplement's name. 9140 (WebKit): 9141 * WebProcess/Battery/WebBatteryManager.h: 9142 (WebBatteryManager): Inherit from the WebProcessSupplement interface. 9143 * WebProcess/WebCoreSupport/WebBatteryClient.cpp: 9144 (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement. 9145 (WebKit::WebBatteryClient::stopUpdating): Ditto. 9146 (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto. 9147 * WebProcess/WebProcess.cpp: 9148 (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement. 9149 * WebProcess/WebProcess.h: 9150 (WebProcess): Remove the m_batteryManager member variable and its getter method. 9151 91522013-05-06 Darin Adler <darin@apple.com> 9153 9154 Use adoptCF and adoptNS in more places 9155 https://bugs.webkit.org/show_bug.cgi?id=115657 9156 9157 Reviewed by Sam Weinig. 9158 9159 * Shared/Downloads/cfnet/DownloadCFNet.cpp: 9160 (WebKit::Download::useCredential): 9161 (WebKit::Download::start): 9162 (WebKit::Download::startWithHandle): 9163 (WebKit::Download::cancel): 9164 (WebKit::Download::didDecideDestination): 9165 Use adoptCF and adoptNS. 9166 91672013-05-06 Sam Weinig <sam@webkit.org> 9168 9169 Add SPI to get an array of all the installed plug-ins 9170 https://bugs.webkit.org/show_bug.cgi?id=115688 9171 9172 Reviewed by Anders Carlsson. 9173 9174 * UIProcess/API/C/mac/WKContextPrivateMac.h: 9175 * UIProcess/API/C/mac/WKContextPrivateMac.mm: 9176 (createInfoDictionary): 9177 Extract creation of info dictionary into helper. 9178 (WKContextCopyPlugInInfoForBundleIdentifier): 9179 Modified to use the new helper. 9180 (WKContextGetInfoForInstalledPlugIns): 9181 Added. 9182 91832013-05-07 Anders Carlsson <andersca@apple.com> 9184 9185 Clean up KeyframeValueList and related classes 9186 https://bugs.webkit.org/show_bug.cgi?id=115738 9187 9188 Reviewed by Simon Fraser. 9189 9190 Update for WebCore changes. 9191 9192 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 9193 (CoreIPC::::decode): 9194 91952013-05-07 Anders Carlsson <andersca@apple.com> 9196 9197 Add and remove databases and origins from the database tracker 9198 https://bugs.webkit.org/show_bug.cgi?id=115752 9199 9200 Reviewed by Andreas Kling. 9201 9202 * UIProcess/Storage/LocalStorageDatabase.cpp: 9203 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9204 Rename m_databaseFilename to m_databasePath. 9205 9206 (WebKit::LocalStorageDatabase::tryToOpenDatabase): 9207 Rename m_databaseFilename to m_databasePath. 9208 9209 * UIProcess/Storage/LocalStorageDatabase.h: 9210 Rename m_databaseFilename to m_databasePath. 9211 9212 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9213 (WebKit::LocalStorageDatabaseTracker::databasePath): 9214 Rename databaseFilename to databasePath. 9215 9216 (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin): 9217 Call addDatabaseWithOriginIdentifier. 9218 9219 (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin): 9220 Call removeDatabaseWithOriginIdentifier. 9221 9222 (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath): 9223 Call databasePath instead of databaseFile. 9224 9225 (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase): 9226 Bail if the database is already open. 9227 9228 (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles): 9229 Call addDatabaseWithOriginIdentifier if this is an origin we don't know about. 9230 9231 (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier): 9232 Add the database to the Origins table. 9233 9234 (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier): 9235 remove the database from the Origins table and delete it. 9236 9237 (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier): 9238 Helper function that looks up a database path given its identifier. 9239 9240 * UIProcess/Storage/LocalStorageDatabaseTracker.h: 9241 Rename databaseFile to databasePath. 9242 92432013-05-07 Anders Carlsson <andersca@apple.com> 9244 9245 The storage database tracker should know when databases come and go 9246 https://bugs.webkit.org/show_bug.cgi?id=115748 9247 9248 Reviewed by Andreas Kling. 9249 9250 * UIProcess/Storage/LocalStorageDatabase.cpp: 9251 (WebKit::LocalStorageDatabase::openDatabase): 9252 If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin. 9253 9254 (WebKit::LocalStorageDatabase::tryToOpenDatabase): 9255 Remove a FIXME; we run all storage related things on the same thread. 9256 9257 (WebKit::LocalStorageDatabase::close): 9258 Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin. 9259 9260 (WebKit::LocalStorageDatabase::databaseIsEmpty): 9261 Helper function for determining whether a database is empty. 9262 9263 * UIProcess/Storage/LocalStorageDatabase.h: 9264 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9265 (WebKit::LocalStorageDatabaseTracker::databaseFilename): 9266 Add ".localstorage" to the filename. 9267 9268 (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin): 9269 (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin): 9270 Add empty stubs. 9271 92722013-05-07 Brady Eidson <beidson@apple.com> 9273 9274 Add JoinExistingSession to the Networking XPC. 9275 <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991 9276 9277 Reviewed by Sam Weinig. 9278 9279 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: 9280 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: 9281 92822013-05-07 Anders Carlsson <andersca@apple.com> 9283 9284 REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal 9285 https://bugs.webkit.org/show_bug.cgi?id=115711 9286 9287 Reviewed by Andreas Kling. 9288 9289 Handle setting the local storage directory more than once. 9290 9291 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9292 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): 9293 Close the database (if necessary) and clear the origins map before importing the origin identifiers. 9294 92952013-05-07 Antoine Quint <graouts@apple.com> 9296 9297 Re-establish autostart timeout extension on user interaction 9298 https://bugs.webkit.org/show_bug.cgi?id=113232 9299 9300 Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of 9301 (pluginOrigin, pageOrigin, mimeType) arguments like the other similar 9302 WebProcess methods and gather these arguments from the PlugInView's 9303 plug-in element. 9304 9305 Reviewed by Dean Jackson. 9306 9307 * WebProcess/Plugins/PluginView.cpp: 9308 (WebKit::PluginView::pluginDidReceiveUserInteraction): 9309 Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the 9310 tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction(). 9311 9312 * WebProcess/WebProcess.cpp: 9313 (WebKit::WebProcess::plugInDidReceiveUserInteraction): 9314 * WebProcess/WebProcess.h: 9315 (WebProcess): 9316 Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType) 9317 and obtain the plug-in origin hash from that. 9318 93192013-05-07 Anders Carlsson <andersca@apple.com> 9320 9321 Each local storage database should know its origin 9322 https://bugs.webkit.org/show_bug.cgi?id=115737 9323 9324 Reviewed by Andreas Kling. 9325 9326 Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker. 9327 9328 * UIProcess/Storage/LocalStorageDatabase.cpp: 9329 (WebKit::LocalStorageDatabase::create): 9330 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9331 * UIProcess/Storage/LocalStorageDatabase.h: 9332 (LocalStorageDatabase): 9333 93342013-05-07 Brady Eidson <beidson@apple.com> 9335 9336 Remove some unnecessary soft linking in NetworkProcess. (Take 2) 9337 <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683 9338 9339 Reviewed by Dean Jackson and owned by Andreas Kling. 9340 9341 As a followup to r149651, include the private headers conditionally. 9342 Also, fix a bug introduced with r149651 (bool vs CFBooleanRef). 9343 9344 * NetworkProcess/mac/DiskCacheMonitor.mm: 9345 * NetworkProcess/mac/NetworkResourceLoaderMac.mm: 9346 (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): 9347 93482013-05-07 Jinwoo Song <jinwoo7.song@samsung.com> 9349 9350 [EFL][WK2] Add ewk APIs for setting and getting user agent 9351 https://bugs.webkit.org/show_bug.cgi?id=114429 9352 9353 Reviewed by Andreas Kling. 9354 9355 Provide ewk_view_user_agent_get/set APIs which wraps WK APIs. 9356 9357 * UIProcess/API/efl/EwkView.cpp: 9358 (EwkView::EwkView): 9359 (EwkView::setUserAgent): 9360 * UIProcess/API/efl/EwkView.h: 9361 (EwkView::userAgent): 9362 (EwkView): 9363 * UIProcess/API/efl/ewk_view.cpp: 9364 (ewk_view_user_agent_get): 9365 (ewk_view_user_agent_set): 9366 * UIProcess/API/efl/ewk_view.h: 9367 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 9368 (TEST_F): 9369 93702013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 9371 9372 HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance 9373 https://bugs.webkit.org/show_bug.cgi?id=115646 9374 9375 Reviewed by Darin Adler. 9376 9377 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 9378 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): 9379 * NetworkProcess/NetworkResourceLoadScheduler.cpp: 9380 (WebKit::NetworkResourceLoadScheduler::hostForURL): 9381 * Shared/ImmutableDictionary.h: 9382 (WebKit::ImmutableDictionary::get): 9383 * UIProcess/Storage/StorageManager.cpp: 9384 (WebKit::StorageManager::createSessionStorageMap): 9385 (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): 9386 (WebKit::StorageManager::findStorageArea): 9387 * UIProcess/WebContext.h: 9388 (WebKit::WebContext::supplement): 9389 * UIProcess/WebProcessProxy.cpp: 9390 (WebKit::WebProcessProxy::webBackForwardItem): 9391 (WebKit::WebProcessProxy::webFrame): 9392 * UIProcess/efl/DownloadManagerEfl.cpp: 9393 (WebKit::DownloadManagerEfl::ewkDownloadJob): 9394 * WebProcess/Network/WebResourceLoadScheduler.h: 9395 (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier): 9396 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 9397 (WebKit::NetscapePlugin::streamFromID): 9398 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 9399 (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): 9400 * WebProcess/Plugins/PluginView.cpp: 9401 (WebKit::PluginView::cancelStreamLoad): 9402 * WebProcess/WebPage/EventDispatcher.cpp: 9403 (WebKit::EventDispatcher::wheelEvent): 9404 * WebProcess/WebPage/WebBackForwardListProxy.cpp: 9405 (WebKit::WebBackForwardListProxy::itemForID): 9406 (WebKit::WebBackForwardListProxy::itemAtIndex): 9407 * WebProcess/WebPage/WebPage.cpp: 9408 (WebKit::WebPage::webUndoStep): 9409 (WebKit::WebPage::didFinishCheckingText): 9410 (WebKit::WebPage::didCancelCheckingText): 9411 * WebProcess/WebProcess.cpp: 9412 (WebKit::WebProcess::webPage): 9413 (WebKit::WebProcess::webPageGroup): 9414 Updated accordingly to new HashMap<.., RefPtr>::get() semantics. 9415 94162013-05-06 Zoltan Arvai <zarvai@inf.u-szeged.hu> 9417 9418 [Qt] Unreviewed buildfix after r149637. 9419 9420 * Target.pri: 9421 94222013-05-06 Ryosuke Niwa <rniwa@webkit.org> 9423 9424 REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal 9425 https://bugs.webkit.org/show_bug.cgi?id=115711 9426 9427 Rubber-stamped by Anders Carlsson. 9428 9429 Temporarily removed the assertion. Andres is going to investigate it tomorrow. 9430 9431 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9432 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): 9433 94342013-05-06 Darin Adler <darin@apple.com> 9435 9436 Use OwnPtr instead of deleteAllValues in KeyframeValueList 9437 https://bugs.webkit.org/show_bug.cgi?id=115652 9438 9439 Reviewed by Simon Fraser. 9440 9441 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: 9442 (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr 9443 next to new when calling KeyframeValueList::insert. 9444 94452013-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com> 9446 9447 Unreviewed, build fix on EFL port 9448 9449 * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp 9450 94512013-05-06 Philippe Normand <pnormand@igalia.com> 9452 9453 Unreviewed, GTK build fix after r149637. 9454 9455 * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to 9456 the build. 9457 94582013-05-06 Brady Eidson <beidson@apple.com> 9459 9460 Remove some unnecessary soft linking in NetworkProcess. 9461 <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683 9462 9463 Reviewed by Sam Weinig. 9464 9465 Replace some unneeded soft linking with forward declarations. 9466 9467 * NetworkProcess/mac/DiskCacheMonitor.mm: 9468 (WebKit::DiskCacheMonitor::DiskCacheMonitor): 9469 * NetworkProcess/mac/NetworkResourceLoaderMac.mm: 9470 (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): 9471 (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): 9472 94732013-05-06 Anders Carlsson <andersca@apple.com> 9474 9475 More work on LocalStorageDatabaseTracker 9476 https://bugs.webkit.org/show_bug.cgi?id=115680 9477 9478 Reviewed by Andreas Kling. 9479 9480 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9481 (WebKit::LocalStorageDatabaseTracker::databaseFilename): 9482 Call the new databaseFilename that takes a string. 9483 9484 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): 9485 Assert that we don't call this more than once. Dispatch a call to import origin identifiers. 9486 9487 (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath): 9488 New helper function that returns the tracker database path. 9489 9490 (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase): 9491 Open the database and create the Origins table if needed. 9492 9493 (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers): 9494 Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk. 9495 9496 (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles): 9497 Bring the tracker database up to date from the database files on disk. 9498 9499 * UIProcess/Storage/LocalStorageDatabaseTracker.h: 9500 (LocalStorageDatabaseTracker): 9501 95022013-05-06 Alexey Proskuryakov <ap@apple.com> 9503 9504 <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices 9505 https://bugs.webkit.org/show_bug.cgi?id=115665 9506 9507 Reviewed by Darin Adler. 9508 9509 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated 9510 check for frame->isMainFrame() to the top, matching oter similar functions. 9511 Call updateActivePages(). 9512 9513 * WebProcess/WebProcess.cpp: 9514 (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME. 9515 (WebKit::WebProcess::updateActivePages): Empty implementation for platforms 9516 that don't need to do anything here. 9517 9518 * WebProcess/WebProcess.h: Added updateActivePages(). 9519 9520 * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages): 9521 Collect user visible origins of pages in the process and pass them to LS. 9522 95232013-05-06 Mark Rowe <mrowe@apple.com> 9524 9525 <rdar://problem/13775921> Switch off a deprecated API. 9526 9527 Reviewed by Oliver Hunt. 9528 9529 * Shared/mac/ChildProcessMac.mm: 9530 (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression, 9531 begin an activity that doesn't disable idle sleep, sudden termination or automatic termination. 9532 When enabling process suppression, end the activity. 9533 95342013-05-06 Anders Carlsson <andersca@apple.com> 9535 9536 Move local storage directory handling to LocalStorageDatabaseTracker 9537 https://bugs.webkit.org/show_bug.cgi?id=115676 9538 9539 Reviewed by Andreas Kling. 9540 9541 * UIProcess/Storage/LocalStorageDatabase.cpp: 9542 (WebKit::LocalStorageDatabase::create): 9543 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9544 * UIProcess/Storage/LocalStorageDatabase.h: 9545 (WebCore): 9546 (LocalStorageDatabase): 9547 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: 9548 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): 9549 (WebKit): 9550 (WebKit::LocalStorageDatabaseTracker::databaseFilename): 9551 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): 9552 * UIProcess/Storage/LocalStorageDatabaseTracker.h: 9553 (WebCore): 9554 (LocalStorageDatabaseTracker): 9555 * UIProcess/Storage/StorageManager.cpp: 9556 (WebKit::StorageManager::StorageArea::StorageArea): 9557 (WebKit::StorageManager::setLocalStorageDirectory): 9558 * UIProcess/Storage/StorageManager.h: 9559 (StorageManager): 9560 95612013-05-06 Manuel Rego Casasnovas <rego@igalia.com> 9562 9563 [GTK] Add webkit_uri_scheme_request_finish_error 9564 https://bugs.webkit.org/show_bug.cgi?id=94316 9565 9566 Reviewed by Anders Carlsson. 9567 9568 This new method will allow to finish WebKitURISchemeRequest with a 9569 GError that will be passed to the WebKitWebView through the 9570 "load-failed" signal. 9571 9572 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: 9573 (webkit_uri_scheme_request_finish_error): Implement new method using 9574 WebSoupRequestManagerProxy::didFailURIRequest(). 9575 * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header. 9576 * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new 9577 method in the code example at webkit_web_context_register_uri_scheme() 9578 documentation. 9579 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new 9580 method. 9581 * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: 9582 (loadFailedCallback): Set m_error to monitor it from the tests. 9583 (LoadTrackingTest::loadURI): Clear m_error before each load. 9584 (LoadTrackingTest::loadHtml): Ditto. 9585 (LoadTrackingTest::loadPlainText): Ditto. 9586 (LoadTrackingTest::loadRequest): Ditto. 9587 (LoadTrackingTest::reload): Ditto. 9588 (LoadTrackingTest::goBack): Ditto. 9589 (LoadTrackingTest::goForward): Ditto. 9590 * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error. 9591 * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: 9592 (testWebContextURIScheme): Modify test to check the behavior of the new 9593 method. 9594 * UIProcess/soup/WebSoupRequestManagerProxy.cpp: 9595 (WebKit::WebSoupRequestManagerProxy::didFailURIRequest): 9596 (WebKit): Implement new method using 9597 WebSoupRequestManager::DidFailURIRequest(). 9598 * UIProcess/soup/WebSoupRequestManagerProxy.h: 9599 (WebSoupRequestManagerProxy): Add new method header. 9600 * WebProcess/soup/WebSoupRequestManager.cpp: 9601 (WebKit): 9602 (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method 9603 setting the error and completing the request. 9604 * WebProcess/soup/WebSoupRequestManager.h: 9605 (WebSoupRequestManager): Add new method header. 9606 * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method 9607 signature. 9608 96092013-05-06 Anders Carlsson <andersca@apple.com> 9610 9611 Every LocalStorageDatabase should know about its tracker 9612 https://bugs.webkit.org/show_bug.cgi?id=115673 9613 9614 Reviewed by Andreas Kling. 9615 9616 * UIProcess/Storage/LocalStorageDatabase.cpp: 9617 (WebKit::LocalStorageDatabase::create): 9618 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9619 * UIProcess/Storage/LocalStorageDatabase.h: 9620 * UIProcess/Storage/StorageManager.cpp: 9621 (WebKit::StorageManager::StorageArea::StorageArea): 9622 96232013-05-06 Anders Carlsson <andersca@apple.com> 9624 9625 Add LocalStorageDatabaseTracker class 9626 https://bugs.webkit.org/show_bug.cgi?id=115671 9627 9628 Reviewed by Andreas Kling. 9629 9630 Somewhat unsurprisingly, this class will be used for tracking local storage databases. 9631 9632 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added. 9633 (WebKit::LocalStorageDatabaseTracker::create): 9634 (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker): 9635 (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker): 9636 * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added. 9637 (LocalStorageDatabaseTracker): 9638 9639 * UIProcess/Storage/StorageManager.cpp: 9640 (WebKit::StorageManager::StorageManager): 9641 Create a local storage database tracker. 9642 9643 * WebKit2.xcodeproj/project.pbxproj: 9644 Add new files. 9645 96462013-05-06 Anders Carlsson <andersca@apple.com> 9647 9648 Handle closing the local storage database 9649 https://bugs.webkit.org/show_bug.cgi?id=115669 9650 9651 Reviewed by Beth Dakin. 9652 9653 * UIProcess/Storage/LocalStorageDatabase.cpp: 9654 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9655 Initialize m_isClosed. 9656 9657 (WebKit::LocalStorageDatabase::~LocalStorageDatabase): 9658 Assert that m_isClosed is false. 9659 9660 (WebKit::LocalStorageDatabase::close): 9661 Set m_isClosed to true and write any pending changes to disk. 9662 9663 (WebKit::LocalStorageDatabase::updateDatabase): 9664 Compute the changed items and pass them to updateDatabaseWithChangedItems. 9665 9666 (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems): 9667 Split out the code that actually writes to the database from updateDatabase and into this function. 9668 9669 * UIProcess/Storage/LocalStorageDatabase.h: 9670 * UIProcess/Storage/StorageManager.cpp: 9671 (WebKit::StorageManager::StorageArea::~StorageArea): 9672 Call close(). 9673 96742013-05-06 Zan Dobersek <zdobersek@igalia.com> 9675 9676 [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext 9677 https://bugs.webkit.org/show_bug.cgi?id=115654 9678 9679 Reviewed by Andreas Kling. 9680 9681 Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy 9682 to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its 9683 construction and cleanup, removing the specific RefPtr member variable and its correlating getter method. 9684 9685 * UIProcess/API/C/WKContext.cpp: 9686 (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext. 9687 * UIProcess/WebContext.cpp: 9688 (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to 9689 the now-removed member variable. 9690 (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the 9691 supplements vector. 9692 (WebKit::WebContext::disconnectProcess): Ditto. 9693 * UIProcess/WebContext.h: 9694 (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method. 9695 * UIProcess/WebNetworkInfoManagerProxy.cpp: 9696 (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name. 9697 (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement. 9698 (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of 9699 accessing the private m_context directly. 9700 (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked. 9701 (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto. 9702 (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref. 9703 (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref. 9704 * UIProcess/WebNetworkInfoManagerProxy.h: 9705 (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods. 9706 97072013-05-06 Alexey Proskuryakov <ap@apple.com> 9708 9709 <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices 9710 https://bugs.webkit.org/show_bug.cgi?id=115483 9711 9712 Reviewed by Darin Adler. 9713 9714 * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it 9715 in multiple places, so it's easier to pre-compute it. 9716 9717 * PluginProcess/mac/PluginProcessMac.mm: 9718 (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID. 9719 (WebKit::loadSandboxProfile): Ditto. 9720 (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID. 9721 (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices. 9722 (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of 9723 a path. 9724 97252013-05-06 Anders Carlsson <andersca@apple.com> 9726 9727 Handle removeItem and clear in LocalStorageDatabase 9728 https://bugs.webkit.org/show_bug.cgi?id=115664 9729 9730 Reviewed by Darin Adler. 9731 9732 * UIProcess/Storage/LocalStorageDatabase.cpp: 9733 (WebKit::LocalStorageDatabase::removeItem): 9734 Call itemDidChange with a null value, indicating that we want to remove this item. 9735 9736 (WebKit::LocalStorageDatabase::clear): 9737 Clear items, set m_shouldClearItems and schedule a database update. 9738 9739 (WebKit::LocalStorageDatabase::updateDatabase): 9740 If m_shouldClearItems is true, clear all items. 9741 9742 * UIProcess/Storage/StorageManager.cpp: 9743 (WebKit::StorageManager::StorageArea::removeItem): 9744 Call through to the local storage database. 9745 9746 (WebKit::StorageManager::StorageArea::clear): 9747 Ditto. 9748 97492013-05-06 Anders Carlsson <andersca@apple.com> 9750 9751 Write storage changes to disk 9752 https://bugs.webkit.org/show_bug.cgi?id=115660 9753 9754 Reviewed by Andreas Kling. 9755 9756 * UIProcess/Storage/LocalStorageDatabase.cpp: 9757 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 9758 Initialize new member variables. 9759 9760 (WebKit::LocalStorageDatabase::tryToOpenDatabase): 9761 Disable database threading checks. 9762 9763 (WebKit::LocalStorageDatabase::importItems): 9764 Only import the items once. 9765 9766 (WebKit::LocalStorageDatabase::setItem): 9767 Call itemDidChange. 9768 9769 (WebKit::LocalStorageDatabase::itemDidChange): 9770 Record the change and schedule a database update. 9771 9772 (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): 9773 Use WorkQueue::dispatchAfterDelay to schedule a datbase update. 9774 9775 (WebKit::LocalStorageDatabase::updateDatabase): 9776 Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule 9777 another database update for the remaining items. 9778 9779 * UIProcess/Storage/LocalStorageDatabase.h: 9780 Add new member variables. 9781 9782 * UIProcess/Storage/StorageManager.cpp: 9783 (WebKit::StorageManager::StorageArea::setItem): 9784 Call LocalStorageDatabase::setItem. 9785 97862013-05-06 Zan Dobersek <zdobersek@igalia.com> 9787 9788 [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext 9789 https://bugs.webkit.org/show_bug.cgi?id=115625 9790 9791 Reviewed by Andreas Kling. 9792 9793 Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy 9794 to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its 9795 construction and cleanup, removing the specific RefPtr member variable and its correlating getter method. 9796 9797 * UIProcess/API/C/WKContext.cpp: 9798 (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext. 9799 * UIProcess/WebBatteryManagerProxy.cpp: 9800 (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name. 9801 (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable. 9802 (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing 9803 the private m_context directly. 9804 (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto. 9805 (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked. 9806 (WebKit::WebBatteryManagerProxy::processDidClose): Ditto. 9807 (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref. 9808 (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref. 9809 (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating. 9810 (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating. 9811 * UIProcess/WebBatteryManagerProxy.h: 9812 (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods. 9813 * UIProcess/WebContext.cpp: 9814 (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to 9815 the now-removed member variable. 9816 (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the 9817 supplements vector. 9818 (WebKit::WebContext::disconnectProcess): Ditto. 9819 * UIProcess/WebContext.h: 9820 (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method. 9821 98222013-05-06 Antoine Quint <graouts@apple.com> 9823 9824 Manage the presentation of the snapshotted plug-in using JavaScript 9825 https://bugs.webkit.org/show_bug.cgi?id=115548 9826 9827 Reviewed by Dean Jackson. 9828 9829 Expose a new plugInExtraScript method to support the injection of 9830 a JS file from the chrome client to customize the rendering of a 9831 snapshotted plug-in's shadow tree. Additionally, it is expected 9832 the chrome client will want to provide localized strings taking 9833 into account the snapshotted plug-in's mime-type, so we're adding 9834 this as a parameter to both plugInStartLabelTitle and 9835 plugInStartLabelSubtitle methods. 9836 9837 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 9838 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: 9839 (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle): 9840 (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle): 9841 (WebKit::InjectedBundlePageUIClient::plugInExtraScript): 9842 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: 9843 (InjectedBundlePageUIClient): 9844 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 9845 (WebKit::WebChromeClient::plugInStartLabelTitle): 9846 (WebKit::WebChromeClient::plugInStartLabelSubtitle): 9847 (WebKit::WebChromeClient::plugInExtraScript): 9848 * WebProcess/WebCoreSupport/WebChromeClient.h: 9849 (WebChromeClient): 9850 98512013-05-05 Chris Fleizach <cfleizach@apple.com> 9852 9853 WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers 9854 https://bugs.webkit.org/show_bug.cgi?id=115621 9855 9856 Reviewed by Alexey Proskuryakov. 9857 9858 Allow access to the location where 3rd party speech synthesizers are stored. 9859 9860 * WebProcess/com.apple.WebProcess.sb.in: 9861 98622013-05-05 Tim Horton <timothy_horton@apple.com> 9863 9864 [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes 9865 https://bugs.webkit.org/show_bug.cgi?id=115577 9866 <rdar://problem/13762583> 9867 9868 Reviewed by Darin Adler. 9869 9870 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 9871 (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor): 9872 Invalidate the page overlay layers' device scale factor when 9873 TiledCoreAnimationDrawingArea is notified that it has changed. 9874 98752013-05-05 Anders Carlsson <andersca@apple.com> 9876 9877 Remove the Vector::append overload that takes a Vector 9878 https://bugs.webkit.org/show_bug.cgi?id=115535 9879 9880 Reviewed by Andreas Kling. 9881 9882 Use Vector::appendVector instead. 9883 9884 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: 9885 (WebKit::NetworkBlobRegistry::registerBlobURL): 9886 * NetworkProcess/SchedulableLoader.cpp: 9887 (WebKit::SchedulableLoader::SchedulableLoader): 9888 * Platform/CoreIPC/Connection.cpp: 9889 (CoreIPC::Connection::SyncMessageState::dispatchMessages): 9890 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: 9891 (WebKit::PluginInfoStore::pluginsDirectories): 9892 98932013-05-04 Sam Weinig <sam@webkit.org> 9894 9895 Fix * placement in a few functions as noticed by Mark Rowe. 9896 9897 Rubber-stamped by Dan Bernstein. 9898 9899 * WebProcess/WebPage/PageBanner.h: 9900 (PageBanner): 9901 * WebProcess/WebPage/mac/PageBannerMac.mm: 9902 (WebKit::PageBanner::create): 9903 (WebKit::PageBanner::PageBanner): 9904 99052013-05-04 Sam Weinig <sam@webkit.org> 9906 9907 REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page) 9908 <rdar://problem/13702008> 9909 https://bugs.webkit.org/show_bug.cgi?id=115607 9910 9911 Reviewed by Benjamin Poulain. 9912 9913 API Test: WebKit2.CloseThenTerminate 9914 9915 * UIProcess/WebPageProxy.cpp: 9916 (WebKit::WebPageProxy::resetStateAfterProcessExited): 9917 Don't try to reset the state if the page is closed, it won't work and its not worth it. 9918 99192013-05-04 Beth Dakin <bdakin@apple.com> 9920 9921 https://bugs.webkit.org/show_bug.cgi?id=115574 9922 Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null 9923 9924 Reviewed by Darin Adler. 9925 9926 Don't call addToPage() on a null banner. 9927 * WebProcess/WebPage/WebPage.cpp: 9928 (WebKit::WebPage::setHeaderPageBanner): 9929 (WebKit::WebPage::setFooterPageBanner): 9930 99312013-05-03 Alexey Proskuryakov <ap@apple.com> 9932 9933 <rdar://problem/13806836> Tweak sandbox profile. 9934 9935 Reviewed by Dan Bernstein. 9936 9937 * WebProcess/com.apple.WebProcess.sb.in: 9938 99392013-05-03 Tim Horton <timothy_horton@apple.com> 9940 9941 PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported 9942 https://bugs.webkit.org/show_bug.cgi?id=115544 9943 <rdar://problem/13801789> 9944 9945 Reviewed by Alexey Proskuryakov. 9946 9947 Commit changes to the active annotation (if there is one) before 9948 returning the live PDF data, so that said changes are represented 9949 in the exported or printed output. 9950 9951 * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData. 9952 * WebProcess/Plugins/PDF/PDFPlugin.mm: 9953 (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one. 9954 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: 9955 (SimplePDFPlugin): Make liveData virtual. 9956 99572013-05-03 Tim Horton <timothy_horton@apple.com> 9958 9959 Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8 9960 https://bugs.webkit.org/show_bug.cgi?id=115056 9961 <rdar://problem/13719543> 9962 9963 Reviewed by Simon Fraser. 9964 9965 Null-check m_page. In theory, we shouldn't get here, because we stop 9966 the timer at the only point where m_page is cleared, but crash logs say 9967 we're still crashing here. 9968 9969 * WebProcess/WebPage/WebPage.cpp: 9970 (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired): 9971 99722013-05-03 Tim Horton <timothy_horton@apple.com> 9973 9974 Remove some "what" comments from FindController 9975 https://bugs.webkit.org/show_bug.cgi?id=115546 9976 9977 Reviewed by Andreas Kling. 9978 9979 * WebProcess/WebPage/FindController.cpp: 9980 (WebKit::FindController::countStringMatches): 9981 (WebKit::FindController::updateFindUIAfterPageScroll): 9982 (WebKit::FindController::willMoveToWebPage): 9983 (WebKit::FindController::mouseEvent): 9984 Remove or reword some comments. 9985 99862013-05-02 Andy Estes <aestes@apple.com> 9987 9988 [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop 9989 https://bugs.webkit.org/show_bug.cgi?id=115539 9990 9991 Reviewed by Alexey Proskuryakov. 9992 9993 It turns out that calling NSURLProtocolClient methods from a different 9994 thread than the one running the NSURLConnection run loop is unsafe. 9995 Although I can't capture it reliably in a test case, doing so can 9996 sometimes result in a load timing out because the call to 9997 -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by 9998 NSURLConnection. 9999 10000 Fix this by dispatching these methods on the NSURLConnection resource 10001 load run loop. This matches where NSURLProtocolClient methods are 10002 dispatched by typical NSURLProtocol implementations, and in my testing 10003 this solves the timeout issue. 10004 10005 * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare 10006 dispatchOnResourceLoaderRunLoop(). 10007 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 10008 Declare +[NSURLConnection resourceLoaderRunLoop] on a category of 10009 NSURLConnection. Also include the header that declares it if it's present. 10010 (WebKit::CustomProtocolManager::didFailWithError): Call the 10011 NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop(). 10012 (WebKit::CustomProtocolManager::didLoadData): Ditto. 10013 (WebKit::CustomProtocolManager::didReceiveResponse): Ditto. 10014 (WebKit::CustomProtocolManager::didFinishLoading): Ditto. 10015 (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop): 10016 Dispatch a block on the NSURLConnection resource loader run loop and 10017 then wake up the run loop. 10018 100192013-05-02 Brady Eidson <beidson@apple.com> 10020 10021 REGRESSION (149389) Main resources converted to downloads are immediately cancelled. 10022 <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530 10023 10024 Reviewed by Alexey Proskuryakov. 10025 10026 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 10027 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload 10028 on the NetworkResourceLoader. 10029 10030 * NetworkProcess/NetworkResourceLoader.cpp: 10031 (WebKit::NetworkResourceLoader::NetworkResourceLoader): 10032 (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true. 10033 (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false. 10034 * NetworkProcess/NetworkResourceLoader.h: 10035 100362013-05-02 Alexey Proskuryakov <ap@apple.com> 10037 10038 <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess 10039 https://bugs.webkit.org/show_bug.cgi?id=115520 10040 10041 Reviewed by Darin Adler. 10042 10043 * Shared/mac/WebCoreArgumentCodersMac.mm: 10044 (CoreIPC::::encodePlatformData): 10045 (CoreIPC::::decodePlatformData): 10046 Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading. 10047 100482013-05-01 Alexey Proskuryakov <ap@apple.com> 10049 10050 REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:] 10051 broken when second argument is nil 10052 https://bugs.webkit.org/show_bug.cgi?id=115505 10053 <rdar://problem/13787297> 10054 10055 Reviewed by Darin Adler. 10056 10057 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string 10058 to assumeReadAccessToBaseURL, as this is what it takes. 10059 100602013-05-01 Ryosuke Niwa <rniwa@webkit.org> 10061 10062 [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed 10063 https://bugs.webkit.org/show_bug.cgi?id=115463 10064 10065 Reviewed by Darin Adler. 10066 10067 Observe the default notification center and propagate the changes to TextCheckerState and 10068 to all WebProcesses when system preferences are updated. 10069 10070 * UIProcess/TextChecker.h: 10071 * UIProcess/WebContext.h: 10072 * UIProcess/mac/TextCheckerMac.mm: 10073 (WebKit::shouldAutomaticTextReplacementBeEnabled): 10074 (WebKit::shouldAutomaticSpellingCorrectionBeEnabled): 10075 (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled): 10076 (WebKit::shouldAutomaticDashSubstitutionBeEnabled): 10077 (WebKit::initializeState): 10078 (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled): 10079 (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled): 10080 (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled): 10081 (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled): 10082 * UIProcess/mac/WebContextMac.mm: 10083 (WebKit::WebContext::registerNotificationObservers): 10084 (WebKit::WebContext::unregisterNotificationObservers): 10085 100862013-05-01 Ryuan Choi <ryuan.choi@samsung.com> 10087 10088 [GTK] Fix build break after r149449 10089 https://bugs.webkit.org/show_bug.cgi?id=115500 10090 10091 Reviewed by Gustavo Noronha Silva. 10092 10093 Unreviewed GTK build fix 10094 10095 * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of 10096 sources. 10097 100982013-05-01 Martin Robinson <mrobinson@igalia.com> 10099 10100 [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled 10101 https://bugs.webkit.org/show_bug.cgi?id=115492 10102 10103 Reviewed by Xan Lopez. 10104 10105 * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation. 10106 101072013-05-01 Tim Horton <timothy_horton@apple.com> 10108 10109 Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry 10110 https://bugs.webkit.org/show_bug.cgi?id=115487 10111 10112 Reviewed by Darin Adler. 10113 10114 * UIProcess/WebContext.cpp: 10115 * UIProcess/WebContext.h: 10116 Remove pdfAndPostScriptMIMETypes. 10117 10118 * UIProcess/WebFrameProxy.cpp: 10119 (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy. 10120 (WebKit::WebFrameProxy::isDisplayingPDFDocument): 10121 Make use of WebCore's newfound knowledge of PDF and PostScript MIME types, 10122 so we don't have to duplicate it unnecessarily in WebKit2. 10123 10124 * UIProcess/WebPageProxy.cpp: 10125 (WebKit::WebPageProxy::canShowMIMEType): 10126 Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it 10127 to use WebCore's knowledge of PDF and PostScript MIME types. 10128 10129 * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: 10130 (WebKit::SimplePDFPlugin::pluginInfo): 10131 We previously supported the "text/pdf" MIME type for PDFViewController, 10132 so SimplePDFPlugin and PDFPlugin should support it as well. 10133 10134 * WebProcess/WebPage/WebPage.cpp: 10135 (WebKit::WebPage::createPlugin): 10136 Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType. 10137 10138 * WebProcess/WebPage/WebPage.h: 10139 (WebPage): 10140 Remove pdfAndPostScriptMIMETypes. 10141 10142 * WebProcess/WebPage/mac/WebPageMac.mm: 10143 (WebKit::WebPage::platformPreferencesDidChange): 10144 Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2. 10145 101462013-05-01 Anders Carlsson <andersca@apple.com> 10147 10148 Implement LocalStorageDatabase::importItems 10149 https://bugs.webkit.org/show_bug.cgi?id=115493 10150 10151 Reviewed by Andreas Kling. 10152 10153 Fetch items and insert them in the storage map. 10154 * UIProcess/Storage/LocalStorageDatabase.cpp: 10155 (WebKit::LocalStorageDatabase::importItems): 10156 101572013-05-01 Anders Carlsson <andersca@apple.com> 10158 10159 Begin work on loading items from the local storage database 10160 https://bugs.webkit.org/show_bug.cgi?id=115489 10161 10162 Reviewed by Andreas Kling. 10163 10164 Some of the LocalStorageDatabase code is originally from WebCore, 10165 but has been simplified due to the fact that we don't need to load 10166 database data asynchronously since we're already running on a non-main thread. 10167 10168 * UIProcess/Storage/LocalStorageDatabase.cpp: 10169 (WebKit::LocalStorageDatabase::LocalStorageDatabase): 10170 (WebKit::LocalStorageDatabase::openDatabase): 10171 (WebKit::LocalStorageDatabase::tryToOpenDatabase): 10172 (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded): 10173 (WebKit::LocalStorageDatabase::importItems): 10174 10175 * UIProcess/Storage/LocalStorageDatabase.h: 10176 (WebKit::StorageManager::StorageArea::setItem): 10177 (WebKit::StorageManager::StorageArea::removeItem): 10178 (WebKit::StorageManager::StorageArea::clear): 10179 (WebKit::StorageManager::StorageArea::items): 10180 Call importItemsFromDatabase(). 10181 10182 (WebKit::StorageManager::StorageArea::importItemsFromDatabase): 10183 Ask the database to import the items. 10184 101852013-05-01 Ryuan Choi <ryuan.choi@samsung.com> 10186 10187 [EFL] Unreviewed buildfix after r149449. 10188 10189 * CMakeLists.txt: 10190 101912013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu> 10192 10193 [Qt] Unreviewed buildfix after r149449. 10194 10195 * Target.pri: 10196 101972013-05-01 Anders Carlsson <andersca@apple.com> 10198 10199 Add LocalStorageDatabase class 10200 https://bugs.webkit.org/show_bug.cgi?id=115486 10201 10202 Reviewed by Sam Weinig. 10203 10204 The LocalStorageDatabase class will persist local storage data to disk. 10205 10206 * UIProcess/Storage/LocalStorageDatabase.cpp: 10207 * UIProcess/Storage/LocalStorageDatabase.h: Added. 10208 10209 * UIProcess/Storage/StorageManager.cpp: 10210 (StorageManager::StorageArea): 10211 (WebKit::StorageManager::LocalStorageNamespace::storageManager): 10212 Add getter. 10213 10214 (StorageManager::LocalStorageNamespace): 10215 (WebKit::StorageManager::StorageArea::StorageArea): 10216 If this is a local storage area, create a LocalStorageDatabase. 10217 10218 (WebKit::StorageManager::LocalStorageNamespace::databaseFilename): 10219 Helper function for getting the name of the database for the given origin. 10220 10221 * WebKit2.xcodeproj/project.pbxproj: 10222 Add new files. 10223 102242013-05-01 Alexey Proskuryakov <ap@apple.com> 10225 10226 <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions. 10227 10228 Reviewed by Anders Carlsson. 10229 10230 Adapt to LaunchServices changes. 10231 10232 * Shared/mac/ChildProcessMac.mm: 10233 (WebKit::ChildProcess::setApplicationIsDaemon): 10234 102352013-05-01 Martin Robinson <mrobinson@igalia.com> 10236 10237 [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled 10238 https://bugs.webkit.org/show_bug.cgi?id=114394 10239 10240 Reviewed by Anders Carlsson. 10241 10242 Add a setting to control accelerated 2D canvas, which determines whether 10243 or not to consider rendering HTML canvas with hardware acceleration. 10244 10245 * UIProcess/API/gtk/WebKitSettings.cpp: 10246 (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property. 10247 (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property. 10248 (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property. 10249 (webkit_settings_get_enable_accelerated_2d_canvas): Added. 10250 (webkit_settings_set_enable_accelerated_2d_canvas): Added. 10251 * UIProcess/API/gtk/WebKitSettings.h: New methods. 10252 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation. 10253 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: 10254 (testWebKitSettings): Added a simple test for the setting. 10255 102562013-04-30 Jer Noble <jer.noble@apple.com> 10257 10258 Entering full screen mode shows desktop linen instead of WKView the first time. 10259 https://bugs.webkit.org/show_bug.cgi?id=115433 10260 <rdar://problem/13774540> 10261 10262 Reviewed by Eric Carlson. 10263 10264 For certain types of windows created by subclasses of WKView, the window in question fails to paint 10265 when created with a zero-size rect. Create the window with an initial size of the active screen frame 10266 as that is the likely destination size. 10267 10268 * UIProcess/API/mac/WKView.mm: 10269 (-[WKView createFullScreenWindow]): 10270 102712013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu> 10272 10273 [Qt][Win] Fix build after r149416. 10274 https://bugs.webkit.org/show_bug.cgi?id=115474 10275 10276 Reviewed by Anders Carlsson. 10277 10278 * Platform/CoreIPC/Connection.h: 10279 (Connection): 10280 * Platform/CoreIPC/win/ConnectionWin.cpp: 10281 (CoreIPC::Connection::dispatchSentMessagesUntil): 10282 102832013-05-01 Sergio Villar Senin <svillar@igalia.com> 10284 10285 Unreviewed GTK build fix after r149417. 10286 10287 * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of 10288 sources. 10289 102902013-05-01 Ryuan Choi <ryuan.choi@samsung.com> 10291 10292 [EFL] Unreviewed buildfix after r149416 and r149417. 10293 10294 Unreviewed build fix. 10295 10296 * CMakeLists.txt: 10297 102982013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu> 10299 10300 [Qt] Unreviewed buildfix after r149416 and r149417. 10301 10302 * Target.pri: 10303 103042013-04-30 Dongwoo Joshua Im <dw.im@samsung.com> 10305 10306 [EFL] Unreviewed, EFL build fix after r149416 10307 https://bugs.webkit.org/show_bug.cgi?id=115467 10308 10309 Unreviewed build fix. 10310 10311 * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list. 10312 103132013-04-30 Simon Cooper <scooper@apple.com> 10314 10315 ipc-posix-shm backwards compatibility 10316 https://bugs.webkit.org/show_bug.cgi?id=115448 10317 <rdar://problem/13743037> 10318 10319 Reviewed by Alexey Proskuryakov. 10320 10321 Add compatibility for older ipc-posix-shm operations, but prefer the 10322 newer names when writing profiles. 10323 10324 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 10325 103262013-04-30 Philippe Normand <pnormand@igalia.com> 10327 10328 Unreviewed, GTK build fix after r149416. 10329 10330 * GNUmakefile.list.am: Remove references to non-existant 10331 BinarySemaphore module. 10332 103332013-04-28 Alexey Proskuryakov <ap@apple.com> 10334 10335 <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API 10336 https://bugs.webkit.org/show_bug.cgi?id=115321 10337 10338 Reviewed by Darin Adler. 10339 10340 * UIProcess/API/C/WKPage.cpp: 10341 * UIProcess/API/C/WKPage.h: 10342 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): 10343 * UIProcess/WebPageProxy.h: 10344 Added and implemented a C API to load a file while only opening sandbox for 10345 a specific directory. 10346 10347 * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment. 10348 10349 * UIProcess/API/mac/WKBrowsingContextController.mm: 10350 (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]): 10351 Respect allowedDirectory argument. Updated the function to raise an exception for 10352 incorrect input, as decribed in header file. 10353 103542013-04-29 Sam Weinig <sam@webkit.org> 10355 10356 Add API to allow WebKit2 banners to get mouse events 10357 https://bugs.webkit.org/show_bug.cgi?id=115395 10358 10359 Reviewed by Beth Dakin. 10360 10361 * Shared/API/c/WKBase.h: 10362 * Shared/APIObject.h: 10363 Add banner type. 10364 10365 * WebKit2.xcodeproj/project.pbxproj: 10366 Add files. 10367 10368 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: 10369 Add conversion. 10370 10371 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 10372 (WKBundlePageSetTopOverhangImage): 10373 (WKBundlePageSetBottomOverhangImage): 10374 Fix parameter names to be consistent. 10375 10376 (WKBundlePageSetHeaderBanner): 10377 (WKBundlePageSetFooterBanner): 10378 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 10379 * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added. 10380 (WKBundlePageBannerGetTypeID): 10381 * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added. 10382 * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added. 10383 * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added. 10384 (PageBannerClientImpl): 10385 (PageBannerClientImpl::create): 10386 (PageBannerClientImpl::PageBannerClientImpl): 10387 (PageBannerClientImpl::pageBannerDestroyed): 10388 (PageBannerClientImpl::mouseEvent): 10389 (WKBundlePageBannerCreateBannerWithCALayer): 10390 (WKBundlePageBannerGetLayer): 10391 Add banner API. 10392 10393 * WebProcess/WebPage/PageBanner.h: Added. 10394 * WebProcess/WebPage/PageBanner.cpp: Added. 10395 (WebKit::PageBanner::~PageBanner): 10396 (WebKit::PageBanner::addToPage): 10397 (WebKit::PageBanner::detachFromPage): 10398 (WebKit::PageBanner::didChangeDeviceScaleFactor): 10399 (WebKit::PageBanner::mouseEvent): 10400 Add non-mac implementations. 10401 10402 * WebProcess/WebPage/WebPage.cpp: 10403 (WebKit::WebPage::~WebPage): 10404 (WebKit::WebPage::setHeaderPageBanner): 10405 (WebKit::WebPage::headerPageBanner): 10406 (WebKit::WebPage::setFooterPageBanner): 10407 (WebKit::WebPage::footerPageBanner): 10408 (WebKit::WebPage::mouseEvent): 10409 (WebKit::WebPage::mouseEventSyncForTesting): 10410 * WebProcess/WebPage/WebPage.h: 10411 Add banner setter/getters and give the banners a chance to handle mouse events. 10412 10413 * WebProcess/WebPage/mac/PageBannerMac.mm: Added. 10414 (WebKit::PageBanner::create): 10415 (WebKit::PageBanner::PageBanner): 10416 (WebKit::PageBanner::addToPage): 10417 (WebKit::PageBanner::detachFromPage): 10418 (WebKit::PageBanner::didChangeDeviceScaleFactor): 10419 (WebKit::PageBanner::mouseEvent): 10420 (WebKit::PageBanner::layer): 10421 Add Mac implementation. 10422 10423 * WebProcess/WebPage/mac/WebPageMac.mm: 10424 (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange): 10425 Notify banners when the device scale changes. 10426 104272013-04-30 Anders Carlsson <andersca@apple.com> 10428 10429 Remove the WebKit2 BinarySemaphore class 10430 https://bugs.webkit.org/show_bug.cgi?id=115458 10431 10432 Reviewed by Benjamin Poulain. 10433 10434 Remove the WK2 specific BinarySemaphore class and use the one from WTF. 10435 10436 * Platform/CoreIPC/BinarySemaphore.cpp: Removed. 10437 * Platform/CoreIPC/BinarySemaphore.h: Removed. 10438 * Platform/CoreIPC/Connection.cpp: 10439 * Platform/CoreIPC/Connection.h: 10440 * WebKit2.xcodeproj/project.pbxproj: 10441 104422013-04-30 Alexey Proskuryakov <ap@apple.com> 10443 10444 <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2: 10445 10446 Reviewed by Anders Carlsson. 10447 10448 * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory. 10449 104502013-04-30 Alexey Proskuryakov <ap@apple.com> 10451 10452 [Mac] Don't open window server connection in network process 10453 https://bugs.webkit.org/show_bug.cgi?id=115446 10454 10455 Reviewed by Anders Carlsson. 10456 10457 * NetworkProcess/NetworkProcess.cpp: 10458 (WebKit::NetworkProcess::initializeProcess): 10459 * NetworkProcess/NetworkProcess.h: 10460 * NetworkProcess/mac/NetworkProcessMac.mm: 10461 (WebKit::NetworkProcess::initializeProcess): 10462 (WebKit::NetworkProcess::initializeProcessName): 10463 Instead of shutting down a connection after setting process name, just prevent 10464 it from being created. 10465 10466 * Shared/ChildProcess.h: 10467 * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon): 10468 Expose a function for client processes to call if they don't run an NSApplication 10469 run loop. 10470 10471 * OfflineStorageProcess/OfflineStorageProcess.cpp: 10472 (WebKit::OfflineStorageProcess::initializeProcess): 10473 * OfflineStorageProcess/OfflineStorageProcess.h: 10474 * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: 10475 (WebKit::OfflineStorageProcess::initializeProcess): 10476 (WebKit::OfflineStorageProcess::initializeProcessName): 10477 * SharedWorkerProcess/SharedWorkerProcess.cpp: 10478 (WebKit::SharedWorkerProcess::initializeProcess): 10479 (WebKit::SharedWorkerProcess::initializeProcessName): 10480 * SharedWorkerProcess/SharedWorkerProcess.h: 10481 * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: 10482 (WebKit::SharedWorkerProcess::initializeProcess): 10483 (WebKit::SharedWorkerProcess::initializeProcessName): 10484 Match NetworkProcess for consistency. 10485 10486 * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName): 10487 Don't null check UI process name. First, it can't be null, and second, some other 10488 processes already don't have this check. 10489 104902013-04-30 Tim Horton <timothy_horton@apple.com> 10491 10492 Disable deprecation warnings around some NSProcessInfo API. 10493 10494 Rubber-stamped by Brady Eidson. 10495 10496 * Shared/mac/ChildProcessMac.mm: 10497 (WebKit::ChildProcess::setProcessSuppressionEnabled): 10498 104992013-04-30 Brady Eidson <beidson@apple.com> 10500 10501 [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess. 10502 <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319 10503 10504 Written and reviewed by both Alexey Proskuryakov and Brady Eidson. 10505 10506 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 10507 (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders 10508 instead of connectionToWebProcessDidClose() 10509 (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing 10510 the loader from the scheduler, call abort() which will also end up removing it. 10511 10512 * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call. 10513 10514 * NetworkProcess/NetworkResourceLoader.cpp: 10515 (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 10516 callers can pass DispatchMessageEvenWhenWaitingForSyncReply. 10517 (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to 10518 be a general purpose "cancel" 10519 (WebKit::NetworkResourceLoader::didReceiveBuffer): 10520 (WebKit::NetworkResourceLoader::willSendRequestAsync): 10521 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): 10522 * NetworkProcess/NetworkResourceLoader.h: 10523 10524 * NetworkProcess/SyncNetworkResourceLoader.cpp: 10525 (WebKit::SyncNetworkResourceLoader::abort): 10526 * NetworkProcess/SyncNetworkResourceLoader.h: 10527 10528 * WebProcess/Network/WebResourceLoadScheduler.cpp: 10529 (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment. 10530 10531 * WebProcess/Network/WebResourceLoader.cpp: 10532 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing 10533 the importance of this null check so it's not removed again. 10534 105352013-04-30 Carlos Garcia Campos <cgarcia@igalia.com> 10536 10537 [WK2][GTK] MiniBrowser won't play video in <embed> tag 10538 https://bugs.webkit.org/show_bug.cgi?id=113107 10539 10540 Reviewed by Anders Carlsson. 10541 10542 The wrong clip region is used for windowed plugins, because it's 10543 translated to window frame coords again. 10544 10545 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 10546 (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move 10547 the current clip region. 10548 105492013-04-30 Timothy Hatcher <timothy@apple.com> 10550 10551 Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4. 10552 10553 https://webkit.org/b/115428 10554 10555 Reviewed by Joseph Pecoraro. 10556 10557 * UIProcess/mac/WebInspectorProxyMac.mm: 10558 (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version. 10559 (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it 10560 works on Safari 6.0.4. 10561 105622013-04-30 Artur Moryc <a.moryc@samsung.com> 10563 10564 [WK2][EFL] Spelling marker disappears while selection is being changed 10565 https://bugs.webkit.org/show_bug.cgi?id=115165 10566 10567 Reviewed by Anders Carlsson. 10568 10569 The marker for a misspelled word disappears while the cursor is being navigated along the word. 10570 10571 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 10572 (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection): 10573 105742013-04-30 Zalan Bujtas <zalan@apple.com> 10575 10576 Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/ 10577 https://bugs.webkit.org/show_bug.cgi?id=111244 10578 10579 Reviewed by David Kilzer. 10580 10581 Enable performance.now() as a minimal subset of Web Timing API. 10582 It returns DOMHighResTimeStamp, a monotonically increasing value representing the 10583 number of milliseconds from the start of the navigation of the current document. 10584 JS libraries use this API to check against the requestAnimationFrame() timestamp. 10585 10586 * Configurations/FeatureDefines.xcconfig: 10587 105882013-04-29 Chris Fleizach <cfleizach@apple.com> 10589 10590 WEB SPEECH: need to identify the default voice per language 10591 https://bugs.webkit.org/show_bug.cgi?id=115366 10592 10593 Reviewed by Tim Horton. 10594 10595 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 10596 (InitWebCoreSystemInterface): 10597 105982013-04-29 Benjamin Poulain <benjamin@webkit.org> 10599 10600 [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics 10601 https://bugs.webkit.org/show_bug.cgi?id=115315 10602 10603 Reviewed by Geoffrey Garen. 10604 10605 Remove a couple of unjustified DEFINE_STATIC_LOCAL. 10606 Use ASCIILiteral when allocating new String. 10607 10608 * WebProcess/WebProcess.cpp: 10609 (WebKit::getWebCoreMemoryCacheStatistics): 10610 (WebKit::WebProcess::getWebCoreStatistics): 10611 106122013-04-29 Anders Carlsson <andersca@apple.com> 10613 10614 Remove StorageTracker::originsLoaded 10615 https://bugs.webkit.org/show_bug.cgi?id=115382 10616 10617 Reviewed by Sam Weinig. 10618 10619 Add m_didFinishLoadingOrigins. 10620 10621 * WebProcess/Storage/WebKeyValueStorageManager.cpp: 10622 (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): 10623 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): 10624 (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins): 10625 * WebProcess/Storage/WebKeyValueStorageManager.h: 10626 (WebKeyValueStorageManager): 10627 106282013-04-29 Chris Fleizach <cfleizach@apple.com> 10629 10630 WEB SPEECH Update seatbelt profile to work with speech synthesis 10631 https://bugs.webkit.org/show_bug.cgi?id=115368 10632 10633 Reviewed by Alexey Proskuryakov. 10634 10635 * WebProcess/com.apple.WebProcess.sb.in: 10636 106372013-04-28 Beth Dakin <bdakin@apple.com> 10638 10639 Need a LayoutMilestone to fire when we have done our first paint after suppressing 10640 incremental layout 10641 https://bugs.webkit.org/show_bug.cgi?id=115330 10642 -and corresponding- 10643 <rdar://problem/12722365> 10644 10645 Reviewed by Simon Fraser. 10646 10647 Two new millstones. 10648 * Shared/API/c/WKPageLoadTypes.h: 10649 * Shared/API/c/WKSharedAPICast.h: 10650 (WebKit::toWKLayoutMilestones): 10651 (WebKit::toLayoutMilestones): 10652 10653 This null-check is necessary now since this code ends up running at 10654 WebFrame::init() time while we're setting up the Document. 10655 setVisualUpdatesAllowed(true) has always been called as a part of that process, 10656 and now the updateLayout(), ends up calling this code too, but we don't actually 10657 have a mainFrame yet since it's still being created. 10658 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 10659 (WebKit::findLargestFrameInFrameSet): 10660 106612013-04-29 Brady Eidson <beidson@apple.com> 10662 10663 REGRESSION: We see authentication challenge sheets for favicon requests. 10664 <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288 10665 10666 Reviewed by Alexey Proskuryakov. 10667 10668 Have NetworkResourceLoadParameters remember the ClientCredentialPolicy: 10669 * Shared/Network/NetworkResourceLoadParameters.cpp: 10670 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): 10671 (WebKit::NetworkResourceLoadParameters::encode): 10672 (WebKit::NetworkResourceLoadParameters::decode): 10673 * Shared/Network/NetworkResourceLoadParameters.h: 10674 10675 Pass along the ClientCredentialPolicy to the NetworkProcess: 10676 * WebProcess/Network/WebResourceLoadScheduler.cpp: 10677 (WebKit::WebResourceLoadScheduler::scheduleLoad): 10678 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 10679 (WebKit::WebPlatformStrategies::loadResourceSynchronously): 10680 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 10681 10682 Have the SchedulableLoader remember the ClientCredentialPolicy: 10683 * NetworkProcess/SchedulableLoader.cpp: 10684 (WebKit::SchedulableLoader::SchedulableLoader): 10685 * NetworkProcess/SchedulableLoader.h: 10686 (WebKit::SchedulableLoader::clientCredentialPolicy): 10687 10688 Don’t message for credentials if the ClientCredentialPolicy forbids it: 10689 * NetworkProcess/NetworkResourceLoader.cpp: 10690 (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): 10691 * NetworkProcess/NetworkResourceLoader.h: 10692 10693 Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side): 10694 * NetworkProcess/NetworkProcessPlatformStrategies.cpp: 10695 (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): 10696 * NetworkProcess/NetworkProcessPlatformStrategies.h: 10697 106982013-04-29 Jer Noble <jer.noble@apple.com> 10699 10700 Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld. 10701 10702 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: 10703 107042013-04-29 Alexey Proskuryakov <ap@apple.com> 10705 10706 Threads get stuck in NetworkProcess when canceling loads 10707 https://bugs.webkit.org/show_bug.cgi?id=115319 10708 10709 Backing out part of the fix, as it's causing crashes. 10710 10711 * WebProcess/Network/WebResourceLoader.cpp: 10712 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): 10713 107142013-04-29 Noam Rosenthal <noam@webkit.org> 10715 10716 Get rid of "non-composited contents" in CoordinatedLayerTreeHost 10717 https://bugs.webkit.org/show_bug.cgi?id=110355 10718 10719 Reviewed by Jocelyn Turcotte. 10720 10721 Instead of using a special non-composited contents layer, we let RenderLayerCompositor create 10722 a proper GraphicsLayer for that content. 10723 CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting 10724 the trajectory vector and applying the cover rect. 10725 10726 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 10727 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 10728 (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): 10729 Don't create the non-composited layer, instead keep a raw pointer to the root 10730 compositing layer created by the WebCore compositor. 10731 10732 (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay): 10733 (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect): 10734 (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): 10735 (WebKit::CoordinatedLayerTreeHost::sizeDidChange): 10736 (WebKit::CoordinatedLayerTreeHost::paintContents): 10737 (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): 10738 (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): 10739 Remove non-composited layer specialization. 10740 107412013-04-29 Zoltan Arvai <zarvai@inf.u-szeged.hu> 10742 10743 [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259. 10744 https://bugs.webkit.org/show_bug.cgi?id=115345 10745 10746 Reviewed by Anders Carlsson. 10747 10748 * WebKit2.pri: 10749 107502013-04-29 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> 10751 10752 [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API 10753 https://bugs.webkit.org/show_bug.cgi?id=108201 10754 10755 Reviewed by Andreas Kling. 10756 10757 Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was 10758 set from FullScreen API or not, so it can skip cancelling fullscreen 10759 request if fullscreen mode was set by application, preventing 10760 WebProcess' FullScreenManager from crashing. 10761 10762 EFL unit test available: ewk_view_cancel_full_screen_request. 10763 10764 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: 10765 (WKViewExitFullScreen): 10766 * UIProcess/API/C/CoordinatedGraphics/WKView.h: 10767 WKViewExitFullScreen now returns a bool, indicating whether the 10768 operation has succeeded or not. 10769 10770 * UIProcess/API/efl/ewk_view.cpp: 10771 (ewk_view_fullscreen_exit): 10772 Skip request if not in fullscreen mode. 10773 10774 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 10775 (TEST_F): 10776 Added ewk_view_cancel_full_screen_request unit test. 10777 10778 * UIProcess/CoordinatedGraphics/WebView.cpp: 10779 (WebKit::WebView::exitFullScreen): 10780 * UIProcess/CoordinatedGraphics/WebView.h: 10781 (WebView): 10782 exitFullScreen now returns a bool, indicating whether the operation has 10783 succeeded or not. 10784 10785 * UIProcess/WebFullScreenManagerProxy.cpp: 10786 (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): 10787 * UIProcess/WebFullScreenManagerProxy.h: 10788 (WebFullScreenManagerProxy): 10789 * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: 10790 (WebKit::WebFullScreenManagerProxy::isFullScreen): 10791 (WebKit::WebFullScreenManagerProxy::enterFullScreen): 10792 (WebKit::WebFullScreenManagerProxy::exitFullScreen): 10793 Added m_hasRequestedFullScreen boolean flag to EFL port. Used to 10794 indicate if fullscreen mode is enabled, as well as sanity checks on both 10795 {enter,exit}FullScreen functions. 10796 107972013-04-29 Anders Carlsson <andersca@apple.com> 10798 10799 Stop using range-based for syntax 10800 https://bugs.webkit.org/show_bug.cgi?id=115356 10801 10802 Reviewed by Andreas Kling. 10803 10804 * PluginProcess/WebProcessConnection.cpp: 10805 (WebKit::WebProcessConnection::didClose): 10806 108072013-04-29 Sergio Correia <sergio.correia@openbossa.org> 10808 10809 [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard 10810 https://bugs.webkit.org/show_bug.cgi?id=115295 10811 10812 Reviewed by Andreas Kling. 10813 10814 Since the mentioned function is declared in a header that is included 10815 conditionally depending on HAVE_ECORE_X being defined. 10816 10817 * WebProcess/efl/WebProcessMainEfl.cpp: 10818 (WebKit::WebProcessMainEfl): 10819 108202013-04-29 Jinwoo Song <jinwoo7.song@samsung.com> 10821 10822 [WK2] Remove build warnings by -Wunused-parameter 10823 https://bugs.webkit.org/show_bug.cgi?id=115344 10824 10825 Reviewed by Noam Rosenthal. 10826 10827 Fix build warnigs -Wunused-parameter. 10828 10829 * UIProcess/CoordinatedGraphics/WebView.cpp: 10830 (WebKit::WebView::createContextMenuProxy): 10831 * UIProcess/DrawingAreaProxy.h: 10832 (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate): 10833 * UIProcess/WebPageProxy.cpp: 10834 (WebKit::WebPageProxy::connectionWillClose): 10835 108362013-04-29 Carlos Garcia Campos <cgarcia@igalia.com> 10837 10838 Unreviewed. Fix make distcheck. 10839 10840 * GNUmakefile.list.am: Add missing header files to compilation. 10841 108422013-04-28 Gyuyoung Kim <gyuyoung.kim@samsung.com> 10843 10844 Unreviewed fix build break on EFL port since r149259. 10845 10846 In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix. 10847 10848 I got a confirm from Sam about landing a trivial build fix patch without sign-off from 10849 WK2 owner. 10850 10851 * UIProcess/API/efl/EwkViewCallbacks.h: 10852 108532013-04-28 Dean Jackson <dino@apple.com> 10854 10855 [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS) 10856 https://bugs.webkit.org/show_bug.cgi?id=115310 10857 10858 Reviewed by Simon Fraser. 10859 10860 Remove ENABLE_HIGH_DPI_CANVAS_macosx. 10861 10862 * Configurations/FeatureDefines.xcconfig: 10863 108642013-04-28 Sam Weinig <sam@webkit.org> 10865 10866 [WebKit2] Adopt new API for detecting window occlusion 10867 https://bugs.webkit.org/show_bug.cgi?id=115334 10868 10869 Reviewed by Simon Fraser. 10870 10871 Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification 10872 instead. 10873 10874 * UIProcess/API/mac/WKView.mm: 10875 (-[WKView dealloc]): 10876 (-[WKView addWindowObserversForWindow:]): 10877 (-[WKView removeWindowObservers]): 10878 (-[WKView viewWillMoveToWindow:]): 10879 (-[WKView viewDidMoveToWindow]): 10880 (-[WKView _windowDidOrderOnScreen:]): 10881 (-[WKView _windowDidChangeOcclusionState:]): 10882 (-[WKView _setIsWindowOccluded:]): 10883 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 10884 (-[WKView windowOcclusionDetectionEnabled]): 10885 (-[WKView setWindowOcclusionDetectionEnabled:]): 10886 Only compile occlusion detection code where supported and remove calls to register/deregister 10887 for detection callbacks, now that NSWindow will handle that for us. We also no longer need to 10888 track all the WKViews, as that was only required to lookup the view that matched the window number 10889 returned from the occlusion callback. 10890 108912013-04-26 Anders Carlsson <andersca@apple.com> 10892 10893 Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection 10894 https://bugs.webkit.org/show_bug.cgi?id=115259 10895 10896 Reviewed by Andreas Kling. 10897 10898 * PluginProcess/WebProcessConnection.cpp: 10899 (WebKit::WebProcessConnection::addPluginControllerProxy): 10900 (WebKit::WebProcessConnection::removePluginControllerProxy): 10901 (WebKit::WebProcessConnection::didClose): 10902 * PluginProcess/WebProcessConnection.h: 10903 (WebProcessConnection): 10904 109052013-04-27 Jessie Berlin <jberlin@apple.com> 10906 10907 Build fix. 10908 10909 * NetworkProcess/NetworkResourceLoader.cpp: 10910 (WebKit::NetworkResourceLoader::didReceiveBuffer): 10911 Do not declare another variable with the same name. 10912 109132013-04-27 Darin Adler <darin@apple.com> 10914 10915 Move from constructor and member function adoptCF/NS to free function adoptCF/NS. 10916 https://bugs.webkit.org/show_bug.cgi?id=115307 10917 10918 Reviewed by Geoffrey Garen. 10919 10920 This change was done by a global replace followed by compiling and inspecting for 10921 cases that needed to be tweaked by hand. 10922 10923 * Platform/cg/CGUtilities.cpp: 10924 (WebKit::paintBitmapContext): 10925 * Platform/mac/ModuleMac.mm: 10926 (WebKit::Module::load): 10927 (WebKit::Module::platformFunctionPointer): 10928 * PluginProcess/mac/PluginProcessMac.mm: 10929 (WebKit::PluginProcess::initializeSandbox): 10930 * Shared/API/c/mac/WKURLRequestNS.mm: 10931 (WKURLRequestCreateWithNSURLRequest): 10932 * Shared/API/c/mac/WKURLResponseNS.mm: 10933 (WKURLResponseCreateWithNSURLResponse): 10934 * Shared/Downloads/mac/DownloadMac.mm: 10935 (WebKit::Download::start): 10936 (WebKit::Download::startWithHandle): 10937 * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: 10938 (WebKit::ChildProcessMain): 10939 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: 10940 (WebKit::getPluginArchitecture): 10941 (WebKit::contentsOfPropertyListAtURL): 10942 (WebKit::getMIMETypesFromPluginBundle): 10943 (WebKit::getStringListResource): 10944 (WebKit::NetscapePluginModule::getPluginInfo): 10945 * Shared/ShareableResource.cpp: 10946 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): 10947 * Shared/cf/ArgumentCodersCF.cpp: 10948 (CoreIPC::decode): 10949 (CoreIPC::encode): 10950 * Shared/cg/ShareableBitmapCG.cpp: 10951 (WebKit::ShareableBitmap::createGraphicsContext): 10952 (WebKit::ShareableBitmap::makeCGImageCopy): 10953 (WebKit::ShareableBitmap::makeCGImage): 10954 (WebKit::ShareableBitmap::createCGImage): 10955 * Shared/mac/ArgumentCodersMac.mm: 10956 (CoreIPC::decode): 10957 * Shared/mac/PlatformCertificateInfo.mm: 10958 (WebKit::PlatformCertificateInfo::dump): 10959 * Shared/mac/WebCoreArgumentCodersMac.mm: 10960 (CoreIPC::::encodePlatformData): 10961 (CoreIPC::::decodePlatformData): 10962 * UIProcess/API/mac/FindIndicatorWindow.mm: 10963 (WebKit::FindIndicatorWindow::setFindIndicator): 10964 (WebKit::FindIndicatorWindow::startFadeOutTimerFired): 10965 * UIProcess/API/mac/PDFViewController.mm: 10966 (-[WKPDFView initWithFrame:PDFViewController:]): 10967 (WebKit::PDFViewController::PDFViewController): 10968 (WebKit::convertPostScriptDataSourceToPDF): 10969 (WebKit::PDFViewController::setPDFDocumentData): 10970 * UIProcess/API/mac/PageClientImpl.mm: 10971 (WebKit::PageClientImpl::PageClientImpl): 10972 (WebKit::PageClientImpl::registerEditCommand): 10973 (WebKit::PageClientImpl::setDragImage): 10974 * UIProcess/API/mac/WKBrowsingContextController.mm: 10975 (didFailProvisionalLoadWithErrorForFrame): 10976 (didFailLoadWithErrorForFrame): 10977 * UIProcess/API/mac/WKConnection.mm: 10978 (didReceiveMessage): 10979 * UIProcess/API/mac/WKPrintingView.mm: 10980 (-[WKPrintingView drawRect:]): 10981 * UIProcess/API/mac/WKView.mm: 10982 (-[WKView browsingContextController]): 10983 (-[WKView _setAcceleratedCompositingModeRootLayer:]): 10984 (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]): 10985 (-[WKView namesOfPromisedFilesDroppedAtDestination:]): 10986 (-[WKView fullScreenWindowController]): 10987 (-[WKView _executeSavedCommandBySelector:]): 10988 (-[WKView printOperationWithPrintInfo:forFrame:]): 10989 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 10990 (WebKit::createProcess): 10991 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: 10992 (WebKit::PluginInfoStore::pluginPathsInDirectory): 10993 (WebKit::PluginInfoStore::getMIMETypeForExtension): 10994 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 10995 (WebKit::PluginProcessProxy::beginModal): 10996 * UIProcess/cf/WebBackForwardListCF.cpp: 10997 (WebKit::WebBackForwardList::createCFDictionaryRepresentation): 10998 * UIProcess/cf/WebPageProxyCF.cpp: 10999 (WebKit::WebPageProxy::sessionStateData): 11000 (WebKit::WebPageProxy::restoreFromSessionStateData): 11001 (WebKit::WebPageProxy::saveRecentSearches): 11002 (WebKit::WebPageProxy::loadRecentSearches): 11003 * UIProcess/cf/WebPreferencesCF.cpp: 11004 (WebKit::cfStringFromWebCoreString): 11005 (WebKit::setStringValueIfInUserDefaults): 11006 (WebKit::setBoolValueIfInUserDefaults): 11007 (WebKit::setUInt32ValueIfInUserDefaults): 11008 (WebKit::setDoubleValueIfInUserDefaults): 11009 (WebKit::WebPreferences::platformUpdateUInt32ValueForKey): 11010 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): 11011 (WebKit::WebPreferences::platformUpdateFloatValueForKey): 11012 * UIProcess/mac/BackingStoreMac.mm: 11013 (WebKit::BackingStore::resetScrolledRect): 11014 (WebKit::BackingStore::backingStoreContext): 11015 * UIProcess/mac/CorrectionPanel.mm: 11016 (WebKit::CorrectionPanel::handleAcceptedReplacement): 11017 * UIProcess/mac/TextCheckerMac.mm: 11018 (WebKit::TextChecker::checkTextOfParagraph): 11019 (WebKit::TextChecker::updateSpellingUIWithGrammarString): 11020 * UIProcess/mac/WKFullScreenWindowController.mm: 11021 (-[WKFullScreenWindowController enterFullScreen:]): 11022 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): 11023 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): 11024 * UIProcess/mac/WebContextMac.mm: 11025 (WebKit::WebContext::platformDefaultDiskCacheDirectory): 11026 * UIProcess/mac/WebContextMenuProxyMac.mm: 11027 (WebKit::nsMenuItemVector): 11028 (WebKit::WebContextMenuProxyMac::populate): 11029 * UIProcess/mac/WebInspectorProxyMac.mm: 11030 (WebKit::WebInspectorProxy::createInspectorWindow): 11031 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 11032 * UIProcess/mac/WebPopupMenuProxyMac.mm: 11033 (WebKit::WebPopupMenuProxyMac::populate): 11034 (WebKit::WebPopupMenuProxyMac::showPopupMenu): 11035 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: 11036 (WebKit::InjectedBundle::load): 11037 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 11038 (WebKit::NetscapePlugin::updatePluginLayer): 11039 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: 11040 (WebKit::PluginProxy::pluginLayer): 11041 * WebProcess/Plugins/PDF/PDFPlugin.mm: 11042 (WebKit::PDFPlugin::PDFPlugin): 11043 (WebKit::PDFPlugin::createScrollbar): 11044 (WebKit::PDFPlugin::pdfDocumentDidLoad): 11045 (WebKit::PDFPlugin::writeItemsToPasteboard): 11046 * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: 11047 (getAllScriptsInPDFDocument): 11048 (WebKit::SimplePDFPlugin::pdfDocumentDidLoad): 11049 (WebKit::SimplePDFPlugin::streamDidReceiveData): 11050 (WebKit::SimplePDFPlugin::manualStreamDidReceiveData): 11051 * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 11052 (WebKit::WebResourceCacheManager::clearCacheForOrigin): 11053 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: 11054 (WebKit::WebResourceCacheManager::cfURLCacheHostNames): 11055 (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): 11056 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: 11057 (WebKit::createNSError): 11058 * WebProcess/WebPage/WebPage.cpp: 11059 (WebKit::WebPage::drawPagesToPDF): 11060 * WebProcess/WebPage/mac/WebPageMac.mm: 11061 (WebKit::WebPage::performDictionaryLookupForRange): 11062 (WebKit::cachedResponseForURL): 11063 (WebKit::WebPage::drawPagesToPDFFromPDFDocument): 11064 * WebProcess/mac/WebProcessMac.mm: 11065 (WebKit::WebProcess::platformSetCacheModel): 11066 Use adoptCF and adoptNS free functions. 11067 110682013-04-27 Alexey Proskuryakov <ap@apple.com> 11069 11070 <rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync 11071 https://bugs.webkit.org/show_bug.cgi?id=115318 11072 11073 Reviewed by Darin Adler. 11074 11075 sendAbortingOnFailure may actually fail, and abort the request, making m_handle null. 11076 11077 * NetworkProcess/NetworkResourceLoader.cpp: 11078 (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after 11079 sending a message, because the request will cancelled when connection is invalid. 11080 (WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches 11081 the handle that we are called with. 11082 (WebKit::NetworkResourceLoader::didFinishLoading): Ditto. 11083 (WebKit::NetworkResourceLoader::didFail): Ditto. 11084 (WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto. 11085 (WebKit::NetworkResourceLoader::didSendData): Ditto. 11086 (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto. 11087 (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto. 11088 (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto. 11089 (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto. 11090 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto. 11091 110922013-04-27 Alexey Proskuryakov <ap@apple.com> 11093 11094 <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads 11095 https://bugs.webkit.org/show_bug.cgi?id=115319 11096 11097 Reviewed by Darin Adler. 11098 11099 WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response 11100 to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was 11101 alrady canceled on WebProcess side. 11102 11103 * NetworkProcess/NetworkResourceLoader.cpp: 11104 (WebKit::NetworkResourceLoader::didReceiveResponseAsync): 11105 * WebProcess/Network/WebResourceLoader.cpp: 11106 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): 11107 * WebProcess/Network/WebResourceLoader.h: 11108 * WebProcess/Network/WebResourceLoader.messages.in: 11109 111102013-04-27 Alexey Proskuryakov <ap@apple.com> 11111 11112 Regression tests that reference a non-local resource crash with NetworkProcess enabled 11113 https://bugs.webkit.org/show_bug.cgi?id=115290 11114 11115 Reviewed by Sam Weinig. 11116 11117 Covered by fast/dom/icon-url-change.html and many other existing tests. 11118 11119 * WebProcess/Network/WebResourceLoadScheduler.cpp: 11120 (WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it 11121 would be better if SubresourceLoad::create just created an object an didn't do 11122 further checks before returning a pointer, but changing that is beyond the scope 11123 of the fix. 11124 111252013-04-26 Yael Aharon <yael.aharon@intel.com> 11126 11127 [WK2][EFL] Build break after r149212 11128 https://bugs.webkit.org/show_bug.cgi?id=115294 11129 11130 Reviewed by Simon Fraser. 11131 r144672 bumped up the revision of WKContextClient API, and introduced a version array 11132 APIClientTraits<WKContextClient>::interfaceSizesByVersion . 11133 In r149212, the version was bumped back down and the version array was emptied but not removed. 11134 This causes a warning "array subscript is below array bounds", and in EFL the warning is 11135 treated as error. 11136 11137 * Shared/APIClientTraits.cpp: 11138 (WebKit): 11139 * Shared/APIClientTraits.h: 11140 111412013-04-26 Martin Robinson <mrobinson@igalia.com> 11142 11143 [GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API 11144 https://bugs.webkit.org/show_bug.cgi?id=99081 11145 11146 Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain. 11147 11148 Add methods to WebKitWebViewGroup to add and remove user style sheets. 11149 This allows clients to inject style sheets into pages with a set of 11150 rules for when those style sheets apply. 11151 11152 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: 11153 (toImmutableArray): Added this helper which converts the GList* parameters into 11154 ImmutableArrays for use with the WebKit2 internal API. 11155 (webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet. 11156 (webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets. 11157 * UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations. 11158 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation. 11159 * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API. 11160 (isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL. 11161 (fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist. 11162 (removeOldInjectedStyleSheetsAndResetLists): Function to start afresh. 11163 (testWebViewGroupInjectedStyleSheet): The actual test. 11164 (serverCallback): Server callback for use with the test. We cannot use loadHTML or 11165 loadAlternateHTML, because that checks the whitelist and blacklist against about:blank. 11166 (beforeAll): Initialize the server and new test. 11167 (afterAll): Clean up the server. 11168 111692013-04-26 Simon Cooper <scooper@apple.com> 11170 11171 Permit ~/Library or ~/Library/Preferences to be symlinks 11172 https://bugs.webkit.org/show_bug.cgi?id=115142 11173 <rdar://problem/12953603> 11174 11175 Reviewed by Alexey Proskuryakov. 11176 11177 Pass in two new parameters which are the resolved paths to ~/Library 11178 and ~/Library/Preferences. Added new expansion functions and 11179 substituted the new functions for home-regex, home-subpath and 11180 home-literal for places referencing resources in "~/Library" or 11181 "~/Library/Preferences". 11182 11183 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 11184 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 11185 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 11186 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 11187 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 11188 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 11189 * Shared/mac/ChildProcessMac.mm: 11190 (WebKit::ChildProcess::initializeSandbox): 11191 111922013-04-26 Alexey Proskuryakov <ap@apple.com> 11193 11194 [WK2] WKContextClient doesn't need to be versioned yet 11195 https://bugs.webkit.org/show_bug.cgi?id=115279 11196 11197 Reviewed by Anders Carlsson. 11198 11199 * Shared/APIClientTraits.cpp: 11200 * Shared/APIClientTraits.h: 11201 * UIProcess/API/C/WKContext.h: 11202 112032013-04-26 Anders Carlsson <andersca@apple.com> 11204 11205 Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess 11206 https://bugs.webkit.org/show_bug.cgi?id=115277 11207 <rdar://problem/12890184> 11208 11209 Reviewed by Sam Weinig. 11210 11211 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 11212 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): 11213 Ask the download manager to convert the main resource load to a download. 11214 11215 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 11216 Add new message. 11217 11218 * NetworkProcess/NetworkResourceLoader.h: 11219 (WebKit::NetworkResourceLoader::handle): 11220 Add getter. 11221 11222 * Shared/Downloads/mac/DownloadMac.mm: 11223 (dispatchOnMainThread): 11224 Helper function that ensures that a given block is called on the main thread. 11225 11226 (-[WKDownloadAsDelegate downloadDidBegin:]): 11227 (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]): 11228 (-[WKDownloadAsDelegate download:didReceiveResponse:]): 11229 (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]): 11230 (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]): 11231 (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]): 11232 (-[WKDownloadAsDelegate download:didCreateDestination:]): 11233 (-[WKDownloadAsDelegate downloadDidFinish:]): 11234 (-[WKDownloadAsDelegate download:didFailWithError:]): 11235 Use dispatchOnMainThread. 11236 11237 * UIProcess/WebPageProxy.cpp: 11238 (WebKit::WebPageProxy::receivedPolicyDecision): 11239 Remove code that cancels the current load and starts a new download. 11240 11241 * WebProcess/WebPage/WebFrame.cpp: 11242 (WebKit::WebFrame::convertMainResourceLoadToDownload): 11243 Send the ConvertMainResourceLoadToDownload message to the network process. 11244 112452013-04-25 Roger Fong <roger_fong@apple.com> 11246 11247 Disable sub-pixel layout on mac. 11248 https://bugs.webkit.org/show_bug.cgi?id=114999. 11249 11250 Reviewed by Simon Fraser. 11251 11252 * Configurations/FeatureDefines.xcconfig: 11253 112542013-04-26 Simon Fraser <simon.fraser@apple.com> 11255 11256 Inspector window is often blank when opened 11257 https://bugs.webkit.org/show_bug.cgi?id=115220 11258 11259 Reviewed by Tim Horton. 11260 11261 After disabling tiled scrolling and accelerated drawing in r149006, the 11262 Inspector window was often missing its content after opening. This only 11263 happened when the user has a preference on disk to use accelerated drawing 11264 in the Inspector. 11265 11266 The missing content was caused by a failure to connect the correct contextID 11267 for remote layer hosting. On window creation, we hook up a context using 11268 WindowServer layer hosting (the default), but then switch back to app-hosted 11269 layers for the Inspector window. This switching happens in didUpdateBackingStoreState(), 11270 but that can be re-entered via its call to sendUpdateBackingStoreState(). In 11271 that cause, on unwinding the stack it would call enterAcceleratedCompositingMode() 11272 with a stale layerTreeContext. 11273 11274 Fix by moving the code that exits/enters accelerated compositing mode to before 11275 the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids 11276 use of a possibly stale layerTreeContext. 11277 11278 * UIProcess/DrawingAreaProxyImpl.cpp: 11279 (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): 11280 112812013-04-26 Alexey Proskuryakov <ap@apple.com> 11282 11283 Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs 11284 https://bugs.webkit.org/show_bug.cgi?id=115273 11285 11286 Reviewed by Anders Carlsson. 11287 11288 Covered by multiple existing tests (when using NetworkProcess), including: 11289 - http/tests/fileapi/blob-url-in-subframe.html 11290 - http/tests/fileapi/create-blob-url-from-data-url.html 11291 11292 * NetworkProcess/NetworkResourceLoader.cpp: 11293 (WebKit::NetworkResourceLoader::continueDidReceiveResponse): 11294 Work around BlobResourceHandle badness. 11295 112962013-04-26 Alexey Proskuryakov <ap@apple.com> 11297 11298 [WK2] Remove NetworkResourceLoader::cleanupOnMainThread 11299 https://bugs.webkit.org/show_bug.cgi?id=115268 11300 11301 Reviewed by Brady Eidson. 11302 11303 All cleanup() callers are now on main thread, and this indirection only complicates debugging. 11304 11305 * NetworkProcess/NetworkResourceLoader.cpp: 11306 (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): 11307 (WebKit::NetworkResourceLoader::abortInProgressLoad): 11308 (WebKit::NetworkResourceLoader::didFinishLoading): 11309 (WebKit::NetworkResourceLoader::didFail): 11310 * NetworkProcess/NetworkResourceLoader.h: 11311 113122013-04-26 Andy Estes <aestes@apple.com> 11313 11314 [WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads 11315 https://bugs.webkit.org/show_bug.cgi?id=115267 11316 11317 Reviewed by Alexey Proskuryakov. 11318 11319 * Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes. 11320 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 11321 (WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes. 11322 (WebKit::CustomProtocolManager::unregisterScheme): Ditto. 11323 (WebKit::CustomProtocolManager::supportsScheme): Ditto. 11324 113252013-04-26 Alexey Proskuryakov <ap@apple.com> 11326 11327 Blobs are not associated with connection when there are no sandbox extensions 11328 https://bugs.webkit.org/show_bug.cgi?id=115264 11329 11330 Reviewed by Brady Eidson. 11331 11332 Covered by multiple fast/files tests when using NetworkProcess. 11333 11334 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: 11335 (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error. 11336 113372013-04-25 Andy Estes <aestes@apple.com> 11338 11339 [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out 11340 https://bugs.webkit.org/show_bug.cgi?id=115223 11341 11342 Reviewed by Darin Adler. 11343 11344 When WebKit performs a synchronous load on the Mac, it spins a nested 11345 run loop in a mode that only accepts input from the NSURLConnection 11346 performing the load. When the load is for a custom protocol in WebKit2, 11347 we proxy it to the UI process via CoreIPC messages, but the response 11348 messages from the UI process are never processed as long as the run 11349 loop is in a non-common mode (and we wouldn't want to process messages 11350 that could re-enter WebCore in the middle of loading, anyway). Since 11351 these messages never make it back to the NSURLConnection handling the 11352 request, the connection eventually times out. 11353 11354 Fix this by using a work queue to handle custom protocol messages in 11355 the networking process. The work queue can process incoming custom 11356 protocol messages while the main thread is blocked. 11357 11358 * NetworkProcess/NetworkProcess.cpp: 11359 (WebKit::NetworkProcess::initializeConnection): Called 11360 initializeConnection() on all the NetworkProcess's supplements. 11361 * Shared/ChildProcessSupplement.h: Added a base class for 11362 NetworkProcessSupplement and WebProcessSupplement which defines 11363 initializeConnection and provides an empty default implementation. 11364 (WebKit::ChildProcessSupplement::~ChildProcessSupplement): 11365 (WebKit::ChildProcessSupplement::initializeConnection): 11366 * Shared/Network/CustomProtocols/CustomProtocolManager.h: 11367 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 11368 (WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a 11369 work queue for message processing. 11370 (WebKit::CustomProtocolManager::initializeConnection): Added the work 11371 queue as a message receiver on the CoreIPC connection. 11372 (WebKit::CustomProtocolManager::initialize): If we're in the web 11373 process and the network process is being used, unregister and destroy 11374 the work queue we previously created. It'd be better to not create it 11375 in the first place, but we have to register our work queue with the 11376 CoreIPC connection before it is established, which is before the UI 11377 process has told us whether the network process is in use. 11378 * Shared/Network/NetworkProcessSupplement.h: Inherited from 11379 ChildProcessSupplement. 11380 * WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h. 11381 * WebProcess/WebProcess.cpp: 11382 (WebKit::WebProcess::initializeConnection): Called 11383 initializeConnection() on all the WebProcess's supplements. 11384 * WebProcess/WebProcessSupplement.h: Inherited from 11385 ChildProcessSupplement. 11386 113872013-04-26 Eduardo Lima Mitev <elima@igalia.com> 11388 11389 [GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols 11390 https://bugs.webkit.org/show_bug.cgi?id=115240 11391 11392 Reviewed by Martin Robinson. 11393 11394 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux 11395 113962013-04-25 Zan Dobersek <zdobersek@igalia.com> 11397 11398 [GTK] Plugin process broken due to a missing symbol 11399 https://bugs.webkit.org/show_bug.cgi?id=114901 11400 11401 Reviewed by Gustavo Noronha Silva. 11402 11403 Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries 11404 multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library 11405 references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries 11406 are specified in various ways. 11407 11408 The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance 11409 this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and 11410 gamepad dependencies' libraries are also added to the binary's LDADD list. 11411 11412 * GNUmakefile.am: 11413 * GNUmakefile.list.am: Add a few missing files to the build. 11414 114152013-04-24 Chris Fleizach <cfleizach@apple.com> 11416 11417 WEB SPEECH: language support does not work as expected 11418 https://bugs.webkit.org/show_bug.cgi?id=115119 11419 11420 Reviewed by Alexey Proskuryakov. 11421 11422 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 11423 (InitWebCoreSystemInterface): 11424 114252013-04-25 Anders Carlsson <andersca@apple.com> 11426 11427 Rename DecidePolicyForResponse message to DecidePolicyForResponseSync 11428 https://bugs.webkit.org/show_bug.cgi?id=115207 11429 11430 Reviewed by Beth Dakin. 11431 11432 In preparation for adding a new async DecidePolicyForResponse message, 11433 rename the current one to DecidePolicyForResponseSync. Also split out the async part 11434 into a separate WebPageProxy::decidePolicyForResponse member function. 11435 11436 * UIProcess/WebPageProxy.cpp: 11437 (WebKit::WebPageProxy::WebPageProxy): 11438 (WebKit::WebPageProxy::receivedPolicyDecision): 11439 (WebKit::WebPageProxy::decidePolicyForResponse): 11440 (WebKit::WebPageProxy::decidePolicyForResponseSync): 11441 * UIProcess/WebPageProxy.h: 11442 (WebPageProxy): 11443 * UIProcess/WebPageProxy.messages.in: 11444 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 11445 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 11446 114472013-04-25 Joseph Pecoraro <pecoraro@apple.com> 11448 11449 Web Inspector: ConsoleMessage should include line and column number where possible 11450 https://bugs.webkit.org/show_bug.cgi?id=114929 11451 11452 Reviewed by Timothy Hatcher. 11453 11454 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 11455 (WebKit::WebChromeClient::addMessageToConsole): 11456 * WebProcess/WebCoreSupport/WebChromeClient.h: 11457 114582013-04-25 Brady Eidson <beidson@apple.com> 11459 11460 Thread safety issues in WKCustomProtocol. 11461 <rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185 11462 11463 Reviewed by Alexey Proskuryakov. 11464 11465 * Shared/Network/CustomProtocols/CustomProtocolManager.h: 11466 11467 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 11468 (WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex. 11469 (WebKit::CustomProtocolManager::removeCustomProtocol): Ditto. 11470 (WebKit::CustomProtocolManager::didFailWithError): 11471 (WebKit::CustomProtocolManager::didLoadData): 11472 (WebKit::CustomProtocolManager::didReceiveResponse): 11473 (WebKit::CustomProtocolManager::didFinishLoading): 11474 (WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return 11475 a RetainPtr instead of a raw pointer. 11476 114772013-04-25 Jer Noble <jer.noble@apple.com> 11478 11479 Further build fixes: correct two more misnames of WebProcessShim.dyld. 11480 11481 * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: 11482 (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): 11483 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 11484 114852013-04-25 Martin Robinson <mrobinson@igalia.com> 11486 11487 Make gobject-introspection warnings non-fatal 11488 https://bugs.webkit.org/show_bug.cgi?id=115184 11489 11490 Reviewed by Carlos Garcia Campos. 11491 11492 * GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld 11493 until we get to a point where gobject-introspection gives consistent warnings. 11494 114952013-04-25 Carlos Garcia Campos <cgarcia@igalia.com> 11496 11497 [GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API 11498 https://bugs.webkit.org/show_bug.cgi?id=111265 11499 11500 Reviewed by Anders Carlsson. 11501 11502 In the current API the settings are always shared by all web 11503 views, because they are always created on the default page 11504 group. This makes impossible to have different settings on 11505 different web views. Expose the page group in the API, 11506 so that users can create web views on a group different than the 11507 default one to have their own settings. 11508 11509 * GNUmakefile.list.am: Add new files to compilation. 11510 * UIProcess/API/gtk/WebKitSettings.cpp: 11511 (webkitSettingsGetPreferences): Helper private method to get the 11512 WebPreferences wrapped by a WebKitSettings object. 11513 * UIProcess/API/gtk/WebKitSettingsPrivate.h: 11514 * UIProcess/API/gtk/WebKitWebContext.cpp: 11515 (_WebKitWebContextPrivate): Add a default WebKitWebViewGroup. 11516 (webkitWebContextCreatePageForWebView): Create the WebPageProxy 11517 with the WebPageGroup of the given WebKitWebViewGroup. 11518 (webkitWebContextGetDefaultWebViewGroup): Helper private method to 11519 get the default WebKitWebViewGroup. 11520 * UIProcess/API/gtk/WebKitWebContextPrivate.h: 11521 * UIProcess/API/gtk/WebKitWebView.cpp: 11522 (_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view 11523 is created with a group. 11524 (webkitWebViewUpdateSettings): Keep a reference of the group 11525 settings to be able to disconnect the signals when the settings 11526 object is replaced in the view group and connect to the signals 11527 for the custom settings. 11528 (webkitWebViewSettingsChanged): Disconnect the signals for the 11529 previous settings and set the new settings. 11530 (webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect 11531 notify::settings signal of WebKitWebViewGroup. 11532 (webkitWebViewConstructed): Pass the current WebKitWebViewGroup to 11533 webkitWebContextCreatePageForWebView(). 11534 (webkitWebViewSetProperty): Add setter for group property. 11535 (webkitWebViewGetProperty): Add getter for group property. 11536 (webkitWebViewDispose): Call 11537 webkitWebViewDisconnectSettingsChangedSignalHandler(). 11538 (webkit_web_view_class_init): Add WebKitWebView:group property. 11539 (webkitWebViewHandleAuthenticationChallenge): Use 11540 webkit_web_view_get_settings(). 11541 (webkit_web_view_new_with_group): Create a new web view with the 11542 given WebKitWebViewGroup. 11543 (webkit_web_view_get_group): Return the current WebKitWebViewGroup 11544 or the default one if the view was not created with 11545 webkit_web_view_new_with_group(). 11546 (webkit_web_view_set_settings): Set the settings of the current 11547 WebKitWebViewGroup. 11548 (webkit_web_view_get_settings): Get the settings of the current 11549 WebKitWebViewGroup. 11550 (webkit_web_view_set_zoom_level): Use 11551 webkit_web_view_get_settings(). 11552 (webkit_web_view_get_zoom_level): Ditto. 11553 * UIProcess/API/gtk/WebKitWebView.h: 11554 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added. 11555 (_WebKitWebViewGroupPrivate): 11556 (webkitWebViewGroupSetProperty): 11557 (webkitWebViewGroupGetProperty): 11558 (webkitWebViewGroupConstructed): 11559 (webkit_web_view_group_class_init): 11560 (webkitWebViewGroupAttachSettingsToPageGroup): Set the 11561 WebPreferences of the current WebKitSettings to the WebPageGroup. 11562 (webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for 11563 the given WebPageGroup. 11564 (webkitWebViewGroupGetPageGroup): Helper private method to get the 11565 WebPageGroup wrapped by the WebKitWebViewGroup. 11566 (webkit_web_view_group_new): Create a new WebKitWebViewGroup. 11567 (webkit_web_view_group_get_name): Return the name of a 11568 WebKitWebViewGroup. 11569 (webkit_web_view_group_get_settings): Get the settings of a 11570 WebKitWebViewGroup. 11571 (webkit_web_view_group_set_settings): Set new settings of a 11572 WebKitWebViewGroup. 11573 * UIProcess/API/gtk/WebKitWebViewGroup.h: Added. 11574 (_WebKitWebViewGroup): 11575 (_WebKitWebViewGroupClass): 11576 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added. 11577 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add 11578 WebKitWebViewGroup section. 11579 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. 11580 * UIProcess/API/gtk/docs/webkit2gtk.types: Add 11581 webkit_web_view_group_get_type. 11582 * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to 11583 compilation. 11584 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: 11585 (testWebViewSettings): We can't watch settings in the default view 11586 group anymore, because they are not released with the web view but 11587 with the web context that is freed after the Test destructor. 11588 * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added. 11589 (testWebViewGroupDefault): 11590 (testWebViewGroupNewGroup): 11591 (testWebViewNewWithGroup): 11592 (testWebViewGroupSettings): 11593 (beforeAll): 11594 (afterAll): 11595 * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h. 11596 115972013-04-25 Jer Noble <jer.noble@apple.com> 11598 11599 Unreviewed build fix: Fix the name of DyldInterpose.h in 11600 SecItemShimLibrary.mm, fix the name of WebProcessShim.dyld in 11601 WebContentServiceEntryPoint.mm, and stop linking against libWTF.a 11602 directly (which means removing ASSERTs from 11603 CookieStorageShimLibrary.cpp). 11604 11605 * Shared/mac/CookieStorageShimLibrary.cpp: 11606 (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): 11607 (WebKit::WebKitCookieStorageShimInitialize): 11608 * WebKit2.xcodeproj/project.pbxproj: 11609 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: 11610 (WebContentServiceInitializer): 11611 * WebProcess/mac/SecItemShimLibrary.mm: 11612 116132013-04-24 Tim Horton <timothy_horton@apple.com> 11614 11615 PDFPlugin: Cursor should become an i-beam when over selectable text 11616 https://bugs.webkit.org/show_bug.cgi?id=115018 11617 <rdar://problem/12645012> 11618 11619 Reviewed by Alexey Proskuryakov. 11620 11621 * WebProcess/Plugins/PDF/PDFPlugin.h: 11622 Add updateCursor(), the UpdateCursorMode and HitTestResult enums, and 11623 storage for the last PDF hit test result. 11624 * WebProcess/Plugins/PDF/PDFPlugin.mm: 11625 (WebKit::PDFPlugin::updateCursor): 11626 Hit test the PDF. If there is a word under the cursor, use the I-beam cursor, 11627 otherwise, use the default pointer cursor. This approximates PDFKit's behavior, 11628 though does not match it precisely in the case of annotations. 11629 Only send the cursor update to the UIProcess if it is a change, or if 11630 we're explicitly asked to update. 11631 (WebKit::PDFPlugin::handleMouseEvent): 11632 If we're processing a mouse moved event, update the cursor if needed. 11633 (WebKit::PDFPlugin::handleMouseEnterEvent): 11634 If the cursor just moved over the PDFPlugin, force-update the cursor, 11635 even if it matches the previously-set cursor (because something else 11636 likely updated the cursor while it was not over the PDFPlugin). 11637 116382013-04-24 Tim Horton <timothy_horton@apple.com> 11639 11640 Page Overlays shouldn't waste time flushing layers if we're not going to use it 11641 https://bugs.webkit.org/show_bug.cgi?id=115145 11642 11643 Reviewed by Simon Fraser. 11644 11645 Don't flush the page overlay layer when it's installed - it starts out 11646 with paintContents=false, so we don't really need a CALayer yet. We'll 11647 flush later if need be. 11648 11649 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 11650 (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): 11651 116522013-04-24 Jer Noble <jer.noble@apple.com> 11653 11654 Further unreviewed build fix; CFNetwork.framework is the one which Lion 11655 refuses to link against. 11656 11657 * WebKit2.xcodeproj/project.pbxproj: 11658 116592013-04-24 Jer Noble <jer.noble@apple.com> 11660 11661 Unreviewed build fix; link against CoreServices.framework instead of against 11662 CoreFoundation.framework directly, to make the linker happy on Lion. 11663 11664 * WebKit2.xcodeproj/project.pbxproj: 11665 116662013-04-22 Jer Noble <jer.noble@apple.com> 11667 11668 WWDC session videos don’t play at developer.apple.com 11669 https://bugs.webkit.org/show_bug.cgi?id=114858 11670 11671 Reviewed by Eric Carlson. Rubber stamped by Brady Eidson. 11672 11673 AVFoundation uses CFNetwork to store and retrieve cookies from the global store. 11674 However, in the case where network access happens in the NetworkProcess, session 11675 cookies are stored in-memory, and are not accessable in the WebProcess. Until such 11676 a time as AVFoundation can provide an API which would allow us to provide cookies 11677 for a specific request, we will interpose the CFNetwork method which they use to 11678 retrieve the cookie string from the cookie store for their pending request. 11679 11680 Duplicate the previous SecItemShim target to a new, WebProcessShim target. This 11681 target includes the SecItemShim functionality, but will add a new shim for cookie 11682 retrieval: 11683 * Shared/mac/CookieStorageShimLibrary.h: Added 11684 (CookieStorageShimCallbacks): 11685 * Shared/mac/CookieStorageShimLibrary.cpp: Added. 11686 (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class. 11687 (WebKit::ShimProtector::~ShimProtector): 11688 (WebKit::ShimProtector::count): 11689 (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose 11690 the CFNetwork call, and pass to the registered callback. 11691 (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks. 11692 11693 Add a helper singleton class which will talk to the shim through the 11694 registered callbacks: 11695 * Shared/mac/CookieStorageShim.h: Added 11696 (WebKit::CookieStorageShim::CookieStorageShim): 11697 * Shared/mac/CookieStorageShim.cpp: Added. 11698 (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request 11699 over to the NetworkProcess. 11700 (WebKit::CookieStorageShim::shared): Simple singleton. 11701 (WebKit::CookieStorageShim::initialize): Call the library initializer. 11702 11703 Initialize the shim only when the WebProcess is delegating network loading 11704 to the NetworkProcess: 11705 * WebProcess/WebProcess.cpp: 11706 (WebKit::WebProcess::initializeWebProcess): 11707 11708 Rename the WebProcess's shim from SecItemShim -> WebProcessShim: 11709 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 11710 (WebKit::addDYLDEnvironmentAdditions): 11711 * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: 11712 (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): 11713 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 11714 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: 11715 (WebContentServiceInitializer): 11716 11717 As the DYLD_INTERPOSE macro is used in multiple files now, put it in its 11718 own header: 11719 * Shared/mac/DyldInterpose.h: Added. 11720 * PluginProcess/mac/PluginProcessShim.mm: 11721 * WebProcess/mac/SecItemShimLibrary.mm: 11722 11723 Add new files to the project: 11724 * WebKit2.xcodeproj/project.pbxproj: 11725 117262013-04-24 Byungwoo Lee <bw80.lee@samsung.com> 11727 11728 [EFL] Fix build error after r148963. 11729 https://bugs.webkit.org/show_bug.cgi?id=115126 11730 11731 Reviewed by Laszlo Gombos. 11732 11733 Generate forwarding headers for 'CoordinatedGraphics' to generate WKView.h 11734 11735 * PlatformEfl.cmake: 11736 117372013-04-24 Anders Carlsson <andersca@apple.com> 11738 11739 Crash when trying to determine the length of an invalid message 11740 https://bugs.webkit.org/show_bug.cgi?id=115127 11741 <rdar://problem/13700736> 11742 11743 Reviewed by Beth Dakin. 11744 11745 Use message instead of incomingMessage since incomingMessage will always be null. 11746 11747 * Platform/CoreIPC/Connection.cpp: 11748 (CoreIPC::Connection::processIncomingMessage): 11749 117502013-04-24 Carlos Garcia Campos <cgarcia@igalia.com> 11751 11752 [GTK] Use stamp files for generate-forwarding-headers makefile rules 11753 https://bugs.webkit.org/show_bug.cgi?id=115118 11754 11755 Reviewed by Martin Robinson. 11756 11757 Use a stamp file for the WebKit2 forwarding generator rule. Also 11758 fix the rule dependencies that pointed to a non existent variable. 11759 11760 * GNUmakefile.am: 11761 117622013-04-24 Zan Dobersek <zdobersek@igalia.com> 11763 11764 [GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged 11765 https://bugs.webkit.org/show_bug.cgi?id=115094 11766 11767 Reviewed by Tim Horton. 11768 11769 The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017). 11770 Implement the method for the GTK port in the same manner it is implemented under the Mac port, 11771 calling setContentsOpaque on the non-composited content layer. 11772 11773 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: 11774 (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged): 11775 117762013-04-24 Simon Cooper <scooper@apple.com> 11777 11778 <rdar://problem/13614117> Refine the Flash Player profile 11779 https://bugs.webkit.org/show_bug.cgi?id=115016 11780 11781 Reviewed by Alexey Proskuryakov. 11782 11783 Add some refinements to the Flash Player profile. Make a non-/ home 11784 directory work. Fixes that allow file uploading via user selected files. 11785 11786 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 11787 117882013-04-24 Carlos Garcia Campos <cgarcia@igalia.com> 11789 11790 [WebKit2] Add CoordinatedGraphics to the list of platforms in generate-forwarding-headers.pl 11791 https://bugs.webkit.org/show_bug.cgi?id=115098 11792 11793 Reviewed by Martin Robinson. 11794 11795 r148963 introduced a new WKView.h header in a directory not listed 11796 as a platform prefix in generate-forwarding-headers.pl. 11797 11798 * Scripts/generate-forwarding-headers.pl: Replace unused chromium 11799 plaform prefix with CoordinatedGraphics that is used now. 11800 118012013-04-24 Seokju Kwon <seokju.kwon@gmail.com> 11802 11803 Web Inspector: Add number to list from remote web inspector. 11804 https://bugs.webkit.org/show_bug.cgi?id=115014 11805 11806 Reviewed by Benjamin Poulain. 11807 11808 * UIProcess/InspectorServer/front-end/inspectorPageIndex.html: 11809 118102013-04-24 Vlad Vasilyeu <vasvlad@gmail.com> 11811 11812 --minimal build fails with error: Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h:44:36: error: decode is not a member of WebCore::TextCheckingResult 11813 https://bugs.webkit.org/show_bug.cgi?id=114367 11814 11815 Reviewed by Benjamin Poulain. 11816 11817 Include WebCoreArgumentCoders.h to WebEditorClientEfl.cpp from 11818 WebKit2/Shared/ for successfully building with option --minimal 11819 11820 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: 11821 11822== Rolled over to ChangeLog-2013-04-24 == 11823