ChangeLog 2.01 MB
Newer Older
1 2 3 4 5 6
2013-03-27  Tim Horton  <timothy_horton@apple.com>

        Unreviewed Qt build fix after http://trac.webkit.org/changeset/147067.

        * WebProcess/WebPage/WebPage.cpp:

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
2013-03-27  Tim Horton  <timothy_horton@apple.com>

        PDFPlugin: Enable PDFPlugin only if its dependencies exist on the system
        https://bugs.webkit.org/show_bug.cgi?id=113372
        <rdar://problem/12685301>

        Reviewed by Alexey Proskuryakov.

        * Shared/mac/PDFKitImports.h: Wrap in #if PLATFORM(MAC).
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin): Use shouldUsePDFPlugin.
        (WebKit::WebPage::shouldUsePDFPlugin): If the PDFPlugin setting is enabled but PDFLayerController is not available, don't use PDFPlugin.
        * WebProcess/WebPage/WebPage.h:
        (WebPage): Add shouldUsePDFPlugin
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformPreferencesDidChange): Use shouldUsePDFPlugin.

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
2013-03-27  Sam Weinig  <sam@webkit.org>

        [WebKit2] Need SPI to determine whether a plug-in is blocked
        https://bugs.webkit.org/show_bug.cgi?id=113463

        Reviewed by Anders Carlsson.

        Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in,
        including whether it is blocked by x-protect.

        * UIProcess/WebLoaderClient.cpp:
        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toWKPluginLoadPolicy):
        (WebKit::toPluginModuleLoadPolicy):
        Move to a shared location.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextIsPlugInUpdateAvailable):
        (WKPlugInInfoPathKey):
        (WKPlugInInfoBundleIdentifierKey):
        (WKPlugInInfoVersionKey):
        (WKPlugInInfoLoadPolicyKey):
        (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
        (WKContextCopyPlugInInfoForBundleIdetifier):
        Add new SPI and dictionary keys.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
        * UIProcess/Plugins/PluginInfoStore.h:
        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
        Add function to lookup plug-ins by bundle identifier.

58 59 60 61 62 63 64 65 66 67 68 69
2013-03-27  Beth Dakin  <bdakin@apple.com>

        WKBundlePagePrivateMac.h is not being exported
        https://bugs.webkit.org/show_bug.cgi?id=113470
        -and corresponding-
        <rdar://problem/13522909>

        Reviewed by Sam Weinig.

        Mark it as private instead of project.
        * WebKit2.xcodeproj/project.pbxproj:

70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
2013-03-26  Beth Dakin  <bdakin@apple.com>

        Need WK2 API to give a WebView a header and footer
        https://bugs.webkit.org/show_bug.cgi?id=113352
        -and corresponding-
        <rdar://problem/13383835>

        Reviewed by Simon Fraser.

        New API allows setting and getting layers for a header and footer.

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/API/c/mac: Added.
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
        (WKBundlePageGetHeaderLayer):
        (WKBundlePageSetHeaderLayer):
        (WKBundlePageGetFooterLayer):
        (WKBundlePageSetFooterLayer):
        * WebProcess/WebPage/WebPage.h:
        (WebPage):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::setTopOverhangImage):
        (WebKit::WebPage::setBottomOverhangImage):
        (WebKit):
        (WebKit::WebPage::getHeaderLayer):
        (WebKit::WebPage::setHeaderLayerWithHeight):
        (WebKit::WebPage::getFooterLayer):
        (WebKit::WebPage::setFooterLayerWithHeight):

