1 2010-08-07 Balazs Kelemen <kb@inf.u-szeged.hu>
3 Reviewed by Eric Seidel.
5 NPAPI headers should be included through npruntime_internal.h
7 https://bugs.webkit.org/show_bug.cgi?id=43620
10 * WebProcess/Plugins/NPJSObject.h:
11 * WebProcess/Plugins/NPRuntimeUtilities.h:
12 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
14 2010-08-07 Balazs Kelemen <kb@inf.u-szeged.hu>
16 Reviewed by Eric Seidel.
18 [Qt] Build WebKit2 into a static lib
20 https://bugs.webkit.org/show_bug.cgi?id=43621
22 * WebKit2.pri: Added. Defined addWebKit2Lib function that defines how to link against the static lib.
23 * WebKit2.pro: Build specification for the WebKit2 framework.
24 * WebProcess.pro: Copied from WebKit2/WebKit2.pro. Build specification for the WebProcess binary.
26 2010-08-05 Jon Honeycutt <jhoneycutt@apple.com>
28 WebKitTestRunner needs to be able to set the font smoothing type
29 https://bugs.webkit.org/show_bug.cgi?id=43406
31 Reviewed by Adam Roben.
33 * Shared/FontSmoothingLevel.h: Added.
36 * Shared/WebPreferencesStore.cpp:
37 (WebKit::WebPreferencesStore::WebPreferencesStore):
38 Initialize fontSmoothingLevel.
39 (WebKit::WebPreferencesStore::swap):
40 Copy fontSmoothingLevel.
42 * Shared/WebPreferencesStore.h:
43 (WebKit::WebPreferencesStore::encode):
44 Encode fontSmoothingLevel.
45 (WebKit::WebPreferencesStore::decode):
48 * UIProcess/API/C/WKPreferencesPrivate.cpp: Added.
49 (WKPreferencesSetFontSmoothingLevel):
50 Get the font smoothing level from the WKFontSmoothingLevel, and call
51 WebPreferences::setFontSmoothingLevel().
52 (WKPreferencesGetFontSmoothingLevel):
53 Get the font smoothing level from WebPreferences, and translate it to a
56 * UIProcess/API/C/WKPreferencesPrivate.h: Added.
57 Declare the font smoothing levels, and declare functions to get and set
60 * UIProcess/WebPreferences.cpp:
61 (WebKit::WebPreferences::setFontSmoothingLevel):
62 Set fontSmoothingLevel and call update().
63 (WebKit::WebPreferences::fontSmoothingLevel):
66 * UIProcess/WebPreferences.h:
67 Declare getter and setter for fontSmoothingLevel.
69 * WebKit2.xcodeproj/project.pbxproj:
70 Add new files to project.
72 * WebProcess/WebPage/WebPage.cpp:
73 (WebKit::WebPage::preferencesDidChange):
74 Call platformPreferencesDidChange().
76 * WebProcess/WebPage/WebPage.h:
77 Declare platformPreferencesDidChange().
79 * WebProcess/WebPage/mac/WebPageMac.mm:
80 (WebKit::WebPage::platformPreferencesDidChange):
83 * WebProcess/WebPage/qt/WebPageQt.cpp:
84 (WebKit::WebPage::platformPreferencesDidChange):
87 * WebProcess/WebPage/win/WebPageWin.cpp:
88 (WebKit::WebPage::platformPreferencesDidChange):
89 On CG platforms, call wkSetFontSmoothingLevel(). This matches the code
90 in old WebKit's WebPreferences. Set the font rendering mode to either
91 normal (CG) or alternative (GDI) based on the font smoothing level. This
92 matches what was done in old WebKit's WebView.
95 Add FontSmoothingLevel.h and WKPreferencesPrivate.{h,cpp} to project.
97 * win/WebKit2Generated.make:
98 Copy WKPreferencesPrivate.h.
100 2010-08-06 Anders Carlsson <andersca@apple.com>
104 * Platform/win/SharedMemoryWin.cpp:
105 (WebKit::SharedMemory::Handle::encode):
106 (WebKit::SharedMemory::Handle::decode):
107 * Shared/qt/UpdateChunk.cpp:
108 (WebKit::UpdateChunk::encode):
109 (WebKit::UpdateChunk::decode):
110 * Shared/qt/UpdateChunk.h:
111 * Shared/win/UpdateChunk.cpp:
112 (WebKit::UpdateChunk::encode):
113 (WebKit::UpdateChunk::decode):
114 * Shared/win/UpdateChunk.h:
116 2010-08-06 Anders Carlsson <andersca@apple.com>
118 Reviewed by Sam Weinig.
120 Change all ArgumentEncoder and ArgumentDecoder references to pointers
121 https://bugs.webkit.org/show_bug.cgi?id=43651
123 * Platform/CoreIPC/ArgumentCoder.h:
124 * Platform/CoreIPC/ArgumentDecoder.h:
125 * Platform/CoreIPC/Arguments.h:
126 * Platform/CoreIPC/Attachment.cpp:
127 * Platform/CoreIPC/Attachment.h:
128 * Platform/CoreIPC/mac/MachPort.h:
129 * Platform/SharedMemory.h:
130 * Platform/mac/SharedMemoryMac.cpp:
131 * Shared/DrawingAreaBase.cpp:
132 * Shared/DrawingAreaBase.h:
134 * Shared/WebNavigationDataStore.h:
135 * Shared/WebPreferencesStore.h:
136 * Shared/mac/UpdateChunk.cpp:
137 * Shared/mac/UpdateChunk.h:
138 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
139 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
140 * UIProcess/DrawingAreaProxy.h:
141 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
142 * UIProcess/LayerBackedDrawingAreaProxy.h:
143 * UIProcess/WebContext.cpp:
144 * UIProcess/WebContext.h:
145 * UIProcess/WebPageProxy.cpp:
146 * UIProcess/WebPageProxy.h:
147 * UIProcess/WebProcessProxy.cpp:
148 * WebProcess/InjectedBundle/InjectedBundle.cpp:
149 * WebProcess/InjectedBundle/InjectedBundle.h:
150 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
151 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
152 * WebProcess/WebPage/DrawingArea.h:
153 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
154 * WebProcess/WebPage/LayerBackedDrawingArea.h:
155 * WebProcess/WebPage/WebPage.cpp:
156 * WebProcess/WebPage/WebPage.h:
157 * WebProcess/WebProcess.cpp:
159 2010-08-06 Anders Carlsson <andersca@apple.com>
161 Reviewed by Sam Weinig.
163 Don't try to allocate a vector unless we know the buffer can contain it
164 https://bugs.webkit.org/show_bug.cgi?id=43647
166 * Platform/CoreIPC/ArgumentCoders.h:
168 Check that the argument decoder buffer actually can hold all the vector elements.
170 * Platform/CoreIPC/ArgumentDecoder.cpp:
171 (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
172 Align the current position to the given alignment, add the size and check if the position is
173 past the end of the buffer.
175 * Platform/CoreIPC/ArgumentDecoder.h:
176 (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
177 Get the size and alignment and call the other bufferIsLargeEnoughtToContain overload.
179 2010-08-06 Anders Carlsson <andersca@apple.com>
181 Reviewed by Adam Roben.
183 Detect invalid CoreIPC messages and call didReceiveInvalidMessage
184 https://bugs.webkit.org/show_bug.cgi?id=43643
185 <rdar://problem/7891069>
187 * Platform/CoreIPC/ArgumentDecoder.cpp:
188 (CoreIPC::ArgumentDecoder::alignBufferPosition):
189 If we can't correctly align the buffer position, mark the decoder as invalid.
191 * Platform/CoreIPC/ArgumentDecoder.h:
192 (CoreIPC::ArgumentDecoder::isInvalid):
193 Check if the argument decoder is valid.
195 (CoreIPC::ArgumentDecoder::markInvalid):
196 Mark the argument decoder as invalid, by setting its buffer position past its end position.
198 * Platform/CoreIPC/Connection.cpp:
199 (CoreIPC::Connection::dispatchMessages):
200 Check if m_client is null before dispatching messages. If an argument decoder was marked invalid, call
201 Connection::Client::didReceiveInvalidMessage.
203 * Platform/CoreIPC/Connection.h:
204 (CoreIPC::Connection::Message::releaseArguments):
205 Rename destroy to releaseArguments and make it return a PassOwnPtr.
207 * UIProcess/WebProcessProxy.cpp:
208 (WebKit::WebProcessProxy::~WebProcessProxy):
209 Call releaseArguments instead of destroy.
211 (WebKit::WebProcessProxy::didReceiveInvalidMessage):
212 Kill the web process and invalidate its connection.
214 * WebProcess/WebProcess.cpp:
215 (WebKit::WebProcess::didReceiveInvalidMessage):
216 Don't do anything, if the UI process is sending invalid messages there's not much we can do.
218 * WebProcess/WebProcess.h:
220 2010-08-06 Anders Carlsson <andersca@apple.com>
222 Reviewed by Adam Roben.
224 Add CoreIPC::MessageReceiver class
225 https://bugs.webkit.org/show_bug.cgi?id=43637
227 * Platform/CoreIPC/Connection.h:
228 (CoreIPC::Connection::MessageReceiver::~MessageReceiver):
229 Add MessageReceiver class and make Client inherit from it.
231 (CoreIPC::Connection::MessageReceiver::didReceiveSyncMessage):
232 Change didReceiveSyncMessage from being a pure virtual member function and make it
233 assert by default instead.
235 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
236 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
237 Remove ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage.
239 * Shared/DrawingAreaBase.h:
240 Include "Connection.h" instead.
242 * UIProcess/DrawingAreaProxy.h:
243 (WebKit::DrawingAreaProxy::didReceiveSyncMessage):
244 Change didReceiveSyncMessage from being a pure virtual member function and make it
245 assert by default instead.
247 * WebProcess/WebProcess.cpp:
248 * WebProcess/WebProcess.h:
249 Remove didReceiveSyncMessage.
251 2010-08-06 Jessie Berlin <jberlin@apple.com>
253 Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
256 * UIProcess/PageClient.h:
257 * UIProcess/VisitedLinkProvider.h:
258 * UIProcess/WebContextInjectedBundleClient.h:
259 * UIProcess/WebFrameProxy.h:
260 * UIProcess/WebHistoryClient.h:
261 * UIProcess/WebLoaderClient.h:
262 * UIProcess/WebPolicyClient.h:
263 * UIProcess/WebProcessProxy.h:
264 * UIProcess/WebUIClient.h:
265 * UIProcess/win/WebView.h:
266 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
267 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
268 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
269 * WebProcess/Plugins/NPRuntimeObjectMap.h:
270 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
271 * WebProcess/Plugins/PluginController.h:
272 * WebProcess/WebPage/WebFrame.h:
273 * WebProcess/WebPage/WebPage.h:
274 * WebProcess/WebProcess.h:
276 2010-08-05 Sam Weinig <sam@webkit.org>
278 Reviewed by Anders Carlsson.
280 Add form client for injected bundle code
281 https://bugs.webkit.org/show_bug.cgi?id=43603
283 * WebKit2.xcodeproj/project.pbxproj:
284 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
285 (WKBundlePageSetFormClient):
286 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
287 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: Added.
288 (WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient):
289 (WebKit::InjectedBundlePageFormClient::initialize):
290 (WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
291 (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
292 (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
293 (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
294 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added.
295 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
296 (WebKit::WebEditorClient::textFieldDidBeginEditing):
297 (WebKit::WebEditorClient::textFieldDidEndEditing):
298 (WebKit::WebEditorClient::textDidChangeInTextField):
299 (WebKit::WebEditorClient::textDidChangeInTextArea):
300 * WebProcess/WebPage/WebPage.cpp:
301 (WebKit::WebPage::initializeInjectedBundleFormClient):
302 * WebProcess/WebPage/WebPage.h:
303 (WebKit::WebPage::injectedBundleFormClient):
304 * win/WebKit2.vcproj:
306 2010-08-05 Sam Weinig <sam@webkit.org>
308 Reviewed by Anders Carlsson.
310 Add ability to get a JSValueRef for a node handle and a world
311 https://bugs.webkit.org/show_bug.cgi?id=43591
313 - Add API to get a JSValueRef for a world, node and frame (the
314 frame is currently necessary to pick the right globalObject for
316 - Add API to a JSGlobalContextRef for a world and a frame.
318 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
319 (WKBundleFrameGetJavaScriptContextForWorld):
320 (WKBundleFrameGetJavaScriptWrapperForNodeForWorld):
321 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
322 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
323 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
324 (WebKit::InjectedBundleNodeHandle::coreNode):
325 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
326 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
327 (WebKit::InjectedBundleScriptWorld::coreWorld):
328 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
329 * WebProcess/WebPage/WebFrame.cpp:
330 (WebKit::WebFrame::jsContext):
331 (WebKit::WebFrame::jsContextForWorld):
332 (WebKit::WebFrame::jsWrapperForWorld):
333 * WebProcess/WebPage/WebFrame.h:
335 2010-08-05 Gavin Barraclough <barraclough@apple.com>
337 Rubber stamped by Sam Weinig
339 Bug 43594 - Add string forwards to Forward.h
340 This allows us to remove forward declarations for these classes from
341 WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
343 * UIProcess/PageClient.h:
344 * UIProcess/VisitedLinkProvider.h:
345 * UIProcess/WebContextInjectedBundleClient.h:
346 * UIProcess/WebFrameProxy.h:
347 * UIProcess/WebHistoryClient.h:
348 * UIProcess/WebLoaderClient.h:
349 * UIProcess/WebPolicyClient.h:
350 * UIProcess/WebProcessProxy.h:
351 * UIProcess/WebUIClient.h:
352 * UIProcess/win/WebView.h:
353 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
354 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
355 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
356 * WebProcess/Plugins/NPRuntimeObjectMap.h:
357 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
358 * WebProcess/Plugins/PluginController.h:
359 * WebProcess/WebPage/WebFrame.h:
360 * WebProcess/WebPage/WebPage.h:
361 * WebProcess/WebProcess.h:
363 2010-08-05 Anders Carlsson <andersca@apple.com>
365 Reviewed by Sam Weinig.
367 Use the visited link provider for visited links
368 https://bugs.webkit.org/show_bug.cgi?id=43583
370 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
371 (WebProcessMessage::):
372 Remove AddVisitedLink.
374 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
375 (WebProcessProxyMessage::):
376 Remove PopulateVisitedLinks and add AddVisitedLink.
378 * UIProcess/WebContext.cpp:
379 (WebKit::WebContext::sharedProcessContext):
380 Initialize the main run loop before creating the context.
382 (WebKit::WebContext::sharedThreadContext):
385 (WebKit::WebContext::create):
388 (WebKit::WebContext::WebContext):
389 Initialize the visited link provider.
391 (WebKit::WebContext::processDidFinishLaunching):
392 Ask the visited link provider to populate visited links.
394 (WebKit::WebContext::addVisitedLink):
395 Ask the visited link provider to add the visited link.
397 * UIProcess/WebProcessProxy.cpp:
398 (WebKit::WebProcessProxy::addVisitedLink):
399 Call WebContext::addVisitedLink.
401 (WebKit::WebProcessProxy::didReceiveMessage):
402 Handle AddVisitedLink.
404 (WebKit::WebProcessProxy::didFinishLaunching):
405 Call WebContext::processdidFinishLaunching.
407 * UIProcess/WebProcessProxy.h:
408 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
409 (WebKit::WebChromeClient::populateVisitedLinks):
410 Don't send the WebProcessProxyMessage::PopulateVisitedLinks message.
412 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
413 (WebKit::WebPlatformStrategies::isLinkVisited):
414 Call WebProcess::isLinkVisited.
416 (WebKit::WebPlatformStrategies::addVisitedLink):
417 Call WebProcess::addVisitedLink.
419 * WebProcess/WebProcess.cpp:
420 (WebKit::WebProcess::setVisitedLinkTable):
421 Create a shared memory object and tell the visited link table about it.
423 (WebKit::WebProcess::visitedLinkStateChanged):
424 Go through the link hashes and call Page::visitedStateChanged.
426 (WebKit::WebProcess::allVisitedLinkStateChanged):
427 Call Page::allVisitedStateChanged.
429 (WebKit::WebProcess::isLinkVisited):
430 Call VisitedLinkTable::isLinkVisited.
432 (WebKit::WebProcess::addVisitedLink):
433 Inform the UI process about the added link.
435 (WebKit::WebProcess::didReceiveMessage):
438 2010-08-05 Steve Falkenburg <sfalken@apple.com>
441 Add missing include path.
443 * win/WebKit2Common.vsprops:
445 2010-08-05 Brady Eidson <beidson@apple.com>
447 Rubberstamped by Sam Weinig.
451 * WebKit2.xcodeproj/project.pbxproj:
453 2010-08-05 Steve Falkenburg <sfalken@apple.com>
456 Correct vcproj nesting.
458 * win/WebKit2.vcproj:
460 2010-08-05 Sam Weinig <sam@webkit.org>
462 Reviewed by Gavin Barraclough.
464 Add script world API for injected bundles
465 https://bugs.webkit.org/show_bug.cgi?id=43577
467 * Shared/APIObject.h:
468 (WebKit::APIObject::):
469 * WebKit2.xcodeproj/project.pbxproj:
470 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
472 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
473 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: Added.
474 (WKBundleScriptWorldGetTypeID):
475 (WKBundleScriptWorldCreateWorld):
476 (WKBundleScriptWorldNormalWorld):
477 (WKBundleScriptWorldRetain):
478 (WKBundleScriptWorldRelease):
479 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h: Added.
480 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
481 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: Added.
483 (WebKit::InjectedBundleScriptWorld::create):
484 (WebKit::InjectedBundleScriptWorld::getOrCreate):
485 (WebKit::InjectedBundleScriptWorld::normalWorld):
486 (WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld):
487 (WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld):
488 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Added.
489 (WebKit::InjectedBundleScriptWorld::type):
490 * win/WebKit2.vcproj:
491 * win/WebKit2Generated.make:
493 2010-08-05 Sam Weinig <sam@webkit.org>
495 Reviewed Anders Carlsson.
497 Add DOM Node wrapper class for injected bundle
498 https://bugs.webkit.org/show_bug.cgi?id=43524
500 - This class should not expose any DOM APIs, but just be a handle that can be used to get a JS
501 wrapper for the node in a specific world.
503 * Shared/APIObject.h:
504 (WebKit::APIObject::):
505 * WebKit2.xcodeproj/project.pbxproj:
506 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
508 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
509 * WebProcess/InjectedBundle/API/c/WKBundleNode.h:
510 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: Added.
511 (WKBundleNodeHandleGetTypeID):
512 (WKBundleNodeHandleRetain):
513 (WKBundleNodeHandleRelease):
514 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h: Added.
515 * WebProcess/InjectedBundle/DOM: Added.
516 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added.
517 (WebKit::domHandleCache):
518 (WebKit::getDOMHandle):
519 (WebKit::setDOMHandle):
520 (WebKit::removeDOMHandle):
521 (WebKit::InjectedBundleNodeHandle::getOrCreate):
522 (WebKit::InjectedBundleNodeHandle::create):
523 (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
524 (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
525 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Added.
526 (WebKit::InjectedBundleNodeHandle::type):
527 * win/WebKit2.vcproj:
528 * win/WebKit2Generated.make:
530 2010-08-05 Anders Carlsson <andersca@apple.com>
534 * Platform/mac/SharedMemoryMac.cpp:
536 2010-08-05 Anders Carlsson <andersca@apple.com>
538 Reviewed by Sam Weinig.
540 Add VisitedLinkProvider class
541 https://bugs.webkit.org/show_bug.cgi?id=43570
543 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
544 (WebProcessMessage::):
545 Add SetVisitedLinkTable, VisitedLinkStateChanged and AllVisitedLinkStateChanged.
547 * UIProcess/VisitedLinkProvider.cpp: Added.
548 (WebKit::VisitedLinkProvider::VisitedLinkProvider):
551 (WebKit::VisitedLinkProvider::populateVisitedLinksIfNeeded):
552 Ask the context to populate visited links.
554 (WebKit::VisitedLinkProvider::addVisitedLink):
555 Add the link hash to the set of pending visited links and start the timer.
557 (WebKit::nextPowerOf2):
560 (WebKit::tableSizeForKeyCount):
561 Given a key count, returns a table size. The table size is always a power of two, and
562 is chosen so that the table is always at least half empty.
564 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
565 First, check if we need to resize the hash table and allocate new shared memory for it if that is the case.
566 Then, go through the pending link hash vector and insert all the elements in the table. Finally, notify the web
567 process about visited links whose state have changed.
569 * WebProcess/WebProcess.cpp:
570 (WebKit::WebProcess::didReceiveMessage):
573 * win/WebKit2.vcproj:
574 * WebKit2.xcodeproj/project.pbxproj:
575 Add VisitedLinkProvider.cpp and VisitedLinkProvider.h.
577 2010-08-05 Anders Carlsson <andersca@apple.com>
579 Reviewed by Sam Weinig.
581 Add VisitedLinkTable class
582 https://bugs.webkit.org/show_bug.cgi?id=43566
584 * Shared/VisitedLinkTable.cpp: Added.
585 (WebKit::VisitedLinkTable::VisitedLinkTable):
586 (WebKit::VisitedLinkTable::~VisitedLinkTable):
587 Add out of line constructors so we won't have to include SharedMemory.h in the
588 VisitedLinkTable.h header.
590 (WebKit::isPowerOf2):
593 (WebKit::VisitedLinkTable::setSharedMemory):
594 Set the new shared memory and update the table size and hash.
596 (WebKit::doubleHash):
597 Add helper function from the WTF HashTable.
599 (WebKit::VisitedLinkTable::addLinkHash):
600 Add a link hash to the table.
602 (WebKit::VisitedLinkTable::isLinkVisited):
603 See if there is an entry for the given link hash.
605 * Shared/VisitedLinkTable.h: Added.
606 (WebKit::VisitedLinkTable::sharedMemory):
607 * WebKit2.xcodeproj/project.pbxproj:
608 * win/WebKit2.vcproj:
609 Add VisitedLinkTable.cpp and VisitedLinkTable.h
611 2010-08-04 Anders Carlsson <andersca@apple.com>
613 Reviewed by Adam Roben.
615 Add shared memory abstraction
616 https://bugs.webkit.org/show_bug.cgi?id=43535
617 <rdar://problem/8275295>
619 * Platform/SharedMemory.h: Added.
620 (WebKit::SharedMemory::):
621 (WebKit::SharedMemory::size):
622 Return the size, in bytes, of the shared memory object.
624 (WebKit::SharedMemory::data):
625 Return a pointer to the shared memory object.
627 * Platform/mac/SharedMemoryMac.cpp: Added.
628 (WebKit::SharedMemory::Handle):
629 A shared memory handle, which can be passed in a CoreIPC Connection.
631 (WebKit::SharedMemory::create):
632 Allocate the shared memory.
634 (WebKit::SharedMemory::~SharedMemory):
635 Deallocate the shared memory.
637 (WebKit::SharedMemory::createHandle):
638 Create a mach port and pass it to the handle.
640 (WebKit::SharedMemory::systemPageSize):
641 Return the system page size, in bytes.
643 * Platform/win/SharedMemoryWin.cpp: Added.
644 Add stubbed out version.
646 * WebKit2.xcodeproj/project.pbxproj:
647 * win/WebKit2.vcproj:
650 2010-08-05 Jian Li <jianli@chromium.org>
652 Reviewed by David Levin.
654 Unify blob related feature defines to ENABLE(BLOB).
655 https://bugs.webkit.org/show_bug.cgi?id=43081
657 * Configurations/FeatureDefines.xcconfig:
659 2010-08-05 Balazs Kelemen <kb@inf.u-szeged.hu>
661 Rubber-stamped by Kenneth Rohde Christiansen.
663 [Qt] Remove redundant include paths from WebKit2.pro.
667 2010-08-04 Adam Roben <aroben@apple.com>
669 Teach WebKit2 how to load the TestNetscapePlugin
671 Fixes <http://webkit.org/b/43513> WebKitTestRunner on Windows fails to
672 load TestNetscapePlugin
674 Reviewed by Jon Honeycutt.
676 * Platform/Module.cpp:
677 (WebKit::Module::Module): Initialize m_module on Windows.
679 * Platform/Module.h: Added m_module on Windows.
681 * Platform/win/ModuleWin.cpp:
682 (WebKit::Module::load): Implemented using ::LoadLibraryExW.
683 (WebKit::Module::unload): Implemented using ::FreeLibrary.
684 (WebKit::Module::platformFunctionPointer): Implemented using
687 * Platform/win/RunLoopWin.cpp:
688 (RunLoop::TimerBase::timerFired): Kill the native timer before calling
689 the fired callback. This makes all our timers non-repeating, but
690 that's all we need currently.
691 (RunLoop::TimerBase::start): Added an assertion to help us figure out
692 when we need to implement repeating timers. Also fixed a typo.
694 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
695 (WebKit::PluginInfoStore::pluginsDirectories): Added a FIXME.
697 (WebKit::PathWalker::PathWalker):
698 (WebKit::PathWalker::~PathWalker):
699 (WebKit::PathWalker::isValid):
700 (WebKit::PathWalker::data):
701 (WebKit::PathWalker::step):
702 Added. This class wraps the ::FindFirstFile/::FindNextFile APIs.
704 (WebKit::PluginInfoStore::pluginPathsInDirectory): Implemented by
706 WebCore::PluginDatabase::getPluginPathsInDirectories.
707 (WebKit::getVersionInfo): Copied from PluginDatabaseWin.cpp.
708 (WebKit::PluginInfoStore::getPluginInfo): Implemented by porting logic
709 from WebCore::PluginPackage::fetchInfo.
710 (WebKit::PluginInfoStore::shouldUsePlugin): Changed to always return
711 true for now. Added a FIXME about implementing this for real.
713 * UIProcess/WebProcessProxy.cpp:
714 (WebKit::WebProcessProxy::didReceiveSyncMessage):
715 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
716 (WebKit::WebFrameLoaderClient::createPlugin):
717 Removed PLATFORM(MAC) guards around plugin code.
719 * win/WebKit2.vcproj: Let VS sort the file.
721 2010-08-05 Antti Koivisto <koivisto@iki.fi>
723 Reviewed by Kenneth Rohde Christiansen.
725 Use toCopiedRef for making WK objects
726 https://bugs.webkit.org/show_bug.cgi?id=43552
728 * UIProcess/API/cpp/qt/WKStringQt.cpp:
729 (WKStringCreateWithQString):
730 * UIProcess/API/cpp/qt/WKURLQt.cpp:
731 (WKURLCreateWithQUrl):
733 2010-08-04 Brady Eidson <beidson@apple.com>
735 Reviewed by Sam Weinig.
737 Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
738 https://bugs.webkit.org/show_bug.cgi?id=43522
740 This includes adding a WKErrorRef object which - for now - either exists or doesn't.
741 In the future, it may contain useful information about the error.
743 * WebKit2.xcodeproj/project.pbxproj:
744 * win/WebKit2.vcproj:
745 * win/WebKit2Generated.make:
747 * Shared/APIObject.h:
748 (WebKit::APIObject::):
749 * UIProcess/API/C/WKAPICast.h:
750 * UIProcess/API/C/WKBase.h:
752 * Shared/WebError.h: Added.
753 (WebKit::WebError::create):
754 (WebKit::WebError::WebError):
755 (WebKit::WebError::type):
757 * UIProcess/API/C/WKError.cpp: Added.
759 * UIProcess/API/C/WKError.h: Added.
761 * UIProcess/API/C/WKPage.cpp:
762 (WKPageRunJavaScriptInMainFrame):
763 (callRunJavaScriptBlockAndRelease):
764 (WKPageRunJavaScriptInMainFrame_b):
765 (WKPageRenderTreeExternalRepresentation):
766 (callRenderTreeExternalRepresentationBlockAndDispose):
767 (WKPageRenderTreeExternalRepresentation_b):
768 * UIProcess/API/C/WKPage.h:
769 * UIProcess/API/C/WKPagePrivate.h:
771 * UIProcess/GenericCallback.h:
772 (WebKit::GenericCallback::create):
773 (WebKit::GenericCallback::performCallbackWithReturnValue):
774 (WebKit::GenericCallback::invalidate):
775 (WebKit::GenericCallback::GenericCallback):
777 2010-08-04 Ada Chan <adachan@apple.com>
781 * win/WebKit2Generated.make:
783 2010-08-04 John Sullivan <sullivan@apple.com>
785 Build fix, rubber-stamped by Brady Eidson.
787 * WebKit2.xcodeproj/project.pbxproj:
788 Made WKData.h a public header.
790 2010-08-04 Adam Roben <aroben@apple.com>
794 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
795 (WebKit::NPN_SetValue): Removed unreachable code.
797 2010-08-04 Adam Roben <aroben@apple.com>
801 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
802 (WebKit::NPN_SetValue): Added some case statements that are compiled
803 on Windows to avoid a warning about having default but not cases.
805 2010-08-04 Adam Roben <aroben@apple.com>
809 * win/WebKit2.vcproj: Added NetscapeBrowserFuncs.
811 2010-08-04 Adam Roben <aroben@apple.com>
815 The functions in NetscapePluginModuleWin.cpp have been moved to
816 NetscapePluginModule.cpp.
818 * WebProcess/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Removed.
819 * win/WebKit2.vcproj: Removed NetscapePluginModuleWin.
821 2010-08-04 Adam Roben <aroben@apple.com>
823 Move bundle-loading code from NetscapePluginModule to a new Module
826 This allows more NetscapePluginModule code to be cross-platform.
828 Fixes <http://webkit.org/b/43497> NetscapePluginModule::try/unload
829 should be cross-platform
831 Reviewed by Anders Carlsson.
833 * Platform/Module.cpp: Added.
834 (WebKit::Module::Module): Store our path.
835 (WebKit::Module::~Module): Unload our native module.
837 * Platform/Module.h: Added.
838 (WebKit::Module::leakBundle): Does what it says.
839 (WebKit::Module::functionPointer): Returns a pointer to the named
840 function, with the right type.
842 * Platform/mac/ModuleMac.mm: Added.
843 (WebKit::Module::load): Code was moved here from
844 NetscapePluginModule::tryLoad.
845 (WebKit::Module::unload): Just clears our bundle.
846 (WebKit::Module::platformFunctionPointer): Code was moved here from
847 NetscapePluginModuleMac.cpp.
849 * Platform/qt/ModuleQt.cpp: Added.
850 (WebKit::Module::load):
851 (WebKit::Module::unload):
852 (WebKit::Module::platformFunctionPointer):
853 * Platform/win/ModuleWin.cpp: Added.
854 (WebKit::Module::load):
855 (WebKit::Module::unload):
856 (WebKit::Module::platformFunctionPointer):
857 Just stubbed out these functions.
859 * WebKit2.xcodeproj/project.pbxproj: Added Module.
861 * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
862 (WebKit::NetscapePluginModule::tryLoad):
863 (WebKit::NetscapePluginModule::unload):
864 Moved here from NetscapePluginModuleMac.cpp. Now uses the
865 cross-platform m_module member.
867 * WebProcess/Plugins/Netscape/NetscapePluginModule.h: Replaced
868 m_bundle with m_module.
870 * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp: Removed.
872 * win/WebKit2.vcproj: Added Module.
874 2010-08-04 Brady Eidson <beidson@apple.com>
876 Reviewed by Sam Weinig.
878 Lay the groundwork for saving/restoring page session state to WK2
879 https://bugs.webkit.org/show_bug.cgi?id=43495
881 * WebKit2.xcodeproj/project.pbxproj:
882 * win/WebKit2.vcproj:
884 * Shared/APIObject.h:
885 (WebKit::APIObject::):
886 * UIProcess/API/C/WKAPICast.h:
887 * UIProcess/API/C/WKBase.h:
889 Arbitrary byte buffer:
890 * Shared/WebData.h: Added.
891 (WebKit::WebData::create):
892 (WebKit::WebData::bytes):
893 (WebKit::WebData::size):
894 (WebKit::WebData::WebData):
895 (WebKit::WebData::type):
897 API facing object to act as a byte buffer:
898 * UIProcess/API/C/WKData.cpp: Added.
905 * UIProcess/API/C/WKData.h: Added.
907 API for saving/restoring state:
908 * UIProcess/API/C/WKPage.cpp:
909 (WKPageCopySessionState):
910 (WKPageRestoreFromSessionState):
911 * UIProcess/API/C/WKPage.h:
913 These will be filled in later:
914 * UIProcess/WebPageProxy.cpp:
915 (WebKit::WebPageProxy::sessionState):
916 (WebKit::WebPageProxy::restoreFromSessionState):
917 * UIProcess/WebPageProxy.h:
920 2010-08-04 Sam Weinig <sam@webkit.org>
922 Reviewed by Anders Carlsson.
924 Set correct default minimumFontSize.
926 * Shared/WebPreferencesStore.cpp:
927 (WebKit::WebPreferencesStore::WebPreferencesStore):
929 2010-08-03 Adam Roben <aroben@apple.com>
931 Turn on PLATFORM_STRATEGIES on Windows
933 Fixes <http://webkit.org/b/43431>.
935 Reviewed by Anders Carlsson.
937 * win/WebKit2.vcproj: Added WebPlatformStrategies. Also let VS reorder
938 this file as it saw fit.
940 2010-08-03 Balazs Kelemen <kb@inf.u-szeged.hu>
942 Reviewed by Kenneth Rohde Christiansen.
944 [Qt] Close the WebProcess
946 https://bugs.webkit.org/show_bug.cgi?id=41690
948 * Platform/CoreIPC/qt/ConnectionQt.cpp:
949 (CoreIPC::Connection::open): Registered connectionDidClose to be called when the client disconnected.
950 * Platform/qt/RunLoopQt.cpp:
951 (RunLoop::stop): Implemented by calling QCoreApplication::exit.
953 2010-08-03 Jon Honeycutt <jhoneycutt@apple.com>
955 WebKitTestRunner needs to activate the Mac font ascent hack
956 https://bugs.webkit.org/show_bug.cgi?id=43404
958 Reviewed by Darin Adler.
960 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
961 (WKBundleActivateMacFontAscentHack):
962 Get the InjectedBundle, and calls its activateMacFontAscentHack().
964 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
965 Declare WKBundleActivateMacFontAscentHack().
967 * WebProcess/InjectedBundle/InjectedBundle.h:
968 Declare activateMacFontAscentHack().
970 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
971 (WebKit::InjectedBundle::activateMacFontAscentHack):
974 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
975 (WebKit::InjectedBundle::activateMacFontAscentHack):
978 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
979 (WebKit::InjectedBundle::activateMacFontAscentHack):
980 Activate the ascent hack.
982 2010-08-03 Simon Fraser <simon.fraser@apple.com>
984 Fix typo in typo fix.
986 * Shared/DrawingAreaBase.h:
987 (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
988 (WebKit::DrawingAreaBase::DrawingAreaBase):
990 2010-08-03 Simon Fraser <simon.fraser@apple.com>
992 Fix typo in previous commit.
994 * Shared/DrawingAreaBase.h:
995 (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
996 (WebKit::DrawingAreaBase::DrawingAreaBase):
998 2010-08-03 Simon Fraser <simon.fraser@apple.com>
1000 Reviewed by Anders Carlsson.
1002 Compositing iframe layout test crashes in WebKit2
1003 https://bugs.webkit.org/show_bug.cgi?id=42860
1005 Fix assertion caused by a DrawingArea handling a message that was targetted at an older DrawingArea
1006 that it has replaced.
1008 This was done by assigning a unique ID to each DrawingAreaProxy that gets created, and passing
1009 this ID, along with the type, to the WebProcess via an encoded DrawingAreaInfo. Each message
1010 also includes this ID. Messages with an ID that doesn't match that of the current DrawingArea are ignored.
1012 Refactored some common code and data into a DrawingAreaBase class which is shared, and adding
1013 encode/decode of DrawingAreaInfo.
1015 * Shared/DrawingAreaBase.cpp: Added.
1016 (WebKit::DrawingAreaBase::encode):
1017 (WebKit::DrawingAreaBase::decode):
1018 * Shared/DrawingAreaBase.h: Added.
1019 (WebKit::DrawingAreaBase::):
1020 (WebKit::DrawingAreaBase::~DrawingAreaBase):
1021 (WebKit::DrawingAreaBase::type):
1022 (WebKit::DrawingAreaBase::id):
1023 (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
1024 (WebKit::DrawingAreaBase::DrawingAreaBase):
1026 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1027 (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
1028 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
1029 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
1030 * UIProcess/DrawingAreaProxy.cpp:
1031 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1032 (WebKit::DrawingAreaProxy::nextDrawingAreaID):
1033 * UIProcess/DrawingAreaProxy.h:
1034 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1035 (WebKit::LayerBackedDrawingAreaProxy::setSize):
1036 (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
1037 (WebKit::LayerBackedDrawingAreaProxy::update):
1038 * UIProcess/LayerBackedDrawingAreaProxy.h:
1039 * UIProcess/WebPageProxy.cpp:
1040 (WebKit::WebPageProxy::didReceiveSyncMessage):
1041 * WebKit2.xcodeproj/project.pbxproj:
1042 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1043 (WebKit::WebChromeClient::createWindow):
1044 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1045 (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1046 (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1047 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1048 * WebProcess/WebPage/DrawingArea.cpp:
1049 (WebKit::DrawingArea::create):
1050 (WebKit::DrawingArea::DrawingArea):
1051 * WebProcess/WebPage/DrawingArea.h:
1052 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1053 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1054 (WebKit::LayerBackedDrawingArea::didReceiveMessage):
1055 * WebProcess/WebPage/LayerBackedDrawingArea.h:
1056 * WebProcess/WebPage/WebPage.cpp:
1057 (WebKit::WebPage::create):
1058 (WebKit::WebPage::WebPage):
1059 (WebKit::WebPage::changeAcceleratedCompositingMode):
1060 * WebProcess/WebPage/WebPage.h:
1061 * WebProcess/WebProcess.cpp:
1062 (WebKit::WebProcess::createWebPage):
1063 (WebKit::WebProcess::didReceiveMessage):
1064 * WebProcess/WebProcess.h:
1065 * win/WebKit2.vcproj:
1067 2010-08-03 Alex Milowski <alex@milowski.com>
1069 Reviewed by Beth Dakin.
1071 Changed the ENABLE_MATHML value to enable MathML by default.
1073 * Configurations/FeatureDefines.xcconfig:
1075 2010-08-03 Simon Fraser <simon.fraser@apple.com>
1077 Reviewed by Sam Weinig.
1079 Compositing iframe layout test crashes in WebKit2
1080 https://bugs.webkit.org/show_bug.cgi?id=42860
1082 Part one of the fix: make DrawingArea ref-counted, so that the object
1083 can survide a swap in drawing areas inside the run loop observer callback.
1085 * WebProcess/WebPage/DrawingArea.cpp:
1086 (WebKit::DrawingArea::create):
1087 * WebProcess/WebPage/DrawingArea.h:
1088 * WebProcess/WebPage/WebPage.h:
1089 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1090 (WebKit::LayerBackedDrawingArea::platformClear):
1091 (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverCallback):
1092 (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
1094 2010-08-03 Anders Carlsson <andersca@apple.com>
1096 Reviewed by Adam Roben.
1098 Frequent ASSERT_NOT_REACHED in Connection::processIncomingMessage when running regression tests
1099 https://bugs.webkit.org/show_bug.cgi?id=42926
1100 <rdar://problem/8237329>
1102 Remove this assert, it's bogus. It would fire when a reply came in on the connection queue before
1103 waitForReply was called on the client thread, but that case is already covered.
1105 * Platform/CoreIPC/Connection.cpp:
1106 (CoreIPC::Connection::processIncomingMessage):
1108 2010-08-03 Adam Roben <aroben@apple.com>
1110 Compile out two Mac-only localized strings on non-Mac platforms
1112 Fixes <http://webkit.org/b/43433> copyImageUnknownFileLabel and
1113 AXARIAContentGroupText should only be compiled on Mac
1115 Reviewed by Anders Carlsson.
1117 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1118 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1119 Wrapped copyImageUnknownFileLabel and AXARIAContentGroupText in
1122 2010-08-03 Balazs Kelemen <kb@inf.u-szeged.hu>
1124 [Qt] Unreviewed typo fix in the WebKit2/DerivedSources.pro project file.
1126 Use QMAKE_MKDIR as the command for directory creation.
1128 * DerivedSources.pro:
1130 2010-08-02 Brady Eidson <beidson@apple.com>
1132 Reviewed by Anders Carlsson.
1134 Add VisitedLinkStrategy for each platform to implement
1135 https://bugs.webkit.org/show_bug.cgi?id=43393
1137 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1138 (WebKit::WebPlatformStrategies::createVisitedLinkStrategy):
1139 (WebKit::WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links, for now.
1140 (WebKit::WebPlatformStrategies::addVisitedLink): Ditto.
1141 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1143 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
1145 Reviewed by Darin Fisher.
1147 PopupMenu refactoring in preparation to WebKit2
1148 https://bugs.webkit.org/show_bug.cgi?id=42592
1150 Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
1151 SearchPopupMenu respectively. At this point they are just empty implementations.
1153 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
1154 (WebKit::WebPopupMenu::WebPopupMenu):
1155 (WebKit::WebPopupMenu::~WebPopupMenu):
1156 (WebKit::WebPopupMenu::disconnectClient):
1157 (WebKit::WebPopupMenu::show):
1158 (WebKit::WebPopupMenu::hide):
1159 (WebKit::WebPopupMenu::updateFromElement):
1160 * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
1161 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
1162 (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
1163 (WebKit::WebSearchPopupMenu::popupMenu):
1164 (WebKit::WebSearchPopupMenu::saveRecentSearches):
1165 (WebKit::WebSearchPopupMenu::loadRecentSearches):
1166 (WebKit::WebSearchPopupMenu::enabled):
1167 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
1169 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
1170 instances, concrete classes that inherit from ChromeClient needed to be changed to
1171 implement the new methods.
1173 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1174 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1175 (WebKit::WebChromeClient::createPopupMenu):
1176 (WebKit::WebChromeClient::createSearchPopupMenu):
1177 * WebProcess/WebCoreSupport/WebChromeClient.h:
1181 * WebKit2.xcodeproj/project.pbxproj:
1182 * win/WebKit2.vcproj:
1184 2010-08-02 Anders Carlsson <andersca@apple.com>
1186 Reviewed by Sam Weinig.
1188 Fix plug-in test failures and remove tests from the Skipped list
1189 https://bugs.webkit.org/show_bug.cgi?id=43389
1191 * WebProcess/Plugins/JSNPMethod.cpp:
1192 JSNPMethod::s_info should specify InternalFunction::info as its parent.
1194 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1195 (WebKit::NetscapePlugin::cancelStreamLoad):
1196 Special-case the manual stream and call PluginController::cancelManualStreamLoad.
1198 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1199 (WebKit::NetscapePluginStream::stop):
1200 It's OK to call stop on a stream that hasn't been started. Remove assertion and return early.
1202 * WebProcess/Plugins/PluginController.h:
1203 Add cancelManualStreamLoad.
1205 * WebProcess/Plugins/PluginView.cpp:
1206 (WebKit::PluginView::cancelManualStreamLoad):
1207 Tell the document loader to cancel the main resource load.
1209 * WebProcess/WebPage/WebFrame.cpp:
1210 (WebKit::WebFrame::innerText):
1211 Check for a null document element.
1213 2010-08-02 Anders Carlsson <andersca@apple.com>
1215 Reviewed by Sam Weinig.
1217 Add support for loading manual streams
1218 https://bugs.webkit.org/show_bug.cgi?id=43380
1220 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1221 (WebKit::NetscapePlugin::NetscapePlugin):
1222 Initialize m_loadManually to false.
1224 (WebKit::NetscapePlugin::removePluginStream):
1225 Special case the manual stream.
1227 (WebKit::NetscapePlugin::initialize):
1228 Don't request the stream if we're already loading.
1230 (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
1231 Create the manual stream and pass the response to it.
1233 (WebKit::NetscapePlugin::manualStreamDidReceiveData):
1234 Pass the data to the manual stream.
1236 (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
1237 Call the manual stream.
1239 (WebKit::NetscapePlugin::manualStreamDidFail):
1242 * WebProcess/Plugins/Plugin.h:
1243 Add pure virtual member functions for manual stream loading.
1245 * WebProcess/Plugins/PluginView.cpp:
1246 (WebKit::buildHTTPHeaders):
1247 Put code in a function so both PluginView::Stream::didReceiveResponse and
1248 manualLoadDidReceiveResponse can call it.
1250 (WebKit::PluginView::Stream::didReceiveResponse):
1251 Call buildHTTPHeaders.
1253 (WebKit::PluginView::Stream::didFinishLoading):
1254 Protect the plug-in when calling destroyStream.
1256 (WebKit::PluginView::manualLoadDidReceiveResponse):
1257 Call Plugin::manualStreamDidReceiveResponse.
1259 (WebKit::PluginView::manualLoadDidReceiveData):
1260 Call Plugin::manualStreamDidReceiveData.
1262 (WebKit::PluginView::manualLoadDidFinishLoading):
1263 Call Plugin::manualStreamDidFinishLoading.
1265 (WebKit::PluginView::manualLoadDidFail):
1266 Call Plugin::manualStreamDidFail.
1268 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1269 (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1270 Initialize m_hasSentResponseToPluginView to false.
1272 (WebKit::WebFrameLoaderClient::setMainDocumentError):
1273 Call PluginView::manualLoadDidFail.
1275 (WebKit::WebFrameLoaderClient::committedLoad):
1276 Call PluginView::manualLoadDidReceiveResponse.
1278 (WebKit::WebFrameLoaderClient::finishedLoading):
1279 Call PluginView::manualLoadDidFinishLoading.
1281 (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
1282 Keep track of the plug-in view.
1284 2010-08-02 Brady Eidson <beidson@apple.com>
1286 Reviewed by Anders Carlsson.
1288 Basic WK2 visited link coloring
1289 https://bugs.webkit.org/show_bug.cgi?id=43377
1291 Add simple API that allows the WK2 app to add 1 visited link at a time.
1292 For now, this just pipes each individual LinkHash down to WebCore.
1294 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
1295 (WebProcessMessage::):
1297 * UIProcess/API/C/WKContext.cpp:
1298 (WKContextAddVisitedLink):
1299 * UIProcess/API/C/WKContext.h:
1301 * UIProcess/WebContext.cpp:
1302 (WebKit::WebContext::addVisitedLink):
1303 * UIProcess/WebContext.h:
1305 * WebProcess/WebProcess.cpp:
1306 (WebKit::WebProcess::addVisitedLinkHash):
1307 (WebKit::WebProcess::didReceiveMessage):
1308 * WebProcess/WebProcess.h:
1310 2010-08-02 Darin Adler <darin@apple.com>
1312 Reviewed by Sam Weinig.
1314 WebKitTestRunner needs layoutTestController.setCanOpenWindows
1315 https://bugs.webkit.org/show_bug.cgi?id=42321
1317 WebKitTestRunner needs layoutTestController.setCloseRemainingWindowsWhenComplete
1318 https://bugs.webkit.org/show_bug.cgi?id=42779
1320 Implemented window.close, added a function that does a similar operation on behalf
1321 of injected bundle code named WKBundlePageClose, and fixed the reference counting of
1322 the result of the createNewPage client function.
1324 * UIProcess/API/cpp/WKRetainPtr.h: Added clear. Tweaked formatting. Renamed
1325 releaseRef to leakRef.
1327 * UIProcess/API/mac/WKView.mm:
1328 (-[WKView _updateVisibility]): Handle the case where drawing area is 0. This
1329 came up in WebKitTestRunner and other functions handle drawing area of 0.
1331 * UIProcess/WebPageProxy.cpp:
1332 (WebKit::WebPageProxy::didReceiveSyncMessage): Update now that createNewPage
1333 returns a PassRefPtr.
1334 (WebKit::WebPageProxy::createNewPage): Changed to return a PassRefPtr.
1335 * UIProcess/WebPageProxy.h: Ditto.
1337 * UIProcess/WebUIClient.cpp:
1338 (WebKit::WebUIClient::createNewPage): Changed to return a PassRefPtr and adopt
1339 the WKPageRef passed from the client. This follows the "create rule".
1340 * UIProcess/WebUIClient.h: Ditto.
1342 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1343 (WKBundlePageClose): Added.
1344 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added WKBundlePageClose
1345 and re-sorted the other functions in this file.
1347 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1348 (WebKit::WebChromeClient::closeWindowSoon): Implemented this.
1350 * WebProcess/WebPage/WebPage.cpp:
1351 (WebKit::WebPage::WebPage): Called setJavaScriptCanOpenWindowsAutomatically(true).
1352 I suppose we will need to revisit this later when we implement pop-up blocking.
1353 (WebKit::WebPage::tryClose): Factored out the part of this that sends a message
1354 to the other process.
1355 (WebKit::WebPage::sendClose): This is where the part that sends a message went.
1356 * WebProcess/WebPage/WebPage.h: Added sendClose, used by both closeWindowSoon
1357 and WKBundlePageClose.
1359 2010-08-02 John Sullivan <sullivan@apple.com>
1361 https://bugs.webkit.org/show_bug.cgi?id=43369
1362 WebBackForwardList::forwardListAsImmutableArrayWithLimit can return partly-uninitialized array
1364 Reviewed by Ada Chan.
1366 * UIProcess/WebBackForwardList.cpp:
1367 (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1368 Use a simpler and correct expression to determine "last".
1370 2010-08-02 Anders Carlsson <andersca@apple.com>
1372 Reviewed by Sam Weinig.
1374 Protect the plug-in from being destroyed while in plug-in code
1375 https://bugs.webkit.org/show_bug.cgi?id=43370
1377 Add a PluginProtector to NPRuntimeObjectMap and use it in JSNPObject.
1379 * WebProcess/Plugins/JSNPObject.cpp:
1380 (WebKit::JSNPObject::callMethod):
1381 (WebKit::JSNPObject::callObject):
1382 (WebKit::JSNPObject::callConstructor):
1383 (WebKit::JSNPObject::put):
1384 (WebKit::JSNPObject::getOwnPropertyNames):
1385 (WebKit::JSNPObject::propertyGetter):
1386 Add PluginProtector declarations.
1388 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1389 (WebKit::NPRuntimeObjectMap::PluginProtector::PluginProtector):
1390 Ref the plug-in view (unless it's being destroyed).
1392 (WebKit::NPRuntimeObjectMap::PluginProtector::~PluginProtector):
1393 * WebProcess/Plugins/NPRuntimeObjectMap.h:
1395 * WebProcess/Plugins/PluginView.cpp:
1396 (WebKit::PluginView::PluginView):
1397 Initialize m_isBeingDestroyed.
1399 (WebKit::PluginView::~PluginView):
1400 Set m_isBeingDestroyed to true.
1402 (WebKit::PluginView::scriptObject):
1403 Don't crash if the plug-in failed to initialize.
1405 (WebKit::PluginView::evaluate):
1408 * WebProcess/Plugins/PluginView.h:
1409 (WebKit::PluginView::isBeingDestroyed):
1411 2010-08-02 Anders Carlsson <andersca@apple.com>
1413 Reviewed by Sam Weinig.
1415 Cache JSNPObjects and fix bugs in the object map
1416 https://bugs.webkit.org/show_bug.cgi?id=43368
1418 * WebProcess/Plugins/JSNPObject.cpp:
1419 (WebKit::JSNPObject::JSNPObject):
1420 Assert that we're not trying to wrap an NPJSObject.
1422 (WebKit::JSNPObject::~JSNPObject):
1423 Tell the object map that we're gone.
1425 (WebKit::JSNPObject::invalidate):
1426 Release the NPObject and null out the pointer.
1428 * WebProcess/Plugins/NPJSObject.cpp:
1429 (WebKit::NPJSObject::create):
1430 Assert that we're not trying to wrap a JSNPObject.
1432 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1433 (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
1434 If we're passed a JSNPObject, just extract its NPObject.
1436 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1437 If we're passed an NPJSObject, just extract its JSObject. Otherwise, check if we already have
1438 a JSObject for this NPObject and return it.
1440 (WebKit::NPRuntimeObjectMap::jsNPObjectDestroyed):
1441 Remove the object from the map.
1443 (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
1444 getOrCreateJSObject now checks for wrapped objects.
1446 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1447 getOrCreateNPObject now checks for wrapped objects.
1449 (WebKit::NPRuntimeObjectMap::invalidate):
1450 Invalidate JSNPObjects as well.
1452 2010-08-02 Jeremy Orlow <jorlow@chromium.org>
1454 Speculative revert of 64425 due to Chromium instability
1455 https://bugs.webkit.org/show_bug.cgi?id=43347
1457 * WebKit2.xcodeproj/project.pbxproj:
1458 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1459 * WebProcess/WebCoreSupport/WebChromeClient.h:
1460 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Removed.
1461 * WebProcess/WebCoreSupport/WebPopupMenu.h: Removed.
1462 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Removed.
1463 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Removed.
1464 * win/WebKit2.vcproj:
1466 2010-08-02 Balazs Kelemen <kb@inf.u-szeged.hu>
1468 Reviewed by Simon Hausmann.
1470 [Qt] Generate forwarding headers for WebKit2
1472 https://bugs.webkit.org/show_bug.cgi?id=43336
1474 * DerivedSources.pro: Added.
1476 2010-08-01 Anders Carlsson <andersca@apple.com>
1478 Reviewed by Sam Weinig.
1480 Implement NPN_SetException
1481 https://bugs.webkit.org/show_bug.cgi?id=43320
1483 * WebProcess/Plugins/JSNPObject.cpp:
1484 (WebKit::JSNPObject::callConstructor):
1485 (WebKit::JSNPObject::put):
1486 (WebKit::JSNPObject::getOwnPropertyNames):
1487 (WebKit::JSNPObject::propertyGetter):
1488 Call NPRuntimeObjectMap::moveGlobalExceptionToExecState.
1490 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1491 (WebKit::globalExceptionString):
1494 (WebKit::NPRuntimeObjectMap::setGlobalException):
1495 Set the global exception string.
1497 (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
1498 Create an error from the exception string.
1500 * WebProcess/Plugins/NPRuntimeObjectMap.h:
1501 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1502 (WebKit::NPN_SetException):
1503 Call NetscapePlugin::setException.
1505 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1506 (WebKit::NetscapePlugin::setException):
1507 Call NPRuntimeObjectMap::setGlobalException.
1509 2010-08-01 Sam Weinig <sam@webkit.org>
1511 Roll r64446 out. It broke the test runner.
1513 * UIProcess/WebContext.cpp:
1514 (WebKit::WebContext::postMessageToInjectedBundle):
1516 2010-08-01 Sam Weinig <sam@webkit.org>
1518 Reviewed by Anders Carlsson.
1520 Don't send user messages to the injected bundle if the process is not active
1521 https://bugs.webkit.org/show_bug.cgi?id=43317
1523 * UIProcess/WebContext.cpp:
1524 (WebKit::WebContext::postMessageToInjectedBundle):
1526 2010-08-01 Sam Weinig <sam@webkit.org>
1528 Reviewed by Anders Carlsson.
1530 Add ability to reset frame names for WebKitTestRunner
1531 https://bugs.webkit.org/show_bug.cgi?id=43316
1533 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1534 (WKBundlePageClearMainFrameName):
1535 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1536 * WebProcess/WebPage/WebPage.cpp:
1537 (WebKit::WebPage::clearMainFrameName):
1538 * WebProcess/WebPage/WebPage.h:
1540 2010-08-01 Anders Carlsson <andersca@apple.com>
1542 Reviewed by Sam Weinig.
1544 Minor NPRuntime fixes
1545 https://bugs.webkit.org/show_bug.cgi?id=43318
1547 * WebProcess/Plugins/JSNPObject.h:
1548 (WebKit::JSNPObject::npObject):
1549 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1550 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1551 If we see an JSNPObject, extract the NPObject.
1553 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1554 (WebKit::NPN_GetProperty):
1555 Don't check for whether the property exists before getting it.
1557 2010-08-01 Anders Carlsson <andersca@apple.com>
1559 Reviewed by Sam Weinig.
1561 Implement NPN_RemoveProperty
1562 https://bugs.webkit.org/show_bug.cgi?id=43315
1564 * WebProcess/Plugins/NPJSObject.cpp:
1565 (WebKit::NPJSObject::removeProperty):
1566 Try to remove the property.
1568 (WebKit::NPJSObject::npClass):
1569 Add NP_RemoveProperty.
1571 (WebKit::NPJSObject::NP_RemoveProperty):
1572 Call NPJSObject::removeProperty.
1574 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1575 (WebKit::NPN_RemoveProperty):
1576 Call the NPClass::removeProperty function.
1578 2010-07-31 Sam Weinig <sam@webkit.org>
1580 Reviewed by Darin Adler.
1582 Crash due to calling StringImpl::createCFString() from non-main thread in plug-in code
1583 https://bugs.webkit.org/show_bug.cgi?id=43306
1584 <rdar://problem/8259687>
1586 * UIProcess/Plugins/PluginInfoStore.cpp:
1587 (WebKit::PluginInfoStore::getMIMETypeForExtension):
1588 (WebKit::PluginInfoStore::findPlugin):
1589 * UIProcess/Plugins/PluginInfoStore.h:
1590 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1591 (WebKit::safeCreateCFString):
1592 (WebKit::PluginInfoStore::getMIMETypeForExtension):
1593 Bypass MIMETypeRegistry in the UIProcess until we can safely convert Strings
1596 2010-07-31 Sam Weinig <sam@webkit.org>
1598 Reviewed by Dan Bernstein.
1600 Patch for https://bugs.webkit.org/show_bug.cgi?id=43305
1601 Add back WKBundleFrameCopyInnerText to fix ~50 test failures
1602 due to SVGElements not having the innerText function.
1604 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1605 (WKBundleFrameCopyInnerText):
1606 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1607 * WebProcess/WebPage/WebFrame.cpp:
1608 (WebKit::WebFrame::innerText):
1609 * WebProcess/WebPage/WebFrame.h:
1611 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
1613 Reviewed by Darin Fisher.
1615 PopupMenu refactoring in preparation to WebKit2
1616 https://bugs.webkit.org/show_bug.cgi?id=42592
1618 Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
1619 SearchPopupMenu respectively. At this point they are just empty implementations.
1621 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
1622 (WebKit::WebPopupMenu::WebPopupMenu):
1623 (WebKit::WebPopupMenu::~WebPopupMenu):
1624 (WebKit::WebPopupMenu::disconnectClient):
1625 (WebKit::WebPopupMenu::show):
1626 (WebKit::WebPopupMenu::hide):
1627 (WebKit::WebPopupMenu::updateFromElement):
1628 * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
1629 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
1630 (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
1631 (WebKit::WebSearchPopupMenu::popupMenu):
1632 (WebKit::WebSearchPopupMenu::saveRecentSearches):
1633 (WebKit::WebSearchPopupMenu::loadRecentSearches):
1634 (WebKit::WebSearchPopupMenu::enabled):
1635 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
1637 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
1638 instances, concrete classes that inherit from ChromeClient needed to be changed to
1639 implement the new methods.
1641 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1642 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1643 (WebKit::WebChromeClient::createPopupMenu):
1644 (WebKit::WebChromeClient::createSearchPopupMenu):
1645 * WebProcess/WebCoreSupport/WebChromeClient.h:
1649 * WebKit2.xcodeproj/project.pbxproj:
1650 * win/WebKit2.vcproj:
1652 2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com>
1654 Unreviewed, rolling out r64422.
1655 http://trac.webkit.org/changeset/64422
1656 https://bugs.webkit.org/show_bug.cgi?id=43304
1658 Build fixes are needed for Snow Leopard and Windows.
1659 (Requested by lca on #webkit).
1661 * WebKit2.xcodeproj/project.pbxproj:
1662 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1663 * WebProcess/WebCoreSupport/WebChromeClient.h:
1664 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Removed.
1665 * WebProcess/WebCoreSupport/WebPopupMenu.h: Removed.
1666 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Removed.
1667 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Removed.
1668 * win/WebKit2.vcproj:
1670 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org>
1672 Reviewed by Darin Fisher.
1674 PopupMenu refactoring in preparation to WebKit2
1675 https://bugs.webkit.org/show_bug.cgi?id=42592
1677 Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
1678 SearchPopupMenu respectively. At this point they are just empty implementations.
1680 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
1681 (WebKit::WebPopupMenu::WebPopupMenu):
1682 (WebKit::WebPopupMenu::~WebPopupMenu):
1683 (WebKit::WebPopupMenu::disconnectClient):
1684 (WebKit::WebPopupMenu::show):
1685 (WebKit::WebPopupMenu::hide):
1686 (WebKit::WebPopupMenu::updateFromElement):
1687 * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
1688 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
1689 (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
1690 (WebKit::WebSearchPopupMenu::popupMenu):
1691 (WebKit::WebSearchPopupMenu::saveRecentSearches):
1692 (WebKit::WebSearchPopupMenu::loadRecentSearches):
1693 (WebKit::WebSearchPopupMenu::enabled):
1694 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
1696 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
1697 instances, concrete classes that inherit from ChromeClient needed to be changed to
1698 implement the new methods.
1700 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1701 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1702 (WebKit::WebChromeClient::createPopupMenu):
1703 (WebKit::WebChromeClient::createSearchPopupMenu):
1704 * WebProcess/WebCoreSupport/WebChromeClient.h:
1708 * WebKit2.xcodeproj/project.pbxproj:
1709 * win/WebKit2.vcproj:
1711 2010-07-30 Darin Fisher <darin@chromium.org>
1713 Reviewed by Darin Adler.
1715 Eliminate BackForwardList::pushStateItem
1716 https://bugs.webkit.org/show_bug.cgi?id=43282
1718 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1719 * WebProcess/WebPage/WebBackForwardListProxy.h:
1721 2010-07-30 Joseph Pecoraro <joepeck@webkit.org>
1723 Reviewed by David Kilzer.
1725 Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
1726 https://bugs.webkit.org/show_bug.cgi?id=40627
1728 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1729 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1730 * WebProcess/WebCoreSupport/WebChromeClient.h:
1732 2010-07-30 Sam Weinig <sam@webkit.org>
1734 Reviewed by Maciej Stachowiak.
1736 Patch for https://bugs.webkit.org/show_bug.cgi?id=43290
1737 Add structured message passing from the injected bundle to UIProcess
1739 * Platform/CoreIPC/MessageID.h:
1740 * Shared/CoreIPCSupport/WebContextMessageKinds.h: Added.
1741 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
1742 (WebProcessProxyMessage::):
1743 * UIProcess/API/C/WKContext.h:
1744 * UIProcess/WebContext.cpp:
1746 (WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
1747 (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1748 (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
1749 (WebKit::WebContext::didReceiveMessage):
1750 * UIProcess/WebContext.h:
1751 * UIProcess/WebContextInjectedBundleClient.cpp:
1752 (WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
1753 * UIProcess/WebContextInjectedBundleClient.h:
1754 * UIProcess/WebProcessProxy.cpp:
1755 (WebKit::WebProcessProxy::didReceiveMessage):
1756 (WebKit::WebProcessProxy::didReceiveSyncMessage):
1757 * UIProcess/WebProcessProxy.h:
1758 * WebKit2.xcodeproj/project.pbxproj:
1759 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1760 (WKBundlePostMessage):
1761 * WebProcess/InjectedBundle/API/c/WKBundle.h:
1762 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1764 (WebKit::InjectedBundle::InjectedBundle):
1765 (WebKit::InjectedBundle::~InjectedBundle):
1766 (WebKit::InjectedBundle::initializeClient):
1767 (WebKit::InjectedBundle::postMessage):
1768 (WebKit::InjectedBundle::setShouldTrackVisitedLinks):
1769 (WebKit::InjectedBundle::removeAllVisitedLinks):
1770 (WebKit::InjectedBundle::didCreatePage):
1771 (WebKit::InjectedBundle::willDestroyPage):
1772 (WebKit::InjectedBundle::didReceiveMessage):
1773 * WebProcess/InjectedBundle/InjectedBundle.h:
1775 2010-07-30 Andy Estes <aestes@apple.com>
1777 Reviewed by David Kilzer.
1779 Add support to Xcode for compiling WebKit against iOS SDKs.
1780 https://bugs.webkit.org/show_bug.cgi?id=42796
1782 * Configurations/FeatureDefines.xcconfig:
1784 2010-07-30 Brady Eidson <beidson@apple.com>
1786 Reviewed by Sam Weinig.
1788 Cast the return value for the templated ImmutableArray::at().
1790 * Shared/ImmutableArray.h:
1791 (WebKit::ImmutableArray::at):
1793 2010-07-30 Sam Weinig <sam@webkit.org>
1795 Reviewed by Anders Carlsson.
1797 Patch for https://bugs.webkit.org/show_bug.cgi?id=43283
1798 Add APIObject template introspection support.
1800 Add a way to get the type the APIObject::Type from the APIObject subclass typenames
1801 for template fun. Use this to make a type checking version of ImmutableArray::at.
1803 * Shared/ImmutableArray.h:
1804 (WebKit::ImmutableArray::at):
1805 (WebKit::ImmutableArray::type):
1806 * Shared/WebString.h:
1807 (WebKit::WebString::type):
1809 (WebKit::WebURL::type):
1810 * UIProcess/API/C/WKArray.cpp:
1812 * UIProcess/API/C/WKBackForwardList.cpp:
1813 (WKBackForwardListGetTypeID):
1814 * UIProcess/API/C/WKBackForwardListItem.cpp:
1815 (WKBackForwardListItemGetTypeID):
1816 * UIProcess/API/C/WKContext.cpp:
1817 (WKContextGetTypeID):
1818 * UIProcess/API/C/WKFrame.cpp:
1820 * UIProcess/API/C/WKFramePolicyListener.cpp:
1821 (WKFramePolicyListenerGetTypeID):
1822 * UIProcess/API/C/WKNavigationData.cpp:
1823 (WKNavigationDataGetTypeID):
1824 * UIProcess/API/C/WKPage.cpp:
1826 * UIProcess/API/C/WKPageNamespace.cpp:
1827 (WKPageNamespaceGetTypeID):
1828 * UIProcess/API/C/WKPreferences.cpp:
1829 (WKPreferencesGetTypeID):
1830 * UIProcess/API/C/WKString.cpp:
1831 (WKStringGetTypeID):
1832 * UIProcess/API/C/WKURL.cpp:
1834 * UIProcess/WebBackForwardList.h:
1835 (WebKit::WebBackForwardList::type):
1836 * UIProcess/WebBackForwardListItem.h:
1837 (WebKit::WebBackForwardListItem::type):
1838 * UIProcess/WebContext.h:
1839 (WebKit::WebContext::type):
1840 * UIProcess/WebFramePolicyListenerProxy.h:
1841 (WebKit::WebFramePolicyListenerProxy::type):
1842 * UIProcess/WebFrameProxy.h:
1843 (WebKit::WebFrameProxy::type):
1844 * UIProcess/WebNavigationData.h:
1845 (WebKit::WebNavigationData::type):
1846 * UIProcess/WebPageNamespace.h:
1847 (WebKit::WebPageNamespace::type):
1848 * UIProcess/WebPageProxy.h:
1849 (WebKit::WebPageProxy::type):
1850 * UIProcess/WebPreferences.h:
1851 (WebKit::WebPreferences::type):
1852 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1853 (WKBundleGetTypeID):
1854 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1855 (WKBundleFrameGetTypeID):
1856 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1857 (WKBundlePageGetTypeID):
1858 * WebProcess/InjectedBundle/InjectedBundle.h:
1859 (WebKit::InjectedBundle::type):
1860 * WebProcess/WebPage/WebFrame.h:
1861 (WebKit::WebFrame::type):
1862 * WebProcess/WebPage/WebPage.h:
1863 (WebKit::WebPage::type):
1865 2010-07-30 Sam Weinig <sam@webkit.org>
1867 Reviewed by Anders Carlsson.
1869 Patch for https://bugs.webkit.org/show_bug.cgi?id=43275
1870 Make WKArrayRef more usable.
1872 - Add Create functions.
1873 - Make WKArrayGetItemAtIndex return a WKTypeRef.
1875 * UIProcess/API/C/WKArray.cpp:
1877 (WKArrayCreateAdoptingValues):
1878 (WKArrayGetItemAtIndex):
1879 * UIProcess/API/C/WKArray.h:
1881 2010-07-30 Ada Chan <adachan@apple.com>
1883 Reviewed by John Sullivan.
1885 Fix issue with populating the back list when limit is a huge number.
1886 https://bugs.webkit.org/show_bug.cgi?id=43270
1888 * UIProcess/WebBackForwardList.cpp:
1889 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1891 2010-07-29 Sam Weinig <sam@webkit.org>
1893 Reviewed by Anders Carlsson.
1895 Patch for https://bugs.webkit.org/show_bug.cgi?id=43274
1896 Add first pass of structured message passing.
1898 - Only supports passing messages from the UIProcess -> InjectedBundle
1899 - Only supports passing Strings, Arrays, and WebPage references (NOTE: There
1900 currently isn't a way to make an array).
1901 - Changed ImmutableArray to operate on APIObjects instead of void*'s and
1902 removed the retain/release abstraction.
1904 * Platform/CoreIPC/MessageID.h:
1906 * Shared/CoreIPCSupport/InjectedBundleMessageKinds.h: Added.
1907 (InjectedBundleMessage::):
1909 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
1910 (WebProcessMessage::):
1911 * Shared/ImmutableArray.cpp:
1912 (WebKit::ImmutableArray::ImmutableArray):
1913 (WebKit::ImmutableArray::~ImmutableArray):
1914 * Shared/ImmutableArray.h:
1915 (WebKit::ImmutableArray::create):
1916 (WebKit::ImmutableArray::adopt):
1917 (WebKit::ImmutableArray::at):
1918 * UIProcess/API/C/WKBase.h:
1919 * UIProcess/API/C/WKContext.cpp:
1920 (WKContextPostMessageToInjectedBundle):
1921 * UIProcess/API/C/WKContext.h:
1922 * UIProcess/API/C/WKType.cpp:
1924 * UIProcess/API/C/WebKit2.h:
1925 * UIProcess/WebBackForwardList.cpp:
1926 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1927 (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1928 * UIProcess/WebContext.cpp:
1929 (WebKit::WebContext::postMessageToInjectedBundle):
1930 (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
1931 * UIProcess/WebContext.h:
1932 * WebKit2.xcodeproj/project.pbxproj:
1933 * WebProcess/InjectedBundle/API/c/WKBundle.h:
1934 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1935 (WebKit::InjectedBundle::didReceiveMessage):
1936 * WebProcess/InjectedBundle/InjectedBundle.h:
1937 * WebProcess/WebPage/WebFrame.cpp:
1938 (WebKit::WebFrame::childFrames):
1939 * WebProcess/WebProcess.cpp:
1940 (WebKit::WebProcess::didReceiveMessage):
1941 * WebProcess/WebProcess.h:
1942 * win/WebKit2.vcproj:
1944 2010-07-30 Anders Carlsson <andersca@apple.com>
1946 Reviewed by Sam Weinig.
1948 Implement NPN_Evaluate
1949 https://bugs.webkit.org/show_bug.cgi?id=43268
1951 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1952 (WebKit::NPRuntimeObjectMap::evaluate):
1953 Evaluate the passed in string.
1955 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1956 (WebKit::NPN_Evaluate):
1957 Call NetscapePlugin::evaluate.
1959 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1960 (WebKit::NetscapePlugin::evaluate):
1961 Call PluginController::evaluate.
1963 * WebProcess/Plugins/PluginController.h:
1964 Add evaluate pure virtual member function.
1966 * WebProcess/Plugins/PluginView.cpp:
1967 (WebKit::PluginView::evaluate):
1968 Update the popup window state and call NPRuntimeObjectMap::evaluate.
1970 2010-07-30 Anders Carlsson <andersca@apple.com>
1972 Reviewed by Sam Weinig.
1974 Implement NPN_InvokeDefault
1975 https://bugs.webkit.org/show_bug.cgi?id=43266
1977 * WebProcess/Plugins/JSNPObject.cpp:
1978 (WebKit::JSNPObject::JSNPObject):
1979 Remove ExecState parameter.
1981 (WebKit::JSNPObject::callObject):
1982 Call the NPClass::invokeDefault function.
1984 (WebKit::callNPJSObject):
1985 Call JSNPObject::callObject.
1987 (WebKit::JSNPObject::getCallData):
1988 Check if the NPClass has an invokeDefault function.
1990 * WebProcess/Plugins/JSNPObject.h:
1991 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1992 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1993 Remove ExecState parameter.
1995 (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
1996 Remove ExecState parameter.
1998 * WebProcess/Plugins/PluginView.cpp:
1999 (WebKit::PluginView::scriptObject):
2000 Remove ExecState parameter.
2002 2010-07-30 Adam Roben <aroben@apple.com>
2004 Roll our r64361 and r64363
2006 We can't make these changes until QuartzCore.lib is included in
2007 WebKitSupportLibrary.
2009 2010-07-30 Adam Roben <aroben@apple.com>
2013 * win/WebKit2Apple.vsprops: Always link against QuartzCore, since
2014 WebKitSystemInterface requires it.
2016 2010-07-30 Balazs Kelemen <kb@inf.u-szeged.hu>
2018 Unreviewed build fix.
2020 [Qt] Build fix for recent API changes in WebKit2.
2022 * UIProcess/API/cpp/qt/WKStringQt.cpp:
2023 (WKStringCopyQString):
2024 * UIProcess/API/cpp/qt/WKURLQt.cpp:
2026 * UIProcess/API/qt/qwkpage.cpp:
2029 2010-07-29 Brady Eidson <beidson@apple.com>
2031 Reviewed by Sam Weinig.
2033 Setting empty document schemes on the WKContext shouldn't start the WebProcess
2034 <rdar://problem/8253734> and https://bugs.webkit.org/show_bug.cgi?id=43222
2036 * UIProcess/WebContext.cpp:
2037 (WebKit::WebContext::ensureWebProcess):
2038 (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
2039 * UIProcess/WebContext.h:
2041 2010-07-29 Brady Eidson <beidson@apple.com>
2043 Reviewed by Sam Weinig.
2045 Make all public facing client setters take const pointers
2046 https://bugs.webkit.org/show_bug.cgi?id=43219
2048 * UIProcess/API/C/WKContext.cpp:
2049 (WKContextSetInjectedBundleClient):
2050 (WKContextSetHistoryClient):
2051 * UIProcess/API/C/WKContext.h:
2053 * UIProcess/API/C/WKPage.cpp:
2054 (WKPageSetPageLoaderClient):
2055 (WKPageSetPagePolicyClient):
2056 (WKPageSetPageUIClient):
2057 * UIProcess/API/C/WKPage.h:
2059 * UIProcess/WebContext.cpp:
2060 (WebKit::WebContext::initializeInjectedBundleClient):
2061 (WebKit::WebContext::initializeHistoryClient):
2062 * UIProcess/WebContext.h:
2064 * UIProcess/WebContextInjectedBundleClient.cpp:
2065 (WebKit::WebContextInjectedBundleClient::initialize):
2066 * UIProcess/WebContextInjectedBundleClient.h:
2068 * UIProcess/WebHistoryClient.cpp:
2069 (WebKit::WebHistoryClient::initialize):
2070 * UIProcess/WebHistoryClient.h:
2072 * UIProcess/WebLoaderClient.cpp:
2073 (WebKit::WebLoaderClient::initialize):
2074 * UIProcess/WebLoaderClient.h:
2076 * UIProcess/WebPageProxy.cpp:
2077 (WebKit::WebPageProxy::initializeLoaderClient):
2078 (WebKit::WebPageProxy::initializePolicyClient):
2079 (WebKit::WebPageProxy::initializeUIClient):
2080 * UIProcess/WebPageProxy.h:
2082 * UIProcess/WebPolicyClient.cpp:
2083 (WebKit::WebPolicyClient::initialize):
2084 * UIProcess/WebPolicyClient.h:
2086 * UIProcess/WebUIClient.cpp:
2087 (WebKit::WebUIClient::initialize):
2088 * UIProcess/WebUIClient.h:
2090 2010-07-29 Anders Carlsson <andersca@apple.com>
2092 Reviewed by Sam Weinig.
2094 Implement NPN_SetProperty
2095 https://bugs.webkit.org/show_bug.cgi?id=43217
2097 * WebProcess/Plugins/NPJSObject.cpp:
2098 (WebKit::NPJSObject::setProperty):
2099 Convert the NPVariant to a JSValue and set it on the underlying JSObject.
2101 (WebKit::NPJSObject::NP_SetProperty):
2102 Call NPJSObject::setProperty.
2104 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2105 (WebKit::NPN_GetProperty):
2106 Remove unused parameter name.
2108 (WebKit::NPN_SetProperty):
2109 Call the NPClass::setProperty function.
2111 2010-07-29 Anders Carlsson <andersca@apple.com>
2113 Reviewed by Sam Weinig.
2115 Implement NPN_Enumerate
2116 https://bugs.webkit.org/show_bug.cgi?id=43215
2118 * WebProcess/Plugins/JSNPObject.cpp:
2119 (WebKit::npIdentifierFromIdentifier):
2120 Get the UTF-8 string representation instead of the lossy ASCII representation.
2122 (WebKit::JSNPObject::getOwnPropertyNames):
2123 Implement by calling the NPClass::enumerate function.
2125 * WebProcess/Plugins/JSNPObject.h:
2126 * WebProcess/Plugins/NPJSObject.cpp:
2127 (WebKit::NPJSObject::enumerate):
2128 Implement by calling JSObject::getPropertyNames.
2130 (WebKit::NPJSObject::npClass):
2131 (WebKit::NPJSObject::NP_Enumerate):
2132 Call NPJSObject::enumerate.
2134 * WebProcess/Plugins/NPJSObject.h:
2135 * WebProcess/Plugins/NPRuntimeUtilities.cpp:
2136 (WebKit::createNPObject):
2139 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2140 (WebKit::NPN_Enumerate):
2141 Call the NPClass::enumerate function.
2143 2010-07-29 John Sullivan <sullivan@apple.com>
2145 <https://bugs.webkit.org/show_bug.cgi?id=43203>
2146 WebBackForwardList::back/ForwardListWithLimit() crashes if passed a limit larger than max int
2148 Reviewed by Sam Weinig.
2150 * UIProcess/WebBackForwardList.cpp:
2151 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
2152 Fixed casting so that a large unsigned won't become a negative int.
2153 (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
2156 2010-07-29 Anders Carlsson <andersca@apple.com>
2158 Reviewed by Sam Weinig.
2160 Implement NPN_Status
2161 https://bugs.webkit.org/show_bug.cgi?id=43205
2163 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2164 (WebKit::NPN_Status):
2165 Convert the message char* to a String and call NetscapePlugin::setStatusbarText.
2167 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2168 (WebKit::NetscapePlugin::setStatusbarText):
2169 Call PluginController::setStatusbarText.
2171 * WebProcess/Plugins/PluginController.h:
2172 Add setStatusbarText.
2174 * WebProcess/Plugins/PluginView.cpp:
2175 (WebKit::PluginView::setStatusbarText):
2176 Call the Chrome member function.
2178 2010-07-29 Adam Roben <aroben@apple.com>
2180 Always say "plugins directory" when referring to a directory
2181 containing one or more plugins
2183 Fixes <http://webkit.org/b/43197> WebKit2 often says "plugin
2184 directory" when it means "plugins directory"
2186 Reviewed by John Sullivan.
2188 * UIProcess/API/C/WKContext.cpp:
2189 (_WKContextSetAdditionalPluginsDirectory):
2190 * UIProcess/API/C/WKContextPrivate.h:
2191 Renamed from _WKContextSetAdditionalPluginDirectory.
2193 * UIProcess/Plugins/PluginInfoStore.cpp:
2194 (WebKit::PluginInfoStore::setAdditionalPluginsDirectories): Renamed
2195 from setAdditionalPluginDirectories.
2196 (WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.
2198 * UIProcess/Plugins/PluginInfoStore.h: Renamed
2199 m_additionalPluginDirectories to m_additionalPluginsDirectories.
2201 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2202 (WebKit::PluginInfoStore::pluginsDirectories):
2203 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2204 (WebKit::PluginInfoStore::pluginsDirectories):
2205 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2206 (WebKit::PluginInfoStore::pluginsDirectories):
2207 Renamed from pluginDirectories.
2209 * UIProcess/WebContext.cpp:
2210 (WebKit::WebContext::setAdditionalPluginsDirectory):
2211 * UIProcess/WebContext.h:
2212 Renamed from setAdditionalPluginDirectory.
2214 2010-07-29 Adam Roben <aroben@apple.com>
2216 Always say "directory" when referring to a plugin directory
2218 Fixes <http://webkit.org/b/43195> WebKit2 often says "plugin path"
2219 when it means "plugin directory"
2221 Reviewed by John Sullivan.
2223 * UIProcess/API/C/WKContext.cpp:
2224 (_WKContextSetAdditionalPluginDirectory):
2225 * UIProcess/API/C/WKContextPrivate.h:
2226 Renamed from _WKContextSetAdditionalPluginPath.
2228 * UIProcess/Plugins/PluginInfoStore.cpp:
2229 (WebKit::PluginInfoStore::setAdditionalPluginDirectories): Renamed
2230 from setAdditionalPluginPaths.
2231 (WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.
2233 * UIProcess/Plugins/PluginInfoStore.h: Renamed m_additionalPluginPaths
2234 to m_additionalPluginDirectories.
2236 * UIProcess/WebContext.cpp:
2237 (WebKit::WebContext::setAdditionalPluginDirectory):
2238 * UIProcess/WebContext.h:
2239 Renamed from setAdditionalPluginPath, and updated for PluginInfoStore
2242 2010-07-29 Adam Roben <aroben@apple.com>
2244 Remove PluginInfoStore::mimeTypeFromExtension
2246 WebCore::MIMETypeRegistry already provides a cross-platform interface
2249 Fixes <http://webkit.org/b/43188>
2250 PluginInfoStore::mimeTypeFromExtension is unnecessary
2252 Reviewed by Nikolas Zimmermann.
2254 * UIProcess/Plugins/PluginInfoStore.cpp:
2255 (WebKit::PluginInfoStore::findPlugin): Changed to use
2258 * UIProcess/Plugins/PluginInfoStore.h:
2259 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2260 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2261 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2262 Removed mimeTypeFromExtension.
2264 2010-07-28 Sam Weinig <sam@webkit.org>
2266 Another Windows build fix.
2268 * UIProcess/API/C/WKBase.h:
2269 * win/WebKit2Generated.make:
2271 2010-07-28 Sam Weinig <sam@webkit.org>
2275 * UIProcess/API/C/WKAPICast.h:
2276 (WebKit::ProxyingRefPtr::operator APIType):
2280 * UIProcess/win/WebView.h:
2281 (WebKit::WebView::type):
2283 2010-07-28 Sam Weinig <sam@webkit.org>
2285 Reviewed by Darin Adler.
2287 Patch for https://bugs.webkit.org/show_bug.cgi?id=43163
2288 Add a CF-style base type (WKTypeRef) as a base for polymorphic functions.
2290 - Add first polymorphic function, WKGetTypeID.
2291 - Add functions to each WK type to get their respective TypeIDs.
2292 - Adds WebURL to complement WebString.
2294 * Shared/APIObject.h:
2295 (WebKit::APIObject::):
2296 (WebKit::APIObject::~APIObject):
2297 * Shared/ImmutableArray.h:
2298 (WebKit::ImmutableArray::type):
2299 * Shared/WebString.h:
2300 (WebKit::WebString::type):
2301 * Shared/WebURL.h: Added.
2302 (WebKit::WebURL::create):
2303 (WebKit::WebURL::type):
2304 (WebKit::WebURL::isNull):
2305 (WebKit::WebURL::isEmpty):
2306 (WebKit::WebURL::string):
2307 (WebKit::WebURL::WebURL):
2308 * UIProcess/API/C/WKAPICast.h:
2309 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
2310 (WebKit::ProxyingRefPtr::operator APIType):
2314 * UIProcess/API/C/WKArray.cpp:
2316 * UIProcess/API/C/WKArray.h:
2317 * UIProcess/API/C/WKBackForwardList.cpp:
2318 (WKBackForwardListGetTypeID):
2319 * UIProcess/API/C/WKBackForwardList.h:
2320 * UIProcess/API/C/WKBackForwardListItem.cpp:
2321 (WKBackForwardListItemGetTypeID):
2322 * UIProcess/API/C/WKBackForwardListItem.h:
2323 * UIProcess/API/C/WKBase.h:
2324 * UIProcess/API/C/WKContext.cpp:
2325 (WKContextGetTypeID):
2326 * UIProcess/API/C/WKContext.h:
2327 * UIProcess/API/C/WKFrame.cpp:
2329 * UIProcess/API/C/WKFrame.h:
2330 * UIProcess/API/C/WKFramePolicyListener.cpp:
2331 (WKFramePolicyListenerGetTypeID):
2332 * UIProcess/API/C/WKFramePolicyListener.h:
2333 * UIProcess/API/C/WKNavigationData.cpp:
2334 (WKNavigationDataGetTypeID):
2335 * UIProcess/API/C/WKNavigationData.h:
2336 * UIProcess/API/C/WKPage.cpp:
2338 * UIProcess/API/C/WKPage.h:
2339 * UIProcess/API/C/WKPageNamespace.cpp:
2340 (WKPageNamespaceGetTypeID):
2341 * UIProcess/API/C/WKPageNamespace.h:
2342 * UIProcess/API/C/WKPreferences.cpp:
2343 (WKPreferencesGetTypeID):
2344 * UIProcess/API/C/WKPreferences.h:
2345 * UIProcess/API/C/WKString.cpp:
2346 (WKStringGetTypeID):
2347 * UIProcess/API/C/WKString.h:
2348 * UIProcess/API/C/WKType.cpp: Added.
2350 * UIProcess/API/C/WKType.h: Added.
2351 * UIProcess/API/C/WKURL.cpp:
2353 * UIProcess/API/C/WKURL.h:
2354 * UIProcess/API/win/WKView.cpp:
2356 * UIProcess/API/win/WKView.h:
2357 * UIProcess/WebBackForwardList.h:
2358 (WebKit::WebBackForwardList::type):
2359 * UIProcess/WebBackForwardListItem.h:
2360 (WebKit::WebBackForwardListItem::type):
2361 * UIProcess/WebContext.h:
2362 (WebKit::WebContext::type):
2363 * UIProcess/WebFramePolicyListenerProxy.h:
2364 (WebKit::WebFramePolicyListenerProxy::type):
2365 * UIProcess/WebFrameProxy.h:
2366 (WebKit::WebFrameProxy::type):
2367 * UIProcess/WebNavigationData.h:
2368 (WebKit::WebNavigationData::type):
2369 * UIProcess/WebPageNamespace.h:
2370 (WebKit::WebPageNamespace::type):
2371 * UIProcess/WebPageProxy.h:
2372 (WebKit::WebPageProxy::type):
2373 * UIProcess/WebPreferences.h:
2374 (WebKit::WebPreferences::type):
2375 * WebKit2.xcodeproj/project.pbxproj:
2376 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2377 (WKBundleGetTypeID):
2378 * WebProcess/InjectedBundle/API/c/WKBundle.h:
2379 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2380 (WKBundleFrameGetTypeID):
2381 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2382 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2383 (WKBundlePageGetTypeID):
2384 (WKBundlePageSetEditorClient):
2385 (WKBundlePageSetLoaderClient):
2386 (WKBundlePageSetUIClient):
2387 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2388 * WebProcess/WebPage/WebFrame.h:
2389 (WebKit::WebFrame::type):
2390 * WebProcess/WebPage/WebPage.h:
2391 (WebKit::WebPage::type):
2392 * win/WebKit2.vcproj:
2394 2010-07-28 Darin Adler <darin@apple.com>
2396 Reviewed by Sam Weinig.
2398 WebKitTestRunner needs to support layoutTestController.execCommand
2399 <https://bugs.webkit.org/show_bug.cgi?id=42538>
2401 WebKitTestRunner needs layoutTestController.isCommandEnabled
2402 <https://bugs.webkit.org/show_bug.cgi?id=42671>
2404 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2405 (WKBundlePageExecuteEditingCommand): Added.
2406 (WKBundlePageIsEditingCommandEnabled): Added.
2407 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
2409 * WebProcess/WebPage/WebPage.cpp:
2410 (WebKit::WebPage::executeEditingCommand): Added.
2411 (WebKit::WebPage::isEditingCommandEnabled): Added.
2412 * WebProcess/WebPage/WebPage.h: Ditto.
2414 2010-07-28 Anders Carlsson <andersca@apple.com>
2418 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2419 (WebKit::NPN_GetValue):
2421 2010-07-28 Brady Eidson <beidson@apple.com>
2423 Reviewed by Darin Adler.
2425 First pass at visited link support for WK2
2426 https://bugs.webkit.org/show_bug.cgi?id=43157
2428 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2429 (WebPageProxyMessage::):
2430 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
2431 (WebProcessMessage::):
2432 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2433 (WebProcessProxyMessage::):
2435 Move HistoryClient support from the page...:
2436 * UIProcess/API/C/WKPage.cpp:
2437 * UIProcess/API/C/WKPage.h:
2440 * UIProcess/API/C/WKContext.cpp:
2441 (WKContextSetHistoryClient):
2442 * UIProcess/API/C/WKContext.h:
2444 * UIProcess/WebContext.cpp:
2445 (WebKit::WebContext::initializeHistoryClient):
2446 (WebKit::WebContext::ensureWebProcess): When a new WebProcess is created, set its "should track visited links" mode.
2447 (WebKit::WebContext::didNavigateWithNavigationData):
2448 (WebKit::WebContext::didPerformClientRedirect):
2449 (WebKit::WebContext::didPerformServerRedirect):
2450 (WebKit::WebContext::didUpdateHistoryTitle):
2451 (WebKit::WebContext::populateVisitedLinks):
2452 * UIProcess/WebContext.h:
2453 (WebKit::WebContext::hasValidProcess):
2455 * UIProcess/WebHistoryClient.cpp:
2456 (WebKit::WebHistoryClient::initialize):
2457 (WebKit::WebHistoryClient::didNavigateWithNavigationData):
2458 (WebKit::WebHistoryClient::didPerformClientRedirect):
2459 (WebKit::WebHistoryClient::didPerformServerRedirect):
2460 (WebKit::WebHistoryClient::didUpdateHistoryTitle):
2461 (WebKit::WebHistoryClient::populateVisitedLinks):
2462 * UIProcess/WebHistoryClient.h:
2463 (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
2465 * UIProcess/WebPageProxy.cpp:
2466 (WebKit::WebPageProxy::didReceiveMessage):
2467 * UIProcess/WebPageProxy.h:
2469 * UIProcess/WebProcessProxy.cpp:
2470 (WebKit::WebProcessProxy::didReceiveMessage):
2471 (WebKit::WebProcessProxy::didReceiveSyncMessage):
2473 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2474 (WebKit::WebChromeClient::populateVisitedLinks):
2476 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2477 (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2478 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2479 (WebKit::WebFrameLoaderClient::setTitle):
2481 * WebProcess/WebProcess.cpp:
2482 (WebKit::WebProcess::didReceiveMessage):
2484 2010-07-28 Anders Carlsson <andersca@apple.com>
2486 Reviewed by Sam Weinig.
2488 Add JSNPObject::getConstructData
2489 https://bugs.webkit.org/show_bug.cgi?id=43165
2491 * WebProcess/Plugins/JSNPObject.cpp:
2492 (WebKit::JSNPObject::callMethod):
2493 Add a null check for m_npObject.
2495 (WebKit::JSNPObject::callConstructor):
2496 Call NPClass::construct.
2498 (WebKit::JSNPObject::getConstructData):
2499 Set up the construct data.
2501 (WebKit::JSNPObject::propertyGetter):
2502 convertNPVariantToJSValue now takes a JSGlobalObject as well.
2504 * WebProcess/Plugins/NPJSObject.cpp:
2505 (WebKit::NPJSObject::invoke):
2506 (WebKit::NPJSObject::invokeDefault):
2507 (WebKit::NPJSObject::construct):
2508 convertNPVariantToJSValue now takes a JSGlobalObject as well.
2510 * WebProcess/Plugins/NPJSObject.h:
2511 Make isNPJSObject and toNPJSObject public.
2513 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2514 (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
2515 Convert NPObjects correctly.
2517 (WebKit::NPRuntimeObjectMap::globalObject):
2518 Get the globalObject from the frame.
2520 (WebKit::NPRuntimeObjectMap::globalExec):
2523 * WebProcess/Plugins/NPRuntimeObjectMap.h:
2525 2010-07-28 Anders Carlsson <andersca@apple.com>
2527 Reviewed by Sam Weinig.
2529 Implement NPN_InvokeDefault and NPN_Construct
2530 https://bugs.webkit.org/show_bug.cgi?id=43160
2532 * WebProcess/Plugins/NPJSObject.cpp:
2533 (WebKit::NPJSObject::invoke):
2534 Just call invoke directly.
2536 (WebKit::NPJSObject::invokeDefault):
2539 (WebKit::NPJSObject::construct):
2542 (WebKit::NPJSObject::invoke):
2543 Add new invoke overload that takes the function as a JSValue.
2545 (WebKit::NPJSObject::npClass):
2548 (WebKit::NPJSObject::NP_InvokeDefault):
2549 Call NPJSObject::invokeDefault.
2551 (WebKit::NPJSObject::NP_Construct):
2552 Call NPJSObject::construct.
2554 * WebProcess/Plugins/NPJSObject.h:
2555 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2556 (WebKit::NPN_GetValue):
2557 Handle the Core Animation drawing model and the Carbon event model.
2559 (WebKit::NPN_InvokeDefault):
2560 Call the NPClass::invokeDefault function.
2562 (WebKit::NPN_Construct):
2563 Call the NPClass::construct function.
2565 2010-07-28 Anders Carlsson <andersca@apple.com>
2567 Reviewed by Sam Weinig.
2569 Implement NPN_Invoke
2570 https://bugs.webkit.org/show_bug.cgi?id=43158
2572 * WebProcess/Plugins/NPJSObject.cpp:
2573 (WebKit::NPJSObject::hasMethod):
2574 Use the free getCallData function.
2576 (WebKit::NPJSObject::invoke):
2577 Get the JavaScript function and call it.
2579 (WebKit::NPJSObject::NP_Invoke):
2580 Call NPJSObject::invoke.
2582 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2583 (WebKit::NPN_Invoke):
2584 Call the NPClass::invoke function.
2586 2010-07-28 Anders Carlsson <andersca@apple.com>
2588 Reviewed by Sam Weinig.
2590 Implement NPN_HasMethod
2591 https://bugs.webkit.org/show_bug.cgi?id=43155
2593 * WebProcess/Plugins/NPJSObject.cpp:
2594 (WebKit::NPJSObject::hasMethod):
2595 Check if the JSObject has a property with the given name. If it does, check that the value is a function.
2597 (WebKit::NPJSObject::hasProperty):
2600 (WebKit::NPJSObject::npClass):
2601 Add some stubbed out functions.
2603 (WebKit::NPJSObject::NP_HasMethod):
2604 Call NPJSObject::hasMethod.
2606 (WebKit::NPJSObject::NP_Invoke):
2607 (WebKit::NPJSObject::NP_InvokeDefault):
2608 (WebKit::NPJSObject::NP_SetProperty):
2611 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2612 (WebKit::NPN_HasMethod):
2613 Call the NPClass::hasMethod function.
2615 2010-07-28 Brady Eidson <beidson@apple.com>
2617 Rubberstamped by Sam Weinig.
2619 Make sure new pages are always added to the same PageGroup (for now).
2621 * WebProcess/WebPage/WebPage.cpp:
2622 (WebKit::WebPage::WebPage):
2624 2010-07-28 Sam Weinig <sam@webkit.org>
2626 Reviewed by Anders Carlsson.
2628 Patch for https://bugs.webkit.org/show_bug.cgi?id=43097
2629 Make all objects in the WebKit2 API inherit from a single base class
2631 - Adds an APIObject base class for all objects which one can get through
2632 the C API to inherit from.
2633 - Adds a WebString class which wraps WebCore::String for now. I am not too fond of
2634 this solution, so we should continue to iterate on it.
2635 - This is a first step toward make a CF-style base type (eg. CFTypeRef) for the C-API.
2637 * Shared/APIObject.h: Added.
2638 (WebKit::APIObject::APIObject):
2639 Base class for API objects.
2641 * Shared/ImmutableArray.h:
2642 Make inherit from APIObject.
2644 * Shared/WebString.h: Added.
2645 (WebKit::WebString::create):
2646 (WebKit::WebString::isNull):
2647 (WebKit::WebString::isEmpty):
2648 (WebKit::WebString::string):
2649 (WebKit::WebString::WebString):
2650 Wraps a WebCore::String so that it can be passed out to the API
2651 and still inherit from APIObject.
2653 * UIProcess/API/C/WKAPICast.h:
2654 (WebKit::WebStringAdaptor::WebStringAdaptor):
2655 (WebKit::WebStringAdaptor::operator WKStringRef):
2656 (WebKit::WebStringAdaptor::operator WKURLRef):
2657 Update conversion methods to deal in terms of WebStrings. Added WebStringAdaptor
2658 to ease passing strings to client functions.
2660 * UIProcess/API/C/WKContext.cpp:
2661 (WKContextCreateWithInjectedBundlePath):
2662 (WKContextPostMessageToInjectedBundle):
2663 (_WKContextSetAdditionalPluginPath):
2664 (_WKContextRegisterURLSchemeAsEmptyDocument):
2665 Get the WebCore::String from the WebString.
2667 * UIProcess/API/C/WKPage.cpp:
2671 * UIProcess/API/C/WKString.cpp:
2673 Implement in terms of WebString.
2675 * UIProcess/API/C/WKURL.cpp:
2676 * UIProcess/API/C/cf/WKStringCF.cpp:
2677 (WKStringCreateWithCFString):
2678 (WKStringCopyCFString):
2681 * UIProcess/API/C/cf/WKURLCF.cpp:
2682 (WKURLCreateWithCFURL):
2686 * UIProcess/WebBackForwardList.h:
2687 Make inherit from APIObject.
2689 * UIProcess/WebBackForwardListItem.h:
2692 * UIProcess/WebContext.cpp:
2693 (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
2694 (WebKit::WebContext::postMessageToInjectedBundle):
2695 (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
2696 Use String instead of StringImpl to be consistent.
2698 * UIProcess/WebContext.h:
2699 Make inherit from APIObject.
2701 * UIProcess/WebFramePolicyListenerProxy.h:
2704 * UIProcess/WebFrameProxy.h:
2707 * UIProcess/WebNavigationData.h:
2710 * UIProcess/WebPageNamespace.h:
2713 * UIProcess/WebPageProxy.h:
2716 * UIProcess/WebPreferences.h:
2719 * UIProcess/WebUIClient.cpp:
2720 (WebKit::WebUIClient::runJavaScriptPrompt):
2721 Implement in terms of WebString.
2723 * UIProcess/win/WebView.h:
2724 Make inherit from APIObject.
2726 * WebKit2.xcodeproj/project.pbxproj:
2729 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2730 (WKBundlePostMessage):
2731 Get the WebCore::String from the WebString.
2733 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2734 (WKBundleFramePauseAnimationOnElementWithId):
2737 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2738 (WebKit::InjectedBundle::postMessage):
2739 * WebProcess/InjectedBundle/InjectedBundle.h:
2740 Use String instead of StringImpl to be consistent.
2742 * WebProcess/WebPage/WebFrame.h:
2743 Make inherit from APIObject.
2745 * WebProcess/WebPage/WebPage.h:
2746 Make inherit from APIObject.
2748 * win/WebKit2.vcproj:
2751 2010-07-28 Anders Carlsson <andersca@apple.com>
2753 Reviewed by Sam Weinig.
2755 Implement JSNPObject::put
2756 https://bugs.webkit.org/show_bug.cgi?id=43149
2758 * WebProcess/Plugins/JSNPObject.cpp:
2759 (WebKit::JSNPObject::getOwnPropertySlot):
2762 (WebKit::JSNPObject::getOwnPropertyDescriptor):
2763 Implement this in the same way as it's implemented in RuntimeObject.
2765 (WebKit::JSNPObject::put):
2766 Implement this, call NPClass::setProperty.
2768 * WebProcess/Plugins/JSNPObject.h:
2770 2010-07-28 Anders Carlsson <andersca@apple.com>
2772 Reviewed by Sam Weinig.
2774 Add support for calling NPObject methods
2775 https://bugs.webkit.org/show_bug.cgi?id=43145
2777 * WebKit2.xcodeproj/project.pbxproj:
2778 Add JSNPMethod.cpp and JSNPMethod.h
2780 * WebProcess/Plugins/JSNPMethod.cpp: Added.
2781 * WebProcess/Plugins/JSNPMethod.h: Added.
2782 * WebProcess/Plugins/JSNPObject.cpp:
2784 Add a ClassInfo static variable for JSNPObject.
2786 (WebKit::JSNPObject::callMethod):
2787 Convert the passed in arguments, call the method and convert the result back.
2789 (WebKit::JSNPObject::getOwnPropertySlot):
2790 Check if the NPObject has a method.
2792 (WebKit::JSNPObject::methodGetter):
2793 Return a new JSNPMethod.
2795 * WebProcess/Plugins/JSNPObject.h:
2796 (WebKit::JSNPObject::classInfo):
2799 * WebProcess/Plugins/NPJSObject.cpp:
2800 (WebKit::NPJSObject::getProperty):
2801 Get the property from the JSObject.
2803 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2804 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2805 Convert the given JSValue to an NPVariant.
2807 * win/WebKit2.vcproj:
2808 Add JSNPMethod.cpp and JSNPMethod.h
2810 2010-07-28 Adam Roben <aroben@apple.com>
2812 Teach CoreIPC how to handle with a pipe closing during a write
2814 Fixes <http://webkit.org/b/43131> Assertion failure in
2815 Connection::sendOutgoingMessage if the other process exits at just the
2818 Reviewed by Darin Adler.
2820 * Platform/CoreIPC/win/ConnectionWin.cpp:
2821 (CoreIPC::Connection::sendOutgoingMessage): If ::WriteFile fails with
2822 ERROR_NO_DATA, the pipe (and thus the connection) has closed.
2824 2010-07-28 Adam Roben <aroben@apple.com>
2826 Teach CoreIPC the right way to send large messages on Windows
2828 r63776 added support for ::WriteFile failing with ERROR_IO_PENDING,
2829 but it had a major flaw: we didn't ensure that the data being sent
2830 (which is owned by the ArgumentEncoder) stayed around until the write
2831 finished. We'd destroy the data immediately, leading to ::WriteFile
2832 accessing that freed memory later. This seemed to always manifest
2833 itself as a crash in ::WaitForMultipleObjects.
2835 The correct solution (as hinted above) is to make sure that the data
2836 being written is not destroyed until the write completes. When
2837 ::WriteFile fails with ERROR_IO_PENDING, we store the data being sent
2838 in Connection::m_pendingWriteArguments, and don't send any more
2839 messages until that write completes. We use an event in the OVERLAPPED
2840 structure passed to ::WriteFile to detect when the write has completed
2841 (similar to what we do for reads).
2843 Fixes <http://webkit.org/b/42785> <rdar://problem/8218522> Crash in
2844 WebKit2WebProcess in WaitForMultipleObjects beneath
2845 WorkQueue::workQueueThreadBody when running tests that produce a lot
2848 Reviewed by Anders Carlsson.
2850 * Platform/CoreIPC/Connection.cpp:
2851 (CoreIPC::Connection::canSendOutgoingMessages): Added. This calls out
2852 to a platform-specific function to allow each platform to have its own
2853 policy for when messages can and can't be sent.
2854 (CoreIPC::Connection::sendOutgoingMessages): Use the new
2855 canSendOutgoingMessages to determine whether we can send any messages
2856 right now. We now remove one message at a time from m_outgoingMessages
2857 and send it. We stop sending messages when sendOutgoingMessage returns
2860 * Platform/CoreIPC/Connection.h: Added m_pendingWriteArguments and
2861 m_writeState on Windows.
2862 (CoreIPC::Connection::Message::Message): Added this default
2865 * Platform/CoreIPC/MessageID.h:
2866 (CoreIPC::MessageID::MessageID): Made the default constructor public
2867 for Message's benefit.
2869 * Platform/CoreIPC/mac/ConnectionMac.cpp:
2870 (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. Always
2872 (CoreIPC::Connection::sendOutgoingMessage): Changed to return a
2873 boolean indicating whether more messages can be sent at this time.
2875 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2876 (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. Returns
2877 true if we have a socket.
2878 (CoreIPC::Connection::sendOutgoingMessage): Changed a null-check of
2879 m_socket to an assertion since it should be checked for null in
2880 platformCanSendOutgoingMessages. Changed to return a boolean
2881 indicating whether more messages can be sent at this time.
2883 * Platform/CoreIPC/win/ConnectionWin.cpp:
2884 (CoreIPC::Connection::platformInitialize): Added initialization of
2886 (CoreIPC::Connection::platformInvalidate): Close m_writeState's event
2888 (CoreIPC::Connection::writeEventHandler): Added. Checks if the pending
2889 write has completed, cleans up our pending write state, and sends any
2891 (CoreIPC::Connection::open): Register our write event with the
2892 WorkQueue so that writeEventHandler will be called when the event is
2894 (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. We can
2895 only send messages if there isn't a write pending.
2896 (CoreIPC::Connection::sendOutgoingMessage): Changed to return a
2897 boolean indicating whether more messages can be sent at this time. We
2898 now pass m_writeState to ::WriteFile instead of an empty OVERLAPPED
2899 struct so that our write event will be signaled when the write
2900 completes. We also no longer pass a pointer to receive how many bytes
2901 were written, as recommended by MSDN. If ::WriteFile fails with
2902 ERROR_IO_PENDING, we save the ArgumentEncoder for this message and
2903 return false to indicate that no more messages can be sent at this
2906 2010-07-28 Adam Roben <aroben@apple.com>
2908 Stop leaking Connection::m_readState.hEvent on Windows
2910 Fixes <http://webkit.org/b/43129> CoreIPC::Connection leaks its read
2913 Reviewed by Darin Adler.
2915 * Platform/CoreIPC/win/ConnectionWin.cpp:
2916 (CoreIPC::Connection::platformInvalidate): Close the event handle.
2918 2010-07-26 Steve Block <steveblock@google.com>
2920 Reviewed by Jeremy Orlow.
2922 Page clients should be passed to Page constructor via structure of pointers
2923 https://bugs.webkit.org/show_bug.cgi?id=42834
2925 * WebKit2/WebProcess/WebPage/WebPage.cpp:
2928 2010-07-28 Andras Becsi <abecsi@webkit.org>
2930 Unreviewed trivial build fix.
2932 [Qt] Follow the API changes after r64172.
2934 * UIProcess/API/qt/qwkpage.cpp:
2938 2010-07-27 Anders Carlsson <andersca@apple.com>
2942 * WebProcess/Plugins/JSNPObject.cpp:
2943 (WebKit::JSNPObject::propertyGetter):
2944 Remove unreachable code.
2946 2010-07-27 Anders Carlsson <andersca@apple.com>
2948 Reviewed by Sam Weinig.
2950 Implement JSNPObject::propertyGetter
2951 https://bugs.webkit.org/show_bug.cgi?id=43091
2953 * WebProcess/Plugins/JSNPObject.cpp:
2954 (WebKit::JSNPObject::propertyGetter):
2955 Ask the NPObject for its property.
2957 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2958 (WebKit::NPRuntimeObjectMap::jsNPObjectDestroyed):
2961 (WebKit::NPRuntimeObjectMap::convertNPVariantToValue):
2962 Implement this for everything except objects.
2964 2010-07-27 Sam Weinig <sam@webkit.org>
2966 Reviewed by Anders Carlsson.
2968 Patch for https://bugs.webkit.org/show_bug.cgi?id=43087
2969 Clean up handling of strings at the WebKit2 API layer.
2971 - Always use the "copy" rule for functions that return WKStringRefs or WKURLRefs.
2972 - Never return a null WKStringRef or WKURLRef.
2974 * UIProcess/API/C/WKAPICast.h:
2979 * UIProcess/API/C/WKBackForwardListItem.cpp:
2980 (WKBackForwardListItemCopyOriginalURL):
2981 (WKBackForwardListItemCopyURL):
2982 (WKBackForwardListItemCopyTitle):
2983 * UIProcess/API/C/WKBackForwardListItem.h:
2984 * UIProcess/API/C/WKFrame.cpp:
2985 (WKFrameIsMainFrame):
2986 (WKFrameCopyProvisionalURL):
2991 * UIProcess/API/C/WKFrame.h:
2992 * UIProcess/API/C/WKNavigationData.cpp:
2993 (WKNavigationDataCopyTitle):
2994 (WKNavigationDataCopyURL):
2995 * UIProcess/API/C/WKNavigationData.h:
2996 * UIProcess/API/C/WKPage.cpp:
2998 * UIProcess/API/C/WKPage.h:
2999 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3000 (WKBundleFrameCopyURL):
3001 (WKBundleFrameCopyName):
3002 (WKBundleFrameCopyCounterValue):
3003 (WKBundleFrameCopyMarkerText):
3004 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3005 * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp:
3006 (WKBundleNodeCopyNodeName):
3007 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3008 (WKBundlePageCopyRenderTreeExternalRepresentation):
3010 2010-07-27 Adam Roben <aroben@apple.com>
3012 Fix PageClient ownership in WebPageProxy
3014 WKView now owns the PageClient, similar to how things work on Windows
3015 (where the WebView is the PageClient).
3017 Fixes <http://webkit.org/b/40185> WebPageProxy should keep a weak
3018 reference to the PageClient
3020 Reviewed by Anders Carlsson.
3022 * UIProcess/API/mac/WKView.mm:
3023 (-[WKView initWithFrame:pageNamespaceRef:]): Store the PageClientImpl
3024 on our WKViewData object and pass it to the WebPageProxy.
3026 * UIProcess/WebPageProxy.cpp:
3027 (WebKit::WebPageProxy::setPageClient):
3028 * UIProcess/WebPageProxy.h:
3029 Removed Mac-specific code that put the PageClient in an OwnPtr. We now
3030 store it in a bare pointer just like on Windows.
3032 2010-07-27 Anders Carlsson <andersca@apple.com>
3034 Reviewed by Sam Weinig.
3036 Add JSNPObject, a JSObject that wraps an NPObject
3037 https://bugs.webkit.org/show_bug.cgi?id=43079
3039 * WebKit2.xcodeproj/project.pbxproj:
3040 Add JSNPObject.cpp and JSNPObject.h
3042 * WebProcess/Plugins/JSNPObject.cpp: Added.
3043 (WebKit::npIdentifierFromIdentifier):
3044 (WebKit::JSNPObject::JSNPObject):
3045 (WebKit::JSNPObject::~JSNPObject):
3046 (WebKit::JSNPObject::getOwnPropertySlot):
3047 Check if the NPObject has the given property.
3049 (WebKit::JSNPObject::propertyGetter):
3050 (WebKit::JSNPObject::throwInvalidAccessError):
3051 * WebProcess/Plugins/JSNPObject.h: Added.
3052 (WebKit::JSNPObject::createStructure):
3053 * WebProcess/Plugins/NPJSObject.h:
3055 * win/WebKit2.vcproj:
3056 Add JSNPObject.cpp and JSNPObject.h
3058 2010-07-27 Anders Carlsson <andersca@apple.com>
3060 Reviewed by Sam Weinig.
3062 Expose interface for returning the plug-in script JSObject
3063 https://bugs.webkit.org/show_bug.cgi?id=43074
3065 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3066 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3069 * WebProcess/Plugins/NPRuntimeObjectMap.h:
3070 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3071 (WebKit::NetscapePlugin::pluginScriptableNPObject):
3072 Ask the plug-in for it's scriptable NPObject.
3074 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3075 * WebProcess/Plugins/Plugin.h:
3076 Add pluginScritableNPObject.
3078 * WebProcess/Plugins/PluginView.cpp:
3079 (WebKit::PluginView::PluginView):
3080 Call PluginViewBase constructor.
3082 (WebKit::PluginView::scriptObject):
3083 Ask the plug-in for its scriptable object and wrap it.
3085 * WebProcess/Plugins/PluginView.h:
3086 PluginView now inherits from PluginViewBase.
3088 2010-07-27 Anders Carlsson <andersca@apple.com>
3090 Reviewed by Adam Roben.
3092 Move NPJSObject out into separate files
3093 https://bugs.webkit.org/show_bug.cgi?id=43068
3095 * WebKit2.xcodeproj/project.pbxproj:
3096 * WebProcess/Plugins/NPJSObject.cpp: Added.
3097 (WebKit::NPJSObject::create):
3098 (WebKit::NPJSObject::NPJSObject):
3099 (WebKit::NPJSObject::~NPJSObject):
3100 (WebKit::NPJSObject::isNPJSObject):
3101 (WebKit::NPJSObject::initialize):
3102 (WebKit::identifierFromIdentifierRep):
3103 (WebKit::NPJSObject::hasProperty):
3104 (WebKit::NPJSObject::getProperty):
3105 (WebKit::NPJSObject::npClass):
3106 (WebKit::NPJSObject::NP_Allocate):
3107 (WebKit::NPJSObject::NP_Deallocate):
3108 (WebKit::NPJSObject::NP_HasProperty):
3109 (WebKit::NPJSObject::NP_GetProperty):
3110 * WebProcess/Plugins/NPJSObject.h: Added.
3111 (WebKit::NPJSObject::jsObject):
3112 (WebKit::NPJSObject::toNPJSObject):
3113 * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3114 (WebKit::NPRuntimeObjectMap::npJSObjectDestroyed):
3115 (WebKit::NPRuntimeObjectMap::globalExec):
3116 * WebProcess/Plugins/NPRuntimeObjectMap.h:
3117 * win/WebKit2.vcproj:
3119 2010-07-27 Anders Carlsson <andersca@apple.com>
3121 Reviewed by Adam Roben.
3123 Rename NPJSObjectMap to NPRuntimeObjectMap
3124 https://bugs.webkit.org/show_bug.cgi?id=43066
3126 * WebKit2.xcodeproj/project.pbxproj:
3127 * WebProcess/Plugins/NPJSObjectMap.cpp: Removed.
3128 * WebProcess/Plugins/NPJSObjectMap.h: Removed.
3129 * WebProcess/Plugins/NPRuntimeObjectMap.cpp: Added.
3130 (WebKit::NPJSObject::NPJSObject):
3131 (WebKit::NPJSObject::~NPJSObject):
3132 (WebKit::NPJSObject::toNPJSObject):
3133 (WebKit::NPJSObject::create):
3134 (WebKit::NPJSObject::isNPJSObject):
3135 (WebKit::NPJSObject::initialize):
3136 (WebKit::identifierFromIdentifierRep):
3137 (WebKit::NPJSObject::hasProperty):
3138 (WebKit::NPJSObject::getProperty):
3139 (WebKit::NPJSObject::npClass):
3140 (WebKit::NPJSObject::NP_Allocate):
3141 (WebKit::NPJSObject::NP_Deallocate):
3142 (WebKit::NPJSObject::NP_HasProperty):
3143 (WebKit::NPJSObject::NP_GetProperty):
3144 (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
3145 (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
3146 (WebKit::NPRuntimeObjectMap::invalidate):
3147 * WebProcess/Plugins/NPRuntimeObjectMap.h: Added.
3148 * WebProcess/Plugins/PluginView.cpp:
3149 (WebKit::PluginView::PluginView):
3150 (WebKit::PluginView::~PluginView):
3151 (WebKit::PluginView::windowScriptNPObject):
3152 (WebKit::PluginView::pluginElementNPObject):
3153 * WebProcess/Plugins/PluginView.h:
3154 * win/WebKit2.vcproj:
3156 2010-07-27 Adam Roben <aroben@apple.com>
3158 Make preferences APIs robust against web process crashes
3160 Fixes <http://webkit.org/b/43049> Crash in
3161 WebPageNamespace::preferencesDidChange if preferences are changed
3162 after the web process crashes
3164 Reviewed by Anders Carlsson.
3166 * UIProcess/WebContext.cpp:
3167 (WebKit::WebContext::preferencesDidChange): Bail out if we don't have
3168 a web process. The new preference values will get propogated to the
3169 web process if and when it launches.
3171 2010-07-27 Adam Roben <aroben@apple.com>
3173 Add a ProcessDidExit callback to the WKPageLoaderClient
3175 Fixes <http://webkit.org/b/43048> UI process needs a way to find out
3176 when the web process crashes
3178 Reviewed by Anders Carlsson.
3180 * UIProcess/API/C/WKPage.h: Added WKPageProcessDidExitCallback, and a
3181 processDidExit member of that type to WKPageLoaderClient.
3183 * UIProcess/WebLoaderClient.cpp:
3184 (WebKit::WebLoaderClient::processDidExit): Added. Calls through to the
3187 * UIProcess/WebLoaderClient.h: Added processDidExit.
3189 * UIProcess/WebPageProxy.cpp:
3190 (WebKit::WebPageProxy::processDidExit): Tell the loader client the
3193 2010-07-27 Andras Becsi <abecsi@webkit.org>
3195 Reviewed by Kenneth Rohde Christiansen.
3197 [Qt] WebEventFactory::createWebMouseEvent should follow WebKit2 API changes
3198 https://bugs.webkit.org/show_bug.cgi?id=43042
3200 * Shared/qt/WebEventFactoryQt.cpp:
3201 (WebKit::WebEventFactory::createWebMouseEvent):
3202 Set deltaX, deltaY and deltaZ arguments.
3204 2010-07-27 Balazs Kelemen <kb@inf.u-szeged.hu>
3206 Reviewed by Kenneth Rohde Christiansen.
3208 [Qt] WebKit::PageClient implementation needs a dedicated class
3210 https://bugs.webkit.org/show_bug.cgi?id=42974
3212 * UIProcess/API/qt/qwkpage.cpp:
3213 (PageClientImpl::PageClientImpl): Added.
3214 (PageClientImpl::pageDidEnterAcceleratedCompositing): Moved from QWKPagePrivate.
3215 (PageClientImpl::pageDidLeaveAcceleratedCompositing): Ditto.
3216 (PageClientImpl::processDidExit): Ditto.
3217 (PageClientImpl::processDidRevive): Ditto.
3218 (PageClientImpl::setCursor): Ditto.
3219 (PageClientImpl::takeFocus): Ditto.
3220 (PageClientImpl::toolTipChanged): Ditto.
3221 (QWKPagePrivate::QWKPagePrivate): Set a new instance of the PageClientImpl as PageClient rather than 'this'.
3222 * UIProcess/API/qt/qwkpage_p.h: Removed PageClient implementation methods from QWKPagePrivate.
3224 2010-07-26 Darin Adler <darin@apple.com>
3226 Reviewed by Sam Weinig.
3228 WebKitTestRunner needs to support layoutTestController.counterValueForElementById
3229 https://bugs.webkit.org/show_bug.cgi?id=42537
3231 WebKitTestRunner needs layoutTestController.markerTextForListItem
3232 https://bugs.webkit.org/show_bug.cgi?id=42549
3234 * UIProcess/API/C/WKString.cpp:
3235 (WKStringIsEmpty): Added.
3236 * UIProcess/API/C/WKString.h: Added WKStringIsEmpty.
3238 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3239 (copiedString): Added. Helper for functions that return a
3240 WKStringRef that follows the copy rule.
3241 (WKBundleFrameCopyName): Use copiedString.
3242 (WKBundleFrameCopyCounterValue): Added. Calls counterValue.
3243 (WKBundleFrameCopyMarkerText): Added. Calls markerText.
3244 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3245 Added WKBundleFrameCopyCounterValue and WKBundleFrameCopyMarkerText.
3247 * WebProcess/WebPage/WebFrame.cpp:
3248 (WebKit::WebFrame::computedStyleIncludingVisitedInfo):
3249 Renamed argument to streamline function a bit.
3250 (WebKit::WebFrame::counterValue): Added.
3251 (WebKit::WebFrame::markerText): Added.
3252 * WebProcess/WebPage/WebFrame.h: Added counterValue and markerText.
3254 2010-07-26 Sam Weinig <sam@webkit.org>
3256 Reviewed by Anders Carlsson.
3258 Part 2 of https://bugs.webkit.org/show_bug.cgi?id=43013
3259 <rdar://problem/8152434>
3260 Add support for scrolling using the keyboard in WebKit2
3262 Add support for scrolling with the space bar and ensure that we don't scroll
3263 if WebCore is handling the event in another way.
3265 * WebProcess/WebPage/WebPage.cpp:
3266 (WebKit::WebPage::keyEvent):
3267 (WebKit::getScrollMapping):
3268 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3269 * WebProcess/WebPage/WebPage.h:
3271 2010-07-26 Sam Weinig <sam@webkit.org>
3273 Reviewed by Anders Carlsson.
3275 Patch for https://bugs.webkit.org/show_bug.cgi?id=43013
3276 Part of <rdar://problem/8152434>
3277 Add support for scrolling using the keyboard in WebKit2
3279 * WebProcess/WebPage/WebPage.cpp:
3280 (WebKit::getScrollMapping):
3281 (WebKit::WebPage::keyEvent):
3282 Scroll the page in response to keyDown.
3283 * WebProcess/WebPage/WebPage.h:
3284 * WebProcess/WebPage/mac/WebPageMac.mm:
3285 Use WindowsKeyboardCodes.h instead of redefining the constants.
3287 2010-07-26 Ada Chan <adachan@apple.com>
3291 * win/WebKit2Generated.make:
3293 2010-07-26 Anders Carlsson <andersca@apple.com>
3297 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3298 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3299 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3301 2010-07-26 Anders Carlsson <andersca@apple.com>
3303 Reviewed by Sam Weinig.
3305 Handle mouseenter/mouseleave + focus events
3306 https://bugs.webkit.org/show_bug.cgi?id=42997
3308 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3309 (WebKit::NetscapePlugin::handleMouseEnterEvent):
3310 Call platformHandleMouseEnterEvent.
3312 (WebKit::NetscapePlugin::handleMouseLeaveEvent):
3313 Call platformHandleMouseExitEvent.
3315 (WebKit::NetscapePlugin::setFocus):
3316 Call platformSetFocus.
3318 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3319 (WebKit::fillInCocoaEventFromMouseEvent):
3320 Factor out code that fills in an NPCocoaEvent from a WebMouseEvent.
3322 (WebKit::initializeMouseEvent):
3323 Call fillInCocoaEventFromMouseEvent.
3325 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3326 Send an NPCocoaEventMouseEntered event.
3328 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3329 Send an NPCocoaEventMouseExited event.
3331 (WebKit::NetscapePlugin::platformSetFocus):
3332 Send an NPCocoaEventFocusChanged.
3334 * WebProcess/Plugins/Plugin.h:
3335 * WebProcess/Plugins/PluginView.cpp:
3336 (WebKit::PluginView::handleEvent):
3337 Dispatch mouse enter and mouse leave events. Call focusPluginElement on mousedown.
3339 (WebKit::PluginView::focusPluginElement):
3340 Focus the plug-in's containing frame and its element.
3342 (WebKit::PluginView::setFocus):
3343 Call Plugin::setFocus.
3345 2010-07-26 Brady Eidson <beidson@apple.com>
3347 Reviewed by Sam Weinig.
3349 Add ability for WK2 to register a scheme to always be displayed as an empty document
3350 https://bugs.webkit.org/show_bug.cgi?id=42995
3352 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
3353 (WebProcessMessage::):
3355 * UIProcess/API/C/WKContext.cpp:
3356 (_WKContextRegisterURLSchemeAsEmptyDocument):
3357 * UIProcess/API/C/WKContextPrivate.h:
3359 * UIProcess/WebContext.cpp:
3360 (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
3361 * UIProcess/WebContext.h:
3363 * WebProcess/WebProcess.cpp:
3364 (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
3365 (WebKit::WebProcess::didReceiveMessage):
3366 * WebProcess/WebProcess.h:
3368 2010-07-26 Anders Carlsson <andersca@apple.com>
3370 Reviewed by Adam Roben.
3372 Get rid of the dummy plug-in.
3374 * WebKit2.xcodeproj/project.pbxproj:
3375 * WebProcess/Plugins/DummyPlugin.cpp: Removed.
3376 * WebProcess/Plugins/DummyPlugin.h: Removed.
3377 * win/WebKit2.vcproj:
3379 2010-07-26 Sam Weinig <sam@webkit.org>
3381 Reviewed by Anders Carlsson.
3383 Move some non-APIish functions into private headers.
3385 * WebKit2.xcodeproj/project.pbxproj:
3386 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3387 * WebProcess/InjectedBundle/API/c/WKBundle.h:
3388 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3389 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3390 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: Copied from WebProcess/InjectedBundle/API/c/WKBundleFrame.h.
3391 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Copied from WebProcess/InjectedBundle/API/c/WKBundle.h.
3392 * win/WebKit2.vcproj:
3394 2010-07-26 Sam Weinig <sam@webkit.org>
3396 Reviewed by Anders Carlsson.
3398 Fix for https://bugs.webkit.org/show_bug.cgi?id=42986
3399 Add prompt and confirm client functions to WebKit2
3401 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
3402 (WebPageProxyMessage::):
3403 * UIProcess/API/C/WKPage.h:
3404 * UIProcess/WebPageProxy.cpp:
3405 (WebKit::WebPageProxy::didReceiveSyncMessage):
3406 (WebKit::WebPageProxy::runJavaScriptAlert):
3407 (WebKit::WebPageProxy::runJavaScriptConfirm):
3408 (WebKit::WebPageProxy::runJavaScriptPrompt):
3409 * UIProcess/WebPageProxy.h:
3410 * UIProcess/WebUIClient.cpp:
3411 (WebKit::WebUIClient::runJavaScriptAlert):
3412 (WebKit::WebUIClient::runJavaScriptConfirm):
3413 (WebKit::WebUIClient::runJavaScriptPrompt):
3414 * UIProcess/WebUIClient.h:
3415 * WebKit2.xcodeproj/project.pbxproj:
3416 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3417 (WebKit::WebChromeClient::runJavaScriptConfirm):
3418 (WebKit::WebChromeClient::runJavaScriptPrompt):
3420 2010-07-26 Adam Roben <aroben@apple.com>
3424 * win/WebKit2.vcproj:
3425 * win/WebKit2WebProcess.vcproj:
3426 Removed empty attributes so the values will be picked up from the
3427 vsprops files. (Also removed a couple of attributes that accidentally
3428 duplicated values from the vsprops files.)
3430 2010-07-26 Simon Fraser <simon.fraser@apple.com>
3432 Reviewed by Anders Carlsson.
3434 Composited layers don't scroll in WebKit2
3435 https://bugs.webkit.org/show_bug.cgi?id=42771
3437 In WebKit2, do the compositing layer geometry flipping on the drawing area's main
3438 backing layer. This both avoids us having to flip the layer contents, and also avoids issues
3439 with the positioning of the root platform layer, which we want top-left. Doing the flipping
3440 lower down would require that the root platform layer know where the scrollbar is.
3442 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3443 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
3445 2010-07-26 Anders Carlsson <andersca@apple.com>
3447 Reviewed by Sam Weinig.
3449 Deliver mouse and wheel events to plug-ins
3450 https://bugs.webkit.org/show_bug.cgi?id=42988
3452 * Shared/WebEvent.h:
3453 (WebKit::WebMouseEvent::WebMouseEvent):
3454 (WebKit::WebMouseEvent::deltaX):
3455 (WebKit::WebMouseEvent::deltaY):
3456 (WebKit::WebMouseEvent::deltaZ):
3457 * Shared/mac/WebEventFactory.mm:
3458 (WebKit::WebEventFactory::createWebMouseEvent):
3459 Add deltaX, deltaY and deltaZ member variables to WebMosueEvent.
3461 * WebKit2.xcodeproj/project.pbxproj:
3462 Rename NetscapePluginMac.cpp to NetscapePluginMac.mm.
3464 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3465 (WebKit::NetscapePlugin::NPP_HandleEvent):
3468 (WebKit::NetscapePlugin::handleMouseEvent):
3469 (WebKit::NetscapePlugin::handleWheelEvent):
3470 Call the platform variants.
3472 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added.
3473 (WebKit::modifierFlags):
3474 (WebKit::buttonNumber):
3475 (WebKit::initializeMouseEvent):
3476 (WebKit::NetscapePlugin::platformHandleMouseEvent):
3477 Create an NPCocoaEvent and send it to the plug-in.
3479 (WebKit::NetscapePlugin::platformHandleWheelEvent):
3482 * WebProcess/Plugins/PluginView.cpp:
3483 (WebKit::PluginView::handleEvent):
3484 Get the current WebEvent and send it to the plug-in if necessary.
3486 * WebProcess/WebPage/WebPage.cpp:
3487 (WebKit::WebPage::currentEvent):
3488 (WebKit::CurrentEvent::CurrentEvent):
3489 (WebKit::CurrentEvent::~CurrentEvent):
3490 (WebKit::WebPage::mouseEvent):
3491 (WebKit::WebPage::wheelEvent):
3492 (WebKit::WebPage::keyEvent):
3493 * WebProcess/WebPage/WebPage.h:
3494 Add RAII object for keeping track of the current event.
3496 2010-07-26 Anders Carlsson <andersca@apple.com>
3498 Reviewed by Sam Weinig.
3500 Clean up event handling functions
3501 https://bugs.webkit.org/show_bug.cgi?id=42977
3503 * WebProcess/WebPage/WebPage.cpp:
3504 (WebKit::WebPage::mouseEvent):
3505 (WebKit::WebPage::wheelEvent):
3506 (WebKit::WebPage::keyEvent):
3507 (WebKit::WebPage::didReceiveMessage):
3508 * WebProcess/WebPage/WebPage.h:
3510 2010-07-25 Darin Adler <darin@apple.com>
3512 Reviewed by Maciej Stachowiak.
3514 WebKitTestRunner needs to support layoutTestController.keepWebHistory
3515 https://bugs.webkit.org/show_bug.cgi?id=42323
3517 Added WKBundleSetShouldTrackVisitedLinks, WKBundleRemoveAllVisitedLinks,
3518 and WKBundleFrameGetComputedStyleIncludingVisitedInfo.
3520 Also fixed misspellings of the word "receive".
3522 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3523 (WKBundleSetShouldTrackVisitedLinks): Added.
3524 (WKBundleRemoveAllVisitedLinks): Added.
3525 * WebProcess/InjectedBundle/API/c/WKBundle.h: Added functions and
3526 fixed mispellings of receive.
3528 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3529 (WKBundleFrameGetJavaScriptContext): Moved the code from here into WebFrame,
3530 to be consistent with the rest of the functions in this file.
3531 (WKBundleFrameGetComputedStyleIncludingVisitedInfo): Added.
3532 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Added
3533 WKBundleFrameGetComputedStyleIncludingVisitedInfo and tried to rearrange the
3534 file to be more logically ordered and grouped.
3536 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3537 (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Added.
3538 (WebKit::InjectedBundle::removeAllVisitedLinks): Added.
3539 (WebKit::InjectedBundle::didReceiveMessage): Fixed mispellings of receive.
3540 * WebProcess/InjectedBundle/InjectedBundle.h: Ditto.
3542 * WebProcess/WebPage/WebFrame.cpp:
3543 (WebKit::WebFrame::jsContext): Added. Contains the code that used to be in
3544 WKBundleFrameGetJavaScriptContext.
3545 (WebKit::WebFrame::computedStyleIncludingVisitedInfo): Added.
3546 * WebProcess/WebPage/WebFrame.h: Ditto.
3548 * UIProcess/API/C/WKContext.h: Fixed misspellings of receive.
3549 * UIProcess/WebContext.cpp:
3550 (WebKit::WebContext::didReceiveMessageFromInjectedBundle): Ditto.
3551 * UIProcess/WebContext.h: Ditto.
3552 * UIProcess/WebContextInjectedBundleClient.cpp:
3553 (WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle): Ditto.
3554 * UIProcess/WebContextInjectedBundleClient.h: Ditto.
3555 * UIProcess/WebProcessProxy.cpp:
3556 (WebKit::WebProcessProxy::forwardMessageToWebContext): Ditto.
3557 * WebProcess/WebProcess.cpp:
3558 (WebKit::WebProcess::forwardMessageToInjectedBundle): Ditto.
3560 2010-07-25 Alexey Proskuryakov <ap@apple.com>
3562 Reviewed by Sam Weinig.
3564 https://bugs.webkit.org/show_bug.cgi?id=42193
3565 Support layoutTestController.dumpEditingDelegates in WebKitTestRunner
3567 Step 2 - add the rest of editing delegates.
3569 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
3570 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
3571 Added enums for EditorInsertAction and EAffinity. Also added a dummy type for
3572 CSSStyleDeclaration - neither DumpRenderTree not WebKitTestRunner actually use that.
3574 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3575 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
3576 (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
3577 (WebKit::InjectedBundlePageEditorClient::shouldEndEditing):
3578 (WebKit::InjectedBundlePageEditorClient::shouldInsertNode):
3579 (WebKit::InjectedBundlePageEditorClient::shouldInsertText):
3580 (WebKit::InjectedBundlePageEditorClient::shouldDeleteRange):
3581 (WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange):
3582 (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
3583 (WebKit::InjectedBundlePageEditorClient::didBeginEditing):
3584 (WebKit::InjectedBundlePageEditorClient::didEndEditing):
3585 (WebKit::InjectedBundlePageEditorClient::didChange):
3586 (WebKit::InjectedBundlePageEditorClient::didChangeSelection):
3587 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
3588 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3589 (WebKit::WebEditorClient::shouldDeleteRange):
3590 (WebKit::WebEditorClient::shouldEndEditing):
3591 (WebKit::WebEditorClient::shouldInsertNode):
3592 (WebKit::WebEditorClient::shouldInsertText):
3593 (WebKit::WebEditorClient::shouldChangeSelectedRange):
3594 (WebKit::WebEditorClient::shouldApplyStyle):
3595 (WebKit::WebEditorClient::didBeginEditing):
3596 (WebKit::WebEditorClient::respondToChangedContents):
3597 (WebKit::WebEditorClient::respondToChangedSelection):
3598 (WebKit::WebEditorClient::didEndEditing):
3599 Added remaining delagates that are needed for WebKitTestRunner.
3601 2010-07-19 Balazs Kelemen <kb@inf.u-szeged.hu>
3603 Reviewed by Kenneth Rohde Christiansen.
3605 [Qt] Setup the QtWebProcess
3607 https://bugs.webkit.org/show_bug.cgi?id=42623
3609 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3610 Remove the framework entry point from here to WebProcess/qt/WebProcessMainQt.cpp to match with with the mac and the win port.
3611 * WebKit2.pro: Added.
3612 * WebProcess/qt/WebProcessMainQt.cpp: Added.
3613 (WebKit::WebProcessMainQt): Framework entry point for Qt.
3614 * qt/MainQt.cpp: Added.
3617 2010-07-22 Darin Adler <darin@apple.com>
3619 Reviewed by Sam Weinig.
3621 Eliminate unneeded WKBundleFrameCopyInnerText function from WebKit2
3622 https://bugs.webkit.org/show_bug.cgi?id=42847
3624 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Removed WKBundleFrameCopyInnerText.
3625 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
3626 * WebProcess/WebPage/WebFrame.cpp: Removed innerText.
3627 * WebProcess/WebPage/WebFrame.h: Ditto.
3629 2010-07-22 Alexey Proskuryakov <ap@apple.com>
3631 More Windows build fixing.
3633 * win/WebKit2Generated.make: Copy the new public headers to $(WEBKITOUTPUTDIR)\include\WebKit2.
3635 2010-07-22 Alexey Proskuryakov <ap@apple.com>
3639 * win/WebKit2.vcproj: Added new files.
3641 2010-07-22 Alexey Proskuryakov <ap@apple.com>
3643 Reviewed by Sam Weinig and Darin Adler.
3645 https://bugs.webkit.org/show_bug.cgi?id=42193
3646 Support layoutTestController.dumpEditingDelegates in WebKitTestRunner
3648 Step 1: Add the method, and implement one actual delegate call as proof of concept. No tests
3649 fixed, but this makes difference one line smaller on many editing tests.
3651 * WebKit2.xcodeproj/project.pbxproj:
3652 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
3653 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
3654 * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp: Added.
3655 (WKBundleNodeCopyNodeName):
3656 (WKBundleNodeGetParent):
3657 * WebProcess/InjectedBundle/API/c/WKBundleNode.h: Added.
3658 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3659 (WKBundlePageSetEditorClient):
3660 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3661 * WebProcess/InjectedBundle/API/c/WKBundleRange.cpp: Added.
3662 (WKBundleRangeGetStartOffset):
3663 (WKBundleRangeGetStartContainer):
3664 (WKBundleRangeGetEndOffset):
3665 (WKBundleRangeGetEndContainer):
3666 * WebProcess/InjectedBundle/API/c/WKBundleRange.h: Added.
3667 Added WKBundleRangeRef and WKBundleNodeRef types for injected bundles. These are just pointers
3668 to respective WebCore objects, without any WebKit2 wrappers.
3670 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: Added.
3671 (WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient):
3672 (WebKit::InjectedBundlePageEditorClient::initialize):
3673 (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
3674 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Added.
3675 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3676 (WebKit::WebEditorClient::shouldBeginEditing):
3677 * WebProcess/WebPage/WebPage.cpp:
3678 (WebKit::WebPage::initializeInjectedBundleEditorClient):
3679 * WebProcess/WebPage/WebPage.h:
3680 (WebKit::WebPage::injectedBundleEditorClient):
3681 Added the plumbing for invoking injected bundle code for editor client. There is no real API
3682 for editor client yet.
3684 2010-07-22 Ivan Krstić <ike@apple.com>
3686 Reviewed by Anders Carlsson.
3688 Adapt sandbox for new WebProcess bootstrap service naming scheme.
3689 <rdar://problem/8225000>
3691 * WebProcess/com.apple.WebProcess.sb:
3693 2010-07-22 Anders Carlsson <andersca@apple.com>
3695 Reviewed by Adam Roben.
3697 It should be possible to attach to the WebProcess in gdb during startup
3698 https://bugs.webkit.org/show_bug.cgi?id=42853
3700 Create an unique bootstrap service name and pass it to the web process, instead of registering a per process
3701 name (which was incorrect anyway). This lets us get rid of the requirement that the UI process always should be
3702 the parent process of the web process, something which is false when running under the debugger.
3704 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3705 (WebKit::ProcessLauncher::launchProcess):
3706 * WebProcess/mac/WebProcessMainMac.mm:
3707 (WebKit::WebProcessMain):
3709 2010-07-22 Anders Carlsson <andersca@apple.com>
3711 Reviewed by Sam Weinig.
3713 Don't assert when Connection::invalidate is called before Connection::dispatchConnectionDidClose
3714 https://bugs.webkit.org/show_bug.cgi?id=42851
3716 * Platform/CoreIPC/Connection.cpp:
3717 (CoreIPC::Connection::dispatchConnectionDidClose):
3718 Just return early if m_client is 0.
3720 2010-07-22 Adam Roben <aroben@apple.com>
3722 Use ::MessageBox instead of ::DebugBreak to make the web process wait
3725 While ::DebugBreak can make it easier to attach a debugger (because it
3726 brings up the Just-in-Time debugger window), using ::MessageBox has
3728 1) It explains to the user what's going on, so it's harder to
3729 mistake this debugging aid for a bug.
3730 2) It allows you to debug the UI process and the web process using
3731 the same debugger, if desired.
3733 Special thanks to John Sullivan for help with the text that's shown in
3736 Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
3737 debugging aid should explain to the user what's happening
3739 Reviewed by John Sullivan and Anders Carlsson.
3741 * WebProcess/WebKitMain.cpp:
3742 (WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
3743 the debugger. The alert explains to the user what's going on.
3745 2010-07-22 Adam Roben <aroben@apple.com>
3747 Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
3749 Fixes <http://webkit.org/b/42846> WorkQueue should detect
3750 ::WaitForMultipleObject failures
3752 Reviewed by Anders Carlsson.
3754 * Platform/win/WorkQueueWin.cpp:
3755 (WorkQueue::workQueueThreadBody): Added some assertions about the
3756 various things that can fail with ::WaitForMultipleObjects,
3758 - Passing too many objects
3759 - Timeouts (which shouldn't happen since we pass a timeout interval
3761 - Abandoned mutexes (which shouldn't happen since we don't wait on
3762 any mutexes currently)
3763 - Miscellaneous failures
3765 2010-07-22 Sam Weinig <sam@webkit.org>
3767 Reviewed by Anders Carlsson.
3769 Patch for https://bugs.webkit.org/show_bug.cgi?id=42836
3770 Add localized strings stubs for WebKit2.
3772 Gets us below 200 tests failing in WebKitTestRunner.
3774 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3775 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3777 2010-07-22 Andras Becsi <abecsi@webkit.org>
3779 Unreviewed trivial build fix.
3781 [Qt] Mend remaining issues to fix the WebKit2 build.
3783 * Shared/qt/UpdateChunk.h: add missing function
3784 (WebKit::UpdateChunk::isEmpty):
3785 * UIProcess/API/qt/qwkpage_p.h: Add stub implementation
3786 (QWKPagePrivate::pageDidEnterAcceleratedCompositing):
3787 (QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
3789 2010-07-22 Andras Becsi <abecsi@webkit.org>
3791 Reviewed by Antonio Gomes.
3793 [Qt] Implement WebContext::applicationCacheDirectory() for the Qt port of WebKit2.
3794 https://bugs.webkit.org/show_bug.cgi?id=42830
3796 * UIProcess/qt/WebContextQt.cpp: Added.
3797 (WebKit::WebContext::applicationCacheDirectory):
3799 2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
3801 Unreviewed build fix.
3803 [Qt] Fix WebKit2 build
3805 https://bugs.webkit.org/show_bug.cgi?id=42638
3807 * UIProcess/API/qt/qwkpage_p.h:
3808 (QWKPagePrivate::setCursor): Added empty implementation.
3810 2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
3812 Reviewed by Antonio Gomes.
3814 Lazy cursor creation should be guarded by #if USE(LAZY_NATIVE_CURSOR) in WebKit2
3816 https://bugs.webkit.org/show_bug.cgi?id=42622
3818 * Shared/WebCoreArgumentCoders.h:
3819 * UIProcess/WebPageProxy.cpp:
3820 (WebKit::WebPageProxy::didReceiveMessage):
3821 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3822 (WebKit::WebChromeClient::setCursor):
3824 2010-07-22 Jon Honeycutt <jhoneycutt@apple.com>
3826 Build fix. Unreviewed.
3828 * win/WebKit2WebProcess.vcproj:
3829 Remove the pre- and post-build events, so that they will use the value
3830 inherited from the vsprops.
3832 2010-07-21 Darin Adler <darin@apple.com>
3834 Reviewed by Sam Weinig.
3836 WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
3837 https://bugs.webkit.org/show_bug.cgi?id=42548
3839 Added WKBundleFrameCopyName.
3841 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3842 (WKBundleFrameCopyName): Added.
3843 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
3845 * WebProcess/WebPage/WebFrame.cpp:
3846 (WebKit::WebFrame::name): Added.
3847 * WebProcess/WebPage/WebFrame.h: Ditto.
3849 2010-07-21 Darin Adler <darin@apple.com>
3851 Reviewed by Sam Weinig.
3853 WebKitTestRunner needs to support dumping of scroll position
3854 https://bugs.webkit.org/show_bug.cgi?id=42514
3856 Added WKBundleFrameGetJavaScriptContext function.
3858 * WebKit2.xcodeproj: Added property svn:ignore.
3860 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3861 (WKBundleFrameGetJavaScriptContext): Added.
3862 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
3864 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3865 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3866 (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
3867 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3868 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3869 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
3870 Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
3872 2010-07-21 Adam Roben <aroben@apple.com>
3874 Handle broken pipes in more places in CoreIPC
3876 Fixes <http://webkit.org/b/42784> Assertion failure in
3877 Connection::readEventHandler when WebKitTestRunner exits
3879 Reviewed by Anders Carlsson.
3881 * Platform/CoreIPC/win/ConnectionWin.cpp:
3882 (CoreIPC::Connection::readEventHandler): Check for a broken pipe
3883 whenever we call ::PeekNamedPipe.
3885 2010-07-21 Adam Roben <aroben@apple.com>
3887 Teach CoreIPC how to handle messages that are larger than the pipe's
3890 ::GetOverlappedResult and ::ReadFile can fail with ERROR_MORE_DATA
3891 when there is more data available on the pipe than was requested in
3892 the read operation. In those cases, the appropriate response is to
3893 perform another read operation to read the extra data. We now do this.
3895 Also, MSDN says that, because we are doing asynchronous read
3896 operations, we should not pass a pointer to ::ReadFile to find out how
3897 many bytes were read. Instead we should always call
3898 ::GetOverlappedResult to find this out. I've changed
3899 Connection::readEventHandler to have a single loop that calls
3900 ::GetOverlappedResult and ::ReadFile in alternation, rather than
3901 sometimes calling ::ReadFile multiple times in a row, to satisfy this
3904 In order to simplify the logic in this function, I've made us request
3905 only a single byte from the pipe when there are no messages already in
3906 the pipe. (Previously we were requesting 4096 bytes in this case.)
3907 This allows us not to have to consider the case where the received
3908 message is smaller than our read buffer. If we decide that this has a
3909 negative impact on performance, we can of course change it. I've
3910 mitigated this somewhat by using ::PeekNamedMessage to find out the
3911 size of the next message in the pipe (if any), so that we can read it
3912 all in one read operation.
3914 Fixes <http://webkit.org/b/42710> <rdar://problem/8197571> Assertion
3915 in Connection::readEventHandler when launching WebKitTestRunner
3917 Reviewed by Anders Carlsson.
3919 * Platform/CoreIPC/win/ConnectionWin.cpp:
3920 (CoreIPC::Connection::readEventHandler): Put the call to
3921 ::GetOverlappedResult in the same loop as ::ReadFile so that we will
3922 call them alternately. If ::GetOverlappedResult fails with
3923 ERROR_MORE_DATA, use ::PeekNamedPipe to determine the size of the rest
3924 of the message, then read it from the pipe. After dispatching the
3925 message, use ::PeekNamedPipe to find out the size of the next message
3926 in the pipe so we can read it all in one operation. If there's no
3927 message in the pipe, we'll request just a single byte of the next
3928 message that becomes available, and Windows will tell us when the rest
3929 of the message is ready. If ::ReadFile fails with ERROR_MORE_DATA it
3930 means there is data available now even though we didn't think there
3931 was any. We go back to the top of the loop in this case and call
3932 ::GetOverlappedResult again to retrieve the available data.
3934 2010-07-21 Sam Weinig <sam@webkit.org>
3936 Reviewed by Anders Carlsson.
3938 Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
3939 WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
3941 - Convert injected bundle UIClient functions to will-style, at least until we establish
3942 more concrete use cases for them past the TestRunner.
3944 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3945 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3946 (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
3947 (WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
3948 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
3949 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
3950 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
3951 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3952 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3953 (WebKit::WebChromeClient::addMessageToConsole):
3954 (WebKit::WebChromeClient::runJavaScriptAlert):
3955 (WebKit::WebChromeClient::runJavaScriptConfirm):
3956 (WebKit::WebChromeClient::runJavaScriptPrompt):
3957 (WebKit::WebChromeClient::setStatusbarText):
3959 2010-07-21 Simon Fraser <simon.fraser@apple.com>
3963 Need to supply implementations of PageClient::pageDidEnterAcceleratedCompositing()
3964 and pageDidLeaveAcceleratedCompositing() for WebView on Windows.
3966 * UIProcess/win/WebView.cpp:
3967 (WebKit::WebView::pageDidEnterAcceleratedCompositing):
3968 (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
3969 * UIProcess/win/WebView.h:
3971 2010-07-21 Anders Carlsson <andersca@apple.com>
3973 Reviewed by Sam Weinig.
3975 Don't assert when clicking on a plug-in in WebKit2
3976 https://bugs.webkit.org/show_bug.cgi?id=42762
3978 Add stub for PluginView::handleEvent.
3980 * WebProcess/Plugins/PluginView.cpp:
3981 (WebKit::PluginView::handleEvent):
3982 * WebProcess/Plugins/PluginView.h:
3984 2010-07-21 Simon Fraser <simon.fraser@apple.com>
3986 Reviewed by Anders Carlsson.
3988 Get accelerated compositing working with webkit2
3989 https://bugs.webkit.org/show_bug.cgi?id=41084
3991 Hook up dynamic DrawingArea switching, so that when the WebProcess hits a page
3992 that requires accelerated compositing, we switch to the LayerBackedDrawingArea.
3994 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
3995 (DrawingAreaProxyMessage::):
3996 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
3997 (WebPageProxyMessage::):
3998 * UIProcess/API/mac/PageClientImpl.h:
3999 * UIProcess/API/mac/PageClientImpl.mm:
4000 (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
4001 (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
4002 * UIProcess/API/mac/WKView.mm:
4003 (-[WKView _startAcceleratedCompositing:]):
4004 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaProxy::]):
4005 (-[WKView _pageDidEnterAcceleratedCompositing]):
4006 (-[WKView _pageDidLeaveAcceleratedCompositing]):
4007 * UIProcess/API/mac/WKViewInternal.h:
4008 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
4009 (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage):
4010 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
4011 * UIProcess/DrawingAreaProxy.h:
4012 (WebKit::DrawingAreaProxy::):
4013 (WebKit::DrawingAreaProxy::type):
4014 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
4015 (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
4016 (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
4017 (WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
4018 * UIProcess/LayerBackedDrawingAreaProxy.h:
4019 * UIProcess/PageClient.h:
4020 * UIProcess/WebPageProxy.cpp:
4021 (WebKit::WebPageProxy::setDrawingArea):
4022 (WebKit::WebPageProxy::didReceiveSyncMessage):
4023 (WebKit::WebPageProxy::didEnterAcceleratedCompositing):
4024 (WebKit::WebPageProxy::didLeaveAcceleratedCompositing):
4025 * UIProcess/WebPageProxy.h:
4026 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
4027 (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
4028 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4029 (WebKit::WebChromeClient::attachRootGraphicsLayer):
4030 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
4031 (WebKit::ChunkedUpdateDrawingArea::attachCompositingContext):
4032 (WebKit::ChunkedUpdateDrawingArea::setRootCompositingLayer):
4033 * WebProcess/WebPage/DrawingArea.cpp:
4034 (WebKit::DrawingArea::create):
4035 * WebProcess/WebPage/DrawingArea.h:
4036 (WebKit::DrawingArea::):
4037 (WebKit::DrawingArea::type):
4038 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
4039 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
4040 (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
4041 (WebKit::LayerBackedDrawingArea::setSize):
4042 (WebKit::LayerBackedDrawingArea::didUpdate):
4043 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
4044 * WebProcess/WebPage/LayerBackedDrawingArea.h:
4045 * WebProcess/WebPage/WebPage.cpp:
4046 (WebKit::WebPage::changeAcceleratedCompositingMode):
4047 (WebKit::WebPage::enterAcceleratedCompositingMode):
4048 (WebKit::WebPage::exitAcceleratedCompositingMode):
4049 * WebProcess/WebPage/WebPage.h:
4050 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
4051 (WebKit::LayerBackedDrawingArea::platformInit):
4052 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
4053 (WebKit::LayerBackedDrawingArea::detachCompositingContext):
4054 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
4056 2010-07-20 Steve Falkenburg <sfalken@apple.com>
4058 Reviewed by Adam Roben.
4060 WebKit on Windows should build optionally with an unversioned ICU DLL
4061 https://bugs.webkit.org/show_bug.cgi?id=42722
4062 <rdar://problem/8211767> WebKit needs to link against unversioned ICU
4064 To get the proper value for U_DISABLE_RENAMING into all source files, we force
4065 the include of ICUVersion.h (our generated header) via the compiler options.
4067 Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
4068 we copy the ICU lib to an intermediate location under obj with a common name. This
4069 allows us to link properly with either without adding a new build configuration.
4071 * win/WebKit2Common.vsprops:
4072 Copy ICU libs into a common location with a common name.
4073 Add additional library search path to pick up icu lib.
4074 Change ICU library filename specified to linker.
4075 Add forced include of ICUVersion.h.
4077 2010-07-21 Adam Roben <aroben@apple.com>
4081 * Shared/win/UpdateChunk.h:
4082 (WebKit::UpdateChunk::isEmpty): Added to match the Mac definition.
4084 2010-07-21 Anders Carlsson <andersca@apple.com>
4086 Land file I forgot to add.
4088 * WebProcess/com.apple.WebProcess.sb: Added.
4090 2010-07-21 Adam Roben <aroben@apple.com>
4092 Move WebKit2WebProcess's settings to a vsprops file
4094 Fixes <http://webkit.org/b/42751> WebKit2WebProcess should use vsprops
4097 Reviewed by Darin Adler.
4099 * win/WebKit2WebProcess.vcproj: Moved settings from here...
4100 * win/WebKit2WebProcessCommon.vsprops: ...to here.
4102 2010-07-20 Ivan Krstić <ike@apple.com>
4104 Reviewed and tweaked by Anders Carlsson and Sam Weinig.
4106 Put WebProcess in a sandbox. All of the following changes are
4108 <rdar://problem/7865269>
4110 * UIProcess/WebProcessProxy.cpp:
4111 (WebKit::WebProcessProxy::WebProcessProxy):
4112 Send Sandbox extension for injected bundle to WebProcess.
4114 * WebKit2.xcodeproj/project.pbxproj:
4115 Add Sandbox profile to Resources for WebProcess.
4117 * WebProcess/InjectedBundle/InjectedBundle.h:
4118 New function InjectedBundle::setSandboxToken.
4120 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
4121 (WebKit::InjectedBundle::load):
4122 Consume Sandbox token for the bundle if present.
4124 (WebKit::InjectedBundle::setSandboxToken):
4125 Set Sandbox token for the bundle.
4127 * WebProcess/WebProcess.cpp:
4128 (WebKit::WebProcess::loadInjectedBundle):
4129 Extra function parameter for Sandbox token.
4131 (WebKit::WebProcess::didReceiveMessage):
4132 Pass Sandbox token to loadInjectedBundle().
4134 * WebProcess/WebProcess.h:
4135 Extra function parameter for Sandbox token in loadInjectedBundle().
4137 * WebProcess/com.apple.WebProcess.sb: Added.
4138 Sandbox profile for WebProcess.
4140 * WebProcess/mac/WebProcessMainMac.mm:
4141 (WebKit::WebProcessMain):
4142 Initialize Sandbox, exit on failure.
4144 2010-07-20 Sam Weinig <sam@webkit.org>
4146 Reviewed by Brady Eidson.
4148 Patch for https://bugs.webkit.org/show_bug.cgi?id=42719
4149 Make Acid2 pass in WebKit2
4151 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4152 (WebKit::WebFrameLoaderClient::objectContentType): Check for supported image mimetypes
4153 before falling back to plugins.
4155 2010-07-20 Adam Roben <aroben@apple.com>
4159 WebKit.sln builds all the same projects.
4161 Rubber-stamped in advance by Steve Falkenburg.
4163 * WebKit2.sln: Removed.
4165 2010-07-20 Adam Roben <aroben@apple.com>
4167 Make the web process break into the debugger when Ctrl-Alt-Shift is
4170 Fixes <http://webkit.org/b/42670> Would like a way to break into the
4171 debugger when the web process launches
4173 Reviewed by Anders Carlsson.
4175 * WebProcess/WebKitMain.cpp:
4176 (WebKitMain): If the Control, Alt, and Shift keys are held down in a
4177 Debug build, call DebugBreak() so that we will break into the
4180 2010-07-20 Adam Roben <aroben@apple.com>
4182 Teach Connection how to handle a slow receiver
4184 Fixes <http://webkit.org/b/42667> Assertion in
4185 Connection::sendOutgoingMessage when browser or web process is paused
4187 Reviewed by Anders Carlsson.
4189 * Platform/CoreIPC/win/ConnectionWin.cpp:
4190 (CoreIPC::Connection::sendOutgoingMessage): If WriteFile returns FALSE
4191 and the last error is ERROR_IO_PENDING, Windows will write the data as
4192 soon as the current write operation is completed. We don't need to do
4193 anything special in this case, so there's no need to assert about it.
4195 2010-07-20 Anders Carlsson <andersca@apple.com>
4197 Reviewed by Dan Bernstein.
4199 Handle WKView visibility changes
4200 <rdar://problem/7891077>
4202 * Shared/mac/UpdateChunk.h:
4203 (WebKit::UpdateChunk::isEmpty):
4204 Add convenience getter.
4206 * UIProcess/API/mac/WKView.mm:
4207 (-[WKView viewDidMoveToWindow]):
4208 Reorder the calls to _updateActiveState and _updateVisibility based on whether the view is moved to
4209 a window or away from a window.
4211 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
4212 (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
4213 Initialize m_forceRepaintWhenResumingPainting to false.
4215 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
4216 Pass the m_forceRepaintWhenResumingPainting along to the DrawingAreaMessage::ResumePainting message.
4218 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
4219 Don't try to paint empty update chunks.
4221 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
4222 Don't paint the update chunk if we're not visible. Instead, make sure that the entire page is being redrawn
4223 when its shown again.
4225 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
4226 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
4227 (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
4228 (WebKit::ChunkedUpdateDrawingArea::display):
4229 (WebKit::ChunkedUpdateDrawingArea::suspendPainting):
4230 Rename m_shouldPaint to m_isPaintingSuspended and invert its logic.
4232 (WebKit::ChunkedUpdateDrawingArea::scheduleDisplay):
4233 Don't schedule a display timer if the dirty rect is empty.
4235 (WebKit::ChunkedUpdateDrawingArea::setSize):
4236 If painting is suspended, just send back an empty update chunk in the DidSetSize message.
4238 (WebKit::ChunkedUpdateDrawingArea::resumePainting):
4239 If forceRepaint is true, repaint the entire drawing area.
4241 2010-07-20 Anders Carlsson <andersca@apple.com>
4243 Reviewed by Dan Bernstein.
4245 Implement NPN_GetURL and NPN_PostURL
4246 https://bugs.webkit.org/show_bug.cgi?id=42650
4248 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
4249 (WebKit::parsePostBuffer):
4250 Add a FIXME about deleting the file.
4252 (WebKit::makeURLString):
4253 Move this static method before NPN_GetURL.
4255 (WebKit::NPN_GetURL):
4256 Call NetscapePLugin::LoadURL.
4258 (WebKit::NPN_PostURL):
4261 (WebKit::NPN_PostURLNotify):
4262 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
4263 Remove unreached code.
4265 (WebKit::NetscapePluginStream::deliverDataToPlugin):
4266 Stop the stream if the plug-in returns -1 from NPP_Write.
4268 2010-07-19 Anders Carlsson <andersca@apple.com>
4270 Reviewed by Sam Weinig.
4272 WebKitTestRunner and WebProcess simultaneously stall in CoreIPC::Connection::sendOutgoingMessage
4273 https://bugs.webkit.org/show_bug.cgi?id=42356
4275 Up the port queue length from 5 to 1024. While this does solve the problem, we should still try to
4276 make sendOutgoingMessage not block. I've filed https://bugs.webkit.org/show_bug.cgi?id=42611 to track
4277 doing this on Mac and Windows.
4279 * Platform/CoreIPC/mac/ConnectionMac.cpp:
4280 (CoreIPC::Connection::open):
4281 Call setMachPortQueueLength.
4283 * Platform/mac/MachUtilities.cpp: Added.
4284 (setMachPortQueueLength):
4285 Given a mach port receive right, sets the port queue length.
4287 * Platform/mac/MachUtilities.h: Added.
4289 * WebKit2.xcodeproj/project.pbxproj:
4290 Add MachUtilities.cpp and MachUtilities.h
4292 2010-07-19 Anders Carlsson <andersca@apple.com>
4294 Reviewed by Darin Adler, Adam Roben, Dan Bernstein and Sam Weinig.
4296 Handle NP_ASFILE and NP_ASFILEONLY transfer modes
4297 https://bugs.webkit.org/show_bug.cgi?id=42587
4299 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
4300 (WebKit::NetscapePlugin::NPP_StreamAsFile):
4301 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
4304 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
4305 (WebKit::NetscapePluginStream::NetscapePluginStream):
4306 Initialize m_fileHandle.
4308 (WebKit::isSupportedTransferMode):
4309 NP_ASFILE and NP_ASFILEONLY is now supported.
4311 (WebKit::NetscapePluginStream::deliverData):
4312 Call deliverDataToFile if necessary.
4314 (WebKit::NetscapePluginStream::deliverDataToFile):
4315 Create a temporary file and write the data into it.
4317 (WebKit::NetscapePluginStream::stop):
4318 If the transfer mode is either NP_ASFILE or NP_ASFILEONLY, make sure to
4319 call NPP_StreamAsFile and close the file and delete it.
4321 * WebProcess/Plugins/PluginView.cpp:
4322 (WebKit::PluginView::cancelStreamLoad):
4323 Keep a reference to the Stream since cancelling it will remove it from the map.
4325 2010-07-19 Anders Carlsson <andersca@apple.com>
4327 Reviewed by Sam Weinig.
4329 Implement NPN_PostURLNotify
4330 https://bugs.webkit.org/show_bug.cgi?id=42602
4332 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
4333 (WebKit::parsePostBuffer):
4334 Read the buffer from a file if necessary and parse it.
4336 (WebKit::NPN_GetURLNotify):
4337 Add extra arguments.
4339 (WebKit::NPN_PostURLNotify):
4340 Parse the post buffer, then call NetscapePlugin::loadURL.
4342 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
4343 (WebKit::NetscapePlugin::loadURL):
4344 Pass the method, the header fields and form data along.
4346 (WebKit::NetscapePlugin::allowPopups):
4347 Just return false for now.
4349 (WebKit::NetscapePlugin::initialize):