ChangeLog 895 KB
Newer Older
1 2 3 4 5 6 7 8 9
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add ArgumentCoder specialization for WTF::CString
        https://bugs.webkit.org/show_bug.cgi?id=48796

        * Platform/CoreIPC/ArgumentCoders.h:

andersca@apple.com's avatar
andersca@apple.com committed
10 11 12 13 14 15
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * WebKit2.xcodeproj/project.pbxproj:

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add NPObjectMessageReceiver.messages.in
        https://bugs.webkit.org/show_bug.cgi?id=48782

        * DerivedSources.make:
        Add NPObjectMessageReceiver.

        * Platform/CoreIPC/MessageID.h:
        Add MessageClassNPObjectMessageReceiver message class.

        * Shared/Plugins/NPObjectMessageReceiver.cpp:
        (WebKit::NPObjectMessageReceiver::deallocate):
        Add stubbed out deallocate member function.

        * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added.

        * WebKit2.xcodeproj/project.pbxproj:
        Add NPObjectMessageReceiver.messages.in.

38 39 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Start stubbing out NPClass functions in NPObjectProxy
        https://bugs.webkit.org/show_bug.cgi?id=48778

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::windowScriptNPObject):
        getOrCreateNPObjectProxy is now createNPObjectProxy.

        * Shared/Plugins/NPObjectProxy.cpp:
        (WebKit::NPObjectProxy::create):
        Allocate and initialize an NPObjectProxy object.

        (WebKit::NPObjectProxy::NPObjectProxy):
        Initialize m_npObjectID to 0.

        (WebKit::NPObjectProxy::isNPObjectProxy):
        Check the class.

        (WebKit::NPObjectProxy::initialize):
        Set m_npObjectID.

        (WebKit::NPObjectProxy::npClass):
        Return the NPClass with all functions filled in.

        (WebKit::NPObjectProxy::NP_Allocate):
        Create a new NPObjectProxy object.

        (WebKit::NPObjectProxy::NP_Deallocate):
        Deallocate the NPObjectProxy object.

        (WebKit::NPObjectProxy::NP_HasMethod):
        (WebKit::NPObjectProxy::NP_Invoke):
        (WebKit::NPObjectProxy::NP_InvokeDefault):
        (WebKit::NPObjectProxy::NP_HasProperty):
        (WebKit::NPObjectProxy::NP_GetProperty):
        (WebKit::NPObjectProxy::NP_SetProperty):
        (WebKit::NPObjectProxy::NP_RemoveProperty):
        (WebKit::NPObjectProxy::NP_Enumerate):
        (WebKit::NPObjectProxy::NP_Construct):
        Add stubs.

        * Shared/Plugins/NPRemoteObjectMap.cpp:
        (WebKit::NPRemoteObjectMap::createNPObjectProxy):
        * Shared/Plugins/NPRemoteObjectMap.h:
        Rename getOrCreateNPObjectProxy to createNPObjectProxy.

        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
        (WebKit::NPJSObject::NP_Allocate):
        Remove unused parameter.

91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Both the WebProcessConnection and PluginProcessConnection should have NPRemoteObjectMaps
        https://bugs.webkit.org/show_bug.cgi?id=48775

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::windowScriptNPObject):
        Ask for an NPObjectProxy for the window script NPObject.

        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::WebProcessConnection):
        Initialize m_npRemoteObjectMap.

        * Shared/Plugins/NPObjectMessageReceiver.cpp:
        (WebKit::NPObjectMessageReceiver::create):
        Add a create member function that takes an NPObject.

        (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
        Retain the NPObject.

        (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
        Release the NPObject.

        * Shared/Plugins/NPRemoteObjectMap.cpp:
        (WebKit::generateNPObjectID):
        Generate a unique 64-bit NPObject ID.

        (WebKit::NPRemoteObjectMap::getOrCreateNPObjectProxy):
        Add stub.

        (WebKit::NPRemoteObjectMap::registerNPObject):
        Create a NPObjectMessageReceiver and add it to the map.

        * WebKit2.xcodeproj/project.pbxproj:
        Set the correct target for NPRuntime related files.

        * WebProcess/Plugins/PluginProcessConnection.cpp:
        (WebKit::PluginProcessConnection::PluginProcessConnection):
        Initialize m_npRemoteObjectMap

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::getWindowScriptNPObject):
        Ask the real plug-in controller for the window script NPObject and register it.

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
2010-11-01  John Sullivan  <sullivan@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=48774
        minimFontSize preference needs to be exposed in WebKit2

        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::setMinimumFontSize):
        New function, parallel to existing functions for other preferences.
        (WebKit::WebPreferences::minimumFontSize):
        Ditto.

        * UIProcess/WebPreferences.h:
        Declared new function.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMinimumFontSize):
        New UI process wrapper for new function.
        (WKPreferencesGetMinimumFontSize):
        Ditto.

        * UIProcess/API/C/WKPreferences.h:
        Declared new functions.

162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
2010-11-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        Tear down the related WebProcessProxy when a WebContext is deallocated
        https://bugs.webkit.org/show_bug.cgi?id=48769

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::~WebContext):
        Call WebProcessManager::contextWasDestroyed.

        (WebKit::WebContext::didNavigateWithNavigationData):
        (WebKit::WebContext::didPerformClientRedirect):
        (WebKit::WebContext::didPerformServerRedirect):
        (WebKit::WebContext::didUpdateHistoryTitle):
        It is valid for a frame to have a null page here, if the frame has outlived
        its page.

        * UIProcess/WebProcessManager.cpp:
        (WebKit::WebProcessManager::contextWasDestroyed):
        Remove the context from the map.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::~WebProcessProxy):
        It's OK for the connection to be non-null here if the process goes away because
        the context has been deallocated.

beidson@apple.com's avatar
beidson@apple.com committed
189 190 191 192 193 194
2010-11-01  Brady Eidson  <beidson@apple.com>

        Windows build fix.

        * UIProcess/win/WebView.cpp:

195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
2010-11-01  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders Carlsson.

        <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
        Context menu support for WebKit 2.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:

        * Shared/WebContextMenuItem.cpp: Added.
        (WebKit::WebContextMenuItem::WebContextMenuItem):
        (WebKit::WebContextMenuItem::encode):
        (WebKit::WebContextMenuItem::decode):
        (WebKit::kitItems):
        * Shared/WebContextMenuItem.h: Added.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::createContextMenuProxy):
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::createContextMenuProxy): Stub to keep the build working.
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:

        * UIProcess/WebContextMenuProxy.cpp: Added.
        (WebKit::WebContextMenuProxy::~WebContextMenuProxy):
        (WebKit::WebContextMenuProxy::WebContextMenuProxy):
        * UIProcess/WebContextMenuProxy.h: Added.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::showContextMenu): Shows the menu after receiving the message from the WebProcess.
        (WebKit::WebPageProxy::contextMenuItemSelected): Sends info about the selected menu item to the WebProcess
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * UIProcess/mac/WebContextMenuProxyMac.h: Added.
        (WebKit::WebContextMenuProxyMac::create):
        * UIProcess/mac/WebContextMenuProxyMac.mm: Added.
        (+[WebMenuTarget sharedMenuTarget]):
        (-[WebMenuTarget WebKit::]):
        (-[WebMenuTarget setMenuProxy:WebKit::]):
        (-[WebMenuTarget forwardContextMenuAction:]):
        (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
        (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
        (WebKit::populateNSMenu):
        (WebKit::nsMenuItemVector):
        (WebKit::WebContextMenuProxyMac::populate):
        (WebKit::WebContextMenuProxyMac::showContextMenu):
        (WebKit::WebContextMenuProxyMac::hideContextMenu):

        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::createContextMenuProxy): Stub for now.
        * UIProcess/win/WebView.h:

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::showContextMenu):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Return the WebCore-provided default
          menu for now. Embedding app customization will come later (see bug 48720)

        * WebProcess/WebPage/WebContextMenu.cpp: Added.
        (WebKit::WebContextMenu::WebContextMenu):
        (WebKit::WebContextMenu::~WebContextMenu):
        (WebKit::WebContextMenu::show):
        (WebKit::WebContextMenu::itemSelected):
        * WebProcess/WebPage/WebContextMenu.h: Added.
        (WebKit::WebContextMenu::create):

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::contextMenu):
        (WebKit::handleMouseEvent): Pass right mouse presses along to WebCore as both a mouse event and context menu event, 
          the same way WebKit1 does.
        (WebKit::WebPage::didSelectItemFromActiveContextMenu):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
2010-11-01  Adam Roben  <aroben@apple.com>

        Cancel main resource loads after we hand them off to the media engine

        This is the WebKit2 equivalent of r51104. Clearly this code should be
        moved to a cross-platform location someday.

        Fixes <http://webkit.org/b/48561> <rdar://problem/8606679> Assertion
        failure in DocumentLoader::commitData when loading a media document in
        WebKit2

        Reviewed by Eric Carlson.

        * WebProcess/WebCoreSupport/WebErrors.h: Added pluginWillHandleLoadError.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::committedLoad): Cancel the main resource load
        after handing off the load to the media engine. This code originally
        came from -[WebHTMLRepresentation receivedData:withDataSource:].
        (WebKit::WebFrameLoaderClient::pluginWillHandleLoadError): Call through to WebErrors.
        (WebKit::WebFrameLoaderClient::shouldFallBack): Implemented. We fall
        back for all errors except when the load was cancelled or we handed it
        off to the media engine or a plugin.

        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        (WebKit::pluginWillHandleLoadError): Implemented.

        * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
        (WebKit::pluginWillHandleLoadError): Stubbed out.

        * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
        (WebKit::pluginWillHandleLoadError): Implemented.