100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
2013-03-27  Jer Noble  <jer.noble@apple.com>

        Going full screen and cancelling gets system into a weird state
        https://bugs.webkit.org/show_bug.cgi?id=113445

        Reviewed by Eric Carlson.

        Replace an array of BOOL member variables to track full screen state with a single enum, and
        add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new,
        more specific enum to be more stringent about the state when responding to WebProcess
        messages. Also only set the placeholder view's target once in full screen mode.

        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen,
            or waiting to enter full screen.
        (-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog
            has not already been made active.
        (-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable.
        (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target.
        (-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target.
        (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
        (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
        (-[WKFullScreenWindowController performClose:]): Ditto.
        (-[WKFullScreenWindowController close]): Ditto.
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.

128 129 130 131 132 133 134
2013-03-27  Brady Eidson  <beidson@apple.com>

        Blind attempt at fixing the release build.

        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::NetworkResourceLoader::willCacheResponseAsync):

135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
2013-03-27  Brady Eidson  <beidson@apple.com>

        Mem mapped resource data improvements.
        <rdar://problem/13196481> and https://bugs.webkit.org/show_bug.cgi?id=113422

        Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen).

        Remove timer-based approach support code:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
        (WebKit::NetworkResourceLoader::abortInProgressLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        * NetworkProcess/NetworkResourceLoader.h:

        Add an object to encapsulate monitoring a resource going in to the disk cache.
        It listens for a callback on the cached response indicating it is disk backed
        and also sets a timeout so we don't keep the monitor alive and waiting forever.
        * NetworkProcess/mac/DiskCacheMonitor.h: Added.
        (WebKit::DiskCacheMonitor::destinationID):
        (WebKit::DiskCacheMonitor::connectionToWebProcess):
        (WebKit::DiskCacheMonitor::resourceRequest):
        * NetworkProcess/mac/DiskCacheMonitor.mm: Added.
        (CFCachedURLResponseSetBecameFileBackedCallBackBlock):
        (WebKit::monitorFileBackingStoreCreation):
        (WebKit::DiskCacheMonitor::DiskCachingMonitor):
        (WebKit::DiskCacheMonitor::connection):

        Refactoring and monitor certain cached responses:
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (CFCachedURLResponseGetMemMappedData):
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData
          to explicitly get an mem-mapped data object.
        (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
        (WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum
          size then set up a disk caching monitor.

        * WebKit2.xcodeproj/project.pbxproj:

173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
2013-03-26  Timothy Hatcher  <timothy@apple.com>

        Add support for dock-to-right of the Web Inspector in the Mac port.

        Unfortunately this requires Safari changes, so it is disabled in the nightly builds.

        https://webkit.org/b/113341
        rdar://problem/10368152

        Reviewed by Joseph Pecoraro.

        * Resources/Dock.pdf: Removed.
        * Resources/DockBottom.pdf: Added.
        * Resources/DockRight.pdf: Added.
        * Shared/WebPreferencesStore.h:
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::WebInspectorProxy):
        (WebKit::WebInspectorProxy::attachBottom):
        (WebKit::WebInspectorProxy::attachRight):
        (WebKit::WebInspectorProxy::attach):
        (WebKit::WebInspectorProxy::detach):
        (WebKit::WebInspectorProxy::setAttachedWindowWidth):
        (WebKit::WebInspectorProxy::createInspectorPage):
        (WebKit::WebInspectorProxy::canAttach):
        * UIProcess/WebInspectorProxy.h:
        (WebInspectorProxy):
        * UIProcess/WebInspectorProxy.messages.in:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (-[WKWebInspectorProxyObjCAdapter attachRight:]):
        (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
        (-[WKWebInspectorWindow _cursorForResizeDirection:]):
        (-[WKWebInspectorWindow _customTitleFrame]):
        (WebKit::createDockButton):
        (WebKit::WebInspectorProxy::createInspectorWindow):
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
        (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
        (WebKit::WebInspectorProxy::platformAttach):
        (WebKit::WebInspectorProxy::platformDetach):
        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
        (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
        (WebKit::WebInspectorFrontendClient::attachWindow):
        (WebKit::WebInspectorFrontendClient::setAttachedWindowWidth):
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
        (WebInspectorFrontendClient):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::attachBottom):
        (WebKit::WebInspector::attachRight):
        (WebKit::WebInspector::setAttachedWindowWidth):
        (WebKit::WebInspector::attachedBottom):
        (WebKit::WebInspector::attachedRight):
        (WebKit::WebInspector::detached):
        * WebProcess/WebPage/WebInspector.h:
        (WebInspector):
        * WebProcess/WebPage/WebInspector.messages.in:

232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
2013-03-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>

        [CoordGfx] Support to share GraphicsSurface flags with client.
        https://bugs.webkit.org/show_bug.cgi?id=112982

        Reviewed by Noam Rosenthal.

        Covered by existing WebGL tests.

        This patch adds support to pass GraphicsSurface flags
        during it's client creation.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::::encode):
        (CoreIPC::::decode):

248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
2013-03-26  Hayato Ito  <hayato@chromium.org>

        Allow ShadowContents in HitTests by default.
        https://bugs.webkit.org/show_bug.cgi?id=113171

        Reviewed by Dimitri Glazkov.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::hitTest):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::highlightPotentialActivation):
        (WebKit::WebPage::findZoomableAreaForPoint):
        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::shouldDelayWindowOrderingEvent):
        (WebKit::WebPage::acceptsFirstMouse):

265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
2013-03-26  Tim Horton  <timothy_horton@apple.com>

        [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
        https://bugs.webkit.org/show_bug.cgi?id=107539
        <rdar://problem/13032692>

        Reviewed by Simon Fraser.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Update WebCoreSystemInterface.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary;
        Page defaults to in-window, which is wrong in many cases - we depend on
        Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually
        a state change or not.
        (WebKit::WebPage::setIsInWindow):
        * WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen.
        (WebKit::WebProcess::WebProcess):
        (WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process.
        (WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero,  clean up unused rendering resources.
        * WebProcess/WebProcess.h:

287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
2013-03-26  Dean Jackson  <dino@apple.com>

        When a primary plugin is restarted, also start similar plugins
        https://bugs.webkit.org/show_bug.cgi?id=113265

        Reviewed by Tim Horton.

        Remember the origin of the primary plugin, so that we can
        autostart anything that is similar.

        * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
        (WebKit::WebPlugInClient::WebPlugInClient): Keep a pointer to the WebPage.
        (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Pass the page onto the process.
        * WebProcess/WebCoreSupport/WebPlugInClient.h:
        (WebPlugInClient): New member variable for the WebPage we were created with.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Remember the origin information
            for the primary plugin.
        (WebKit::WebPage::matchesPrimaryPlugIn): Returns true if we're seeing something that
            looks like the primary plugin.
        * WebProcess/WebPage/WebPage.h: New method matchesPrimaryPlugIn.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check if the page thinks this is
            the primary plugin.
        * WebProcess/WebProcess.h: Accept a reference to the page in shouldPlugInAutoStartFromOrigin.

ap@apple.com's avatar
ap@apple.com committed
313 314 315 316 317 318 319 320 321 322
2013-03-26  Alexey Proskuryakov  <ap@apple.com>

        Follow-up to:
        <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
        https://bugs.webkit.org/show_bug.cgi?id=113256

        Reviewed by Mark Rowe.

        * NetworkProcess/NetworkResourceLoader.h: Added some forgotten OVERRIDEs.

323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
2013-03-26  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
        https://bugs.webkit.org/show_bug.cgi?id=113256

        Reviewed by Brady Eidson.

        Use asynchronous version of ResourceHandle/ResourceHandleClient in NetworkProcess.
        We now run WebCore code on main thread, so we can't block it.

        * DerivedSources.make:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
        * NetworkProcess/NetworkResourceLoader.messages.in: Added.
        * WebKit2.xcodeproj/project.pbxproj:
        Made NetworkResourceLoader a message receiver. Messages that used to be sync are
        now async, and responses need to be sent to the loader.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::willSendRequestAsync): This now happens on main
        thread, and thus cannot be sync.
        (WebKit::NetworkResourceLoader::continueWillSendRequest): Notify the resource
        handle once a response is ready.
        (WebKit::NetworkResourceLoader::didSendData): Removed unnecessary WebCore prefixes.
        (WebKit::NetworkResourceLoader::didReceiveCachedMetadata): Ditto.
        (WebKit::NetworkResourceLoader::wasBlocked):  Ditto.
        (WebKit::NetworkResourceLoader::cannotShowURL): Ditto.
        (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): This function
        doesn't call through to WebProcess, so we can keep it synchronous. But we still
        need to implement the async version, since that's what ResourceHandle calls.
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
        Made async.
        (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
        Notify ResourceHandle when response is ready.
        (WebKit::NetworkResourceLoader::didReceiveDataArray): Removed unnecessary WebCore prefixes.
        (WebKit::NetworkResourceLoader::willCacheResponseAsync): This matches default
        implementation, but we are overriding everything to make it clearer what's missing.
        (WebKit::NetworkResourceLoader::willStopBufferingData): Removed unnecessary WebCore prefixes.

        * NetworkProcess/NetworkResourceLoader.h: Updated to use async client methods.
        Keep ResourceRequest around while handling willSendRequest, as we need the original
        to recombine the request. Removed CFNet version of willCacheResponse for now,
        as we are not using it yet.

        * Shared/Authentication/AuthenticationManager.cpp: Assert that methods touching
        a global HashMap all run on main thread. Changed generateAuthenticationChallengeID()
        to use regular increment, as there is no need to run it from a secondary thread.

        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didReceiveSyncMessage): We no longer have any
        sync messages.

        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
        * WebProcess/Network/WebResourceLoader.messages.in:
        Changed to use async messages.

382 383 384 385 386 387 388 389 390 391 392 393
2013-03-26  Tim Horton  <timothy_horton@apple.com>

        [wk2] Don't send intrinsic content size updates more than once per runloop
        https://bugs.webkit.org/show_bug.cgi?id=113258
        <rdar://problem/13492038>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
        Only start the zero-delay timer if it's not already active.

394 395 396 397 398 399 400 401 402 403 404
2013-03-26  Tony Chang  <tony@chromium.org>

        Autogenerate the scrollAnimatorEnabled setting in Settings.in
        https://bugs.webkit.org/show_bug.cgi?id=113253

        Reviewed by James Robinson.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
        (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).

405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
2013-03-26  Andras Becsi  <andras.becsi@digia.com>

        [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
        https://bugs.webkit.org/show_bug.cgi?id=113328

        Reviewed by Jocelyn Turcotte.

        Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249

        We use QProcess::start() with a commandline string to start the web process
        and the string is treated by QProcess as a whitespace delimeted list of the
        command and the arguments, thus we have to escape the path to the process
        binaries so that if the path contains spaces we still run the appropriate
        command.

        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
        (WebKit::ProcessLauncher::launchProcess):

423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
2013-03-26  Andras Becsi  <andras.becsi@digia.com>

        [Qt][WK2] QML WebView asserts when double clicking a link
        https://bugs.webkit.org/show_bug.cgi?id=113329

        Reviewed by Jocelyn Turcotte.

        Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30288

        Remove an erroneous assert which is no longer valid if
        mouse gestures are enabled.

        * UIProcess/qt/QtWebPageEventHandler.cpp:
        (WebKit::QtWebPageEventHandler::handleInputEvent):

438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
2013-03-26  Tim Horton  <timothy_horton@apple.com>

        [wk2] Don't send intrinsic content size updates more than once per runloop
        https://bugs.webkit.org/show_bug.cgi?id=113258
        <rdar://problem/13492038>

        Reviewed by Anders Carlsson.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        Add a zero-delay timer for intrinsic content size updates.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
        Add a zero-delay timer for intrinsic content size updates.
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
        Start our new one-shot zero-delay timer.
        (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
        Inform the WebPage that the intrinsic content size has changed.

457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
2013-03-26  Simon Cooper  <scooper@apple.com>

        bundle-ids need to be sanitized before using them in filesystem paths
        https://bugs.webkit.org/show_bug.cgi?id=113030
        <rdar://problem/13300254>

        Reviewed by Alexey Proskuryakov.

        When choosing / looking for a specialized Sandbox for a Plugin the
        bundle-id needs to be sanitized before using it to construct a
        filesystem name to look up. The “/“ character should not be allowed
        and transformed into something else, in this case a “:”

        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::loadSandboxProfile):

473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
2013-03-26  Zeno Albisser  <zeno@webkit.org>

        [Qt] UIProcess should initialize WebCoreSystemInterface.
        https://bugs.webkit.org/show_bug.cgi?id=113300

        The WebCoreSystemInterface is necessary to detect supported
        mime types on Mac OS. In particular it is needed for download
        support.
        This patch fixes in particular the previously failing
        Qt API qmltest WebViewDownload::test_downloadRequest.
        The test was crashing when using QTKit, because functions
        in WebCoreSystemInterface could not be resolved on the UIProcess side.

        Reviewed by Jocelyn Turcotte.

        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformInitializeWebProcess):

491 492 493 494 495 496 497 498 499 500 501 502 503
2013-03-25  Kent Tamura  <tkent@chromium.org>

        Rename ENABLE_INPUT_TYPE_DATETIME
        https://bugs.webkit.org/show_bug.cgi?id=113254

        Reviewed by Kentaro Hara.

        Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
        Actually I'd like to remove the code, but we shouldn't remove it yet
        because we shipped products with it on some platforms.

        * Configurations/FeatureDefines.xcconfig:

504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
2013-03-25  Dean Jackson  <dino@apple.com>

        Cleanup plugin snapshotting autostart decision making
        https://bugs.webkit.org/show_bug.cgi?id=113231

        Reviewed by Tim Horton.

        Two major changes to the way snapshotting plugins may autostart.

        The first is that previously WebCore was keeping a hash that
        represented the combination of page origin, plugin origin and
        mime type. WebKit was responsible for deciding if that particular
        hash should autostart. Now, WebKit keeps the hash, and WebCore
        just asks us whether the combination of origins and mimetype
        should start immediately. You can see this change the in WebPluginClient
        and WebProcess APIs.

        The second change is that we now keep two types of structures
        around to decide whether a plugin should autostart. One is the
        existing page + plugin origin combination. The other is simply
        the plugin origin, which allows plugins from major providers
        to autostart no matter what page they were embedded on.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Encode the new parameter.
        (WebKit::WebProcessCreationParameters::decode): Decode the new parameter.
        * Shared/WebProcessCreationParameters.h: Also keep a list of strings around.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetPlugInAutoStartOrigins): The C API to send the list of plugin
            origins over to the context.
        * UIProcess/API/C/WKContext.h:

        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
        (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash): Renamed from addAutoStartOrigin.
            No functional change other than new names for members.
        (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy): Ditto.
        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Ditto.
        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Ditto.
        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray): New method that converts the
            incoming ImmutableArray into a Vector of Strings.
        (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Rename for new members.
        * UIProcess/Plugins/PlugInAutoStartProvider.h: Renaming member variables. Adding
            some typedefs to clean up code.
        (WebKit::PlugInAutoStartProvider::autoStartOrigins): New accessor.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::createNewWebProcess): Renaming, and copy the new parameter into the process creation.
        (WebKit::WebContext::addPlugInAutoStartOriginHash): Renaming.
        (WebKit::WebContext::setPlugInAutoStartOriginHashes): Renaming.
        (WebKit::WebContext::setPlugInAutoStartOrigins): New method.
        * UIProcess/WebContext.h: Adds the new setPlugInAutoStartOrigin method.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::didInitializePlugin): Drive-by fix that was attempting to restart plugins
            that were in the process of restarting.
        (WebKit::PluginView::pluginDidReceiveUserInteraction): Temporarily suspend update of
            expiration time if the user interacts with a plugin.

        * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
        (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Renaming.
        (WebKit::WebPlugInClient::didStartFromOrigin): Ditto.
        * WebProcess/WebCoreSupport/WebPlugInClient.h: Renaming.

        * WebProcess/WebProcess.cpp: Drive-by - noticed that we forgot to count seconds in
            a timeout threshold.
        (WebKit::WebProcess::initializeWebProcess): Also add the list of origins when we initialize.
        (WebKit::addCaseFoldedCharacters): Copied from WebCore - adds a String to a hash input.
        (WebKit::hashForPlugInOrigin): Copied from WebCore - hashing function.
        (WebKit::WebProcess::isPlugInAutoStartOriginHash): Renaming.
        (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check the list of pure origins first. If
            that fails, fall back to the hash list of pairs.
        (WebKit::WebProcess::plugInDidStartFromOrigin): Renaming.
        (WebKit::WebProcess::didAddPlugInAutoStartOriginHash): Ditto.
        (WebKit::WebProcess::resetPlugInAutoStartOriginHashes): Ditto.
        (WebKit::WebProcess::plugInDidReceiveUserInteraction): Ditto.
        * WebProcess/WebProcess.h: Renaming some methods, but also adding the input of the new
            origin-only list.

        * WebProcess/WebProcess.messages.in: Renaming a message.

585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
2013-03-25  Maxim Ermilov  <maxim.ermilov@canonical.com>

        [Qt] Qml WebKit needs preferences to change security knobs
        https://bugs.webkit.org/show_bug.cgi?id=111979

        Reviewed by Jocelyn Turcotte.

        * UIProcess/API/qt/qwebpreferences.cpp:
        (QWebPreferencesPrivate::testAttribute):
        (QWebPreferencesPrivate::setAttribute):
        (QWebPreferences::universalAccessFromFileURLsAllowed):
        (QWebPreferences::setUniversalAccessFromFileURLsAllowed):
        (QWebPreferences::fileAccessFromFileURLsAllowed):
        (QWebPreferences::setFileAccessFromFileURLsAllowed):
        * UIProcess/API/qt/qwebpreferences_p.h:
        * UIProcess/API/qt/qwebpreferences_p_p.h:

602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
2013-03-23  Geoffrey Garen  <ggaren@apple.com>

        Added a setting for whether JavaScript markup is enabled
        https://bugs.webkit.org/show_bug.cgi?id=112999

        Rolled out a line from r146664 that was left over from before I adopted
        the Settings.in way of adding a new setting.

        Reviewed by Ryosuke Niwa.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): No need
        to initialize / override -- Settings.in settings do this automatically.

        Also, dydx noticed that this line of code had a typo, and was totaly wrong.

618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
2013-03-21  Kiran Muppala  <cmuppala@apple.com>

        Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
        https://bugs.webkit.org/show_bug.cgi?id=112308

        Reviewed by Gavin Barraclough.

        Add private preference for enabling/disabling hidden page DOM timer
        throttling and CSS animation suspension.  The preference should be
        enabled by default only on Mac, where WebKit2 is a private API and
        hence compatibility is less of a issue.

        * Shared/WebPreferencesStore.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled):
        (WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled):
        (WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled):
        (WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled):
        * UIProcess/API/C/WKPreferencesPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Allow
        WebKitTestRunner to override hiddenPageDOMTimerThrottlingEnabled.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

643 644 645 646 647 648 649 650 651 652 653 654 655 656 657
2013-03-22  Tim Horton  <timothy_horton@apple.com>

        Plugin Snapshotting: Auto-start dominant plugins
        https://bugs.webkit.org/show_bug.cgi?id=113111
        <rdar://problem/13475726>

        Reviewed by Dean Jackson.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::didInitializePlugin):
        (WebKit::PluginView::paint):
        (WebKit::PluginView::invalidateRect):
        (WebKit::PluginView::isAcceleratedCompositingEnabled):
        Acknowledge the new "Restarting" DisplayState.

658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
2013-03-21  Jer Noble  <jer.noble@apple.com>

        After switching to another space and back, video races to catch up with audio
        https://bugs.webkit.org/show_bug.cgi?id=113006

        Reviewed by Anders Carlsson.

        Add an observer for the NSWorkspaceActiveSpaceDidChangeNotification notification, and trigger
        a visibility update when that notification is observed.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView dealloc]): Unregister the observer.
        (-[WKView _activeSpaceDidChange:]): Notify the view that its visibility may have changed.
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add the observer.

673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696
2013-03-21  Geoffrey Garen  <ggaren@apple.com>

        Added a setting for whether JavaScript markup is enabled
        https://bugs.webkit.org/show_bug.cgi?id=112999

        Reviewed by Maciej Stachowiak.

        This setting is useful for clients that want protection from script
        injection attacks.

        * Shared/WebPreferencesStore.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesGetJavaScriptMarkupEnabled):
        (WKPreferencesSetJavaScriptMarkupEnabled):
        (WKPreferencesGetJavaScriptEnabled):
        * UIProcess/API/C/WKPreferences.h:
        * UIProcess/API/mac/WKBrowsingContextGroup.mm:
        (-[WKBrowsingContextGroup allowsJavaScriptMarkup]):
        (-[WKBrowsingContextGroup setAllowsJavaScriptMarkup:]):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Plumbed through to API.

697 698 699 700 701 702 703 704 705 706 707
2013-03-22  Mario Sanchez Prada  <mario.prada@samsung.com>

        [GTK] Include the right GL header for GLES2
        https://bugs.webkit.org/show_bug.cgi?id=113034

        Reviewed by Martin Robinson.

        Include GLES2/gl2.h when using GLES2.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

708 709 710 711 712 713 714 715 716 717 718 719 720
2013-03-22  Timothy Hatcher  <timothy@apple.com>

        Fix an assert when opening the Web Inspector window for the first time.

        rdar://problem/13471765
        https://webkit.org/b/113053

        Reviewed by Eric Carlson.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::createInspectorWindow): Assign m_inspectorWindow
        earlier so it is ready for when center is called and windowDidMove: gets called.

