ChangeLog 2.05 MB
Newer Older
1 2 3 4 5 6 7 8 9 10
2013-04-07  David Kilzer  <ddkilzer@apple.com>

        Remove the rest of SVG_DOM_OBJC_BINDINGS
        <http://webkit.org/b/114112>

        Reviewed by Geoffrey Garen.

        * Configurations/FeatureDefines.xcconfig:
        - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.

11 12 13 14 15 16 17 18 19
2013-04-06  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the WebKit2 build.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit):
        * NetworkProcess/NetworkResourceLoader.h:
        (NetworkResourceLoader): Removed a defunct function.

20 21 22 23 24 25 26 27 28
2013-04-05  Ed Bartosh  <bartosh@gmail.com>

        [WK2] --no-tiled-backing-store build fails because FloatPoint is not declared
        https://bugs.webkit.org/show_bug.cgi?id=113618

        Reviewed by Simon Fraser.

        * WebProcess/Plugins/Plugin.h: Forward declared FloatPoint

ggaren@apple.com's avatar
ggaren@apple.com committed
29 30 31 32 33 34 35 36 37 38 39
2013-04-05  Geoffrey Garen  <ggaren@apple.com>

        Made USE(JSC) unconditional
        https://bugs.webkit.org/show_bug.cgi?id=114058

        Reviewed by Anders Carlsson.

        * Shared/linux/WebMemorySamplerLinux.cpp:
        (WebKit::WebMemorySampler::sampleWebKit):
        * config.h:

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
2013-04-05  Ed Bartosh  <bartosh@gmail.com>

        [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
        https://bugs.webkit.org/show_bug.cgi?id=113627

        Reviewed by Simon Fraser.

        Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
        with --no-tiled-backing-store build option:
        * UIProcess/API/C/efl/WKView.cpp:
        * UIProcess/API/efl/EvasGLContext.cpp:
        * UIProcess/API/efl/EvasGLContext.h:
        * UIProcess/API/efl/EvasGLSurface.cpp:
        * UIProcess/API/efl/EvasGLSurface.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        (EwkView::displayTimerFired):
        (EwkView::takeSnapshot):
        * UIProcess/API/efl/EwkView.h:
        (WebKit):
        (EwkView):
        * UIProcess/API/efl/SnapshotImageGL.cpp:
        * UIProcess/API/efl/SnapshotImageGL.h:
        * UIProcess/PageViewportController.cpp:
        * UIProcess/PageViewportController.h:
        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
        * UIProcess/efl/ViewClientEfl.cpp:
        (WebKit::ViewClientEfl::didChangeContentsSize):
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::didCommitLoad):
        (WebKit::WebView::updateViewportSize):
        (WebKit::WebView::didChangeViewportProperties):
        (WebKit::WebView::pageDidRequestScroll):
        (WebKit::WebView::didRenderFrame):
        (WebKit::WebView::pageTransitionViewportReady):

76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
2013-04-05  Ed Bartosh  <bartosh@gmail.com>

        [EFL][WK2] --no-tiled-backing-store build fails because of not used #if USE(COORDINATED_GRAPHICS)
        https://bugs.webkit.org/show_bug.cgi?id=113629

        Reviewed by Simon Fraser.

        Wrapped code related to coordinated graphics with #if USE(COORDINATED_GRAPHICS)
        * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::initialize):
        (WebKit):
        (WebKit::WebView::paintToCairoSurface):
        (WebKit::WebView::updateViewportSize):

91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
2013-04-05  Timothy Hatcher  <timothy@apple.com>

        Allow the Web Inspector to use WebSQL.

        This fixes an exception on load in the Safari Web Inspector.

        https://webkit.org/b/114040
        rdar://problem/13581422

        Reviewed by Anders Carlsson.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::exceededDatabaseQuota): Added.
        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota.

106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
2013-04-04  Brady Eidson  <beidson@apple.com>

        Add SPI to get a copy of the context menu at a given point.
        <rdar://problem/13450908> and https://bugs.webkit.org/show_bug.cgi?id=113958

        Reviewed by Andy Estes.

        Add the new accessor: 
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::contextMenuAtPoint):
        * WebProcess/WebPage/WebPage.h:

        Expose the new SPI:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageCopyContextMenuAtPoint):
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