309 310 311 312 313 314 315 316 317 318 319 320
2010-11-01  Andreas Kling  <kling@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Cleanup viewportAttributesForSize API

        Change QSize argument to a const QSize&.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::viewportAttributesForSize):
        * UIProcess/API/qt/qwkpage.h:

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 349 350 351
2010-10-31  Darin Adler  <darin@apple.com>

        Reviewed by Dan Bernstein.

        Visited links not populated correctly in new web processes after the first
        https://bugs.webkit.org/show_bug.cgi?id=48735
        rdar://problem/8442177

        * UIProcess/VisitedLinkProvider.cpp:
        (WebKit::VisitedLinkProvider::VisitedLinkProvider): Initialize
        m_webProcessHasVisitedLinkState.
        (WebKit::VisitedLinkProvider::processDidFinishLaunching): Renamed
        from populateVisitedLinksIfNeeded. Set m_webProcessHasVisitedLinkState
        to false, since this is a new process, and also start the timer
        so the visited links messages will be sent.
        (WebKit::VisitedLinkProvider::processDidClose): Renamed from
        stopVisitedLinksTimer.
        (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
        Added logic so we send SetVisitedLinkTable and
        AllVisitedLinkStateChanged once to each new process and to set
        m_webProcessHasVisitedLinkState to true once that is done.

        * UIProcess/VisitedLinkProvider.h: Updated for above changes.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::processDidFinishLaunching): Called
        VisitedLinkProvider function under its new name. Also used
        ASSERT_UNUSED rather than ASSERT since the argument is used
        only for the assertion.
        (WebKit::WebContext::processDidClose): Ditto.

352 353 354 355 356 357 358 359 360 361 362 363 364 365
2010-10-30  Andreas Kling  <kling@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Crash in drawUpdateChunkIntoBackingStore
        https://bugs.webkit.org/show_bug.cgi?id=48707

        UpdateChunk images have to be created using the QImage constructor
        that takes a bytesPerLine (stride) value, or the data length won't
        match UpdateChunk::size().

        * Shared/qt/UpdateChunk.cpp:
        (WebKit::UpdateChunk::createImage):

366 367 368 369 370 371 372 373 374 375 376 377 378 379
2010-10-29  Daniel Bates  <dbates@rim.com>

        No review, rolling out 70971.
        http://trac.webkit.org/changeset/70971
        https://bugs.webkit.org/show_bug.cgi?id=6751

        Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
        it caused layout test failures on all bots. In particular, the
        child count in a generated frame name differs after this patch. We need
        to look into this further.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::name):

380 381 382 383 384 385 386 387 388 389 390 391
2010-10-29  Daniel Bates  <dbates@rim.com>

        Reviewed by Adam Barth.

        For unnamed frames, window.name returns a generated name
        https://bugs.webkit.org/show_bug.cgi?id=6751

        Modified WebKit2 to use FrameTree::uniqueName().

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::name):

392 393 394 395 396 397 398 399 400 401 402 403 404 405
2010-10-29  Sam Weinig  <weinig@apple.com>

        Reviewed by Simon Fraser.

        Implement WebProcess::platformSetCacheModel for windows
        <rdar://problem/8605796>
        https://bugs.webkit.org/show_bug.cgi?id=48703

        * WebProcess/win/WebProcessWin.cpp:
        (WebKit::memorySize):
        (WebKit::volumeFreeSize):
        (WebKit::WebProcess::platformSetCacheModel):
        Add implemenation based on the version in WebKit/win/WebView.cpp.

406 407 408 409 410 411 412 413 414
2010-10-29  Andreas Kling  <kling@webkit.org>

        Reviewed by Anders Carlsson.

        WK2: Unbreak compilation of WebPlatformTouchPoint::decode()

        * Shared/WebPlatformTouchPoint.cpp:
        (WebKit::WebPlatformTouchPoint::decode):

415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
2010-10-29  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        More back/forward refactoring

        * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
        * WebKit2.xcodeproj/project.pbxproj: Ditto.

        * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
        * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.

        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
        (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
        (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
        (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
        (WebKit::InjectedBundleBackForwardList::clear): Ditto.

        * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage): Set up backForwardClient.

438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
2010-10-29  Adam Roben  <aroben@apple.com>

        Stop using encode/decodeBytes for WebEvent subclasses

        The use of encode/decodeBytes was making these classes sensitive to
        differences in padding on different architectures (e.g., 32-bit vs.
        64-bit). By encoding each data member explicitly we remove this
        sensitivity, allowing these classes to be passed between processes
        with different padding.

        Fixes <http://webkit.org/b/48552> <rdar://problem/8606571> Mouse
        events never reach Flash in WebKit2 on Mac (asserts in Debug builds)

        Reviewed by Anders Carlsson.

        * Platform/CoreIPC/Arguments.h:
        (CoreIPC::Arguments8::Arguments8):
        (CoreIPC::Arguments8::encode):
        (CoreIPC::Arguments8::decode):
        (CoreIPC::In):
        (CoreIPC::Out):
        Added Arguments8, the biggest Arguments yet.

        * Shared/WebEvent.cpp:
        (WebKit::WebEvent::encode):
        (WebKit::WebEvent::decode):
        * Shared/WebKeyboardEvent.cpp:
        (WebKit::WebKeyboardEvent::encode):
        (WebKit::WebKeyboardEvent::decode):
        * Shared/WebMouseEvent.cpp:
        (WebKit::WebMouseEvent::encode):
        (WebKit::WebMouseEvent::decode):
        * Shared/WebPlatformTouchPoint.cpp:
        (WebKit::WebPlatformTouchPoint::encode):
        (WebKit::WebPlatformTouchPoint::decode):
        * Shared/WebTouchEvent.cpp:
        (WebKit::WebTouchEvent::encode):
        (WebKit::WebTouchEvent::decode):
        * Shared/WebWheelEvent.cpp:
        (WebKit::WebWheelEvent::encode):
        (WebKit::WebWheelEvent::decode):
        Changed all encode/decode function to use CoreIPC::In/Out to
        encode/decode data members individually.

482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
2010-10-29  Adam Roben  <aroben@apple.com>

        Use only CoreIPC-sanctioned types in WebEvent subclasses

        Fixes <http://webkit.org//48694> WebEvent subclasses should not use
        architecture-dependent types

        Reviewed by Anders Carlsson.

        * Shared/WebEvent.h:
        (WebKit::WebEvent::type):
        (WebKit::WebMouseEvent::button):
        (WebKit::WebMouseEvent::clickCount):
        (WebKit::WebWheelEvent::granularity):
        (WebKit::WebPlatformTouchPoint::id):
        (WebKit::WebPlatformTouchPoint::state):
        Replaced enums, ints, and unsigneds with uint32_ts, int32_ts, and
        uint32_ts, respectively.

501 502 503 504 505 506 507 508 509 510 511 512 513 514
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Generate a DelayedReply struct for sync messages marked delayed
        https://bugs.webkit.org/show_bug.cgi?id=48696

        * Scripts/webkit2/messages.py:
        If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
        that can be used for sending the reply.

        * Scripts/webkit2/messages_unittest.py:
        Update expected results.

515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Use WebPage::send in a couple of more places.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::setWindowRect):
        (WebKit::WebChromeClient::takeFocus):
        (WebKit::WebChromeClient::setToolbarsVisible):
        (WebKit::WebChromeClient::setStatusbarVisible):
        (WebKit::WebChromeClient::setMenubarVisible):
        (WebKit::WebChromeClient::setResizable):
        (WebKit::WebChromeClient::setStatusbarText):
        (WebKit::WebChromeClient::contentsSizeChanged):
        (WebKit::WebChromeClient::mouseDidMoveOverElement):
        (WebKit::WebChromeClient::setToolTip):
        (WebKit::WebChromeClient::setCursor):
        (WebKit::WebChromeClient::dispatchViewportDataDidChange):
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::registerCommandForUndo):
        (WebKit::WebEditorClient::clearUndoRedoOperations):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::detachedFromParent2):
        (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
        (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
        (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
        (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
        (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
        (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
        (WebKit::WebFrameLoaderClient::didRunInsecureContent):
        (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::findString):
        (WebKit::FindController::hideFindIndicator):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::WebBackForwardListProxy::addItem):
        (WebKit::WebBackForwardListProxy::goToItem):
        (WebKit::WebBackForwardListProxy::clear):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::createMainFrame):
        (WebKit::WebFrame::createSubframe):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::sendClose):
        (WebKit::WebPage::pageDidScroll):
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::wheelEvent):
        (WebKit::WebPage::keyEvent):
        (WebKit::WebPage::validateMenuItem):
        (WebKit::WebPage::touchEvent):
        (WebKit::WebPage::show):
        (WebKit::WebPage::runJavaScriptInMainFrame):
        (WebKit::WebPage::getRenderTreeExternalRepresentation):
        (WebKit::WebPage::getSourceForFrame):

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
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add a MessageSender class template
        https://bugs.webkit.org/show_bug.cgi?id=48683

        * Platform/CoreIPC/MessageSender.h: Added.
        (CoreIPC::MessageSender::send):
        Add send overloads for simple message sending.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        Add MessageSender.h

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::countStringMatches):
        (WebKit::FindController::findString):
        (WebKit::FindController::updateFindIndicator):
        Call send on the web page.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::connection):
        Add connection(), used by the MessageSender.
        
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::destinationID):
        Add destinationID(), used by the MessageSender.

        * win/WebKit2.vcproj:
        Add MessageSender.h