721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747
2013-03-21  Tim Horton  <timothy_horton@apple.com>

        [wk2] Page Overlays: Don't create backing store until the client asks us to paint
        https://bugs.webkit.org/show_bug.cgi?id=112989
        <rdar://problem/13355759>

        Reviewed by Anders Carlsson.

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::highlight):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::updateFindUIAfterPageScroll):
        Invalidate the entire overlay on installation, to maintain existing behavior
        on platforms where the fade-in animation is not performed by invalidating the overlay.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::installPageOverlay):
        Don't invalidate the overlay upon installation.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
        Create backing store for the page overlay layer the first time it is painted into.
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        Don't update the size of the page overlay layer unless we intend for it to have backing store.
        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
        Don't create backing store when we create the page overlay layer.

748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794
2013-03-21  Brady Eidson  <beidson@apple.com>

        If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
        <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943

        Reviewed by Geoff Garen.

        Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load
        completes and - if the resource is disk backed - send it to the WebProcess for sharing:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
        (WebKit::NetworkResourceLoader::diskCacheTimerFired):
        (WebKit::NetworkResourceLoader::didReceiveResponse):
        (WebKit::NetworkResourceLoader::didReceiveData):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        * NetworkProcess/NetworkResourceLoader.h:

        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):

        Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer
        doesn't already exist:
        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::createFromVMBuffer):
        (WebKit::SharedMemory::~SharedMemory):

        Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer:
        * Shared/ShareableResource.cpp:
        (WebKit::shareableResourceDeallocate):
        (WebKit::createShareableResourceDeallocator):
        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
        * Shared/ShareableResource.h:

        * Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest.

        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didReceiveMessage):
        (WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache
          and try to replace its encoded data with the shared mmap'ed buffer.
        * WebProcess/Network/NetworkProcessConnection.h:
        * WebProcess/Network/NetworkProcessConnection.messages.in:

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResource):

795 796 797 798 799 800 801 802
2013-03-21  Tim Horton  <timothy_horton@apple.com>

        Unreviewed build fix, forgot to stage one file.

        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame):
        (DrawingArea):

803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830
2013-03-21  Tim Horton  <timothy_horton@apple.com>

        [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
        https://bugs.webkit.org/show_bug.cgi?id=111662
        <rdar://problem/13355808>

        Reviewed by Dean Jackson.

        Instead of setNeedsDisplay()ing the whole page overlay layer every time through
        TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
        necessary to keep things painted in the right place when we scroll (the overlay
        is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.

        This works with threaded scrolling because overlay installation forces us
        into main-thread scrolling mode.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
        Plumb scroll offset changes through to the drawing area, so it can invalidate the page overlay.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        Add didChangeScrollOffsetForAnyFrame, for WebFrameLoaderClient to call us back when any frame scrolls.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame):
        Invalidate the page overlay when any frame scrolls, so that find indicators in subframes are kept in the right place.
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        Stop unconditionally invalidating the page overlay when we flush layers.

831 832 833 834 835 836 837 838 839 840 841 842
2013-03-21  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Move NSOperationQueue out of NetworkingContext
        https://bugs.webkit.org/show_bug.cgi?id=112970

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/mac/RemoteNetworkingContext.h:
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        Tell ResourceHandle to use an operation queue in the new way.

843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918
2013-03-21  Timothy Hatcher  <timothy@apple.com>

        Support connecting the Web Inspector without showing it.

        This allows you to get the debugger attached in the background. When a breakpoint is hit
        the Inspector will open. This change also reduces some WebProcess messaging by removing
        the DidLoadInspectorPage message and stops sending the SetAttachedWindow message on close.

        https://bugs.webkit.org/show_bug.cgi?id=112445

        Reviewed by Sam Weinig.

        * UIProcess/API/C/WKInspector.cpp:
        (WKInspectorIsConnected): Added.
        (WKInspectorConnect): Added.
        (WKInspectorHide): Added.

        * UIProcess/API/C/WKInspector.h:
        Added new APIs.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::WebInspectorProxy):
        Initialize new state booleans.

        (WebKit::WebInspectorProxy::invalidate):
        Don't set state booleans that didClose already resets.

        (WebKit::WebInspectorProxy::connect): Added.
        (WebKit::WebInspectorProxy::show):
        Open if we are already connected. Call connect().

        (WebKit::WebInspectorProxy::hide): Added.

        (WebKit::WebInspectorProxy::close):
        Call didClose we can detach or close the window immediately instead of waiting for a
        message from the WebProcess.

        (WebKit::WebInspectorProxy::attach):
        (WebKit::WebInspectorProxy::detach):
        Check for !m_page to match other functions.

        (WebKit::WebInspectorProxy::createInspectorPage):
        (WebKit::WebInspectorProxy::didLoadInspectorPage):
        Removed. Moved logic to open().

        (WebKit::WebInspectorProxy::open): Added.

        (WebKit::WebInspectorProxy::didClose):
        Clear new state booleans. Don't perform work again if already closed. Use platformDetach()
        instead of detach() to avoid sending the SetAttachedWindow message.

        (WebKit::WebInspectorProxy::bringToFront):
        Call open() if we are not visible yet, otherwise platformBringToFront.

        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::isConnected): Added.

        * UIProcess/WebInspectorProxy.messages.in: Removed DidLoadInspectorPage.

        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformHide): Added stub.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformHide): Added.

        * UIProcess/qt/WebInspectorProxyQt.cpp:
        (WebKit::WebInspectorProxy::platformHide): Added stub.

        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
        Removed frontendLoaded().

        * WebProcess/WebPage/WebInspector.cpp:
        * WebProcess/WebPage/WebInspector.h:
        Removed didLoadInspectorPage().

ap@apple.com's avatar
ap@apple.com committed
919 920 921 922 923 924 925
2013-03-21  Alexey Proskuryakov  <ap@apple.com>

        Build fix.

        * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Include CurrentTime.h, as needed
        to call currentTime().