123 124 125 126 127 128 129 130 131 132 133 134 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-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] WebView should own page position and scale factor
        https://bugs.webkit.org/show_bug.cgi?id=111075

        Reviewed by Andreas Kling.

        View content position and content scale factor should belong to WebView
        rather than to EwkView as it decreases EwkView usage inside EFL-agnostic
        WebView and improves WebView encapsulation.

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

            New WKView API was added to set and get content scale factor.
            The view content scale factor is not the same as page scale factor:
            it always applies to content but not necessarily applies to the page.
            The view content scale factor is calculated by viewport controller
            and applies immediately for painting in UI process. Page scale factor
            is updated later after the frame is rendered to accomplish the pending
            scale change.

        (WKViewGetContentPosition):
        (WKViewSetContentPosition):

            New WKView API was added to set and get content position.
            Content position is set in UI units.

        * UIProcess/API/C/efl/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        * UIProcess/API/efl/EwkView.h:
        (EwkView):
        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
        (WebKit::PageViewportControllerClientEfl::setViewportPosition):
        (WebKit::PageViewportControllerClientEfl::setPageScaleFactor):
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::WebView):
        (WebKit::WebView::paintToCairoSurface):
        (WebKit::WebView::transformToScene):
        (WebKit::WebView::updateViewportSize):
        (WebKit::WebView::pageDidRequestScroll):
        * UIProcess/efl/WebView.h:
        (WebKit::WebView::setContentScaleFactor):
        (WebKit::WebView::contentScaleFactor):
        (WebView):
        (WebKit::WebView::setContentPosition):
        (WebKit::WebView::contentPosition):

173 174 175 176 177 178 179 180 181 182 183 184
2013-04-05  Alberto Garcia  <agarcia@igalia.com>

        [GTK][WK2] WebKitLoaderClient: add missing initializers
        https://bugs.webkit.org/show_bug.cgi?id=112961

        Reviewed by Carlos Garcia Campos.

        There are two new attributes: pluginLoadPolicy and pluginDidFail.

        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
        (attachLoaderClientToView):

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
2013-04-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] Encapsulate view states set-up within WebView
        https://bugs.webkit.org/show_bug.cgi?id=110877

        Reviewed by Benjamin Poulain.

        View states set-up is encapsulated within WebView. This change
        reduces both usage of EwkView inside WebView class and usage of
        WebPageProxy inside EwkView class.

        New WKView API was added so that EwkView can define whether or not
        the view is visible and focused.

        * UIProcess/API/C/efl/WKView.cpp:
        (WKViewIsFocused):
        (WKViewSetIsFocused):
        (WKViewIsVisible):
        (WKViewSetIsVisible):
        * UIProcess/API/C/efl/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (::handleEvent):
        (EwkView::handleEvasObjectShow):
        (EwkView::handleEwkViewFocusIn):
        (EwkView::handleEwkViewFocusOut):
        * UIProcess/API/efl/EwkView.h:
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::WebView):
        (WebKit::WebView::setFocused):
        (WebKit):
        (WebKit::WebView::setVisible):
        (WebKit::WebView::isViewFocused):
        (WebKit::WebView::isViewVisible):
        * UIProcess/efl/WebView.h:
        (WebKit::WebView::isFocused):
        (WebView):
        (WebKit::WebView::isVisible):

223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
2013-04-04  KwangYong Choi  <ky0.choi@samsung.com>

        [EFL][WK2] Add support for getting page contents as string
        https://bugs.webkit.org/show_bug.cgi?id=106752

        Reviewed by Andreas Kling.

        Modified ewk_view_page_contents_get() API to get page contents as string.
        EWK_PAGE_CONTENTS_TYPE_STRING is added to Ewk_Page_Contents_Type.
        Now, we can use both EWK_PAGE_CONTENTS_TYPE_MHTML and EWK_PAGE_CONTENTS_TYPE_STRING
        for getting page contents.

        * UIProcess/API/efl/ewk_view.cpp:
        (Ewk_Page_Contents_Context):
        (ewkViewPageContentsAsMHTMLCallback):
        (ewkViewPageContentsAsStringCallback):
        (ewk_view_page_contents_get):
        * UIProcess/API/efl/ewk_view.h:
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (PageContentsAsMHTMLCallback):
        (PageContentsAsStringCallback):
        (TEST_F):

246 247 248 249 250 251 252 253 254 255 256 257 258 259
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        [Cairo] Stop passing raw pointers to BitmapImage::create()
        https://bugs.webkit.org/show_bug.cgi?id=113945

        Reviewed by Martin Robinson.

        Pass a smart pointer in to BitmapImage::create() instead of a raw one
        for the cairo surface. The factory method prototype was updated for
        cairo in r147643.

        * Shared/cairo/ShareableBitmapCairo.cpp:
        (WebKit::ShareableBitmap::createImage):

260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
2013-04-03  Dean Jackson  <dino@apple.com>

        Expose settings to disable plugin snapshotting autostart and primary detection
        https://bugs.webkit.org/show_bug.cgi?id=113918

        Reviewed by Tim Horton.

        Three new settings: snapshotAllPlugIns, primaryPlugInSnapshotDetectionEnabled and
        autostartOriginPlugInSnapshottingEnabled.
        These are exposed via WKPreferences (WebKit2 only, since that's the only port actively
        using the feature).

        * Shared/WebPreferencesStore.h: Add macros for new settings.
        * UIProcess/API/C/WKPreferences.cpp: Getters and setters for new settings.
        (WKPreferencesSetSnapshotAllPlugIns):
        (WKPreferencesGetSnapshotAllPlugIns):
        (WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled):
        (WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled):
        (WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled):
        (WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled):
        * UIProcess/API/C/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Forward settings updates.
        (WebKit::WebPage::addPluginView): Don't run primary plugin detection if the setting is false.
        (WebKit::WebPage::didFinishLoad): Ditto.