614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
2010-10-29  Adam Roben  <aroben@apple.com>

        Remove redundant data members from WebTouchEvent

        WebEvent already stores the Type and timestamp.

        Fixes <http://webkit.org/b/48671> WebTouchEvent duplicates data from
        WebEvent

        Reviewed by Anders Carlsson.

        * Shared/WebEvent.h:
        * Shared/WebTouchEvent.cpp:
        (WebKit::WebTouchEvent::WebTouchEvent):
        Removed m_type and m_timestamp (which was never even getting
        initialized!).

631 632 633 634 635 636 637 638 639 640
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add the plug-in proxy to the map before sending the CreatePlugin message
        https://bugs.webkit.org/show_bug.cgi?id=48678

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::initialize):

641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add GetWindowScriptNPObject message
        https://bugs.webkit.org/show_bug.cgi?id=48670

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::windowScriptNPObject):
        Send the GetWindowScriptNPObject message.

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::getWindowScriptNPObject):
        Add stub.

        * WebProcess/Plugins/PluginProxy.messages.in:
        Add GetWindowScriptNPObject message.

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 695 696 697 698 699 700 701 702 703 704 705 706 707
2010-10-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Change the Connection::sendSync timeout parameter to have the NoTimeout argument as a default
        argument and update all the call sites.

        * Platform/CoreIPC/Connection.h:
        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::proxiesForURL):
        (WebKit::PluginControllerProxy::cookiesForURL):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::postSynchronousMessage):
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::initialize):
        (WebKit::PluginProxy::destroy):
        (WebKit::PluginProxy::paint):
        (WebKit::PluginProxy::handleMouseEvent):
        (WebKit::PluginProxy::handleWheelEvent):
        (WebKit::PluginProxy::handleMouseEnterEvent):
        (WebKit::PluginProxy::handleMouseLeaveEvent):
        (WebKit::PluginProxy::handleKeyboardEvent):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::windowRect):
        (WebKit::WebChromeClient::createWindow):
        (WebKit::WebChromeClient::toolbarsVisible):
        (WebKit::WebChromeClient::statusbarVisible):
        (WebKit::WebChromeClient::menubarVisible):
        (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::populatePluginCache):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::WebBackForwardListProxy::itemAtIndex):
        (WebKit::WebBackForwardListProxy::backListCount):
        (WebKit::WebBackForwardListProxy::forwardListCount):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):
        (WebKit::WebPage::changeAcceleratedCompositingMode):
        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
        (WebKit::LayerBackedDrawingArea::attachCompositingContext):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::interceptEditingKeyboardEvent):

708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
2010-10-29  John Sullivan  <sullivan@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=48666
        WebKit2 should provide counterpart getter to WKBundleNodeHandleSetHTMLInputElementAutofilled

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleGetHTMLInputElementAutofilled):
        New function, calls through to InjectedBundleNodeHandle.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        Declared new function.

        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
        New function, calls through to HTMLInputElement.

        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
        Declared new function.

729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748
2010-10-29  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Anders Carlsson.

        ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed before it can send
        the DidCreateMainFrame messsage to the UIProcess.
        https://bugs.webkit.org/show_bug.cgi?id=48654

        WebProcessProxy::frameDestroyed was asserting that the frameID it was called with was
        registered in WebProcessProxy::frameCreated (which is called when the WebPageProxy is
        created). However, in the case where we close the page before it's had the chance to send
        the DidCreateMainFrame message back to the UI process, the UI Process will get the
        DidDestroyFrame message because it's sent directly to the WebProcessProxy and doesn't go
        through WebPageProxy.

        Remove the assert because it is invalid in this case.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::frameDestroyed):

749 750 751 752 753 754 755
2010-10-29  Adam Roben  <aroben@apple.com>

        Build fix when Carbon plugins are disabled

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::platformHandleMouseEvent):

756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779
2010-10-29  Adam Roben  <aroben@apple.com>

        Move NPRuntime-related files into WebProcess/Plugins/Netscape

        Fixes <http://webkit.org/b/48645>.

        Reviewed by Anders Carlsson.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        Updated the files' paths.

        * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.cpp.
        * WebProcess/Plugins/Netscape/JSNPMethod.h: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.h.
        * WebProcess/Plugins/Netscape/JSNPObject.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.cpp.
        * WebProcess/Plugins/Netscape/JSNPObject.h: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.h.
        * WebProcess/Plugins/Netscape/NPJSObject.cpp: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.cpp.
        * WebProcess/Plugins/Netscape/NPJSObject.h: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.h.
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp.
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h.
        * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.cpp.
        * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.h.

ap@apple.com's avatar
ap@apple.com committed
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807
2010-10-29  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=48576
        Let WebKit2 client know when a frame is a frameset

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::WebFrameProxy):
        * UIProcess/WebFrameProxy.h:
        (WebKit::WebFrameProxy::setIsFrameSet):
        (WebKit::WebFrameProxy::isFrameSet):
        Remember whether the frame is currently a frameset.

        * UIProcess/API/C/WKFrame.cpp: (WKFrameIsFrameSet):
        * UIProcess/API/C/WKFrame.h:
        Added client API.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame):
        (WebKit::WebPageProxy::frameDidBecomeFrameSet):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        Pass notification from web process to UI process.

808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832
2010-10-28  Adam Roben  <aroben@apple.com>

        Use IntPoint/FloatSize in WebEvent subclasses

        This is nicer than passing around pairs of ints/floats.

        Fixes <http://webkit.org/b/48611>.

        Reviewed by Anders Carlsson.

        * Shared/WebEvent.h:
        * Shared/WebMouseEvent.cpp:
        * Shared/WebPlatformTouchPoint.cpp:
        * Shared/WebWheelEvent.cpp:
        Changed all x/y pairs to either use IntPoint or FloatSize, as
        appropriate.

        * Shared/WebEventConversion.cpp:
        * Shared/mac/WebEventFactory.mm:
        * Shared/qt/WebEventFactoryQt.cpp:
        * Shared/win/WebEventFactory.cpp:
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
        Updated for WebEvent changes.

833 834 835 836 837 838
2010-10-29  Adam Roben  <aroben@apple.com>

        Touch WebKit2Prefix.h to fix incremental builds on Windows

        * WebKit2Prefix.h:

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 876 877 878
2010-10-28  Adam Roben  <aroben@apple.com>

        Remove unnecessary #includes from WebEvent.h

        Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
        doesn't need

        Reviewed by Sam Weinig.

        * Scripts/webkit2/messages.py:
        (MessageReceiver.iterparameters): Merged iterreplyparameters into this
        function. All callers to iterparameters are really interested in the
        reply parameters, too. This will cause us to, e.g., add
        forward-declarations for types used in sync replies.
        (headers_for_type): Added a special case for WebCore::KeypressCommand.

        * Scripts/webkit2/messages_unittest.py: Added a test to cover the
        failing case that inspired the above changes.

        * Shared/WebEvent.h: Replaced #includes with forward-declarations.

        * Shared/API/c/WKSharedAPICast.h:
        * Shared/NativeWebKeyboardEvent.h:
        * Shared/WebEvent.cpp:
        * Shared/WebKeyboardEvent.cpp:
        * Shared/WebMouseEvent.cpp:
        * Shared/WebPlatformTouchPoint.cpp:
        * Shared/WebTouchEvent.cpp:
        * Shared/WebWheelEvent.cpp:
        * Shared/qt/WebEventFactoryQt.cpp:
        * Shared/win/WebEventFactory.cpp:
        * UIProcess/API/qt/qwkpage.cpp:
        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
        * UIProcess/WebUIClient.cpp:
        * UIProcess/WebUIClient.h:
        * UIProcess/win/WebView.cpp:
        * WebProcess/WebPage/FindController.cpp:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        Added now-needed #includes and declarations.

879 880 881 882 883 884 885 886 887
2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>

        Reviewed by Adam Roben and David Kilzer.

        Fix and cleanup of build systems
        https://bugs.webkit.org/show_bug.cgi?id=48342

        * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX and add missing features.

mitz@apple.com's avatar
mitz@apple.com committed
888 889 890 891 892 893 894
2010-10-28  Dan Bernstein  <mitz@apple.com>

        LLVM compiler build fix

        * WebProcess/Downloads/mac/DownloadMac.mm:
        (-[WKDownloadAsDelegate download:didReceiveResponse:]): Removed a stray semicolon.

895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921
2010-10-28  Adam Roben  <aroben@apple.com>

        Move some function definitions from WebEvent.h into new .cpp files

        Someday maybe we'll split the classes into their own header files,
        too.

        Fixes <http://webkit.org/b/48604>.

        Reviewed by Anders Carlsson.

        * Shared/WebEvent.h: Moved code from here...

        * Shared/WebEvent.cpp: Added.
        * Shared/WebKeyboardEvent.cpp: Added.
        * Shared/WebMouseEvent.cpp: Added.
        * Shared/WebPlatformTouchPoint.cpp: Added.
        * Shared/WebTouchEvent.cpp: Added.
        * Shared/WebWheelEvent.cpp: Added.
        ...to here. Also changed WebTouchEvent::touchPoints not to copy the
        Vector.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        Added the new files.