926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943
2013-03-21  Tim Horton  <timothy_horton@apple.com>

        Tiled page overlay layers don't create tiles until the first flush after they switch to being tiled
        https://bugs.webkit.org/show_bug.cgi?id=112860
        <rdar://problem/13468400>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea): Add storage for m_clipsToExposedRect.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        The page overlay layer will never have children, so we can use flushCompositingState instead of the ForThisLayerOnly variant.
        Pass the visible rect of the page overlay layer (computed by intersecting its bounds with the exposed
        rect that comes from the WKView) to flushCompositingState; don't bother setting the visible rect manually.
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
        Store m_clipsToExposedRect so we can use it in flushLayers.

944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
2013-03-20  Benjamin Poulain  <bpoulain@apple.com>

        [WK2] Remove VIEW_MODE_CSS_MEDIA from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=112849

        Reviewed by Sam Weinig.

        The code was added in r137148 for the sole purpose of testing,
        and it is not even being properly tested.

        Remove the code until someone actually implement the feature in WebKit2.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageCanShowMIMEType):
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/WebPage.h:
        (WebPage):

963 964 965 966 967 968 969 970 971
2013-03-20  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Build ANGLE sources into a separate library from libWebCore.la
        https://bugs.webkit.org/show_bug.cgi?id=112778

        Reviewed by Martin Robinson.

        * GNUmakefile.am: Add libLevelDB.la to the libwebkit2gtk library if using the OpenGL accelerated backend.