286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
        https://bugs.webkit.org/show_bug.cgi?id=113929

        Reviewed by Martin Robinson.

        Update code now that PassNativeImagePtr is now a typedef to PassRefPtr<cairo_surface_t>
        instead of NativeImageCairo*.

        * Shared/gtk/ArgumentCodersGtk.cpp:
        (CoreIPC::decodeImage):
        * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp:
        (WKIconDatabaseTryGetCairoSurfaceForURL):
        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
        (getIconSurfaceSynchronously):

303 304 305 306 307 308 309 310 311 312 313 314
2013-04-04  Sze Howe Koh  <szehowe.koh@gmail.com>

        [Qt] docs: Fix module name format
        https://bugs.webkit.org/show_bug.cgi?id=113209

        Reviewed by Jocelyn Turcotte.

        Make QDoc-generated documentation follow the conventions at
        http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

        * UIProcess/API/qt/qquickwebview.cpp:

315 316 317 318 319 320 321 322 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
2013-04-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2][EFL] WebView should own view size
        https://bugs.webkit.org/show_bug.cgi?id=110753

        Reviewed by Andreas Kling.

        WebView owns view size. WKViewGetSize and WKViewSetSize API
        is exposed accordingly. Usage of EFL-specific ewkView inside
        toolkit-agnostic WebView class is reduced.

        * UIProcess/API/C/efl/WKView.cpp:
        (WKViewGetSize):
        (WKViewSetSize):
        * UIProcess/API/C/efl/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::setDeviceScaleFactor):
        (EwkView::size):
        (EwkView::deviceSize):
        (EwkView::scheduleUpdateDisplay):
        (EwkView::handleEvasObjectCalculate):
        * UIProcess/API/efl/EwkView.h:
        (EwkView):
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::setSize):
        (WebKit):
        (WebKit::WebView::paintToCurrentGLContext):
        (WebKit::WebView::updateViewportSize):
        (WebKit::WebView::viewSize):
        (WebKit::WebView::dipSize):
        * UIProcess/efl/WebView.h:
        (WebView):
        (WebKit::WebView::size):

349 350 351 352 353 354 355 356 357 358 359 360 361
2013-04-03  Anders Carlsson  <andersca@apple.com>

        Don't try to set the exception port for server connections
        https://bugs.webkit.org/show_bug.cgi?id=113910
        <rdar://problem/11248925>

        Reviewed by Darin Adler.

        Treat a SetExceptionPort message to the server connection as an invalid message.

        * Platform/CoreIPC/mac/ConnectionMac.cpp:
        (CoreIPC::Connection::receiveSourceEventHandler):