922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942
2010-10-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Connection::sendSyncMessage needs to dispatch incoming sync messages
        https://bugs.webkit.org/show_bug.cgi?id=48606

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::sendSyncMessage):
        Protect the connection when waiting for a reply. Schedule for any remaining incoming sync messages
        to be sent once the bottom-most waitForSyncReply calls returns.

        (CoreIPC::Connection::waitForSyncReply):
        Make sure to dispatch any incoming sync messages.

        (CoreIPC::Connection::processIncomingMessage):
        If the incoming message is a sync message and we're waiting for a sync reply, add the message to the
        queue of "sync messages received while waiting for sync reply" and wake up the client thread.

        * Platform/CoreIPC/Connection.h:

943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958
2010-10-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Move code to dispatch a sync message out into a separate function
        https://bugs.webkit.org/show_bug.cgi?id=48605

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::dispatchSyncMessage):
        Factor code out from dispatchMessage. Handle receiving a message with an invalid reply ID.

        (CoreIPC::Connection::dispatchMessages):
        Call dispatchSyncMessage.

        * Platform/CoreIPC/Connection.h:

959 960 961 962 963 964 965 966 967 968 969 970 971
2010-10-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Add NPObjectMessageReceiver class.
        https://bugs.webkit.org/show_bug.cgi?id=48599

        * Shared/Plugins/NPObjectMessageReceiver.cpp: Added.
        (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
        (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
        * Shared/Plugins/NPObjectMessageReceiver.h: Added.
        * WebKit2.xcodeproj/project.pbxproj:

andersca@apple.com's avatar
andersca@apple.com committed
972 973 974 975 976 977 978 979 980 981 982 983 984
2010-10-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add NPObjectProxy class
        https://bugs.webkit.org/show_bug.cgi?id=48558

        * Shared/Plugins/NPObjectProxy.cpp: Added.
        (WebKit::NPObjectProxy::NPObjectProxy):
        (WebKit::NPObjectProxy::~NPObjectProxy):
        * Shared/Plugins/NPObjectProxy.h: Added.
        * WebKit2.xcodeproj/project.pbxproj:

985 986 987 988 989 990 991 992 993 994 995 996
2010-10-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add NPRemoteObjectMap class
        https://bugs.webkit.org/show_bug.cgi?id=48553

        * Shared/Plugins/NPRemoteObjectMap.cpp: Added.
        (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
        * Shared/Plugins/NPRemoteObjectMap.h: Added.
        * WebKit2.xcodeproj/project.pbxproj:

997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
2010-10-28  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        WKURLRefs should be allowed to be null
        <rdar://problem/8575621>
        https://bugs.webkit.org/show_bug.cgi?id=48535

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toURLRef):
        (WebKit::toCopiedURLAPI):
        Turn a null WTF::String into a null WKURLRef.

1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049
2010-10-28  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Add WebKit2 API for window feature getter/setters
        <rdar://problem/8590373>
        https://bugs.webkit.org/show_bug.cgi?id=48496

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setToolbarsAreVisible):
        (WebKit::WebPageProxy::getToolbarsAreVisible):
        (WebKit::WebPageProxy::setMenuBarIsVisible):
        (WebKit::WebPageProxy::getMenuBarIsVisible):
        (WebKit::WebPageProxy::setStatusBarIsVisible):
        (WebKit::WebPageProxy::getStatusBarIsVisible):
        (WebKit::WebPageProxy::setIsResizable):
        (WebKit::WebPageProxy::getIsResizable):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::toolbarsAreVisible):
        (WebKit::WebUIClient::setToolbarsAreVisible):
        (WebKit::WebUIClient::menuBarIsVisible):
        (WebKit::WebUIClient::setMenuBarIsVisible):
        (WebKit::WebUIClient::statusBarIsVisible):
        (WebKit::WebUIClient::setStatusBarIsVisible):
        (WebKit::WebUIClient::isResizable):
        (WebKit::WebUIClient::setIsResizable):
        * UIProcess/WebUIClient.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::setToolbarsVisible):
        (WebKit::WebChromeClient::toolbarsVisible):
        (WebKit::WebChromeClient::setStatusbarVisible):
        (WebKit::WebChromeClient::statusbarVisible):
        (WebKit::WebChromeClient::setMenubarVisible):
        (WebKit::WebChromeClient::menubarVisible):
        (WebKit::WebChromeClient::setResizable):
        Plumb through the calls.

mitz@apple.com's avatar
mitz@apple.com committed
1050 1051 1052 1053 1054 1055
2010-10-28  Dan Bernstein  <mitz@apple.com>

        Build fix.

        * win/WebKit2Common.vsprops:

mitz@apple.com's avatar
mitz@apple.com committed
1056 1057 1058 1059 1060 1061 1062 1063 1064
2010-10-28  Dan Bernstein  <mitz@apple.com>

        Reviewed by Adam Roben.

        No longer soft-link zlib
        https://bugs.webkit.org/show_bug.cgi?id=48004

        * win/WebKit2Common.vsprops: Added zlib.lib to AdditionalDependencies.

1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090
2010-10-28  Adam Roben  <aroben@apple.com>

        Make PluginView retain its HTMLPlugInElement

        This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
        this, but had a very different mechanism for implementing NPRuntime
        that didn't require it.

        Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
        (preceded by assertion) in Node::document when running
        plugins/document-open.html in WebKit2 on Windows

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::create): Moved here from the header file so that
        clients of the header file won't have to pull in HTMLPlugInElement.h.
        Changed to take a PassRefPtr<HTMLPlugInElement>.
        (WebKit::PluginView::PluginView): Changed to take a
        PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
        the parameter to the function will be nulled-out after assigning into
        m_pluginElement).
        (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.

        * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.

1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
2010-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Andreas Kling.

        Make Qt viewportAttributesForSize not assert on (0, 0) size
        https://bugs.webkit.org/show_bug.cgi?id=48524

        We now return an invalid (isValid() == false) ViewportAttributes
        instance when the supplied size is (0, 0).

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::viewportAttributesForSize):

1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114
2010-10-28  Balazs Kelemen  <kbalazs@webkit.org>

        Reviewed by Andreas Kling.

        [Qt][WK2] SharedMemory should be released by the receiving process
        https://bugs.webkit.org/show_bug.cgi?id=48520

        * Platform/qt/SharedMemoryQt.cpp:
        (WebKit::SharedMemory::~SharedMemory):
        (WebKit::SharedMemory::createHandle):

1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132
2010-10-28  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

         Reviewed by Kenneth Rohde Christiansen.

         [Qt] Web process cannot be debugged if it crashes in initialization
         https://bugs.webkit.org/show_bug.cgi?id=47399

         Wait 3 seconds for the debugger on debug mode if
         WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set.

         The debugging can be initiated for example in following way:
          export WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH=1
          ./MiniBrowser & while [ -z `pidof QtWebProcess` ]; do sleep 1; done; \
           gdb --pid=`pidof QtWebProcess`

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

mrowe@apple.com's avatar
mrowe@apple.com committed
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
2010-10-28  Mark Rowe  <mrowe@apple.com>

        32-bit build fix.

        Qualify references to Rect to avoid ambiguity between WebCore::Rect and Carbon's Rect.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::platformPostInitialize):
        (WebKit::NetscapePlugin::windowFrameChanged):

1143 1144 1145 1146 1147 1148 1149 1150 1151 1152
2010-10-28  Ivan Krstić  <ike@apple.com>

        Reviewed by Mark Rowe.

        Remove unused experimental proxied panel interface.
        <rdar://problem/7237059>

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

mrowe@apple.com's avatar
mrowe@apple.com committed
1153 1154 1155 1156 1157 1158
2010-10-27  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * UIProcess/API/mac/PageClientImpl.mm: Reference the file using the correct case.

1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189
2010-10-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Find indicators do not bounce
        https://bugs.webkit.org/show_bug.cgi?id=48490
        <rdar://problem/8564276>

        * UIProcess/API/mac/FindIndicatorWindow.h:
        * UIProcess/API/mac/FindIndicatorWindow.mm:
        (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
        Add an animationDuration parameter.
        
        (WebKit::FindIndicatorWindow::FindIndicatorWindow):
        Initialize m_bounceAnimationContext.

        (WebKit::FindIndicatorWindow::setFindIndicator):
        Create a bounce animation and start it.

        (WebKit::FindIndicatorWindow::closeWindow):
        Stop the bounce animation and destroy the bounce animation context.

        (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
        pass the fade out duration.

        (WebKit::FindIndicatorWindow::bounceAnimationCallback):
        Set the bounce animation progress.

        (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
        Destroy the bounce animation context.

1190 1191 1192 1193 1194
2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Andreas Kling.

        Remove the reference to the pageNamespace in the QWKPagePrivate.
mitz@apple.com's avatar
mitz@apple.com committed
1195
        Access it through the WebPageProxy instead which holds a strong
1196 1197 1198 1199 1200 1201 1202
        ref to it.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::QWKPagePrivate):
        (QWKPage::preferences):
        * UIProcess/API/qt/qwkpage_p.h:

1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251
2010-10-27  Enrica Casucci  <enrica@apple.com>

        Reviewed by Alexey Proskuryakov.

        Support Appkit key bindings and custom key bindings in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48271
        <rdar://problem/7660723>
        
        We need to support AppKit key bindings and custom key bindings in WebKit2.
        Every keyboard event is first sent to the WebProcess and we inform AppKit that
        we don't need further processing. When the event is processed by the WebProcess and no handler consumes it,
        we send a synchronous message back to the UI process to let AppKit perform the key bindings.
        This operation can result in one or more editing commands to execute or a noop.
        The WebProcess then replies back to the UI process to inform whether further processing is required, in
        which case the event is sent back to the application to be mapped.
        There is a potential for a race condition: in case the WebProcess is very slow to process the key events, the UI
        process could be in a completely different state when the event is being resent (for example it might not have the
        keyboard focus anymore) and the command could be lost. We should look out for user experience impact.

        * Scripts/webkit2/messages.py: Added header file in the generated file.
        * Shared/WebCoreArgumentCoders.h: Added encoder/decoder for KeypressCommand.
        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::interceptKeyEvent): Pass-through call to WKView.
        (WebKit::PageClientImpl::didNotHandleKeyEvent): Added logic to resend the event to the application.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView validateUserInterfaceItem:]): Changed the default return value to YES, otherwise no menu shortcut is performed.
        (-[WKView doCommandBySelector:]): Added.
        (-[WKView insertText:]): Added.
        (-[WKView _handleStyleKeyEquivalent:]): Added to handle command-B and command-I.
        (-[WKView performKeyEquivalent:]): Added to intercept key binding sequences.
        (-[WKView _setEventBeingResent:]):
        (-[WKView _interceptKeyEvent:]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::interpretKeyEvent):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::WebEditorClient::handleKeyboardEvent):
        (WebKit::WebEditorClient::handleInputMethodKeydown):
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm: Moved handleKeyboardEvent and handleInputMethodKeydown
        to the Mac specific implementation.
        (WebKit::WebPage::interceptEditingKeyboardEvent): Added.