972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996
2013-03-20  Andras Becsi  <andras.becsi@digia.com>

        [Qt][WK2] Clean up sanity checks related to gesture recognition
        https://bugs.webkit.org/show_bug.cgi?id=112679

        Reviewed by Jocelyn Turcotte.

        The only callers of the panGestureActive and pinchGestureActive member
        functions of the page viewport controller client are event delivery
        related sanity check assers, thus they can be replaced by checking
        for the corresponding internal states and therefore the superfluous
        members can be removed.
        Also update other asserts in the page viewport controller client to
        be more accurate about the expected states.

        * UIProcess/qt/PageViewportControllerClientQt.cpp:
        (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
        (WebKit::PageViewportControllerClientQt::touchBegin):
        (WebKit::PageViewportControllerClientQt::panGestureStarted):
        (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
        * UIProcess/qt/PageViewportControllerClientQt.h:
        (PageViewportControllerClientQt):
        * UIProcess/qt/QtWebPageEventHandler.cpp:
        (WebKit::QtWebPageEventHandler::handleInputEvent):

997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
2013-03-20  Andras Becsi  <andras.becsi@digia.com>

        [Qt][WK2] Refactor handling of content suspension to properly cover corner cases
        https://bugs.webkit.org/show_bug.cgi?id=111751

        Reviewed by Jocelyn Turcotte.

        The current suspend / resume infrastructure turned out to be insufficient to cover
        all corner cases during transitions between gestures of complex gesture chains.

        The requirements for robust suspend / resume handling are:
            - Keep the content suspended while the user is continuously interacting,
        eg. does not lift the finger between transition from a pan to a pinch gesture
        and vice versa.
            - The content should not be suspended unnecessarily (like for a tap gesture),
        only during panning and scroll animation (flick), as well as pinch zoom and scale
        animation (also includes double-tap-to-zoom).
            - The content should never end up stuck in suspended state after long gesture
        chains and continuous interaction.

        This patch reintroduces reference counting based suspension in form of a new
        ViewportInteractionTracker member class to make it possible to reliably control the
        suspend / resume cycles during scrolling and scaling.
        During continuous gestures, while the user is interacting, the reference count is
        increased without actually suspending the content to prevent resuming unnecessarily
        during continuous interaction. At the same time this also assures that the page is
        not suspended for simple tap gestures, which was a side-effect of the previous
        approach based on update deferrers.
        The newly added functionality replaces boolean members that tried to achive the
        above requirements.
        Additionally this patch also removes the redundant m_hasSuspendedContent member
        from the PageViewportController since WebPageProxy already keeps this information.

        * UIProcess/PageViewportController.cpp:
        (WebKit::PageViewportController::PageViewportController):
        (WebKit::PageViewportController::pageDidRequestScroll):
        (WebKit::PageViewportController::updateMinimumScaleToFit):
        * UIProcess/PageViewportController.h:
        (PageViewportController):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::areActiveDOMObjectsAndAnimationsSuspended):
        * UIProcess/qt/PageViewportControllerClientQt.cpp:
        (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):
        (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::begin):
        (WebKit):
        (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::end):
        (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
        (WebKit::PageViewportControllerClientQt::flickMoveStarted):
        (WebKit::PageViewportControllerClientQt::flickMoveEnded):
        (WebKit::PageViewportControllerClientQt::pageItemPositionChanged):
        (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged):
        (WebKit::PageViewportControllerClientQt::touchBegin):
        (WebKit::PageViewportControllerClientQt::touchEnd):
        (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
        (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
        (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
        (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
        (WebKit::PageViewportControllerClientQt::pinchGestureCancelled):
        (WebKit::PageViewportControllerClientQt::didChangeContentsSize):
        * UIProcess/qt/PageViewportControllerClientQt.h:
        (ViewportInteractionTracker):
        (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::ViewportInteractionTracker):
        (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::inProgress):
        (PageViewportControllerClientQt):

1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121
2013-03-19  Kenneth Rohde Christiansen  <kenneth@webkit.org> and Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [EFL][WK2] Separate WebView further from EwkView
        https://bugs.webkit.org/show_bug.cgi?id=111591

        Reviewed by Caio Marcelo de Oliveira Filho.

        Main points are:
        - WKView API has no dependency on EFL types
        - WebView class does not store the Evas_Object

        * UIProcess/API/C/efl/WKView.cpp:
        (WKViewCreate):

            WKView creation does not require any EFL objects to be passed.

        * UIProcess/API/C/efl/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        (EwkView::create):

            WKViewRef is passed to EwkView constructor from outside rather than
            created inside.

        (EwkView::webView):
        * UIProcess/API/efl/EwkView.h:
        (EwkView):
        (EwkView::wkView):
        (EwkView::page):

            EwkView keeps WKViewRef rather than pointer to WebView class.

        * UIProcess/API/efl/ewk_view_private.h: Added.
        (EWKViewCreate):
        (EWKViewGetWKView):

            Added private API to create ewk view evas object and return its WKViewRef.

        * UIProcess/API/efl/ewk_view.cpp:
        (ewkCreateEvasObject):
        (ewk_view_smart_add):
        (ewk_view_add):
        (ewk_view_add_with_context):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

            Updated accordingly to the new APIs.

        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::WebView):
        (WebKit::WebView::create):
        (WebKit):
        (WebKit::WebView::setEwkView):
        (WebKit::WebView::isViewFocused):
        (WebKit::WebView::isViewVisible):
        * UIProcess/efl/WebView.h:
        (WebView):

            Implementation of updated WKView API.

1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
2013-03-19  Dean Jackson  <dino@apple.com>

        Allow PlugIn Snapshotting to be tested
        https://bugs.webkit.org/show_bug.cgi?id=98696

        Reviewed by Tim Horton.

        Use the new maximumPlugInSnapshotAttempts setting rather than a hardcoded
        value. At the same time, if this value is 0, then snapshot immediately
        (don't wait to get a snapshot and test it).

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::didInitializePlugin): Snapshot immediately if maximum attempts are 0.
        (WebKit::PluginView::pluginSnapshotTimerFired): Use setting rather than file local variable.

1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153
2013-03-19  Dean Jackson  <dino@apple.com>

        Restarting a snapshotted plugin should restart all plugins from the same domain on the page
        https://bugs.webkit.org/show_bug.cgi?id=112725

        Reviewed by Tim Horton.

        When we add a plugin domain hash to the list of sites that autostart, we
        send a message to our owning process. That message might not return before
        another plugin queries if it is in the list. So, before we send the message,
        add the current hash to the list with a very small timeout. That way the
        response will be to either extend the timeout, or not add the hash (in which
        case it will expire soon).

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::addPlugInAutoStartOrigin):

1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
2013-03-19  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Fix WebKit2 builds after r146193
        https://bugs.webkit.org/show_bug.cgi?id=112700

        Reviewed by Martin Robinson.

        Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193
        to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as
        the source of GraphicsLayer objects that should be operated on, making it possible to
        support multiple page overlays.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::initialize):
        (WebKit::LayerTreeHostGtk::invalidate):
        (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::LayerTreeHostGtk::sizeDidChange):
        (WebKit::LayerTreeHostGtk::didInstallPageOverlay):
        (WebKit::LayerTreeHostGtk::didUninstallPageOverlay):
        (WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay):
        (WebKit::LayerTreeHostGtk::paintContents):
        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
        (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
        (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
        (LayerTreeHostGtk):

1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314
2013-03-19  Tim Horton  <timothy_horton@apple.com>

        [wk2] Should support multiple page overlays, like the API suggests
        https://bugs.webkit.org/show_bug.cgi?id=112505
        <rdar://problem/13424796>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/LayerTreeHost.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::didInstallPageOverlay):
        (WebKit::DrawingArea::didUninstallPageOverlay):
        (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
        (WebKit::DrawingArea::setPageOverlayOpacity):
        Add PageOverlay argument.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::didInstallPageOverlay):
        (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
        (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
        (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
        Add PageOverlay argument, forward it to LayerTreeHost.
        (WebKit::DrawingAreaImpl::display):
        Paint all of the PageOverlays that WebPage knows about.

        * WebProcess/WebPage/PageOverlay.cpp:
        (WebKit::PageOverlay::setNeedsDisplay):
        (WebKit::PageOverlay::fadeAnimationTimerFired):
        Pass the relevant PageOverlay into the DrawingArea methods that now take it.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::drawPageOverlay):
        Take the PageOverlay to draw as an argument.
        (WebKit::WebPage::installPageOverlay):
        (WebKit::WebPage::uninstallPageOverlay):
        Allow (un)installation of multiple PageOverlays.
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::mouseEventSyncForTesting):
        Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
        (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
        (WebKit::WebPage::pageOverlays): Return the whole vector of overlays.

        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
        Add PageOverlay argument to a few methods.
        Add storage for a map of PageOverlay->GraphicsLayers.

        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::LayerTreeHostMac::sizeDidChange):
        (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
        Operate on all installed PageOverlays, not just the most recently installed one.

        (WebKit::LayerTreeHostMac::didInstallPageOverlay):
        (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
        Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer.

        (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
        Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

        (WebKit::LayerTreeHostMac::paintContents):
        Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
        While not ideal (crawling the map), the vast majority of the time there will only be one entry.

        (WebKit::LayerTreeHostMac::initialize):
        Create layers for all of WebPage's active PageOverlays.
        
        (WebKit::LayerTreeHostMac::createPageOverlayLayer):
        Stick the newly-created GraphicsLayer into the m_pageOverlays map.
        Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays.

        (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
        Remove the relevant overlay from the m_pageOverlays map and tear it down.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        Add PageOverlay argument to a few methods.
        Add storage for a map of PageOverlay->GraphicsLayers.
        Add storage for a map of GraphicsLayer->CALayers.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
        Pass PageOverlay argument on to createPageOverlayLayer.
        
        (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
        Pass PageOverlay argument on to destroyPageOverlayLayer.
        Refrain from re-enabling threaded scrolling if there are still more overlays installed.
        
        (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
        Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

        (WebKit::TiledCoreAnimationDrawingArea::paintContents):
        Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
        While not ideal (crawling the map), the vast majority of the time there will only be one entry.

        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
        Operate on all installed PageOverlays, not just the most recently installed one.

        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
        Stick the newly-created GraphicsLayer into the m_pageOverlays map.
        Also, add its platformLayer to our m_pageOverlayPlatformLayers map.

        (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
        Remove the relevant overlay from the m_pageOverlays and m_pageOverlayPlatformLayers maps and tear it down.

        (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
        When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer
        has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map),
        the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the
        layer we have inserted into the root layer. We need to keep the layer ordering consistent with
        installation order, as well.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
        Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost,
        as this patch does not implement multiple overlay support for Coordinated Graphics.
        Keep track of the current PageOverlay so that paintContents can hand WebPage the right one.
        (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay.
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument.
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument.
        (WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        (CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay.

1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393
2013-03-19  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r146183.
        http://trac.webkit.org/changeset/146183
        https://bugs.webkit.org/show_bug.cgi?id=112673

        Caused a few dozens of editing tests to fail on Mac WK2
        (Requested by rniwa on #webkit).

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
        (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay):
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity):
        (WebKit::CoordinatedLayerTreeHost::paintContents):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        (CoordinatedLayerTreeHost):
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit):
        (WebKit::DrawingArea::didInstallPageOverlay):
        (WebKit::DrawingArea::didUninstallPageOverlay):
        (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
        (WebKit::DrawingArea::setPageOverlayOpacity):
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::didInstallPageOverlay):
        (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
        (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
        (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
        (WebKit::DrawingAreaImpl::display):
        * WebProcess/WebPage/DrawingAreaImpl.h:
        (DrawingAreaImpl):
        * WebProcess/WebPage/LayerTreeHost.h:
        (LayerTreeHost):
        (WebKit::LayerTreeHost::setPageOverlayOpacity):
        * WebProcess/WebPage/PageOverlay.cpp:
        (WebKit::PageOverlay::setNeedsDisplay):
        (WebKit::PageOverlay::fadeAnimationTimerFired):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::drawPageOverlay):
        (WebKit::WebPage::installPageOverlay):
        (WebKit::WebPage::uninstallPageOverlay):
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::mouseEventSyncForTesting):
        * WebProcess/WebPage/WebPage.h:
        (WebKit):
        (WebPage):
        (WebKit::WebPage::hasPageOverlay):
        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
        (WebKit):
        (LayerTreeHostMac):
        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::LayerTreeHostMac::sizeDidChange):
        (WebKit::LayerTreeHostMac::didInstallPageOverlay):
        (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
        (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
        (WebKit::LayerTreeHostMac::paintContents):
        (WebKit::LayerTreeHostMac::initialize):
        (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
        (WebKit::LayerTreeHostMac::createPageOverlayLayer):
        (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
        (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
        (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
        (WebKit::TiledCoreAnimationDrawingArea::paintContents):
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
        (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
        (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):

1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526
2013-03-18  Tim Horton  <timothy_horton@apple.com>

        [wk2] Should support multiple page overlays, like the API suggests
        https://bugs.webkit.org/show_bug.cgi?id=112505
        <rdar://problem/13424796>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/LayerTreeHost.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::didInstallPageOverlay):
        (WebKit::DrawingArea::didUninstallPageOverlay):
        (WebKit::DrawingArea::setPageOverlayNeedsDisplay):
        (WebKit::DrawingArea::setPageOverlayOpacity):
        Add PageOverlay argument.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::didInstallPageOverlay):
        (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
        (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
        (WebKit::DrawingAreaImpl::setPageOverlayOpacity):
        Add PageOverlay argument, forward it to LayerTreeHost.
        (WebKit::DrawingAreaImpl::display):
        Paint all of the PageOverlays that WebPage knows about.

        * WebProcess/WebPage/PageOverlay.cpp:
        (WebKit::PageOverlay::setNeedsDisplay):
        (WebKit::PageOverlay::fadeAnimationTimerFired):
        Pass the relevant PageOverlay into the DrawingArea methods that now take it.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::drawPageOverlay):
        Take the PageOverlay to draw as an argument.
        (WebKit::WebPage::installPageOverlay):
        (WebKit::WebPage::uninstallPageOverlay):
        Allow (un)installation of multiple PageOverlays.
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::mouseEventSyncForTesting):
        Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
        (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
        (WebKit::WebPage::pageOverlays): Return the whole vector of overlays.

        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
        Add PageOverlay argument to a few methods.
        Add storage for a map of PageOverlay->GraphicsLayers.

        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::LayerTreeHostMac::sizeDidChange):
        (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
        Operate on all installed PageOverlays, not just the most recently installed one.

        (WebKit::LayerTreeHostMac::didInstallPageOverlay):
        (WebKit::LayerTreeHostMac::didUninstallPageOverlay):
        Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer.

        (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
        Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

        (WebKit::LayerTreeHostMac::paintContents):
        Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
        While not ideal (crawling the map), the vast majority of the time there will only be one entry.

        (WebKit::LayerTreeHostMac::initialize):
        Create layers for all of WebPage's active PageOverlays.
        
        (WebKit::LayerTreeHostMac::createPageOverlayLayer):
        Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map.
        Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays.

        (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
        Remove the relevant overlay from the m_pageOverlayLayers map and tear it down.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        Add PageOverlay argument to a few methods.
        Add storage for a map of PageOverlay->GraphicsLayers.
        Add storage for a map of GraphicsLayer->CALayers.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
        Pass PageOverlay argument on to createPageOverlayLayer.
        
        (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
        Pass PageOverlay argument on to destroyPageOverlayLayer.
        Refrain from re-enabling threaded scrolling if there are still more overlays installed.
        
        (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
        Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

        (WebKit::TiledCoreAnimationDrawingArea::paintContents):
        Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
        While not ideal (crawling the map), the vast majority of the time there will only be one entry.

        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
        Operate on all installed PageOverlays, not just the most recently installed one.

        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
        Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map.
        Also, add its platformLayer to our m_pageOverlayPlatformLayers map.

        (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
        Remove the relevant overlay from the m_pageOverlayLayers and m_pageOverlayPlatformLayers maps and tear it down.

        (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
        When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer
        has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map),
        the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the
        layer we have inserted into the root layer. We need to keep the layer ordering consistent with
        installation order, as well.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
        Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost,
        as this patch does not implement multiple overlay support for Coordinated Graphics.
        Keep track of the current PageOverlay so that paintContents can hand WebPage the right one.
        (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay.
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument.
        (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument.
        (WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        (CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay.

1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557
2013-03-18  Sam Weinig  <sam@webkit.org>

        Need a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode renderedImage])
        <rdar://problem/13148631>
        https://bugs.webkit.org/show_bug.cgi?id=110034

        Reviewed by Tim Horton.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleCopySnapshotWithOptions):
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        Add WKBundleNodeHandleCopySnapshotWithOptions function.

        * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
        * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h:
        Fix conversion method between WKDOMNode and WKBundleNodeHandleRef to have the same
        name in the header and implementation.

        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::imageForRect):
        (WebKit):
        (WebKit::InjectedBundleNodeHandle::renderedImage):
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
        Add implementation of WKBundleNodeHandleCopySnapshotWithOptions.

        * Shared/ImageOptions.h:
        (WebKit::snapshotOptionsToImageOptions):
        * WebProcess/WebPage/WebPage.cpp:
        Move snapshotOptionsToImageOptions conversion function to a location where
        it can be shared.

1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577
2013-03-18  Andreas Kling  <akling@apple.com>

        [WK2][Mac] Don't consider empty window frames cacheable.
        <http://webkit.org/b/112631>
        <rdar://problem/13384894>

        Reviewed by Anders Carlsson.

        If the UI client overrides getWindowFrame() and returns an empty rect, send that over
        to the web process and mark it as uncached. This forces the next ChromeClient::windowRect()
        call to synchronously retrieve the window frame from the other side.

        Fixes an issue with the Mac Web Inspector which uses empty rects to signify that there is
        no known window frame yet. In this case, we should not be falling back to the native frame.

        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::windowAndViewFramesChanged):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::windowAndViewFramesChanged):

1578 1579 1580 1581 1582 1583 1584
2013-03-18  Brady Eidson  <beidson@apple.com>

        Mac build fix after http://trac.webkit.org/changeset/146088

        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::NetworkResourceLoader::platformDidReceiveResponse):

1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624
2013-03-18  Brady Eidson  <beidson@apple.com>

        NetworkProcess should send vm_copied, mmap'ed memory to WebProcesses when a 
        resource is already in the disk cache.
        <rdar://problem/13414153> and https://bugs.webkit.org/show_bug.cgi?id=112387

        Reviewed by Geoff Garen.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
        (WebKit::NetworkResourceLoader::didReceiveResponse): After notifying about the response,
          call platformDidReceiveResponse.
        * NetworkProcess/NetworkResourceLoader.h:

        * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Added.
        (WebKit::NetworkResourceLoader::platformDidReceiveResponse): Attempt to pull a filesystem
          mmap'ed buffer from the CFNetwork cache and - if it exists - abort the traditional load
          and send that to the WebProcess instead.
        (WebKit::NetworkResourceLoader:: fileBackedResourceMinimumSize): For now, use the VM page size.

        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess): Set the threshold for what
          should be backed by a file on disk instead of stored in the database.

        Change SharedMemory to do a vm_copy if a previously existing buffer is being passed in:
        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::createWithVMCopy):

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::shareableResourceDeallocate):
        (WebKit::createShareableResourceDeallocator):
        (WebKit::WebResourceLoader::didReceiveResource): Create a special CFDataRef whose buffer is
          backed by a ShareableResource to send to the ResourceLoader in one chunk.

        * Shared/ShareableResource.h: Fix some comments.

        * WebKit2.xcodeproj/project.pbxproj:

1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674
2013-03-18  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] Fix code wrapping WKPageGroupRef
        https://bugs.webkit.org/show_bug.cgi?id=112364

        Reviewed by Alexey Proskuryakov.

        The patch fixes following problems in EWK2 WKPageGroupRef wrapping
        code: firstly it makes sure that there is only one EwkPageGroup
        instance per WKPageGroup instance, secondly it allows web page to
        to use the default page group (which is implicitly created inside
        web context).

        * UIProcess/API/C/efl/WKView.cpp:
        (createWKView):

            Now may pass '0' page group as a WebView creation argument so
            that the default page group is used.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        (EwkView::createEvasObject):
        * UIProcess/API/efl/EwkView.h:
        (EwkView):

            Web view should be created before page group, so they are rearranged
            inside class declaration.

        * UIProcess/API/efl/ewk_page_group.cpp:
        (pageGroupMap):

            A map to track corresponding EwkPageGroup and WKPageGroup
            instances.

        (EwkPageGroup::findOrCreateWrapper):

            Returns the same EwkPageGroup instance for the same WKPageGroup
            instance.

        (EwkPageGroup::create):
        (EwkPageGroup::EwkPageGroup):

            Now there is only one constructor accepting WKPageGroupRef.

        (EwkPageGroup::~EwkPageGroup):
        * UIProcess/API/efl/ewk_page_group_private.h:
        (EwkPageGroup):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688
2013-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Invalid charset encoding using when substituting a misspelled word in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=112517

        Reviewed by Alexey Proskuryakov.

        The problem is that we are creating the WebContextMenuItemData
        with the GtkAction label as UTF-8.

        * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
        (WebKit::contextMenuItemActivatedCallback): Use String::fromUTF8()
        to convert the GtkAction label to UTF-16.

1689 1690 1691 1692 1693 1694 1695 1696 1697
2013-03-16  Pratik Solanki  <psolanki@apple.com>

        Disable High DPI Canvas on iOS
        https://bugs.webkit.org/show_bug.cgi?id=112511

        Reviewed by Joseph Pecoraro.

        * Configurations/FeatureDefines.xcconfig:

1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714
2013-03-15  Timothy Hatcher  <timothy@apple.com>

        Disable suppressesIncrementalRendering for the Web Inspector.

        This ends up causing the Inspector to show blank for a couple seconds before
        it does its first paint. During that time the bare window chrome is showing
        when the Inspector's background and other simple elements count be painting.
        This causes the Inspector to look like it is loading slower than reality.

        https://bugs.webkit.org/show_bug.cgi?id=112300
        rdar://problem/13412219

        Reviewed by Geoff Garen.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::createInspectorPageGroup): Disable suppressesIncrementalRendering.

1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768
2013-03-13  Timothy Hatcher  <timothy@apple.com>

        Delay creating the Inspector window so we don't cause a CoreIPC deadlock.

        Other changes include:
        * Create the Inspector WKView at the correct size so it does not need to
          resize later when added to the window.
        * Update the minimum and initial window sizes to better match the new UI.
        * Store the Inspector window frame in WebKit preferences so each page group
          can have different saved window frames. Handy for inspecting the Inspector.

        https://bugs.webkit.org/show_bug.cgi?id=112300
        rdar://problem/13412219

        Reviewed by Geoff Garen.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::defaultValueForKey):
        Added FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE.

        * Shared/WebPreferencesStore.h:
        (FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE):
        Added. Needed to keep WebPage::updatePreferences for trying to set WebCore::Settings.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::minimumWindowWidth):
        (WebKit::WebInspectorProxy::initialWindowWidth):
        Bumped the values to work better with the new UI.

        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::windowFrameDidChange):
        Added.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (-[WKWebInspectorProxyObjCAdapter windowDidMove:]):
        (-[WKWebInspectorProxyObjCAdapter windowDidResize:]):
        Call WebInspectorProxy::windowFrameDidChange.

        (WebKit::WebInspectorProxy::createInspectorWindow):
        Use the preferences for the page group to get the window frame.

        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Stop calling platformAttach or createInspectorWindow, do it in platformOpen.

        (WebKit::WebInspectorProxy::platformOpen):
        Call platformAttach or createInspectorWindow here instead.

        (WebKit::WebInspectorProxy::windowFrameDidChange):
        Added. Store the frame in the page group's preferences.

        (WebKit::WebInspectorProxy::platformAttach):
        (WebKit::WebInspectorProxy::platformDetach):
        Remove code that called setHidden:. We don't need to do that anymore.

1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787
2013-03-15  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Enforce the C++11 standard when compiling WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=112169

        Reviewed by Gustavo Noronha Silva.

        With a limited set of supported compilers the WebKit2 source code can now
        be built with the C++11 language standard enforced.

        * GNUmakefile.am:
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (injectedBundleDirectory): Adjust the string literals concatenation, moving away from empty strings
        (which C++11 refuses to handle as concatenation operators) and using whitespace instead.
        * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
        (WebKit::WebInspectorServer::platformResourceForPath): Ditto.
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::inspectorFilesBasePath): Ditto.

1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803
2013-03-15  Nate Chapin  <japhet@chromium.org>

        Hide MainResourceLoader from the outside world
        https://bugs.webkit.org/show_bug.cgi?id=109971

        Reviewed by Adam Barth.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        (WebFrameLoaderClient):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        * WebProcess/WebPage/WebFrame.h:
        (WebFrame):

1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816
2013-03-15  Abhishek Arya  <inferno@chromium.org>

        Replace static_casts with to* helper functions.
        https://bugs.webkit.org/show_bug.cgi?id=112401

        Reviewed by Stephen Chenney.

        to* helper functions are preferred over static_cast calls since they
        help to catch bad casts easily on the testing infrastructure.

        * Shared/WebRenderObject.cpp:
        (WebKit::WebRenderObject::WebRenderObject):

1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848
2013-03-15  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] Get rid of WebPageProxy::viewWidget() method
        https://bugs.webkit.org/show_bug.cgi?id=112289

        Reviewed by Alexey Proskuryakov.

        Web page should not be aware of platform-specific view.

        * UIProcess/API/efl/EwkView.cpp:
        (wkPageToEvasObjectMap):
        (EwkView::EwkView):
        (EwkView::~EwkView):
        (EwkView::toEvasObject):

            EwkView::toEvasObject() relies on static map rather than on
            removed WebPageProxy::viewWidget() method.

        * UIProcess/API/efl/EwkView.h:
        * UIProcess/API/efl/ewk_text_checker.cpp:
        (uniqueSpellDocumentTag):
        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit::BackingStore::incorporateUpdate):

            Now uses EwkView::toEvasObject().

        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/efl/WebPageProxyEfl.cpp:

            Removed WebPageProxy::viewWidget() method.

1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863
2013-03-14  Andreas Kling  <akling@apple.com>

        REGRESSION(r145169): [Mac][WK2] http/tests/security/cross-frame-access-put.html fails.
        <http://webkit.org/b/111815>
        <rdar://problem/13380145>

        Reviewed by Anders Carlsson.

        Call getWindowFrame() to see if the UI client wants to override the window frame before sending
        a WindowAndViewFramesChanged message to the web process.
        This fixes a glitch in WTR and the Web Inspector where incorrect window frames were being used.

        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::windowAndViewFramesChanged):

1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877
2013-03-14  Andy Estes  <aestes@apple.com>

        [WebKit2] Only preprocess sandbox profiles if we're building for the OS X SDK
        https://bugs.webkit.org/show_bug.cgi?id=112330

        Reviewed by David Kilzer.

        We shouldn't preprocess sandbox profiles just because the computer
        we're building on is a Mac. We should only do it if we're actually
        building for the OS X SDK.

        * DerivedSources.make: Check if $PLATFORM_NAME is macosx rather than if
        $OS is MACOS.

1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909
2013-03-14  Sam Weinig  <sam@webkit.org>

        Support private browsing on a per-page basis
        <rdar://problem/11969491>

        Reviewed by Timothy Horton.

        Adds WKPageSetOverridePrivateBrowsingEnabled and WKPageGetOverridePrivateBrowsingEnabled.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        (WebPageCreationParameters):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetOverridePrivateBrowsingEnabled):
        (WKPageGetOverridePrivateBrowsingEnabled):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::setOverridePrivateBrowsingEnabled):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::overridePrivateBrowsingEnabled):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::updatePreferences):
        (WebKit::WebPage::setOverridePrivateBrowsingEnabled):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Pipe through.

1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924
2013-03-14  Abhishek Arya  <inferno@chromium.org>

        Replace static_casts with to* helper functions.
        https://bugs.webkit.org/show_bug.cgi?id=112296

        Reviewed by Kentaro Hara.

        to* helper functions are preferred over static_cast calls since they
        help to catch bad casts easily on the testing infrastructure.

        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::elementBounds):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::containsAnyFormElements):

1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960
2013-03-14  Jinwoo Song  <jinwoo7.song@samsung.com>

        [EFL][WK2] Add an API for adding and removing user style sheets from a page group
        https://bugs.webkit.org/show_bug.cgi?id=110728

        Reviewed by Gyuyoung Kim.

        This patch implements EwkPageGroup API to provide the interface of WKPageGroup. Using the EwkPageGroup,
        applications may create the views with a page group for the specific identifier. Also, this patch
        encapsulates the APIs WKPageGroupAddUserStyleSheet and WKPageGroupRemoveAllUserStyleSheets behind
        the EwkPageGroup class for adding and removing user style sheets from a page group. WKArrayCreateWithEinaList()
        is added as a generic WKArray creation API from Eina_List.

        * PlatformEfl.cmake:
        * UIProcess/API/C/efl/WKView.cpp:
        (createWKView):
        * UIProcess/API/efl/EWebKit2.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        (EwkView::createEvasObject):
        * UIProcess/API/efl/EwkView.h:
        (EwkView::ewkPageGroup):
        (EwkView):
        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_smart_add):
        (ewk_view_page_group_get):
        * UIProcess/API/efl/ewk_view.h:
        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
        (EWK2UnitTest::EWK2UnitTestBase::setWebView):
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990
2013-03-14  Simon Hausmann  <simon.hausmann@digia.com>

        [Qt] Improve the handling of mock geolocation, device orientation and motion clients

        Reviewed by Tor Arne Vestbø.

        The mock versions of these web facing features should be instantiated when
        running in DumpRenderTree only. In order for them to work, no extra Qt modules
        such as QtLocation are actually needed.

        This patch decouples enabling device orientation/motion and geolocation from
        the underlying Qt modules and makes them available in developer builds
        (!production_build) and backed by mock backends when running in drt.

        So if the Qt 5 modules are available, they'll be used (unless drtRun). For
        developers the web facing features are always enabled (although requests will
        time out) and the mock backends are enabled inside DRT, allowing for the layout
        tests to run with less dependencies.

        In addition this also enables the mock device motion client, which was
        previously never instantiated.

        * Target.pri:
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformInitializeWebProcess):
        * UIProcess/qt/WebGeolocationProviderQt.cpp:
        * WebKit2.pri:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):

1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004
2013-03-14  Alice Liu  <alice.liu@apple.com>

        Add to HistoryItem a way to know if its underlying CachedPage has expired.
        https://bugs.webkit.org/show_bug.cgi?id=110652

        Reviewed by Brady Eidson.

        Hook up hasCachedPageExpired in InjectedBundle's BackForwardListItem.
        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
        (WKBundleBackForwardListItemHasCachedPageExpired):
        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
        (WebKit::InjectedBundleBackForwardListItem::hasCachedPageExpired):

2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
2013-03-13  Rik Cabanier  <cabanier@adobe.com>

        create runtime flags for CSS Compositing
        https://bugs.webkit.org/show_bug.cgi?id=111818

        Reviewed by Ryosuke Niwa.

        Added a preference to enable CSS compositing.

        * Shared/WebPreferencesStore.h:
        (WebKit):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        (WebKit::InjectedBundle::setCSSCompositingEnabled):
        (WebKit):
        * WebProcess/InjectedBundle/InjectedBundle.h:
        (InjectedBundle):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2025 2026 2027 2028 2029 2030 2031 2032 2033
2013-03-13  Ryosuke Niwa  <rniwa@webkit.org>

        Threaded HTML Parser is missing feature define flags in all but Chromium port's build files
        https://bugs.webkit.org/show_bug.cgi?id=112277

        Reviewed by Adam Barth.

        * Configurations/FeatureDefines.xcconfig:

2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051
2013-03-13  Brady Eidson  <beidson@apple.com>

        Small ResourceLoader cleanups.
        https://bugs.webkit.org/show_bug.cgi?id=112279

        Reviewed by Geoff Garen.

        Replace the "bool allAtOnce" flag with a descriptive enum to make reading code easier.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveData):

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveData):
        (WebKit::WebResourceLoader::didReceiveResource):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.messages.in: Get rid of the "allAtOnce" flag since it was always false.

2052 2053 2054 2055 2056 2057 2058 2059 2060
2013-03-13  Abhishek Arya  <inferno@chromium.org>

        Replace static_casts with to* functions for document types.
        https://bugs.webkit.org/show_bug.cgi?id=112225

        Reviewed by Ryosuke Niwa.

        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Remove the redundant helper.

2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071
2013-03-13  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Build fixes after 145552
        https://bugs.webkit.org/show_bug.cgi?id=112267

        Reviewed by Gustavo Noronha Silva.

        * GNUmakefile.am: Narrow down the dependency CFLAGS list to only ones that are actually needed
        to build the platformgtk_sources into libPlatformGtk2.la. At the moment this means only
        GTK+-2.0 CFLAGS are used.

2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092
2013-03-13  Antoine Quint  <graouts@apple.com>

        Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation
        https://bugs.webkit.org/show_bug.cgi?id=112271

        Reviewed by Tim Horton.

        Add a new stopFadeOutAnimation() on PageOverlay that we call when
        WebInspectorClient::highlight() is called and a page overlay
        is already available. This ensures that any fade-out animation
        is cleared before proceeding with showing the page overlay
        for the new highlight.

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::highlight):
        * WebProcess/WebPage/PageOverlay.cpp:
        (WebKit::PageOverlay::stopFadeOutAnimation):
        (WebKit):
        * WebProcess/WebPage/PageOverlay.h:
        (PageOverlay):