362 363 364 365 366 367 368 369 370 371 372
2013-04-02  Mark Rowe  <mrowe@apple.com>

        <http://webkit.org/b/113898> Eliminate some code duplication by introducing an array of handlers to register / unregister.

        Reviewed by Antti Koivisto.

        * UIProcess/mac/WebContextMac.mm:
        (OcclusionNotificationHandler): Structure containing the notification name, type and handler.
        (WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array.
        (WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array.

373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
2013-04-02  Mark Rowe  <mrowe@apple.com>

        Enable process suppression when no windows in the application have drawn recently.
        <http://webkit.org/b/113854> / <rdar://problem/13540351>

        Reviewed by Darin Adler.

        * UIProcess/mac/WebContextMac.mm:
        (WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped.
        (WebKit::applicationWindowModificationsStopped): Note that modifications have stopped.
        (WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications.
        (WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications.
        (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded
        or the application has not drawn recently.
        (WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto.
        (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto.

390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
2013-04-03  Dean Jackson  <dino@apple.com>

        Cross fade into restarted plugin
        https://bugs.webkit.org/show_bug.cgi?id=113868

        Reviewed by Tim Horton.

        Add a new plugin process type that indicates this is a plugin that
        has been restarted from snapshotting. On Apple ports, this allows
        us to animate the appearance of the plugin so that it crossfades
        with the snapshot. Other ports will have to add their own fading.

        * PluginProcess/PluginProcess.h: New Type: TypeRestartedProcess.
        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
        (WebKit::PluginProxy::pluginLayer): When the plugin's CALayer is created, if it
            is a restarted plugin, add an opacity animation to fade it in.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin): Mark restarted plugins with the new process type.

409 410 411 412 413 414 415 416
2013-04-03  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13564588> Add a temporary workaround for a build failure.

        Fix suggested by Mark Rowe.

        * Shared/mac/ChildProcessMac.mm:

417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433
2013-04-03  Alexey Proskuryakov  <ap@apple.com>

        [WK2] XMLHttpRequest upload events don't work with NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=113887

        Reviewed by Brady Eidson.

        Just forward didSendData client call to WebProcess.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didSendData):
        (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Tweaked a comment.
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didSendData):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.messages.in:

434 435 436 437 438 439 440 441 442 443 444 445
2013-04-02  Ryosuke Niwa  <rniwa@webkit.org>

        Remove code for Mac 10.5 and earlier from WTF and WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=113844

        Reviewed by Benjamin Poulain.

        Removed the code for 10.5 and removed if-def for 10.6.

        * Shared/mac/PasteboardTypes.mm:
        (WebKit::PasteboardTypes::forEditing):

446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
2013-04-02  Anders Carlsson  <andersca@apple.com>

        Be more robust against empty message receiver names in incoming messages
        https://bugs.webkit.org/show_bug.cgi?id=113833
        <rdar://problem/13284433>

        Reviewed by Beth Dakin.

        Turns out that we either send or receive messages whose receiver names are empty. This leads to bad things when we try to look
        up the message receiver name in a hash map since the empty name is used to represent an empty hash map value.

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue):
        Sprinkle assertions.

        (CoreIPC::Connection::processIncomingMessage):
        If the message receiver name is not valid, make sure to call didReceiveInvalidMessage on the client thread.

        (CoreIPC::Connection::dispatchDidReceiveInvalidMessage):
        Add new helper function.

467 468 469 470 471 472 473 474 475 476 477 478 479
2013-04-02  Simon Cooper  <scooper@apple.com>

        [Mac][WK2] Don’t let plug-ins use System V shared memory
        https://bugs.webkit.org/show_bug.cgi?id=113466
        <rdar://problem/13159030>

        Reviewed, tweaked and landed by Alexey Proskuryakov.

        Instead of allowing plug-ins to request System V shm, give them a
        temporary but usable alternative if they try to request it.

        * PluginProcess/mac/PluginProcessShim.mm:

480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
2013-04-02  Anders Carlsson  <andersca@apple.com>

        Add WKContextSetInvalidMessageFunction
        https://bugs.webkit.org/show_bug.cgi?id=113820
        <rdar://problem/12679817>

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetInvalidMessageFunction):
        Call WebContext::didReceiveInvalidMessage.

        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::setInvalidMessageCallback):
        Set the global variable.

        (WebKit::WebContext::didReceiveInvalidMessage):
        Construct a message name string and call the invalid message callback.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didReceiveInvalidMessage):
        Call WebContext::didReceiveInvalidMessage.

504 505 506 507 508 509 510 511 512 513
2013-04-02  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Remove WKCreateNSURLConnectionDelegateProxy
        https://bugs.webkit.org/show_bug.cgi?id=113810

        Reviewed by Anders Carlsson.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

514 515 516 517 518 519 520 521 522 523
2013-04-02  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
        https://bugs.webkit.org/show_bug.cgi?id=113803

        Reviewed by Darin Adler.

        * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::startWithHandle):
        Just pass nil instead of proxy.

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 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694
2013-04-02  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        [WK2] Remove repeating code in declaration of WK2 API classes
        https://bugs.webkit.org/show_bug.cgi?id=112782

        Reviewed by Benjamin Poulain.

        The following two lines of code had been repeated in every WK2 API
        object class:
        1) static const Type APIType = SomeAPIType;
        2) virtual Type type() const { return APIType; }

        This patch introduces template class 'TypedAPIObject' inherited
        from WebKit::APIObject and it contains the common functionality. 
        So the new pattern is that API object classes are inherited from
        TypedAPIObject (rather than from WebKit::APIObject directly) passing
        the corresponding API object type as a template parameter.

        The existing API object classes are modified accordingly to the
        proposed pattern.

        * Shared/APIObject.h:
        (WebKit):
        (TypedAPIObject):
        (WebKit::TypedAPIObject::~TypedAPIObject):
        (WebKit::TypedAPIObject::TypedAPIObject):
        * Shared/ImmutableArray.h:
        (ImmutableArray):
        * Shared/ImmutableDictionary.h:
        (ImmutableDictionary):
        * Shared/WebArchive.h:
        (WebArchive):
        * Shared/WebArchiveResource.h:
        (WebArchiveResource):
        * Shared/WebBackForwardListItem.h:
        (WebBackForwardListItem):
        * Shared/WebBatteryStatus.h:
        (WebBatteryStatus):
        * Shared/WebCertificateInfo.h:
        * Shared/WebConnection.h:
        (WebConnection):
        * Shared/WebContextMenuItem.h:
        (WebContextMenuItem):
        * Shared/WebData.h:
        * Shared/WebError.h:
        (WebKit::WebError::errorCode):
        * Shared/WebGeolocationPosition.h:
        (WebGeolocationPosition):
        * Shared/WebGeometry.h:
        * Shared/WebGraphicsContext.h:
        (WebGraphicsContext):
        * Shared/WebHitTestResult.h:
        * Shared/WebImage.h:
        (WebImage):
        * Shared/WebNetworkInfo.h:
        (WebNetworkInfo):
        * Shared/WebNumber.h:
        * Shared/WebOpenPanelParameters.h:
        (WebOpenPanelParameters):
        * Shared/WebRenderLayer.h:
        * Shared/WebRenderObject.h:
        * Shared/WebSecurityOrigin.h:
        * Shared/WebSerializedScriptValue.h:
        (WebSerializedScriptValue):
        * Shared/WebString.h:
        * Shared/WebURL.h:
        * Shared/WebURLRequest.h:
        (WebURLRequest):
        * Shared/WebURLResponse.h:
        (WebURLResponse):
        * Shared/WebUserContentURLPattern.h:
        * Shared/mac/ObjCObjectGraph.h:
        * UIProcess/Authentication/AuthenticationChallengeProxy.h:
        (AuthenticationChallengeProxy):
        * UIProcess/Authentication/AuthenticationDecisionListener.h:
        (AuthenticationDecisionListener):
        * UIProcess/Authentication/WebCredential.h:
        (WebCredential):
        * UIProcess/Authentication/WebProtectionSpace.h:
        (WebProtectionSpace):
        * UIProcess/Downloads/DownloadProxy.h:
        (DownloadProxy):
        * UIProcess/GeolocationPermissionRequestProxy.h:
        (GeolocationPermissionRequestProxy):
        * UIProcess/Notifications/NotificationPermissionRequest.h:
        (NotificationPermissionRequest):
        * UIProcess/Notifications/WebNotification.h:
        (WebNotification):
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
        (WebNotificationManagerProxy):
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
        (WebPluginSiteDataManager):
        * UIProcess/WebApplicationCacheManagerProxy.h:
        (WebApplicationCacheManagerProxy):
        * UIProcess/WebBackForwardList.h:
        (WebBackForwardList):
        * UIProcess/WebBatteryManagerProxy.h:
        (WebBatteryManagerProxy):
        * UIProcess/WebContext.h:
        (WebContext):
        * UIProcess/WebCookieManagerProxy.h:
        (WebCookieManagerProxy):
        * UIProcess/WebDatabaseManagerProxy.h:
        (WebDatabaseManagerProxy):
        * UIProcess/WebEditCommandProxy.h:
        (WebEditCommandProxy):
        * UIProcess/WebFrameProxy.h:
        (WebFrameProxy):
        * UIProcess/WebGeolocationManagerProxy.h:
        (WebGeolocationManagerProxy):
        * UIProcess/WebGrammarDetail.h:
        (WebGrammarDetail):
        * UIProcess/WebIconDatabase.h:
        (WebIconDatabase):
        * UIProcess/WebInspectorProxy.h:
        (WebInspectorProxy):
        * UIProcess/WebKeyValueStorageManagerProxy.h:
        (WebKeyValueStorageManagerProxy):
        * UIProcess/WebMediaCacheManagerProxy.h:
        (WebMediaCacheManagerProxy):
        * UIProcess/WebNavigationData.h:
        (WebNavigationData):
        * UIProcess/WebNetworkInfoManagerProxy.h:
        (WebNetworkInfoManagerProxy):
        * UIProcess/WebOpenPanelResultListenerProxy.h:
        (WebOpenPanelResultListenerProxy):
        * UIProcess/WebPageGroup.h:
        (WebPageGroup):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::WebPreferences):
        * UIProcess/WebPreferences.h:
        (WebPreferences):
        * UIProcess/WebResourceCacheManagerProxy.h:
        (WebResourceCacheManagerProxy):
        * UIProcess/WebTextChecker.h:
        (WebTextChecker):
        * UIProcess/WebVibrationProxy.h:
        (WebVibrationProxy):
        * UIProcess/efl/WebPopupItemEfl.h:
        (WebPopupItemEfl):
        * UIProcess/efl/WebView.h:
        * UIProcess/soup/WebSoupRequestManagerProxy.h:
        (WebSoupRequestManagerProxy):
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
        (InjectedBundleNodeHandle):
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
        (InjectedBundleRangeHandle):
        * WebProcess/InjectedBundle/InjectedBundle.h:
        (InjectedBundle):
        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
        (InjectedBundleDOMWindowExtension):
        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
        (InjectedBundleNavigationAction):
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
        (InjectedBundleScriptWorld):
        * WebProcess/WebPage/PageOverlay.h:
        (PageOverlay):
        * WebProcess/WebPage/WebFrame.h:
        (WebFrame):
        * WebProcess/WebPage/WebInspector.h:
        (WebInspector):
        * WebProcess/WebPage/WebPage.h:
        (WebPage):
        * WebProcess/WebPage/WebPageGroupProxy.h:
        (WebPageGroupProxy):

