1 2010-11-05 Adam Roben <aroben@apple.com>
3 Implement PluginInfoStore::shouldUsePlugin on Windows
5 Fixes <http://webkit.org/b/43509> <rdar://problem/8273822> WebKit2
6 should refuse to load the same plugins that old-WebKit refuses to load
8 Reviewed by Anders Carlsson.
10 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
11 (WebKit::fileVersion): Helper function to construct a 64-bit file
12 version from two 32-bit numbers.
13 (WebKit::PluginInfoStore::getPluginInfo): Ported code from
14 WebCore::PluginPackage::fetchInfo to get the plugin's version. We now
15 store it in Plugin::fileVersion.
17 (WebKit::isOldWindowsMediaPlayerPlugin):
18 (WebKit::isNewWindowsMediaPlayerPlugin):
19 Added these helpers. The code came from
20 WebCore::PluginDatabase::getPluginPathsInDirectories.
22 (WebKit::PluginInfoStore::shouldUsePlugin): Implemented. The code was
23 ported from WebCore::PluginDatabase::getPluginPathsInDirectories and
24 WebCore::PluginPackage::isPluginBlacklisted.
26 2010-11-05 Adam Roben <aroben@apple.com>
28 Operate on m_plugins directly in PluginInfoStore::shouldUsePlugin
30 We'll need to operate on m_plugins if we ever want to unload an
31 already-loaded plugin before loading the new one.
33 Fixes <http://webkit.org/b/49076> loadedPlugins parameter to
34 PluginInfoStore::shouldUsePlugin is redundant
36 Reviewed by Anders Carlsson.
38 * UIProcess/Plugins/PluginInfoStore.cpp:
39 (WebKit::PluginInfoStore::loadPlugin):
40 * UIProcess/Plugins/PluginInfoStore.h:
41 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
42 (WebKit::PluginInfoStore::shouldUsePlugin):
43 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
44 (WebKit::PluginInfoStore::shouldUsePlugin):
45 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
46 (WebKit::PluginInfoStore::shouldUsePlugin):
47 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
48 (WebKit::PluginInfoStore::shouldUsePlugin):
49 Removed the loadedPlugins parameter from shouldUsePlugin. The single
50 implementation (Mac) now uses m_plugins directly.
52 2010-11-05 Anders Carlsson <andersca@apple.com>
54 Reviewed by Adam Roben.
56 Implement pluginElementNPObject
57 https://bugs.webkit.org/show_bug.cgi?id=49077
59 * PluginProcess/PluginControllerProxy.cpp:
60 (WebKit::PluginControllerProxy::pluginElementNPObject):
61 Send the GetPluginElementNPObject message.
63 * WebProcess/Plugins/PluginProxy.cpp:
64 (WebKit::PluginProxy::getPluginElementNPObject):
65 Get the plug-in element NPObject and expose it to the other side of the connection.
67 * WebProcess/Plugins/PluginProxy.messages.in:
68 Add GetPluginElementNPObject.
70 2010-11-04 Anders Carlsson <andersca@apple.com>
72 Reviewed by Oliver Hunt.
74 Implement NP_RemoveProperty and NP_Enumerate
75 https://bugs.webkit.org/show_bug.cgi?id=49046
77 * Shared/Plugins/NPObjectMessageReceiver.cpp:
78 (WebKit::NPObjectMessageReceiver::removeProperty):
79 Call the removeProperty NPClass function.
81 (WebKit::NPObjectMessageReceiver::enumerate):
82 Call the enumerate NPClass function.
84 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
85 Add RemoveProperty and Enumerate messages.
87 * Shared/Plugins/NPObjectProxy.cpp:
88 (WebKit::NPObjectProxy::removeProperty):
89 Send the RemoveProperty message.
91 (WebKit::NPObjectProxy::enumerate):
92 Send the Enumerate message.
94 (WebKit::NPObjectProxy::NP_RemoveProperty):
97 (WebKit::NPObjectProxy::NP_Enumerate):
100 2010-11-05 Sam Weinig <sam@webkit.org>
102 Fix failing python tests.
104 * Scripts/webkit2/messages.py:
105 * Scripts/webkit2/messages_unittest.py:
107 2010-11-05 Sam Weinig <sam@webkit.org>
109 Reviewed by Adam Roben..
111 Generate the messages sent to the WebProcessProxy
112 https://bugs.webkit.org/show_bug.cgi?id=49062
114 * Platform/CoreIPC/MessageID.h:
115 Temporarily add MessageClassWebProcessProxyLegacy while we still can't
116 support GetPluginProcessConnection (and deferred sync replies) in the
119 * Scripts/webkit2/messages.py:
120 Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
122 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
123 Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
125 * UIProcess/WebProcessProxy.cpp:
126 (WebKit::WebProcessProxy::getPluginPath):
127 (WebKit::WebProcessProxy::addBackForwardItem):
128 (WebKit::WebProcessProxy::didNavigateWithNavigationData):
129 (WebKit::WebProcessProxy::didPerformClientRedirect):
130 (WebKit::WebProcessProxy::didPerformServerRedirect):
131 (WebKit::WebProcessProxy::didUpdateHistoryTitle):
132 (WebKit::WebProcessProxy::didReceiveMessage):
133 (WebKit::WebProcessProxy::didReceiveSyncMessage):
134 (WebKit::WebProcessProxy::didDestroyFrame):
135 * UIProcess/WebProcessProxy.h:
136 * UIProcess/WebProcessProxy.messages.in: Added.
137 Move implementations to their own functions.
139 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
140 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
141 Change to use WebProcessProxyLegacyMessage.
143 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
144 (WebKit::WebFrameLoaderClient::updateGlobalHistory):
145 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
146 (WebKit::WebFrameLoaderClient::setTitle):
147 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
148 (WebKit::WebPlatformStrategies::populatePluginCache):
149 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
150 (WebKit::updateBackForwardItem):
151 * WebProcess/WebPage/WebPage.cpp:
152 (WebKit::WebPage::createPlugin):
153 * WebProcess/WebProcess.cpp:
154 (WebKit::WebProcess::addVisitedLink):
155 (WebKit::WebProcess::removeWebFrame):
156 Use generated messages.
158 * DerivedSources.make:
159 * DerivedSources.pro:
161 * WebKit2.xcodeproj/project.pbxproj:
162 * win/WebKit2.vcproj:
165 2010-11-04 Adam Roben <aroben@apple.com>
167 Use a window region to clip windowed plugins
169 Fixes <http://webkit.org/b/49024> <rdar://problem/8487847> Windowed
170 plugins aren't clipped in WebKit2 on Windows
172 Reviewed by Jon Honeycutt.
174 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
175 (WebKit::registerPluginView): Removed the CS_PARENTDC style. This style
176 makes Windows ignore the window region and always clip to the parent
177 window. Also pass WebKit.dll's HINSTANCE as part of the WNDCLASSW
178 struct so that the window class will be specific to WebKit.dll rather
179 than to WebKit2WebProcess.exe. This is useful for testing, but also
180 more pedantically correct.
181 (WebKit::setWindowRegion): Helper function to set a window region and
182 deal with ownership of the HRGN correctly.
183 (WebKit::NetscapePlugin::platformGeometryDidChange): Make an HRGN that
184 corresponds to m_clipRect and set it on the plugin's window.
186 2010-11-05 Balazs Kelemen <kbalazs@webkit.org>
188 Reviewed by Andreas Kling.
190 [Qt][WK2] Left over files and shared memory segments
191 https://bugs.webkit.org/show_bug.cgi?id=48985
193 * Platform/qt/SharedMemoryQt.cpp:
194 (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
195 object on terminate by connecting QCoreApplication::aboutToQuit with
196 deleteLater. Add the object to the CrashHandler as well to release the
197 shared memory segment even on crash.
198 (WebKit::SharedMemory::~SharedMemory):
199 * Shared/qt/CrashHandler.cpp: Added.
200 CrashHandler has a container for QObjects that we want to
201 destroy on crash. When we got a signal that we interpret as
202 a crash then it destroys those objects.
203 (WebKit::CrashHandler::CrashHandler):
204 (WebKit::CrashHandler::signalHandler):
205 (WebKit::CrashHandler::deleteObjects):
206 * Shared/qt/CrashHandler.h: Added.
207 (WebKit::CrashHandler::instance):
208 (WebKit::CrashHandler::didDelete):
209 (WebKit::CrashHandler::markForDeletionOnCrash):
210 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
211 (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
212 Add the object itself to the CrashHandler to close the QLocalServer
213 even on crash. Without that the QLocalServer leaves over socket files on the disk.
214 (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
217 2010-11-04 Jia Pu <jpu@apple.com>
219 Reviewed by Dan Bernstein.
221 reversion bubble in WebViews
222 https://bugs.webkit.org/show_bug.cgi?id=47630
223 <rdar://problem/8530960>
225 This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
227 * WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
228 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
229 (WebKit::WebEditorClient::showCorrectionPanel):
230 (WebKit::WebEditorClient::dismissCorrectionPanel):
232 2010-11-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
234 Reviewed by David Hyatt.
236 Delegate scrolling via a separate method
237 https://bugs.webkit.org/show_bug.cgi?id=48988
239 Add delegatedScrollRequested method to WebChromeClient,
240 which is only used in conjunging with tiling, and thus ifdef'ed.
242 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
243 (WebKit::WebChromeClient::delegatedScrollRequested):
244 * WebProcess/WebCoreSupport/WebChromeClient.h:
246 2010-11-03 Enrica Casucci <enrica@apple.com>
248 Reviewed by Alexey Proskuryakov.
250 Need a way to test in WebKit2 whether a form field contains marked text
251 <rdar://problem/8555293>
252 https://bugs.webkit.org/show_bug.cgi?id=48969
254 Added a selection changed notification from the Web process to the UI process.
255 The message being sent contains information about the current selection.
256 Event though for this specific bug the only information required is the marked text,
257 I've added other selection information that will be needed to support IME.
258 All the stubbed methods are required methods by the NSTextInput protocol.
260 * UIProcess/API/mac/PageClientImpl.h:
261 * UIProcess/API/mac/PageClientImpl.mm:
262 (WebKit::PageClientImpl::selectionChanged): Added.
263 * UIProcess/API/mac/WKView.h:
264 * UIProcess/API/mac/WKView.mm:
265 (-[WKView initWithFrame:pageNamespaceRef:]): Added initialization of new members.
266 (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:]): Stores the values from
267 the selection changed message.
268 (-[WKView selectedRange]): Added stub.
269 (-[WKView hasMarkedText]): Implemented.
270 (-[WKView unmarkText]): Added stub.
271 (-[WKView validAttributesForMarkedText]): Added stub.
272 (-[WKView setMarkedText:selectedRange:]): Added stub.
273 (-[WKView markedRange]): Added stub.
274 (-[WKView attributedSubstringFromRange:]): Added stub.
275 (-[WKView conversationIdentifier]): Added stub.
276 (-[WKView characterIndexForPoint:]): Added stub.
277 (-[WKView firstRectForCharacterRange:]): Added stub.
278 * UIProcess/API/mac/WKViewInternal.h:
279 * UIProcess/API/qt/qwkpage.cpp:
280 (QWKPagePrivate::selectionChanged): Added.
281 * UIProcess/API/qt/qwkpage_p.h:
282 * UIProcess/PageClient.h:
283 * UIProcess/WebPageProxy.cpp:
284 (WebKit::WebPageProxy::didSelectionChange): New message handler.
285 * UIProcess/WebPageProxy.h:
286 * UIProcess/WebPageProxy.messages.in:
287 * UIProcess/win/WebView.cpp:
288 (WebKit::WebView::selectionChanged): Added.
289 * UIProcess/win/WebView.h:
290 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
291 (WebKit::WebEditorClient::respondToChangedSelection): Added implementation.
293 2010-11-04 Balazs Kelemen <kbalazs@webkit.org>
295 Reviewed by Andreas Kling.
297 [Qt][WK2] Cleanup UpdateChunk and MappedMemoryPool
298 https://bugs.webkit.org/show_bug.cgi?id=48994
300 * Platform/qt/MappedMemoryPool.cpp:
301 (WebKit::MappedMemoryPool::mapMemory):
302 Removed argument with default value that was always
303 used with the default value.
304 (WebKit::MappedMemoryPool::mapFile): Ditto and
306 * Platform/qt/MappedMemoryPool.h:
307 Encapsulating MappedMemory and remove the unused
308 MappedMemoryPool::searchForMappedMemory method.
309 (WebKit::MappedMemory::mappedFile):
310 (WebKit::MappedMemory::markFree):
311 (WebKit::MappedMemory::data):
312 (WebKit::MappedMemory::MappedMemory):
313 (WebKit::MappedMemory::markUsed):
314 (WebKit::MappedMemory::mapSize):
315 (WebKit::MappedMemory::isFree):
316 (WebKit::MappedMemoryPool::instance):
317 * Shared/qt/UpdateChunk.cpp:
318 Removed the unused data method besides other cleanups.
319 (WebKit::UpdateChunk::UpdateChunk):
320 (WebKit::UpdateChunk::encode):
321 (WebKit::UpdateChunk::decode):
322 (WebKit::UpdateChunk::createImage):
323 * Shared/qt/UpdateChunk.h:
325 2010-11-04 Andreas Kling <kling@webkit.org>
327 Reviewed by Tor Arne Vestbø.
329 [Qt] Add a stub WebContextMenuProxy
331 This is the Qt equivalent of r71333.
333 * UIProcess/API/qt/qwkpage.cpp:
334 (QWKPagePrivate::createContextMenuProxy):
335 * UIProcess/qt/WebContextMenuProxyQt.cpp: Added.
336 (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
337 (WebKit::WebContextMenuProxyQt::create):
338 (WebKit::WebContextMenuProxyQt::showContextMenu):
339 (WebKit::WebContextMenuProxyQt::hideContextMenu):
340 * UIProcess/qt/WebContextMenuProxyQt.h: Added.
343 2010-11-04 Adam Roben <aroben@apple.com>
345 Add a do-nothing WebContextMenuProxy implementation on Windows
347 Fixes <http://webkit.org/b/48992> REGRESSION (r71041): Crash in
348 WebPageProxy::showContextMenu when right-clicking in WebKit2 on
351 Reviewed by Dan Bernstein.
353 * UIProcess/win/WebContextMenuProxyWin.cpp: Added.
354 (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
355 (WebKit::WebContextMenuProxyWin::create):
356 (WebKit::WebContextMenuProxyWin::showContextMenu):
357 (WebKit::WebContextMenuProxyWin::hideContextMenu):
358 * UIProcess/win/WebContextMenuProxyWin.h: Added.
359 Just stubbed-out this class.
361 * UIProcess/win/WebView.cpp:
362 (WebKit::WebView::createContextMenuProxy): Create a new
363 WebContextMenuProxyWin and return it. Returning 0 results in a crash.
365 * win/WebKit2.vcproj: Added WebContextMenuProxyWin.
367 2010-11-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
369 Reviewed by Andreas Kling..
371 [Qt] Build Webkit2 both in debug and release on Mac
373 On Mac OS X we build QtWebKit in both debug and release, so
374 we need to also build the webkit2 library in both configs.
378 2010-11-04 Adam Roben <aroben@apple.com>
380 Remove lame puts()s from WebPageProxy
382 Rubber-stamped by Anders Carlsson.
384 * UIProcess/WebPageProxy.cpp:
385 (WebKit::WebPageProxy::loadURL):
386 (WebKit::WebPageProxy::loadURLRequest):
388 2010-11-03 Alice Liu <alice.liu@apple.com>
392 * PluginProcess/PluginProcess.h:
393 * UIProcess/Plugins/PluginProcessProxy.h:
394 * UIProcess/WebContextMenuProxy.h:
395 Change class to struct and vise versa where needed.
397 2010-11-03 Anders Carlsson <andersca@apple.com>
399 Reviewed by Adam Roben.
401 Implement NP_SetProperty
402 https://bugs.webkit.org/show_bug.cgi?id=48956
404 * Shared/Plugins/NPObjectMessageReceiver.cpp:
405 (WebKit::NPObjectMessageReceiver::setProperty):
406 Call the NPClass setProperty function.
408 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
409 Add SetProperty message.
411 * Shared/Plugins/NPObjectProxy.cpp:
412 (WebKit::NPObjectProxy::setProperty):
413 Send a SetProperty message.
415 (WebKit::NPObjectProxy::NP_SetProperty):
416 Call NPObjectProxy::setProperty.
418 2010-11-03 Anders Carlsson <andersca@apple.com>
420 Reviewed by Simon Fraser.
422 Out of process plug-ins don't support the CA drawing model
423 https://bugs.webkit.org/show_bug.cgi?id=48950
424 <rdar://problem/8626019>
426 * Platform/CoreIPC/HandleMessage.h:
427 (CoreIPC::callMemberFunction):
430 * PluginProcess/PluginControllerProxy.cpp:
431 (WebKit::PluginControllerProxy::initialize):
432 Call platformInitialize().
434 (WebKit::PluginControllerProxy::destroy):
435 Call platformDestroy().
437 (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
438 Assume that accelerated compositing is available if we have a render server port.
440 (WebKit::PluginControllerProxy::geometryDidChange):
441 Call platformGeometryDidChange().
443 * PluginProcess/PluginProcess.h:
444 * PluginProcess/WebProcessConnection.cpp:
445 (WebKit::WebProcessConnection::createPlugin):
446 Pass back the remote layer client ID.
448 * PluginProcess/WebProcessConnection.messages.in:
449 Add a remoteLayerClientID out parameter to CreatePlugin.
451 * PluginProcess/mac/PluginControllerProxyMac.mm: Added.
452 (WebKit::PluginControllerProxy::platformInitialize):
453 If the plug-in has a layer, create a remote layer client and associate it with the layer.
455 (WebKit::PluginControllerProxy::platformDestroy):
456 Invalidate the remote layer client.
458 (WebKit::PluginControllerProxy::remoteLayerClientID):
459 Return the remote layer client ID if one exists.
461 (WebKit::PluginControllerProxy::platformGeometryDidChange):
462 Update the layer bounds.
464 * WebKit2.xcodeproj/project.pbxproj:
467 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: Added.
468 (WebKit::PluginProxy::pluginLayer):
469 Create a render layer if needed.
471 (WebKit::PluginProxy::needsBackingStore):
472 Return whether the plug-in needs a backing store. (It doesn't need a backing store if it's a CA plug-in).
474 * WebProcess/Plugins/PluginProxy.cpp:
475 (WebKit::PluginProxy::PluginProxy):
476 Initialize m_remoteLayerClientID.
478 (WebKit::PluginProxy::initialize):
479 Set m_remoteLayerClientID.
481 (WebKit::PluginProxy::paint):
482 Bail if the plug-in doesn't need a backing store.
484 (WebKit::PluginProxy::geometryDidChange):
485 Don't create a backing store if the plug-in doesn't need one.
487 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
488 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
489 Remove RetainPtr initialization.
491 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
492 (WebKit::LayerBackedDrawingArea::platformClear):
493 Use nullptr instead of 0.
495 2010-11-03 Anders Carlsson <andersca@apple.com>
497 Reviewed by Simon Fraser.
499 Crash when layout in response to setSize changes the drawing area
500 https://bugs.webkit.org/show_bug.cgi?id=48947
502 This is tested by compositing/plugins/small-to-large-composited-plugin.html.
504 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
505 (WebKit::ChunkedUpdateDrawingArea::setSize):
506 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
507 (WebKit::LayerBackedDrawingArea::setSize):
509 2010-11-03 Anders Carlsson <andersca@apple.com>
511 Reviewed by Adam Roben.
513 Pass the accelerated compositing render server port to the plug-in process at startup
514 https://bugs.webkit.org/show_bug.cgi?id=48925
516 * PluginProcess/PluginProcess.cpp:
517 (WebKit::PluginProcess::PluginProcess):
518 Initialize m_compositingRenderServerPort to MACH_PORT_NULL.
520 (WebKit::PluginProcess::initialize):
521 Get the plug-in path and render server port from the creation parameters.
523 * PluginProcess/PluginProcess.messages.in:
524 Change the Initialize message to take a PluginProcessCreationParameters struct.
526 * Shared/Plugins/PluginProcessCreationParameters.cpp: Added.
527 * Shared/Plugins/PluginProcessCreationParameters.h: Added.
528 Add new PluginProcessCreationParameters struct.
530 * UIProcess/Plugins/PluginProcessProxy.cpp:
531 (WebKit::PluginProcessProxy::didFinishLaunching):
532 Initialize now takes a PluginProcessCreationParameters struct.
534 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: Added.
535 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
536 Initialize the render server port.
538 * WebKit2.xcodeproj/project.pbxproj:
541 2010-11-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
543 Reviewed by Kenneth Rohde Christiansen.
545 [Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
547 Otherwise the library order will get messed up and cause
548 missing symbols on Mac OS X.
553 2010-11-02 Daniel Bates <dbates@rim.com>
555 Reviewed by Adam Barth.
557 For unnamed frames, window.name returns a generated name
558 https://bugs.webkit.org/show_bug.cgi?id=6751
562 Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
564 * WebProcess/WebPage/WebFrame.cpp:
565 (WebKit::WebFrame::name):
567 2010-11-02 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
569 Reviewed by Martin Robinson.
571 Changes to enable building WebKit2 for Gtk port.
572 (https://bugs.webkit.org/show_bug.cgi?id=37369)
574 * Platform/gtk: Added.
575 * Platform/gtk/SharedMemoryGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
576 (WebKit::SharedMemory::Handle::Handle):
577 (WebKit::SharedMemory::Handle::~Handle):
578 (WebKit::SharedMemory::Handle::encode):
579 (WebKit::SharedMemory::Handle::decode):
580 (WebKit::SharedMemory::create):
581 (WebKit::SharedMemory::~SharedMemory):
582 (WebKit::SharedMemory::createHandle):
583 (WebKit::SharedMemory::systemPageSize):
585 * Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
586 (WebKit::BackingStore::createGraphicsContext):
587 (WebKit::BackingStore::paint):
588 * Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
589 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
590 (WebKit::PlatformCertificateInfo::encode):
591 (WebKit::PlatformCertificateInfo::decode):
592 * Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
593 (CoreIPC::encodeResourceRequest):
594 (CoreIPC::decodeResourceRequest):
595 * UIProcess/Plugins/gtk: Added.
596 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
597 (WebKit::PluginInfoStore::pluginsDirectories):
598 (WebKit::PluginInfoStore::pluginPathsInDirectory):
599 (WebKit::PluginInfoStore::individualPluginPaths):
600 (WebKit::PluginInfoStore::getPluginInfo):
601 (WebKit::PluginInfoStore::shouldUsePlugin):
602 * WebProcess/InjectedBundle/InjectedBundle.h:
603 * WebProcess/InjectedBundle/gtk: Added.
604 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
605 (WebKit::InjectedBundle::load):
606 (WebKit::InjectedBundle::activateMacFontAscentHack):
607 * WebProcess/Plugins/Netscape/gtk: Added.
608 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
609 (WebKit::NetscapePlugin::platformPostInitialize):
610 (WebKit::NetscapePlugin::platformDestroy):
611 (WebKit::NetscapePlugin::platformGeometryDidChange):
612 (WebKit::NetscapePlugin::platformPaint):
614 (WebKit::NetscapePlugin::platformHandleMouseEvent):
615 (WebKit::NetscapePlugin::platformHandleWheelEvent):
616 (WebKit::NetscapePlugin::platformSetFocus):
617 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
618 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
619 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
620 * WebProcess/WebCoreSupport/gtk: Added.
621 * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
622 (WebFrameNetworkingContext::create):
623 (WebFrameNetworkingContext::WebFrameNetworkingContext):
625 2010-11-02 Jing Jin <jjin@apple.com>
627 Reviewed by Alexey Proskuryakov.
629 Key down calls are not being sent to the application.
630 https://bugs.webkit.org/show_bug.cgi?id=48867
632 * UIProcess/API/mac/WKView.mm:
633 (-[WKView keyDown:]): Call super when ignoring a key down.
635 2010-11-02 Anders Carlsson <andersca@apple.com>
637 Reviewed by John Sullivan.
639 Add Null and Int32 to NPVariantData
640 https://bugs.webkit.org/show_bug.cgi?id=48887
642 * Shared/Plugins/NPRemoteObjectMap.cpp:
643 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
644 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
645 * Shared/Plugins/NPVariantData.cpp:
646 (WebKit::NPVariantData::NPVariantData):
647 (WebKit::NPVariantData::makeNull):
648 (WebKit::NPVariantData::makeInt32):
649 (WebKit::NPVariantData::encode):
650 (WebKit::NPVariantData::decode):
651 * Shared/Plugins/NPVariantData.h:
652 (WebKit::NPVariantData::int32Value):
654 2010-11-02 Anders Carlsson <andersca@apple.com>
656 Reviewed by Adam Roben.
658 Add support for NP_HasMethod and NP_Invoke
659 https://bugs.webkit.org/show_bug.cgi?id=48882
661 * Platform/CoreIPC/HandleMessage.h:
662 (CoreIPC::callMemberFunction):
665 * Shared/Plugins/NPObjectMessageReceiver.cpp:
666 (WebKit::NPObjectMessageReceiver::hasMethod):
667 Call hasMethod and return the result.
669 (WebKit::NPObjectMessageReceiver::invoke):
670 Convert the arguments, call invoke and return the result.
672 (WebKit::NPObjectMessageReceiver::getProperty):
673 Release the converted variant.
675 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
676 Add HasMethod and Invoke messages.
678 * Shared/Plugins/NPObjectProxy.cpp:
679 (WebKit::NPObjectProxy::hasMethod):
680 Send the HasMethod message.
682 (WebKit::NPObjectProxy::invoke):
683 Send the Invoke message.
685 (WebKit::NPObjectProxy::NP_HasMethod):
688 (WebKit::NPObjectProxy::NP_Invoke):
691 2010-11-02 Anders Carlsson <andersca@apple.com>
693 Reviewed by Sam Weinig.
695 Implement NP_HasProperty for NPObjectProxy
696 https://bugs.webkit.org/show_bug.cgi?id=48876
698 * Shared/Plugins/NPObjectMessageReceiver.cpp:
699 (WebKit::NPObjectMessageReceiver::hasProperty):
700 Call The hasProperty callback function.
702 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
703 Add HasProperty message.
705 * Shared/Plugins/NPObjectProxy.cpp:
706 (WebKit::NPObjectProxy::hasProperty):
707 Send the HasProperty message.
709 (WebKit::NPObjectProxy::NP_HasProperty):
713 2010-11-02 Sam Weinig <sam@webkit.org>
715 Reviewed by Anders Carlsson.
717 Add a way to send startup messages on the context which can be posted when a process launches
718 <rdar://problem/8617928>
719 https://bugs.webkit.org/show_bug.cgi?id=48838
721 Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
722 APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
723 function each time a process starts up. This can help in cases where
724 the WebProcess dies, and will be helpful in the world where there are
725 multiple WebProcess's per context.
727 * Scripts/webkit2/messages.py:
728 * UIProcess/API/C/WKContext.cpp:
729 (WKContextSetInitializationUserDataForInjectedBundle):
730 * UIProcess/API/C/WKContext.h:
731 * UIProcess/WebContext.cpp:
732 (WebKit::WebContext::ensureWebProcess):
733 * UIProcess/WebContext.h:
734 (WebKit::WebContext::setInjectedBundleInitializationUserData):
735 (WebKit::WebContext::injectedBundleInitializationUserData):
736 * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
737 * WebProcess/InjectedBundle/InjectedBundle.h:
738 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
739 (WebKit::InjectedBundle::load):
740 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
741 (WebKit::InjectedBundle::load):
742 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
743 (WebKit::InjectedBundle::load):
744 * WebProcess/WebProcess.cpp:
745 (WebKit::WebProcess::initializeWebProcess):
746 * WebProcess/WebProcess.h:
747 * WebProcess/WebProcess.messages.in:
749 2010-11-02 Anders Carlsson <andersca@apple.com>
751 Reviewed by Sam Weinig.
753 Implement PluginProxy::pluginScriptableNPObject
754 https://bugs.webkit.org/show_bug.cgi?id=48874
756 * PluginProcess/PluginControllerProxy.cpp:
757 (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
758 Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
760 * PluginProcess/PluginControllerProxy.messages.in:
761 Add GetPluginScriptableNPObject message.
763 * WebProcess/Plugins/PluginProxy.cpp:
764 (WebKit::PluginProxy::pluginScriptableNPObject):
765 Send the GetPluginScriptableNPObject message.
767 2010-11-02 Anders Carlsson <andersca@apple.com>
769 Reviewed by Dan Bernstein.
771 Add strings to NPVariantData
772 https://bugs.webkit.org/show_bug.cgi?id=48871
774 * Shared/Plugins/NPRemoteObjectMap.cpp:
775 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
776 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
777 * Shared/Plugins/NPVariantData.cpp:
778 (WebKit::NPVariantData::makeString):
779 (WebKit::NPVariantData::encode):
780 (WebKit::NPVariantData::decode):
781 * Shared/Plugins/NPVariantData.h:
782 (WebKit::NPVariantData::stringValue):
784 2010-11-02 Anders Carlsson <andersca@apple.com>
786 Reviewed by Dan Bernstein.
788 Add convenience functions for allocating NPAPI memory
789 https://bugs.webkit.org/show_bug.cgi?id=48870
791 Add npnMemAlloc, npnMemFree and createNPString functions and
792 npnMemNew, npnMemNewArray function templates.
794 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
795 (WebKit::JSNPObject::getOwnPropertyNames):
798 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
799 (WebKit::NPJSObject::enumerate):
802 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
803 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
806 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
807 (WebKit::npnMemAlloc):
810 (WebKit::npnMemFree):
813 (WebKit::createNPString):
814 Allocate the characters for a new NPString.
816 (WebKit::createNPObject):
819 (WebKit::deallocateNPObject):
822 (WebKit::releaseNPVariantValue):
825 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
827 (WebKit::npnMemNewArray):
830 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
831 (WebKit::NPN_MemAlloc):
834 (WebKit::NPN_MemFree):
837 (WebKit::NPN_UTF8FromIdentifier):
840 (WebKit::copyCString):
841 Call npnMemNewArray. Correctly initialize the "len" out parameter.
843 2010-11-02 Jessie Berlin <jberlin@apple.com>
845 Windows build fix. Unreviewed.
847 * win/WebKit2Generated.make:
848 Add WKInspector.h so that it is copied over to the WebKitBuild directory.
850 2010-11-02 Anders Carlsson <andersca@apple.com>
852 Reviewed by Adam Roben.
854 Add some support for remote and local NPObjects to NPRemoteObjectMap
855 https://bugs.webkit.org/show_bug.cgi?id=48864
857 * Shared/Plugins/NPRemoteObjectMap.cpp:
858 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
859 If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
862 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
863 If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
865 * Shared/Plugins/NPVariantData.cpp:
866 (WebKit::NPVariantData::NPVariantData):
867 Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
869 (WebKit::NPVariantData::makeLocalNPObjectID):
870 Create an NPVariantData that contains a local NPObject ID.
872 (WebKit::NPVariantData::encode):
873 Handle local and remote NPObject IDs.
875 (WebKit::NPVariantData::decode):
876 Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
877 decoded as a local NPObjectID (and vice versa).
879 * Shared/Plugins/NPVariantData.h:
880 (WebKit::NPVariantData::localNPObjectIDValue):
881 (WebKit::NPVariantData::remoteNPObjectIDValue):
883 2010-11-02 Anders Carlsson <andersca@apple.com>
885 Attempt to fix a GCC release only warning.
887 * Shared/Plugins/NPVariantData.cpp:
888 (WebKit::NPVariantData::NPVariantData):
890 2010-11-02 Anders Carlsson <andersca@apple.com>
892 Reviewed by John Sullivan.
894 Invalidate the NPRemoteObjectMap
895 https://bugs.webkit.org/show_bug.cgi?id=48856
897 * Shared/Plugins/NPObjectMessageReceiver.cpp:
898 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
899 Remove FIXME. The NPRemoteObjectMap always outlives the NPObjectMessageReceiver.
901 * Shared/Plugins/NPObjectProxy.cpp:
902 (WebKit::NPObjectProxy::~NPObjectProxy):
903 Call npObjectProxyDestroyed here.
905 (WebKit::NPObjectProxy::invalidate):
906 Null out m_npRemoteObjectMap.
908 * Shared/Plugins/NPRemoteObjectMap.cpp:
909 (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
912 (WebKit::NPRemoteObjectMap::createNPObjectProxy):
913 Keep track of the NPObjectProxy by adding it to the m_npObjectProxies set.
915 (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
916 Remove the NPObjectProxy from the m_npObjectProxies set.
918 (WebKit::NPRemoteObjectMap::invalidate):
919 Delete all NPObjectMessageReceivers. Iterate over all NPObjectProxy objects and invalidate them.
921 2010-11-02 Mike Thole <mthole@apple.com>
923 Reviewed by Anders Carlsson.
925 WebProcessManager informed about crashes too late (pages may have already tried to load a new URL)
926 https://bugs.webkit.org/show_bug.cgi?id=48853
928 This also fixes: <rdar://problem/8610451> Webkit2: Crash in WebKit!WebKit::WebProcessProxy::sendMessage opening google.com page
930 * UIProcess/WebProcessProxy.cpp:
931 (WebKit::WebProcessProxy::~WebProcessProxy):
932 Removed invalid assertion that is hit when the WebProcess dies unexpectedly.
933 (WebKit::WebProcessProxy::didClose):
934 Reordered so that the individual pages are informed that the processDidCrash() after the shared
935 WebProcessManager has been. This allows the pages to properly trigger a new process to be launched.
937 2010-11-02 Enrica Casucci <enrica@apple.com>
939 Reviewed by Alexey Proskuryakov.
941 WebKit2: Repeated cmd-key presses lead to unusable UI state
942 https://bugs.webkit.org/show_bug.cgi?id=48811
943 <rdar://problem/8611924>
945 Given the asynchronous nature of every interaction with the WebProcess,
946 we could re-send a keyDown event to AppKit that maps to an
947 action that is currently disabled and therefore will not trigger an action
948 but a call to the keyDown method of the NSView. We need to detect this
949 situation to avoid an infinite loop.
951 * UIProcess/API/mac/WKView.mm:
952 (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
953 to the moment we receive another event.
954 (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
956 2010-11-02 Anders Carlsson <andersca@apple.com>
958 Reviewed by John Sullivan.
960 Handle boolean values in NPVariant and NPVariantData
961 https://bugs.webkit.org/show_bug.cgi?id=48852
963 * Shared/Plugins/NPRemoteObjectMap.cpp:
964 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
965 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
966 * Shared/Plugins/NPVariantData.cpp:
967 (WebKit::NPVariantData::makeBool):
968 (WebKit::NPVariantData::encode):
969 (WebKit::NPVariantData::decode):
970 * Shared/Plugins/NPVariantData.h:
971 (WebKit::NPVariantData::boolValue):
973 2010-11-02 Anders Carlsson <andersca@apple.com>
975 Reviewed by John Sullivan.
977 Assertion hit in WebProcessProxy::~WebProcessProxy()
978 https://bugs.webkit.org/show_bug.cgi?id=48849
979 <rdar://problem/8617676>
981 It is perfectly valid for the page map to contain pages if the web process proxy
982 goes away, this can happen if the process crashes for example.
984 * UIProcess/WebProcessProxy.cpp:
985 (WebKit::WebProcessProxy::~WebProcessProxy):
986 Remove the assertion.
988 2010-11-02 Christian Sejersen <christian.webkit@gmail.com>
990 Reviewed by Andreas Kling.
992 The previous patch only took into account arm targets. This one
993 now checks whether the build is done inside Scratchbox.
994 https://bugs.webkit.org/show_bug.cgi?id=47895
996 * DerivedSources.pro:
998 2010-11-02 Anders Carlsson <andersca@apple.com>
1000 Reviewed by Adam Roben.
1003 https://bugs.webkit.org/show_bug.cgi?id=48847
1005 * PluginProcess/WebProcessConnection.cpp:
1006 (WebKit::WebProcessConnection::~WebProcessConnection):
1009 (WebKit::WebProcessConnection::removePluginControllerProxy):
1010 If we have no more plug-in controller proxies, invalidate the remote object map.
1012 * Shared/Plugins/NPIdentifierData.cpp:
1013 (WebKit::NPIdentifierData::createNPIdentifier):
1014 Create an NPIdentifier from the given NPIdentifierData.
1016 * Shared/Plugins/NPObjectMessageReceiver.cpp:
1017 (WebKit::NPObjectMessageReceiver::create):
1018 (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1019 This now takes the NPRemoteObjectMap as well as the npObjectID of the object.
1021 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1022 Unregister the object.
1024 (WebKit::NPObjectMessageReceiver::deallocate):
1027 (WebKit::NPObjectMessageReceiver::getProperty):
1028 Ask the NPObject for the property and convert it back to an NPVariantData.
1030 * Shared/Plugins/NPObjectProxy.cpp:
1031 (WebKit::NPObjectProxy::~NPObjectProxy):
1032 Send a Deallocate message to the corresponding message receiver on the other side.
1034 (WebKit::NPObjectProxy::getProperty):
1035 Convert the NPVariantData back to an NPVariant and return it.
1037 * Shared/Plugins/NPRemoteObjectMap.cpp:
1038 (WebKit::NPRemoteObjectMap::registerNPObject):
1039 Pass the NPRemoteObjectMap and the npObjectID to NPObjectMessageReceiver::create.
1041 (WebKit::NPRemoteObjectMap::unregisterNPObject):
1042 Remove the given object from the map of registered objects.
1044 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
1045 Given an NPVariant, create an NPVariantData. Only supports void and double types right now.
1047 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
1048 Given an NPVariantData, create an NPVariant. Only supports void and double types right now.
1050 (WebKit::NPRemoteObjectMap::invalidate):
1053 * Shared/Plugins/NPVariantData.cpp:
1054 (WebKit::NPVariantData::NPVariantData):
1055 Set the type to void by default.
1057 (WebKit::NPVariantData::makeVoid):
1058 Return a void NPVariantData.
1060 (WebKit::NPVariantData::makeDouble):
1061 Return an NPVariantData that contains a double value.
1063 (WebKit::NPVariantData::encode):
1064 Encode the NPVariantData.
1066 (WebKit::NPVariantData::decode):
1067 Decode the NPVariantData.
1069 * Shared/Plugins/NPVariantData.h:
1070 (WebKit::NPVariantData::type):
1071 Return the type of the NPVariantData.
1073 (WebKit::NPVariantData::doubleValue):
1074 Return the double value of the NPVariantData.
1076 * UIProcess/WebProcessProxy.cpp:
1077 (WebKit::WebProcessProxy::didClose):
1078 Use nullptr instead of 0.
1080 * WebProcess/Plugins/PluginProcessConnection.cpp:
1081 (WebKit::PluginProcessConnection::~PluginProcessConnection):
1082 Assert that the connection and the remote object map are both null.
1084 (WebKit::PluginProcessConnection::removePluginProxy):
1085 If this was the last plug-in proxy, invalidate the remote object map.
1087 * WebProcess/WebProcess.cpp:
1088 (WebKit::WebProcess::shutdown):
1089 Use nullptr instead of 0.
1091 2010-11-02 Balazs Kelemen <kbalazs@webkit.org>
1093 Unreviewed Qt buildfix.
1095 * DerivedSources.pro: Add WebInspector to the list of
1098 2010-11-02 Balazs Kelemen <kbalazs@webkit.org>
1100 Reviewed by Andreas Kling.
1102 [Qt][WK2] SharedMemory is broken
1103 https://bugs.webkit.org/show_bug.cgi?id=48520
1105 Implement SharedMemory with QSharedMemory to correctly handle
1106 ownership and to avoid extra allocation for page size requests.
1107 * Platform/SharedMemory.h:
1108 * Platform/qt/SharedMemoryQt.cpp:
1109 (WebKit::SharedMemory::Handle::Handle):
1110 (WebKit::SharedMemory::Handle::isNull):
1111 (WebKit::SharedMemory::Handle::encode):
1112 (WebKit::SharedMemory::Handle::decode):
1113 (WebKit::createUniqueKey):
1114 (WebKit::SharedMemory::create):
1115 (WebKit::accessMode):
1116 (WebKit::SharedMemory::~SharedMemory):
1117 (WebKit::SharedMemory::createHandle):
1119 2010-11-02 Timothy Hatcher <timothy@apple.com>
1121 Add WKInspector public APIs.
1123 https://webkit.org/b/48718
1125 Reviewed by Pavel Feldman.
1127 * DerivedSources.make: Added WebInspector to MESSAGE_RECEIVERS section.
1128 * UIProcess/API/C/WKInspector.cpp:
1129 (WKInspectorIsVisible): Added.
1130 (WKInspectorShow): Added.
1131 (WKInspectorClose): Added.
1132 (WKInspectorShowConsole): Added.
1133 (WKInspectorIsAttached): Added.
1134 (WKInspectorAttach): Added.
1135 (WKInspectorDetach): Added.
1136 (WKInspectorIsDebuggingJavaScript): Added.
1137 (WKInspectorToggleJavaScriptDebugging): Added.
1138 (WKInspectorIsProfilingJavaScript): Added.
1139 (WKInspectorToggleJavaScriptProfiling): Added.
1140 (WKInspectorIsProfilingPage): Added.
1141 (WKInspectorTogglePageProfiling): Added.
1142 * UIProcess/API/C/WKInspector.h: Added new functions.
1143 * UIProcess/WebInspectorProxy.cpp:
1144 (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize new booleans.
1145 (WebKit::WebInspectorProxy::invalidate): Reset new booleans.
1146 (WebKit::WebInspectorProxy::show): Added.
1147 (WebKit::WebInspectorProxy::close): Added.
1148 (WebKit::WebInspectorProxy::showConsole): Added.
1149 (WebKit::WebInspectorProxy::attach): Added.
1150 (WebKit::WebInspectorProxy::detach): Added.
1151 (WebKit::WebInspectorProxy::toggleJavaScriptDebugging): Added.
1152 (WebKit::WebInspectorProxy::toggleJavaScriptProfiling): Added.
1153 (WebKit::WebInspectorProxy::togglePageProfiling): Added.
1154 * UIProcess/WebInspectorProxy.h:
1155 (WebKit::WebInspectorProxy::isVisible): Added.
1156 (WebKit::WebInspectorProxy::isAttached): Added.
1157 (WebKit::WebInspectorProxy::isDebuggingJavaScript): Added.
1158 (WebKit::WebInspectorProxy::isProfilingJavaScript): Added.
1159 (WebKit::WebInspectorProxy::isProfilingPage): Added.
1160 * UIProcess/WebPageProxy.cpp:
1161 (WebKit::WebPageProxy::close): Invalidate the WebInspectorProxy.
1162 (WebKit::WebPageProxy::inspector): Return 0 if closed or invalid.
1163 * WebKit2.pro: Added new files.
1164 * WebKit2.xcodeproj/project.pbxproj: Added new Files.
1165 * WebProcess/WebPage/WebInspector.cpp:
1166 (WebKit::WebInspector::show): Added.
1167 (WebKit::WebInspector::close): Added.
1168 (WebKit::WebInspector::showConsole): Added.
1169 (WebKit::WebInspector::startJavaScriptDebugging): Added.
1170 (WebKit::WebInspector::stopJavaScriptDebugging): Added.
1171 (WebKit::WebInspector::startJavaScriptProfiling): Added.
1172 (WebKit::WebInspector::stopJavaScriptProfiling): Added.
1173 (WebKit::WebInspector::startPageProfiling): Added.
1174 (WebKit::WebInspector::stopPageProfiling): Added.
1175 * WebProcess/WebPage/WebInspector.h:
1176 (WebKit::WebInspector::page): Added.
1177 * WebProcess/WebPage/WebInspector.messages.in: Added.
1178 * WebProcess/WebPage/WebPage.cpp:
1179 (WebKit::WebPage::close): Destroy the WebInspector.
1180 (WebKit::WebPage::inspector): Return 0 if closed.
1181 (WebKit::WebPage::didReceiveMessage): Send the message to the WebInspector
1182 if the message class is MessageClassWebInspector.
1183 * win/WebKit2.vcproj: Added new files.
1185 2010-11-02 Timothy Hatcher <timothy@apple.com>
1187 Make WebInspectorFrontendClient inherit from InspectorFrontendClientLocal.
1189 We can do this since the Web Inspector WebPage will share the same process
1190 with the inspected WebPage.
1192 https://webkit.org/b/48652
1194 Reviewed by Pavel Feldman.
1196 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1197 (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
1198 Call the InspectorFrontendClientLocal constructor.
1199 (WebKit::WebInspectorFrontendClient::attachWindow): Added.
1200 (WebKit::WebInspectorFrontendClient::detachWindow): Added.
1201 (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Added.
1202 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1204 2010-11-01 Juha Savolainen <juha.savolainen@weego.fi>
1206 Reviewed by Kenneth Rohde Christiansen.
1208 Initial implementation of QWKHistoryItem.
1209 https://bugs.webkit.org/show_bug.cgi?id=48620
1211 The QWkHistoryItem represents one item in the history of QWKPage.
1213 * UIProcess/API/qt/qwkhistory.cpp:
1214 (QWKHistoryItemPrivate::QWKHistoryItemPrivate):
1215 (QWKHistoryItem::QWKHistoryItem):
1216 (QWKHistoryItem::~QWKHistoryItem):
1217 (QWKHistoryItem::title): The page title
1218 (QWKHistoryItem::url): The URL of the page.
1219 (QWKHistoryItem::originalUrl): The URL used to access the page.
1220 * UIProcess/API/qt/qwkhistory.h:
1221 * UIProcess/API/qt/qwkhistory_p.h:
1222 * WebKit2.pro: Added WKBackForwardListItem.h and WKBackForwardListItem.cpp
1224 2010-11-01 Anders Carlsson <andersca@apple.com>
1226 Reviewed by Oliver Hunt.
1228 Make NPRemoteObjectMap a ref counted object
1229 https://bugs.webkit.org/show_bug.cgi?id=48808
1231 * PluginProcess/PluginControllerProxy.cpp:
1232 (WebKit::PluginControllerProxy::windowScriptNPObject):
1233 * PluginProcess/WebProcessConnection.cpp:
1234 (WebKit::WebProcessConnection::WebProcessConnection):
1235 (WebKit::WebProcessConnection::didReceiveSyncMessage):
1236 * PluginProcess/WebProcessConnection.h:
1237 (WebKit::WebProcessConnection::npRemoteObjectMap):
1238 * Shared/Plugins/NPRemoteObjectMap.cpp:
1239 (WebKit::NPRemoteObjectMap::create):
1240 (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
1241 (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1242 * Shared/Plugins/NPRemoteObjectMap.h:
1243 * WebProcess/Plugins/PluginProcessConnection.cpp:
1244 (WebKit::PluginProcessConnection::PluginProcessConnection):
1245 (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1246 * WebProcess/Plugins/PluginProcessConnection.h:
1247 (WebKit::PluginProcessConnection::npRemoteObjectMap):
1248 * WebProcess/Plugins/PluginProxy.cpp:
1249 (WebKit::PluginProxy::getWindowScriptNPObject):
1251 2010-11-01 Anders Carlsson <andersca@apple.com>
1253 Reviewed by John Sullivan.
1255 Respond to NP_GetProperty by sending a GetProperty message
1256 https://bugs.webkit.org/show_bug.cgi?id=48797
1258 * Platform/CoreIPC/HandleMessage.h:
1259 (CoreIPC::callMemberFunction):
1260 Add new sync message overload.
1262 * PluginProcess/WebProcessConnection.cpp:
1263 (WebKit::WebProcessConnection::didReceiveSyncMessage):
1264 If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
1266 * Shared/Plugins/NPIdentifierData.cpp:
1267 * Shared/Plugins/NPIdentifierData.h:
1268 Add NPIdentifierData, a CoreIPC representation of an NPIdentifier.
1270 * Shared/Plugins/NPObjectMessageReceiver.cpp:
1271 (WebKit::NPObjectMessageReceiver::getProperty):
1274 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
1277 * Shared/Plugins/NPObjectProxy.cpp:
1278 (WebKit::NPObjectProxy::create):
1279 (WebKit::NPObjectProxy::NPObjectProxy):
1280 (WebKit::NPObjectProxy::initialize):
1281 NPObjectProxy now takes an NPRemoteObjectMap in its create function.
1283 (WebKit::NPObjectProxy::getProperty):
1284 Send a GetProperty message.
1286 (WebKit::NPObjectProxy::NP_GetProperty):
1289 * Shared/Plugins/NPRemoteObjectMap.cpp:
1290 (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1291 Pass the NPRemoteObjectMap.
1293 (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1294 Find the right message receiver and dispatch the message to it.
1296 * Shared/Plugins/NPVariantData.cpp:
1297 * Shared/Plugins/NPVariantData.h:
1298 Add NPVariantData, which will be a CoreIPC representation of an NPVariant.
1300 * WebKit2.xcodeproj/project.pbxproj:
1303 * WebProcess/Plugins/PluginProcessConnection.cpp:
1304 (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1305 If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
1307 2010-11-01 Anders Carlsson <andersca@apple.com>
1309 Reviewed by Sam Weinig.
1311 Add ArgumentCoder specialization for WTF::CString
1312 https://bugs.webkit.org/show_bug.cgi?id=48796
1314 * Platform/CoreIPC/ArgumentCoders.h:
1316 2010-11-01 Anders Carlsson <andersca@apple.com>
1320 * WebKit2.xcodeproj/project.pbxproj:
1322 2010-11-01 Anders Carlsson <andersca@apple.com>
1324 Reviewed by Adam Roben.
1326 Add NPObjectMessageReceiver.messages.in
1327 https://bugs.webkit.org/show_bug.cgi?id=48782
1329 * DerivedSources.make:
1330 Add NPObjectMessageReceiver.
1332 * Platform/CoreIPC/MessageID.h:
1333 Add MessageClassNPObjectMessageReceiver message class.
1335 * Shared/Plugins/NPObjectMessageReceiver.cpp:
1336 (WebKit::NPObjectMessageReceiver::deallocate):
1337 Add stubbed out deallocate member function.
1339 * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added.
1341 * WebKit2.xcodeproj/project.pbxproj:
1342 Add NPObjectMessageReceiver.messages.in.
1344 2010-11-01 Anders Carlsson <andersca@apple.com>
1346 Reviewed by Adam Roben.
1348 Start stubbing out NPClass functions in NPObjectProxy
1349 https://bugs.webkit.org/show_bug.cgi?id=48778
1351 * PluginProcess/PluginControllerProxy.cpp:
1352 (WebKit::PluginControllerProxy::windowScriptNPObject):
1353 getOrCreateNPObjectProxy is now createNPObjectProxy.
1355 * Shared/Plugins/NPObjectProxy.cpp:
1356 (WebKit::NPObjectProxy::create):
1357 Allocate and initialize an NPObjectProxy object.
1359 (WebKit::NPObjectProxy::NPObjectProxy):
1360 Initialize m_npObjectID to 0.
1362 (WebKit::NPObjectProxy::isNPObjectProxy):
1365 (WebKit::NPObjectProxy::initialize):
1368 (WebKit::NPObjectProxy::npClass):
1369 Return the NPClass with all functions filled in.
1371 (WebKit::NPObjectProxy::NP_Allocate):
1372 Create a new NPObjectProxy object.
1374 (WebKit::NPObjectProxy::NP_Deallocate):
1375 Deallocate the NPObjectProxy object.
1377 (WebKit::NPObjectProxy::NP_HasMethod):
1378 (WebKit::NPObjectProxy::NP_Invoke):
1379 (WebKit::NPObjectProxy::NP_InvokeDefault):
1380 (WebKit::NPObjectProxy::NP_HasProperty):
1381 (WebKit::NPObjectProxy::NP_GetProperty):
1382 (WebKit::NPObjectProxy::NP_SetProperty):
1383 (WebKit::NPObjectProxy::NP_RemoveProperty):
1384 (WebKit::NPObjectProxy::NP_Enumerate):
1385 (WebKit::NPObjectProxy::NP_Construct):
1388 * Shared/Plugins/NPRemoteObjectMap.cpp:
1389 (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1390 * Shared/Plugins/NPRemoteObjectMap.h:
1391 Rename getOrCreateNPObjectProxy to createNPObjectProxy.
1393 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1394 (WebKit::NPJSObject::NP_Allocate):
1395 Remove unused parameter.
1397 2010-11-01 Anders Carlsson <andersca@apple.com>
1399 Reviewed by Adam Roben.
1401 Both the WebProcessConnection and PluginProcessConnection should have NPRemoteObjectMaps
1402 https://bugs.webkit.org/show_bug.cgi?id=48775
1404 * PluginProcess/PluginControllerProxy.cpp:
1405 (WebKit::PluginControllerProxy::windowScriptNPObject):
1406 Ask for an NPObjectProxy for the window script NPObject.
1408 * PluginProcess/WebProcessConnection.cpp:
1409 (WebKit::WebProcessConnection::WebProcessConnection):
1410 Initialize m_npRemoteObjectMap.
1412 * Shared/Plugins/NPObjectMessageReceiver.cpp:
1413 (WebKit::NPObjectMessageReceiver::create):
1414 Add a create member function that takes an NPObject.
1416 (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1417 Retain the NPObject.
1419 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1420 Release the NPObject.
1422 * Shared/Plugins/NPRemoteObjectMap.cpp:
1423 (WebKit::generateNPObjectID):
1424 Generate a unique 64-bit NPObject ID.
1426 (WebKit::NPRemoteObjectMap::getOrCreateNPObjectProxy):
1429 (WebKit::NPRemoteObjectMap::registerNPObject):
1430 Create a NPObjectMessageReceiver and add it to the map.
1432 * WebKit2.xcodeproj/project.pbxproj:
1433 Set the correct target for NPRuntime related files.
1435 * WebProcess/Plugins/PluginProcessConnection.cpp:
1436 (WebKit::PluginProcessConnection::PluginProcessConnection):
1437 Initialize m_npRemoteObjectMap
1439 * WebProcess/Plugins/PluginProxy.cpp:
1440 (WebKit::PluginProxy::getWindowScriptNPObject):
1441 Ask the real plug-in controller for the window script NPObject and register it.
1443 2010-11-01 John Sullivan <sullivan@apple.com>
1445 Reviewed by Anders Carlsson.
1447 https://bugs.webkit.org/show_bug.cgi?id=48774
1448 minimFontSize preference needs to be exposed in WebKit2
1450 * UIProcess/WebPreferences.cpp:
1451 (WebKit::WebPreferences::setMinimumFontSize):
1452 New function, parallel to existing functions for other preferences.
1453 (WebKit::WebPreferences::minimumFontSize):
1456 * UIProcess/WebPreferences.h:
1457 Declared new function.
1459 * UIProcess/API/C/WKPreferences.cpp:
1460 (WKPreferencesSetMinimumFontSize):
1461 New UI process wrapper for new function.
1462 (WKPreferencesGetMinimumFontSize):
1465 * UIProcess/API/C/WKPreferences.h:
1466 Declared new functions.
1468 2010-11-01 Anders Carlsson <andersca@apple.com>
1470 Reviewed by John Sullivan.
1472 Tear down the related WebProcessProxy when a WebContext is deallocated
1473 https://bugs.webkit.org/show_bug.cgi?id=48769
1475 * UIProcess/WebContext.cpp:
1476 (WebKit::WebContext::~WebContext):
1477 Call WebProcessManager::contextWasDestroyed.
1479 (WebKit::WebContext::didNavigateWithNavigationData):
1480 (WebKit::WebContext::didPerformClientRedirect):
1481 (WebKit::WebContext::didPerformServerRedirect):
1482 (WebKit::WebContext::didUpdateHistoryTitle):
1483 It is valid for a frame to have a null page here, if the frame has outlived
1486 * UIProcess/WebProcessManager.cpp:
1487 (WebKit::WebProcessManager::contextWasDestroyed):
1488 Remove the context from the map.
1490 * UIProcess/WebProcessProxy.cpp:
1491 (WebKit::WebProcessProxy::~WebProcessProxy):
1492 It's OK for the connection to be non-null here if the process goes away because
1493 the context has been deallocated.
1495 2010-11-01 Brady Eidson <beidson@apple.com>
1499 * UIProcess/win/WebView.cpp:
1501 2010-11-01 Brady Eidson <beidson@apple.com>
1503 Reviewed by Anders Carlsson.
1505 <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
1506 Context menu support for WebKit 2.
1509 * WebKit2.xcodeproj/project.pbxproj:
1510 * win/WebKit2.vcproj:
1512 * Shared/WebContextMenuItem.cpp: Added.
1513 (WebKit::WebContextMenuItem::WebContextMenuItem):
1514 (WebKit::WebContextMenuItem::encode):
1515 (WebKit::WebContextMenuItem::decode):
1517 * Shared/WebContextMenuItem.h: Added.
1519 * UIProcess/API/mac/PageClientImpl.h:
1520 * UIProcess/API/mac/PageClientImpl.mm:
1521 (WebKit::PageClientImpl::createContextMenuProxy):
1522 * UIProcess/API/qt/qwkpage.cpp:
1523 (QWKPagePrivate::createContextMenuProxy): Stub to keep the build working.
1524 * UIProcess/API/qt/qwkpage_p.h:
1525 * UIProcess/PageClient.h:
1527 * UIProcess/WebContextMenuProxy.cpp: Added.
1528 (WebKit::WebContextMenuProxy::~WebContextMenuProxy):
1529 (WebKit::WebContextMenuProxy::WebContextMenuProxy):
1530 * UIProcess/WebContextMenuProxy.h: Added.
1532 * UIProcess/WebPageProxy.cpp:
1533 (WebKit::WebPageProxy::showContextMenu): Shows the menu after receiving the message from the WebProcess.
1534 (WebKit::WebPageProxy::contextMenuItemSelected): Sends info about the selected menu item to the WebProcess
1535 * UIProcess/WebPageProxy.h:
1536 * UIProcess/WebPageProxy.messages.in:
1538 * UIProcess/mac/WebContextMenuProxyMac.h: Added.
1539 (WebKit::WebContextMenuProxyMac::create):
1540 * UIProcess/mac/WebContextMenuProxyMac.mm: Added.
1541 (+[WebMenuTarget sharedMenuTarget]):
1542 (-[WebMenuTarget WebKit::]):
1543 (-[WebMenuTarget setMenuProxy:WebKit::]):
1544 (-[WebMenuTarget forwardContextMenuAction:]):
1545 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1546 (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1547 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1548 (WebKit::populateNSMenu):
1549 (WebKit::nsMenuItemVector):
1550 (WebKit::WebContextMenuProxyMac::populate):
1551 (WebKit::WebContextMenuProxyMac::showContextMenu):
1552 (WebKit::WebContextMenuProxyMac::hideContextMenu):
1554 * UIProcess/win/WebView.cpp:
1555 (WebKit::WebView::createContextMenuProxy): Stub for now.
1556 * UIProcess/win/WebView.h:
1558 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1559 (WebKit::WebChromeClient::showContextMenu):
1560 * WebProcess/WebCoreSupport/WebChromeClient.h:
1562 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1563 (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Return the WebCore-provided default
1564 menu for now. Embedding app customization will come later (see bug 48720)
1566 * WebProcess/WebPage/WebContextMenu.cpp: Added.
1567 (WebKit::WebContextMenu::WebContextMenu):
1568 (WebKit::WebContextMenu::~WebContextMenu):
1569 (WebKit::WebContextMenu::show):
1570 (WebKit::WebContextMenu::itemSelected):
1571 * WebProcess/WebPage/WebContextMenu.h: Added.
1572 (WebKit::WebContextMenu::create):
1574 * WebProcess/WebPage/WebPage.cpp:
1575 (WebKit::WebPage::contextMenu):
1576 (WebKit::handleMouseEvent): Pass right mouse presses along to WebCore as both a mouse event and context menu event,
1577 the same way WebKit1 does.
1578 (WebKit::WebPage::didSelectItemFromActiveContextMenu):
1579 * WebProcess/WebPage/WebPage.h:
1580 * WebProcess/WebPage/WebPage.messages.in:
1582 2010-11-01 Adam Roben <aroben@apple.com>
1584 Cancel main resource loads after we hand them off to the media engine
1586 This is the WebKit2 equivalent of r51104. Clearly this code should be
1587 moved to a cross-platform location someday.
1589 Fixes <http://webkit.org/b/48561> <rdar://problem/8606679> Assertion
1590 failure in DocumentLoader::commitData when loading a media document in
1593 Reviewed by Eric Carlson.
1595 * WebProcess/WebCoreSupport/WebErrors.h: Added pluginWillHandleLoadError.
1597 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1598 (WebFrameLoaderClient::committedLoad): Cancel the main resource load
1599 after handing off the load to the media engine. This code originally
1600 came from -[WebHTMLRepresentation receivedData:withDataSource:].
1601 (WebKit::WebFrameLoaderClient::pluginWillHandleLoadError): Call through to WebErrors.
1602 (WebKit::WebFrameLoaderClient::shouldFallBack): Implemented. We fall
1603 back for all errors except when the load was cancelled or we handed it
1604 off to the media engine or a plugin.
1606 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1607 (WebKit::pluginWillHandleLoadError): Implemented.
1609 * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1610 (WebKit::pluginWillHandleLoadError): Stubbed out.
1612 * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
1613 (WebKit::pluginWillHandleLoadError): Implemented.
1615 2010-11-01 Andreas Kling <kling@webkit.org>
1617 Reviewed by Kenneth Rohde Christiansen.
1619 [Qt][WK2] Cleanup viewportAttributesForSize API
1621 Change QSize argument to a const QSize&.
1623 * UIProcess/API/qt/qwkpage.cpp:
1624 (QWKPage::viewportAttributesForSize):
1625 * UIProcess/API/qt/qwkpage.h:
1627 2010-10-31 Darin Adler <darin@apple.com>
1629 Reviewed by Dan Bernstein.
1631 Visited links not populated correctly in new web processes after the first
1632 https://bugs.webkit.org/show_bug.cgi?id=48735
1633 rdar://problem/8442177
1635 * UIProcess/VisitedLinkProvider.cpp:
1636 (WebKit::VisitedLinkProvider::VisitedLinkProvider): Initialize
1637 m_webProcessHasVisitedLinkState.
1638 (WebKit::VisitedLinkProvider::processDidFinishLaunching): Renamed
1639 from populateVisitedLinksIfNeeded. Set m_webProcessHasVisitedLinkState
1640 to false, since this is a new process, and also start the timer
1641 so the visited links messages will be sent.
1642 (WebKit::VisitedLinkProvider::processDidClose): Renamed from
1643 stopVisitedLinksTimer.
1644 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1645 Added logic so we send SetVisitedLinkTable and
1646 AllVisitedLinkStateChanged once to each new process and to set
1647 m_webProcessHasVisitedLinkState to true once that is done.
1649 * UIProcess/VisitedLinkProvider.h: Updated for above changes.
1651 * UIProcess/WebContext.cpp:
1652 (WebKit::WebContext::processDidFinishLaunching): Called
1653 VisitedLinkProvider function under its new name. Also used
1654 ASSERT_UNUSED rather than ASSERT since the argument is used
1655 only for the assertion.
1656 (WebKit::WebContext::processDidClose): Ditto.
1658 2010-10-30 Andreas Kling <kling@webkit.org>
1660 Reviewed by Kenneth Rohde Christiansen.
1662 [Qt][WK2] Crash in drawUpdateChunkIntoBackingStore
1663 https://bugs.webkit.org/show_bug.cgi?id=48707
1665 UpdateChunk images have to be created using the QImage constructor
1666 that takes a bytesPerLine (stride) value, or the data length won't
1667 match UpdateChunk::size().
1669 * Shared/qt/UpdateChunk.cpp:
1670 (WebKit::UpdateChunk::createImage):
1672 2010-10-29 Daniel Bates <dbates@rim.com>
1674 No review, rolling out 70971.
1675 http://trac.webkit.org/changeset/70971
1676 https://bugs.webkit.org/show_bug.cgi?id=6751
1678 Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
1679 it caused layout test failures on all bots. In particular, the
1680 child count in a generated frame name differs after this patch. We need
1681 to look into this further.
1683 * WebProcess/WebPage/WebFrame.cpp:
1684 (WebKit::WebFrame::name):
1686 2010-10-29 Daniel Bates <dbates@rim.com>
1688 Reviewed by Adam Barth.
1690 For unnamed frames, window.name returns a generated name
1691 https://bugs.webkit.org/show_bug.cgi?id=6751
1693 Modified WebKit2 to use FrameTree::uniqueName().
1695 * WebProcess/WebPage/WebFrame.cpp:
1696 (WebKit::WebFrame::name):
1698 2010-10-29 Sam Weinig <weinig@apple.com>
1700 Reviewed by Simon Fraser.
1702 Implement WebProcess::platformSetCacheModel for windows
1703 <rdar://problem/8605796>
1704 https://bugs.webkit.org/show_bug.cgi?id=48703
1706 * WebProcess/win/WebProcessWin.cpp:
1707 (WebKit::memorySize):
1708 (WebKit::volumeFreeSize):
1709 (WebKit::WebProcess::platformSetCacheModel):
1710 Add implemenation based on the version in WebKit/win/WebView.cpp.
1712 2010-10-29 Andreas Kling <kling@webkit.org>
1714 Reviewed by Anders Carlsson.
1716 WK2: Unbreak compilation of WebPlatformTouchPoint::decode()
1718 * Shared/WebPlatformTouchPoint.cpp:
1719 (WebKit::WebPlatformTouchPoint::decode):
1721 2010-10-29 Darin Adler <darin@apple.com>
1723 Reviewed by Sam Weinig.
1725 More back/forward refactoring
1727 * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
1728 * WebKit2.xcodeproj/project.pbxproj: Ditto.
1730 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
1731 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
1733 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
1734 (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
1735 (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
1736 (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
1737 (WebKit::InjectedBundleBackForwardList::clear): Ditto.
1739 * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
1741 * WebProcess/WebPage/WebPage.cpp:
1742 (WebKit::WebPage::WebPage): Set up backForwardClient.
1744 2010-10-29 Adam Roben <aroben@apple.com>
1746 Stop using encode/decodeBytes for WebEvent subclasses
1748 The use of encode/decodeBytes was making these classes sensitive to
1749 differences in padding on different architectures (e.g., 32-bit vs.
1750 64-bit). By encoding each data member explicitly we remove this
1751 sensitivity, allowing these classes to be passed between processes
1752 with different padding.
1754 Fixes <http://webkit.org/b/48552> <rdar://problem/8606571> Mouse
1755 events never reach Flash in WebKit2 on Mac (asserts in Debug builds)
1757 Reviewed by Anders Carlsson.
1759 * Platform/CoreIPC/Arguments.h:
1760 (CoreIPC::Arguments8::Arguments8):
1761 (CoreIPC::Arguments8::encode):
1762 (CoreIPC::Arguments8::decode):
1765 Added Arguments8, the biggest Arguments yet.
1767 * Shared/WebEvent.cpp:
1768 (WebKit::WebEvent::encode):
1769 (WebKit::WebEvent::decode):
1770 * Shared/WebKeyboardEvent.cpp:
1771 (WebKit::WebKeyboardEvent::encode):
1772 (WebKit::WebKeyboardEvent::decode):
1773 * Shared/WebMouseEvent.cpp:
1774 (WebKit::WebMouseEvent::encode):
1775 (WebKit::WebMouseEvent::decode):
1776 * Shared/WebPlatformTouchPoint.cpp:
1777 (WebKit::WebPlatformTouchPoint::encode):
1778 (WebKit::WebPlatformTouchPoint::decode):
1779 * Shared/WebTouchEvent.cpp:
1780 (WebKit::WebTouchEvent::encode):
1781 (WebKit::WebTouchEvent::decode):
1782 * Shared/WebWheelEvent.cpp:
1783 (WebKit::WebWheelEvent::encode):
1784 (WebKit::WebWheelEvent::decode):
1785 Changed all encode/decode function to use CoreIPC::In/Out to
1786 encode/decode data members individually.
1788 2010-10-29 Adam Roben <aroben@apple.com>
1790 Use only CoreIPC-sanctioned types in WebEvent subclasses
1792 Fixes <http://webkit.org//48694> WebEvent subclasses should not use
1793 architecture-dependent types
1795 Reviewed by Anders Carlsson.
1797 * Shared/WebEvent.h:
1798 (WebKit::WebEvent::type):
1799 (WebKit::WebMouseEvent::button):
1800 (WebKit::WebMouseEvent::clickCount):
1801 (WebKit::WebWheelEvent::granularity):
1802 (WebKit::WebPlatformTouchPoint::id):
1803 (WebKit::WebPlatformTouchPoint::state):
1804 Replaced enums, ints, and unsigneds with uint32_ts, int32_ts, and
1805 uint32_ts, respectively.
1807 2010-10-29 Anders Carlsson <andersca@apple.com>
1809 Reviewed by Adam Roben.
1811 Generate a DelayedReply struct for sync messages marked delayed
1812 https://bugs.webkit.org/show_bug.cgi?id=48696
1814 * Scripts/webkit2/messages.py:
1815 If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
1816 that can be used for sending the reply.
1818 * Scripts/webkit2/messages_unittest.py:
1819 Update expected results.
1821 2010-10-29 Anders Carlsson <andersca@apple.com>
1823 Reviewed by Adam Roben.
1825 Use WebPage::send in a couple of more places.
1827 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1828 (WebKit::WebChromeClient::setWindowRect):
1829 (WebKit::WebChromeClient::takeFocus):
1830 (WebKit::WebChromeClient::setToolbarsVisible):
1831 (WebKit::WebChromeClient::setStatusbarVisible):
1832 (WebKit::WebChromeClient::setMenubarVisible):
1833 (WebKit::WebChromeClient::setResizable):
1834 (WebKit::WebChromeClient::setStatusbarText):
1835 (WebKit::WebChromeClient::contentsSizeChanged):
1836 (WebKit::WebChromeClient::mouseDidMoveOverElement):
1837 (WebKit::WebChromeClient::setToolTip):
1838 (WebKit::WebChromeClient::setCursor):
1839 (WebKit::WebChromeClient::dispatchViewportDataDidChange):
1840 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1841 (WebKit::WebEditorClient::registerCommandForUndo):
1842 (WebKit::WebEditorClient::clearUndoRedoOperations):
1843 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1844 (WebKit::WebFrameLoaderClient::detachedFromParent2):
1845 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1846 (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1847 (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
1848 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1849 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1850 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
1851 (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1852 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1853 (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
1854 (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1855 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1856 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1857 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1858 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1859 (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
1860 (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
1861 (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
1862 (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
1863 (WebKit::WebFrameLoaderClient::didRunInsecureContent):
1864 (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
1865 * WebProcess/WebPage/FindController.cpp:
1866 (WebKit::FindController::findString):
1867 (WebKit::FindController::hideFindIndicator):
1868 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1869 (WebKit::WebBackForwardListProxy::addItem):
1870 (WebKit::WebBackForwardListProxy::goToItem):
1871 (WebKit::WebBackForwardListProxy::clear):
1872 * WebProcess/WebPage/WebFrame.cpp:
1873 (WebKit::WebFrame::createMainFrame):
1874 (WebKit::WebFrame::createSubframe):
1875 * WebProcess/WebPage/WebPage.cpp:
1876 (WebKit::WebPage::sendClose):
1877 (WebKit::WebPage::pageDidScroll):
1878 (WebKit::WebPage::mouseEvent):
1879 (WebKit::WebPage::wheelEvent):
1880 (WebKit::WebPage::keyEvent):
1881 (WebKit::WebPage::validateMenuItem):
1882 (WebKit::WebPage::touchEvent):
1883 (WebKit::WebPage::show):
1884 (WebKit::WebPage::runJavaScriptInMainFrame):
1885 (WebKit::WebPage::getRenderTreeExternalRepresentation):
1886 (WebKit::WebPage::getSourceForFrame):
1888 2010-10-29 Anders Carlsson <andersca@apple.com>
1890 Reviewed by Adam Roben.
1892 Add a MessageSender class template
1893 https://bugs.webkit.org/show_bug.cgi?id=48683
1895 * Platform/CoreIPC/MessageSender.h: Added.
1896 (CoreIPC::MessageSender::send):
1897 Add send overloads for simple message sending.
1900 * WebKit2.xcodeproj/project.pbxproj:
1903 * WebProcess/WebPage/FindController.cpp:
1904 (WebKit::FindController::countStringMatches):
1905 (WebKit::FindController::findString):
1906 (WebKit::FindController::updateFindIndicator):
1907 Call send on the web page.
1909 * WebProcess/WebPage/WebPage.cpp:
1910 (WebKit::WebPage::connection):
1911 Add connection(), used by the MessageSender.
1913 * WebProcess/WebPage/WebPage.h:
1914 (WebKit::WebPage::destinationID):
1915 Add destinationID(), used by the MessageSender.
1917 * win/WebKit2.vcproj:
1920 2010-10-29 Adam Roben <aroben@apple.com>
1922 Remove redundant data members from WebTouchEvent
1924 WebEvent already stores the Type and timestamp.
1926 Fixes <http://webkit.org/b/48671> WebTouchEvent duplicates data from
1929 Reviewed by Anders Carlsson.
1931 * Shared/WebEvent.h:
1932 * Shared/WebTouchEvent.cpp:
1933 (WebKit::WebTouchEvent::WebTouchEvent):
1934 Removed m_type and m_timestamp (which was never even getting
1937 2010-10-29 Anders Carlsson <andersca@apple.com>
1939 Reviewed by Adam Roben.
1941 Add the plug-in proxy to the map before sending the CreatePlugin message
1942 https://bugs.webkit.org/show_bug.cgi?id=48678
1944 * WebProcess/Plugins/PluginProxy.cpp:
1945 (WebKit::PluginProxy::initialize):
1947 2010-10-29 Anders Carlsson <andersca@apple.com>
1949 Reviewed by Adam Roben.
1951 Add GetWindowScriptNPObject message
1952 https://bugs.webkit.org/show_bug.cgi?id=48670
1954 * PluginProcess/PluginControllerProxy.cpp:
1955 (WebKit::PluginControllerProxy::windowScriptNPObject):
1956 Send the GetWindowScriptNPObject message.
1958 * WebProcess/Plugins/PluginProxy.cpp:
1959 (WebKit::PluginProxy::getWindowScriptNPObject):
1962 * WebProcess/Plugins/PluginProxy.messages.in:
1963 Add GetWindowScriptNPObject message.
1965 2010-10-29 Anders Carlsson <andersca@apple.com>
1967 Reviewed by Dan Bernstein.
1969 Change the Connection::sendSync timeout parameter to have the NoTimeout argument as a default
1970 argument and update all the call sites.
1972 * Platform/CoreIPC/Connection.h:
1973 * PluginProcess/PluginControllerProxy.cpp:
1974 (WebKit::PluginControllerProxy::proxiesForURL):
1975 (WebKit::PluginControllerProxy::cookiesForURL):
1976 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1977 (WebKit::InjectedBundle::postSynchronousMessage):
1978 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1979 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1980 * WebProcess/Plugins/PluginProxy.cpp:
1981 (WebKit::PluginProxy::initialize):
1982 (WebKit::PluginProxy::destroy):
1983 (WebKit::PluginProxy::paint):
1984 (WebKit::PluginProxy::handleMouseEvent):
1985 (WebKit::PluginProxy::handleWheelEvent):
1986 (WebKit::PluginProxy::handleMouseEnterEvent):
1987 (WebKit::PluginProxy::handleMouseLeaveEvent):
1988 (WebKit::PluginProxy::handleKeyboardEvent):
1989 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1990 (WebKit::WebChromeClient::windowRect):
1991 (WebKit::WebChromeClient::createWindow):
1992 (WebKit::WebChromeClient::toolbarsVisible):
1993 (WebKit::WebChromeClient::statusbarVisible):
1994 (WebKit::WebChromeClient::menubarVisible):
1995 (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
1996 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1997 (WebKit::WebChromeClient::runJavaScriptAlert):
1998 (WebKit::WebChromeClient::runJavaScriptConfirm):
1999 (WebKit::WebChromeClient::runJavaScriptPrompt):
2000 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2001 (WebKit::WebPlatformStrategies::populatePluginCache):
2002 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2003 (WebKit::WebBackForwardListProxy::itemAtIndex):
2004 (WebKit::WebBackForwardListProxy::backListCount):
2005 (WebKit::WebBackForwardListProxy::forwardListCount):
2006 * WebProcess/WebPage/WebPage.cpp:
2007 (WebKit::WebPage::createPlugin):
2008 (WebKit::WebPage::changeAcceleratedCompositingMode):
2009 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2010 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
2011 * WebProcess/WebPage/mac/WebPageMac.mm:
2012 (WebKit::WebPage::interceptEditingKeyboardEvent):
2014 2010-10-29 John Sullivan <sullivan@apple.com>
2016 Reviewed by Anders Carlsson.
2018 https://bugs.webkit.org/show_bug.cgi?id=48666
2019 WebKit2 should provide counterpart getter to WKBundleNodeHandleSetHTMLInputElementAutofilled
2021 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2022 (WKBundleNodeHandleGetHTMLInputElementAutofilled):
2023 New function, calls through to InjectedBundleNodeHandle.
2025 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2026 Declared new function.
2028 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2029 (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
2030 New function, calls through to HTMLInputElement.
2032 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2033 Declared new function.
2035 2010-10-29 Jessie Berlin <jberlin@apple.com>
2037 Reviewed by Anders Carlsson.
2039 ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed before it can send
2040 the DidCreateMainFrame messsage to the UIProcess.
2041 https://bugs.webkit.org/show_bug.cgi?id=48654
2043 WebProcessProxy::frameDestroyed was asserting that the frameID it was called with was
2044 registered in WebProcessProxy::frameCreated (which is called when the WebPageProxy is
2045 created). However, in the case where we close the page before it's had the chance to send
2046 the DidCreateMainFrame message back to the UI process, the UI Process will get the
2047 DidDestroyFrame message because it's sent directly to the WebProcessProxy and doesn't go
2048 through WebPageProxy.
2050 Remove the assert because it is invalid in this case.
2052 * UIProcess/WebProcessProxy.cpp:
2053 (WebKit::WebProcessProxy::frameDestroyed):
2055 2010-10-29 Adam Roben <aroben@apple.com>
2057 Build fix when Carbon plugins are disabled
2059 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2060 (WebKit::NetscapePlugin::platformHandleMouseEvent):
2062 2010-10-29 Adam Roben <aroben@apple.com>
2064 Move NPRuntime-related files into WebProcess/Plugins/Netscape
2066 Fixes <http://webkit.org/b/48645>.
2068 Reviewed by Anders Carlsson.
2071 * WebKit2.xcodeproj/project.pbxproj:
2072 * win/WebKit2.vcproj:
2073 Updated the files' paths.
2075 * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.cpp.
2076 * WebProcess/Plugins/Netscape/JSNPMethod.h: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.h.
2077 * WebProcess/Plugins/Netscape/JSNPObject.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.cpp.
2078 * WebProcess/Plugins/Netscape/JSNPObject.h: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.h.
2079 * WebProcess/Plugins/Netscape/NPJSObject.cpp: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.cpp.
2080 * WebProcess/Plugins/Netscape/NPJSObject.h: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.h.
2081 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp.
2082 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h.
2083 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.cpp.
2084 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.h.
2086 2010-10-29 Alexey Proskuryakov <ap@apple.com>
2088 Reviewed by Darin Adler.
2090 https://bugs.webkit.org/show_bug.cgi?id=48576
2091 Let WebKit2 client know when a frame is a frameset
2093 * UIProcess/WebFrameProxy.cpp:
2094 (WebKit::WebFrameProxy::WebFrameProxy):
2095 * UIProcess/WebFrameProxy.h:
2096 (WebKit::WebFrameProxy::setIsFrameSet):
2097 (WebKit::WebFrameProxy::isFrameSet):
2098 Remember whether the frame is currently a frameset.
2100 * UIProcess/API/C/WKFrame.cpp: (WKFrameIsFrameSet):
2101 * UIProcess/API/C/WKFrame.h:
2104 * UIProcess/WebPageProxy.cpp:
2105 (WebKit::WebPageProxy::didCommitLoadForFrame):
2106 (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2107 * UIProcess/WebPageProxy.h:
2108 * UIProcess/WebPageProxy.messages.in:
2109 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2110 (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
2111 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2112 Pass notification from web process to UI process.
2114 2010-10-28 Adam Roben <aroben@apple.com>
2116 Use IntPoint/FloatSize in WebEvent subclasses
2118 This is nicer than passing around pairs of ints/floats.
2120 Fixes <http://webkit.org/b/48611>.
2122 Reviewed by Anders Carlsson.
2124 * Shared/WebEvent.h:
2125 * Shared/WebMouseEvent.cpp:
2126 * Shared/WebPlatformTouchPoint.cpp:
2127 * Shared/WebWheelEvent.cpp:
2128 Changed all x/y pairs to either use IntPoint or FloatSize, as
2131 * Shared/WebEventConversion.cpp:
2132 * Shared/mac/WebEventFactory.mm:
2133 * Shared/qt/WebEventFactoryQt.cpp:
2134 * Shared/win/WebEventFactory.cpp:
2135 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2136 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2137 Updated for WebEvent changes.
2139 2010-10-29 Adam Roben <aroben@apple.com>
2141 Touch WebKit2Prefix.h to fix incremental builds on Windows
2145 2010-10-28 Adam Roben <aroben@apple.com>
2147 Remove unnecessary #includes from WebEvent.h
2149 Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
2152 Reviewed by Sam Weinig.
2154 * Scripts/webkit2/messages.py:
2155 (MessageReceiver.iterparameters): Merged iterreplyparameters into this
2156 function. All callers to iterparameters are really interested in the
2157 reply parameters, too. This will cause us to, e.g., add
2158 forward-declarations for types used in sync replies.
2159 (headers_for_type): Added a special case for WebCore::KeypressCommand.
2161 * Scripts/webkit2/messages_unittest.py: Added a test to cover the
2162 failing case that inspired the above changes.
2164 * Shared/WebEvent.h: Replaced #includes with forward-declarations.
2166 * Shared/API/c/WKSharedAPICast.h:
2167 * Shared/NativeWebKeyboardEvent.h:
2168 * Shared/WebEvent.cpp:
2169 * Shared/WebKeyboardEvent.cpp:
2170 * Shared/WebMouseEvent.cpp:
2171 * Shared/WebPlatformTouchPoint.cpp:
2172 * Shared/WebTouchEvent.cpp:
2173 * Shared/WebWheelEvent.cpp:
2174 * Shared/qt/WebEventFactoryQt.cpp:
2175 * Shared/win/WebEventFactory.cpp:
2176 * UIProcess/API/qt/qwkpage.cpp:
2177 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2178 * UIProcess/WebUIClient.cpp:
2179 * UIProcess/WebUIClient.h:
2180 * UIProcess/win/WebView.cpp:
2181 * WebProcess/WebPage/FindController.cpp:
2182 * WebProcess/WebPage/mac/WebPageMac.mm:
2183 Added now-needed #includes and declarations.
2185 2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
2187 Reviewed by Adam Roben and David Kilzer.
2189 Fix and cleanup of build systems
2190 https://bugs.webkit.org/show_bug.cgi?id=48342
2192 * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX and add missing features.
2194 2010-10-28 Dan Bernstein <mitz@apple.com>
2196 LLVM compiler build fix
2198 * WebProcess/Downloads/mac/DownloadMac.mm:
2199 (-[WKDownloadAsDelegate download:didReceiveResponse:]): Removed a stray semicolon.
2201 2010-10-28 Adam Roben <aroben@apple.com>
2203 Move some function definitions from WebEvent.h into new .cpp files
2205 Someday maybe we'll split the classes into their own header files,
2208 Fixes <http://webkit.org/b/48604>.
2210 Reviewed by Anders Carlsson.
2212 * Shared/WebEvent.h: Moved code from here...
2214 * Shared/WebEvent.cpp: Added.
2215 * Shared/WebKeyboardEvent.cpp: Added.
2216 * Shared/WebMouseEvent.cpp: Added.
2217 * Shared/WebPlatformTouchPoint.cpp: Added.
2218 * Shared/WebTouchEvent.cpp: Added.
2219 * Shared/WebWheelEvent.cpp: Added.
2220 ...to here. Also changed WebTouchEvent::touchPoints not to copy the
2224 * WebKit2.xcodeproj/project.pbxproj:
2225 * win/WebKit2.vcproj:
2226 Added the new files.
2228 2010-10-28 Anders Carlsson <andersca@apple.com>
2230 Reviewed by Adam Roben.
2232 Connection::sendSyncMessage needs to dispatch incoming sync messages
2233 https://bugs.webkit.org/show_bug.cgi?id=48606
2235 * Platform/CoreIPC/Connection.cpp:
2236 (CoreIPC::Connection::sendSyncMessage):
2237 Protect the connection when waiting for a reply. Schedule for any remaining incoming sync messages
2238 to be sent once the bottom-most waitForSyncReply calls returns.
2240 (CoreIPC::Connection::waitForSyncReply):
2241 Make sure to dispatch any incoming sync messages.
2243 (CoreIPC::Connection::processIncomingMessage):
2244 If the incoming message is a sync message and we're waiting for a sync reply, add the message to the
2245 queue of "sync messages received while waiting for sync reply" and wake up the client thread.
2247 * Platform/CoreIPC/Connection.h:
2249 2010-10-28 Anders Carlsson <andersca@apple.com>
2251 Reviewed by Adam Roben.
2253 Move code to dispatch a sync message out into a separate function
2254 https://bugs.webkit.org/show_bug.cgi?id=48605
2256 * Platform/CoreIPC/Connection.cpp:
2257 (CoreIPC::Connection::dispatchSyncMessage):
2258 Factor code out from dispatchMessage. Handle receiving a message with an invalid reply ID.
2260 (CoreIPC::Connection::dispatchMessages):
2261 Call dispatchSyncMessage.
2263 * Platform/CoreIPC/Connection.h:
2265 2010-10-28 Anders Carlsson <andersca@apple.com>
2267 Reviewed by Darin Adler.
2269 Add NPObjectMessageReceiver class.
2270 https://bugs.webkit.org/show_bug.cgi?id=48599
2272 * Shared/Plugins/NPObjectMessageReceiver.cpp: Added.
2273 (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
2274 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
2275 * Shared/Plugins/NPObjectMessageReceiver.h: Added.
2276 * WebKit2.xcodeproj/project.pbxproj:
2278 2010-10-28 Anders Carlsson <andersca@apple.com>
2280 Reviewed by Sam Weinig.
2282 Add NPObjectProxy class
2283 https://bugs.webkit.org/show_bug.cgi?id=48558
2285 * Shared/Plugins/NPObjectProxy.cpp: Added.
2286 (WebKit::NPObjectProxy::NPObjectProxy):
2287 (WebKit::NPObjectProxy::~NPObjectProxy):
2288 * Shared/Plugins/NPObjectProxy.h: Added.
2289 * WebKit2.xcodeproj/project.pbxproj:
2291 2010-10-28 Anders Carlsson <andersca@apple.com>
2293 Reviewed by Sam Weinig.
2295 Add NPRemoteObjectMap class
2296 https://bugs.webkit.org/show_bug.cgi?id=48553
2298 * Shared/Plugins/NPRemoteObjectMap.cpp: Added.
2299 (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
2300 * Shared/Plugins/NPRemoteObjectMap.h: Added.
2301 * WebKit2.xcodeproj/project.pbxproj:
2303 2010-10-28 Sam Weinig <sam@webkit.org>
2305 Reviewed by Anders Carlsson.
2307 WKURLRefs should be allowed to be null
2308 <rdar://problem/8575621>
2309 https://bugs.webkit.org/show_bug.cgi?id=48535
2311 * Shared/API/c/WKSharedAPICast.h:
2313 (WebKit::toCopiedURLAPI):
2314 Turn a null WTF::String into a null WKURLRef.
2316 2010-10-28 Sam Weinig <sam@webkit.org>
2318 Reviewed by Anders Carlsson.
2320 Add WebKit2 API for window feature getter/setters
2321 <rdar://problem/8590373>
2322 https://bugs.webkit.org/show_bug.cgi?id=48496
2324 * UIProcess/API/C/WKPage.h:
2325 * UIProcess/WebPageProxy.cpp:
2326 (WebKit::WebPageProxy::setToolbarsAreVisible):
2327 (WebKit::WebPageProxy::getToolbarsAreVisible):
2328 (WebKit::WebPageProxy::setMenuBarIsVisible):
2329 (WebKit::WebPageProxy::getMenuBarIsVisible):
2330 (WebKit::WebPageProxy::setStatusBarIsVisible):
2331 (WebKit::WebPageProxy::getStatusBarIsVisible):
2332 (WebKit::WebPageProxy::setIsResizable):
2333 (WebKit::WebPageProxy::getIsResizable):
2334 * UIProcess/WebPageProxy.h:
2335 * UIProcess/WebPageProxy.messages.in:
2336 * UIProcess/WebUIClient.cpp:
2337 (WebKit::WebUIClient::toolbarsAreVisible):
2338 (WebKit::WebUIClient::setToolbarsAreVisible):
2339 (WebKit::WebUIClient::menuBarIsVisible):
2340 (WebKit::WebUIClient::setMenuBarIsVisible):
2341 (WebKit::WebUIClient::statusBarIsVisible):
2342 (WebKit::WebUIClient::setStatusBarIsVisible):
2343 (WebKit::WebUIClient::isResizable):
2344 (WebKit::WebUIClient::setIsResizable):
2345 * UIProcess/WebUIClient.h:
2346 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2347 (WebKit::WebChromeClient::setToolbarsVisible):
2348 (WebKit::WebChromeClient::toolbarsVisible):
2349 (WebKit::WebChromeClient::setStatusbarVisible):
2350 (WebKit::WebChromeClient::statusbarVisible):
2351 (WebKit::WebChromeClient::setMenubarVisible):
2352 (WebKit::WebChromeClient::menubarVisible):
2353 (WebKit::WebChromeClient::setResizable):
2354 Plumb through the calls.
2356 2010-10-28 Dan Bernstein <mitz@apple.com>
2360 * win/WebKit2Common.vsprops:
2362 2010-10-28 Dan Bernstein <mitz@apple.com>
2364 Reviewed by Adam Roben.
2366 No longer soft-link zlib
2367 https://bugs.webkit.org/show_bug.cgi?id=48004
2369 * win/WebKit2Common.vsprops: Added zlib.lib to AdditionalDependencies.
2371 2010-10-28 Adam Roben <aroben@apple.com>
2373 Make PluginView retain its HTMLPlugInElement
2375 This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
2376 this, but had a very different mechanism for implementing NPRuntime
2377 that didn't require it.
2379 Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
2380 (preceded by assertion) in Node::document when running
2381 plugins/document-open.html in WebKit2 on Windows
2383 Reviewed by Anders Carlsson.
2385 * WebProcess/Plugins/PluginView.cpp:
2386 (WebKit::PluginView::create): Moved here from the header file so that
2387 clients of the header file won't have to pull in HTMLPlugInElement.h.
2388 Changed to take a PassRefPtr<HTMLPlugInElement>.
2389 (WebKit::PluginView::PluginView): Changed to take a
2390 PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
2391 the parameter to the function will be nulled-out after assigning into
2393 (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.
2395 * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.
2397 2010-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
2399 Reviewed by Andreas Kling.
2401 Make Qt viewportAttributesForSize not assert on (0, 0) size
2402 https://bugs.webkit.org/show_bug.cgi?id=48524
2404 We now return an invalid (isValid() == false) ViewportAttributes
2405 instance when the supplied size is (0, 0).
2407 * UIProcess/API/qt/qwkpage.cpp:
2408 (QWKPage::viewportAttributesForSize):
2410 2010-10-28 Balazs Kelemen <kbalazs@webkit.org>
2412 Reviewed by Andreas Kling.
2414 [Qt][WK2] SharedMemory should be released by the receiving process
2415 https://bugs.webkit.org/show_bug.cgi?id=48520
2417 * Platform/qt/SharedMemoryQt.cpp:
2418 (WebKit::SharedMemory::~SharedMemory):
2419 (WebKit::SharedMemory::createHandle):
2421 2010-10-28 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2423 Reviewed by Kenneth Rohde Christiansen.
2425 [Qt] Web process cannot be debugged if it crashes in initialization
2426 https://bugs.webkit.org/show_bug.cgi?id=47399
2428 Wait 3 seconds for the debugger on debug mode if
2429 WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set.
2431 The debugging can be initiated for example in following way:
2432 export WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH=1
2433 ./MiniBrowser & while [ -z `pidof QtWebProcess` ]; do sleep 1; done; \
2434 gdb --pid=`pidof QtWebProcess`
2436 * WebProcess/qt/WebProcessMainQt.cpp:
2437 (WebKit::WebProcessMainQt):
2439 2010-10-28 Mark Rowe <mrowe@apple.com>
2443 Qualify references to Rect to avoid ambiguity between WebCore::Rect and Carbon's Rect.
2445 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2446 (WebKit::NetscapePlugin::platformPostInitialize):
2447 (WebKit::NetscapePlugin::windowFrameChanged):
2449 2010-10-28 Ivan Krstić <ike@apple.com>
2451 Reviewed by Mark Rowe.
2453 Remove unused experimental proxied panel interface.
2454 <rdar://problem/7237059>
2456 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2457 (InitWebCoreSystemInterface):
2459 2010-10-27 Mark Rowe <mrowe@apple.com>
2463 * UIProcess/API/mac/PageClientImpl.mm: Reference the file using the correct case.
2465 2010-10-27 Anders Carlsson <andersca@apple.com>
2467 Reviewed by Sam Weinig.
2469 Find indicators do not bounce
2470 https://bugs.webkit.org/show_bug.cgi?id=48490
2471 <rdar://problem/8564276>
2473 * UIProcess/API/mac/FindIndicatorWindow.h:
2474 * UIProcess/API/mac/FindIndicatorWindow.mm:
2475 (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
2476 Add an animationDuration parameter.
2478 (WebKit::FindIndicatorWindow::FindIndicatorWindow):
2479 Initialize m_bounceAnimationContext.
2481 (WebKit::FindIndicatorWindow::setFindIndicator):
2482 Create a bounce animation and start it.
2484 (WebKit::FindIndicatorWindow::closeWindow):
2485 Stop the bounce animation and destroy the bounce animation context.
2487 (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
2488 pass the fade out duration.
2490 (WebKit::FindIndicatorWindow::bounceAnimationCallback):
2491 Set the bounce animation progress.
2493 (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
2494 Destroy the bounce animation context.
2496 2010-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
2498 Reviewed by Andreas Kling.
2500 Remove the reference to the pageNamespace in the QWKPagePrivate.
2501 Access it through the WebPageProxy instead which holds a strong
2504 * UIProcess/API/qt/qwkpage.cpp:
2505 (QWKPagePrivate::QWKPagePrivate):
2506 (QWKPage::preferences):
2507 * UIProcess/API/qt/qwkpage_p.h:
2509 2010-10-27 Enrica Casucci <enrica@apple.com>
2511 Reviewed by Alexey Proskuryakov.
2513 Support Appkit key bindings and custom key bindings in WebKit2
2514 https://bugs.webkit.org/show_bug.cgi?id=48271
2515 <rdar://problem/7660723>
2517 We need to support AppKit key bindings and custom key bindings in WebKit2.
2518 Every keyboard event is first sent to the WebProcess and we inform AppKit that
2519 we don't need further processing. When the event is processed by the WebProcess and no handler consumes it,
2520 we send a synchronous message back to the UI process to let AppKit perform the key bindings.
2521 This operation can result in one or more editing commands to execute or a noop.
2522 The WebProcess then replies back to the UI process to inform whether further processing is required, in
2523 which case the event is sent back to the application to be mapped.
2524 There is a potential for a race condition: in case the WebProcess is very slow to process the key events, the UI
2525 process could be in a completely different state when the event is being resent (for example it might not have the
2526 keyboard focus anymore) and the command could be lost. We should look out for user experience impact.
2528 * Scripts/webkit2/messages.py: Added header file in the generated file.
2529 * Shared/WebCoreArgumentCoders.h: Added encoder/decoder for KeypressCommand.
2530 * UIProcess/API/mac/PageClientImpl.h:
2531 * UIProcess/API/mac/PageClientImpl.mm:
2532 (WebKit::PageClientImpl::interceptKeyEvent): Pass-through call to WKView.
2533 (WebKit::PageClientImpl::didNotHandleKeyEvent): Added logic to resend the event to the application.
2534 * UIProcess/API/mac/WKView.mm:
2535 (-[WKView validateUserInterfaceItem:]): Changed the default return value to YES, otherwise no menu shortcut is performed.
2536 (-[WKView doCommandBySelector:]): Added.
2537 (-[WKView insertText:]): Added.
2538 (-[WKView _handleStyleKeyEquivalent:]): Added to handle command-B and command-I.
2539 (-[WKView performKeyEquivalent:]): Added to intercept key binding sequences.
2540 (-[WKView _setEventBeingResent:]):
2541 (-[WKView _interceptKeyEvent:]):
2542 * UIProcess/API/mac/WKViewInternal.h:
2543 * UIProcess/PageClient.h:
2544 * UIProcess/WebPageProxy.cpp:
2545 (WebKit::WebPageProxy::interpretKeyEvent):
2546 * UIProcess/WebPageProxy.h:
2547 * UIProcess/WebPageProxy.messages.in:
2548 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2549 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2550 (WebKit::WebEditorClient::handleKeyboardEvent):
2551 (WebKit::WebEditorClient::handleInputMethodKeydown):
2552 * WebProcess/WebPage/WebPage.cpp:
2553 * WebProcess/WebPage/WebPage.h:
2554 * WebProcess/WebPage/mac/WebPageMac.mm: Moved handleKeyboardEvent and handleInputMethodKeydown
2555 to the Mac specific implementation.
2556 (WebKit::WebPage::interceptEditingKeyboardEvent): Added.
2558 2010-10-27 Brian Weinstein <bweinstein@apple.com>
2560 More Windows build fixage. Copy another new header into WebKitOutputDir.
2562 * win/WebKit2Generated.make:
2564 2010-10-27 Brian Weinstein <bweinstein@apple.com>
2566 Windows build fix. Copy a new header into WebKitOutputDir.
2568 * win/WebKit2Generated.make:
2570 2010-10-26 Darin Adler <darin@apple.com>
2572 Reviewed by Sam Weinig.
2574 WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
2575 https://bugs.webkit.org/show_bug.cgi?id=42322
2576 rdar://problem/8193631
2578 WebKitTestRunner needs to support layoutTestController.clearBackForwardList
2579 https://bugs.webkit.org/show_bug.cgi?id=42333
2580 rdar://problem/8193643
2582 * Shared/API/c/WKBase.h: Added WKBundleBackForwardListRef and
2583 WKBundleBackForwardListItemRef.
2585 * Shared/API/c/WKURL.cpp:
2586 (WKURLCopyString): Added.
2587 * Shared/API/c/WKURL.h: Added WKURLCopyString.
2589 * Shared/API/c/cf/WKURLCF.h: Fixed incorrect argument name.
2591 * Shared/APIObject.h: Added TypeBundleBackForwardList and
2592 TypeBundleBackForwardListItem.
2594 * Shared/ImmutableArray.h: Marked destructor virtual explicitly.
2595 * Shared/ImmutableDictionary.h: Ditto.
2596 * UIProcess/WebBackForwardListItem.h: Ditto.
2597 * UIProcess/WebContext.h: Ditto.
2598 * UIProcess/WebFrameProxy.h: Ditto.
2599 * UIProcess/WebNavigationData.h: Ditto.
2600 * UIProcess/WebPageNamespace.h: Ditto.
2601 * UIProcess/WebPreferences.h: Ditto.
2602 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Ditto.
2603 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2604 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: Ditto.
2606 * UIProcess/WebBackForwardList.cpp: Removed unneeded backListWithLimit
2607 and forwardListWithLimit functions.
2608 (WebKit::WebBackForwardList::clear): Added.
2609 * UIProcess/WebBackForwardList.h: Marked destructor virtual explicitly.
2610 Added clear, removed backListWithLimit and forwardListWithLimit functions.
2612 * UIProcess/WebPageProxy.cpp: Removed unneeded backForwardBackItem,
2613 backForwardCurrentItem, and backForwardForwardItem functions.
2614 (WebKit::WebPageProxy::backForwardClear): Added.
2615 * UIProcess/WebPageProxy.h: Ditto.
2616 * UIProcess/WebPageProxy.messages.in: Ditto.
2618 * WebKit2.pro: Added new files.
2619 * WebKit2.xcodeproj/project.pbxproj: Ditto.
2620 * win/WebKit2.vcproj: Ditto.
2622 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Added
2623 WKBundleBackForwardListRef and WKBundleBackForwardListItemRef.
2625 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
2626 Started with a copy of from WebKit2/UIProcess/API/C/WKBackForwardList.cpp.
2627 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
2628 Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardList.h.
2630 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2631 Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp.
2632 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
2633 Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.h.
2635 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2636 (WKBundlePageGetBackForwardList): Added.
2637 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Ditto.
2640 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
2641 Started with a copy of WebKit2/UIProcess/WebBackForwardList.cpp.
2642 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2643 Started with a copy of WebKit2/UIProcess/WebBackForwardList.h.
2645 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2646 Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.cpp.
2647 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2648 Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.h.
2650 * WebProcess/WebPage/WebBackForwardListProxy.cpp: Removed
2651 many unneeded functions.
2652 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
2653 Removed unneeded initialization of m_closed.
2654 (WebKit::WebBackForwardListProxy::addItem): Added a check for
2655 the case of a capacity of 0.
2656 (WebKit::WebBackForwardListProxy::goToItem): Added a check for
2657 when the proxy outlives its page.
2658 (WebKit::WebBackForwardListProxy::itemAtIndex): Ditto.
2659 (WebKit::WebBackForwardListProxy::backListCount): Ditto.
2660 (WebKit::WebBackForwardListProxy::forwardListCount): Ditto.
2661 (WebKit::WebBackForwardListProxy::close): Removed unneeded code
2663 (WebKit::WebBackForwardListProxy::isActive): Added.
2664 (WebKit::WebBackForwardListProxy::clear): Added.
2666 * WebProcess/WebPage/WebBackForwardListProxy.h: Added clear,
2667 isActive, and detach functions. Removed many other unneeded
2668 function and data members.
2670 * WebProcess/WebPage/WebPage.cpp:
2671 (WebKit::WebPage::~WebPage): Added call to detach on the
2673 (WebKit::WebPage::backForwardList): Added.
2674 * WebProcess/WebPage/WebPage.h: Added backForwardList function
2675 and m_backForwardList data member.
2677 2010-10-27 Beth Dakin <bdakin@apple.com>
2679 Reviewed by Darin Adler.
2681 Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit
2682 SPI to scale a WebView
2684 <rdar://problem/8107667>
2686 This patch adds SPI to Mac WebKit that scales the page by the given
2689 Implement scaleWebView(), which tells WebCore::Frame to scale, and
2690 viewScaleFactor() which returns the current scale factor.
2691 * Shared/API/c/WKSharedAPICast.h:
2692 * UIProcess/API/C/WKPage.cpp:
2693 (WKPageScaleWebView):
2694 (WKPageGetViewScaleFactor):
2695 * UIProcess/API/C/WKPage.h:
2696 * UIProcess/WebPageProxy.cpp:
2697 (WebKit::WebPageProxy::WebPageProxy):
2698 (WebKit::WebPageProxy::scaleWebView):
2699 * UIProcess/WebPageProxy.h:
2700 (WebKit::WebPageProxy::viewScaleFactor):
2701 * WebProcess/WebPage/WebPage.cpp:
2702 (WebKit::WebPage::scaleWebView):
2703 (WebKit::WebPage::viewScaleFactor):
2704 * WebProcess/WebPage/WebPage.h:
2705 * WebProcess/WebPage/WebPage.messages.in:
2707 2010-10-27 Jessie Berlin <jberlin@apple.com>
2709 Reviewed by Sam Weinig.
2711 Fix the WebKit2 API tests.
2712 https://bugs.webkit.org/show_bug.cgi?id=48461
2714 The API tests were failing because the tests expect to be able to send messages before the
2715 WebProcess finishes launching.
2717 Instead of dispatching the pending messages in processDidFinishLaunching, dispatch them in
2718 ensureWebProcess but do not make messages pending if the process is launching.
2720 * UIProcess/WebContext.cpp:
2721 (WebKit::WebContext::processDidFinishLaunching):
2722 Move dispatching the pending messages back from here ...
2723 (WebKit::WebContext::ensureWebProcess):
2725 (WebKit::WebContext::postMessageToInjectedBundle):
2726 Check whether the process can send messages in order to determine if a message needs to be
2729 * UIProcess/WebProcessProxy.h:
2730 (WebKit::WebProcessProxy::canSendMessage):
2731 The WebProcessProxy can send a message if it is valid or if it is launching.
2733 2010-10-27 Anders Carlsson <andersca@apple.com>
2735 Reviewed by Sam Weinig.
2737 More work on downloads
2738 https://bugs.webkit.org/show_bug.cgi?id=48480
2740 * WebProcess/Downloads/Download.cpp:
2741 (WebKit::Download::~Download):
2742 Call platformInvalidate().
2744 (WebKit::Download::didBegin):
2745 (WebKit::Download::didReceiveData):
2746 (WebKit::Download::didFinish):
2749 * WebProcess/Downloads/DownloadManager.cpp:
2750 (WebKit::DownloadManager::startDownload):
2751 Create a Download object and insert it into the m_downloads map.
2753 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2754 (WebKit::Download::platformInvalidate):
2757 * WebProcess/Downloads/mac/DownloadMac.mm:
2758 (WebKit::Download::platformInvalidate):
2759 Tell the WKDownloadAsDelegate object that we're being invalidated.
2761 (-[WKDownloadAsDelegate downloadDidBegin:]):
2762 Call Download::didBegin.
2764 (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
2765 Call Download::didReceiveData.
2767 (-[WKDownloadAsDelegate downloadDidFinish:]):
2768 Call Download::didFinish.
2770 * WebProcess/Downloads/qt/DownloadQt.cpp:
2771 (WebKit::Download::platformInvalidate):
2774 2010-10-27 Anders Carlsson <andersca@apple.com>
2776 Reviewed by Sam Weinig.
2778 WebPageProxy::isValid should return false if the page has been explicitly closed
2779 https://bugs.webkit.org/show_bug.cgi?id=48458
2781 * UIProcess/WebPageProxy.cpp:
2782 (WebKit::WebPageProxy::WebPageProxy):
2783 (WebKit::WebPageProxy::isValid):
2784 (WebKit::WebPageProxy::relaunch):
2785 (WebKit::WebPageProxy::close):
2786 (WebKit::WebPageProxy::processDidCrash):
2787 * UIProcess/WebPageProxy.h:
2788 (WebKit::WebPageProxy::isClosed):
2790 2010-10-27 Anders Carlsson <andersca@apple.com>
2792 Reviewed by Adam Roben.
2794 Begin stubbing out the Download class
2795 https://bugs.webkit.org/show_bug.cgi?id=48447
2798 * WebKit2.xcodeproj/project.pbxproj:
2802 Include WebCore/EmptyProtocolDefinitions.h
2804 * WebProcess/Downloads/Download.cpp: Added.
2805 * WebProcess/Downloads/Download.h: Added.
2807 * WebProcess/Downloads/DownloadManager.cpp:
2808 (WebKit::DownloadManager::startDownload):
2809 Create a Download object and start it.
2811 * WebProcess/Downloads/mac/DownloadMac.mm: Added.
2812 (WebKit::Download::start):
2813 Create an NSURLDownload.
2815 * WebProcess/WebPage/WebFrame.cpp:
2816 (WebKit::WebFrame::startDownload):
2817 Ask the download manager to start downloading.
2819 * win/WebKit2.vcproj:
2820 * win/WebKit2Common.vsprops:
2823 2010-10-27 Adam Roben <aroben@apple.com>
2825 Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
2828 In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
2829 does not actually affect whether the plugin is windowed.
2831 Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
2832 failure in NetscapePlugin::platformDestroy when running
2833 plugins/mouse-events.html in WebKit2 on Windows
2835 Reviewed by Anders Carlsson.
2837 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2838 (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
2839 Bail out if m_isStarted is true, indicating that NPP_New has already
2842 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
2843 implementation of setIsWindowed.
2845 2010-10-27 Timothy Hatcher <timothy@apple.com>
2847 Add API for enabling the developer extras (Web Inspector).
2849 http://webkit.org/b/48439
2851 Reviewed by John Sullivan.
2853 * Shared/WebPreferencesStore.cpp:
2854 (WebKit::WebPreferencesStore::WebPreferencesStore):
2855 (WebKit::WebPreferencesStore::encode):
2856 (WebKit::WebPreferencesStore::decode):
2857 * Shared/WebPreferencesStore.h:
2858 * UIProcess/API/C/WKPreferences.cpp:
2859 (WKPreferencesSetDeveloperExtrasEnabled):
2860 (WKPreferencesGetDeveloperExtrasEnabled):
2861 * UIProcess/API/C/WKPreferences.h:
2862 * UIProcess/WebPreferences.cpp:
2863 (WebKit::WebPreferences::setDeveloperExtrasEnabled):
2864 (WebKit::WebPreferences::developerExtrasEnabled):
2865 * UIProcess/WebPreferences.h:
2866 * WebProcess/WebPage/WebPage.cpp:
2867 (WebKit::WebPage::updatePreferences):
2869 2010-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
2871 Reviewed by Anders Carlsson.
2873 Move contentsSizeChange from the UIClient into the PageClient and
2874 and make it a private Qt-only API in the process.
2876 Make WKPageContentsSizeChangedCallback be a private API
2877 https://bugs.webkit.org/show_bug.cgi?id=48409
2879 * UIProcess/API/C/WKPage.h:
2880 * UIProcess/API/qt/qwkpage.cpp:
2881 (QWKPagePrivate::didChangeContentsSize):
2883 * UIProcess/API/qt/qwkpage_p.h:
2884 * UIProcess/PageClient.h:
2885 * UIProcess/WebPageProxy.cpp:
2886 (WebKit::WebPageProxy::didChangeContentsSize):
2887 * UIProcess/WebPageProxy.h:
2888 * UIProcess/WebPageProxy.messages.in:
2889 * UIProcess/WebUIClient.cpp:
2890 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2891 (WebKit::WebChromeClient::contentsSizeChanged):
2893 2010-10-26 Brian Weinstein <bweinstein@apple.com>
2895 Reviewed by Adam Roben.
2897 WebKit2 shouldn't try to send an empty user agent
2898 https://bugs.webkit.org/show_bug.cgi?id=48397
2900 Change the check of the custom user agent to an empty check instead of a null check. When the client application
2901 sets a custom user agent and then resets it, the custom user agent is set to an empty string. If all we do
2902 is check for a null string, then we will think we have a custom user agent (which is empty) and send an empty
2905 * WebProcess/WebPage/WebPage.cpp:
2906 (WebKit::WebPage::userAgent):
2908 2010-10-27 Adam Roben <aroben@apple.com>
2910 Don't call NPP_GetValue if the plugin didn't provide an implementation
2912 Fixes <http://webkit.org/b/48433> Crash in
2913 NetscapePlugin::shouldLoadSrcURL when using Shockwave Director 10.3 in
2916 Reviewed by Eric Carlson.
2918 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2919 (WebKit::NetscapePlugin::NPP_GetValue): Null-check the getvalue pointer
2920 before using it to call NPP_GetValue.
2922 2010-10-27 Balazs Kelemen <kbalazs@webkit.org>
2924 Reviewed by Andreas Kling.
2926 [Qt] Assert due to multiple initialization of WebPlatformStrategies
2927 https://bugs.webkit.org/show_bug.cgi?id=48327
2929 We are using the LocalizationStrategy in the UI process
2930 so the previous attempt to fix this (http://trac.webkit.org/changeset/70620)
2932 * UIProcess/API/qt/qwkpage.cpp:
2933 (initializePlatformStrategiesIfNeeded):
2934 Call WebPlatformStrategies::initialize exactly once.
2935 (QWKPagePrivate::QWKPagePrivate):
2937 2010-10-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2939 Reviewed by Andreas Kling.
2941 [Qt] WebKit2 UI process crashes if web process crashes
2942 https://bugs.webkit.org/show_bug.cgi?id=48400
2944 Check the success of socket write operations.
2945 Avoids crashing the UI process if web process has crashed.
2946 Qt socket code segfaults when write is called for a socket
2947 that has had an error.
2949 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2950 (CoreIPC::Connection::platformInvalidate):
2951 Reset m_socket after deletion.
2953 (CoreIPC::Connection::sendOutgoingMessage):
2954 Check error status of write operations and
2955 invalidate socket if writes fail.
2957 2010-10-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2959 Reviewed by Andreas Kling.
2961 [Qt] Type mismatch while serializing/deserializing message id size
2962 https://bugs.webkit.org/show_bug.cgi?id=48401
2964 Use correct types when reading data from connection buffer.
2966 The message id is written as uint32_t, thus the buffer size should be
2967 calculated based on sizeof(uint32_t) and not sizeof(MessageID).
2969 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2970 (CoreIPC::Connection::readyReadHandler):
2972 2010-10-27 Zalan Bujtas <zbujtas@gmail.com>
2974 Reviewed by Kenneth Rohde Christiansen.
2976 Multiple WebPlatformStrategy initialization triggers assert in WebCore/PlatformStrategies.
2977 Remove the code for now, as it is not used at all.
2978 https://bugs.webkit.org/show_bug.cgi?id=48327
2980 * UIProcess/API/qt/qwkpage.cpp:
2981 (QWKPagePrivate::QWKPagePrivate):
2983 2010-10-26 Brent Fulgham <bfulgham@webkit.org>
2985 Unreviewed build fix.
2987 * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
2988 (WebKit::cancelledError): Conditionalize use of CFNetwork calls
2991 2010-10-26 Alexey Proskuryakov <ap@apple.com>
2995 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Modified original file, not its framework
2998 2010-10-26 Anders Carlsson <andersca@apple.com>
3000 Reviewed by Sam Weinig.
3002 Add DownloadManager class
3003 https://bugs.webkit.org/show_bug.cgi?id=48388
3006 * WebKit2.xcodeproj/project.pbxproj:
3009 * WebProcess/Downloads/DownloadManager.cpp: Added.
3010 (WebKit::DownloadManager::shared):
3011 (WebKit::DownloadManager::DownloadManager):
3012 * WebProcess/Downloads/DownloadManager.h: Added.
3014 * win/WebKit2.vcproj:
3015 * win/WebKit2Common.vsprops:
3018 2010-10-26 Anders Carlsson <andersca@apple.com>
3020 Reviewed by Sam Weinig.
3022 Pass a downloadID to the web process whenever a download is requested
3023 https://bugs.webkit.org/show_bug.cgi?id=48380
3025 * UIProcess/WebContext.cpp:
3026 (WebKit::WebContext::generateDownloadID):
3027 Generate a unique download ID.
3029 * UIProcess/WebPageProxy.cpp:
3030 (WebKit::WebPageProxy::receivedPolicyDecision):
3031 Pass along a download ID if needed.
3033 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3034 (WebKit::WebFrameLoaderClient::startDownload):
3035 Call the web frame member function.
3037 * WebProcess/WebPage/WebFrame.cpp:
3038 (WebKit::WebFrame::WebFrame):
3039 Initialize m_policyDownloadID.
3041 (WebKit::WebFrame::invalidatePolicyListener):
3042 Reset m_policyDownloadID.
3044 (WebKit::WebFrame::didReceivePolicyDecision):
3045 Set m_policyDownloadID.
3047 (WebKit::WebFrame::startDownload):
3048 Assert that m_policyDownloadID is not zero.
3050 * WebProcess/WebPage/WebPage.cpp:
3051 (WebKit::WebPage::didReceivePolicyDecision):
3052 Pass along the download ID.
3054 * WebProcess/WebPage/WebPage.messages.in:
3055 Add the download ID.
3057 2010-10-26 Alexey Proskuryakov <ap@apple.com>
3059 Reviewed by Sam Weinig.
3061 https://bugs.webkit.org/show_bug.cgi?id=48375
3062 <rdar://problem/8392724> Need delegate calls in PageLoaderClient to indicate if we have
3063 loaded insecure content
3065 Added the delegate. Just like the bundle version, it misses WebOrigin parameter that Mac
3066 delegate call used to have. It doesn't seem necessary for clients.
3068 * UIProcess/API/C/WKPage.h:
3069 * UIProcess/API/qt/qwkpage.cpp:
3071 * UIProcess/WebLoaderClient.cpp:
3072 (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
3073 (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
3074 * UIProcess/WebLoaderClient.h:
3075 * UIProcess/WebPageProxy.cpp:
3076 (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
3077 (WebKit::WebPageProxy::didRunInsecureContentForFrame):
3078 * UIProcess/WebPageProxy.h:
3079 * UIProcess/WebPageProxy.messages.in:
3080 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3081 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3082 (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
3083 (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
3084 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3085 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3086 (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
3087 (WebKit::WebFrameLoaderClient::didRunInsecureContent):
3089 2010-10-26 Jenn Braithwaite <jennb@chromium.org>
3091 Reviewed by Dmitry Titov.
3093 Resource tracking failure when trying to move a frame between documents
3094 https://bugs.webkit.org/show_bug.cgi?id=44713
3096 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3097 (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage):
3099 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3101 2010-10-26 Jessie Berlin <jberlin@apple.com>
3103 Reviewed by Darin Adler.
3105 Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
3106 instead of in WebContext::ensureWebProcess.
3107 https://bugs.webkit.org/show_bug.cgi?id=48367
3109 Send pending injected bundle messages after the process finished launching instead of of
3110 directly after creating it.
3112 * UIProcess/WebContext.cpp:
3113 (WebKit::WebContext::ensureWebProcess):
3114 Move the logic to dispatch pending injected bundle messages from here ...
3115 (WebKit::WebContext::processDidFinishLaunching):
3117 Also use a reference instead of a pointer when sending the pending messages.
3119 2010-10-26 Anders Carlsson <andersca@apple.com>
3121 Reviewed by Sam Weinig.
3123 pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
3124 https://bugs.webkit.org/show_bug.cgi?id=48366
3126 * UIProcess/API/qt/qwkpage.cpp:
3128 Add zero initializer.
3130 * UIProcess/WebPageProxy.cpp:
3131 (WebKit::WebPageProxy::pageDidScroll):
3132 Call the pageDidScroll client function.
3134 * UIProcess/WebPageProxy.messages.in:
3135 Add PageDidScroll message.
3137 * WebProcess/WebPage/WebPage.cpp:
3138 (WebKit::WebPage::pageDidScroll):
3139 Send the PageDidScroll message.
3141 2010-10-26 Brian Weinstein <bweinstein@apple.com>
3143 Reviewed by Darin Adler.
3145 Need a way to retrieve custom user agent from a WKPage
3146 https://bugs.webkit.org/show_bug.cgi?id=48360
3147 <rdar://problem/8466537>
3149 Add an exported function on WKPage to get the page's custom user agent.
3151 * UIProcess/API/C/WKPage.cpp:
3152 (WKPageCopyCustomUserAgent): Exported function that returns the custom user
3154 * UIProcess/API/C/WKPage.h:
3155 * UIProcess/WebPageProxy.cpp:
3156 (WebKit::WebPageProxy::close): Clear the custom user agent string.
3157 (WebKit::WebPageProxy::processDidCrash): Ditto.
3158 (WebKit::WebPageProxy::setCustomUserAgent): Add a new early return if we're setting
3159 the custom user agent to what it was before, and set the custom user agent member
3161 * UIProcess/WebPageProxy.h:
3162 (WebKit::WebPageProxy::customUserAgent): Returns the custom user agent.
3164 2010-10-26 Simon Fraser <simon.fraser@apple.com>
3166 Reviewed by Sam Weinig.
3168 Support layoutTestController.layerTreeAsText in WebKitTestRunner
3169 https://bugs.webkit.org/show_bug.cgi?id=42145
3171 Expose layerTreeAsText() as private API so that
3172 WebKitTestRunner can use it.
3174 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3175 (WKBundleFrameCopyLayerTreeAsText):
3176 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3177 * WebProcess/WebPage/WebFrame.cpp:
3178 (WebKit::WebFrame::numberOfActiveAnimations):
3179 (WebKit::WebFrame::layerTreeAsText):
3180 (WebKit::WebFrame::pendingUnloadCount):
3181 * WebProcess/WebPage/WebFrame.h:
3183 2010-10-26 Anders Carlsson <andersca@apple.com>
3185 Reviewed by Sam Weinig.
3187 Enable the plug-in process on Mac
3188 https://bugs.webkit.org/show_bug.cgi?id=48350
3191 Flip the switch and enable the plug-in process on Mac.
3193 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3194 (WebKit::NetscapePlugin::platformDestroy):
3197 2010-10-26 Zoltan Horvath <zoltan@webkit.org>
3199 Reviewed by Kenneth Rohde Christiansen.
3201 [Qt] Implement SharedMemory for WebKit2
3202 https://bugs.webkit.org/show_bug.cgi?id=47345
3204 Implement unimplemented functions in SharedMemoryQt.cpp.
3205 Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
3206 Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
3207 Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary
3208 methods of MappedMemoryPool.
3210 * Platform/SharedMemory.h: Add a handle member for Qt.
3211 * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
3212 (WebKit::MappedMemoryPool::searchForMappedMemory):
3213 (WebKit::MappedMemoryPool::mapMemory):
3214 (WebKit::MappedMemoryPool::mapFile):
3215 * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
3216 (WebKit::MappedMemoryPool::MappedMemory::mapSize):
3217 (WebKit::MappedMemoryPool::MappedMemory::markUsed):
3218 (WebKit::MappedMemoryPool::MappedMemory::markFree):
3219 (WebKit::MappedMemoryPool::MappedMemory::isFree):
3220 (WebKit::MappedMemoryPool::MappedMemory::data):
3221 (WebKit::MappedMemoryPool::MappedMemoryPool):
3222 Move MappedMemory implementation into MappedMemoryPool.
3223 * Platform/qt/SharedMemoryQt.cpp:
3224 (WebKit::SharedMemory::Handle::Handle): Implement.
3225 (WebKit::SharedMemory::Handle::~Handle):
3226 (WebKit::SharedMemory::Handle::isNull): Implement.
3227 (WebKit::SharedMemory::Handle::encode): Implement.
3228 (WebKit::SharedMemory::Handle::decode): Implement.
3229 (WebKit::SharedMemory::create): Implement.
3230 (WebKit::mapProtection): Added.
3231 (WebKit::SharedMemory::~SharedMemory): Implement.
3232 (WebKit::SharedMemory::createHandle): Implement.
3233 (WebKit::SharedMemory::systemPageSize): Implement.
3234 * Shared/qt/MappedMemory.h: Removed.
3235 * Shared/qt/MappedMemoryPool.cpp: Removed.
3236 * Shared/qt/UpdateChunk.cpp:
3237 (WebKit::UpdateChunk::UpdateChunk):
3238 (WebKit::UpdateChunk::decode):
3239 Modify to use MappedMemoryPool.
3240 * Shared/qt/UpdateChunk.h:
3242 Modify affected lines.
3244 2010-10-25 Anders Carlsson <andersca@apple.com>
3246 Reviewed by Sam Weinig.
3248 WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
3249 https://bugs.webkit.org/show_bug.cgi?id=48285
3250 <rdar://problem/8576318>
3252 * UIProcess/API/C/WKPage.h:
3253 Add a kWKMoreThanMaximumMatchCount constant.
3255 * WebProcess/WebPage/FindController.cpp:
3256 (WebKit::FindController::findString):
3257 If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.
3259 2010-10-25 Dan Bernstein <mitz@apple.com>
3261 Non-Carbon build fix.
3263 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3264 (WebKit::NetscapePlugin::windowFrameChanged):
3266 2010-10-25 Timothy Hatcher <timothy@apple.com>
3268 Stub out WebInspector objects and WKInspectorRef API.
3270 https://webkit.org/b/48265
3272 Reviewed by Anders Carlsson.
3274 * Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
3275 * Shared/API/c/WKBase.h: Added WKInspectorRef.
3276 * Shared/APIObject.h: Added TypeInspector.
3277 * UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
3278 * UIProcess/API/C/WKInspector.cpp: Added.
3279 (WKInspectorGetTypeID):
3280 (WKInspectorGetPage):
3281 * UIProcess/API/C/WKInspector.h: Added.
3282 * UIProcess/API/C/WKPage.cpp:
3283 (WKPageGetInspector): Added.
3284 * UIProcess/API/C/WKPage.h:
3285 * UIProcess/WebInspectorProxy.cpp: Added.
3286 (WebKit::WebInspectorProxy::WebInspectorProxy):
3287 (WebKit::WebInspectorProxy::~WebInspectorProxy):
3288 (WebKit::WebInspectorProxy::invalidate):
3289 * UIProcess/WebInspectorProxy.h:
3290 (WebKit::WebInspectorProxy::create):
3291 (WebKit::WebInspectorProxy::page):
3292 (WebKit::WebInspectorProxy::type):
3293 * UIProcess/WebPageProxy.cpp:
3294 (WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
3295 * UIProcess/WebPageProxy.h:
3296 * WebKit2.pro: Added new files.
3297 * WebKit2.xcodeproj/project.pbxproj: Added new files.
3298 * WebProcess/WebPage/WebInspector.cpp: Added.
3299 (WebKit::WebInspector::WebInspector):
3300 * WebProcess/WebPage/WebInspector.h: Added.
3301 * WebProcess/WebPage/WebPage.cpp:
3302 (WebKit::WebPage::inspector): Lazily create the WebInspector.
3303 * WebProcess/WebPage/WebPage.h:
3304 * win/WebKit2.vcproj: Added new files.
3306 2010-10-25 Anders Carlsson <andersca@apple.com>
3308 Reviewed by Dan Bernstein.
3310 Update the fake Carbon window when the window frame changes
3311 https://bugs.webkit.org/show_bug.cgi?id=48273
3313 * UIProcess/API/mac/WKView.mm:
3315 (-[WKView _updateWindowFrame]):
3316 Pass the window frame in Carbon coordinates.
3318 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3319 (WebKit::NetscapePlugin::windowFrameChanged):
3320 Update the window bounds.
3322 * WebProcess/Plugins/PluginView.cpp:
3323 (WebKit::PluginView::setWindowFrame):
3326 (WebKit::PluginView::platformLayer):
3327 Fix a crash when WebCore asked for the layer before it was initialized.
3329 2010-10-25 Oliver Hunt <oliver@apple.com>
3331 Reviewed by Gavin Barraclough.
3333 Remove exec and globalData arguments from jsNumber
3334 https://bugs.webkit.org/show_bug.cgi?id=48270
3336 Mechanical removal of exec parameter to jsNumber
3338 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3339 (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
3341 2010-10-25 Anders Carlsson <andersca@apple.com>
3343 Reviewed by Darin Adler.
3345 Replace matchCountDidChange with didFindString/didFailToFindString
3346 https://bugs.webkit.org/show_bug.cgi?id=48262
3347 <rdar://problem/8568928>
3349 * UIProcess/API/C/WKPage.h:
3350 * UIProcess/WebFindClient.cpp:
3351 (WebKit::WebFindClient::didFindString):
3352 (WebKit::WebFindClient::didFailToFindString):
3353 * UIProcess/WebFindClient.h:
3354 * UIProcess/WebPageProxy.cpp:
3355 (WebKit::WebPageProxy::didFindString):
3356 (WebKit::WebPageProxy::didFailToFindString):
3357 * UIProcess/WebPageProxy.h:
3358 * UIProcess/WebPageProxy.messages.in:
3359 * WebProcess/WebPage/FindController.cpp:
3360 (WebKit::FindController::findString):
3362 2010-10-25 Anders Carlsson <andersca@apple.com>
3364 Reviewed by Adam Roben.
3366 Add a pageDidScroll BundleUIClient callback
3367 https://bugs.webkit.org/show_bug.cgi?id=48260
3368 <rdar://problem/8531159>
3370 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3371 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3372 (WebKit::InjectedBundlePageUIClient::pageDidScroll):
3373 Call the pageDidScroll callback.
3375 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3376 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3377 (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
3378 (WebKit::WebChromeClient::scroll):
3381 * WebProcess/WebPage/WebPage.cpp:
3382 (WebKit::WebPage::pageDidScroll):
3383 Hide the find banner UI and call the BundleUIClient pageDidScroll callback.
3385 2010-10-25 Brian Weinstein <bweinstein@apple.com>
3387 Reviewed by Adam Roben.
3389 Control + Mousewheel shouldn't be handled in WebKit2
3390 https://bugs.webkit.org/show_bug.cgi?id=48253
3392 Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.
3394 * UIProcess/win/WebView.cpp:
3395 (WebKit::WebView::onWheelEvent):
3397 2010-10-25 Sam Weinig <sam@webkit.org>
3399 Reviewed by Dan Bernstein.
3401 cancelledError for WebKit2 on windows should use kCFErrorDomainCFNetwork instead of webKitErrorDomain
3402 https://bugs.webkit.org/show_bug.cgi?id=48254
3404 * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
3405 (WebKit::cancelledError): Use kCFErrorDomainCFNetwork instead of webKitErrorDomain and switch over
3406 to using kCFURLErrorCancelled instead of a hard coded constant.
3408 2010-10-25 Sam Weinig <sam@webkit.org>
3410 Reviewed by Anders Carlsson.
3412 Need WebKit2 API to figure out if a frame can provide source
3413 <rdar://problem/8424632>
3414 https://bugs.webkit.org/show_bug.cgi?id=48252
3416 * UIProcess/API/C/WKFrame.cpp:
3417 (WKFrameCanProvideSource):
3418 * UIProcess/API/C/WKFrame.h:
3419 * UIProcess/WebFrameProxy.cpp:
3420 (WebKit::WebFrameProxy::canProvideSource):
3421 * UIProcess/WebFrameProxy.h:
3422 Add API to figure out if a frame can provide source based on its
3425 2010-10-25 Anders Carlsson <andersca@apple.com>
3427 Reviewed by Dan Bernstein.
3429 Java applets don't display on the page
3430 https://bugs.webkit.org/show_bug.cgi?id=48251
3431 <rdar://problem/8483759>
3433 Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.
3435 * Shared/WebPreferencesStore.cpp:
3436 (WebKit::WebPreferencesStore::WebPreferencesStore):
3437 Initialize javaEnabled.
3439 (WebKit::WebPreferencesStore::encode):
3442 (WebKit::WebPreferencesStore::decode):
3445 * Shared/WebPreferencesStore.h:
3448 * UIProcess/API/C/WKPreferences.cpp:
3449 (WKPReferencesSetJavaEnabled):
3450 (WKPReferencesGetJavaEnabled):
3451 Call the WebPreferences functions.
3453 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3454 (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
3455 Just call createPlugin.
3457 * WebProcess/WebPage/WebPage.cpp:
3458 (WebKit::WebPage::updatePreferences):
3459 Call Settings::setJavaEnabled.
3461 2010-10-25 Patrick Gansterer <paroga@webkit.org>
3463 Reviewed by David Kilzer.
3465 Replace _countof with WTF_ARRAY_LENGTH
3466 https://bugs.webkit.org/show_bug.cgi?id=48229
3468 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3469 (WebKit::ProcessLauncher::launchProcess):
3470 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3471 (WebKit::safariPluginsDirectory):
3472 (WebKit::addMozillaPluginDirectories):
3473 (WebKit::addWindowsMediaPlayerPluginDirectory):
3474 (WebKit::addAdobeAcrobatPluginDirectory):
3475 (WebKit::addMacromediaPluginDirectories):
3476 (WebKit::addPluginPathsFromRegistry):
3477 * WebProcess/WebPage/win/WebPageWin.cpp:
3478 (WebKit::WebPage::interpretKeyEvent):
3480 2010-10-25 Adam Roben <aroben@apple.com>
3482 Stop copying .messages.in files into WebKit2's framework bundle
3484 Fixes <http://webkit.org/b/48232> Several .messages.in files end up in
3485 WebKit2's framework bundle
3487 Reviewed by Dan Bernstein.
3489 * WebKit2.xcodeproj/project.pbxproj:
3491 2010-10-25 Andras Becsi <abecsi@webkit.org>
3493 Reviewed by Csaba Osztrogonác.
3495 [Qt] Fix the WebKit2 build after sheriffbot messed up the rollout patch.
3496 https://bugs.webkit.org/show_bug.cgi?id=48238
3498 * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
3499 (WebKit::MappedMemory::mapSize):
3500 (WebKit::MappedMemory::markUsed):
3501 (WebKit::MappedMemory::markFree):
3502 (WebKit::MappedMemory::isFree):
3503 (WebKit::MappedMemory::data):
3505 2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
3507 Unreviewed, rolling out r70450.
3508 http://trac.webkit.org/changeset/70450
3509 https://bugs.webkit.org/show_bug.cgi?id=48238
3511 Causes WTR to crash on tests which use SharedMemory.
3512 (Requested by bbandix on #webkit).
3514 * Platform/SharedMemory.h:
3515 * Platform/qt/MappedMemoryPool.cpp: Removed.
3516 * Platform/qt/SharedMemoryQt.cpp:
3517 (WebKit::SharedMemory::Handle::Handle):
3518 (WebKit::SharedMemory::Handle::~Handle):
3519 (WebKit::SharedMemory::Handle::encode):
3520 (WebKit::SharedMemory::Handle::decode):
3521 (WebKit::SharedMemory::create):
3522 (WebKit::SharedMemory::~SharedMemory):
3523 (WebKit::SharedMemory::createHandle):
3524 (WebKit::SharedMemory::systemPageSize):
3525 * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
3526 (WebKit::MappedMemory::mapSize):
3527 (WebKit::MappedMemory::markUsed):
3528 (WebKit::MappedMemory::markFree):
3529 (WebKit::MappedMemory::isFree):
3530 (WebKit::MappedMemory::data):
3531 * Shared/qt/MappedMemoryPool.cpp: Added.
3532 (WebKit::MappedMemoryPool::MappedMemoryPool):
3533 (WebKit::MappedMemoryPool::instance):
3534 (WebKit::MappedMemoryPool::size):
3535 (WebKit::MappedMemoryPool::at):
3536 (WebKit::MappedMemoryPool::append):
3537 (WebKit::MappedMemoryPool::cleanUp):
3538 * Shared/qt/UpdateChunk.cpp:
3539 (WebKit::mapMemory):
3541 (WebKit::UpdateChunk::UpdateChunk):
3542 (WebKit::UpdateChunk::decode):
3543 * Shared/qt/UpdateChunk.h:
3546 2010-10-25 Zoltan Horvath <zoltan@webkit.org>
3548 Reviewed by Kenneth Rohde Christiansen.
3550 [Qt] Implement SharedMemory for WebKit2
3551 https://bugs.webkit.org/show_bug.cgi?id=47345
3553 Implement unimplemented functions in SharedMemoryQt.cpp.
3554 Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
3555 Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
3556 Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary
3557 methods of MappedMemoryPool.
3559 * Platform/SharedMemory.h: Add a handle member for Qt.
3560 * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
3561 (WebKit::MappedMemoryPool::searchForMappedMemory):
3562 (WebKit::MappedMemoryPool::mapMemory):
3563 (WebKit::MappedMemoryPool::mapFile):
3564 * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
3565 (WebKit::MappedMemoryPool::MappedMemory::mapSize):
3566 (WebKit::MappedMemoryPool::MappedMemory::markUsed):
3567 (WebKit::MappedMemoryPool::MappedMemory::markFree):
3568 (WebKit::MappedMemoryPool::MappedMemory::isFree):
3569 (WebKit::MappedMemoryPool::MappedMemory::data):
3570 (WebKit::MappedMemoryPool::MappedMemoryPool):
3571 Move MappedMemory implementation into MappedMemoryPool.
3572 * Platform/qt/SharedMemoryQt.cpp:
3573 (WebKit::SharedMemory::Handle::Handle): Implement.
3574 (WebKit::SharedMemory::Handle::~Handle):
3575 (WebKit::SharedMemory::Handle::isNull): Implement.
3576 (WebKit::SharedMemory::Handle::encode): Implement.
3577 (WebKit::SharedMemory::Handle::decode): Implement.
3578 (WebKit::SharedMemory::create): Implement.
3579 (WebKit::mapProtection): Added.
3580 (WebKit::SharedMemory::~SharedMemory): Implement.
3581 (WebKit::SharedMemory::createHandle): Implement.
3582 (WebKit::SharedMemory::systemPageSize): Implement.
3583 * Shared/qt/MappedMemory.h: Removed.
3584 * Shared/qt/MappedMemoryPool.cpp: Removed.
3585 * Shared/qt/UpdateChunk.cpp:
3586 (WebKit::UpdateChunk::UpdateChunk):
3587 (WebKit::UpdateChunk::decode):
3588 Modify to use MappedMemoryPool.
3589 * Shared/qt/UpdateChunk.h:
3591 Modify affected lines.
3593 2010-10-24 Sam Weinig <sam@webkit.org>
3595 Reviewed by Dan Bernstein.
3597 Need a way to determine the screen rect for a form control in WebKit2
3598 <rdar://problem/8530670>
3599 https://bugs.webkit.org/show_bug.cgi?id=48216
3601 * Shared/API/c/WKSharedAPICast.h:
3603 Add conversion from IntRect to WKRect.
3605 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3606 (WKBundleNodeHandleGetElementBounds):
3607 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3608 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3609 (WebKit::InjectedBundleNodeHandle::elementBounds):
3610 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3611 Add SPI to get the rect in window space. The client can then convert this to screen
3612 space if they wish to.
3614 2010-10-23 Xan Lopez <xlopez@igalia.com>
3616 Reviewed by Sam Weinig.
3618 Unify globalData APIs
3619 https://bugs.webkit.org/show_bug.cgi?id=47969
3621 Adapt code to JSGlobalObject::globalData returning a reference
3622 instead of a pointer.
3624 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3625 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3626 (WebKit::NPRuntimeObjectMap::evaluate):
3628 2010-10-23 Alexey Proskuryakov <ap@apple.com>
3630 Reviewed by Anders Carlsson.
3632 https://bugs.webkit.org/show_bug.cgi?id=48083
3633 <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
3635 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
3636 Initialize the new method.
3638 2010-10-21 Timothy Hatcher <timothy@apple.com>
3640 Stub out WebInspectorFrontendClient.
3642 https://bugs.webkit.org/show_bug.cgi?id=48091
3644 Reviewed by Adam Roben.
3646 * WebKit2.pro: Added WebInspectorFrontendClient.{cpp,h}.
3647 * WebKit2.xcodeproj/project.pbxproj: Added WebInspectorFrontendClient.{cpp,h}.
3648 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Added.
3649 (WebKit::WebInspectorFrontendClient::windowObjectCleared): Added.
3650 (WebKit::WebInspectorFrontendClient::frontendLoaded): Added.
3651 (WebKit::WebInspectorFrontendClient::moveWindowBy): Added.
3652 (WebKit::WebInspectorFrontendClient::localizedStringsURL): Added.
3653 (WebKit::WebInspectorFrontendClient::hiddenPanels): Added.