2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103
2013-03-13  Pavel Feldman  <pfeldman@chromium.org>

        Web Inspector: get rid of hiddenPanels filter
        https://bugs.webkit.org/show_bug.cgi?id=112252

        Reviewed by Vsevolod Vlasov.

        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
        (WebInspectorFrontendClient):

2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118
2013-03-13  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [WK2][Qt] Regression(145517) WebProcess asserts in debug build on WebKitTestRunner start
        https://bugs.webkit.org/show_bug.cgi?id=112223

        Reviewed by Simon Hausmann.

        We need to only enable the cookie jar and the disk cache conditionally
        in the web process since we removed default paths and WKTR doesn't provide
        them.

        * WebProcess/qt/WebProcessQt.cpp:
        (WebKit::WebProcess::platformSetCacheModel):
        (WebKit::WebProcess::platformInitializeWebProcess):

2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136
2013-03-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        [EFL][WK2] ewk_popup_menu_close() does not work as intended
        https://bugs.webkit.org/show_bug.cgi?id=110209

        Reviewed by Laszlo Gombos.

        ewk_popup_menu_close() is called by the browser to notify WebKit that
        the popup menu was closed. However, the implementation was calling
        EwkView::closePopupMenu() which was asking the browser to close the
        popup menu via an Evas smart function. This patch fixes the behavior
        and ewk_popup_menu_close() now calls WKPopupMenuListenerSetSelection()
        C API so that the WebProcess is notified that the popup menu was
        hidden.

        * UIProcess/API/efl/ewk_popup_menu.cpp:
        (EwkPopupMenu::close):