695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711
2013-04-01  Timothy Hatcher  <timothy@apple.com>

        Allow changing Web Inspector dock sides without undocking first.

        https://webkit.org/b/113661
        rdar://problem/13543127

        Reviewed by Joseph Pecoraro.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::createInspectorPage): Send AttachedBottom and
        AttachedRight messages so InspectorFrontendClientLocal knows which side we
        are attached.

        (WebKit::WebInspectorProxy::canAttach): If we are already attached, allow
        attaching again to allow switching sides.

712 713 714 715 716 717 718
2013-04-01  Anders Carlsson  <andersca@apple.com>

        Nor this! (Who reviewed this anyway!)

        * WebProcess/Storage/StorageNamespaceProxy.cpp:
        (WebKit::StorageNamespaceProxy::storageArea):

719 720 721 722 723 724
2013-04-01  Anders Carlsson  <andersca@apple.com>

        Didn't mean to commit this!

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

725 726 727 728 729 730 731 732 733 734 735 736 737 738
2013-04-01  Alexey Proskuryakov  <ap@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=113721
        <rdar://problem/13549181> REGRESSION (r146929): HTTP auth credentials not reused during session

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Added an override that
        we still need. It's not great, but causes no trouble for NetworkProcess.
        (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Implement in
        terms of sync version to avoid duplicating logic.

739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758
2013-03-05  Anders Carlsson  <andersca@apple.com>

        Apply changes from storage events locally
        https://bugs.webkit.org/show_bug.cgi?id=111502

        Reviewed by Sam Weinig.

        * WebProcess/Storage/StorageAreaProxy.cpp:
        (WebKit::StorageAreaProxy::StorageAreaProxy):
        Store the security origin as a member variable.

        (WebKit::StorageAreaProxy::dispatchStorageEvent):
        Set the item and call the appropriate event dispatch function.
    
        (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
        (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
        Add stubs.

        * WebProcess/Storage/StorageAreaProxy.h:

759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
2013-04-01  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13490123> Sandbox extension tracking is incorrect when restoring a session
        https://bugs.webkit.org/show_bug.cgi?id=113709

        Reviewed by Anders Carlsson.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Added an assertion
        to catch extension tracking logic errors that could result in giving an extension to
        non-local pages.
        (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Just like
        below, clearing m_pendingProvisionalSandboxExtension appears incorrect, even though
        I am not aware of any scenarios where this happens in practice.
        (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): The load may
        be failing exactly because a new one cancels it, so we shouldn't be preventing
        the new one from using its extension.

777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
2013-04-01  Brady Eidson  <beidson@apple.com>

        SharedMemory release build hardening.
        <rdar://problem/13546860> and https://bugs.webkit.org/show_bug.cgi?id=113710

        Reviewed by Anders Carlsson.

        Successful creation of a memory entry with a size less than the size we requested should be treated
        as a failure to create the SharedMemory object.

        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::createFromVMBuffer): Early return if the port we get is bogus for our needs.
        (WebKit::SharedMemory::createHandle): Ditto.
        (WebKit::SharedMemory::create): Guarantee we pass valid input in to mach_vm_map.

792 793 794 795 796 797 798
2013-03-30  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed buildfix after r147260.

        * WebProcess/qt/QtBuiltinBundlePage.cpp:
        (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

799 800 801 802 803 804 805 806 807 808 809 810
2013-03-29  Seokju Kwon  <seokju.kwon@gmail.com>

        [EFL] Unreviewed build fix after r147251
        https://bugs.webkit.org/show_bug.cgi?id=113631

        Unreviewed build fix.

        Add NETWORK_PROCESS guard.

        * UIProcess/WebResourceCacheManagerProxy.cpp:
        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):

811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 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
2013-03-29  Brady Eidson  <beidson@apple.com>

        Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
        <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616

        Reviewed by Alexey Proskuryakov.

        These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
        A RefPtr<> protector fixes that.

        Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
        (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
        (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
          ResourceLoader, and null check it before delivering the "didFinishLoader" call.
        * WebProcess/Network/WebResourceLoader.h:

2013-03-29  Brady Eidson  <beidson@apple.com>

        Should never send events to plugins waiting on asynchronous initialization.
        <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612

        Reviewed by Anders Carlsson.

        Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.

        A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::handleMouseEvent):
        (WebKit::PluginProxy::handleWheelEvent):
        (WebKit::PluginProxy::handleMouseEnterEvent):
        (WebKit::PluginProxy::handleMouseLeaveEvent):
        (WebKit::PluginProxy::handleKeyboardEvent):
        (WebKit::PluginProxy::handleEditingCommand):
        (WebKit::PluginProxy::isEditingCommandEnabled):
        (WebKit::PluginProxy::handlesPageScaleFactor):

2013-03-29  Brady Eidson  <beidson@apple.com>

        Should never send events to plugins waiting on asynchronous initialization.
        <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612

        Reviewed by Anders Carlsson.

        Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.

        A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::handleMouseEvent):
        (WebKit::PluginProxy::handleWheelEvent):
        (WebKit::PluginProxy::handleMouseEnterEvent):
        (WebKit::PluginProxy::handleMouseLeaveEvent):
        (WebKit::PluginProxy::handleKeyboardEvent):
        (WebKit::PluginProxy::handleEditingCommand):
        (WebKit::PluginProxy::isEditingCommandEnabled):
        (WebKit::PluginProxy::handlesPageScaleFactor):

876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897
2013-03-29  Alexey Proskuryakov  <ap@apple.com>

        Expose FeatureObserver data to WebKit clients
        https://bugs.webkit.org/show_bug.cgi?id=113613

        Reviewed by Sam Weinig.

        * Shared/APIClientTraits.cpp:
        * Shared/APIClientTraits.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
        Added a new injected bundle client call, featuresUsedInPage.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::close):
        (WebKit::WebPage::didCommitLoad):
        (WebKit::WebPage::reportUsedFeatures):
        * WebProcess/WebPage/WebPage.h:
        Report features used in a page when navigating away, or when closing.

898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920
2013-03-29  Brady Eidson  <beidson@apple.com>

        Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
        <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616

        Reviewed by Alexey Proskuryakov.

        These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
        A RefPtr<> protector fixes that.

        Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
        (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
        (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
          ResourceLoader, and null check it before delivering the "didFinishLoader" call.
        * WebProcess/Network/WebResourceLoader.h:

921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
2013-03-29  Brady Eidson  <beidson@apple.com>

        Should never send events to plugins waiting on asynchronous initialization.
        <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612

        Reviewed by Anders Carlsson.

        Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly.

        A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return:

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::handleMouseEvent):
        (WebKit::PluginProxy::handleWheelEvent):
        (WebKit::PluginProxy::handleMouseEnterEvent):
        (WebKit::PluginProxy::handleMouseLeaveEvent):
        (WebKit::PluginProxy::handleKeyboardEvent):
        (WebKit::PluginProxy::handleEditingCommand):
        (WebKit::PluginProxy::isEditingCommandEnabled):
        (WebKit::PluginProxy::handlesPageScaleFactor):

942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965
2013-03-29  Brady Eidson  <beidson@apple.com>

        "Empty cache..." clears the disk cache from each WebProcess.
        <rdar://problem/12456652> and https://bugs.webkit.org/show_bug.cgi?id=113603

        Reviewed by Sam Weinig.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::NetworkProcess):
        (WebKit::NetworkProcess::terminate): Override ChildProcess::terminate to allow us to finish clearing the cache.
        * NetworkProcess/NetworkProcess.h:

        * NetworkProcess/NetworkProcess.messages.in: Add the ClearCacheForAllOrigins message.

        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::NetworkProcess::clearCacheForAllOrigins): Clear the disk cache.
        (WebKit::NetworkProcess::platformTerminate): Wait for the clear to complete.

        * UIProcess/WebResourceCacheManagerProxy.cpp:
        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Message the network process, also.

        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::WebProcess::platformClearResourceCaches): Don't clear the disk cache if we use the network process.