1252 1253 1254 1255 1256 1257
2010-10-27  Brian Weinstein  <bweinstein@apple.com>

        More Windows build fixage. Copy another new header into WebKitOutputDir.

        * win/WebKit2Generated.make:

1258 1259 1260 1261 1262 1263
2010-10-27  Brian Weinstein  <bweinstein@apple.com>

        Windows build fix. Copy a new header into WebKitOutputDir.

        * win/WebKit2Generated.make:

1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370
2010-10-26  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
        https://bugs.webkit.org/show_bug.cgi?id=42322
        rdar://problem/8193631

        WebKitTestRunner needs to support layoutTestController.clearBackForwardList
        https://bugs.webkit.org/show_bug.cgi?id=42333
        rdar://problem/8193643

        * Shared/API/c/WKBase.h: Added WKBundleBackForwardListRef and
        WKBundleBackForwardListItemRef.

        * Shared/API/c/WKURL.cpp:
        (WKURLCopyString): Added.
        * Shared/API/c/WKURL.h: Added WKURLCopyString.

        * Shared/API/c/cf/WKURLCF.h: Fixed incorrect argument name.

        * Shared/APIObject.h: Added TypeBundleBackForwardList and
        TypeBundleBackForwardListItem.

        * Shared/ImmutableArray.h: Marked destructor virtual explicitly.
        * Shared/ImmutableDictionary.h: Ditto.
        * UIProcess/WebBackForwardListItem.h: Ditto.
        * UIProcess/WebContext.h: Ditto.
        * UIProcess/WebFrameProxy.h: Ditto.
        * UIProcess/WebNavigationData.h: Ditto.
        * UIProcess/WebPageNamespace.h: Ditto.
        * UIProcess/WebPreferences.h: Ditto.
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Ditto.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: Ditto.

        * UIProcess/WebBackForwardList.cpp: Removed unneeded backListWithLimit
        and forwardListWithLimit functions.
        (WebKit::WebBackForwardList::clear): Added.
        * UIProcess/WebBackForwardList.h: Marked destructor virtual explicitly.
        Added clear, removed backListWithLimit and forwardListWithLimit functions.

        * UIProcess/WebPageProxy.cpp: Removed unneeded backForwardBackItem,
        backForwardCurrentItem, and backForwardForwardItem functions.
        (WebKit::WebPageProxy::backForwardClear): Added.
        * UIProcess/WebPageProxy.h: Ditto.
        * UIProcess/WebPageProxy.messages.in: Ditto.

        * WebKit2.pro: Added new files.
        * WebKit2.xcodeproj/project.pbxproj: Ditto.
        * win/WebKit2.vcproj: Ditto.

        * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Added
        WKBundleBackForwardListRef and WKBundleBackForwardListItemRef.

        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
        Started with a copy of from WebKit2/UIProcess/API/C/WKBackForwardList.cpp.
        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
        Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardList.h.

        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
        Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp.
        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
        Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.h.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageGetBackForwardList): Added.
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Ditto.


        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
        Started with a copy of WebKit2/UIProcess/WebBackForwardList.cpp.
        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
        Started with a copy of WebKit2/UIProcess/WebBackForwardList.h.

        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
        Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.cpp.
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
        Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.h.

        * WebProcess/WebPage/WebBackForwardListProxy.cpp: Removed
        many unneeded functions.
        (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
        Removed unneeded initialization of m_closed.
        (WebKit::WebBackForwardListProxy::addItem): Added a check for
        the case of a capacity of 0.
        (WebKit::WebBackForwardListProxy::goToItem): Added a check for
        when the proxy outlives its page.
        (WebKit::WebBackForwardListProxy::itemAtIndex): Ditto.
        (WebKit::WebBackForwardListProxy::backListCount): Ditto.
        (WebKit::WebBackForwardListProxy::forwardListCount): Ditto.
        (WebKit::WebBackForwardListProxy::close): Removed unneeded code
        setting m_closed.
        (WebKit::WebBackForwardListProxy::isActive): Added.
        (WebKit::WebBackForwardListProxy::clear): Added.

        * WebProcess/WebPage/WebBackForwardListProxy.h: Added clear,
        isActive, and detach functions. Removed many other unneeded
        function and data members.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::~WebPage): Added call to detach on the
        back/forward list.
        (WebKit::WebPage::backForwardList): Added.
        * WebProcess/WebPage/WebPage.h: Added backForwardList function
        and m_backForwardList data member.

1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400
2010-10-27  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin Adler.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit 
        SPI to scale a WebView
        -and corresponding-
        <rdar://problem/8107667>

        This patch adds SPI to Mac WebKit that scales the page by the given 
        scale factor.

        Implement scaleWebView(), which tells WebCore::Frame to scale, and 
        viewScaleFactor() which returns the current scale factor.
        * Shared/API/c/WKSharedAPICast.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageScaleWebView):
        (WKPageGetViewScaleFactor):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::scaleWebView):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::viewScaleFactor):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scaleWebView):
        (WebKit::WebPage::viewScaleFactor):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426
2010-10-27  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Sam Weinig.

        Fix the WebKit2 API tests.
        https://bugs.webkit.org/show_bug.cgi?id=48461

        The API tests were failing because the tests expect to be able to send messages before the
        WebProcess finishes launching.

        Instead of dispatching the pending messages in processDidFinishLaunching, dispatch them in
        ensureWebProcess but do not make messages pending if the process is launching.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::processDidFinishLaunching):
        Move dispatching the pending messages back from here ...
        (WebKit::WebContext::ensureWebProcess):
        ... to here.
        (WebKit::WebContext::postMessageToInjectedBundle):
        Check whether the process can send messages in order to determine if a message needs to be
        sent later.

        * UIProcess/WebProcessProxy.h:
        (WebKit::WebProcessProxy::canSendMessage):
        The WebProcessProxy can send a message if it is valid or if it is launching.

andersca@apple.com's avatar
andersca@apple.com committed
1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467
2010-10-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        More work on downloads
        https://bugs.webkit.org/show_bug.cgi?id=48480

        * WebProcess/Downloads/Download.cpp:
        (WebKit::Download::~Download):
        Call platformInvalidate().

        (WebKit::Download::didBegin):
        (WebKit::Download::didReceiveData):
        (WebKit::Download::didFinish):
        Add empty stubs.

        * WebProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        Create a Download object and insert it into the m_downloads map.

        * WebProcess/Downloads/cf/DownloadCFNet.cpp:
        (WebKit::Download::platformInvalidate):
        Add empty stub.
        
        * WebProcess/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::platformInvalidate):
        Tell the WKDownloadAsDelegate object that we're being invalidated.

        (-[WKDownloadAsDelegate downloadDidBegin:]):
        Call Download::didBegin.

        (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
        Call Download::didReceiveData.

        (-[WKDownloadAsDelegate downloadDidFinish:]):
        Call Download::didFinish.

        * WebProcess/Downloads/qt/DownloadQt.cpp:
        (WebKit::Download::platformInvalidate):
        Add empty stub.

1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483
2010-10-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        WebPageProxy::isValid should return false if the page has been explicitly closed
        https://bugs.webkit.org/show_bug.cgi?id=48458

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::isValid):
        (WebKit::WebPageProxy::relaunch):
        (WebKit::WebPageProxy::close):
        (WebKit::WebPageProxy::processDidCrash):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isClosed):

1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516
2010-10-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Begin stubbing out the Download class
        https://bugs.webkit.org/show_bug.cgi?id=48447

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.
        
        * WebKit2Prefix.h:
        Include WebCore/EmptyProtocolDefinitions.h
        
        * WebProcess/Downloads/Download.cpp: Added.
        * WebProcess/Downloads/Download.h: Added.

        * WebProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        Create a Download object and start it.

        * WebProcess/Downloads/mac/DownloadMac.mm: Added.
        (WebKit::Download::start):
        Create an NSURLDownload.
    
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::startDownload):
        Ask the download manager to start downloading.

        * win/WebKit2.vcproj:
        * win/WebKit2Common.vsprops:
        Add new files.