2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149
2013-03-12  Huang Dongsung  <luxtella@company100.net>

        Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer().
        https://bugs.webkit.org/show_bug.cgi?id=111835

        Reviewed by Luiz Agostini.

        Amend CoordinatedLayerTreeHost because
        CoordinatedGraphicsLayer::setRootLayer() is removed.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170
2013-03-12  Dean Jackson  <dino@apple.com>

        Primary plugin hit detection needs to run after plugin creation
        https://bugs.webkit.org/show_bug.cgi?id=112206

        Reviewed by Tim Horton.

        On some pages, the plugins are created after the page has loaded, and
        thus our heuristic to determine the primary plugin fails. Run this
        heuristic more often: after each PluginView is created. It already exits
        early if it has found a primary. But we also need to make sure that it
        doesn't run before load.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::addPluginView): Run detection when view is added.
        (WebKit::WebPage::didFinishLoad): Remember that we have loaded.
        (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Look at the PluginViews to see if we have a plugin.
        (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset both flags.
        * WebProcess/WebPage/WebPage.h:
        (WebPage): New member variable, m_readyToFindPrimarySnapshottedPlugin.

2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186
2013-03-12  Beth Dakin  <bdakin@apple.com>

        WKView -printOperationWithPrintInfo:forFrame: doesn’t use the print info that is 
        passed in
        https://bugs.webkit.org/show_bug.cgi?id=112212
        -and corresponding-
        <rdar://problem/12994883>

        Reviewed by Anders Carlsson.

        We should call [NSPrintOperation printOperationWithView: printInfo:] to use the 
        printInfo parameter instead of [NSPrintOperation printOperationWithView:] which 
        will just use the sharedPrintInfo.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView printOperationWithPrintInfo:forFrame:]):

2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199
2013-03-12  Geoffrey Garen  <ggaren@apple.com>

        Moved RunLoopTimer and SchedulePair to WTF
        https://bugs.webkit.org/show_bug.cgi?id=112171

        Reviewed by Oliver Hunt.

        This will allow us to use timers in lower level primitives without
        duplicating all the code.

        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
        (WebFrameNetworkingContext):

2200 2201 2202 2203 2204 2205 2206 2207 2208 2209
2013-03-12  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles
        https://bugs.webkit.org/show_bug.cgi?id=112163

        Reviewed by Martin Robinson.

        * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for
        references to HILDON_CPPFLAGS and HILDON_CFLAGS.

2210 2211 2212 2213 2214 2215 2216 2217 2218 2219
2013-03-12  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Set up the libPlatformGtk.la library
        https://bugs.webkit.org/show_bug.cgi?id=111738

        Reviewed by Martin Robinson.

        * GNUmakefile.am: Reference platformgtk_cppflags variable, libPlatformGtk.la along with webcoregtk_cppflags variable, libWebCoreGtk.la.
        Adjust the path to GtkVersioning.c, the file has moved under Source/Platform.

2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246
2013-03-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] Fix EwkContext class API
        https://bugs.webkit.org/show_bug.cgi?id=111706

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/C/efl/WKView.cpp:
        (createWKView):
        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::findOrCreateWrapper):

            Renamed from create() as it returns the same instance of EwkContext
            for the given WKContextRef if present.

        (EwkContext::create):
        (EwkContext::defaultContext):

            Returns raw pointer rather than PassRefPtr<EwkContext> as ownership
            is not transferred.

        (ewk_context_default_get):
        * UIProcess/API/efl/ewk_context_private.h:
        (EwkContext):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

2247 2248 2249 2250 2251 2252 2253 2254 2255
2013-03-12  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Enable Web Audio in development builds
        https://bugs.webkit.org/show_bug.cgi?id=111831

        Reviewed by Philippe Normand.

        * GNUmakefile.am: Link the plugin process against libWebCoreModules.la as well.