966 967 968 969 970 971 972 973 974 975 976
2013-03-28  Brady Eidson  <beidson@apple.com>

        We leak NetworkConnectionToWebProcess objects.
        <rdar://problem/13393118> and https://bugs.webkit.org/show_bug.cgi?id=113551

        Reviewed by Anders Carlsson.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didClose): Remove this from the global set
          of NetworkConnectionToWebProcess objects.

977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003
2013-03-28  Brady Eidson  <beidson@apple.com>

        Resources are never revalidated/reloaded if a cached response exists on disk.
        <rdar://problem/13479890> and https://bugs.webkit.org/show_bug.cgi?id=113542

        Reviewed by Alexey Proskuryakov.

        Trying to get a cached resource in didReceiveResponse and then aborting the load
        meant we never performed any new loads.

        We can check and see if the data is cached data inside didReceiveBuffer, instead.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponse): Don't try for cached resources here.
        (WebKit::NetworkResourceLoader::didReceiveData): This callback should never be used.
        (WebKit::NetworkResourceLoader::didReceiveBuffer): Try to see if this data objected represents
          a file based mmaped buffer.
        * NetworkProcess/NetworkResourceLoader.h:

        Refactor these utility functions to start from either a CFURLCachedResponse or a SharedBuffer:
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (CFCachedURLResponseGetMemMappedData):
        (CFURLCacheIsMemMappedData):
        (WebKit::tryGetShareableHandleFromCFData):
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):

