1 2010-12-27 Sam Weinig <sam@webkit.org>
3 Reviewed by Anders Carlsson.
5 WebKit2 snapshots should contain accelerated content
6 <rdar://problem/8807393>
7 https://bugs.webkit.org/show_bug.cgi?id=51660
9 When creating a snapshot, flatten the layer tree for painting so that
10 accelerated content is included in the snapshot.
12 * WebProcess/WebPage/WebPage.cpp:
13 (WebKit::WebPage::snapshotInViewCoordinates):
14 (WebKit::WebPage::snapshotInDocumentCoordinates):
16 2010-12-27 Daniel Bates <dbates@rim.com>
18 Attempt to fix the WebKit2 Windows build after changeset 74698
19 <http://trac.webkit.org/changeset/74698> (bug #51656).
21 Add "..\Shared\API\c\WKImage.h" to WebKit2Generated.make.
23 * win/WebKit2Generated.make:
25 2010-12-27 Sam Weinig <sam@webkit.org>
27 Reviewed by Anders Carlsson.
29 WebKit2: Add API for getting snapshots
30 https://bugs.webkit.org/show_bug.cgi?id=51656
32 * Shared/API/c/WKBase.h:
33 * Shared/API/c/WKImage.cpp: Added.
37 * Shared/API/c/WKImage.h: Added.
38 * Shared/WebImage.cpp: Added.
39 (WebKit::WebImage::create):
40 (WebKit::WebImage::size):
41 * Shared/WebImage.h: Added.
42 (WebKit::WebImage::backingStore):
43 (WebKit::WebImage::WebImage):
44 (WebKit::WebImage::type):
45 Add a general purpose API image class.
47 * Shared/API/c/cg: Added.
48 * Shared/API/c/cg/WKImageCG.cpp: Added.
49 (WKImageCreateCGImage):
50 * Shared/API/c/cg/WKImageCG.h: Added.
51 Add function to convert a WKImageRef to a CGImageRef for platforms that use CG.
53 * Shared/API/c/WKSharedAPICast.h:
54 (WebKit::toFloatRect):
58 (WebKit::toImageOptions):
59 Make conversion functions that are ambiguous more explicit.
62 * Shared/BackingStore.h:
63 (WebKit::BackingStore::isBackedBySharedMemory):
64 * Shared/ImageOptions.h: Added.
65 * Shared/UserMessageCoders.h:
66 (WebKit::UserMessageEncoder::baseEncode):
67 (WebKit::UserMessageDecoder::baseDecode):
68 Allow a WKImageRef to be passed in user messages. Right now, it only
69 works if the image is sharable.
71 * UIProcess/API/C/WKPage.cpp:
73 * UIProcess/WebUIClient.cpp:
74 (WebKit::WebUIClient::windowFrame):
75 Use the more explicit conversion function name.
77 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
78 (WKBundlePageCreateSnapshotInViewCoordinates):
79 (WKBundlePageCreateSnapshotInDocumentCoordinates):
80 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
81 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
82 (WKBundlePageOverlaySetNeedsDisplay):
83 * WebProcess/WebPage/WebPage.cpp:
84 (WebKit::WebPage::snapshotInViewCoordinates):
85 (WebKit::WebPage::snapshotInDocumentCoordinates):
86 Add function to take the snapshot.
88 * WebProcess/WebPage/WebPage.h:
90 * WebKit2.xcodeproj/project.pbxproj:
94 2010-12-27 Sam Weinig <sam@webkit.org>
96 Reviewed by Anders Carlsson.
98 WebKit2: Add additional API for managing databases
99 https://bugs.webkit.org/show_bug.cgi?id=51629
101 - Adds client for the database manager to get notifications
102 of changes to databases.
104 * UIProcess/API/C/WKDatabaseManager.cpp:
105 (WKDatabaseManagerSetClient):
106 * UIProcess/API/C/WKDatabaseManager.h:
107 * UIProcess/WebDatabaseManagerProxy.cpp:
108 (WebKit::WebDatabaseManagerProxy::initializeClient):
109 (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
110 (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
111 * UIProcess/WebDatabaseManagerProxy.h:
112 * UIProcess/WebDatabaseManagerProxy.messages.in:
113 * UIProcess/WebDatabaseManagerProxyClient.cpp: Added.
114 (WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
115 (WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
116 * UIProcess/WebDatabaseManagerProxyClient.h: Added.
118 * WebKit2.xcodeproj/project.pbxproj:
119 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
120 (WebKit::WebDatabaseManager::WebDatabaseManager):
121 (WebKit::WebDatabaseManager::~WebDatabaseManager):
122 (WebKit::WebDatabaseManager::dispatchDidModifyOrigin):
123 (WebKit::WebDatabaseManager::dispatchDidModifyDatabase):
124 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
125 * win/WebKit2.vcproj:
127 2010-12-27 Sam Weinig <sam@webkit.org>
129 Reviewed by Anders Carlsson.
131 WebKit2: Add additional API for managing databases
132 https://bugs.webkit.org/show_bug.cgi?id=51629
134 - Adds WKDatabaseManagerGetDatabasesByOrigin, which asynchronously returns
135 an array of dictionaries containing details about each origin using
136 databases and details about each database. Keys were added for accessing
137 the data in the dictionaries.
138 - Adds WKDatabaseManagerDeleteDatabasesWithNameForOrigin to delete a database
139 with a specific identifier.
140 - Adds WKDatabaseManagerSetQuotaForOrigin to set the quota for an origin.
142 * Shared/OriginAndDatabases.cpp: Added.
143 (WebKit::OriginAndDatabases::encode):
144 (WebKit::OriginAndDatabases::decode):
145 * Shared/OriginAndDatabases.h: Added.
146 * Shared/WebCoreArgumentCoders.h:
147 * UIProcess/API/C/WKDatabaseManager.cpp:
148 (WKDatabaseManagerGetOriginKey):
149 (WKDatabaseManagerGetOriginQuotaKey):
150 (WKDatabaseManagerGetOriginUsageKey):
151 (WKDatabaseManagerGetDatabaseDetailsKey):
152 (WKDatabaseManagerGetDatabaseDetailsNameKey):
153 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
154 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
155 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
156 (WKDatabaseManagerGetDatabasesByOrigin):
157 (callGetDatabasesByOriginBlockAndDispose):
158 (WKDatabaseManagerGetDatabasesByOrigin_b):
159 (WKDatabaseManagerGetDatabaseOrigins):
160 (callGetDatabaseOriginsBlockBlockAndDispose):
161 (WKDatabaseManagerGetDatabaseOrigins_b):
162 (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
163 (WKDatabaseManagerDeleteDatabasesForOrigin):
164 (WKDatabaseManagerDeleteAllDatabases):
165 (WKDatabaseManagerSetQuotaForOrigin):
166 * UIProcess/API/C/WKDatabaseManager.h:
167 * UIProcess/WebDatabaseManagerProxy.cpp:
168 (WebKit::WebDatabaseManagerProxy::originKey):
169 (WebKit::WebDatabaseManagerProxy::originQuotaKey):
170 (WebKit::WebDatabaseManagerProxy::originUsageKey):
171 (WebKit::WebDatabaseManagerProxy::databaseDetailsKey):
172 (WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey):
173 (WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey):
174 (WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey):
175 (WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey):
176 (WebKit::WebDatabaseManagerProxy::invalidate):
177 (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
178 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
179 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
180 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
181 (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
182 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
183 (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
184 * UIProcess/WebDatabaseManagerProxy.h:
185 * UIProcess/WebDatabaseManagerProxy.messages.in:
187 * WebKit2.xcodeproj/project.pbxproj:
188 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
189 (WebKit::WebDatabaseManager::getDatabasesByOrigin):
190 (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
191 (WebKit::WebDatabaseManager::setQuotaForOrigin):
192 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
193 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
194 * win/WebKit2.vcproj:
196 2010-12-26 Anders Carlsson <andersca@apple.com>
198 Reviewed by Dan Bernstein.
200 Rename DrawingAreaMessage and DrawingAreaLegacyMessage and
201 DrawingAreaProxyMessage to DrawingAreaProxyLegacyMessage.
203 * Platform/CoreIPC/MessageID.h:
204 * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
205 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
206 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
207 (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
208 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
209 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
210 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
211 (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
212 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
213 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
214 (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
215 (WebKit::LayerBackedDrawingAreaProxy::update):
216 (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
217 (WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
218 * UIProcess/TiledDrawingAreaProxy.cpp:
219 (WebKit::TiledDrawingAreaProxy::sizeDidChange):
220 (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
221 (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
222 (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
223 (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
224 (WebKit::TiledDrawingAreaProxy::takeSnapshot):
225 (WebKit::TiledDrawingAreaProxy::removeTile):
226 * UIProcess/WebPageProxy.cpp:
227 (WebKit::WebPageProxy::didReceiveMessage):
228 (WebKit::WebPageProxy::didReceiveSyncMessage):
229 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
230 (WebKit::ChunkedUpdateDrawingArea::display):
231 (WebKit::ChunkedUpdateDrawingArea::setSize):
232 (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
233 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
234 (WebKit::LayerBackedDrawingArea::setSize):
235 (WebKit::LayerBackedDrawingArea::didReceiveMessage):
236 * WebProcess/WebPage/TiledDrawingArea.cpp:
237 (WebKit::TiledDrawingArea::display):
238 (WebKit::TiledDrawingArea::setSize):
239 (WebKit::TiledDrawingArea::updateTile):
240 (WebKit::TiledDrawingArea::tileUpdateTimerFired):
241 (WebKit::TiledDrawingArea::didReceiveMessage):
242 * WebProcess/WebPage/WebPage.cpp:
243 (WebKit::WebPage::didReceiveMessage):
244 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
245 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
247 2010-12-26 Anders Carlsson <andersca@apple.com>
249 Reviewed by Sam Weinig.
251 Drawing area cleanup. Remove a bunch of redundant functions that just ended
252 up calling setNeedsDisplay.
254 * UIProcess/DrawingAreaProxy.h:
255 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
256 (WebKit::WebChromeClient::invalidateWindow):
257 (WebKit::WebChromeClient::invalidateContentsAndWindow):
258 (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
259 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
260 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
261 * WebProcess/WebPage/DrawingArea.h:
262 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
263 * WebProcess/WebPage/LayerBackedDrawingArea.h:
264 * WebProcess/WebPage/TiledDrawingArea.cpp:
265 * WebProcess/WebPage/TiledDrawingArea.h:
267 2010-12-25 Sam Weinig <sam@webkit.org>
269 Reviewed by Dan Bernstein.
271 Fill in some more preferences for WebKit2
272 https://bugs.webkit.org/show_bug.cgi?id=51610
274 * Shared/WebPreferencesStore.h:
275 * UIProcess/API/C/WKPreferences.cpp:
276 (WKPreferencesSetAuthorAndUserStylesEnabled):
277 (WKPreferencesGetAuthorAndUserStylesEnabled):
278 (WKPreferencesSetWebArchiveDebugModeEnabled):
279 (WKPreferencesGetWebArchiveDebugModeEnabled):
280 (WKPreferencesSetLocalFileContentSniffingEnabled):
281 (WKPreferencesGetLocalFileContentSniffingEnabled):
282 (WKPreferencesSetPageCacheEnabled):
283 (WKPreferencesGetPageCacheEnabled):
284 (WKPreferencesSetPaginateDuringLayoutEnabled):
285 (WKPreferencesGetPaginateDuringLayoutEnabled):
286 (WKPreferencesSetDOMPasteAllowedEnabled):
287 (WKPreferencesGetDOMPasteAllowedEnabled):
288 * UIProcess/API/C/WKPreferences.h:
289 * UIProcess/API/C/WKPreferencesPrivate.h:
290 * WebProcess/WebPage/WebPage.cpp:
291 (WebKit::WebPage::updatePreferences):
292 Pipe through some more preferences.
294 2010-12-24 Dan Bernstein <mitz@apple.com>
296 Reviewed by Alexey Proskuryakov.
298 REGRESSION (r74648): XHR layout test failures
299 https://bugs.webkit.org/show_bug.cgi?id=51603
303 * UIProcess/WebPageProxy.cpp:
304 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
305 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
306 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
307 * WebProcess/mac/WebProcessMainMac.mm:
308 (WebKit::WebProcessMain):
310 2010-12-24 Simon Fraser <simon.fraser@apple.com>
312 Fix the Qt build after r74650.
314 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
316 2010-12-24 Benjamin Poulain <ikipou@gmail.com>
318 Reviewed by Darin Adler.
320 [Qt] [WK2] WebKit 2 does not build on mac, missing reference to RetainPtr
321 https://bugs.webkit.org/show_bug.cgi?id=51598
323 Fix the build, add the missing header.
325 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
327 2010-12-24 Dan Bernstein <mitz@apple.com>
329 Reviewed by Anders Carlsson.
331 <rdar://problem/8758386> The web process uses its own credential storage
332 https://bugs.webkit.org/show_bug.cgi?id=51599
334 * UIProcess/WebPageProxy.cpp:
335 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Try to answer the challenge using
336 the UI process’s credential storage first.
337 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
338 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Prevent the web process from using
339 its own credential storage.
340 * WebProcess/mac/WebProcessMainMac.mm:
341 (WebKit::WebProcessMain): Ditto.
343 2010-12-23 Dan Bernstein <mitz@apple.com>
345 Reviewed by Sam Weinig.
347 Make dragging work again after r74591.
349 * UIProcess/WebPageProxy.cpp:
350 (WebKit::WebPageProxy::didReceiveEvent): Fixed a typo.
352 2010-12-23 Jessie Berlin <jberlin@apple.com>
354 Reviewed by Sam Weinig.
356 Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
357 https://bugs.webkit.org/show_bug.cgi?id=51563
359 Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).
361 * Shared/API/c/WKSecurityOrigin.cpp:
362 (WKSecurityOriginCreateFromIdentifier):
363 Renamed so as not to clash with the new WKSecurityOriginCreate.
364 (WKSecurityOriginCreate):
365 * Shared/API/c/WKSecurityOrigin.h:
366 * Shared/WebSecurityOrigin.h:
367 (WebKit::WebSecurityOrigin::create):
369 2010-12-23 Anders Carlsson <andersca@apple.com>
371 Reviewed by Simon Fraser.
373 Ensure that we are not getting too many mouse move events
374 https://bugs.webkit.org/show_bug.cgi?id=51568
375 <rdar://problem/7881470>
376 <rdar://problem/8735512>
378 Implement throttling of mouse move events.
380 * UIProcess/WebPageProxy.cpp:
381 (WebKit::WebPageProxy::WebPageProxy):
382 Initialize m_processingMouseMoveEvent to false.
384 (WebKit::WebPageProxy::handleMouseEvent):
385 If we're already processing a mouse move events, just update
386 m_nextMouseMoveEvent and return.
388 (WebKit::WebPageProxy::didReceiveEvent):
389 If we received a mouse move event, send the next mouse move event if there is one.
391 2010-12-23 Brian Weinstein <bweinstein@apple.com>
393 Reviewed by Anders Carlsson.
395 Assertion when loading www.yahoo.com in WebKit2 under decodeResourceRequest
396 https://bugs.webkit.org/show_bug.cgi?id=51562
398 Don't assert that our data reference isn't empty when we try to get the data from it.
399 If it is empty, just return 0.
401 All callers are safe with this function returning 0.
403 * Platform/CoreIPC/DataReference.h:
404 (CoreIPC::DataReference::data): Change the assert to an early return.
405 * Shared/cf/ArgumentCodersCF.cpp:
406 (CoreIPC::decode): Add an assert, and remove a ternarny operator because the function now does
407 this for us (if the data is empty, return 0).
409 2010-12-23 Sam Weinig <sam@webkit.org>
411 Fix incorrect assertion causing all pages with subframes to crash.
413 * UIProcess/WebFrameProxy.cpp:
414 (WebKit::WebFrameProxy::appendChild):
416 2010-12-23 Anders Carlsson <andersca@apple.com>
418 Reviewed by Darin Adler.
420 Clean up the selection handling code
421 https://bugs.webkit.org/show_bug.cgi?id=51550
423 * Shared/SelectionState.h: Added.
424 Add SelectionState class which hold information about the current selection.
426 * UIProcess/API/mac/PageClientImpl.h:
427 * UIProcess/API/mac/PageClientImpl.mm:
428 Remove selectionChanged function.
430 * UIProcess/API/mac/WKView.mm:
431 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
432 Remove all the selection related state; it lives in the WebPageProxy object now.
434 (-[WKView insertText:]):
435 (-[WKView selectedRange]):
436 (-[WKView hasMarkedText]):
437 Get the selection information from the WebPageProxy.
439 * UIProcess/API/mac/WKViewInternal.h:
440 Remove _selectionChanged declaration.
442 * UIProcess/PageClient.h:
443 Remove selectionChanged functions.
445 * UIProcess/WebPageProxy.cpp:
446 (WebKit::WebPageProxy::selectionStateChanged):
447 Update the selection state.
449 * UIProcess/WebPageProxy.h:
450 (WebKit::WebPageProxy::selectionState):
451 Return the selection state.
453 * UIProcess/WebPageProxy.messages.in:
454 Add SelectionStateChanged message.
456 * UIProcess/win/WebView.cpp:
457 (WebKit::WebView::WebView):
458 Remove all the selection related state; it lives in the WebPageProxy object now.
460 (WebKit::WebView::compositionSelectionChanged):
461 (WebKit::WebView::onIMEComposition):
462 (WebKit::WebView::onIMEEndComposition):
463 (WebKit::WebView::onIMERequestCharPosition):
464 (WebKit::WebView::onIMERequest):
465 Get the selection information from the WebPageProxy.
467 * WebKit2.xcodeproj/project.pbxproj:
470 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
471 (WebKit::WebEditorClient::respondToChangedSelection):
472 Send a SelectionStateChanged message with the updated state.
474 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
475 Remove mac specific code.
477 * WebProcess/WebPage/WebPage.cpp:
478 (WebKit::WebPage::getLocationAndLengthFromRange):
479 Rename this function from convertRangeToPlatformRange and move it out of WebPageMac.mm
481 * WebProcess/WebPage/mac/WebPageMac.mm:
482 (WebKit::WebPage::getMarkedRange):
483 (WebKit::WebPage::characterIndexForPoint):
484 Call getLocationAndLengthFromRange.
486 * win/WebKit2.vcproj:
489 2010-12-23 Darin Adler <darin@apple.com>
491 Reviewed by Sam Weinig.
493 WKView should not try to do asynchronous validation for selectors that are not editor commands
494 https://bugs.webkit.org/show_bug.cgi?id=51555
496 * UIProcess/API/mac/WKView.mm:
497 (-[WKView validateUserInterfaceItem:]): Removed the special case for startSpeaking.
498 Added call to commandIsSupportedFromMenuOrKeyBinding so we only try to do validation
499 for commands that are supported. Tweaked comments and added some bug numbers.
500 (-[WKView _setUserInterfaceItemState:enabled:state:]): Tweaked comment and added
503 2010-12-23 Sam Weinig <sam@webkit.org>
505 Reviewed by Anders Carlsson.
507 <rdar://problem/8799032>
508 REGRESSION(r74436) Crash opening many pages with WebKit2
510 * Shared/cf/ArgumentCodersCF.cpp:
512 Fix paste-o. Decode into a CFDataRef not a CFDictionaryRef
513 when decoding CFDataRefs.
515 2010-12-22 Sam Weinig <sam@webkit.org>
517 Reviewed by Darin Adler.
519 WebKit2 needs to mirror the frame tree in the UIProcess
520 https://bugs.webkit.org/show_bug.cgi?id=51546
522 * UIProcess/API/C/WKFrame.cpp:
523 (WKFrameCopyChildFrames):
524 * UIProcess/API/C/WKFrame.h:
525 Add API to get the child frames of a frame.
527 * UIProcess/WebFrameProxy.cpp:
528 (WebKit::WebFrameProxy::WebFrameProxy):
529 (WebKit::WebFrameProxy::disconnect):
530 (WebKit::WebFrameProxy::appendChild):
531 (WebKit::WebFrameProxy::removeChild):
532 (WebKit::WebFrameProxy::isDescendantOf):
533 (WebKit::WebFrameProxy::dumpFrameTree):
534 (WebKit::WebFrameProxy::didRemoveFromHierarchy):
535 (WebKit::WebFrameProxy::childFrames):
536 * UIProcess/WebFrameProxy.h:
537 (WebKit::WebFrameProxy::parentFrame): Add getter.
538 (WebKit::WebFrameProxy::nextSibling): Add getter.
539 (WebKit::WebFrameProxy::previousSibling): Add getter.
540 (WebKit::WebFrameProxy::firstChild): Add getter.
541 (WebKit::WebFrameProxy::lastChild): Add getter.
542 Make frames keep track of their subframes.
544 * UIProcess/WebPageProxy.cpp:
545 (WebKit::WebPageProxy::didCreateSubframe):
546 Use the now passed parentID to insert the frame into the hierarchy
548 (WebKit::WebPageProxy::didSaveFrameToPageCache):
549 When a frame is added to the page cache, remove it from the hierarchy.
551 (WebKit::WebPageProxy::didRestoreFrameFromPageCache):
552 When a frame is restored from the page cache, add it back to the hierarchy.
554 (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
555 Detached frames should also be removed from the hierarchy.
557 * UIProcess/WebPageProxy.h:
558 Add new declarations for didSaveFrameToPageCache and didRestoreFrameFromPageCache.
560 * UIProcess/WebPageProxy.messages.in:
561 Add messages for DidSaveFrameToPageCache and DidRestoreFrameFromPageCache.
563 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
564 (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
565 (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
566 Remove notImplemented, there is no work we need to do here.
568 (WebKit::WebFrameLoaderClient::didSaveToPageCache):
569 (WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
570 Send message to UIProcess to indicate this happened.
571 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
573 * WebProcess/WebPage/WebFrame.cpp:
574 (WebKit::WebFrame::createSubframe):
575 Send parent frameID in addition to our own in the message to UIProcess.
577 2010-12-23 Anders Carlsson <andersca@apple.com>
579 Reviewed by Sam Weinig.
581 New popup windows open disproportionately big
582 https://bugs.webkit.org/show_bug.cgi?id=51547
583 <rdar://problem/8637029>
585 * UIProcess/WebPageProxy.cpp:
586 (WebKit::WebPageProxy::createNewPage):
587 Pass the correct size back to the UI process.
589 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
590 (WebKit::WebChromeClient::pageRect):
591 Implement this and return the size of the page.
593 2010-12-23 Anders Carlsson <andersca@apple.com>
595 Reviewed by John Sullivan.
597 Nothing happens clicking "launch live player" on live.cnn.com
598 https://bugs.webkit.org/show_bug.cgi?id=51540
599 <rdar://problem/8791086>
601 Implement NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState.
603 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
604 (WebKit::NPN_PushPopupsEnabledState):
605 Call NetscapePlugin::pushPopupsEnabledState.
607 (WebKit::NPN_PopPopupsEnabledState):
608 Call NetscapePlugin::popPopupsEnabledState.
610 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
611 (WebKit::NetscapePlugin::pushPopupsEnabledState):
612 Append the boolean to the vector.
614 (WebKit::NetscapePlugin::popPopupsEnabledState):
615 Remove the last boolean from the vector.
617 (WebKit::NetscapePlugin::allowPopups):
618 Return the last boolean from the vector.
620 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
621 * WebProcess/Plugins/PluginView.cpp:
622 (WebKit::PluginView::performJavaScriptURLRequest):
623 Update the "allowPopupsFromPlugin" state.
625 2010-12-22 Anders Carlsson <andersca@apple.com>
627 Reviewed by Sam Weinig.
629 Webkit2: WebProcess crashes when Private browsing is turned on on yahoo.com
630 https://bugs.webkit.org/show_bug.cgi?id=51516
631 <rdar://problem/8766995>
633 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
634 (WebKit::NetscapePlugin::NPP_SetValue):
635 Add a null check for NPP_SetValue.
637 2010-12-22 Anders Carlsson <andersca@apple.com>
639 Reviewed by Sam Weinig.
641 REGRESSION (WK2): Plugins swallow CMD-W, CMD-Q, and probably other shortcuts
642 https://bugs.webkit.org/show_bug.cgi?id=51515
643 <rdar://problem/8740926>
645 Always return false for keyboard events where the command key is down.
647 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
648 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
650 2010-12-22 Sam Weinig <sam@webkit.org>
652 Reviewed by Darin Adler.
654 WebProcess should be terminated if invalid frameIDs are
655 passed to the UIProcess.
656 https://bugs.webkit.org/show_bug.cgi?id=51508
658 - Introduce a mechanism to mark a messages as invalid due to
659 reasons other than in ability to decode the message, eg. an
660 invalid frameID is passed in a message.
662 * Platform/CoreIPC/Connection.cpp:
663 (CoreIPC::Connection::Connection):
664 (CoreIPC::Connection::markCurrentlyDispatchedMessageAsInvalid): Sets
665 the m_didReceiveInvalidMessage bit so that it can be picked up in
666 (CoreIPC::Connection::dispatchMessages): Check for m_didReceiveInvalidMessage in
667 addition to tainted arguments.
668 * Platform/CoreIPC/Connection.h:
669 Add base macro for others to extend, that calls markCurrentlyDispatchedMessageAsInvalid()
670 ASSERTs, and returns.
672 * UIProcess/WebPageProxy.cpp:
673 Add Message checks for all WebFrameProxy's gotten from frameIDs passed
675 * UIProcess/WebProcessProxy.cpp:
676 (WebKit::isGoodMapKey):
677 Checks that the key can be inserted safely into a map (eg. not the empty or deleted value).
679 (WebKit::WebProcessProxy::webFrame):
680 Return null for bad keys (eg. 0 or -1).
682 (WebKit::WebProcessProxy::canCreateFrame):
683 Added. Checks that the ID is good and not in the map yet. Used
684 as a consistency check before creating frames.
686 (WebKit::WebProcessProxy::frameCreated):
687 ASSERT that the key is good, in addition to not in the map yet.
689 (WebKit::WebProcessProxy::didDestroyFrame):
690 ASSERT that the key is good.
692 * UIProcess/WebProcessProxy.h:
693 Move WebFrameProxy HashMap type into a typedef.
695 2010-12-22 Darin Adler <darin@apple.com>
697 Reviewed by Anders Carlsson.
699 WebKit2 needs a way to return the main resource data
700 https://bugs.webkit.org/show_bug.cgi?id=51510
702 * UIProcess/API/C/WKFrame.cpp:
703 (WKFrameGetMainResourceData): Added.
704 (callGetMainResourceDataBlockAndDispose): Added.
705 (WKFrameGetMainResourceData_b): Added.
706 * UIProcess/API/C/WKFrame.h: Added WKFrameGetMainResourceData.
708 * UIProcess/WebFrameProxy.cpp:
709 (WebKit::WebFrameProxy::getMainResourceData): Added.
710 * UIProcess/WebFrameProxy.h: Ditto.
712 * UIProcess/WebPageProxy.cpp:
713 (WebKit::WebPageProxy::getMainResourceDataOfFrame): Added.
714 (WebKit::WebPageProxy::dataCallback): Replaced the individual callbacks
716 (WebKit::WebPageProxy::stringCallback): Ditto.
717 * UIProcess/WebPageProxy.h: Ditto.
718 * UIProcess/WebPageProxy.messages.in: Ditto.
720 * WebProcess/WebPage/WebPage.cpp:
721 (WebKit::WebPage::runJavaScriptInMainFrame): Send the string callback
722 message instead of a specific one.
723 (WebKit::WebPage::getContentsAsString): Ditto.
724 (WebKit::WebPage::getRenderTreeExternalRepresentation): Ditto.
725 (WebKit::WebPage::getSelectionOrContentsAsString): Ditto.
726 (WebKit::WebPage::getSourceForFrame): Ditto.
727 (WebKit::WebPage::getMainResourceDataOfFrame): Added.
728 (WebKit::WebPage::getWebArchiveOfFrame): Send the data callback message
729 instead of a specific one.
730 * WebProcess/WebPage/WebPage.h: Added getMainResourceDataOfFrame.
731 * WebProcess/WebPage/WebPage.messages.in: Ditto.
733 2010-12-22 Darin Adler <darin@apple.com>
735 * WebProcess/WebPage/WebPage.cpp: Add #if to try to fix non-Mac builds.
737 2010-12-22 Darin Adler <darin@apple.com>
739 Reviewed by Anders Carlsson.
741 Make Speech menu items work in WebKit2
742 https://bugs.webkit.org/show_bug.cgi?id=51504
744 * UIProcess/API/C/WKFrame.cpp:
745 (WKFrameGetWebArchive): Updated to use new-named typedef.
746 * UIProcess/API/C/WKPage.cpp:
747 (WKPageRunJavaScriptInMainFrame): Ditto.
748 (WKPageRenderTreeExternalRepresentation): Ditto.
749 (WKPageGetSourceForFrame): Ditto.
750 (WKPageGetContentsAsString): Ditto.
752 * UIProcess/API/mac/WKView.mm:
753 (menuItem): Added. Helper function to make it easy to call menu item
754 functions on arbitrary user interface items.
755 (toolbarItem): Ditto.
756 (-[WKView validateUserInterfaceItem:]): Added validation for startSpeaking
757 and stopSpeaking commands. Reworked the code to fix a bug where
758 toggleContinuousSpellChecking would always be enabled even when it should
759 be disabled. Reworked the asynchronous validation code so it works for
760 items other than menu items and can also handle more than one item for the
761 same command. Added some comments.
762 (speakString): Added. Helper function to be used as a callback when we
763 get the selection or contents to speak.
764 (-[WKView startSpeaking:]): Added. Uses getSelectionOrContentsAsString.
765 (-[WKView stopSpeaking:]): Added.
766 (-[WKView _setUserInterfaceItemState:enabled:state:]): Reworked to work
767 with the changes to validateUserInterfaceItem above.
769 * UIProcess/WebFrameProxy.cpp:
770 (WebKit::WebFrameProxy::isDisplayingMarkupDocument): Added a FIXME about
772 (WebKit::WebFrameProxy::didCommitLoad): Tweaked argument name.
773 (WebKit::WebFrameProxy::getWebArchive): Changed to use new-named typedef.
774 * UIProcess/WebFrameProxy.h: Changed WebArchiveCallback to DataCallaback.
776 * UIProcess/WebPageProxy.cpp:
777 (WebKit::WebPageProxy::close): Invalidate the two callback maps since
778 we only have two now.
779 (WebKit::WebPageProxy::runJavaScriptInMainFrame): Changed to use merged
780 maps and typedefs so we don't need a separate callback map for each function.
781 (WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
782 (WebKit::WebPageProxy::getSourceForFrame): Ditto.
783 (WebKit::WebPageProxy::getContentsAsString): Ditto.
784 (WebKit::WebPageProxy::getSelectionOrContentsAsString): Added.
785 (WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
786 (WebKit::WebPageProxy::didGetContentsAsString): Ditto.
787 (WebKit::WebPageProxy::didGetSelectionOrContentsAsString): Ditto.
788 (WebKit::WebPageProxy::didRunJavaScriptInMainFrame): Ditto.
789 (WebKit::WebPageProxy::didGetRenderTreeExternalRepresentation): Ditto.
790 (WebKit::WebPageProxy::didGetSourceForFrame): Ditto.
791 (WebKit::WebPageProxy::didGetWebArchiveOfFrame): Ditto.
792 (WebKit::WebPageProxy::processDidCrash): Ditto.
794 * UIProcess/WebPageProxy.h: Updated for changes above.
796 * UIProcess/WebPageProxy.messages.in: Added DidGetSelectionOrContentsAsString,
797 GetIsSpeaking, Speak, and StopSpeaking.
799 * UIProcess/mac/WebPageProxyMac.mm:
800 (WebKit::WebPageProxy::getIsSpeaking): Added.
801 (WebKit::WebPageProxy::speak): Added.
802 (WebKit::WebPageProxy::stopSpeaking): Added.
804 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
805 (WebKit::WebContextMenuClient::isSpeaking): Call WebPage instead of doing
806 the work directly, so it can run in the UI process.
807 (WebKit::WebContextMenuClient::speak): Ditto.
808 (WebKit::WebContextMenuClient::stopSpeaking): Ditto.
809 (WebKit::WebContextMenuClient::searchWithSpotlight): Added FIXME comment and
810 changed code to avoid a C-style cast.
812 * WebProcess/WebPage/WebFrame.cpp:
813 (WebKit::WebFrame::selectionAsString): Added.
814 * WebProcess/WebPage/WebFrame.h: Ditto.
816 * WebProcess/WebPage/WebPage.cpp:
817 (WebKit::WebPage::changeAcceleratedCompositingMode): Use sendSync in the
818 modern way instead of explicitly calling WebProcess.
819 (WebKit::WebPage::getSelectionOrContentsAsString): Added.
820 (WebKit::WebPage::isSpeaking): Added.
821 (WebKit::WebPage::speak): Added.
822 (WebKit::WebPage::stopSpeaking): Added.
823 * WebProcess/WebPage/WebPage.h: Added functions.
825 * WebProcess/WebPage/WebPage.messages.in: Added GetSelectionOrContentsAsString.
827 2010-12-22 Anders Carlsson <andersca@apple.com>
831 * Platform/mac/MachUtilities.cpp:
833 2010-12-22 Anders Carlsson <andersca@apple.com>
835 Reviewed by Darin Adler.
837 Detect WebProcess crashes sooner, without waiting for ReportCrash to finish
838 https://bugs.webkit.org/show_bug.cgi?id=51505
840 * Platform/CoreIPC/CoreIPCMessageKinds.h:
841 Add SetExceptionPort.
843 * Platform/CoreIPC/mac/ConnectionMac.cpp:
844 (CoreIPC::Connection::platformInvalidate):
845 If we have an exception port, unregister it.
847 (CoreIPC::Connection::platformInitialize):
848 Set m_exceptionPort to null.
850 (CoreIPC::Connection::open):
851 If we have an exception port, register an event handler for it and send it over
854 (CoreIPC::Connection::receiveSourceEventHandler):
855 Handle the SetExceptionPort message.
857 (CoreIPC::Connection::exceptionSourceEventHandler):
858 Receive the message, forward it to the real exception handler and call connectionDidClose.
860 (CoreIPC::Connection::setShouldCloseConnectionOnMachExceptions):
861 Create an exception port.
863 * Platform/mac/MachUtilities.cpp:
865 (setMachExceptionPort):
866 * Platform/mac/MachUtilities.h:
867 Add helper functions for getting and setting the mach exception port.
869 * UIProcess/WebProcessProxy.cpp:
870 (WebKit::WebProcessProxy::didFinishLaunching):
871 Call setShouldCloseConnectionOnMachExceptions on Mac.
873 2010-12-22 Anders Carlsson <andersca@apple.com>
875 Reviewed by Sam Weinig.
877 Move Mach message receiving code out into a new function
878 https://bugs.webkit.org/show_bug.cgi?id=51502
880 * Platform/CoreIPC/mac/ConnectionMac.cpp:
881 (CoreIPC::readFromMachPort):
882 (CoreIPC::Connection::receiveSourceEventHandler):
884 2010-12-22 Jeff Miller <jeffm@apple.com>
886 Reviewed by Sam Weinig.
888 InjectedBundle methods should use the relative URL constructor for KURL instead of the ParsedURLStringTag version
889 https://bugs.webkit.org/show_bug.cgi?id=51491
891 The url passed to various InjectedBundle methods is not from KURL::string(), i.e. it has not already been parsed by KURL,
892 so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
894 * WebProcess/InjectedBundle/InjectedBundle.cpp:
895 (WebKit::InjectedBundle::addUserScript):
896 (WebKit::InjectedBundle::addUserStyleSheet):
897 (WebKit::InjectedBundle::removeUserScript):
898 (WebKit::InjectedBundle::removeUserStyleSheet):
900 2010-12-22 Darin Adler <darin@apple.com>
902 Reviewed by Sam Weinig.
904 Move more of WebPageProxy::didCommitLoadForFrame into WebFrameProxy::didCommitLoad.
906 * UIProcess/WebFrameProxy.cpp:
907 (WebKit::WebFrameProxy::didCommitLoad): Added type and certificate info arguments,
908 and set m_MIMEType, m_isFrameSet, and m_certificateInfo.
909 * UIProcess/WebFrameProxy.h: Removed setMIMEType and setCertificateInfo and added
910 arguments to didCommitLoad.
911 * UIProcess/WebPageProxy.cpp:
912 (WebKit::WebPageProxy::didCommitLoadForFrame): Removed code that is now inside the
913 WebFrameProxy::didCommitLoad function.
915 2010-12-21 Darin Adler <darin@apple.com>
917 Reviewed by Brady Eidson and Sam Weinig.
919 Add a way to get a web archive in WebKit2
920 https://bugs.webkit.org/show_bug.cgi?id=51437
922 * UIProcess/API/C/WKFrame.cpp:
923 (WKFrameGetWebArchive): Added.
924 (callGetWebArchiveBlockAndDispose): Added.
925 (WKFrameGetWebArchive_b): Added.
926 * UIProcess/API/C/WKFrame.h: Added functions above.
927 * UIProcess/WebPageProxy.cpp:
928 (WebKit::WebPageProxy::close): Clear out m_webArchiveCallbacks.
929 (WebKit::WebPageProxy::getWebArchiveOfFrame): Added.
930 (WebKit::WebPageProxy::didGetWebArchiveOfFrame): Added.
931 (WebKit::WebPageProxy::processDidCrash): Clear out m_webArchiveCallbacks.
932 * UIProcess/WebPageProxy.h: Added functions above.
933 * UIProcess/WebPageProxy.messages.in: Added DidGetWebArchiveOfFrame.
934 * WebProcess/WebPage/WebPage.cpp:
935 (WebKit::WebPage::getWebArchiveOfFrame): Added.
936 * WebProcess/WebPage/WebPage.h: Added function above.
937 * WebProcess/WebPage/WebPage.messages.in: Added GetWebArchiveOfFrame.
939 2010-12-21 Siddharth Mathur <siddharth.mathur@nokia.com>
941 Reviewed by Laszlo Gombos.
943 [Qt] [WK2] Guard gcc-specific syntax
945 * WebKit2.pro: Non-gcc based compliers choke on the "-include"
946 syntax for preinclude, make sure it has guard around it.
948 2010-12-21 Anders Carlsson <andersca@apple.com>
950 Reviewed by Darin Adler.
952 Can't stop QT music on santastreefarm.com
953 https://bugs.webkit.org/show_bug.cgi?id=51438
954 <rdar://problem/8741152>
956 Implement NPN_ConvertPoint.
958 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
959 (WebKit::NPN_ConvertPoint):
960 Call NetscapePlugin::convertPoint.
962 (WebKit::initializeBrowserFuncs):
963 Only initialize NPN_ConvertPoint and NPN_PopUpContextMenu on Mac.
965 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
966 (WebKit::NetscapePlugin::convertPoint):
967 Implement conversion routines.
969 (WebKit::NetscapePlugin::windowAndViewFramesChanged):
970 Keep track of the window and view frames, they are needed to do coordinate conversion.
972 2010-12-21 Sam Weinig <weinig@apple.com>
974 Reviewed by Anders Carlsson.
976 Implement encoding/decoding of ResourceRequest and
977 ResourceResponse for Windows/CFNetwork.
979 * Shared/win/WebCoreArgumentCodersWin.cpp:
980 (CoreIPC::encodeResourceRequest):
981 (CoreIPC::decodeResourceRequest):
982 (CoreIPC::encodeResourceResponse):
983 (CoreIPC::decodeResourceResponse):
984 * win/WebKit2.vcproj:
985 * win/WebKit2Common.vsprops:
987 2010-12-21 Darin Adler <darin@apple.com>
989 Reviewed by Sam Weinig.
991 Mac WebKit delivers an extra didCommit when loading web archives
992 https://bugs.webkit.org/show_bug.cgi?id=51419
994 * UIProcess/WebFrameProxy.cpp:
995 (WebKit::WebFrameProxy::didStartProvisionalLoad): Added assertions so we catch
996 inconsistencies here instead of at the application level. Later, we will have
997 to decide what to do in cases these assertions fail. The right policy is probably
998 to consider it a web process failure and do whatever we do for those.
999 (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad): Ditto.
1000 (WebKit::WebFrameProxy::didFailProvisionalLoad): Ditto.
1001 (WebKit::WebFrameProxy::didCommitLoad): Ditto.
1002 (WebKit::WebFrameProxy::didFinishLoad): Ditto.
1003 (WebKit::WebFrameProxy::didFailLoad): Ditto.
1005 2010-12-21 Anders Carlsson <andersca@apple.com>
1007 Fix Snow Leopard build.
1009 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1010 (WebKit::NPN_GetValue):
1012 2010-12-21 Anders Carlsson <andersca@apple.com>
1014 Reviewed by Dan Bernstein.
1016 Fix crash when a Carbon plug-in fails to initialize correctly
1017 https://bugs.webkit.org/show_bug.cgi?id=51415
1019 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1020 (WebKit::NPN_GetValue):
1021 Don't claim to support the QuickDraw event model.
1023 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1024 (WebKit::NetscapePlugin::platformDestroy):
1025 Only try to remove the window from the map if it's not null.
1027 2010-12-21 Anders Carlsson <andersca@apple.com>
1029 Reviewed by Darin Adler.
1031 Add ArgumentCoder support for CFDataRef
1032 https://bugs.webkit.org/show_bug.cgi?id=51412
1034 * Shared/cf/ArgumentCodersCF.cpp:
1035 (CoreIPC::typeFromCFTypeRef):
1038 * Shared/cf/ArgumentCodersCF.h:
1040 2010-12-21 Anders Carlsson <andersca@apple.com>
1042 Reviewed by John Sullivan.
1044 Clicking missing plug-in text does not show a sheet
1045 https://bugs.webkit.org/show_bug.cgi?id=51403
1047 * UIProcess/API/C/WKPage.h:
1048 Add missingPluginButtonClicked to WKPageUIClient.
1050 * UIProcess/WebPageProxy.cpp:
1051 (WebKit::WebPageProxy::missingPluginButtonClicked):
1052 Call the WebUIClient member function.
1054 * UIProcess/WebPageProxy.messages.in:
1055 Add MissingPluginButtonClicked message.
1057 * UIProcess/WebUIClient.cpp:
1058 (WebKit::WebUIClient::missingPluginButtonClicked):
1059 Call the WKPageUIClient callback.
1061 * UIProcess/WebUIClient.h:
1062 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1063 (WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
1064 Always return true for now.
1066 (WebKit::WebChromeClient::missingPluginButtonClicked):
1067 Send a MissingPluginButtonClicked message.
1069 2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1071 Reviewed by Andreas Kling.
1073 [Qt] Set BUILDING_QT__ consistently
1074 https://bugs.webkit.org/show_bug.cgi?id=51341
1076 * WebKit2.pro: Remove the definition of BUILDING_QT__ as it
1077 is already defined in WebKit.pri.
1079 2010-12-20 Sam Weinig <sam@webkit.org>
1081 Reviewed by Anders Carlsson.
1083 WebKit2: Add resource load client API
1084 https://bugs.webkit.org/show_bug.cgi?id=51370
1086 This just pipes through the basic resource load client data.
1088 * UIProcess/API/C/WKPage.cpp:
1089 (WKPageSetPageResourceLoadClient):
1090 * UIProcess/API/C/WKPage.h:
1091 * UIProcess/WebPageProxy.cpp:
1092 (WebKit::WebPageProxy::initializeResourceLoadClient):
1093 (WebKit::WebPageProxy::didInitiateLoadForResource):
1094 (WebKit::WebPageProxy::didSendRequestForResource):
1095 (WebKit::WebPageProxy::didReceiveResponseForResource):
1096 (WebKit::WebPageProxy::didReceiveContentLengthForResource):
1097 (WebKit::WebPageProxy::didFinishLoadForResource):
1098 (WebKit::WebPageProxy::didFailLoadForResource):
1099 * UIProcess/WebPageProxy.h:
1100 * UIProcess/WebPageProxy.messages.in:
1101 * UIProcess/WebResourceLoadClient.cpp: Added.
1102 (WebKit::WebResourceLoadClient::didInitiateLoadForResource):
1103 (WebKit::WebResourceLoadClient::didSendRequestForResource):
1104 (WebKit::WebResourceLoadClient::didReceiveResponseForResource):
1105 (WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
1106 (WebKit::WebResourceLoadClient::didFinishLoadForResource):
1107 (WebKit::WebResourceLoadClient::didFailLoadForResource):
1108 * UIProcess/WebResourceLoadClient.h: Added.
1110 * WebKit2.xcodeproj/project.pbxproj:
1111 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1112 (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
1113 (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
1114 (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
1115 (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
1116 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
1117 (WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
1118 * win/WebKit2.vcproj:
1120 2010-12-20 Anders Carlsson <andersca@apple.com>
1122 Reviewed by Sam Weinig.
1124 Add a TextChecker class, hook up spelling and grammar toggling
1125 https://bugs.webkit.org/show_bug.cgi?id=51363
1127 * UIProcess/API/mac/WKView.mm:
1128 (-[WKView validateUserInterfaceItem:]):
1129 (-[WKView toggleContinuousSpellChecking:]):
1130 (-[WKView toggleGrammarChecking:]):
1131 * UIProcess/TextChecker.h: Added.
1132 * UIProcess/WebPageProxy.cpp:
1133 (WebKit::WebPageProxy::unmarkAllMisspellings):
1134 (WebKit::WebPageProxy::unmarkAllBadGrammar):
1135 * UIProcess/WebPageProxy.h:
1136 * UIProcess/mac/TextCheckerMac.mm: Added.
1137 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
1138 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
1139 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1140 (WebKit::TextChecker::isGrammarCheckingEnabled):
1141 (WebKit::TextChecker::setGrammarCheckingEnabled):
1142 * UIProcess/qt/TextCheckerQt.cpp: Added.
1143 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
1144 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
1145 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1146 (WebKit::TextChecker::isGrammarCheckingEnabled):
1147 (WebKit::TextChecker::setGrammarCheckingEnabled):
1148 * UIProcess/win/TextCheckerWin.cpp: Added.
1149 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
1150 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
1151 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1152 (WebKit::TextChecker::isGrammarCheckingEnabled):
1153 (WebKit::TextChecker::setGrammarCheckingEnabled):
1155 * WebKit2.xcodeproj/project.pbxproj:
1156 * WebProcess/WebPage/WebPage.cpp:
1157 (WebKit::WebPage::unmarkAllMisspellings):
1158 (WebKit::WebPage::unmarkAllBadGrammar):
1159 * WebProcess/WebPage/WebPage.h:
1160 * WebProcess/WebPage/WebPage.messages.in:
1161 * win/WebKit2.vcproj:
1163 2010-12-20 Anders Carlsson <andersca@apple.com>
1165 Reviewed by Sam Weinig.
1167 Flash plug-in does not work on YouTube video page when accelerated compositing is disabled
1168 https://bugs.webkit.org/show_bug.cgi?id=51348
1169 <rdar://problem/8787667>
1171 * Platform/CoreIPC/HandleMessage.h:
1172 (CoreIPC::callMemberFunction):
1175 * PluginProcess/PluginControllerProxy.cpp:
1176 (WebKit::PluginControllerProxy::create):
1177 (WebKit::PluginControllerProxy::PluginControllerProxy):
1178 These now take an additional isAcceleratedCompositingEnabled parameter.
1180 (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
1181 Return m_isAcceleratedCompositingEnabled.
1183 * PluginProcess/PluginControllerProxy.h:
1184 * PluginProcess/WebProcessConnection.cpp:
1185 (WebKit::WebProcessConnection::createPlugin):
1186 This now takes an additional isAcceleratedCompositingEnabled parameter.
1188 * PluginProcess/WebProcessConnection.messages.in:
1189 Add isAcceleratedCompositingEnabled parameter to the CreatePlugin message.
1191 * WebProcess/Plugins/PluginProxy.cpp:
1192 (WebKit::PluginProxy::initialize):
1193 Pass isAcceleratedCompositingEnabled when sending the CreatePlugin message.
1195 2010-12-20 Anders Carlsson <andersca@apple.com>
1197 Unreviewed, rolling out r74345.
1198 http://trac.webkit.org/changeset/74345
1199 https://bugs.webkit.org/show_bug.cgi?id=51115
1201 Not the correct fix.
1203 * Platform/CoreIPC/Connection.h:
1204 * Platform/CoreIPC/qt/ConnectionQt.cpp:
1205 (CoreIPC::Connection::open):
1207 2010-12-20 Balazs Kelemen <kbalazs@webkit.org>
1209 Reviewed by Kenneth Rohde Christiansen.
1211 [Qt][WK2] Crash in web process after the connection had been closed
1212 https://bugs.webkit.org/show_bug.cgi?id=51115
1214 Do not call connectionDidClose with a connection that has been explicitly
1215 invalidated on the listener thread.
1216 * Platform/CoreIPC/Connection.h:
1217 * Platform/CoreIPC/qt/ConnectionQt.cpp:
1218 (CoreIPC::Connection::disconnectHandler): Added.
1219 (CoreIPC::Connection::open):
1221 2010-12-19 Dan Bernstein <mitz@apple.com>
1223 Reviewed by Sam Weinig.
1225 Improve the fix for <rdar://problem/8769525>.
1227 * UIProcess/API/mac/WKView.mm:
1228 (-[WKView performKeyEquivalent:]): Do not retain the view. Doing so is necessary in
1229 -[WebHTMLView performKeyEquivalent:], which this method was based upon, but not here, because
1230 there is no way for the web process to cause the WKView to be released while it is handling
1233 2010-12-19 Dan Bernstein <mitz@apple.com>
1235 Reviewed by Sam Weinig.
1237 <rdar://problem/8769525> WKView leak when performing key equivalents
1238 https://bugs.webkit.org/show_bug.cgi?id=51315
1240 * UIProcess/API/mac/WKView.mm:
1241 (-[WKView performKeyEquivalent:]): Use a RetainPtr to ensure that the view is released in the
1242 early return code path.
1244 2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
1246 Reviewed by Kenneth Rohde Christiansen.
1248 [Qt] [WK2] QWKPagePrivate::paint() does not need to save the graphics context
1249 https://bugs.webkit.org/show_bug.cgi?id=51300
1251 Remove the unnecessary save() and restore() on the QPainter.
1253 * UIProcess/API/qt/qwkpage.cpp:
1254 (QWKPagePrivate::paint):
1256 2010-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
1258 Reviewed by Andreas Kling.
1260 [Qt] [WK2] Client are expected to render their own background for WebPages
1261 https://bugs.webkit.org/show_bug.cgi?id=51296
1263 Remove the rendering of the checkerboard from the tiled DrawingAreaProxy
1265 * UIProcess/TiledDrawingAreaProxy.cpp:
1266 (WebKit::TiledDrawingAreaProxy::paint):
1267 * UIProcess/TiledDrawingAreaTile.h:
1268 * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
1270 2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
1272 Reviewed by Kenneth Rohde Christiansen.
1274 [Qt] [WK2] Client are expected to render their own background for WebPages
1275 https://bugs.webkit.org/show_bug.cgi?id=51296
1277 Do not render a white background before rendering the page with DrawingAreaProxy.
1279 * UIProcess/API/qt/qwkpage.cpp:
1280 (QWKPagePrivate::paint):
1282 2010-12-17 Darin Adler <darin@apple.com>
1284 Reviewed by Dan Bernstein.
1286 Window title for image documents shows corrupted characters instead of multiplication sign when using WebKit2
1287 https://bugs.webkit.org/show_bug.cgi?id=43505
1289 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Changed UI_STRING macros to return
1290 WebCore::String objects instead of C strings.
1291 (WebKit::formatLocalizedString): Added. Uses the Core Foundation string formatting function for
1292 reasons explained in the comment.
1293 (WebKit::WebPlatformStrategies::multipleFileUploadText): Use formatLocalizedString instead of
1295 (WebKit::WebPlatformStrategies::imageTitle): Ditto.
1296 (WebKit::WebPlatformStrategies::localizedMediaTimeDescription): Ditto.
1298 2010-12-17 Anders Carlsson <andersca@apple.com>
1300 Reviewed by Sam Weinig.
1302 Resizing a WKView while loading a page can leave the page at a size that doesn't match the window
1303 https://bugs.webkit.org/show_bug.cgi?id=51282
1304 <rdar://problem/8133142>
1306 Fix a race condition in waitForMessage. If we time out on the wait condition, we would keep the
1307 m_waitForMessageMutex mutex unlocked for a brief period of time before taking the lock again and
1308 then removing the messageID/destinationID pair from the hash map. Under some circumstances, the
1309 connection queue would update the hash map right before we removed it, leading to a lost message.
1311 * Platform/CoreIPC/Connection.cpp:
1312 (CoreIPC::Connection::waitForMessage):
1314 2010-12-17 Anders Carlsson <andersca@apple.com>
1316 Reviewed by Simon Fraser.
1318 Clean up ChunkedUpdateDrawingAreaProxy
1319 https://bugs.webkit.org/show_bug.cgi?id=51277
1321 Get rid of m_lastSetViewSize since it was always equal to m_size.
1323 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1324 (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
1327 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
1328 Call sendSetSize if the size differs.
1330 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
1331 Move code from sizeDidChange over here.
1333 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1334 * UIProcess/DrawingAreaProxy.cpp:
1335 (WebKit::DrawingAreaProxy::setSize):
1336 Add back the early return if the sizes are equal.
1338 2010-12-17 Brent Fulgham <bfulgham@webkit.org>
1340 Unreviewed build fix.
1342 * WebProcess/WebPage/win/WebPageWin.cpp:
1343 (WebKit::WebPage::canHandleRequest): Provide alternative for
1344 non-CFNetwork implementation.
1346 2010-12-17 Ada Chan <adachan@apple.com>
1348 Reviewed by Anders Carlsson.
1350 Implement WKView::setInitialFocus().
1351 https://bugs.webkit.org/show_bug.cgi?id=51274
1353 * UIProcess/API/C/win/WKView.cpp:
1354 (WKViewSetInitialFocus):
1355 * UIProcess/API/C/win/WKView.h:
1356 * UIProcess/WebPageProxy.cpp:
1357 (WebKit::WebPageProxy::setInitialFocus): Send message to the Web Process to set
1359 * UIProcess/WebPageProxy.h:
1360 * UIProcess/win/WebView.cpp:
1361 (WebKit::WebView::setInitialFocus):
1362 * UIProcess/win/WebView.h:
1363 * WebProcess/WebPage/WebPage.cpp:
1364 (WebKit::WebPage::setInitialFocus): Set the focused node to null initially. Then
1365 ask FocusController to set the initial focus based on the focus direction.
1366 * WebProcess/WebPage/WebPage.h:
1367 * WebProcess/WebPage/WebPage.messages.in: Add a new message for SetInitialFocus.
1369 2010-12-17 Anders Carlsson <andersca@apple.com>
1371 Reviewed by Sam Weinig.
1373 Remove a check that probably uncovered a resizing bug.
1375 * UIProcess/DrawingAreaProxy.cpp:
1376 (WebKit::DrawingAreaProxy::setSize):
1378 2010-12-17 Brian Weinstein <bweinstein@apple.com>
1382 * UIProcess/qt/WebPopupMenuProxyQt.h:
1384 2010-12-17 Brian Weinstein <bweinstein@apple.com>
1386 Reviewed by Anders Carlsson.
1388 Text area does not update when you arrow through a <select> in WebKit2
1389 https://bugs.webkit.org/show_bug.cgi?id=51269
1390 <rdar://problem/8612853>
1392 Patch by Sam Weinig.
1394 Insteaed of keeping track of the selected index of a <select> just in the UI process, we
1395 need to pass this information along to the web process so that the web process can draw
1396 the correct text in the text field at the top of the select, when the selection changes (via
1397 the arrows or other typing while the select is opened).
1399 When the selected item in a popup changes, the UI process sends a message to the web process, telling
1400 it about the new selected index. The web process gets this message, and then sets the text that
1401 is visible in the select element.
1403 * UIProcess/API/mac/PageClientImpl.h: CreatePopupMenuProxy now takes a WebPageProxy.
1404 * UIProcess/API/mac/PageClientImpl.mm:
1405 (WebKit::PageClientImpl::createPopupMenuProxy): Pass the WebPageProxy to create.
1406 * UIProcess/API/qt/qwkpage.cpp:
1407 (QWKPagePrivate::createPopupMenuProxy):
1408 * UIProcess/API/qt/qwkpage_p.h: CreatePopupMenuProxy now takes a WebPageProxy.
1409 * UIProcess/PageClient.h: CreatePopupMenuProxy now takes a WebPageProxy.
1410 * UIProcess/WebPageProxy.cpp:
1411 (WebKit::WebPageProxy::valueChangedForPopupMenu): Send that the selected index changed to the
1412 web process.selected
1413 (WebKit::WebPageProxy::setTextFromItemForPopupMenu): Send that we should update the text for the
1414 active popup menu (with the index of the item to show).
1415 (WebKit::WebPageProxy::showPopupMenu): Pass the WebPageProxy to createPopupMenuProxy.
1416 * UIProcess/WebPageProxy.h:
1417 * UIProcess/WebPopupMenuProxy.h: Add a client who has virtual functions for the state changing of the
1418 popup menu. ShowPopupMenu doesn't take a new selected index anymore, that is handled by the client,
1419 and calling down to the web process.
1420 (WebKit::WebPopupMenuProxy::Client::~Client):
1421 (WebKit::WebPopupMenuProxy::WebPopupMenuProxy): Initialize the client.
1422 * UIProcess/mac/WebPopupMenuProxyMac.h:
1423 (WebKit::WebPopupMenuProxyMac::create): Takes a WebPopupMenuProxy::Client, and passes it to the constructor.
1424 * UIProcess/mac/WebPopupMenuProxyMac.mm:
1425 (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac): Update what's initialized by the constructor.
1426 (WebKit::WebPopupMenuProxyMac::showPopupMenu): Call through to the web process that the value changed.
1427 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1428 (WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt): Update what's initialized by the constructor.
1429 * UIProcess/win/WebPopupMenuProxyWin.cpp:
1430 (WebKit::WebPopupMenuProxyWin::WebPopupMenuProxyWin): Ditto.
1431 (WebKit::WebPopupMenuProxyWin::showPopupMenu): Call through to the web process that the value changed.
1432 (WebKit::WebPopupMenuProxyWin::setFocusedIndex): Resolve a FIXME to set the text of the popup menu.
1433 * UIProcess/win/WebPopupMenuProxyWin.h:
1434 (WebKit::WebPopupMenuProxyWin::create): Take in a WebPopupMenuProxy::client, and pass it to the constructor.
1435 * UIProcess/win/WebView.cpp:
1436 (WebKit::WebView::createPopupMenuProxy): Pass the WebPageProxy to create.
1437 * UIProcess/win/WebView.h:
1438 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1439 (WebKit::WebPopupMenu::setTextForIndex): Call through to setTextFromItem to set the select text.
1440 * WebProcess/WebCoreSupport/WebPopupMenu.h:
1441 * WebProcess/WebPage/WebPage.cpp: Call through to setTextForIndex on the active popup menu.
1442 (WebKit::WebPage::setTextForActivePopupMenu):
1443 * WebProcess/WebPage/WebPage.h:
1444 * WebProcess/WebPage/WebPage.messages.in: Add a new message.
1446 2010-12-17 Anders Carlsson <andersca@apple.com>
1448 Reviewed by Sam Weinig.
1450 DrawingAreaProxy::setSize shouldn't be a virtual member function
1451 https://bugs.webkit.org/show_bug.cgi?id=51275
1453 Add a pure virtual sizeDidChange member function to DrawingAreaProxy, and only
1454 call it if the size changes.
1456 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1457 (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
1458 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1459 * UIProcess/DrawingAreaProxy.cpp:
1460 (WebKit::DrawingAreaProxy::setSize):
1461 * UIProcess/DrawingAreaProxy.h:
1462 (WebKit::DrawingAreaProxy::size):
1463 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1464 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
1465 * UIProcess/LayerBackedDrawingAreaProxy.h:
1466 * UIProcess/TiledDrawingAreaProxy.cpp:
1467 (WebKit::TiledDrawingAreaProxy::sizeDidChange):
1468 * UIProcess/TiledDrawingAreaProxy.h:
1470 2010-12-17 Anders Carlsson <andersca@apple.com>
1472 Reviewed by Sam Weinig.
1474 Add a WebPageProxy parameter to the DrawingAreaProxy constructor
1475 https://bugs.webkit.org/show_bug.cgi?id=51271
1477 * UIProcess/API/mac/WKView.mm:
1478 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1479 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
1480 * UIProcess/API/qt/qgraphicswkview.cpp:
1481 (QGraphicsWKView::QGraphicsWKView):
1482 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1483 (WebKit::ChunkedUpdateDrawingAreaProxy::create):
1484 (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
1485 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1486 * UIProcess/DrawingAreaProxy.cpp:
1487 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1488 * UIProcess/DrawingAreaProxy.h:
1489 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1490 (WebKit::LayerBackedDrawingAreaProxy::create):
1491 (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
1492 * UIProcess/LayerBackedDrawingAreaProxy.h:
1493 * UIProcess/TiledDrawingAreaProxy.cpp:
1494 (WebKit::TiledDrawingAreaProxy::create):
1495 (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
1496 * UIProcess/TiledDrawingAreaProxy.h:
1497 * UIProcess/win/WebView.cpp:
1498 (WebKit::WebView::WebView):
1499 (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
1501 2010-12-17 Dan Bernstein <mitz@apple.com>
1503 Reviewed by Darin Adler.
1505 Add API for "Always Use the Complex Text Code Path"
1506 https://bugs.webkit.org/show_bug.cgi?id=51265
1508 * Shared/WebProcessCreationParameters.cpp:
1509 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize shouldAlwaysUseComplexTextCodePath.
1510 (WebKit::WebProcessCreationParameters::encode): Encode shouldAlwaysUseComplexTextCodePath.
1511 (WebKit::WebProcessCreationParameters::decode): Decode shouldAlwaysUseComplexTextCodePath.
1512 * Shared/WebProcessCreationParameters.h:
1513 * UIProcess/API/C/WKContext.cpp:
1514 (_WKContextSetAlwaysUsesComplexTextCodePath): Added.
1515 * UIProcess/API/C/WKContextPrivate.h:
1516 * UIProcess/WebContext.cpp:
1517 (WebKit::WebContext::WebContext): Initialize m_alwaysUsesComplexTextCodePath.
1518 (WebKit::WebContext::ensureWebProcess): Set shouldAlwaysUseComplexTextCodePath in the creation parameters.
1519 (WebKit::WebContext::setAlwaysUsesComplexTextCodePath): Added. Sets m_alwaysUsesComplexTextCodePath and
1520 sends a message to the WebProcess.
1521 * UIProcess/WebContext.h:
1522 * WebProcess/WebProcess.cpp:
1523 (WebKit::WebProcess::initializeWebProcess): Call setAlwaysUsesComplexTextCodePath() based on the creation
1525 (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): Added.
1526 * WebProcess/WebProcess.h:
1527 * WebProcess/WebProcess.messages.in: Added SetAlwaysUsesComplexTextCodePath.
1529 2010-12-17 Sam Weinig <sam@webkit.org>
1531 Reviewed by Darin Adler.
1533 WebKit2: Implement a title attribute per frame
1534 https://bugs.webkit.org/show_bug.cgi?id=51266
1536 Cache the title of each frame on the WebFrameProxy. Removes
1537 the WebPageProxy's cache of the main frame title to just
1538 access the main frame.
1540 We clear the cached title on new committed loads and on failures
1543 * UIProcess/API/C/WKFrame.cpp:
1545 * UIProcess/API/C/WKFrame.h:
1546 * UIProcess/WebFrameProxy.cpp:
1547 (WebKit::WebFrameProxy::didCommitLoad):
1548 (WebKit::WebFrameProxy::didFailLoad):
1549 (WebKit::WebFrameProxy::didChangeTitle):
1550 * UIProcess/WebFrameProxy.h:
1551 (WebKit::WebFrameProxy::title):
1552 * UIProcess/WebPageProxy.cpp:
1553 (WebKit::WebPageProxy::close):
1554 (WebKit::WebPageProxy::pageTitle):
1555 (WebKit::WebPageProxy::didReceiveTitleForFrame):
1556 (WebKit::WebPageProxy::processDidCrash):
1557 * UIProcess/WebPageProxy.h:
1559 2010-12-16 Darin Adler <darin@apple.com>
1561 Reviewed by Maciej Stachowiak.
1563 Add text encoding menu API for WebKit2
1564 https://bugs.webkit.org/show_bug.cgi?id=51226
1566 * UIProcess/API/C/WKPage.cpp:
1567 (WKPageSupportsTextEncoding): Added.
1568 (WKPageCopyCustomTextEncodingName): Added.
1569 (WKPageSetCustomTextEncodingName): Added.
1570 * UIProcess/API/C/WKPage.h: Added the functions above.
1572 * UIProcess/WebPageProxy.cpp:
1573 (WebKit::WebPageProxy::WebPageProxy): Initialize
1574 m_mainFrameHasCustomRepresentation to false.
1575 (WebKit::WebPageProxy::supportsTextEncoding): Added.
1576 (WebKit::WebPageProxy::setCustomTextEncodingName): Added.
1577 (WebKit::WebPageProxy::didCommitLoadForFrame): Set
1578 m_mainFrameHasCustomRepresentation.
1580 * UIProcess/WebPageProxy.h: Added supportsTextEncoding,
1581 setCustomTextEncodingName, customTextEncodingName, and
1582 m_mainFrameHasCustomRepresentation.
1584 * UIProcess/WebPageProxy.messages.in: Tweaked formatting
1585 (added a blank line).
1587 * WebProcess/WebPage/WebPage.cpp:
1588 (WebKit::WebPage::setCustomTextEncodingName): Added.
1589 * WebProcess/WebPage/WebPage.h: Added setCustomTextEncodingName.
1591 * WebProcess/WebPage/WebPage.messages.in: Added the
1592 SetCustomTextEncodingName message. Tweaked formatting of the
1595 2010-12-17 Sheriff Bot <webkit.review.bot@gmail.com>
1597 Unreviewed, rolling out r74201.
1598 http://trac.webkit.org/changeset/74201
1599 https://bugs.webkit.org/show_bug.cgi?id=51248
1601 It broke ~6000 layout tests (Requested by Ossy_ on #webkit).
1603 * UIProcess/API/qt/qgraphicswkview.cpp:
1604 (QGraphicsWKView::setGeometry):
1605 (QGraphicsWKView::itemChange):
1607 2010-12-16 Sam Weinig <sam@webkit.org>
1609 Reviewed by Darin Adler.
1611 Add svn:eol-style native to the message.in files as a favor to Darin Adler.
1613 * PluginProcess/PluginControllerProxy.messages.in: Added property svn:eol-style.
1614 * PluginProcess/PluginProcess.messages.in: Added property svn:eol-style.
1615 * PluginProcess/WebProcessConnection.messages.in: Added property svn:eol-style.
1616 * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added property svn:eol-style.
1617 * UIProcess/Downloads/DownloadProxy.messages.in: Added property svn:eol-style.
1618 * UIProcess/Plugins/PluginProcessProxy.messages.in: Added property svn:eol-style.
1619 * UIProcess/WebContext.messages.in: Added property svn:eol-style.
1620 * UIProcess/WebDatabaseManagerProxy.messages.in: Added property svn:eol-style.
1621 * UIProcess/WebInspectorProxy.messages.in: Added property svn:eol-style.
1622 * UIProcess/WebPageProxy.messages.in: Added property svn:eol-style.
1623 * UIProcess/WebProcessProxy.messages.in: Added property svn:eol-style.
1624 * WebProcess/Authentication/AuthenticationManager.messages.in: Added property svn:eol-style.
1625 * WebProcess/Plugins/PluginProxy.messages.in: Added property svn:eol-style.
1626 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added property svn:eol-style.
1627 * WebProcess/WebPage/WebInspector.messages.in: Added property svn:eol-style.
1628 * WebProcess/WebPage/WebPage.messages.in: Added property svn:eol-style.
1629 * WebProcess/WebProcess.messages.in: Added property svn:eol-style.
1631 2010-12-16 Sam Weinig <sam@webkit.org>
1633 Reviewed by Anders Carlsson.
1635 Move NSURLCache initialization from the ProcessLauncherMac to the centralized
1636 WebContext initialize WebProcess mechanism.
1638 * Shared/WebProcessCreationParameters.cpp:
1639 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1640 (WebKit::WebProcessCreationParameters::encode):
1641 (WebKit::WebProcessCreationParameters::decode):
1642 * Shared/WebProcessCreationParameters.h:
1643 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1644 (WebKit::ProcessLauncher::launchProcess):
1645 * UIProcess/mac/WebContextMac.mm:
1646 (WebKit::WebContext::platformInitializeWebProcess):
1647 * WebProcess/WebProcess.cpp:
1648 (WebKit::WebProcess::initializeWebProcess):
1649 * WebProcess/mac/WebProcessMac.mm:
1650 (WebKit::WebProcess::platformInitializeWebProcess):
1651 * WebProcess/mac/WebProcessMainMac.mm:
1652 (WebKit::WebProcessMain):
1653 * WebProcess/win/WebProcessWin.cpp:
1654 (WebKit::WebProcess::platformInitializeWebProcess):
1655 (WebKit::WebProcess::setShouldPaintNativeControls):
1657 2010-12-16 Anders Carlsson <andersca@apple.com>
1659 Reviewed by Dan Bernstein.
1661 Defer getting a PluginProcessConnection object until the plug-in is initialized
1662 https://bugs.webkit.org/show_bug.cgi?id=51207
1663 <rdar://problem/8731306>
1665 Before this change, we would pass the PluginProcessConnection to the PluginProxy constructor, but not
1666 call PluginProcessConnection::addPluginProxy (which associates the plug-in proxy with the connection)
1667 until the plug-in is initialized.
1669 This could lead to a PluginProxy holding a reference to a PluginProcessConnection when the PluginProxyConnection
1670 itself did not know anything about the PluginProxy. This would happen when a page with plug-ins is opened in a background
1671 tab, with the plug-ins not yet initialized.
1673 Because of this, we could end up in a weird state, where the PluginProcessConnection would think that there are no
1674 more plug-ins alive, and invalidate (and null out) the underlying CoreIPC connection, which would lead to crashes
1675 when trying to send messages to the connection during later initialization.
1677 The fix is to pass the plug-in path to the PluginProxy constructor, and get the connection from PluginProxy::initialize.
1679 PluginProcessConnection object
1680 * WebProcess/Plugins/PluginProxy.cpp:
1681 (WebKit::PluginProxy::create):
1682 (WebKit::PluginProxy::PluginProxy):
1683 (WebKit::PluginProxy::initialize):
1684 * WebProcess/Plugins/PluginProxy.h:
1685 * WebProcess/WebPage/WebPage.cpp:
1686 (WebKit::WebPage::createPlugin):
1688 2010-12-16 Enrica Casucci <enrica@apple.com>
1690 Reviewed by Maciej Stachowiak.
1692 WebKit2: Cannot copy two successive selections using cmd-c
1693 <rdar://problem/8680309>
1694 https://bugs.webkit.org/show_bug.cgi?id=51203
1696 The previous implementation assumed a call sequence from AppKit that
1697 was not always happening.
1698 When the user clicks on the pulldown menu, AppKit sends validateUserInterfaceItem
1699 calls for each element that needs validation and we used to count the number of
1700 validation requests being sent to the web process.
1701 All these calls are made before we have the chance to get one reply from the WebProcess.
1702 We also delayed the menu update until we had received all the replies to the validation requests.
1703 At that point we called update on the menu to trigger the validation one more time with
1704 the data retrived from the WebProcess.
1705 When the user simply presses cmd-c, only one call to vaidateUserInterfaceItem is made
1706 and the menu update triggered the validation of all the menu entries causing the internal
1707 state to be out of sync.
1708 The new implementation is very simple: for each validation request from AppKit we send
1709 a request to the WebProcess and we cache a reference to the menu item being validated.
1710 When the WebProcess replies, we retrieve the menu item from our cache and update its state.
1712 * UIProcess/API/mac/WKView.mm:
1713 (-[WKView initWithFrame:contextRef:pageGroupRef:]): Removed initialization of deleted memebers.
1714 (-[WKView validateUserInterfaceItem:]): Request validation to the WebProcess and return YES to
1715 allow AppKit to do the keyBinding processing.
1716 (-[WKView _setUserInterfaceItemState:enabled:state:]): Called when the WebProcess replies to the
1717 validation request to check/uncheck and enable/disable the menu item.
1719 2010-12-16 Anders Carlsson <andersca@apple.com>
1721 Reviewed by Oliver Hunt.
1723 Don't try to call plug-in member functions if the plug-in hasn't been initialized
1724 https://bugs.webkit.org/show_bug.cgi?id=51205
1725 <rdar://problem/8730204>
1727 Make sure that all PluginView functions that can be called while a plug-in has not been
1728 initialized (if the plug-in page is in a background tab for example) have an additional
1729 check for m_isInitialized.
1731 * WebProcess/Plugins/PluginView.cpp:
1732 (WebKit::PluginView::setWindowIsFocused):
1733 (WebKit::PluginView::windowAndViewFramesChanged):
1734 (WebKit::PluginView::platformLayer):
1735 (WebKit::PluginView::scriptObject):
1736 (WebKit::PluginView::privateBrowsingStateChanged):
1737 (WebKit::PluginView::handleEvent):
1738 (WebKit::PluginView::viewGeometryDidChange):
1739 (WebKit::PluginView::setFocus):
1741 2010-12-16 Anders Carlsson <andersca@apple.com>
1743 Reviewed by John Sullivan.
1745 Add a bunch of m_isStarted assertions to plug-in code.
1747 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1748 (WebKit::NetscapePlugin::frameDidFinishLoading):
1749 (WebKit::NetscapePlugin::frameDidFail):
1750 (WebKit::NetscapePlugin::didEvaluateJavaScript):
1751 (WebKit::NetscapePlugin::streamDidReceiveResponse):
1752 (WebKit::NetscapePlugin::streamDidReceiveData):
1753 (WebKit::NetscapePlugin::streamDidFinishLoading):
1754 (WebKit::NetscapePlugin::streamDidFail):
1755 (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
1756 (WebKit::NetscapePlugin::manualStreamDidReceiveData):
1757 (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
1758 (WebKit::NetscapePlugin::manualStreamDidFail):
1759 (WebKit::NetscapePlugin::handleMouseEvent):
1760 (WebKit::NetscapePlugin::handleWheelEvent):
1761 (WebKit::NetscapePlugin::handleMouseEnterEvent):
1762 (WebKit::NetscapePlugin::handleMouseLeaveEvent):
1763 (WebKit::NetscapePlugin::handleKeyboardEvent):
1764 (WebKit::NetscapePlugin::setFocus):
1765 (WebKit::NetscapePlugin::pluginScriptableNPObject):
1766 (WebKit::NetscapePlugin::privateBrowsingStateChanged):
1768 2010-12-16 Anders Carlsson <andersca@apple.com>
1770 Reviewed by Darin Adler.
1772 Save the manual plug-in stream data and redeliver it when the plug-in is initialized
1773 https://bugs.webkit.org/show_bug.cgi?id=51201
1775 * WebProcess/Plugins/PluginView.cpp:
1776 (WebKit::PluginView::PluginView):
1777 Initialize m_manualStreamState.
1779 (WebKit::PluginView::manualLoadDidReceiveResponse):
1780 If the plug-in hasn't been initialized, store the response.
1782 (WebKit::PluginView::manualLoadDidReceiveData):
1783 If the plug-in hasn't been initialized, store the data.
1785 (WebKit::PluginView::manualLoadDidFinishLoading):
1786 If the plug-in hasn't been initialized, update the state.
1788 (WebKit::PluginView::manualLoadDidFail):
1789 If the plug-in hasn't been initialized, store the error and update the state.
1791 (WebKit::PluginView::initializePlugin):
1792 Call redeliverManualStream.
1794 (WebKit::PluginView::redeliverManualStream):
1795 Redeliver the manual stream to the plug-in.
1797 * WebProcess/Plugins/PluginView.h:
1799 2010-12-16 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
1801 Reviewed by Andreas Kling.
1803 [Qt] Turn off drawing area updates if the item is not visible
1805 The updates are controlled by the QGraphicsItem::visible property.
1807 * UIProcess/API/qt/qgraphicswkview.cpp:
1808 (QGraphicsWKViewPrivate::updateViewportSize):
1809 (QGraphicsWKView::setGeometry):
1810 (QGraphicsWKView::itemChange):
1812 2010-12-15 Dan Bernstein <mitz@apple.com>
1814 Reviewed by Sam Weinig.
1816 <rdar://problem/8731320> WebProcess’s CFNetwork cache is in ~/Library/Caches/com.apple.WebProcess
1818 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1819 (WebKit::ProcessLauncher::launchProcess): Get the location, disk capacity and memory capacity
1820 of the UI process’s NSURLCache and pass them to the WebProcess.
1821 * WebProcess/mac/WebProcessMainMac.mm:
1822 (WebKit::WebProcessMain): If an NSURLCache location was passed on the command line, set the
1823 shared NSURLCache to that path and use the specified capacities as initial values.
1825 2010-12-15 Dan Bernstein <mitz@apple.com>
1827 Reviewed by Sam “I blame andersca” Weinig.
1829 Allow responses to be cached by the NSURLCache.
1831 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1832 (WebKit::WebFrameLoaderClient::willCacheResponse): Changed to return the response instead of 0.
1834 2010-12-14 Enrica Casucci <enrica@apple.com>
1836 Reviewed by Adam Roben.
1838 Add IME support to WebKit2 on Windows
1839 https://bugs.webkit.org/show_bug.cgi?id=51049
1840 The implementation is very close to the one in WebKit.
1841 The main change is the addition of handlers for WM_IME_STARTCOMPOSITION,
1842 WM_IME_REQUEST, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION,
1843 WM_IME_SELECT, WM_IME_SETCONTEXT and a number of new messages
1844 between the UI process and the WebProcess to send/retrieve
1845 the data being handled by the messages listed above.
1847 * UIProcess/PageClient.h: Added compositionSelectionChanged for Windows platform.
1848 * UIProcess/WebPageProxy.cpp:
1849 The following methods send synchronous messages to the WebProcess.
1850 (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Retrieves the rectangle to position
1851 the cnadidates window.
1852 (WebKit::WebPageProxy::getSelectedText): Retrieves the currently selected text.
1853 The following methods send asynchronous messages to the WebProcess.
1854 (WebKit::WebPageProxy::confirmComposition):
1855 (WebKit::WebPageProxy::setComposition):
1856 (WebKit::WebPageProxy::didChangeSelection): Name changed.
1857 (WebKit::WebPageProxy::didChangeCompositionSelection): Called when there is a change
1858 in the composition selection.
1859 * UIProcess/WebPageProxy.messages.in: Added messages corresponding to the methods above.
1860 * UIProcess/win/WebView.cpp:
1861 (WebKit::WebView::wndProc): Added handling of messages for IME.
1862 The following are the handlers for the window message being sent during composition.
1863 (WebKit::WebView::onIMEComposition):
1864 (WebKit::WebView::onIMEEndComposition):
1865 (WebKit::WebView::onIMERequestCharPosition):
1866 (WebKit::WebView::onIMERequestReconvertString):
1867 (WebKit::WebView::onIMERequest):
1868 (WebKit::WebView::onIMESelect):
1869 (WebKit::WebView::onIMESetContext):
1870 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1871 (WebKit::WebEditorClient::respondToChangedSelection): Added notification
1872 of composition selection changed for Windows.
1873 * WebProcess/WebPage/win/WebPageWin.cpp:
1874 The following are the WebProcess counterparts of the new messages.
1875 (WebKit::WebPage::confirmComposition):
1876 (WebKit::WebPage::setComposition):
1877 (WebKit::WebPage::firstRectForCharacterInSelectedRange):
1878 (WebKit::WebPage::getSelectedText):
1880 2010-12-15 Sam Weinig <sam@webkit.org>
1882 Reviewed by Brady Eidson.
1884 Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
1885 <rdar://problem/8774683>
1886 https://bugs.webkit.org/show_bug.cgi?id=51143
1888 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1889 (WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
1890 are not a custom representation (eg. a PDF).
1891 (WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.
1892 * WebProcess/WebPage/WebPage.cpp:
1893 (WebKit::WebPage::updatePreferences): Enable the page cache.
1895 2010-12-15 Simon Fraser <simon.fraser@apple.com>
1897 Reviewed by Adele Peterson.
1899 WebKit2 in compositing mode no longer has font smoothing
1900 https://bugs.webkit.org/show_bug.cgi?id=50733
1902 Tell the root GraphicsLayer that its contents are opaque
1903 if the WebPage draws its background, and that background
1906 The GraphicsLayer then uses the 'contentsOpaque' setting to
1907 determine whether to use font smoothing.
1909 Add pageBackgroundTransparencyChanged() to DrawingArea
1910 so that the WebPage can inform the DrawingArea when the
1911 background transparency changes.
1913 * WebProcess/WebPage/DrawingArea.h:
1914 (WebKit::DrawingArea::pageBackgroundTransparencyChanged):
1915 (WebKit::DrawingArea::onPageClose):
1916 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1917 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1918 (WebKit::LayerBackedDrawingArea::pageBackgroundTransparencyChanged):
1919 * WebProcess/WebPage/LayerBackedDrawingArea.h:
1920 * WebProcess/WebPage/WebPage.cpp:
1921 (WebKit::WebPage::setDrawsBackground):
1922 (WebKit::WebPage::setDrawsTransparentBackground):
1924 2010-12-15 Anders Carlsson <andersca@apple.com>
1926 Reviewed by Sam Weinig.
1928 Fix assertion in plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html test
1929 https://bugs.webkit.org/show_bug.cgi?id=51136
1931 Ensure that a plug-in that has explicitly cancelled the manual stream won't get any more callbacks.
1933 * PluginProcess/PluginControllerProxy.cpp:
1934 (WebKit::PluginControllerProxy::PluginControllerProxy):
1935 (WebKit::PluginControllerProxy::cancelManualStreamLoad):
1936 (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
1937 (WebKit::PluginControllerProxy::manualStreamDidReceiveData):
1938 (WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
1939 (WebKit::PluginControllerProxy::manualStreamDidFail):
1940 * PluginProcess/PluginControllerProxy.h:
1942 2010-12-15 Brian Weinstein <bweinstein@apple.com>
1944 Windows Build Fix. A .h file was added to the vcproj twice, but not its corresponding cpp file.
1946 * win/WebKit2.vcproj:
1948 2010-12-15 Sam Weinig <sam@webkit.org>
1950 Reviewed by Anders Carlsson.
1952 WebKit2: Can't add files to an <input type=file>
1953 https://bugs.webkit.org/show_bug.cgi?id=51087
1955 * Scripts/webkit2/messages.py:
1958 * Shared/API/c/WKBase.h:
1959 Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
1961 * Shared/APIObject.h:
1962 Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
1964 * Shared/WebOpenPanelParameters.cpp: Added.
1965 (WebKit::WebOpenPanelParameters::create):
1966 (WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
1967 (WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
1968 (WebKit::WebOpenPanelParameters::Data::encode):
1969 (WebKit::WebOpenPanelParameters::Data::decode):
1970 * Shared/WebOpenPanelParameters.h: Added.
1971 (WebKit::WebOpenPanelParameters::allowMultipleFiles):
1972 (WebKit::WebOpenPanelParameters::type):
1973 Class representing options one can pass to open panel.
1975 * UIProcess/API/C/WKAPICast.h:
1976 Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
1978 * UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
1979 (WKOpenPanelParametersGetTypeID):
1980 (WKOpenPanelParametersGetAllowsMultipleFiles):
1981 * UIProcess/API/C/WKOpenPanelParameters.h: Added.
1982 * UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
1983 (WKOpenPanelResultListenerGetTypeID):
1984 (WKOpenPanelResultListenerChooseFiles):
1985 (WKOpenPanelResultListenerCancel):
1986 * UIProcess/API/C/WKOpenPanelResultListener.h: Added.
1989 * UIProcess/API/C/WKPage.h:
1990 Add new UI callback, WKPageRunOpenPanelCallback.
1992 * UIProcess/API/C/WebKit2.h:
1993 Add includes for new API headers.
1995 * UIProcess/API/qt/qwkpage.cpp:
1997 Stub out the runOpenPanel callback.
1999 * UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
2000 (WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
2001 (WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
2002 (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
2003 (WebKit::WebOpenPanelResultListenerProxy::cancel):
2004 (WebKit::WebOpenPanelResultListenerProxy::invalidate):
2005 * UIProcess/WebOpenPanelResultListenerProxy.h: Added.
2006 (WebKit::WebOpenPanelResultListenerProxy::create):
2007 (WebKit::WebOpenPanelResultListenerProxy::type):
2008 Adds the listener used to choose files for <input type=file>
2010 * UIProcess/WebPageProxy.cpp:
2011 (WebKit::WebPageProxy::runOpenPanel):
2012 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
2013 (WebKit::WebPageProxy::didCancelForOpenPanel):
2014 * UIProcess/WebPageProxy.h:
2015 * UIProcess/WebPageProxy.messages.in:
2016 * UIProcess/WebUIClient.cpp:
2017 (WebKit::WebUIClient::runOpenPanel):
2018 * UIProcess/WebUIClient.h:
2019 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2020 (WebKit::WebChromeClient::runOpenPanel):
2021 * WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
2022 (WebKit::WebOpenPanelResultListener::create):
2023 (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
2024 (WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
2025 (WebKit::WebOpenPanelResultListener::didChooseFiles):
2026 * WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
2027 (WebKit::WebOpenPanelResultListener::disconnectFromPage):
2028 * WebProcess/WebPage/WebPage.cpp:
2029 (WebKit::WebPage::close):
2030 (WebKit::WebPage::setActiveOpenPanelResultListener):
2031 (WebKit::WebPage::didChooseFilesForOpenPanel):
2032 (WebKit::WebPage::didCancelForOpenPanel):
2033 * WebProcess/WebPage/WebPage.h:
2034 (WebKit::WebPage::activeOpenPanelResultListener):
2035 * WebProcess/WebPage/WebPage.messages.in:
2036 Pipe through file choosing.
2039 * WebKit2.xcodeproj/project.pbxproj:
2040 * win/WebKit2.vcproj:
2041 * win/WebKit2Generated.make:
2044 2010-12-15 Anders Carlsson <andersca@apple.com>
2046 Reviewed by Maciej Stachowiak.
2048 Semi-reproducible crash in ChunkedUpdateDrawingArea::paintIntoUpdateChunk closing a particular yahoo page
2049 https://bugs.webkit.org/show_bug.cgi?id=51126
2050 <rdar://problem/8771219>
2052 Laying out the web page can cause the drawing area to change so we need to protect against this.
2054 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2055 (WebKit::ChunkedUpdateDrawingArea::display):
2056 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2057 (WebKit::LayerBackedDrawingArea::display):
2058 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2059 (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
2061 2010-12-15 Brian Weinstein <bweinstein@apple.com>
2063 Reviewed by Adam Roben.
2065 WebKit2: WebPageWin needs implementations of hasLocalDataForURL and canHandleRequest
2066 https://bugs.webkit.org/show_bug.cgi?id=51090
2068 Implement these functions for WebKit2 on Windows.
2070 * WebProcess/WebPage/WebPage.cpp:
2071 (WebKit::WebPage::hasLocalDataForURL): Does the cross-platform part of the check for having local
2072 data (file URL or subresource), then calls platformHasLocalDataForURL to let the platform do
2073 their specific checks.
2074 * WebProcess/WebPage/WebPage.h:
2075 * WebProcess/WebPage/mac/WebPageMac.mm:
2076 (WebKit::WebPage::platformHasLocalDataForURL): Moved the cross-platform code from here to WebPage::hasLocalDataForURL.
2077 * WebProcess/WebPage/qt/WebPageQt.cpp:
2078 (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL.
2079 * WebProcess/WebPage/win/WebPageWin.cpp:
2080 (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL and implemented with CFNetwork calls. This is the
2081 CFNetwork equivalent of the code in WebPageMac::platformHasLocalDataForURL.
2082 (WebKit::WebPage::canHandleRequest): Copied the line of code from WebView::canHandleRequest in WebKit1, with a FIXME saying
2083 this might not be enough (although it was in WebKit1 on Windows).
2085 2010-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
2087 Unreviewed, rolling out r74117.
2088 http://trac.webkit.org/changeset/74117
2089 https://bugs.webkit.org/show_bug.cgi?id=51113
2091 This broke the GTK1 build. (Requested by mrobinson on
2094 * GNUmakefile.am: Removed.
2095 * Scripts/generate-forwarding-headers.pl:
2097 * gtk/webkit2.pc.in: Removed.
2099 2010-12-15 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
2101 Reviewed by Martin Robinson.
2103 Changes to enable building WebKit2 for Gtk port.
2104 (https://bugs.webkit.org/show_bug.cgi?id=37369)
2106 * GNUmakefile.am: Added.
2107 * Scripts/generate-forwarding-headers.pl: For GTK port, taking 1 extra argument for copying network headers.
2108 * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header file for WebKit2 sources files.
2110 * gtk/webkit2.pc.in: Added.
2112 2010-12-15 Jan Erik Hanssen <jhanssen@sencha.com>
2114 Reviewed by Andreas Kling.
2116 [Qt][WK2] webkit2 does not compile on OS X
2117 https://bugs.webkit.org/show_bug.cgi?id=50128
2119 prctl(2) is only available on Linux, so use an atexit handler for killing
2120 all the child processes when the process is exiting.
2122 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2123 (WebKit::cleanupProcesses):
2124 (WebKit::QtWebProcess::QtWebProcess):
2125 (WebKit::QtWebProcess::processStateChanged):
2126 (WebKit::ProcessLauncherHelper::instance):
2128 2010-12-14 Anders Carlsson <andersca@apple.com>
2132 * win/WebKit2Common.vsprops:
2134 2010-12-14 Anders Carlsson <andersca@apple.com>
2140 2010-12-14 Anders Carlsson <andersca@apple.com>
2142 Reviewed by TYPO FIX.
2146 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2147 (WebKit::NetscapePluginModule::determineQuirks):
2149 2010-12-14 Anders Carlsson <andersca@apple.com>
2151 Reviewed by Sam Weinig.
2153 Cannot type into plugin edit field
2154 https://bugs.webkit.org/show_bug.cgi?id=51074
2155 <rdar://problem/8483741>
2157 Add a PrognameShouldBeWebKitPluginHost quirk, since it turns out Flash Player calls getprogname() and checks
2158 if the return value is "WebKitPluginHost" in order to determine when to handle NPCocoaEventKeyDown events.
2160 * PluginProcess/PluginProcess.cpp:
2161 (WebKit::PluginProcess::netscapePluginModule):
2162 If the plug-in module has the PrognameShouldBeWebKitPluginHost quirk, call setprogname("WebKitPluginHost").
2164 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2165 (WebKit::NetscapePluginModule::load):
2166 Call determineQuirks()
2168 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2169 (WebKit::NetscapePluginModule::determineQuirks):
2170 Add the PrognameShouldBeWebKitPluginHost quirk for Flash.
2172 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
2173 (WebKit::NetscapePluginModule::determineQuirks):
2174 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2175 (WebKit::NetscapePluginModule::determineQuirks):
2178 * Shared/Plugins/PluginQuirks.h:
2179 Add new PluginQuirks file.
2181 * WebKit2.xcodeproj/project.pbxproj:
2184 2010-12-14 Anders Carlsson <andersca@apple.com>
2186 Reviewed by Sam Weinig.
2188 Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there
2189 https://bugs.webkit.org/show_bug.cgi?id=51066
2191 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
2192 (WebKit::NetscapePluginModule::getPluginInfo):
2193 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2194 (WebKit::PluginInfoStore::getPluginInfo):
2197 2010-12-14 Anders Carlsson <andersca@apple.com>
2199 Reviewed by Dan Bernstein.
2201 Move Windows version of getPluginInfo to NetscapePluginModule
2202 https://bugs.webkit.org/show_bug.cgi?id=51073
2204 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
2205 (WebKit::getVersionInfo):
2206 (WebKit::fileVersion):
2207 (WebKit::NetscapePluginModule::getPluginInfo):
2208 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2209 (WebKit::PluginInfoStore::getPluginInfo):
2210 * win/WebKit2.vcproj:
2212 2010-12-14 Alice Liu <alice.liu@apple.com>
2216 * UIProcess/WebProcessProxy.h:
2217 (WebKit::WebProcessProxy::sendSync):
2218 Move the default argument to the declaration.
2220 2010-12-14 Anders Carlsson <andersca@apple.com>
2222 Reviewed by Adam Roben.
2224 Move PluginInfoStore::getPluginInfo to NetscapePluginModule
2225 https://bugs.webkit.org/show_bug.cgi?id=51058
2227 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2228 Move implementation of PluginInfoStore::getPluginInfo and related
2229 helper functions here.
2231 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2232 (WebKit::PluginInfoStore::getPluginInfo):
2233 Just call NetscapePluginModule::getPluginInfo here for now.
2235 * WebKit2.xcodeproj/project.pbxproj:
2236 Add NetscapePluginModuleMac.mm.
2238 2010-12-14 Anders Carlsson <andersca@apple.com>
2240 Reviewed by John Sullivan.
2242 Switch name and description order when fetching Carbon plug-in info
2243 https://bugs.webkit.org/show_bug.cgi?id=46211
2245 The plug-in description comes before the name in the Carbon string list resource.
2247 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2248 (WebKit::getPluginInfoFromCarbonResources):
2250 2010-12-14 Anders Carlsson <andersca@apple.com>
2252 Reviewed by Adam Roben.
2254 Move NetscapePluginModule.{cpp|h} to Shared/Plugins/Netscape
2255 https://bugs.webkit.org/show_bug.cgi?id=51052
2257 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp.
2258 * Shared/Plugins/Netscape/NetscapePluginModule.h: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h.
2260 * WebKit2.xcodeproj/project.pbxproj:
2261 * win/WebKit2.vcproj:
2262 * win/WebKit2Common.vsprops:
2264 2010-12-14 Anders Carlsson <andersca@apple.com>
2266 Reviewed by Sam Weinig.
2268 Handle complex text input for plug-ins
2269 https://bugs.webkit.org/show_bug.cgi?id=51047
2271 * PluginProcess/PluginControllerProxy.cpp:
2272 (WebKit::PluginControllerProxy::sendComplexTextInput):
2273 Pass along the text input to the plug-in.
2275 * PluginProcess/PluginControllerProxy.messages.in:
2276 Add SendComplexTextInput message.
2278 * UIProcess/API/mac/WKTextInputWindowController.h: Added.
2279 * UIProcess/API/mac/WKTextInputWindowController.mm: Added.
2280 Add text input window controller, mostly copied from WebKit1.
2282 * UIProcess/API/mac/WKView.mm:
2283 (-[WKView keyDown:]):
2284 If needed, pass along the event to the text input window controller.
2286 (-[WKView inputContext]):
2287 Return the input context of the text input window controller.
2289 (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
2290 Notify the input window controller that the input source changed.
2292 * UIProcess/WebPageProxy.cpp:
2293 (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
2294 Send the complex text input to the web process.
2296 * WebKit2.xcodeproj/project.pbxproj:
2299 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2300 (WebKit::convertStringToKeyCodes):
2301 Convert a string to a vector of key codes in the current encoding.
2303 (WebKit::NetscapePlugin::sendComplexTextInput):
2304 In the Cocoa event model, create and dispatch an NPCocoaEventTextInput event.
2305 In the Carbon event model, convert the string to individual key codes and send them
2308 * WebProcess/Plugins/PluginProxy.cpp:
2309 (WebKit::PluginProxy::sendComplexTextInput):
2310 Send the text to the plug-in controller proxy.
2312 * WebProcess/Plugins/PluginView.cpp:
2313 (WebKit::PluginView::sendComplexTextInput):
2314 If the plug-in has a matching text input identifier, call Plugin::sendComplexTextInput.
2316 * WebProcess/WebPage/WebPage.messages.in:
2317 Add SendComplexTextInputToPlugin message.
2319 * WebProcess/WebPage/mac/WebPageMac.mm:
2320 (WebKit::WebPage::sendComplexTextInputToPlugin):
2321 Iterate over all known plug-in views and try to find one to send the text input to.
2323 2010-12-13 Alexey Proskuryakov <ap@apple.com>
2325 Reviewed by Adam Barth.
2327 https://bugs.webkit.org/show_bug.cgi?id=50953
2328 DNS Prefetch should be an opt-in feature
2330 Pass the preference through WebKit2.
2332 * Shared/WebPreferencesStore.h:
2333 * UIProcess/API/C/WKPreferences.cpp:
2334 (WKPreferencesSetDNSPrefetchingEnabled):
2335 (WKPreferencesGetDNSPrefetchingEnabled):
2336 * UIProcess/API/C/WKPreferences.h:
2337 * WebProcess/WebPage/WebPage.cpp:
2338 (WebKit::WebPage::updatePreferences):
2340 2010-12-13 Anders Carlsson <andersca@apple.com>
2342 Reviewed by Kevin Decker.
2344 Pass the complex text input status to the WKView
2345 https://bugs.webkit.org/show_bug.cgi?id=50993
2347 * UIProcess/API/mac/PageClientImpl.h:
2348 * UIProcess/API/mac/PageClientImpl.mm:
2349 (WebKit::PageClientImpl::setComplexTextInputEnabled):
2350 * UIProcess/API/mac/WKView.mm:
2351 (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
2352 * UIProcess/API/mac/WKViewInternal.h:
2353 * UIProcess/PageClient.h:
2354 * UIProcess/WebPageProxy.cpp:
2355 (WebKit::WebPageProxy::setComplexTextInputEnabled):
2357 2010-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
2359 Reviewed by Kenneth Rohde Christiansen.
2361 WebKit 2 does not send touch cancel events correctly between processes
2362 https://bugs.webkit.org/show_bug.cgi?id=50235
2364 The classes WebKit2PlatformTouchPoint and WebKit2PlatformTouchEvent
2365 misses the conversion of TouchCancel events and points.
2367 This patch add the missing enums when converting from a WebTouchEvent
2368 to a PlatformTouchEvent.
2370 Testing is already covered by fast/events/touch/send-oncancel-event.html
2372 * Shared/WebEventConversion.cpp:
2373 (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
2374 (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2376 2010-12-14 Zalan Bujtas <zbujtas@gmail.com>
2378 Reviewed by Kenneth Rohde Christiansen.
2380 Add loadFinished() for provisional load error
2381 This fixes the hanging UI state, when provisional load error occurs due to
2382 the async nature of policy check.
2384 https://bugs.webkit.org/show_bug.cgi?id=48724
2386 * UIProcess/API/qt/ClientImpl.cpp:
2388 (qt_wk_didFailProvisionalLoadWithErrorForFrame):
2389 (qt_wk_didFinishLoadForFrame):
2390 (qt_wk_didFailLoadWithErrorForFrame):
2392 2010-12-13 Sam Weinig <sam@webkit.org>
2394 Reviewed by Anders Carlsson.
2396 WebKit2: Need to be able to set the application name for the user agent for a WKPage
2397 https://bugs.webkit.org/show_bug.cgi?id=51011
2400 WebKit2: Need to be able to set the application name for the user agent for a WKPage
2401 <rdar://problem/8564532>
2402 WebKit2: Need to be able to get the computed user agent for a WKPage
2403 <rdar://problem/8637285>
2405 Moves user agent computation to the UIProcess and just passes it to the WebProcess
2406 when it has changed.
2408 * Shared/WebPageCreationParameters.cpp:
2409 (WebKit::WebPageCreationParameters::encode):
2410 (WebKit::WebPageCreationParameters::decode):
2411 * Shared/WebPageCreationParameters.h:
2412 Add a user agent to the creation parameters.
2414 * UIProcess/API/C/WKPage.cpp:
2415 (WKPageCopyUserAgent):
2416 (WKPageCopyApplicationNameForUserAgent):
2417 (WKPageSetApplicationNameForUserAgent):
2418 (WKPageSetCustomUserAgent):
2419 * UIProcess/API/C/WKPage.h:
2420 Add new API to set the application name and access the computed user agent.
2422 * UIProcess/WebPageProxy.cpp:
2423 (WebKit::WebPageProxy::WebPageProxy):
2424 (WebKit::WebPageProxy::close):
2425 (WebKit::WebPageProxy::setUserAgent):
2426 (WebKit::WebPageProxy::setApplicationNameForUserAgent):
2427 (WebKit::WebPageProxy::setCustomUserAgent):
2428 (WebKit::WebPageProxy::processDidCrash):
2429 (WebKit::WebPageProxy::creationParameters):
2430 * UIProcess/WebPageProxy.h:
2431 (WebKit::WebPageProxy::userAgent):
2432 (WebKit::WebPageProxy::applicationNameForUserAgent):
2433 * UIProcess/mac/WebPageProxyMac.mm: Added.
2434 * WebProcess/WebPage/WebPage.cpp:
2435 (WebKit::WebPage::WebPage):
2436 (WebKit::WebPage::setUserAgent):
2437 * WebProcess/WebPage/WebPage.h:
2438 (WebKit::WebPage::userAgent):
2439 * WebProcess/WebPage/WebPage.messages.in:
2440 Pipe through user agent.
2442 (WebKit::callGestalt):
2443 (WebKit::macOSXVersionString):
2444 (WebKit::userVisibleWebKitVersionString):
2445 (WebKit::WebPageProxy::standardUserAgent):
2446 * UIProcess/win/WebPageProxyWin.cpp: Added.
2447 (WebKit::windowsVersion):
2448 (WebKit::userVisibleWebKitVersionString):
2449 (WebKit::WebPageProxy::standardUserAgent):
2450 Port standardUserAgent computation from WebKit1.
2452 * UIProcess/qt/WebPageProxyQt.cpp: Added.
2453 (WebKit::WebPageProxy::standardUserAgent):
2454 Stub out the user agent so there is no change in behavior.
2457 * WebKit2.xcodeproj/project.pbxproj:
2458 * win/WebKit2.vcproj:
2461 2010-12-13 Brady Eidson <beidson@apple.com>
2463 Reviewed by Jon Honeycutt (and Brian Weinstein in heart).
2465 <rdar://problem/8752202> and https://bugs.webkit.org/show_bug.cgi?id=50997
2466 Expose "link title" and "link label" to InjectedBundleHitTestResult API
2468 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2469 (WKBundleHitTestResultCopyLinkLabel):
2470 (WKBundleHitTestResultCopyLinkTitle):
2471 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2473 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2474 (WebKit::InjectedBundleHitTestResult::linkLabel):
2475 (WebKit::InjectedBundleHitTestResult::linkTitle):
2476 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2478 2010-12-13 Brian Weinstein <bweinstein@apple.com>
2480 Windows Build Fix. Add a needed include.
2482 * UIProcess/win/WebView.cpp:
2484 2010-12-13 Sam Weinig <sam@webkit.org>
2486 Reviewed by Anders Carlsson.
2488 Remove associated page concept from WKView constructor
2489 https://bugs.webkit.org/show_bug.cgi?id=50983
2491 Step 2: Remove WebPageNamespace. It no longer does anything.
2493 * Shared/APIObject.h:
2494 * UIProcess/API/C/WKPage.h:
2495 * UIProcess/API/mac/WKView.mm:
2496 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2497 * UIProcess/API/qt/qgraphicswkview.cpp:
2498 * UIProcess/API/qt/qwkcontext.cpp:
2499 (QWKContext::QWKContext):
2500 * UIProcess/API/qt/qwkcontext_p.h:
2501 * UIProcess/API/qt/qwkpage.cpp:
2502 (QWKPagePrivate::QWKPagePrivate):
2503 * UIProcess/API/qt/qwkpage_p.h:
2504 * UIProcess/WebContext.cpp:
2505 (WebKit::WebContext::WebContext):
2506 (WebKit::WebContext::~WebContext):
2507 (WebKit::WebContext::createWebPage):
2508 * UIProcess/WebContext.h:
2509 * UIProcess/WebPageNamespace.cpp: Removed.
2510 * UIProcess/WebPageNamespace.h: Removed.
2511 * UIProcess/WebPageProxy.cpp:
2512 * UIProcess/WebPageProxy.h:
2513 (WebKit::WebPageProxy::context):
2514 * UIProcess/WebProcessProxy.cpp:
2515 (WebKit::WebProcessProxy::createWebPage):
2516 * UIProcess/WebProcessProxy.h:
2517 * UIProcess/win/WebView.cpp:
2518 (WebKit::WebView::WebView):
2519 * UIProcess/win/WebView.h:
2521 * WebKit2.xcodeproj/project.pbxproj:
2522 * win/WebKit2.vcproj:
2524 2010-12-13 Sam Weinig <sam@webkit.org>
2528 * UIProcess/win/WebView.h:
2530 2010-12-13 Sam Weinig <sam@webkit.org>
2534 * UIProcess/win/WebInspectorProxyWin.cpp:
2535 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2536 * UIProcess/win/WebView.h:
2537 (WebKit::WebView::create):
2539 2010-12-13 Sam Weinig <sam@webkit.org>
2541 Reviewed by Anders Carlsson.
2543 Remove associated page concept from WKView constructor
2544 https://bugs.webkit.org/show_bug.cgi?id=50983
2546 Step 1: Remove associate page constructors from WKView and make
2547 all views use the shared namespace for the context.
2549 * UIProcess/API/C/win/WKView.cpp:
2550 * UIProcess/API/C/win/WKView.h:
2551 * UIProcess/API/mac/WKView.h:
2552 * UIProcess/API/mac/WKView.mm:
2553 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2554 * UIProcess/API/qt/qwkcontext.cpp:
2555 * UIProcess/API/qt/qwkcontext.h:
2556 * UIProcess/mac/WebInspectorProxyMac.mm:
2557 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2558 * UIProcess/win/WebView.cpp:
2559 (WebKit::WebView::WebView):
2560 * UIProcess/win/WebView.h:
2561 (WebKit::WebView::create):
2563 2010-12-13 Anders Carlsson <andersca@apple.com>
2567 * UIProcess/WebPageProxy.h:
2569 2010-12-13 Brian Weinstein <bweinstein@apple.com>
2571 Reviewed by Adam Roben.
2573 WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
2574 https://bugs.webkit.org/show_bug.cgi?id=50975
2575 <rdar://problem/8763501>
2577 Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.
2579 * UIProcess/WebInspectorProxy.cpp:
2580 (WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.
2581 * UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
2582 * UIProcess/win/WebInspectorProxyWin.cpp:
2583 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.
2585 2010-12-13 Anders Carlsson <andersca@apple.com>
2587 Reviewed by Darin Adler.
2589 Pass the complex text input state all the way to the UI process
2590 https://bugs.webkit.org/show_bug.cgi?id=50980
2592 * PluginProcess/PluginControllerProxy.cpp:
2593 (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
2594 * UIProcess/WebPageProxy.cpp:
2595 (WebKit::WebPageProxy::setComplexTextInputEnabled):
2596 * UIProcess/WebPageProxy.h:
2597 * UIProcess/WebPageProxy.messages.in:
2598 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2599 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2600 (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
2601 * WebProcess/Plugins/Plugin.h:
2602 * WebProcess/Plugins/PluginProxy.cpp:
2603 (WebKit::PluginProxy::pluginComplexTextInputIdentifier):
2604 (WebKit::PluginProxy::setComplexTextInputEnabled):
2605 * WebProcess/Plugins/PluginProxy.h:
2606 * WebProcess/Plugins/PluginProxy.messages.in:
2607 * WebProcess/Plugins/PluginView.cpp:
2608 (WebKit::PluginView::setComplexTextInputEnabled):
2610 2010-12-13 Sam Weinig <sam@webkit.org>
2612 Reviewed by Anders Carlsson.
2614 Change the WebKit2 public API so there is no explicit WKPageNamespace object
2615 https://bugs.webkit.org/show_bug.cgi?id=50898
2617 * Shared/API/c/WKBase.h: Remove definition of WKPageNamespaceRef.
2618 * UIProcess/API/C/WKAPICast.h: Remove toAPI/toImpl for WKPageNamespaceRef.
2620 * UIProcess/API/C/WKPage.cpp:
2621 * UIProcess/API/C/WKPage.h:
2622 Replace WKPageGetPageNamespace with WKPageGetContext.
2624 * UIProcess/API/C/WKPageNamespace.cpp: Removed.
2625 * UIProcess/API/C/WKPageNamespace.h: Removed.
2627 * UIProcess/API/C/WebKit2.h: Remove #include of WKPageNamespace.h.
2629 * UIProcess/API/C/win/WKView.cpp:
2630 (WKViewCreate): Changed to take a WKContextRef instead of a WKPageNamespaceRef.
2631 (WKViewCreateUsingSharedProcess): Added. Similar to WKViewCreate except that
2632 all callers of it will have their views end up in the same shared process, whereas
2633 with WKViewCreate, a new internal page namespace will be created and could place
2634 the view's WebPage into a new process.
2635 (WKViewCreateForAssociatedPage): Added. Creates a view that is forced to use the
2636 same process as the passed in page.
2638 * UIProcess/win/WebView.cpp:
2639 (WebKit::WebView::WebView):
2640 (WebKit::WebView::initialize):
2641 * UIProcess/win/WebView.h:
2642 (WebKit::WebView::create):
2643 (WebKit::WebView::createUsingSharedProcess):
2644 (WebKit::WebView::createForAssociatedPage):
2645 Implementation of the WKView create functions.
2647 * UIProcess/API/C/win/WKView.h:
2648 * UIProcess/API/mac/WKView.h:
2649 * UIProcess/API/mac/WKView.mm:
2650 (-[WKView initWithFrame:]):
2651 (-[WKView initWithFrame:contextRef:]):
2652 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2653 (-[WKView initWithFrame:contextRef:usingSharedProcess:]):
2654 (-[WKView initWithFrame:contextRef:pageGroupRef:usingSharedProcess:]):
2655 (-[WKView initWithFrame:forAssociatedPageRef:]):
2656 (-[WKView initWithFrame:forAssociatedPageRef:pageGroupRef:]):
2657 (-[WKView initWithFrame:pageNamespace:pageGroup:]):
2658 Add new initializers for the objective-c WKView. It follows the same
2659 pattern as WKViewRef.
2661 * UIProcess/API/qt/qwkcontext.cpp:
2662 (QWKContext::QWKContext):
2663 * UIProcess/API/qt/qwkcontext.h:
2664 Remove uses of WKPageNamespaceRef.
2666 * UIProcess/WebContext.cpp:
2667 (WebKit::WebContext::sharedPageNamespace): Returns a shared
2668 page namespace used by the view's createUsingSharedProcess constructions.
2669 (WebKit::WebContext::createPageNamespace): Change to return
2670 a PassRefPtr to make things clearer.
2671 (WebKit::WebContext::pageNamespaceWasDestroyed): Clear the shared
2672 namespace if it is cleared.
2673 * UIProcess/WebContext.h:
2675 * UIProcess/WebPageNamespace.h: Remove unused "struct WKContextStatistics".
2677 * UIProcess/WebPageProxy.cpp:
2678 (WebKit::WebPageProxy::context):
2679 * UIProcess/WebPageProxy.h:
2682 * UIProcess/mac/WebInspectorProxyMac.mm:
2683 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2684 * UIProcess/win/WebInspectorProxyWin.cpp:
2685 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2686 Use forAssociatedPageRef constructor for the WebInspector view.
2689 * WebKit2.xcodeproj/project.pbxproj:
2690 * win/WebKit2.vcproj:
2691 * win/WebKit2Generated.make:
2692 Remove WKPageNamespace.h/cpp.
2694 2010-12-13 Brent Fulgham <bfulgham@webkit.org>
2696 Unreviewed build fix.
2698 * UIProcess/win/WebInspectorProxyWin.cpp: Non-Apple builds
2699 need to include <wtf/RetainPtr.h>.
2701 2010-12-13 Brent Fulgham <bfulgham@webkit.org>
2703 Unreviewed build fix after r73807.
2705 Added stub implementation of Download object.
2707 * WebProcess/Downloads/curl: Added.
2708 * WebProcess/Downloads/curl/DownloadCurl.cpp: Added.
2709 (WebKit::Download::start):
2710 (WebKit::Download::startWithHandle):
2711 (WebKit::Download::cancel):
2712 (WebKit::Download::platformInvalidate):
2713 * win/WebKit2.vcproj: Exclude DownloadCFNet for Cairo builds,
2714 added DownloadCurl (excluded for regular Apple builds.)
2716 2010-12-13 Anders Carlsson <andersca@apple.com>
2718 Reviewed by Sam Weinig.
2720 Add the ability for plug-ins to toggle complex text input
2721 https://bugs.webkit.org/show_bug.cgi?id=50966
2723 * PluginProcess/PluginControllerProxy.cpp:
2724 (WebKit::PluginControllerProxy::PluginControllerProxy):
2725 Initialize m_isComplexTextInputEnabled.
2727 (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
2728 Update m_isComplexTextInputEnabled.
2730 * PluginProcess/PluginControllerProxy.h:
2731 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2732 (WebKit::NetscapePlugin::NetscapePlugin):
2733 Initialize m_pluginHasFocus and m_windowHasFocus.
2735 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2736 (WebKit::NetscapePlugin::isWindowActive):
2737 Return m_windowHasFocus.
2739 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2740 (WebKit::NetscapePlugin::platformSetFocus):
2741 Update m_pluginHasFocus and call setComplexTextInputEnabled.
2743 (WebKit::NetscapePlugin::windowFocusChanged):
2744 Update m_windowHasFocus and call setComplexTextInputEnabled.
2746 * WebProcess/Plugins/PluginController.h:
2747 Add setComplexTextInputEnabled.
2749 * WebProcess/Plugins/PluginView.cpp:
2750 (WebKit::PluginView::setComplexTextInputEnabled):
2751 * WebProcess/Plugins/PluginView.h:
2752 Add setComplexTextInputEnabled
2754 2010-12-13 David Hyatt <hyatt@apple.com>
2756 Reviewed by Adam Roben.
2758 Remove the space behavior that I added. It's covered in EventHandler in WebCore
2759 already for Windows.
2761 * WebProcess/WebPage/win/WebPageWin.cpp:
2762 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2764 2010-12-13 David Hyatt <hyatt@apple.com>
2766 Reviewed by Sam Weinig.
2768 https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. Use
2769 logical scrolling instead of physical scrolling for those keys in WebKit2.
2771 * WebProcess/WebPage/mac/WebPageMac.mm:
2772 (WebKit::logicalScroll):
2773 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2774 * WebProcess/WebPage/qt/WebPageQt.cpp:
2775 (WebKit::logicalScroll):
2776 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2777 * WebProcess/WebPage/win/WebPageWin.cpp:
2778 (WebKit::logicalScroll):
2779 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2781 2010-12-13 Brian Weinstein <bweinstein@apple.com>
2783 Reviewed by Darin Adler.
2785 WebKit2: Focusing Web Inspector window doesn't focus contents on Windows
2786 https://bugs.webkit.org/show_bug.cgi?id=50947
2787 <rdar://problem/8762468>
2789 When we get the notification that the inspector window has focused, focus the inner inspector view.
2791 * UIProcess/WebInspectorProxy.h:
2792 * UIProcess/win/WebInspectorProxyWin.cpp:
2793 (WebKit::WebInspectorProxy::onSetFocusEvent): Set the focus of the inspector view, because that is what
2794 needs to be focused in the inspector window.
2796 2010-12-13 Dan Bernstein <mitz@apple.com>
2800 * WebProcess/Downloads/mac/DownloadMac.mm:
2801 (WebKit::originatingURLFromBackForwardList):
2803 2010-12-13 Balazs Kelemen <kbalazs@webkit.org>
2805 Unreviewed trivial build fix (linux, 64 bit, gcc-4.5.1)
2807 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2808 (WebKit::WebChromeClient::exceededDatabaseQuota):
2809 Don't use unsigned long long as alias for uint64_t.
2811 2010-12-13 Anders Carlsson <andersca@apple.com>
2813 Reviewed by John Sullivan.
2815 Crash when clicking a download link that targets a new tab
2816 https://bugs.webkit.org/show_bug.cgi?id=50935
2817 <rdar://problem/8760572>
2819 Check for a null history item.
2821 * WebProcess/Downloads/mac/DownloadMac.mm:
2822 (WebKit::originatingURLFromBackForwardList):
2824 2010-12-13 Andras Becsi <abecsi@webkit.org>
2826 Reviewed by Csaba Osztrogonác.
2828 [Qt][WK2] Fix build if WebKitTools are not available
2829 https://bugs.webkit.org/show_bug.cgi?id=50242
2831 * DerivedSources.pro: Remove dependency to WebKitTools.
2832 * Scripts/generate-forwarding-headers.pl: Moved from WebKitTools/Scripts/generate-forwarding-headers.pl.
2834 2010-12-13 Csaba Osztrogonác <ossy@webkit.org>
2838 * WebKit2.pro: Remove non-existant Shared/DrawingAreaBase.h from build system.
2840 2010-10-28 MORITA Hajime <morrita@google.com>
2842 Reviewed by Ojan Vafai.
2844 spellcheck does not check pasted text
2845 https://bugs.webkit.org/show_bug.cgi?id=40092
2847 Added a stub implememntation.
2849 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2850 (WebKit::WebEditorClient::requestCheckingOfString):
2851 * WebProcess/WebCoreSupport/WebEditorClient.h:
2853 2010-12-12 Brian Weinstein <bweinstein@apple.com>
2855 Reviewed by Tim Hatcher.
2857 WebKit2: Implement WebInspector::localizedStringsURL on Windows
2858 https://bugs.webkit.org/show_bug.cgi?id=50896
2860 Find the localized strings file using CFBundleCopyResourceURL.
2862 * WebProcess/WebPage/win/WebInspectorWin.cpp:
2863 (WebKit::WebInspector::localizedStringsURL):
2865 2010-12-12 Sam Weinig <sam@webkit.org>
2867 Reviewed by Anders Carlsson.
2869 Give LogTextInput a sensible flag value.
2871 * Platform/Logging.cpp:
2873 2010-12-12 Sam Weinig <sam@webkit.org>
2875 Reviewed by Anders Carlsson.
2877 Remove incorrect assertion that has been firing in the API tester.
2879 * UIProcess/WebDatabaseManagerProxy.cpp:
2880 (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
2882 2010-12-12 Sam Weinig <sam@webkit.org>
2884 Reviewed by Anders Carlsson.
2886 Disable WebKit2 logging by default.
2887 https://bugs.webkit.org/show_bug.cgi?id=50878
2889 * Platform/Logging.cpp:
2890 (initializeLogChannelsIfNecessary):
2892 2010-12-11 Brian Weinstein <bweinstein@apple.com>
2894 Reviewed by Sam Weinig.
2896 Web Inspector: Make inspector on Windows show and be usable in WebKit2
2897 https://bugs.webkit.org/show_bug.cgi?id=50877
2899 Hook up the unimplemented methods in WebInspectorProxyWin to get the web inspector
2900 showing and usable in WebKit2 on Windows.
2902 * UIProcess/WebInspectorProxy.cpp:
2903 (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize Windows-specific variables to 0.
2904 * UIProcess/WebInspectorProxy.h:
2905 * UIProcess/win/WebInspectorProxyWin.cpp:
2906 (WebKit::WebInspectorProxy::registerInspectorViewWindowClass): Sets up the inspector view class.
2907 (WebKit::WebInspectorProxy::InspectorViewWndProc): Calls through to the WebInspectorProxy's non-static
2909 (WebKit::WebInspectorProxy::wndProc): Handles WM_SIZE, WM_CLOSE, and WM_GETMINMAXINFO, the rest go to
2911 (WebKit::WebInspectorProxy::onSizeEvent): Resize the WKView that has the inspector page to match the
2912 outer window that was just resized.
2913 (WebKit::WebInspectorProxy::onMinMaxInfoEvent): Set the minimum size the window can be resized to.
2914 (WebKit::WebInspectorProxy::onCloseEvent): Hide the window, and call WebInspectorProxy::close.
2915 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WKView and return its page.
2916 (WebKit::WebInspectorProxy::platformOpen): Create an HWND for the inspector, put the inspector's WKView
2917 inside of it, and show the window.
2918 (WebKit::WebInspectorProxy::platformClose): Destroy the inspector's window (which destroys the child WKView),
2919 and 0 out instance variables.
2920 (WebKit::WebInspectorProxy::inspectorPageURL): Finds inspector/inspector.html in the WebKit bundle.
2922 2010-12-12 Balazs Kelemen <kbalazs@webkit.org>
2924 Reviewed by Andreas Kling.
2926 [Qt][WK2] Crash in WebPage constructor.
2927 https://bugs.webkit.org/show_bug.cgi?id=50892
2929 * WebProcess/qt/WebProcessQt.cpp:
2930 (WebKit::WebProcess::platformInitializeWebProcess):
2931 Disable runtime enabled features that have no WebKit2 implementation yet.
2933 2010-12-10 Jon Honeycutt <jhoneycutt@apple.com>
2935 Select menus with short option titles do not paint properly
2936 https://bugs.webkit.org/show_bug.cgi?id=50860
2937 <rdar://problem/8660807>
2939 The backing stores used for painting the popup menu items were only as
2940 wide as the widest option title, but the popup window that we create is
2941 at least as wide as the <select> element. This adjusts the backing
2942 stores to be at least as wide as the <select>, as well.
2944 Reviewed by Sam Weinig.
2946 * UIProcess/win/WebPopupMenuProxyWin.cpp:
2947 (WebKit::WebPopupMenuProxyWin::paint):
2948 Paint using the width of the backing store.
2950 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2951 (WebKit::WebPopupMenu::show):
2952 Pass the page coordinates of the <select> element to
2953 setUpPlatformData().
2955 * WebProcess/WebCoreSupport/WebPopupMenu.h:
2956 Added new parameter to setUpPlatformData().
2958 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2959 (WebKit::WebPopupMenu::setUpPlatformData):
2962 * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
2963 (WebKit::WebPopupMenu::setUpPlatformData):
2966 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2967 (WebKit::WebPopupMenu::setUpPlatformData):
2968 Fixed a typo in a comment. Adjust the backing store size to be at least
2969 as wide as the <select> element, and use that width when painting the
2970 items to the backing store.
2972 2010-12-11 Csaba Osztrogonác <ossy@webkit.org>
2974 Unreviewed Qt buildfix after r73808.
2976 WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
2977 https://bugs.webkit.org/show_bug.cgi?id=50606
2979 * DerivedSources.pro:
2981 2010-12-11 Sheriff Bot <webkit.review.bot@gmail.com>
2983 Unreviewed, rolling out r73834.
2984 http://trac.webkit.org/changeset/73834
2985 https://bugs.webkit.org/show_bug.cgi?id=50866
2987 It broke Qt-WebKit2 build, because of missing WK2_DIR variable
2988 (Requested by Ossy on #webkit).
2992 2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
2994 Reviewed by Eric Seidel.
2996 [Qt][WK2] Make WebKit2 static library compile on Symbian
2997 https://bugs.webkit.org/show_bug.cgi?id=50861
3001 2010-12-10 Sam Weinig <sam@webkit.org>
3003 Reviewed by Anders Carlsson.
3005 Ensure that we are not getting too many wheel events
3006 <rdar://problem/7881465>
3008 Add simple coalescing of wheel events being sent to the WebProcess. This
3009 adds two models, one which drops interim events and one which merges events
3010 together. For now, we are using the simpler dropping model.
3012 * Shared/WebEvent.h:
3013 (WebKit::WebEvent::modifiers):
3014 * UIProcess/WebPageProxy.cpp:
3015 (WebKit::WebPageProxy::WebPageProxy):
3016 (WebKit::coalesceWheelEvents):
3017 (WebKit::WebPageProxy::handleWheelEvent):
3018 (WebKit::WebPageProxy::didReceiveEvent):
3019 * UIProcess/WebPageProxy.h:
3021 2010-12-10 Anders Carlsson <andersca@apple.com>
3023 Reviewed by John Sullivan.
3025 Make WKContextGetStatistics gather global statistics
3026 https://bugs.webkit.org/show_bug.cgi?id=50850
3028 Change WKContextGetStatistics to work on all objects in the process, and
3029 make it more robust by incrementing/decrementing the counts in the constructor
3030 and destructor respectively.
3032 Also, rename WKContextGetStatistics to WKContextGetGlobalStatistics to better match
3033 what it's actually doing.
3035 * UIProcess/API/C/WKContext.cpp:
3036 (WKContextGetStatistics):
3037 * UIProcess/API/C/WKContextPrivate.h:
3038 * UIProcess/API/mac/WKView.mm:
3039 (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
3040 (-[WKView dealloc]):
3041 * UIProcess/WebContext.cpp:
3042 (WebKit::WebContext::statistics):
3043 * UIProcess/WebContext.h:
3044 * UIProcess/WebFrameProxy.cpp:
3045 (WebKit::WebFrameProxy::WebFrameProxy):
3046 (WebKit::WebFrameProxy::~WebFrameProxy):
3047 * UIProcess/WebPageNamespace.cpp:
3048 * UIProcess/WebPageNamespace.h:
3049 * UIProcess/WebPageProxy.cpp:
3050 (WebKit::WebPageProxy::WebPageProxy):
3051 (WebKit::WebPageProxy::~WebPageProxy):
3052 * UIProcess/WebPageProxy.h:
3054 2010-12-10 Brian Weinstein <bweinstein@apple.com>
3056 Reviewed by Darin Adler.
3058 WebKit2: Context menu support on Windows
3059 <https://bugs.webkit.org/show_bug.cgi?id=50514>
3061 Implment showing of the context menu on Windows for WebKit2, and calling through to
3062 WebPageProxy::contextMenuItemSelected.
3064 * UIProcess/win/WebContextMenuProxyWin.cpp:
3065 (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin): Initialize the member variables.
3066 (WebKit::WebContextMenuProxyWin::populateMenu): Iterate over the vector of WebContextMenuItemData
3067 that was passed in, adding the menu items and recursively calling back into this function to populate
3068 any submenus that are needed. This function also sets up the map from action identifierss to WebContextMenuItemData,
3069 to use to find the WebContextMenuItemData from a selected menu item.
3070 (WebKit::WebContextMenuProxyWin::showContextMenu): Destroy any menu we have already created, populate the menu
3071 to show, and show the context menu. Once TrackPopupMenuEx returns, it returns identifier of the selected menu item.
3072 Look up that identifier in the map we created, and tell the WebPageProxy that a context menu item was selected.
3073 (WebKit::WebContextMenuProxyWin::hideContextMenu): Destroy the HMENU if it is non-null, and clear the identifier map.
3074 * UIProcess/win/WebContextMenuProxyWin.h:
3075 (WebKit::WebContextMenuProxyWin::create): Call through to the constructor, and change the arguments that it takes.
3076 * UIProcess/win/WebView.cpp:
3077 (WebKit::WebView::createContextMenuProxy): Call with the correct arguments.
3079 2010-12-10 Jessie Berlin <jberlin@apple.com>
3081 Qt Build Fix. Unreviewed.
3084 Add the Messages.h and MessageReceivers.h.
3086 2010-12-10 Jessie Berlin <jberlin@apple.com>
3088 Reviewed by Adam Roben and Sam Weinig.
3090 WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
3091 https://bugs.webkit.org/show_bug.cgi?id=50606
3093 Add a WebDatabaseManagerProxy owned by the WebContext.
3095 Expose API (similar to the WebKit1 API) to get a list of origins for which there are
3096 Databases, delete all the databases for a given origin, and delete all the databases.
3098 Add WebDatabaseManager and WebDatabaseManagerProxy as messages receivers.
3099 * DerivedSources.make:
3100 * Platform/CoreIPC/MessageID.h:
3102 Add the WebDatabaseManagerProxy as a UIProcess type (DatabaseManager).
3103 * Shared/API/c/WKBase.h:
3104 * Shared/APIObject.h:
3105 * UIProcess/API/C/WKAPICast.h:
3107 * UIProcess/API/C/WKContext.cpp:
3108 (WKContextGetDatabaseManager):
3109 Expose API to get the DatabaseManager.
3110 * UIProcess/API/C/WKContext.h:
3112 * UIProcess/API/C/WKDatabaseManager.cpp: Added.
3113 (WKDatabaseManagerGetTypeID):
3114 (WKDatabaseManagerGetDatabaseOrigins):
3115 (callGetDatabaseOriginsBlockBlockAndDispose):
3116 (WKDatabaseManagerGetDatabaseOrigins_b):
3117 (WKDatabaseManagerDeleteDatabasesForOrigin):
3118 (WKDatabaseManagerDeleteAllDatabases):
3119 * UIProcess/API/C/WKDatabaseManager.h: Added.
3121 * UIProcess/WebContext.cpp:
3122 (WebKit::WebContext::WebContext):
3123 Create the WebDatabaseManagerProxy.
3124 (WebKit::WebContext::processDidClose):
3125 Invalidate the WebDatabaseManagerProxy.
3126 (WebKit::WebContext::didReceiveMessage):
3127 Forward messages to the WebDatabaseManagerProxy.
3128 * UIProcess/WebContext.h:
3129 (WebKit::WebContext::databaseManagerProxy):
3131 * UIProcess/WebDatabaseManagerProxy.cpp: Added.
3132 (WebKit::WebDatabaseManagerProxy::create):
3133 (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
3134 (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
3135 (WebKit::WebDatabaseManagerProxy::invalidate):
3136 Invalidate the map of callbacks for getDatabaseOrigins.
3137 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
3138 Store the callback and send the request for the origins which have databases to the
3140 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
3141 Call the callback function with the SecurityOrigins created from the identifiers received.
3142 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
3143 If the origin exists, send the message on to the WebProcess to delete the databases
3144 associated with that origin.
3145 (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
3146 Send the message to the WebProcess to delete all the databases.
3147 * UIProcess/WebDatabaseManagerProxy.h: Added.
3148 (WebKit::WebDatabaseManagerProxy::type):
3149 * UIProcess/WebDatabaseManagerProxy.messages.in: Added.
3151 * UIProcess/WebPageProxy.cpp:
3152 Move invalidateCallbackMap from here ...
3153 * UIProcess/GenericCallback.h:
3154 (WebKit::invalidateCallbackMap):
3155 .. to here so that it can be used elsewhere (e.g. by WebDatabaseManagerProxy).
3157 * UIProcess/WebProcessProxy.cpp:
3158 (WebKit::WebProcessProxy::didReceiveMessage):
3159 Forward on all messages destined for the WebDatabaseManagerProxy to the WebContext.
3161 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3162 (WebKit::WebDatabaseManager::didReceiveMessage):
3163 (WebKit::WebDatabaseManager::getDatabaseOrigins):
3164 Send an array of the identifiers for the SecurityOrigins for which there are databases to
3166 (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
3167 If the SecurityOrigin with that identifier exists, tell the DatabaseTracker to delete the
3168 databases for that origin.
3169 (WebKit::WebDatabaseManager::deleteAllDatabases):
3170 Tell the DatabaseTracker to delete the databases for that origin.
3171 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3172 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added.
3173 * WebProcess/WebProcess.cpp:
3174 (WebKit::WebProcess::didReceiveMessage):
3177 Add WKDatabaseManager.cpp/.h and WebDatabaseManagerProxy.cpp/.h
3178 * WebKit2.xcodeproj/project.pbxproj:
3179 Ditto, also add WebDatabaseManagerProxy.messages.in and WebDatabaseManager.messages.in.
3180 * win/WebKit2.vcproj:
3182 * win/WebKit2Generated.make:
3183 Make sure WKDatabaseManager.h is copied into WebKitBuild on Windows.
3185 2010-12-10 Ada Chan <adachan@apple.com>
3187 Reviewed by Anders Carlsson.
3189 Implement Download::start() and Download::startWithHandle() on Windows.
3190 https://bugs.webkit.org/show_bug.cgi?id=50844
3192 * WebProcess/Downloads/Download.h:
3193 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3194 (WebKit::Download::start): Create a CFURLDownloadRef and schedule it.
3195 (WebKit::Download::startWithHandle): Create a CFURLDownloadRef with the loading connection
3196 retrieved from the ResourceHandle.
3197 (WebKit::Download::platformInvalidate):
3198 (WebKit::downloadFromClientInfo):
3199 (WebKit::didStartCallback):
3200 (WebKit::willSendRequestCallback):
3201 (WebKit::didReceiveAuthenticationChallengeCallback):
3202 (WebKit::didReceiveResponseCallback):
3203 (WebKit::willResumeWithResponseCallback):
3204 (WebKit::didReceiveDataCallback):
3205 (WebKit::shouldDecodeDataOfMIMETypeCallback):
3206 (WebKit::decideDestinationWithSuggestedObjectNameCallback):
3207 (WebKit::didCreateDestinationCallback):
3208 (WebKit::didFinishCallback):
3209 (WebKit::didFailCallback):
3211 2010-12-10 Enrica Casucci <enrica@apple.com>
3213 Windows build fix. Unreviewed.
3215 Adding a dummy synchronous message for platforms
3216 that don't have any.
3218 * WebProcess/WebPage/WebPage.cpp:
3219 (WebKit::WebPage::dummy):
3220 * WebProcess/WebPage/WebPage.h:
3221 * WebProcess/WebPage/WebPage.messages.in:
3223 2010-12-09 Brian Weinstein <bweinstein@apple.com>
3225 Reviewed by Adam Roben.
3227 Prep for WebKit2: Context menu support on Windows
3228 https://bugs.webkit.org/show_bug.cgi?id=50514
3230 Update WebKit2 to call the correct code when CROSS_PLATFORM_CONTEXT_MENUS is set.
3232 * Shared/WebContextMenuItemData.cpp:
3233 (WebKit::WebContextMenuItemData::WebContextMenuItemData): Add a branch based on whether or not
3234 CROSS_PLATFORM_CONTEXT_MENUS is set.
3235 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3236 (WebKit::WebContextMenuClient::customizeMenu): Define different functions based on
3237 whether or not CROSS_PLATFORM_CONTEXT_MENUS. Both of these are stubs, so functionality
3238 doesn't need to be shared.
3239 * WebProcess/WebCoreSupport/WebContextMenuClient.h: Define different functions based on
3240 whether or not CROSS_PLATFORM_CONTEXT_MENUS.
3241 * WebProcess/WebPage/WebContextMenu.cpp:
3242 (WebKit::WebContextMenu::show): Add a branch based on whether or not
3243 CROSS_PLATFORM_CONTEXT_MENUS is set.
3245 2010-12-09 Enrica Casucci <enrica@apple.com>
3247 Reviewed by Alexey Proskuryakov.
3249 Implement IME support for Mac.
3250 <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
3251 https://bugs.webkit.org/show_bug.cgi?id=50788
3253 This patch addes support for input methods in WebKit2.
3254 In order to support IME, it was necessary to add synchronous calls from the UIProcess
3255 to the WebProcess. These calls all have a timeout of 1 second.
3256 The current implementation still uses the NSTextInput protocol, but the plan is to move
3257 to the NSTextInputClient protocol. This has not been done yet for ease of comparison with
3258 WebKit. attributedSubstringFromRange is the only method that has not been implemented, because
3259 I have not yet decided what is the best way to send an NSAttributedString across the process
3262 * Platform/CoreIPC/HandleMessage.h:
3263 (CoreIPC::callMemberFunction): Added template for member function.
3264 with four reply arguments.
3265 * Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header.
3266 * Shared/WebCoreArgumentCoders.h:
3267 (CoreIPC::): Added encoder/decoder for CompositionUnderline.
3268 * UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged.
3269 * UIProcess/API/mac/PageClientImpl.mm:
3270 (WebKit::PageClientImpl::selectionChanged): Added parameters.
3271 (WebKit::PageClientImpl::interceptKeyEvent): Added parameters.
3272 * UIProcess/API/mac/WKView.mm:
3273 (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members.
3274 (-[WKView insertText:]):
3275 (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters.
3276 (-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters.
3277 (-[WKView keyDown:]): Modified to reset state on each keyDown.
3278 (-[WKView selectedRange]): Added.
3279 (-[WKView hasMarkedText]): Added.
3280 (-[WKView unmarkText]): Added.
3281 (-[WKView validAttributesForMarkedText]): Added.
3282 (extractUnderlines): Added.
3283 (-[WKView setMarkedText:selectedRange:]): Added.
3284 (-[WKView markedRange]): Added.
3285 (-[WKView attributedSubstringFromRange:]): Added.
3286 (-[WKView characterIndexForPoint:]): Added.
3287 (-[WKView firstRectForCharacterRange:]): Added.
3288 (-[WKView conversationIdentifier]): Added.
3289 * UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged.
3290 * UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged.
3291 * UIProcess/WebPageProxy.cpp:
3292 (WebKit::WebPageProxy::getMarkedRange): Added.
3293 (WebKit::WebPageProxy::characterIndexForPoint): Added.
3294 (WebKit::WebPageProxy::firstRectForCharacterRange): Added.
3295 (WebKit::WebPageProxy::interpretKeyEvent): Additional parameters.
3296 (WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform.
3297 * UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange
3298 and interpretKeyEvent.
3299 * UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages.
3300 * UIProcess/WebProcessProxy.h:
3301 (WebKit::WebProcessProxy::sendSync): Added support for synchronous messages.
3302 The default timeout is 1 second.
3303 * WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now
3304 only for non Mac platform.
3305 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3306 (WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform.
3307 * WebProcess/WebPage/WebPage.cpp:
3308 (WebKit::WebPage::didReceiveSyncMessage): Added.
3309 * WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages.
3310 * WebProcess/WebPage/WebPage.messages.in: Added new messages.
3311 * WebProcess/WebPage/mac/WebPageMac.mm:
3312 (WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters.
3313 (WebKit::WebPage::convertRangeToPlatformRange): Added.
3314 (WebKit::WebPage::getMarkedRange): Added.
3315 (WebKit::characterRangeAtPoint): Added.
3316 (WebKit::WebPage::characterIndexForPoint): Added.
3317 (WebKit::convertToRange): Added.
3318 (WebKit::WebPage::firstRectForCharacterRange): Added.
3319 * WebProcess/WebProcess.cpp:
3320 (WebKit::WebProcess::didReceiveSyncMessage): Added.
3321 * WebProcess/WebProcess.h: Added didReceiveSyncMessage.
3323 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
3325 Reviewed by Kenneth Rohde Christiansen.
3327 [Qt][WK2] Add the QWKContext API class to wrap the WebContext.
3328 https://bugs.webkit.org/show_bug.cgi?id=50750
3330 * UIProcess/API/qt/WKView.h:
3331 * UIProcess/API/qt/qgraphicswkview.cpp:
3332 (QGraphicsWKView::QGraphicsWKView):
3333 Change the WKPageNamespaceRef argument to QWKContext*
3334 * UIProcess/API/qt/qgraphicswkview.h:
3335 * UIProcess/API/qt/qwkcontext.cpp: Added.
3336 * UIProcess/API/qt/qwkcontext.h: Added.
3337 * UIProcess/API/qt/qwkcontext_p.h: Added.
3338 * UIProcess/API/qt/qwkpage.cpp:
3339 (QWKPagePrivate::QWKPagePrivate):
3341 Change the WKPageNamespaceRef argument to QWKContext*
3342 * UIProcess/API/qt/qwkpage.h:
3343 * UIProcess/API/qt/qwkpage_p.h:
3346 2010-12-10 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
3348 Reviewed by Kenneth Rohde Christiansen.
3350 Flush IPC connection send buffer after each message.
3352 [Qt] [WK2] IPC messages are not sent until send buffer fills up
3353 https://bugs.webkit.org/show_bug.cgi?id=50667
3355 * Platform/CoreIPC/qt/ConnectionQt.cpp:
3356 (CoreIPC::Connection::sendOutgoingMessage):
3358 2010-12-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
3360 Reviewed by Kenneth Rohde Christiansen.
3362 [Qt][WK2] Use a single QNetworkAccessManager per web process.
3363 https://bugs.webkit.org/show_bug.cgi?id=50757
3365 This allows a better management of network resources and the use
3366 of global cookie jar and disk cache across all frames.
3368 * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
3369 (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
3370 (WebCore::WebFrameNetworkingContext::networkAccessManager):
3371 * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
3372 * WebProcess/WebProcess.cpp:
3373 (WebKit::WebProcess::WebProcess):
3374 (WebKit::WebProcess::initializeWebProcess):
3375 (WebKit::WebProcess::shutdownIfPossible):
3376 * WebProcess/WebProcess.h:
3377 (WebKit::WebProcess::networkAccessManager):
3378 * WebProcess/mac/WebProcessMac.mm:
3379 (WebKit::WebProcess::platformInitializeWebProcess):
3380 (WebKit::WebProcess::platformShutdown):
3381 * WebProcess/qt/WebProcessQt.cpp:
3382 (WebKit::WebProcess::platformInitializeWebProcess):
3383 (WebKit::WebProcess::platformShutdown):
3384 * WebProcess/win/WebProcessWin.cpp:
3385 (WebKit::WebProcess::platformInitializeWebProcess):
3386 (WebKit::WebProcess::platformShutdown):
3388 2010-12-09 Mark Rowe <mrowe@apple.com>
3390 Fix the 32-bit build.
3392 * Shared/cf/ArgumentCodersCF.cpp:
3393 (CoreIPC::sizeForNumberType):
3395 2010-12-09 Maciej Stachowiak <mjs@apple.com>
3397 Reviewed by Brady Eidson.
3399 WebKit2: Control-click doesn't invoke context menu
3400 https://bugs.webkit.org/show_bug.cgi?id=50793
3401 <rdar://problem/8664800>
3403 * WebProcess/WebPage/WebPage.cpp:
3404 (WebKit::isContextClick): New helper function - on Mac, not only right clicks
3405 but also control-left-clicks are context clicks.
3406 (WebKit::handleMouseEvent): Use above.
3408 2010-12-09 Anders Carlsson <andersca@apple.com>
3412 * Scripts/webkit2/messages.py:
3413 DrawingAreaInfo is a struct.
3415 * Shared/WebPreferencesStore.cpp:
3416 (WebKit::valueForKey):
3417 Move valueForKey above code that uses it.
3419 * UIProcess/mac/WebInspectorProxyMac.mm:
3420 (-[WebInspectorProxyObjCAdapter windowWillClose:]):
3421 Remove trailing semicolon.
3423 2010-12-09 Timothy Hatcher <timothy@apple.com>
3425 Add support for transparent WebKit2 WKViews.
3427 https://webkit.org/b/50785
3429 Reviewed by Anders Carlsson.
3431 * Shared/WebPageCreationParameters.cpp:
3432 (WebKit::WebPageCreationParameters::encode): Encode drawsBackground and drawsTransparentBackground.
3433 (WebKit::WebPageCreationParameters::decode): Decode drawsBackground and drawsTransparentBackground.
3434 * Shared/WebPageCreationParameters.h:
3435 * UIProcess/API/mac/WKView.h:
3436 * UIProcess/API/mac/WKView.mm:
3437 (-[WKView setDrawsBackground:]): Added.
3438 (-[WKView drawsBackground]): Added.
3439 (-[WKView setDrawsTransparentBackground:]): Added.
3440 (-[WKView drawsTransparentBackground]): Added.
3441 (-[WKView drawRect:]): Only fill the background if the WebProcess isn't valid and drawsBackground.
3442 Use white or clear based on setDrawsTransparentBackground.
3443 (-[WKView isOpaque]): Return drawsBackground.
3444 * UIProcess/WebPageProxy.cpp:
3445 (WebKit::WebPageProxy::WebPageProxy): Initialize m_drawsBackground and m_drawsTransparentBackground.
3446 (WebKit::WebPageProxy::setDrawsBackground): Added. Send a SetDrawsBackground message.
3447 (WebKit::WebPageProxy::setDrawsTransparentBackground): Added. Send a SetDrawsTransparentBackground message.
3448 (WebKit::WebPageProxy::creationParameters): Set drawsBackground and drawsTransparentBackground.
3449 * UIProcess/WebPageProxy.h:
3450 (WebKit::WebPageProxy::drawsBackground): Added. Return m_drawsBackground.
3451 (WebKit::WebPageProxy::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
3452 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
3453 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): Use the copy blend mode when drawing a background.
3454 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Use the copy blend mode to replace existing content.
3455 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3456 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Setup the new view's background color and transparent flag.
3457 * WebProcess/WebPage/WebPage.cpp:
3458 (WebKit::WebPage::WebPage): Initialize m_drawsBackground and m_drawsTransparentBackground.
3459 (WebKit::WebPage::setDrawsBackground): Added. Propagate the flag to the FrameViews.
3460 (WebKit::WebPage::setDrawsTransparentBackground): Added. Propagate the background color to the FrameViews.
3461 * WebProcess/WebPage/WebPage.h:
3462 (WebKit::WebPage::drawsBackground): Added. Return m_drawsBackground.
3463 (WebKit::WebPage::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
3464 * WebProcess/WebPage/WebPage.messages.in: Added SetDrawsBackground and SetDrawsTransparentBackground.
3466 2010-12-09 Anders Carlsson <andersca@apple.com>
3468 Reviewed by Sam Weinig.
3470 Cannot use NSKeyedArchiver in WK2 for ResourceResponses
3471 https://bugs.webkit.org/show_bug.cgi?id=50792
3472 <rdar://problem/8741799>
3474 When encoding, first convert the requests and responses to the serializable dictionary representation
3475 and use the newly added CF CoreIPC encoders. When decoding, do the opposite.
3477 * Shared/mac/WebCoreArgumentCodersMac.mm:
3478 (CoreIPC::encodeResourceRequest):
3479 (CoreIPC::decodeResourceRequest):
3480 (CoreIPC::encodeResourceResponse):
3481 (CoreIPC::decodeResourceResponse):
3483 2010-12-09 Anders Carlsson <andersca@apple.com>
3485 Reviewed by Sam Weinig.
3487 Add CoreIPC coders for CF types
3488 https://bugs.webkit.org/show_bug.cgi?id=50791
3490 * Platform/CoreIPC/ArgumentDecoder.h:
3491 (CoreIPC::ArgumentDecoder::decodeEnum):
3492 * Platform/CoreIPC/ArgumentEncoder.h:
3493 (CoreIPC::ArgumentEncoder::encodeEnum):
3494 * Shared/cf/ArgumentCodersCF.cpp: Added.
3495 (CoreIPC::tokenNullTypeRef):
3496 (CoreIPC::typeFromCFTypeRef):
3499 (CoreIPC::sizeForNumberType):
3500 * Shared/cf/ArgumentCodersCF.h: Added.
3501 * WebKit2.xcodeproj/project.pbxproj:
3503 2010-12-09 Brady Eidson <beidson@apple.com>
3505 Reviewed by Sam Weinig.
3507 <rdar://problem/8749750> and https://bugs.webkit.org/show_bug.cgi?id=50786
3508 WK2 authentication never consults WebCore session credential storage.
3510 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3511 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Since we don't need to expose this as
3512 API at this time, always return true.
3514 2010-12-09 Sam Weinig <weinig@apple.com>
3516 Reviewed by Alexey Proskuryakov.
3518 WebKit2: Add support for access keys
3519 https://bugs.webkit.org/show_bug.cgi?id=49832
3521 * WebProcess/WebPage/WebPage.cpp:
3522 (WebKit::handleKeyEvent): Match windows WebKit and call
3523 the event handler's for handleAccessKey function for
3524 system keys. This will never be hit on the Mac.
3526 2010-12-09 Darin Adler <darin@apple.com>
3530 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Include "NotImplemented.h".
3532 2010-12-09 Steve Falkenburg <sfalken@apple.com>
3536 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
3538 2010-12-09 Brady Eidson <beidson@apple.com>
3540 Reviewed by Anders Carlsson.
3542 <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
3543 WebKit2 ContextMenuClient support
3545 Implement google search in a cross platform manner, and add a FIXME for download support:
3546 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3547 (WebKit::WebContextMenuClient::downloadURL):
3548 (WebKit::WebContextMenuClient::searchWithGoogle):
3550 Mac implementations for speaking and searching:
3551 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Added.
3552 (WebKit::WebContextMenuClient::lookUpInDictionary): Add a FIXME for now.
3553 (WebKit::WebContextMenuClient::isSpeaking):
3554 (WebKit::WebContextMenuClient::speak):
3555 (WebKit::WebContextMenuClient::stopSpeaking):
3556 (WebKit::WebContextMenuClient::searchWithSpotlight):
3558 Stubs for Win and Qt:
3559 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Added.
3560 (WebKit::WebContextMenuClient::lookUpInDictionary):
3561 (WebKit::WebContextMenuClient::isSpeaking):
3562 (WebKit::WebContextMenuClient::speak):
3563 (WebKit::WebContextMenuClient::stopSpeaking):
3564 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
3565 (WebKit::WebContextMenuClient::lookUpInDictionary):
3566 (WebKit::WebContextMenuClient::isSpeaking):
3567 (WebKit::WebContextMenuClient::speak):
3568 (WebKit::WebContextMenuClient::stopSpeaking):
3570 Project file stuffs:
3572 * WebKit2.xcodeproj/project.pbxproj:
3573 * win/WebKit2.vcproj:
3575 2010-12-09 Anders Carlsson <andersca@apple.com>
3577 Reviewed by Sam Weinig.
3579 Don't leak the PDFDocument
3580 https://bugs.webkit.org/show_bug.cgi?id=50771
3582 * UIProcess/API/mac/PDFViewController.mm:
3583 (WebKit::PDFViewController::setPDFDocumentData):
3585 2010-12-09 Anders Carlsson <andersca@apple.com>