1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538
2010-10-27  Adam Roben  <aroben@apple.com>

        Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
        completed

        In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
        does not actually affect whether the plugin is windowed.

        Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
        failure in NetscapePlugin::platformDestroy when running
        plugins/mouse-events.html in WebKit2 on Windows

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
        Bail out if m_isStarted is true, indicating that NPP_New has already
        finished.

        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
        implementation of setIsWindowed.

1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562
2010-10-27  Timothy Hatcher  <timothy@apple.com>

        Add API for enabling the developer extras (Web Inspector).

        http://webkit.org/b/48439

        Reviewed by John Sullivan.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::WebPreferencesStore::WebPreferencesStore):
        (WebKit::WebPreferencesStore::encode):
        (WebKit::WebPreferencesStore::decode):
        * Shared/WebPreferencesStore.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetDeveloperExtrasEnabled):
        (WKPreferencesGetDeveloperExtrasEnabled):
        * UIProcess/API/C/WKPreferences.h:
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::setDeveloperExtrasEnabled):
        (WebKit::WebPreferences::developerExtrasEnabled):
        * UIProcess/WebPreferences.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586
2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Anders Carlsson.

        Move contentsSizeChange from the UIClient into the PageClient and
        and make it a private Qt-only API in the process.

        Make WKPageContentsSizeChangedCallback be a private API
        https://bugs.webkit.org/show_bug.cgi?id=48409

        * UIProcess/API/C/WKPage.h:
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::didChangeContentsSize):
        (QWKPage::QWKPage):
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didChangeContentsSize):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebUIClient.cpp:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::contentsSizeChanged):

1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601
2010-10-26  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben.

        WebKit2 shouldn't try to send an empty user agent
        https://bugs.webkit.org/show_bug.cgi?id=48397
        
        Change the check of the custom user agent to an empty check instead of a null check. When the client application
        sets a custom user agent and then resets it, the custom user agent is set to an empty string. If all we do
        is check for a null string, then we will think we have a custom user agent (which is empty) and send an empty
        user agent.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::userAgent):

1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615
2010-10-27  Adam Roben  <aroben@apple.com>

        Don't call NPP_GetValue if the plugin didn't provide an implementation

        Fixes <http://webkit.org/b/48433> Crash in
        NetscapePlugin::shouldLoadSrcURL when using Shockwave Director 10.3 in
        WebKit2 on Windows

        Reviewed by Eric Carlson.

        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::NPP_GetValue): Null-check the getvalue pointer
        before using it to call NPP_GetValue.

1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630
2010-10-27  Balazs Kelemen  <kbalazs@webkit.org>

        Reviewed by Andreas Kling.

        [Qt] Assert due to multiple initialization of WebPlatformStrategies
        https://bugs.webkit.org/show_bug.cgi?id=48327

        We are using the LocalizationStrategy in the UI process
        so the previous attempt to fix this (http://trac.webkit.org/changeset/70620)
        was wrong.
        * UIProcess/API/qt/qwkpage.cpp:
        (initializePlatformStrategiesIfNeeded):
        Call WebPlatformStrategies::initialize exactly once.
        (QWKPagePrivate::QWKPagePrivate):

1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650
2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] WebKit2 UI process crashes if web process crashes
        https://bugs.webkit.org/show_bug.cgi?id=48400

        Check the success of socket write operations.
        Avoids crashing the UI process if web process has crashed.
        Qt socket code segfaults when write is called for a socket
        that has had an error.

        * Platform/CoreIPC/qt/ConnectionQt.cpp:
        (CoreIPC::Connection::platformInvalidate):
        Reset m_socket after deletion.

        (CoreIPC::Connection::sendOutgoingMessage):
        Check error status of write operations and
        invalidate socket if writes fail.

1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665
2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Type mismatch while serializing/deserializing message id size
        https://bugs.webkit.org/show_bug.cgi?id=48401

        Use correct types when reading data from connection buffer.

        The message id is written as uint32_t, thus the buffer size should be
        calculated based on sizeof(uint32_t) and not sizeof(MessageID).

        * Platform/CoreIPC/qt/ConnectionQt.cpp:
        (CoreIPC::Connection::readyReadHandler):

1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676
2010-10-27  Zalan Bujtas  <zbujtas@gmail.com>

        Reviewed by Kenneth Rohde Christiansen.

        Multiple WebPlatformStrategy initialization triggers assert in WebCore/PlatformStrategies. 
        Remove the code for now, as it is not used at all.
        https://bugs.webkit.org/show_bug.cgi?id=48327

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::QWKPagePrivate):

1677 1678 1679 1680 1681 1682 1683 1684
2010-10-26  Brent Fulgham  <bfulgham@webkit.org>

        Unreviewed build fix.

        * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
        (WebKit::cancelledError): Conditionalize use of CFNetwork calls
        and includes.

ap@apple.com's avatar
ap@apple.com committed
1685 1686 1687 1688 1689 1690 1691
2010-10-26  Alexey Proskuryakov  <ap@apple.com>

        Build fix.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Modified original file, not its framework
        copy this time.

andersca@apple.com's avatar
andersca@apple.com committed
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711
2010-10-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add DownloadManager class
        https://bugs.webkit.org/show_bug.cgi?id=48388

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/Downloads/DownloadManager.cpp: Added.
        (WebKit::DownloadManager::shared):
        (WebKit::DownloadManager::DownloadManager):
        * WebProcess/Downloads/DownloadManager.h: Added.

        * win/WebKit2.vcproj:
        * win/WebKit2Common.vsprops:
        Add new files.

1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750
2010-10-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Pass a downloadID to the web process whenever a download is requested
        https://bugs.webkit.org/show_bug.cgi?id=48380

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::generateDownloadID):
        Generate a unique download ID.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::receivedPolicyDecision):
        Pass along a download ID if needed.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::startDownload):
        Call the web frame member function.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::WebFrame):
        Initialize m_policyDownloadID.

        (WebKit::WebFrame::invalidatePolicyListener):
        Reset m_policyDownloadID.

        (WebKit::WebFrame::didReceivePolicyDecision):
        Set m_policyDownloadID.

        (WebKit::WebFrame::startDownload):
        Assert that m_policyDownloadID is not zero.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didReceivePolicyDecision):
        Pass along the download ID.

        * WebProcess/WebPage/WebPage.messages.in:
        Add the download ID.

ap@apple.com's avatar
ap@apple.com committed
1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782
2010-10-26  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=48375
        <rdar://problem/8392724> Need delegate calls in PageLoaderClient to indicate if we have
        loaded insecure content

        Added the delegate. Just like the bundle version, it misses WebOrigin parameter that Mac
        delegate call used to have. It doesn't seem necessary for clients.

        * UIProcess/API/C/WKPage.h:
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::QWKPage):
        * UIProcess/WebLoaderClient.cpp:
        (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
        (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
        * UIProcess/WebLoaderClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
        (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
        (WebKit::WebFrameLoaderClient::didRunInsecureContent):

1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794
2010-10-26  Jenn Braithwaite  <jennb@chromium.org>

        Reviewed by Dmitry Titov.

        Resource tracking failure when trying to move a frame between documents
        https://bugs.webkit.org/show_bug.cgi?id=44713

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage):
        Empty method.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812
2010-10-26  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Darin Adler.

        Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
        instead of in WebContext::ensureWebProcess.
        https://bugs.webkit.org/show_bug.cgi?id=48367

        Send pending injected bundle messages after the process finished launching instead of of
        directly after creating it.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::ensureWebProcess):
        Move the logic to dispatch pending injected bundle messages from here ...
        (WebKit::WebContext::processDidFinishLaunching):
        ... to here.
        Also use a reference instead of a pointer when sending the pending messages.

1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834
2010-10-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
        https://bugs.webkit.org/show_bug.cgi?id=48366

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::QWKPage):
        Add zero initializer.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::pageDidScroll):
        Call the pageDidScroll client function.

        * UIProcess/WebPageProxy.messages.in:
        Add PageDidScroll message.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::pageDidScroll):
        Send the PageDidScroll message.

1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857
2010-10-26  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Darin Adler.

        Need a way to retrieve custom user agent from a WKPage
        https://bugs.webkit.org/show_bug.cgi?id=48360
        <rdar://problem/8466537>
        
        Add an exported function on WKPage to get the page's custom user agent.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageCopyCustomUserAgent): Exported function that returns the custom user
            agent.
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close): Clear the custom user agent string.
        (WebKit::WebPageProxy::processDidCrash): Ditto.
        (WebKit::WebPageProxy::setCustomUserAgent): Add a new early return if we're setting
            the custom user agent to what it was before, and set the custom user agent member
            variable.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::customUserAgent): Returns the custom user agent.

1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876
2010-10-26  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Sam Weinig.

        Support layoutTestController.layerTreeAsText in WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=42145
        
        Expose layerTreeAsText() as private API so that 
        WebKitTestRunner can use it.

        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFrameCopyLayerTreeAsText):
        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::numberOfActiveAnimations):
        (WebKit::WebFrame::layerTreeAsText):
        (WebKit::WebFrame::pendingUnloadCount):
        * WebProcess/WebPage/WebFrame.h:

1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890
2010-10-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Enable the plug-in process on Mac
        https://bugs.webkit.org/show_bug.cgi?id=48350

        * WebKit2Prefix.h:
        Flip the switch and enable the plug-in process on Mac.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::platformDestroy):
        Fix a bogus assert.