1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018
2013-03-28  Tim Horton  <timothy_horton@apple.com>

        [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
        https://bugs.webkit.org/show_bug.cgi?id=113430
        <rdar://problem/12729564>

        Reviewed by Brady Eidson.

        http://trac.webkit.org/changeset/147152 was wrong, and should have been
        (as the ChangeLog stated) testing the argument to redirectDataToPlugin,
        not the value of m_pluginView.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::redirectDataToPlugin):

1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038
2013-03-28  Tim Horton  <timothy_horton@apple.com>

        [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache
        https://bugs.webkit.org/show_bug.cgi?id=113430
        <rdar://problem/12729564>

        Reviewed by Brady Eidson.

        Ignore redirectDataToPlugin(0), which is only called from PluginDocument::detach(),
        and only after r125500. Otherwise, PluginDocuments that are put into the page cache
        but leave later can clear a totally different and legitimate PluginView from the
        WebFrameLoaderClient, causing data to be lost and PluginDocument loads to stall.

        This restores our behavior to the pre-r125500 state, which should be fine, as we
        clear WebFrameLoaderClient's m_pluginView when the load fails or finishes. This
        matches the changes made in r125500 for every platform other than Chromium and WebKit2.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::redirectDataToPlugin):

1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
2013-03-28  Tim Horton  <timothy_horton@apple.com>

        PDFPlugin: shouldUsePDFPlugin can't use pdfLayerControllerClass() because it asserts if it's not available
        https://bugs.webkit.org/show_bug.cgi?id=113533
        <rdar://problem/13528720>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::shouldUsePDFPlugin):
        Move shouldUsePDFPlugin to WebPageMac, where it belongs, and explicitly look up PDFLayerController
        instead of using pdfLayerControllerClass(), which ASSERT()s if it isn't available.