2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290
2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Layer QtDownloadManager on the C API
        https://bugs.webkit.org/show_bug.cgi?id=109562

        Reviewed by Simon Hausmann.
        Signed off for WebKit2 by Benjamin Poulain.

        * UIProcess/API/cpp/qt/WKURLQt.cpp:
        (WebKit::adoptToQString):
        (WebKit):
        (WebKit::adoptToQUrl):
        * UIProcess/API/cpp/qt/WKURLQt.h:
        (WebKit):
        * UIProcess/API/qt/qquickwebview.cpp:
        (QQuickWebViewPrivate::handleDownloadRequest):
        * UIProcess/qt/QtDownloadManager.cpp:
        (WebKit::toQtDownloadManager):
        (WebKit):
        (WebKit::QtDownloadManager::QtDownloadManager):
        (WebKit::QtDownloadManager::addDownload):
        (WebKit::QtDownloadManager::didReceiveResponse):
        (WebKit::QtDownloadManager::didCreateDestination):
        (WebKit::QtDownloadManager::didFinishDownload):
        (WebKit::QtDownloadManager::didFailDownload):
        (WebKit::QtDownloadManager::didReceiveDataForDownload):
        * UIProcess/qt/QtDownloadManager.h:
        (WebKit):
        (QtDownloadManager):
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit::QtWebContext::QtWebContext):
        * UIProcess/qt/QtWebError.cpp:
        (WebKit::QtWebError::url):
        (WebKit::QtWebError::description):

2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346
2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Layer QtWebIconDatabaseClient on the C API
        https://bugs.webkit.org/show_bug.cgi?id=109564

        Reviewed by Simon Hausmann.
        Signed off for WebKit2 by Benjamin Poulain.

        * Target.pri:
        * UIProcess/API/C/qt/WKIconDatabaseQt.cpp: Added.
        (WKIconDatabaseTryGetQImageForURL):
          - New API added to get a QImage from the IconDatabase.
            Based on WKIconDatabaseCG.h/cpp
        * UIProcess/API/C/qt/WKIconDatabaseQt.h: Added.
        * UIProcess/API/cpp/qt/WKURLQt.cpp:
        (WKURLCreateWithQString):
        (WKURLCopyQString):
        (WKURLCreateWithQUrl):
        (WKURLCopyQUrl):
          - The WKUrlRef behind the scene is a WTF::String and encoding it back and forth to
            a QUrl can slightly change its string representation. Allow converting a WKUrlRef
            to and from a QString to ensure this.
        * UIProcess/API/cpp/qt/WKURLQt.h:
        * UIProcess/API/qt/qwebiconimageprovider.cpp:
        (QWebIconImageProvider::iconURLForPageURLInContext):
          - The icon URL isn't accessible form the C API and shouldn't need to be.
            Use an ID incremented on each update to trigger an update of the QML Image component.
        (QWebIconImageProvider::requestImage):
          - The IconDatabase was previously assumed to resize the image to the requested size,
            but this parameter is ignored, as stated in a comment in WebIconDatabase::imageForPageURL.
            Explicitely do the resize after fetching the original icon to also be able to report
            the original size properly to QtQuick.
        * UIProcess/API/qt/qwebiconimageprovider_p.h:
        * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
          - Set the image to load asynchronously to further test the possibility of threading issues
            in QtWebIconDatabaseClient::iconImageForPageURL
          - Add a few barriers to fix some issues where the load succeeded signal would be wrongly
            catched by init() before the next test.
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit::QtWebContext::QtWebContext):
        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
        (WebKit):
        (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
        (WebKit::QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
        (WebKit::QtWebIconDatabaseClient::updateID):
        (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL):
        (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
          - Remove the Mutex. This mutex was useless given that it would only
            be locked from a single thread. Since the IconDatabase runs in its own thread,
            it already is thread-safe to access.
        (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
        (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
        * UIProcess/qt/QtWebIconDatabaseClient.h:
        (QtWebIconDatabaseClient):
        * WebKit2.pri:

2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392
2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Specify storage paths through the C API
        https://bugs.webkit.org/show_bug.cgi?id=111435

        Reviewed by Simon Hausmann.
        Signed off for WebKit2 by Benjamin Poulain.

        The WKIconDatabase should be opened through a call to
        WKContextSetIconDatabasePath. To avoid having some paths
        returned through WebContext::platformDefault* and some others
        through the C API, make sure that all those paths are set
        through the C API.

        * Shared/qt/QtDefaultDataLocation.cpp: Removed.
        * Shared/qt/QtDefaultDataLocation.h: Removed.
        * Target.pri:
        * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
        (WebKit::cacheFile):
          - This part is left alone behind the C API.
            Since PluginProcessProxy have no knowledge of the WebContext
            it is rather difficult to fetch a configured directory that
            could be used for this purpose (like the disk cache storage).
            Hard-code a compatible logic to keep the current behavior.
        (WebKit::removeCacheFile):
        (WebKit):
        (WebKit::readMetaDataFromCacheFile):
        (WebKit::writeToCacheFile):
        (WebKit::tryReadPluginMetaDataFromCacheFile):
          - Update the code to better handle an empty cache file path.
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit::QtWebContext::defaultContext):
        (WebKit::defaultLocation):
        (WebKit):
        (WebKit::QtWebContext::preparedStoragePath):
        * UIProcess/qt/QtWebContext.h:
        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
        (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::applicationCacheDirectory):
        (WebKit::WebContext::platformDefaultDatabaseDirectory):
        (WebKit::WebContext::platformDefaultIconDatabasePath):
        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
        (WebKit::WebContext::platformDefaultDiskCacheDirectory):
        (WebKit::WebContext::platformDefaultCookieStorageDirectory):

2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412
2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt] Properly layer QtWebContext on top of the C API
        https://bugs.webkit.org/show_bug.cgi?id=108475

        Reviewed by Simon Hausmann.
        Signed off for WebKit2 by Benjamin Poulain.

        * UIProcess/API/qt/qquickwebview.cpp:
        (QQuickWebViewPrivate::initialize):
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit::initializeContextInjectedBundleClient):
        (WebKit::QtWebContext::QtWebContext):
        (WebKit::QtWebContext::create):
        (WebKit::QtWebContext::defaultContext):
        * UIProcess/qt/QtWebContext.h:
        (WebKit):
        (QtWebContext):
        (WebKit::QtWebContext::context):

2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444
2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Allow QtWebContext to call directly to QQuickWebView with a WKPageRef
        https://bugs.webkit.org/show_bug.cgi?id=109829

        Reviewed by Allan Sandfeld Jensen.
        Signed off for WebKit2 by Benjamin Poulain.

        Instead of going through WebPageProxy and PageClient to forward
        injected bundle messages received by the context, maintain a static map
        of WKPageRef to QQuickWebViewPrivate.

        * UIProcess/API/qt/qquickwebview.cpp:
        (QQuickWebViewPrivate::get):
        (QQuickWebViewPrivate::~QQuickWebViewPrivate):
        (QQuickWebViewPrivate::initialize):
        (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
        * UIProcess/API/qt/qquickwebview_p_p.h:
        (QQuickWebViewPrivate):
        * UIProcess/API/qt/raw/qrawwebview.cpp:
        * UIProcess/API/qt/raw/qrawwebview_p_p.h:
        * UIProcess/PageClient.h:
        (PageClient):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/qt/QtPageClient.cpp:
        * UIProcess/qt/QtPageClient.h:
        (QtPageClient):
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit::didReceiveMessageFromInjectedBundle):
        * UIProcess/qt/WebPageProxyQt.cpp:

2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483
2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Keep the WebContext alive during the whole application's lifetime
        https://bugs.webkit.org/show_bug.cgi?id=109827

        Reviewed by Simon Hausmann.
        Signed off for WebKit2 by Benjamin Poulain.

        The lifetime of the WebContext is difficult to manage because of a circular
        reference kept with the WebProcessProxy until it shuts itself down, 60
        seconds after the last page is closed. There was some notification
        in place to handle this in the upper layer, but having to go through the
        C API (done in a following patch) makes this quite awkward.

        Keeping the WebContext alive also includes the icon database which is
        quite heavy, in the future we should only enable it once the
        QQuickWebView::icon property is read.

        * UIProcess/API/qt/qquickwebview.cpp:
        (QQuickWebViewPrivate::QQuickWebViewPrivate):
        (QQuickWebViewPrivate::handleDownloadRequest):
        (QQuickWebViewPrivate::updateIcon):
        * UIProcess/API/qt/qquickwebview_p_p.h:
        (QQuickWebViewPrivate):
        * UIProcess/API/qt/qwebiconimageprovider.cpp:
        (QWebIconImageProvider::requestImage):
        * UIProcess/qt/QtWebContext.cpp:
        (WebKit):
        (WebKit::QtWebContext::QtWebContext):
        (WebKit::QtWebContext::~QtWebContext):
        (WebKit::QtWebContext::create):
        (WebKit::QtWebContext::defaultContext):
        * UIProcess/qt/QtWebContext.h:
        (QtWebContext):
        (WebKit::QtWebContext::downloadManager):
        (WebKit::QtWebContext::iconDatabase):
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformInvalidateContext):

2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516
2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Qt][WK2] Favor QUrl and QString over WTF::String in the Qt API layer
        https://bugs.webkit.org/show_bug.cgi?id=109468

        Reviewed by Allan Sandfeld Jensen.
        Signed off for WebKit2 by Benjamin Poulain.

        In preparation for patches using the C API types in some areas, remove the
        usage of WTF::String on the affected line.

        Use a QUrl for icon URL to avoid unnecessary conversion.
        Use a QString for the page URL to keep it compatible with WebPageProxy and
        WebIconDatabase and avoid QUrl parsing.

        * UIProcess/API/qt/qquickwebview.cpp:
        (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
        (QQuickWebViewPrivate::updateIcon):
        (QQuickWebView::emitUrlChangeIfNeeded):
        (QQuickWebView::icon):
        * UIProcess/API/qt/qquickwebview_p_p.h:
        (QQuickWebViewPrivate):
        * UIProcess/API/qt/qwebiconimageprovider.cpp:
        (QWebIconImageProvider::iconURLForPageURLInContext):
        * UIProcess/API/qt/qwebiconimageprovider_p.h:
        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
        (WebKit::QtWebIconDatabaseClient::iconForPageURL):
        (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
        (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
        (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
        * UIProcess/qt/QtWebIconDatabaseClient.h:
        (QtWebIconDatabaseClient):

2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535
2013-03-12  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
        https://bugs.webkit.org/show_bug.cgi?id=111973

        Reviewed by Carlos Garcia Campos.

        The problem is that the UIProcess locale is reseted to C in
        gtk_test_init, however the WebProcess does not inherit the locale set in
        the UIProcess and it uses the system one (that could be different to
        English). So, there were problems in some tests that are comparing
        strings from both processes like WebKit2APITests/TestPrinting and
        WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
        environment variable LC_ALL to C in order to reset WebProcess locale
        too.

        * UIProcess/API/gtk/tests/TestMain.cpp:
        (main): Set environment variable LC_ALL to C.