1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
2010-10-26  Zoltan Horvath  <zoltan@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Implement SharedMemory for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=47345

        Implement unimplemented functions in SharedMemoryQt.cpp.
        Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
        Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
        Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
        methods of MappedMemoryPool.

        * Platform/SharedMemory.h: Add a handle member for Qt.
        * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
        (WebKit::MappedMemoryPool::searchForMappedMemory):
        (WebKit::MappedMemoryPool::mapMemory):
        (WebKit::MappedMemoryPool::mapFile):
        * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
        (WebKit::MappedMemoryPool::MappedMemory::mapSize):
        (WebKit::MappedMemoryPool::MappedMemory::markUsed):
        (WebKit::MappedMemoryPool::MappedMemory::markFree):
        (WebKit::MappedMemoryPool::MappedMemory::isFree):
        (WebKit::MappedMemoryPool::MappedMemory::data):
        (WebKit::MappedMemoryPool::MappedMemoryPool):
        Move MappedMemory implementation into MappedMemoryPool.
        * Platform/qt/SharedMemoryQt.cpp:
        (WebKit::SharedMemory::Handle::Handle): Implement.
        (WebKit::SharedMemory::Handle::~Handle):
        (WebKit::SharedMemory::Handle::isNull): Implement.
        (WebKit::SharedMemory::Handle::encode): Implement.
        (WebKit::SharedMemory::Handle::decode): Implement.
        (WebKit::SharedMemory::create): Implement.
        (WebKit::mapProtection): Added.
        (WebKit::SharedMemory::~SharedMemory): Implement.
        (WebKit::SharedMemory::createHandle): Implement.
        (WebKit::SharedMemory::systemPageSize): Implement.
        * Shared/qt/MappedMemory.h: Removed.
        * Shared/qt/MappedMemoryPool.cpp: Removed.
        * Shared/qt/UpdateChunk.cpp:
        (WebKit::UpdateChunk::UpdateChunk):
        (WebKit::UpdateChunk::decode):
        Modify to use MappedMemoryPool.
        * Shared/qt/UpdateChunk.h:
        * WebKit2.pro:
        Modify affected lines.

1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952
2010-10-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
        https://bugs.webkit.org/show_bug.cgi?id=48285
        <rdar://problem/8576318>

        * UIProcess/API/C/WKPage.h:
        Add a kWKMoreThanMaximumMatchCount constant.

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::findString):
        If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.

mitz@apple.com's avatar
mitz@apple.com committed
1953 1954 1955 1956 1957 1958 1959
2010-10-25  Dan Bernstein  <mitz@apple.com>

        Non-Carbon build fix.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::windowFrameChanged):

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
2010-10-25  Timothy Hatcher  <timothy@apple.com>

        Stub out WebInspector objects and WKInspectorRef API.

        https://webkit.org/b/48265

        Reviewed by Anders Carlsson.

        * Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
        * Shared/API/c/WKBase.h: Added WKInspectorRef.
        * Shared/APIObject.h: Added TypeInspector.
        * UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
        * UIProcess/API/C/WKInspector.cpp: Added.
        (WKInspectorGetTypeID):
        (WKInspectorGetPage):
        * UIProcess/API/C/WKInspector.h: Added.
        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetInspector): Added.
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebInspectorProxy.cpp: Added.
        (WebKit::WebInspectorProxy::WebInspectorProxy):
        (WebKit::WebInspectorProxy::~WebInspectorProxy):
        (WebKit::WebInspectorProxy::invalidate):
        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::create):
        (WebKit::WebInspectorProxy::page):
        (WebKit::WebInspectorProxy::type):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
        * UIProcess/WebPageProxy.h:
        * WebKit2.pro: Added new files.
        * WebKit2.xcodeproj/project.pbxproj: Added new files.
        * WebProcess/WebPage/WebInspector.cpp: Added.
        (WebKit::WebInspector::WebInspector):
        * WebProcess/WebPage/WebInspector.h: Added.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::inspector): Lazily create the WebInspector.
        * WebProcess/WebPage/WebPage.h:
        * win/WebKit2.vcproj: Added new files.

2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
2010-10-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Update the fake Carbon window when the window frame changes
        https://bugs.webkit.org/show_bug.cgi?id=48273

        * UIProcess/API/mac/WKView.mm:
        (screenForWindow):
        (-[WKView _updateWindowFrame]):
        Pass the window frame in Carbon coordinates.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::windowFrameChanged):
        Update the window bounds.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::setWindowFrame):
        Call the plug-in.

        (WebKit::PluginView::platformLayer):
        Fix a crash when WebCore asked for the layer before it was initialized.

2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034
2010-10-25  Oliver Hunt  <oliver@apple.com>

        Reviewed by Gavin Barraclough.

        Remove exec and globalData arguments from jsNumber
        https://bugs.webkit.org/show_bug.cgi?id=48270

        Mechanical removal of exec parameter to jsNumber

        * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):

2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055
2010-10-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Replace matchCountDidChange with didFindString/didFailToFindString
        https://bugs.webkit.org/show_bug.cgi?id=48262
        <rdar://problem/8568928>

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebFindClient.cpp:
        (WebKit::WebFindClient::didFindString):
        (WebKit::WebFindClient::didFailToFindString):
        * UIProcess/WebFindClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFindString):
        (WebKit::WebPageProxy::didFailToFindString):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::findString):

2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078
2010-10-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add a pageDidScroll BundleUIClient callback
        https://bugs.webkit.org/show_bug.cgi?id=48260
        <rdar://problem/8531159>

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
        (WebKit::InjectedBundlePageUIClient::pageDidScroll):
        Call the pageDidScroll callback.

        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
        (WebKit::WebChromeClient::scroll):
        Call pageDidScroll.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::pageDidScroll):
        Hide the find banner UI and call the BundleUIClient pageDidScroll callback.

2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090
2010-10-25  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben.

        Control + Mousewheel shouldn't be handled in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48253
        
        Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.

        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::onWheelEvent):

2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101
2010-10-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        cancelledError for WebKit2 on windows should use kCFErrorDomainCFNetwork instead of webKitErrorDomain
        https://bugs.webkit.org/show_bug.cgi?id=48254

        * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
        (WebKit::cancelledError): Use kCFErrorDomainCFNetwork instead of webKitErrorDomain and switch over
        to using kCFURLErrorCancelled instead of a hard coded constant.

2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118
2010-10-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Need WebKit2 API to figure out if a frame can provide source
        <rdar://problem/8424632>
        https://bugs.webkit.org/show_bug.cgi?id=48252

        * UIProcess/API/C/WKFrame.cpp:
        (WKFrameCanProvideSource):
        * UIProcess/API/C/WKFrame.h:
        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::canProvideSource):
        * UIProcess/WebFrameProxy.h:
        Add API to figure out if a frame can provide source based on its
        MIME type.

2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154
2010-10-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Java applets don't display on the page
        https://bugs.webkit.org/show_bug.cgi?id=48251
        <rdar://problem/8483759>

        Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::WebPreferencesStore::WebPreferencesStore):
        Initialize javaEnabled.

        (WebKit::WebPreferencesStore::encode):
        Encode javaEnabled.

        (WebKit::WebPreferencesStore::decode):
        Decode javaEnabled.

        * Shared/WebPreferencesStore.h:
        Add javaEnabled.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPReferencesSetJavaEnabled):
        (WKPReferencesGetJavaEnabled):
        Call the WebPreferences functions.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
        Just call createPlugin.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        Call Settings::setJavaEnabled.

2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173
2010-10-25  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by David Kilzer.

        Replace _countof with WTF_ARRAY_LENGTH
        https://bugs.webkit.org/show_bug.cgi?id=48229

        * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
        (WebKit::ProcessLauncher::launchProcess):
        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
        (WebKit::safariPluginsDirectory):
        (WebKit::addMozillaPluginDirectories):
        (WebKit::addWindowsMediaPlayerPluginDirectory):
        (WebKit::addAdobeAcrobatPluginDirectory):
        (WebKit::addMacromediaPluginDirectories):
        (WebKit::addPluginPathsFromRegistry):
        * WebProcess/WebPage/win/WebPageWin.cpp:
        (WebKit::WebPage::interpretKeyEvent):

2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184
2010-10-25  Adam Roben  <aroben@apple.com>

        Stop copying .messages.in files into WebKit2's framework bundle

        Fixes <http://webkit.org/b/48232> Several .messages.in files end up in
        WebKit2's framework bundle

        Reviewed by Dan Bernstein.

        * WebKit2.xcodeproj/project.pbxproj:

2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198
2010-10-25  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] Fix the WebKit2 build after sheriffbot messed up the rollout patch.
        https://bugs.webkit.org/show_bug.cgi?id=48238

        * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
        (WebKit::MappedMemory::mapSize):
        (WebKit::MappedMemory::markUsed):
        (WebKit::MappedMemory::markFree):
        (WebKit::MappedMemory::isFree):
        (WebKit::MappedMemory::data):