1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064
2013-03-28  Brady Eidson  <beidson@apple.com>

        Reduce PluginProcess lifetime.
        <rdar://problem/12465479> and https://bugs.webkit.org/show_bug.cgi?id=113523

        Reviewed by Sam Weinig.

        Lower the minimum process lifetime from 30 minutes to 2 minutes.
        Lower the "shutdown after last plugin goes away" period from 10 minutes to 1 minute.

        * UIProcess/Plugins/PluginProcessProxy.cpp:

1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081
2013-03-28  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
        https://bugs.webkit.org/show_bug.cgi?id=112546

        Reviewed by Martin Robinson.

        * GNUmakefile.am: Reference the platform_webcore_cppflags and GTK, libsecret and libsoup dependencies' cflags amongst the
        libPlatformGtk2's CPPFLAGS.
        * Scripts/generate-forwarding-headers.pl: Remove the Platform framework from the list of the frameworks to be searched
        for forwarding headers, it's at the moment not necessary to be included.
        * Shared/gtk/ArgumentCodersGtk.cpp: Adjust the forwarding header for GtkVersioning.h that's been moved back under the
        WebCore framework.
        * Shared/gtk/WebEventFactory.cpp: Ditto.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Ditto.

1082 1083 1084 1085 1086 1087
2013-03-27  Tim Horton  <timothy_horton@apple.com>

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

        * WebProcess/WebPage/WebPage.cpp:

1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
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.

1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
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.

1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
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:

1151 1152 1153 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
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):

1181 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
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.

1209 1210 1211 1212 1213 1214 1215
2013-03-27  Brady Eidson  <beidson@apple.com>

        Blind attempt at fixing the release build.

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

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
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:

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
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:

1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328
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):

1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345
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):

1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367
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:

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-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
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403
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.

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
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.

1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474
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.

1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485
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).

1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503
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):

1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518
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):

1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537
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.

1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553
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):

1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571
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):

1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
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:

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 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
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.

1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682
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:

1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698
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.

1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723
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):

1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738
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.

1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753
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.

1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777
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.

1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788
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:

1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801
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.

1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828
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.

1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875
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):

1876 1877 1878 1879 1880 1881 1882 1883
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):

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 1910 1911
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.

1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923
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.

1924 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 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 1991 1992 1993 1994 1995 1996 1997 1998 1999
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
2000 2001 2002 2003 2004 2005 2006
2013-03-21  Alexey Proskuryakov  <ap@apple.com>

        Build fix.

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

2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
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.

2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043
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):

2044 2045 2046 2047 2048 2049 2050 2051 2052
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.

2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077
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):

2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142
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):

2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202
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.

2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217
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.

2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234
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):

2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262
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):

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 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 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 2393 2394 2395
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.

2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 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 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
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):

2475 2476 2477 2478 2479 2480 2481 2482 2483 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 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535