2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239
2010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r70450.
        http://trac.webkit.org/changeset/70450
        https://bugs.webkit.org/show_bug.cgi?id=48238

        Causes WTR to crash on tests which use SharedMemory.
        (Requested by bbandix on #webkit).

        * Platform/SharedMemory.h:
        * Platform/qt/MappedMemoryPool.cpp: Removed.
        * Platform/qt/SharedMemoryQt.cpp:
        (WebKit::SharedMemory::Handle::Handle):
        (WebKit::SharedMemory::Handle::~Handle):
        (WebKit::SharedMemory::Handle::encode):
        (WebKit::SharedMemory::Handle::decode):
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::~SharedMemory):
        (WebKit::SharedMemory::createHandle):
        (WebKit::SharedMemory::systemPageSize):
        * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
        (WebKit::MappedMemory::mapSize):
        (WebKit::MappedMemory::markUsed):
        (WebKit::MappedMemory::markFree):
        (WebKit::MappedMemory::isFree):
        (WebKit::MappedMemory::data):
        * Shared/qt/MappedMemoryPool.cpp: Added.
        (WebKit::MappedMemoryPool::MappedMemoryPool):
        (WebKit::MappedMemoryPool::instance):
        (WebKit::MappedMemoryPool::size):
        (WebKit::MappedMemoryPool::at):
        (WebKit::MappedMemoryPool::append):
        (WebKit::MappedMemoryPool::cleanUp):
        * Shared/qt/UpdateChunk.cpp:
        (WebKit::mapMemory):
        (WebKit::mapFile):
        (WebKit::UpdateChunk::UpdateChunk):
        (WebKit::UpdateChunk::decode):
        * Shared/qt/UpdateChunk.h:
        * WebKit2.pro:

2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286
2010-10-25  Zoltan Horvath  <zoltan@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Implement SharedMemory for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=47345

        Implement unimplemented functions in SharedMemoryQt.cpp.
        Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
        Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
        Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
        methods of MappedMemoryPool.

        * Platform/SharedMemory.h: Add a handle member for Qt.
        * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
        (WebKit::MappedMemoryPool::searchForMappedMemory):
        (WebKit::MappedMemoryPool::mapMemory):
        (WebKit::MappedMemoryPool::mapFile):
        * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
        (WebKit::MappedMemoryPool::MappedMemory::mapSize):
        (WebKit::MappedMemoryPool::MappedMemory::markUsed):
        (WebKit::MappedMemoryPool::MappedMemory::markFree):
        (WebKit::MappedMemoryPool::MappedMemory::isFree):
        (WebKit::MappedMemoryPool::MappedMemory::data):
        (WebKit::MappedMemoryPool::MappedMemoryPool):
        Move MappedMemory implementation into MappedMemoryPool.
        * Platform/qt/SharedMemoryQt.cpp:
        (WebKit::SharedMemory::Handle::Handle): Implement.
        (WebKit::SharedMemory::Handle::~Handle):
        (WebKit::SharedMemory::Handle::isNull): Implement.
        (WebKit::SharedMemory::Handle::encode): Implement.
        (WebKit::SharedMemory::Handle::decode): Implement.
        (WebKit::SharedMemory::create): Implement.
        (WebKit::mapProtection): Added.
        (WebKit::SharedMemory::~SharedMemory): Implement.
        (WebKit::SharedMemory::createHandle): Implement.
        (WebKit::SharedMemory::systemPageSize): Implement.
        * Shared/qt/MappedMemory.h: Removed.
        * Shared/qt/MappedMemoryPool.cpp: Removed.
        * Shared/qt/UpdateChunk.cpp:
        (WebKit::UpdateChunk::UpdateChunk):
        (WebKit::UpdateChunk::decode):
        Modify to use MappedMemoryPool.
        * Shared/qt/UpdateChunk.h:
        * WebKit2.pro:
        Modify affected lines.

2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307
2010-10-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Need a way to determine the screen rect for a form control in WebKit2
        <rdar://problem/8530670>
        https://bugs.webkit.org/show_bug.cgi?id=48216

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        Add conversion from IntRect to WKRect.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleGetElementBounds):
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::elementBounds):
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
        Add SPI to get the rect in window space. The client can then convert this to screen
        space if they wish to.

2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321
2010-10-23  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Sam Weinig.

        Unify globalData APIs
        https://bugs.webkit.org/show_bug.cgi?id=47969

        Adapt code to JSGlobalObject::globalData returning a reference
        instead of a pointer.

        * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
        (WebKit::NPRuntimeObjectMap::evaluate):

ap@apple.com's avatar
ap@apple.com committed
2322 2323 2324 2325 2326 2327 2328 2329 2330 2331
2010-10-23  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=48083
        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
        Initialize the new method.

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
2010-10-21  Timothy Hatcher  <timothy@apple.com>

        Stub out WebInspectorFrontendClient.

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

        Reviewed by Adam Roben.

        * WebKit2.pro: Added WebInspectorFrontendClient.{cpp,h}.
        * WebKit2.xcodeproj/project.pbxproj: Added WebInspectorFrontendClient.{cpp,h}.
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Added.
        (WebKit::WebInspectorFrontendClient::windowObjectCleared): Added.
        (WebKit::WebInspectorFrontendClient::frontendLoaded): Added.
        (WebKit::WebInspectorFrontendClient::moveWindowBy): Added.
        (WebKit::WebInspectorFrontendClient::localizedStringsURL): Added.
        (WebKit::WebInspectorFrontendClient::hiddenPanels): Added.
        (WebKit::WebInspectorFrontendClient::bringToFront): Added.
        (WebKit::WebInspectorFrontendClient::closeWindow): Added.
        (WebKit::WebInspectorFrontendClient::disconnectFromBackend): Added.
        (WebKit::WebInspectorFrontendClient::requestAttachWindow): Added.
        (WebKit::WebInspectorFrontendClient::requestDetachWindow): Added.
        (WebKit::WebInspectorFrontendClient::changeAttachedWindowHeight): Added.
        (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Added.
        (WebKit::WebInspectorFrontendClient::sendMessageToBackend): Added.
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Added.
        (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient): Added.
        * win/WebKit2.vcproj: Added WebInspectorFrontendClient.{cpp,h}.

2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370
2010-10-21  Timothy Hatcher  <timothy@apple.com>

        Remove stale stubs that are not longer part of InspectorClient.

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

        Reviewed by Adam Roben.

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        * WebProcess/WebCoreSupport/WebInspectorClient.h:

2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384
2010-10-22  Andy Estes  <aestes@apple.com>

        Reviewed by Adam Roben and Sam Weinig.

        WebKit shouldn't load a plug-in based on file extension if a MIME type
        is specified.
        https://bugs.webkit.org/show_bug.cgi?id=48046

        The fix landed in r70332 only covered the Mac port. Implement this fix
        for WebKit2 as well.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::findPlugin):

andersca@apple.com's avatar
andersca@apple.com committed
2385 2386 2387 2388 2389 2390
2010-10-22  Anders Carlsson  <andersca@apple.com>

        Fix clang++ build.

        * Scripts/webkit2/messages.py:

andersca@apple.com's avatar
andersca@apple.com committed
2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401
2010-10-22  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * UIProcess/API/qt/qwkpage_p.h:
        (QWKPagePrivate::didRelaunchProcess):
        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::didRelaunchProcess):
        * UIProcess/win/WebView.h:
        * WebKit2.xcodeproj/project.pbxproj:

2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417
2010-10-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        WebContext::ensureWebProcess shouldn't send multiple InitializeWebProcess messages.
        https://bugs.webkit.org/show_bug.cgi?id=48158
        <rdar://problem/8512572>

        If the web process was launching when another call to ensureWebProcess is sent, we
        would end up sending another InitializeWebProcess message to it which would result
        in assertions firing. Fix this by only checking for m_process, and not requiring a process
        to be valid (which it won't be until it's finished launching).
        
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::ensureWebProcess):

2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441
2010-10-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Rename revive to relaunch everywhere.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didRelaunchProcess):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didRelaunchProcess]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::relaunchProcessIfNecessary):
        * UIProcess/WebContext.h:
        * UIProcess/WebPageNamespace.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::relaunch):
        (WebKit::WebPageProxy::initializeWebPage):
        (WebKit::WebPageProxy::loadURL):
        (WebKit::WebPageProxy::loadURLRequest):
        * UIProcess/WebPageProxy.h:

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
2010-10-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Fix assert when a NetscapePluginModule loses its last NetscapePlugin.
        https://bugs.webkit.org/show_bug.cgi?id=48155

        (The assert in question is ASSERT(pluginModuleIndex != notFound) in 
        NetscapePluginModule::shutdown()).

        * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
        (WebKit::NetscapePluginModule::pluginCreated):
        If we didn't have any live plug-ins, load the plug-in module.

        (WebKit::NetscapePluginModule::pluginDestroyed):
        If this was the last plug-in, unload the plug-in module.

        (WebKit::NetscapePluginModule::shutdown):
        Set m_isInitialized to false.

        (WebKit::NetscapePluginModule::load):
        Don't do anything if the plug-in module has already been initialized.

        (WebKit::NetscapePluginModule::unload):
        Assert that we're not initialized.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::platformPostInitialize):
        Assert that we successfully created the window.

2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493
2010-10-22  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Anders Carlsson.

        Crash in Connection::isValid when called in response to
        VisitedLinksProvider::pendingVisitedLinksTimerFired after WebProcessProxy::didClose was
        already called.
        https://bugs.webkit.org/show_bug.cgi?id=48153

        * UIProcess/VisitedLinkProvider.cpp:
        (WebKit::VisitedLinkProvider::stopVisitedLinksTimer):
        * UIProcess/VisitedLinkProvider.h:

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::processDidClose):
        Stop the pendingVisitedLinksTimer and null out the process.
        * UIProcess/WebContext.h:

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didClose):
        Tell the WebContext that the WebProcess did close.

weinig@apple.com's avatar
weinig@apple.com committed
2494 2495 2496 2497 2498 2499
2010-10-22  Sam Weinig  <sam@webkit.org>

        Fix Qt build.

        * UIProcess/API/qt/ClientImpl.h: