1 2010-12-21 Sam Weinig <weinig@apple.com>
3 Reviewed by Anders Carlsson.
5 Implement encoding/decoding of ResourceRequest and
6 ResourceResponse for Windows/CFNetwork.
8 * Shared/win/WebCoreArgumentCodersWin.cpp:
9 (CoreIPC::encodeResourceRequest):
10 (CoreIPC::decodeResourceRequest):
11 (CoreIPC::encodeResourceResponse):
12 (CoreIPC::decodeResourceResponse):
14 * win/WebKit2Common.vsprops:
16 2010-12-21 Darin Adler <darin@apple.com>
18 Reviewed by Sam Weinig.
20 Mac WebKit delivers an extra didCommit when loading web archives
21 https://bugs.webkit.org/show_bug.cgi?id=51419
23 * UIProcess/WebFrameProxy.cpp:
24 (WebKit::WebFrameProxy::didStartProvisionalLoad): Added assertions so we catch
25 inconsistencies here instead of at the application level. Later, we will have
26 to decide what to do in cases these assertions fail. The right policy is probably
27 to consider it a web process failure and do whatever we do for those.
28 (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad): Ditto.
29 (WebKit::WebFrameProxy::didFailProvisionalLoad): Ditto.
30 (WebKit::WebFrameProxy::didCommitLoad): Ditto.
31 (WebKit::WebFrameProxy::didFinishLoad): Ditto.
32 (WebKit::WebFrameProxy::didFailLoad): Ditto.
34 2010-12-21 Anders Carlsson <andersca@apple.com>
36 Fix Snow Leopard build.
38 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
39 (WebKit::NPN_GetValue):
41 2010-12-21 Anders Carlsson <andersca@apple.com>
43 Reviewed by Dan Bernstein.
45 Fix crash when a Carbon plug-in fails to initialize correctly
46 https://bugs.webkit.org/show_bug.cgi?id=51415
48 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
49 (WebKit::NPN_GetValue):
50 Don't claim to support the QuickDraw event model.
52 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
53 (WebKit::NetscapePlugin::platformDestroy):
54 Only try to remove the window from the map if it's not null.
56 2010-12-21 Anders Carlsson <andersca@apple.com>
58 Reviewed by Darin Adler.
60 Add ArgumentCoder support for CFDataRef
61 https://bugs.webkit.org/show_bug.cgi?id=51412
63 * Shared/cf/ArgumentCodersCF.cpp:
64 (CoreIPC::typeFromCFTypeRef):
67 * Shared/cf/ArgumentCodersCF.h:
69 2010-12-21 Anders Carlsson <andersca@apple.com>
71 Reviewed by John Sullivan.
73 Clicking missing plug-in text does not show a sheet
74 https://bugs.webkit.org/show_bug.cgi?id=51403
76 * UIProcess/API/C/WKPage.h:
77 Add missingPluginButtonClicked to WKPageUIClient.
79 * UIProcess/WebPageProxy.cpp:
80 (WebKit::WebPageProxy::missingPluginButtonClicked):
81 Call the WebUIClient member function.
83 * UIProcess/WebPageProxy.messages.in:
84 Add MissingPluginButtonClicked message.
86 * UIProcess/WebUIClient.cpp:
87 (WebKit::WebUIClient::missingPluginButtonClicked):
88 Call the WKPageUIClient callback.
90 * UIProcess/WebUIClient.h:
91 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
92 (WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
93 Always return true for now.
95 (WebKit::WebChromeClient::missingPluginButtonClicked):
96 Send a MissingPluginButtonClicked message.
98 2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
100 Reviewed by Andreas Kling.
102 [Qt] Set BUILDING_QT__ consistently
103 https://bugs.webkit.org/show_bug.cgi?id=51341
105 * WebKit2.pro: Remove the definition of BUILDING_QT__ as it
106 is already defined in WebKit.pri.
108 2010-12-20 Sam Weinig <sam@webkit.org>
110 Reviewed by Anders Carlsson.
112 WebKit2: Add resource load client API
113 https://bugs.webkit.org/show_bug.cgi?id=51370
115 This just pipes through the basic resource load client data.
117 * UIProcess/API/C/WKPage.cpp:
118 (WKPageSetPageResourceLoadClient):
119 * UIProcess/API/C/WKPage.h:
120 * UIProcess/WebPageProxy.cpp:
121 (WebKit::WebPageProxy::initializeResourceLoadClient):
122 (WebKit::WebPageProxy::didInitiateLoadForResource):
123 (WebKit::WebPageProxy::didSendRequestForResource):
124 (WebKit::WebPageProxy::didReceiveResponseForResource):
125 (WebKit::WebPageProxy::didReceiveContentLengthForResource):
126 (WebKit::WebPageProxy::didFinishLoadForResource):
127 (WebKit::WebPageProxy::didFailLoadForResource):
128 * UIProcess/WebPageProxy.h:
129 * UIProcess/WebPageProxy.messages.in:
130 * UIProcess/WebResourceLoadClient.cpp: Added.
131 (WebKit::WebResourceLoadClient::didInitiateLoadForResource):
132 (WebKit::WebResourceLoadClient::didSendRequestForResource):
133 (WebKit::WebResourceLoadClient::didReceiveResponseForResource):
134 (WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
135 (WebKit::WebResourceLoadClient::didFinishLoadForResource):
136 (WebKit::WebResourceLoadClient::didFailLoadForResource):
137 * UIProcess/WebResourceLoadClient.h: Added.
139 * WebKit2.xcodeproj/project.pbxproj:
140 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
141 (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
142 (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
143 (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
144 (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
145 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
146 (WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
147 * win/WebKit2.vcproj:
149 2010-12-20 Anders Carlsson <andersca@apple.com>
151 Reviewed by Sam Weinig.
153 Add a TextChecker class, hook up spelling and grammar toggling
154 https://bugs.webkit.org/show_bug.cgi?id=51363
156 * UIProcess/API/mac/WKView.mm:
157 (-[WKView validateUserInterfaceItem:]):
158 (-[WKView toggleContinuousSpellChecking:]):
159 (-[WKView toggleGrammarChecking:]):
160 * UIProcess/TextChecker.h: Added.
161 * UIProcess/WebPageProxy.cpp:
162 (WebKit::WebPageProxy::unmarkAllMisspellings):
163 (WebKit::WebPageProxy::unmarkAllBadGrammar):
164 * UIProcess/WebPageProxy.h:
165 * UIProcess/mac/TextCheckerMac.mm: Added.
166 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
167 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
168 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
169 (WebKit::TextChecker::isGrammarCheckingEnabled):
170 (WebKit::TextChecker::setGrammarCheckingEnabled):
171 * UIProcess/qt/TextCheckerQt.cpp: Added.
172 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
173 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
174 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
175 (WebKit::TextChecker::isGrammarCheckingEnabled):
176 (WebKit::TextChecker::setGrammarCheckingEnabled):
177 * UIProcess/win/TextCheckerWin.cpp: Added.
178 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
179 (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
180 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
181 (WebKit::TextChecker::isGrammarCheckingEnabled):
182 (WebKit::TextChecker::setGrammarCheckingEnabled):
184 * WebKit2.xcodeproj/project.pbxproj:
185 * WebProcess/WebPage/WebPage.cpp:
186 (WebKit::WebPage::unmarkAllMisspellings):
187 (WebKit::WebPage::unmarkAllBadGrammar):
188 * WebProcess/WebPage/WebPage.h:
189 * WebProcess/WebPage/WebPage.messages.in:
190 * win/WebKit2.vcproj:
192 2010-12-20 Anders Carlsson <andersca@apple.com>
194 Reviewed by Sam Weinig.
196 Flash plug-in does not work on YouTube video page when accelerated compositing is disabled
197 https://bugs.webkit.org/show_bug.cgi?id=51348
198 <rdar://problem/8787667>
200 * Platform/CoreIPC/HandleMessage.h:
201 (CoreIPC::callMemberFunction):
204 * PluginProcess/PluginControllerProxy.cpp:
205 (WebKit::PluginControllerProxy::create):
206 (WebKit::PluginControllerProxy::PluginControllerProxy):
207 These now take an additional isAcceleratedCompositingEnabled parameter.
209 (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
210 Return m_isAcceleratedCompositingEnabled.
212 * PluginProcess/PluginControllerProxy.h:
213 * PluginProcess/WebProcessConnection.cpp:
214 (WebKit::WebProcessConnection::createPlugin):
215 This now takes an additional isAcceleratedCompositingEnabled parameter.
217 * PluginProcess/WebProcessConnection.messages.in:
218 Add isAcceleratedCompositingEnabled parameter to the CreatePlugin message.
220 * WebProcess/Plugins/PluginProxy.cpp:
221 (WebKit::PluginProxy::initialize):
222 Pass isAcceleratedCompositingEnabled when sending the CreatePlugin message.
224 2010-12-20 Anders Carlsson <andersca@apple.com>
226 Unreviewed, rolling out r74345.
227 http://trac.webkit.org/changeset/74345
228 https://bugs.webkit.org/show_bug.cgi?id=51115
232 * Platform/CoreIPC/Connection.h:
233 * Platform/CoreIPC/qt/ConnectionQt.cpp:
234 (CoreIPC::Connection::open):
236 2010-12-20 Balazs Kelemen <kbalazs@webkit.org>
238 Reviewed by Kenneth Rohde Christiansen.
240 [Qt][WK2] Crash in web process after the connection had been closed
241 https://bugs.webkit.org/show_bug.cgi?id=51115
243 Do not call connectionDidClose with a connection that has been explicitly
244 invalidated on the listener thread.
245 * Platform/CoreIPC/Connection.h:
246 * Platform/CoreIPC/qt/ConnectionQt.cpp:
247 (CoreIPC::Connection::disconnectHandler): Added.
248 (CoreIPC::Connection::open):
250 2010-12-19 Dan Bernstein <mitz@apple.com>
252 Reviewed by Sam Weinig.
254 Improve the fix for <rdar://problem/8769525>.
256 * UIProcess/API/mac/WKView.mm:
257 (-[WKView performKeyEquivalent:]): Do not retain the view. Doing so is necessary in
258 -[WebHTMLView performKeyEquivalent:], which this method was based upon, but not here, because
259 there is no way for the web process to cause the WKView to be released while it is handling
262 2010-12-19 Dan Bernstein <mitz@apple.com>
264 Reviewed by Sam Weinig.
266 <rdar://problem/8769525> WKView leak when performing key equivalents
267 https://bugs.webkit.org/show_bug.cgi?id=51315
269 * UIProcess/API/mac/WKView.mm:
270 (-[WKView performKeyEquivalent:]): Use a RetainPtr to ensure that the view is released in the
271 early return code path.
273 2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
275 Reviewed by Kenneth Rohde Christiansen.
277 [Qt] [WK2] QWKPagePrivate::paint() does not need to save the graphics context
278 https://bugs.webkit.org/show_bug.cgi?id=51300
280 Remove the unnecessary save() and restore() on the QPainter.
282 * UIProcess/API/qt/qwkpage.cpp:
283 (QWKPagePrivate::paint):
285 2010-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
287 Reviewed by Andreas Kling.
289 [Qt] [WK2] Client are expected to render their own background for WebPages
290 https://bugs.webkit.org/show_bug.cgi?id=51296
292 Remove the rendering of the checkerboard from the tiled DrawingAreaProxy
294 * UIProcess/TiledDrawingAreaProxy.cpp:
295 (WebKit::TiledDrawingAreaProxy::paint):
296 * UIProcess/TiledDrawingAreaTile.h:
297 * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
299 2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
301 Reviewed by Kenneth Rohde Christiansen.
303 [Qt] [WK2] Client are expected to render their own background for WebPages
304 https://bugs.webkit.org/show_bug.cgi?id=51296
306 Do not render a white background before rendering the page with DrawingAreaProxy.
308 * UIProcess/API/qt/qwkpage.cpp:
309 (QWKPagePrivate::paint):
311 2010-12-17 Darin Adler <darin@apple.com>
313 Reviewed by Dan Bernstein.
315 Window title for image documents shows corrupted characters instead of multiplication sign when using WebKit2
316 https://bugs.webkit.org/show_bug.cgi?id=43505
318 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Changed UI_STRING macros to return
319 WebCore::String objects instead of C strings.
320 (WebKit::formatLocalizedString): Added. Uses the Core Foundation string formatting function for
321 reasons explained in the comment.
322 (WebKit::WebPlatformStrategies::multipleFileUploadText): Use formatLocalizedString instead of
324 (WebKit::WebPlatformStrategies::imageTitle): Ditto.
325 (WebKit::WebPlatformStrategies::localizedMediaTimeDescription): Ditto.
327 2010-12-17 Anders Carlsson <andersca@apple.com>
329 Reviewed by Sam Weinig.
331 Resizing a WKView while loading a page can leave the page at a size that doesn't match the window
332 https://bugs.webkit.org/show_bug.cgi?id=51282
333 <rdar://problem/8133142>
335 Fix a race condition in waitForMessage. If we time out on the wait condition, we would keep the
336 m_waitForMessageMutex mutex unlocked for a brief period of time before taking the lock again and
337 then removing the messageID/destinationID pair from the hash map. Under some circumstances, the
338 connection queue would update the hash map right before we removed it, leading to a lost message.
340 * Platform/CoreIPC/Connection.cpp:
341 (CoreIPC::Connection::waitForMessage):
343 2010-12-17 Anders Carlsson <andersca@apple.com>
345 Reviewed by Simon Fraser.
347 Clean up ChunkedUpdateDrawingAreaProxy
348 https://bugs.webkit.org/show_bug.cgi?id=51277
350 Get rid of m_lastSetViewSize since it was always equal to m_size.
352 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
353 (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
356 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
357 Call sendSetSize if the size differs.
359 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
360 Move code from sizeDidChange over here.
362 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
363 * UIProcess/DrawingAreaProxy.cpp:
364 (WebKit::DrawingAreaProxy::setSize):
365 Add back the early return if the sizes are equal.
367 2010-12-17 Brent Fulgham <bfulgham@webkit.org>
369 Unreviewed build fix.
371 * WebProcess/WebPage/win/WebPageWin.cpp:
372 (WebKit::WebPage::canHandleRequest): Provide alternative for
373 non-CFNetwork implementation.
375 2010-12-17 Ada Chan <adachan@apple.com>
377 Reviewed by Anders Carlsson.
379 Implement WKView::setInitialFocus().
380 https://bugs.webkit.org/show_bug.cgi?id=51274
382 * UIProcess/API/C/win/WKView.cpp:
383 (WKViewSetInitialFocus):
384 * UIProcess/API/C/win/WKView.h:
385 * UIProcess/WebPageProxy.cpp:
386 (WebKit::WebPageProxy::setInitialFocus): Send message to the Web Process to set
388 * UIProcess/WebPageProxy.h:
389 * UIProcess/win/WebView.cpp:
390 (WebKit::WebView::setInitialFocus):
391 * UIProcess/win/WebView.h:
392 * WebProcess/WebPage/WebPage.cpp:
393 (WebKit::WebPage::setInitialFocus): Set the focused node to null initially. Then
394 ask FocusController to set the initial focus based on the focus direction.
395 * WebProcess/WebPage/WebPage.h:
396 * WebProcess/WebPage/WebPage.messages.in: Add a new message for SetInitialFocus.
398 2010-12-17 Anders Carlsson <andersca@apple.com>
400 Reviewed by Sam Weinig.
402 Remove a check that probably uncovered a resizing bug.
404 * UIProcess/DrawingAreaProxy.cpp:
405 (WebKit::DrawingAreaProxy::setSize):
407 2010-12-17 Brian Weinstein <bweinstein@apple.com>
411 * UIProcess/qt/WebPopupMenuProxyQt.h:
413 2010-12-17 Brian Weinstein <bweinstein@apple.com>
415 Reviewed by Anders Carlsson.
417 Text area does not update when you arrow through a <select> in WebKit2
418 https://bugs.webkit.org/show_bug.cgi?id=51269
419 <rdar://problem/8612853>
423 Insteaed of keeping track of the selected index of a <select> just in the UI process, we
424 need to pass this information along to the web process so that the web process can draw
425 the correct text in the text field at the top of the select, when the selection changes (via
426 the arrows or other typing while the select is opened).
428 When the selected item in a popup changes, the UI process sends a message to the web process, telling
429 it about the new selected index. The web process gets this message, and then sets the text that
430 is visible in the select element.
432 * UIProcess/API/mac/PageClientImpl.h: CreatePopupMenuProxy now takes a WebPageProxy.
433 * UIProcess/API/mac/PageClientImpl.mm:
434 (WebKit::PageClientImpl::createPopupMenuProxy): Pass the WebPageProxy to create.
435 * UIProcess/API/qt/qwkpage.cpp:
436 (QWKPagePrivate::createPopupMenuProxy):
437 * UIProcess/API/qt/qwkpage_p.h: CreatePopupMenuProxy now takes a WebPageProxy.
438 * UIProcess/PageClient.h: CreatePopupMenuProxy now takes a WebPageProxy.
439 * UIProcess/WebPageProxy.cpp:
440 (WebKit::WebPageProxy::valueChangedForPopupMenu): Send that the selected index changed to the
442 (WebKit::WebPageProxy::setTextFromItemForPopupMenu): Send that we should update the text for the
443 active popup menu (with the index of the item to show).
444 (WebKit::WebPageProxy::showPopupMenu): Pass the WebPageProxy to createPopupMenuProxy.
445 * UIProcess/WebPageProxy.h:
446 * UIProcess/WebPopupMenuProxy.h: Add a client who has virtual functions for the state changing of the
447 popup menu. ShowPopupMenu doesn't take a new selected index anymore, that is handled by the client,
448 and calling down to the web process.
449 (WebKit::WebPopupMenuProxy::Client::~Client):
450 (WebKit::WebPopupMenuProxy::WebPopupMenuProxy): Initialize the client.
451 * UIProcess/mac/WebPopupMenuProxyMac.h:
452 (WebKit::WebPopupMenuProxyMac::create): Takes a WebPopupMenuProxy::Client, and passes it to the constructor.
453 * UIProcess/mac/WebPopupMenuProxyMac.mm:
454 (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac): Update what's initialized by the constructor.
455 (WebKit::WebPopupMenuProxyMac::showPopupMenu): Call through to the web process that the value changed.
456 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
457 (WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt): Update what's initialized by the constructor.
458 * UIProcess/win/WebPopupMenuProxyWin.cpp:
459 (WebKit::WebPopupMenuProxyWin::WebPopupMenuProxyWin): Ditto.
460 (WebKit::WebPopupMenuProxyWin::showPopupMenu): Call through to the web process that the value changed.
461 (WebKit::WebPopupMenuProxyWin::setFocusedIndex): Resolve a FIXME to set the text of the popup menu.
462 * UIProcess/win/WebPopupMenuProxyWin.h:
463 (WebKit::WebPopupMenuProxyWin::create): Take in a WebPopupMenuProxy::client, and pass it to the constructor.
464 * UIProcess/win/WebView.cpp:
465 (WebKit::WebView::createPopupMenuProxy): Pass the WebPageProxy to create.
466 * UIProcess/win/WebView.h:
467 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
468 (WebKit::WebPopupMenu::setTextForIndex): Call through to setTextFromItem to set the select text.
469 * WebProcess/WebCoreSupport/WebPopupMenu.h:
470 * WebProcess/WebPage/WebPage.cpp: Call through to setTextForIndex on the active popup menu.
471 (WebKit::WebPage::setTextForActivePopupMenu):
472 * WebProcess/WebPage/WebPage.h:
473 * WebProcess/WebPage/WebPage.messages.in: Add a new message.
475 2010-12-17 Anders Carlsson <andersca@apple.com>
477 Reviewed by Sam Weinig.
479 DrawingAreaProxy::setSize shouldn't be a virtual member function
480 https://bugs.webkit.org/show_bug.cgi?id=51275
482 Add a pure virtual sizeDidChange member function to DrawingAreaProxy, and only
483 call it if the size changes.
485 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
486 (WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
487 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
488 * UIProcess/DrawingAreaProxy.cpp:
489 (WebKit::DrawingAreaProxy::setSize):
490 * UIProcess/DrawingAreaProxy.h:
491 (WebKit::DrawingAreaProxy::size):
492 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
493 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
494 * UIProcess/LayerBackedDrawingAreaProxy.h:
495 * UIProcess/TiledDrawingAreaProxy.cpp:
496 (WebKit::TiledDrawingAreaProxy::sizeDidChange):
497 * UIProcess/TiledDrawingAreaProxy.h:
499 2010-12-17 Anders Carlsson <andersca@apple.com>
501 Reviewed by Sam Weinig.
503 Add a WebPageProxy parameter to the DrawingAreaProxy constructor
504 https://bugs.webkit.org/show_bug.cgi?id=51271
506 * UIProcess/API/mac/WKView.mm:
507 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
508 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
509 * UIProcess/API/qt/qgraphicswkview.cpp:
510 (QGraphicsWKView::QGraphicsWKView):
511 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
512 (WebKit::ChunkedUpdateDrawingAreaProxy::create):
513 (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
514 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
515 * UIProcess/DrawingAreaProxy.cpp:
516 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
517 * UIProcess/DrawingAreaProxy.h:
518 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
519 (WebKit::LayerBackedDrawingAreaProxy::create):
520 (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
521 * UIProcess/LayerBackedDrawingAreaProxy.h:
522 * UIProcess/TiledDrawingAreaProxy.cpp:
523 (WebKit::TiledDrawingAreaProxy::create):
524 (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
525 * UIProcess/TiledDrawingAreaProxy.h:
526 * UIProcess/win/WebView.cpp:
527 (WebKit::WebView::WebView):
528 (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
530 2010-12-17 Dan Bernstein <mitz@apple.com>
532 Reviewed by Darin Adler.
534 Add API for "Always Use the Complex Text Code Path"
535 https://bugs.webkit.org/show_bug.cgi?id=51265
537 * Shared/WebProcessCreationParameters.cpp:
538 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize shouldAlwaysUseComplexTextCodePath.
539 (WebKit::WebProcessCreationParameters::encode): Encode shouldAlwaysUseComplexTextCodePath.
540 (WebKit::WebProcessCreationParameters::decode): Decode shouldAlwaysUseComplexTextCodePath.
541 * Shared/WebProcessCreationParameters.h:
542 * UIProcess/API/C/WKContext.cpp:
543 (_WKContextSetAlwaysUsesComplexTextCodePath): Added.
544 * UIProcess/API/C/WKContextPrivate.h:
545 * UIProcess/WebContext.cpp:
546 (WebKit::WebContext::WebContext): Initialize m_alwaysUsesComplexTextCodePath.
547 (WebKit::WebContext::ensureWebProcess): Set shouldAlwaysUseComplexTextCodePath in the creation parameters.
548 (WebKit::WebContext::setAlwaysUsesComplexTextCodePath): Added. Sets m_alwaysUsesComplexTextCodePath and
549 sends a message to the WebProcess.
550 * UIProcess/WebContext.h:
551 * WebProcess/WebProcess.cpp:
552 (WebKit::WebProcess::initializeWebProcess): Call setAlwaysUsesComplexTextCodePath() based on the creation
554 (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): Added.
555 * WebProcess/WebProcess.h:
556 * WebProcess/WebProcess.messages.in: Added SetAlwaysUsesComplexTextCodePath.
558 2010-12-17 Sam Weinig <sam@webkit.org>
560 Reviewed by Darin Adler.
562 WebKit2: Implement a title attribute per frame
563 https://bugs.webkit.org/show_bug.cgi?id=51266
565 Cache the title of each frame on the WebFrameProxy. Removes
566 the WebPageProxy's cache of the main frame title to just
567 access the main frame.
569 We clear the cached title on new committed loads and on failures
572 * UIProcess/API/C/WKFrame.cpp:
574 * UIProcess/API/C/WKFrame.h:
575 * UIProcess/WebFrameProxy.cpp:
576 (WebKit::WebFrameProxy::didCommitLoad):
577 (WebKit::WebFrameProxy::didFailLoad):
578 (WebKit::WebFrameProxy::didChangeTitle):
579 * UIProcess/WebFrameProxy.h:
580 (WebKit::WebFrameProxy::title):
581 * UIProcess/WebPageProxy.cpp:
582 (WebKit::WebPageProxy::close):
583 (WebKit::WebPageProxy::pageTitle):
584 (WebKit::WebPageProxy::didReceiveTitleForFrame):
585 (WebKit::WebPageProxy::processDidCrash):
586 * UIProcess/WebPageProxy.h:
588 2010-12-16 Darin Adler <darin@apple.com>
590 Reviewed by Maciej Stachowiak.
592 Add text encoding menu API for WebKit2
593 https://bugs.webkit.org/show_bug.cgi?id=51226
595 * UIProcess/API/C/WKPage.cpp:
596 (WKPageSupportsTextEncoding): Added.
597 (WKPageCopyCustomTextEncodingName): Added.
598 (WKPageSetCustomTextEncodingName): Added.
599 * UIProcess/API/C/WKPage.h: Added the functions above.
601 * UIProcess/WebPageProxy.cpp:
602 (WebKit::WebPageProxy::WebPageProxy): Initialize
603 m_mainFrameHasCustomRepresentation to false.
604 (WebKit::WebPageProxy::supportsTextEncoding): Added.
605 (WebKit::WebPageProxy::setCustomTextEncodingName): Added.
606 (WebKit::WebPageProxy::didCommitLoadForFrame): Set
607 m_mainFrameHasCustomRepresentation.
609 * UIProcess/WebPageProxy.h: Added supportsTextEncoding,
610 setCustomTextEncodingName, customTextEncodingName, and
611 m_mainFrameHasCustomRepresentation.
613 * UIProcess/WebPageProxy.messages.in: Tweaked formatting
614 (added a blank line).
616 * WebProcess/WebPage/WebPage.cpp:
617 (WebKit::WebPage::setCustomTextEncodingName): Added.
618 * WebProcess/WebPage/WebPage.h: Added setCustomTextEncodingName.
620 * WebProcess/WebPage/WebPage.messages.in: Added the
621 SetCustomTextEncodingName message. Tweaked formatting of the
624 2010-12-17 Sheriff Bot <webkit.review.bot@gmail.com>
626 Unreviewed, rolling out r74201.
627 http://trac.webkit.org/changeset/74201
628 https://bugs.webkit.org/show_bug.cgi?id=51248
630 It broke ~6000 layout tests (Requested by Ossy_ on #webkit).
632 * UIProcess/API/qt/qgraphicswkview.cpp:
633 (QGraphicsWKView::setGeometry):
634 (QGraphicsWKView::itemChange):
636 2010-12-16 Sam Weinig <sam@webkit.org>
638 Reviewed by Darin Adler.
640 Add svn:eol-style native to the message.in files as a favor to Darin Adler.
642 * PluginProcess/PluginControllerProxy.messages.in: Added property svn:eol-style.
643 * PluginProcess/PluginProcess.messages.in: Added property svn:eol-style.
644 * PluginProcess/WebProcessConnection.messages.in: Added property svn:eol-style.
645 * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added property svn:eol-style.
646 * UIProcess/Downloads/DownloadProxy.messages.in: Added property svn:eol-style.
647 * UIProcess/Plugins/PluginProcessProxy.messages.in: Added property svn:eol-style.
648 * UIProcess/WebContext.messages.in: Added property svn:eol-style.
649 * UIProcess/WebDatabaseManagerProxy.messages.in: Added property svn:eol-style.
650 * UIProcess/WebInspectorProxy.messages.in: Added property svn:eol-style.
651 * UIProcess/WebPageProxy.messages.in: Added property svn:eol-style.
652 * UIProcess/WebProcessProxy.messages.in: Added property svn:eol-style.
653 * WebProcess/Authentication/AuthenticationManager.messages.in: Added property svn:eol-style.
654 * WebProcess/Plugins/PluginProxy.messages.in: Added property svn:eol-style.
655 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added property svn:eol-style.
656 * WebProcess/WebPage/WebInspector.messages.in: Added property svn:eol-style.
657 * WebProcess/WebPage/WebPage.messages.in: Added property svn:eol-style.
658 * WebProcess/WebProcess.messages.in: Added property svn:eol-style.
660 2010-12-16 Sam Weinig <sam@webkit.org>
662 Reviewed by Anders Carlsson.
664 Move NSURLCache initialization from the ProcessLauncherMac to the centralized
665 WebContext initialize WebProcess mechanism.
667 * Shared/WebProcessCreationParameters.cpp:
668 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
669 (WebKit::WebProcessCreationParameters::encode):
670 (WebKit::WebProcessCreationParameters::decode):
671 * Shared/WebProcessCreationParameters.h:
672 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
673 (WebKit::ProcessLauncher::launchProcess):
674 * UIProcess/mac/WebContextMac.mm:
675 (WebKit::WebContext::platformInitializeWebProcess):
676 * WebProcess/WebProcess.cpp:
677 (WebKit::WebProcess::initializeWebProcess):
678 * WebProcess/mac/WebProcessMac.mm:
679 (WebKit::WebProcess::platformInitializeWebProcess):
680 * WebProcess/mac/WebProcessMainMac.mm:
681 (WebKit::WebProcessMain):
682 * WebProcess/win/WebProcessWin.cpp:
683 (WebKit::WebProcess::platformInitializeWebProcess):
684 (WebKit::WebProcess::setShouldPaintNativeControls):
686 2010-12-16 Anders Carlsson <andersca@apple.com>
688 Reviewed by Dan Bernstein.
690 Defer getting a PluginProcessConnection object until the plug-in is initialized
691 https://bugs.webkit.org/show_bug.cgi?id=51207
692 <rdar://problem/8731306>
694 Before this change, we would pass the PluginProcessConnection to the PluginProxy constructor, but not
695 call PluginProcessConnection::addPluginProxy (which associates the plug-in proxy with the connection)
696 until the plug-in is initialized.
698 This could lead to a PluginProxy holding a reference to a PluginProcessConnection when the PluginProxyConnection
699 itself did not know anything about the PluginProxy. This would happen when a page with plug-ins is opened in a background
700 tab, with the plug-ins not yet initialized.
702 Because of this, we could end up in a weird state, where the PluginProcessConnection would think that there are no
703 more plug-ins alive, and invalidate (and null out) the underlying CoreIPC connection, which would lead to crashes
704 when trying to send messages to the connection during later initialization.
706 The fix is to pass the plug-in path to the PluginProxy constructor, and get the connection from PluginProxy::initialize.
708 PluginProcessConnection object
709 * WebProcess/Plugins/PluginProxy.cpp:
710 (WebKit::PluginProxy::create):
711 (WebKit::PluginProxy::PluginProxy):
712 (WebKit::PluginProxy::initialize):
713 * WebProcess/Plugins/PluginProxy.h:
714 * WebProcess/WebPage/WebPage.cpp:
715 (WebKit::WebPage::createPlugin):
717 2010-12-16 Enrica Casucci <enrica@apple.com>
719 Reviewed by Maciej Stachowiak.
721 WebKit2: Cannot copy two successive selections using cmd-c
722 <rdar://problem/8680309>
723 https://bugs.webkit.org/show_bug.cgi?id=51203
725 The previous implementation assumed a call sequence from AppKit that
726 was not always happening.
727 When the user clicks on the pulldown menu, AppKit sends validateUserInterfaceItem
728 calls for each element that needs validation and we used to count the number of
729 validation requests being sent to the web process.
730 All these calls are made before we have the chance to get one reply from the WebProcess.
731 We also delayed the menu update until we had received all the replies to the validation requests.
732 At that point we called update on the menu to trigger the validation one more time with
733 the data retrived from the WebProcess.
734 When the user simply presses cmd-c, only one call to vaidateUserInterfaceItem is made
735 and the menu update triggered the validation of all the menu entries causing the internal
736 state to be out of sync.
737 The new implementation is very simple: for each validation request from AppKit we send
738 a request to the WebProcess and we cache a reference to the menu item being validated.
739 When the WebProcess replies, we retrieve the menu item from our cache and update its state.
741 * UIProcess/API/mac/WKView.mm:
742 (-[WKView initWithFrame:contextRef:pageGroupRef:]): Removed initialization of deleted memebers.
743 (-[WKView validateUserInterfaceItem:]): Request validation to the WebProcess and return YES to
744 allow AppKit to do the keyBinding processing.
745 (-[WKView _setUserInterfaceItemState:enabled:state:]): Called when the WebProcess replies to the
746 validation request to check/uncheck and enable/disable the menu item.
748 2010-12-16 Anders Carlsson <andersca@apple.com>
750 Reviewed by Oliver Hunt.
752 Don't try to call plug-in member functions if the plug-in hasn't been initialized
753 https://bugs.webkit.org/show_bug.cgi?id=51205
754 <rdar://problem/8730204>
756 Make sure that all PluginView functions that can be called while a plug-in has not been
757 initialized (if the plug-in page is in a background tab for example) have an additional
758 check for m_isInitialized.
760 * WebProcess/Plugins/PluginView.cpp:
761 (WebKit::PluginView::setWindowIsFocused):
762 (WebKit::PluginView::windowAndViewFramesChanged):
763 (WebKit::PluginView::platformLayer):
764 (WebKit::PluginView::scriptObject):
765 (WebKit::PluginView::privateBrowsingStateChanged):
766 (WebKit::PluginView::handleEvent):
767 (WebKit::PluginView::viewGeometryDidChange):
768 (WebKit::PluginView::setFocus):
770 2010-12-16 Anders Carlsson <andersca@apple.com>
772 Reviewed by John Sullivan.
774 Add a bunch of m_isStarted assertions to plug-in code.
776 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
777 (WebKit::NetscapePlugin::frameDidFinishLoading):
778 (WebKit::NetscapePlugin::frameDidFail):
779 (WebKit::NetscapePlugin::didEvaluateJavaScript):
780 (WebKit::NetscapePlugin::streamDidReceiveResponse):
781 (WebKit::NetscapePlugin::streamDidReceiveData):
782 (WebKit::NetscapePlugin::streamDidFinishLoading):
783 (WebKit::NetscapePlugin::streamDidFail):
784 (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
785 (WebKit::NetscapePlugin::manualStreamDidReceiveData):
786 (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
787 (WebKit::NetscapePlugin::manualStreamDidFail):
788 (WebKit::NetscapePlugin::handleMouseEvent):
789 (WebKit::NetscapePlugin::handleWheelEvent):
790 (WebKit::NetscapePlugin::handleMouseEnterEvent):
791 (WebKit::NetscapePlugin::handleMouseLeaveEvent):
792 (WebKit::NetscapePlugin::handleKeyboardEvent):
793 (WebKit::NetscapePlugin::setFocus):
794 (WebKit::NetscapePlugin::pluginScriptableNPObject):
795 (WebKit::NetscapePlugin::privateBrowsingStateChanged):
797 2010-12-16 Anders Carlsson <andersca@apple.com>
799 Reviewed by Darin Adler.
801 Save the manual plug-in stream data and redeliver it when the plug-in is initialized
802 https://bugs.webkit.org/show_bug.cgi?id=51201
804 * WebProcess/Plugins/PluginView.cpp:
805 (WebKit::PluginView::PluginView):
806 Initialize m_manualStreamState.
808 (WebKit::PluginView::manualLoadDidReceiveResponse):
809 If the plug-in hasn't been initialized, store the response.
811 (WebKit::PluginView::manualLoadDidReceiveData):
812 If the plug-in hasn't been initialized, store the data.
814 (WebKit::PluginView::manualLoadDidFinishLoading):
815 If the plug-in hasn't been initialized, update the state.
817 (WebKit::PluginView::manualLoadDidFail):
818 If the plug-in hasn't been initialized, store the error and update the state.
820 (WebKit::PluginView::initializePlugin):
821 Call redeliverManualStream.
823 (WebKit::PluginView::redeliverManualStream):
824 Redeliver the manual stream to the plug-in.
826 * WebProcess/Plugins/PluginView.h:
828 2010-12-16 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
830 Reviewed by Andreas Kling.
832 [Qt] Turn off drawing area updates if the item is not visible
834 The updates are controlled by the QGraphicsItem::visible property.
836 * UIProcess/API/qt/qgraphicswkview.cpp:
837 (QGraphicsWKViewPrivate::updateViewportSize):
838 (QGraphicsWKView::setGeometry):
839 (QGraphicsWKView::itemChange):
841 2010-12-15 Dan Bernstein <mitz@apple.com>
843 Reviewed by Sam Weinig.
845 <rdar://problem/8731320> WebProcess’s CFNetwork cache is in ~/Library/Caches/com.apple.WebProcess
847 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
848 (WebKit::ProcessLauncher::launchProcess): Get the location, disk capacity and memory capacity
849 of the UI process’s NSURLCache and pass them to the WebProcess.
850 * WebProcess/mac/WebProcessMainMac.mm:
851 (WebKit::WebProcessMain): If an NSURLCache location was passed on the command line, set the
852 shared NSURLCache to that path and use the specified capacities as initial values.
854 2010-12-15 Dan Bernstein <mitz@apple.com>
856 Reviewed by Sam “I blame andersca” Weinig.
858 Allow responses to be cached by the NSURLCache.
860 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
861 (WebKit::WebFrameLoaderClient::willCacheResponse): Changed to return the response instead of 0.
863 2010-12-14 Enrica Casucci <enrica@apple.com>
865 Reviewed by Adam Roben.
867 Add IME support to WebKit2 on Windows
868 https://bugs.webkit.org/show_bug.cgi?id=51049
869 The implementation is very close to the one in WebKit.
870 The main change is the addition of handlers for WM_IME_STARTCOMPOSITION,
871 WM_IME_REQUEST, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION,
872 WM_IME_SELECT, WM_IME_SETCONTEXT and a number of new messages
873 between the UI process and the WebProcess to send/retrieve
874 the data being handled by the messages listed above.
876 * UIProcess/PageClient.h: Added compositionSelectionChanged for Windows platform.
877 * UIProcess/WebPageProxy.cpp:
878 The following methods send synchronous messages to the WebProcess.
879 (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Retrieves the rectangle to position
880 the cnadidates window.
881 (WebKit::WebPageProxy::getSelectedText): Retrieves the currently selected text.
882 The following methods send asynchronous messages to the WebProcess.
883 (WebKit::WebPageProxy::confirmComposition):
884 (WebKit::WebPageProxy::setComposition):
885 (WebKit::WebPageProxy::didChangeSelection): Name changed.
886 (WebKit::WebPageProxy::didChangeCompositionSelection): Called when there is a change
887 in the composition selection.
888 * UIProcess/WebPageProxy.messages.in: Added messages corresponding to the methods above.
889 * UIProcess/win/WebView.cpp:
890 (WebKit::WebView::wndProc): Added handling of messages for IME.
891 The following are the handlers for the window message being sent during composition.
892 (WebKit::WebView::onIMEComposition):
893 (WebKit::WebView::onIMEEndComposition):
894 (WebKit::WebView::onIMERequestCharPosition):
895 (WebKit::WebView::onIMERequestReconvertString):
896 (WebKit::WebView::onIMERequest):
897 (WebKit::WebView::onIMESelect):
898 (WebKit::WebView::onIMESetContext):
899 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
900 (WebKit::WebEditorClient::respondToChangedSelection): Added notification
901 of composition selection changed for Windows.
902 * WebProcess/WebPage/win/WebPageWin.cpp:
903 The following are the WebProcess counterparts of the new messages.
904 (WebKit::WebPage::confirmComposition):
905 (WebKit::WebPage::setComposition):
906 (WebKit::WebPage::firstRectForCharacterInSelectedRange):
907 (WebKit::WebPage::getSelectedText):
909 2010-12-15 Sam Weinig <sam@webkit.org>
911 Reviewed by Brady Eidson.
913 Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
914 <rdar://problem/8774683>
915 https://bugs.webkit.org/show_bug.cgi?id=51143
917 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
918 (WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
919 are not a custom representation (eg. a PDF).
920 (WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.
921 * WebProcess/WebPage/WebPage.cpp:
922 (WebKit::WebPage::updatePreferences): Enable the page cache.
924 2010-12-15 Simon Fraser <simon.fraser@apple.com>
926 Reviewed by Adele Peterson.
928 WebKit2 in compositing mode no longer has font smoothing
929 https://bugs.webkit.org/show_bug.cgi?id=50733
931 Tell the root GraphicsLayer that its contents are opaque
932 if the WebPage draws its background, and that background
935 The GraphicsLayer then uses the 'contentsOpaque' setting to
936 determine whether to use font smoothing.
938 Add pageBackgroundTransparencyChanged() to DrawingArea
939 so that the WebPage can inform the DrawingArea when the
940 background transparency changes.
942 * WebProcess/WebPage/DrawingArea.h:
943 (WebKit::DrawingArea::pageBackgroundTransparencyChanged):
944 (WebKit::DrawingArea::onPageClose):
945 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
946 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
947 (WebKit::LayerBackedDrawingArea::pageBackgroundTransparencyChanged):
948 * WebProcess/WebPage/LayerBackedDrawingArea.h:
949 * WebProcess/WebPage/WebPage.cpp:
950 (WebKit::WebPage::setDrawsBackground):
951 (WebKit::WebPage::setDrawsTransparentBackground):
953 2010-12-15 Anders Carlsson <andersca@apple.com>
955 Reviewed by Sam Weinig.
957 Fix assertion in plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html test
958 https://bugs.webkit.org/show_bug.cgi?id=51136
960 Ensure that a plug-in that has explicitly cancelled the manual stream won't get any more callbacks.
962 * PluginProcess/PluginControllerProxy.cpp:
963 (WebKit::PluginControllerProxy::PluginControllerProxy):
964 (WebKit::PluginControllerProxy::cancelManualStreamLoad):
965 (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
966 (WebKit::PluginControllerProxy::manualStreamDidReceiveData):
967 (WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
968 (WebKit::PluginControllerProxy::manualStreamDidFail):
969 * PluginProcess/PluginControllerProxy.h:
971 2010-12-15 Brian Weinstein <bweinstein@apple.com>
973 Windows Build Fix. A .h file was added to the vcproj twice, but not its corresponding cpp file.
975 * win/WebKit2.vcproj:
977 2010-12-15 Sam Weinig <sam@webkit.org>
979 Reviewed by Anders Carlsson.
981 WebKit2: Can't add files to an <input type=file>
982 https://bugs.webkit.org/show_bug.cgi?id=51087
984 * Scripts/webkit2/messages.py:
987 * Shared/API/c/WKBase.h:
988 Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
990 * Shared/APIObject.h:
991 Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
993 * Shared/WebOpenPanelParameters.cpp: Added.
994 (WebKit::WebOpenPanelParameters::create):
995 (WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
996 (WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
997 (WebKit::WebOpenPanelParameters::Data::encode):
998 (WebKit::WebOpenPanelParameters::Data::decode):
999 * Shared/WebOpenPanelParameters.h: Added.
1000 (WebKit::WebOpenPanelParameters::allowMultipleFiles):
1001 (WebKit::WebOpenPanelParameters::type):
1002 Class representing options one can pass to open panel.
1004 * UIProcess/API/C/WKAPICast.h:
1005 Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
1007 * UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
1008 (WKOpenPanelParametersGetTypeID):
1009 (WKOpenPanelParametersGetAllowsMultipleFiles):
1010 * UIProcess/API/C/WKOpenPanelParameters.h: Added.
1011 * UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
1012 (WKOpenPanelResultListenerGetTypeID):
1013 (WKOpenPanelResultListenerChooseFiles):
1014 (WKOpenPanelResultListenerCancel):
1015 * UIProcess/API/C/WKOpenPanelResultListener.h: Added.
1018 * UIProcess/API/C/WKPage.h:
1019 Add new UI callback, WKPageRunOpenPanelCallback.
1021 * UIProcess/API/C/WebKit2.h:
1022 Add includes for new API headers.
1024 * UIProcess/API/qt/qwkpage.cpp:
1026 Stub out the runOpenPanel callback.
1028 * UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
1029 (WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
1030 (WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
1031 (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
1032 (WebKit::WebOpenPanelResultListenerProxy::cancel):
1033 (WebKit::WebOpenPanelResultListenerProxy::invalidate):
1034 * UIProcess/WebOpenPanelResultListenerProxy.h: Added.
1035 (WebKit::WebOpenPanelResultListenerProxy::create):
1036 (WebKit::WebOpenPanelResultListenerProxy::type):
1037 Adds the listener used to choose files for <input type=file>
1039 * UIProcess/WebPageProxy.cpp:
1040 (WebKit::WebPageProxy::runOpenPanel):
1041 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1042 (WebKit::WebPageProxy::didCancelForOpenPanel):
1043 * UIProcess/WebPageProxy.h:
1044 * UIProcess/WebPageProxy.messages.in:
1045 * UIProcess/WebUIClient.cpp:
1046 (WebKit::WebUIClient::runOpenPanel):
1047 * UIProcess/WebUIClient.h:
1048 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1049 (WebKit::WebChromeClient::runOpenPanel):
1050 * WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
1051 (WebKit::WebOpenPanelResultListener::create):
1052 (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
1053 (WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
1054 (WebKit::WebOpenPanelResultListener::didChooseFiles):
1055 * WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
1056 (WebKit::WebOpenPanelResultListener::disconnectFromPage):
1057 * WebProcess/WebPage/WebPage.cpp:
1058 (WebKit::WebPage::close):
1059 (WebKit::WebPage::setActiveOpenPanelResultListener):
1060 (WebKit::WebPage::didChooseFilesForOpenPanel):
1061 (WebKit::WebPage::didCancelForOpenPanel):
1062 * WebProcess/WebPage/WebPage.h:
1063 (WebKit::WebPage::activeOpenPanelResultListener):
1064 * WebProcess/WebPage/WebPage.messages.in:
1065 Pipe through file choosing.
1068 * WebKit2.xcodeproj/project.pbxproj:
1069 * win/WebKit2.vcproj:
1070 * win/WebKit2Generated.make:
1073 2010-12-15 Anders Carlsson <andersca@apple.com>
1075 Reviewed by Maciej Stachowiak.
1077 Semi-reproducible crash in ChunkedUpdateDrawingArea::paintIntoUpdateChunk closing a particular yahoo page
1078 https://bugs.webkit.org/show_bug.cgi?id=51126
1079 <rdar://problem/8771219>
1081 Laying out the web page can cause the drawing area to change so we need to protect against this.
1083 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1084 (WebKit::ChunkedUpdateDrawingArea::display):
1085 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1086 (WebKit::LayerBackedDrawingArea::display):
1087 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1088 (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
1090 2010-12-15 Brian Weinstein <bweinstein@apple.com>
1092 Reviewed by Adam Roben.
1094 WebKit2: WebPageWin needs implementations of hasLocalDataForURL and canHandleRequest
1095 https://bugs.webkit.org/show_bug.cgi?id=51090
1097 Implement these functions for WebKit2 on Windows.
1099 * WebProcess/WebPage/WebPage.cpp:
1100 (WebKit::WebPage::hasLocalDataForURL): Does the cross-platform part of the check for having local
1101 data (file URL or subresource), then calls platformHasLocalDataForURL to let the platform do
1102 their specific checks.
1103 * WebProcess/WebPage/WebPage.h:
1104 * WebProcess/WebPage/mac/WebPageMac.mm:
1105 (WebKit::WebPage::platformHasLocalDataForURL): Moved the cross-platform code from here to WebPage::hasLocalDataForURL.
1106 * WebProcess/WebPage/qt/WebPageQt.cpp:
1107 (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL.
1108 * WebProcess/WebPage/win/WebPageWin.cpp:
1109 (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL and implemented with CFNetwork calls. This is the
1110 CFNetwork equivalent of the code in WebPageMac::platformHasLocalDataForURL.
1111 (WebKit::WebPage::canHandleRequest): Copied the line of code from WebView::canHandleRequest in WebKit1, with a FIXME saying
1112 this might not be enough (although it was in WebKit1 on Windows).
1114 2010-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
1116 Unreviewed, rolling out r74117.
1117 http://trac.webkit.org/changeset/74117
1118 https://bugs.webkit.org/show_bug.cgi?id=51113
1120 This broke the GTK1 build. (Requested by mrobinson on
1123 * GNUmakefile.am: Removed.
1124 * Scripts/generate-forwarding-headers.pl:
1126 * gtk/webkit2.pc.in: Removed.
1128 2010-12-15 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
1130 Reviewed by Martin Robinson.
1132 Changes to enable building WebKit2 for Gtk port.
1133 (https://bugs.webkit.org/show_bug.cgi?id=37369)
1135 * GNUmakefile.am: Added.
1136 * Scripts/generate-forwarding-headers.pl: For GTK port, taking 1 extra argument for copying network headers.
1137 * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header file for WebKit2 sources files.
1139 * gtk/webkit2.pc.in: Added.
1141 2010-12-15 Jan Erik Hanssen <jhanssen@sencha.com>
1143 Reviewed by Andreas Kling.
1145 [Qt][WK2] webkit2 does not compile on OS X
1146 https://bugs.webkit.org/show_bug.cgi?id=50128
1148 prctl(2) is only available on Linux, so use an atexit handler for killing
1149 all the child processes when the process is exiting.
1151 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1152 (WebKit::cleanupProcesses):
1153 (WebKit::QtWebProcess::QtWebProcess):
1154 (WebKit::QtWebProcess::processStateChanged):
1155 (WebKit::ProcessLauncherHelper::instance):
1157 2010-12-14 Anders Carlsson <andersca@apple.com>
1161 * win/WebKit2Common.vsprops:
1163 2010-12-14 Anders Carlsson <andersca@apple.com>
1169 2010-12-14 Anders Carlsson <andersca@apple.com>
1171 Reviewed by TYPO FIX.
1175 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1176 (WebKit::NetscapePluginModule::determineQuirks):
1178 2010-12-14 Anders Carlsson <andersca@apple.com>
1180 Reviewed by Sam Weinig.
1182 Cannot type into plugin edit field
1183 https://bugs.webkit.org/show_bug.cgi?id=51074
1184 <rdar://problem/8483741>
1186 Add a PrognameShouldBeWebKitPluginHost quirk, since it turns out Flash Player calls getprogname() and checks
1187 if the return value is "WebKitPluginHost" in order to determine when to handle NPCocoaEventKeyDown events.
1189 * PluginProcess/PluginProcess.cpp:
1190 (WebKit::PluginProcess::netscapePluginModule):
1191 If the plug-in module has the PrognameShouldBeWebKitPluginHost quirk, call setprogname("WebKitPluginHost").
1193 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1194 (WebKit::NetscapePluginModule::load):
1195 Call determineQuirks()
1197 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1198 (WebKit::NetscapePluginModule::determineQuirks):
1199 Add the PrognameShouldBeWebKitPluginHost quirk for Flash.
1201 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
1202 (WebKit::NetscapePluginModule::determineQuirks):
1203 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1204 (WebKit::NetscapePluginModule::determineQuirks):
1207 * Shared/Plugins/PluginQuirks.h:
1208 Add new PluginQuirks file.
1210 * WebKit2.xcodeproj/project.pbxproj:
1213 2010-12-14 Anders Carlsson <andersca@apple.com>
1215 Reviewed by Sam Weinig.
1217 Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there
1218 https://bugs.webkit.org/show_bug.cgi?id=51066
1220 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
1221 (WebKit::NetscapePluginModule::getPluginInfo):
1222 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
1223 (WebKit::PluginInfoStore::getPluginInfo):
1226 2010-12-14 Anders Carlsson <andersca@apple.com>
1228 Reviewed by Dan Bernstein.
1230 Move Windows version of getPluginInfo to NetscapePluginModule
1231 https://bugs.webkit.org/show_bug.cgi?id=51073
1233 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
1234 (WebKit::getVersionInfo):
1235 (WebKit::fileVersion):
1236 (WebKit::NetscapePluginModule::getPluginInfo):
1237 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1238 (WebKit::PluginInfoStore::getPluginInfo):
1239 * win/WebKit2.vcproj:
1241 2010-12-14 Alice Liu <alice.liu@apple.com>
1245 * UIProcess/WebProcessProxy.h:
1246 (WebKit::WebProcessProxy::sendSync):
1247 Move the default argument to the declaration.
1249 2010-12-14 Anders Carlsson <andersca@apple.com>
1251 Reviewed by Adam Roben.
1253 Move PluginInfoStore::getPluginInfo to NetscapePluginModule
1254 https://bugs.webkit.org/show_bug.cgi?id=51058
1256 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1257 Move implementation of PluginInfoStore::getPluginInfo and related
1258 helper functions here.
1260 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1261 (WebKit::PluginInfoStore::getPluginInfo):
1262 Just call NetscapePluginModule::getPluginInfo here for now.
1264 * WebKit2.xcodeproj/project.pbxproj:
1265 Add NetscapePluginModuleMac.mm.
1267 2010-12-14 Anders Carlsson <andersca@apple.com>
1269 Reviewed by John Sullivan.
1271 Switch name and description order when fetching Carbon plug-in info
1272 https://bugs.webkit.org/show_bug.cgi?id=46211
1274 The plug-in description comes before the name in the Carbon string list resource.
1276 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1277 (WebKit::getPluginInfoFromCarbonResources):
1279 2010-12-14 Anders Carlsson <andersca@apple.com>
1281 Reviewed by Adam Roben.
1283 Move NetscapePluginModule.{cpp|h} to Shared/Plugins/Netscape
1284 https://bugs.webkit.org/show_bug.cgi?id=51052
1286 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp.
1287 * Shared/Plugins/Netscape/NetscapePluginModule.h: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h.
1289 * WebKit2.xcodeproj/project.pbxproj:
1290 * win/WebKit2.vcproj:
1291 * win/WebKit2Common.vsprops:
1293 2010-12-14 Anders Carlsson <andersca@apple.com>
1295 Reviewed by Sam Weinig.
1297 Handle complex text input for plug-ins
1298 https://bugs.webkit.org/show_bug.cgi?id=51047
1300 * PluginProcess/PluginControllerProxy.cpp:
1301 (WebKit::PluginControllerProxy::sendComplexTextInput):
1302 Pass along the text input to the plug-in.
1304 * PluginProcess/PluginControllerProxy.messages.in:
1305 Add SendComplexTextInput message.
1307 * UIProcess/API/mac/WKTextInputWindowController.h: Added.
1308 * UIProcess/API/mac/WKTextInputWindowController.mm: Added.
1309 Add text input window controller, mostly copied from WebKit1.
1311 * UIProcess/API/mac/WKView.mm:
1312 (-[WKView keyDown:]):
1313 If needed, pass along the event to the text input window controller.
1315 (-[WKView inputContext]):
1316 Return the input context of the text input window controller.
1318 (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
1319 Notify the input window controller that the input source changed.
1321 * UIProcess/WebPageProxy.cpp:
1322 (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
1323 Send the complex text input to the web process.
1325 * WebKit2.xcodeproj/project.pbxproj:
1328 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1329 (WebKit::convertStringToKeyCodes):
1330 Convert a string to a vector of key codes in the current encoding.
1332 (WebKit::NetscapePlugin::sendComplexTextInput):
1333 In the Cocoa event model, create and dispatch an NPCocoaEventTextInput event.
1334 In the Carbon event model, convert the string to individual key codes and send them
1337 * WebProcess/Plugins/PluginProxy.cpp:
1338 (WebKit::PluginProxy::sendComplexTextInput):
1339 Send the text to the plug-in controller proxy.
1341 * WebProcess/Plugins/PluginView.cpp:
1342 (WebKit::PluginView::sendComplexTextInput):
1343 If the plug-in has a matching text input identifier, call Plugin::sendComplexTextInput.
1345 * WebProcess/WebPage/WebPage.messages.in:
1346 Add SendComplexTextInputToPlugin message.
1348 * WebProcess/WebPage/mac/WebPageMac.mm:
1349 (WebKit::WebPage::sendComplexTextInputToPlugin):
1350 Iterate over all known plug-in views and try to find one to send the text input to.
1352 2010-12-13 Alexey Proskuryakov <ap@apple.com>
1354 Reviewed by Adam Barth.
1356 https://bugs.webkit.org/show_bug.cgi?id=50953
1357 DNS Prefetch should be an opt-in feature
1359 Pass the preference through WebKit2.
1361 * Shared/WebPreferencesStore.h:
1362 * UIProcess/API/C/WKPreferences.cpp:
1363 (WKPreferencesSetDNSPrefetchingEnabled):
1364 (WKPreferencesGetDNSPrefetchingEnabled):
1365 * UIProcess/API/C/WKPreferences.h:
1366 * WebProcess/WebPage/WebPage.cpp:
1367 (WebKit::WebPage::updatePreferences):
1369 2010-12-13 Anders Carlsson <andersca@apple.com>
1371 Reviewed by Kevin Decker.
1373 Pass the complex text input status to the WKView
1374 https://bugs.webkit.org/show_bug.cgi?id=50993
1376 * UIProcess/API/mac/PageClientImpl.h:
1377 * UIProcess/API/mac/PageClientImpl.mm:
1378 (WebKit::PageClientImpl::setComplexTextInputEnabled):
1379 * UIProcess/API/mac/WKView.mm:
1380 (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
1381 * UIProcess/API/mac/WKViewInternal.h:
1382 * UIProcess/PageClient.h:
1383 * UIProcess/WebPageProxy.cpp:
1384 (WebKit::WebPageProxy::setComplexTextInputEnabled):
1386 2010-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
1388 Reviewed by Kenneth Rohde Christiansen.
1390 WebKit 2 does not send touch cancel events correctly between processes
1391 https://bugs.webkit.org/show_bug.cgi?id=50235
1393 The classes WebKit2PlatformTouchPoint and WebKit2PlatformTouchEvent
1394 misses the conversion of TouchCancel events and points.
1396 This patch add the missing enums when converting from a WebTouchEvent
1397 to a PlatformTouchEvent.
1399 Testing is already covered by fast/events/touch/send-oncancel-event.html
1401 * Shared/WebEventConversion.cpp:
1402 (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1403 (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
1405 2010-12-14 Zalan Bujtas <zbujtas@gmail.com>
1407 Reviewed by Kenneth Rohde Christiansen.
1409 Add loadFinished() for provisional load error
1410 This fixes the hanging UI state, when provisional load error occurs due to
1411 the async nature of policy check.
1413 https://bugs.webkit.org/show_bug.cgi?id=48724
1415 * UIProcess/API/qt/ClientImpl.cpp:
1417 (qt_wk_didFailProvisionalLoadWithErrorForFrame):
1418 (qt_wk_didFinishLoadForFrame):
1419 (qt_wk_didFailLoadWithErrorForFrame):
1421 2010-12-13 Sam Weinig <sam@webkit.org>
1423 Reviewed by Anders Carlsson.
1425 WebKit2: Need to be able to set the application name for the user agent for a WKPage
1426 https://bugs.webkit.org/show_bug.cgi?id=51011
1429 WebKit2: Need to be able to set the application name for the user agent for a WKPage
1430 <rdar://problem/8564532>
1431 WebKit2: Need to be able to get the computed user agent for a WKPage
1432 <rdar://problem/8637285>
1434 Moves user agent computation to the UIProcess and just passes it to the WebProcess
1435 when it has changed.
1437 * Shared/WebPageCreationParameters.cpp:
1438 (WebKit::WebPageCreationParameters::encode):
1439 (WebKit::WebPageCreationParameters::decode):
1440 * Shared/WebPageCreationParameters.h:
1441 Add a user agent to the creation parameters.
1443 * UIProcess/API/C/WKPage.cpp:
1444 (WKPageCopyUserAgent):
1445 (WKPageCopyApplicationNameForUserAgent):
1446 (WKPageSetApplicationNameForUserAgent):
1447 (WKPageSetCustomUserAgent):
1448 * UIProcess/API/C/WKPage.h:
1449 Add new API to set the application name and access the computed user agent.
1451 * UIProcess/WebPageProxy.cpp:
1452 (WebKit::WebPageProxy::WebPageProxy):
1453 (WebKit::WebPageProxy::close):
1454 (WebKit::WebPageProxy::setUserAgent):
1455 (WebKit::WebPageProxy::setApplicationNameForUserAgent):
1456 (WebKit::WebPageProxy::setCustomUserAgent):
1457 (WebKit::WebPageProxy::processDidCrash):
1458 (WebKit::WebPageProxy::creationParameters):
1459 * UIProcess/WebPageProxy.h:
1460 (WebKit::WebPageProxy::userAgent):
1461 (WebKit::WebPageProxy::applicationNameForUserAgent):
1462 * UIProcess/mac/WebPageProxyMac.mm: Added.
1463 * WebProcess/WebPage/WebPage.cpp:
1464 (WebKit::WebPage::WebPage):
1465 (WebKit::WebPage::setUserAgent):
1466 * WebProcess/WebPage/WebPage.h:
1467 (WebKit::WebPage::userAgent):
1468 * WebProcess/WebPage/WebPage.messages.in:
1469 Pipe through user agent.
1471 (WebKit::callGestalt):
1472 (WebKit::macOSXVersionString):
1473 (WebKit::userVisibleWebKitVersionString):
1474 (WebKit::WebPageProxy::standardUserAgent):
1475 * UIProcess/win/WebPageProxyWin.cpp: Added.
1476 (WebKit::windowsVersion):
1477 (WebKit::userVisibleWebKitVersionString):
1478 (WebKit::WebPageProxy::standardUserAgent):
1479 Port standardUserAgent computation from WebKit1.
1481 * UIProcess/qt/WebPageProxyQt.cpp: Added.
1482 (WebKit::WebPageProxy::standardUserAgent):
1483 Stub out the user agent so there is no change in behavior.
1486 * WebKit2.xcodeproj/project.pbxproj:
1487 * win/WebKit2.vcproj:
1490 2010-12-13 Brady Eidson <beidson@apple.com>
1492 Reviewed by Jon Honeycutt (and Brian Weinstein in heart).
1494 <rdar://problem/8752202> and https://bugs.webkit.org/show_bug.cgi?id=50997
1495 Expose "link title" and "link label" to InjectedBundleHitTestResult API
1497 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1498 (WKBundleHitTestResultCopyLinkLabel):
1499 (WKBundleHitTestResultCopyLinkTitle):
1500 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1502 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1503 (WebKit::InjectedBundleHitTestResult::linkLabel):
1504 (WebKit::InjectedBundleHitTestResult::linkTitle):
1505 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1507 2010-12-13 Brian Weinstein <bweinstein@apple.com>
1509 Windows Build Fix. Add a needed include.
1511 * UIProcess/win/WebView.cpp:
1513 2010-12-13 Sam Weinig <sam@webkit.org>
1515 Reviewed by Anders Carlsson.
1517 Remove associated page concept from WKView constructor
1518 https://bugs.webkit.org/show_bug.cgi?id=50983
1520 Step 2: Remove WebPageNamespace. It no longer does anything.
1522 * Shared/APIObject.h:
1523 * UIProcess/API/C/WKPage.h:
1524 * UIProcess/API/mac/WKView.mm:
1525 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1526 * UIProcess/API/qt/qgraphicswkview.cpp:
1527 * UIProcess/API/qt/qwkcontext.cpp:
1528 (QWKContext::QWKContext):
1529 * UIProcess/API/qt/qwkcontext_p.h:
1530 * UIProcess/API/qt/qwkpage.cpp:
1531 (QWKPagePrivate::QWKPagePrivate):
1532 * UIProcess/API/qt/qwkpage_p.h:
1533 * UIProcess/WebContext.cpp:
1534 (WebKit::WebContext::WebContext):
1535 (WebKit::WebContext::~WebContext):
1536 (WebKit::WebContext::createWebPage):
1537 * UIProcess/WebContext.h:
1538 * UIProcess/WebPageNamespace.cpp: Removed.
1539 * UIProcess/WebPageNamespace.h: Removed.
1540 * UIProcess/WebPageProxy.cpp:
1541 * UIProcess/WebPageProxy.h:
1542 (WebKit::WebPageProxy::context):
1543 * UIProcess/WebProcessProxy.cpp:
1544 (WebKit::WebProcessProxy::createWebPage):
1545 * UIProcess/WebProcessProxy.h:
1546 * UIProcess/win/WebView.cpp:
1547 (WebKit::WebView::WebView):
1548 * UIProcess/win/WebView.h:
1550 * WebKit2.xcodeproj/project.pbxproj:
1551 * win/WebKit2.vcproj:
1553 2010-12-13 Sam Weinig <sam@webkit.org>
1557 * UIProcess/win/WebView.h:
1559 2010-12-13 Sam Weinig <sam@webkit.org>
1563 * UIProcess/win/WebInspectorProxyWin.cpp:
1564 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1565 * UIProcess/win/WebView.h:
1566 (WebKit::WebView::create):
1568 2010-12-13 Sam Weinig <sam@webkit.org>
1570 Reviewed by Anders Carlsson.
1572 Remove associated page concept from WKView constructor
1573 https://bugs.webkit.org/show_bug.cgi?id=50983
1575 Step 1: Remove associate page constructors from WKView and make
1576 all views use the shared namespace for the context.
1578 * UIProcess/API/C/win/WKView.cpp:
1579 * UIProcess/API/C/win/WKView.h:
1580 * UIProcess/API/mac/WKView.h:
1581 * UIProcess/API/mac/WKView.mm:
1582 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1583 * UIProcess/API/qt/qwkcontext.cpp:
1584 * UIProcess/API/qt/qwkcontext.h:
1585 * UIProcess/mac/WebInspectorProxyMac.mm:
1586 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1587 * UIProcess/win/WebView.cpp:
1588 (WebKit::WebView::WebView):
1589 * UIProcess/win/WebView.h:
1590 (WebKit::WebView::create):
1592 2010-12-13 Anders Carlsson <andersca@apple.com>
1596 * UIProcess/WebPageProxy.h:
1598 2010-12-13 Brian Weinstein <bweinstein@apple.com>
1600 Reviewed by Adam Roben.
1602 WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
1603 https://bugs.webkit.org/show_bug.cgi?id=50975
1604 <rdar://problem/8763501>
1606 Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.
1608 * UIProcess/WebInspectorProxy.cpp:
1609 (WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.
1610 * UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
1611 * UIProcess/win/WebInspectorProxyWin.cpp:
1612 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.
1614 2010-12-13 Anders Carlsson <andersca@apple.com>
1616 Reviewed by Darin Adler.
1618 Pass the complex text input state all the way to the UI process
1619 https://bugs.webkit.org/show_bug.cgi?id=50980
1621 * PluginProcess/PluginControllerProxy.cpp:
1622 (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
1623 * UIProcess/WebPageProxy.cpp:
1624 (WebKit::WebPageProxy::setComplexTextInputEnabled):
1625 * UIProcess/WebPageProxy.h:
1626 * UIProcess/WebPageProxy.messages.in:
1627 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1628 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1629 (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
1630 * WebProcess/Plugins/Plugin.h:
1631 * WebProcess/Plugins/PluginProxy.cpp:
1632 (WebKit::PluginProxy::pluginComplexTextInputIdentifier):
1633 (WebKit::PluginProxy::setComplexTextInputEnabled):
1634 * WebProcess/Plugins/PluginProxy.h:
1635 * WebProcess/Plugins/PluginProxy.messages.in:
1636 * WebProcess/Plugins/PluginView.cpp:
1637 (WebKit::PluginView::setComplexTextInputEnabled):
1639 2010-12-13 Sam Weinig <sam@webkit.org>
1641 Reviewed by Anders Carlsson.
1643 Change the WebKit2 public API so there is no explicit WKPageNamespace object
1644 https://bugs.webkit.org/show_bug.cgi?id=50898
1646 * Shared/API/c/WKBase.h: Remove definition of WKPageNamespaceRef.
1647 * UIProcess/API/C/WKAPICast.h: Remove toAPI/toImpl for WKPageNamespaceRef.
1649 * UIProcess/API/C/WKPage.cpp:
1650 * UIProcess/API/C/WKPage.h:
1651 Replace WKPageGetPageNamespace with WKPageGetContext.
1653 * UIProcess/API/C/WKPageNamespace.cpp: Removed.
1654 * UIProcess/API/C/WKPageNamespace.h: Removed.
1656 * UIProcess/API/C/WebKit2.h: Remove #include of WKPageNamespace.h.
1658 * UIProcess/API/C/win/WKView.cpp:
1659 (WKViewCreate): Changed to take a WKContextRef instead of a WKPageNamespaceRef.
1660 (WKViewCreateUsingSharedProcess): Added. Similar to WKViewCreate except that
1661 all callers of it will have their views end up in the same shared process, whereas
1662 with WKViewCreate, a new internal page namespace will be created and could place
1663 the view's WebPage into a new process.
1664 (WKViewCreateForAssociatedPage): Added. Creates a view that is forced to use the
1665 same process as the passed in page.
1667 * UIProcess/win/WebView.cpp:
1668 (WebKit::WebView::WebView):
1669 (WebKit::WebView::initialize):
1670 * UIProcess/win/WebView.h:
1671 (WebKit::WebView::create):
1672 (WebKit::WebView::createUsingSharedProcess):
1673 (WebKit::WebView::createForAssociatedPage):
1674 Implementation of the WKView create functions.
1676 * UIProcess/API/C/win/WKView.h:
1677 * UIProcess/API/mac/WKView.h:
1678 * UIProcess/API/mac/WKView.mm:
1679 (-[WKView initWithFrame:]):
1680 (-[WKView initWithFrame:contextRef:]):
1681 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1682 (-[WKView initWithFrame:contextRef:usingSharedProcess:]):
1683 (-[WKView initWithFrame:contextRef:pageGroupRef:usingSharedProcess:]):
1684 (-[WKView initWithFrame:forAssociatedPageRef:]):
1685 (-[WKView initWithFrame:forAssociatedPageRef:pageGroupRef:]):
1686 (-[WKView initWithFrame:pageNamespace:pageGroup:]):
1687 Add new initializers for the objective-c WKView. It follows the same
1688 pattern as WKViewRef.
1690 * UIProcess/API/qt/qwkcontext.cpp:
1691 (QWKContext::QWKContext):
1692 * UIProcess/API/qt/qwkcontext.h:
1693 Remove uses of WKPageNamespaceRef.
1695 * UIProcess/WebContext.cpp:
1696 (WebKit::WebContext::sharedPageNamespace): Returns a shared
1697 page namespace used by the view's createUsingSharedProcess constructions.
1698 (WebKit::WebContext::createPageNamespace): Change to return
1699 a PassRefPtr to make things clearer.
1700 (WebKit::WebContext::pageNamespaceWasDestroyed): Clear the shared
1701 namespace if it is cleared.
1702 * UIProcess/WebContext.h:
1704 * UIProcess/WebPageNamespace.h: Remove unused "struct WKContextStatistics".
1706 * UIProcess/WebPageProxy.cpp:
1707 (WebKit::WebPageProxy::context):
1708 * UIProcess/WebPageProxy.h:
1711 * UIProcess/mac/WebInspectorProxyMac.mm:
1712 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1713 * UIProcess/win/WebInspectorProxyWin.cpp:
1714 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1715 Use forAssociatedPageRef constructor for the WebInspector view.
1718 * WebKit2.xcodeproj/project.pbxproj:
1719 * win/WebKit2.vcproj:
1720 * win/WebKit2Generated.make:
1721 Remove WKPageNamespace.h/cpp.
1723 2010-12-13 Brent Fulgham <bfulgham@webkit.org>
1725 Unreviewed build fix.
1727 * UIProcess/win/WebInspectorProxyWin.cpp: Non-Apple builds
1728 need to include <wtf/RetainPtr.h>.
1730 2010-12-13 Brent Fulgham <bfulgham@webkit.org>
1732 Unreviewed build fix after r73807.
1734 Added stub implementation of Download object.
1736 * WebProcess/Downloads/curl: Added.
1737 * WebProcess/Downloads/curl/DownloadCurl.cpp: Added.
1738 (WebKit::Download::start):
1739 (WebKit::Download::startWithHandle):
1740 (WebKit::Download::cancel):
1741 (WebKit::Download::platformInvalidate):
1742 * win/WebKit2.vcproj: Exclude DownloadCFNet for Cairo builds,
1743 added DownloadCurl (excluded for regular Apple builds.)
1745 2010-12-13 Anders Carlsson <andersca@apple.com>
1747 Reviewed by Sam Weinig.
1749 Add the ability for plug-ins to toggle complex text input
1750 https://bugs.webkit.org/show_bug.cgi?id=50966
1752 * PluginProcess/PluginControllerProxy.cpp:
1753 (WebKit::PluginControllerProxy::PluginControllerProxy):
1754 Initialize m_isComplexTextInputEnabled.
1756 (WebKit::PluginControllerProxy::setComplexTextInputEnabled):
1757 Update m_isComplexTextInputEnabled.
1759 * PluginProcess/PluginControllerProxy.h:
1760 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1761 (WebKit::NetscapePlugin::NetscapePlugin):
1762 Initialize m_pluginHasFocus and m_windowHasFocus.
1764 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1765 (WebKit::NetscapePlugin::isWindowActive):
1766 Return m_windowHasFocus.
1768 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1769 (WebKit::NetscapePlugin::platformSetFocus):
1770 Update m_pluginHasFocus and call setComplexTextInputEnabled.
1772 (WebKit::NetscapePlugin::windowFocusChanged):
1773 Update m_windowHasFocus and call setComplexTextInputEnabled.
1775 * WebProcess/Plugins/PluginController.h:
1776 Add setComplexTextInputEnabled.
1778 * WebProcess/Plugins/PluginView.cpp:
1779 (WebKit::PluginView::setComplexTextInputEnabled):
1780 * WebProcess/Plugins/PluginView.h:
1781 Add setComplexTextInputEnabled
1783 2010-12-13 David Hyatt <hyatt@apple.com>
1785 Reviewed by Adam Roben.
1787 Remove the space behavior that I added. It's covered in EventHandler in WebCore
1788 already for Windows.
1790 * WebProcess/WebPage/win/WebPageWin.cpp:
1791 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1793 2010-12-13 David Hyatt <hyatt@apple.com>
1795 Reviewed by Sam Weinig.
1797 https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. Use
1798 logical scrolling instead of physical scrolling for those keys in WebKit2.
1800 * WebProcess/WebPage/mac/WebPageMac.mm:
1801 (WebKit::logicalScroll):
1802 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1803 * WebProcess/WebPage/qt/WebPageQt.cpp:
1804 (WebKit::logicalScroll):
1805 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1806 * WebProcess/WebPage/win/WebPageWin.cpp:
1807 (WebKit::logicalScroll):
1808 (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1810 2010-12-13 Brian Weinstein <bweinstein@apple.com>
1812 Reviewed by Darin Adler.
1814 WebKit2: Focusing Web Inspector window doesn't focus contents on Windows
1815 https://bugs.webkit.org/show_bug.cgi?id=50947
1816 <rdar://problem/8762468>
1818 When we get the notification that the inspector window has focused, focus the inner inspector view.
1820 * UIProcess/WebInspectorProxy.h:
1821 * UIProcess/win/WebInspectorProxyWin.cpp:
1822 (WebKit::WebInspectorProxy::onSetFocusEvent): Set the focus of the inspector view, because that is what
1823 needs to be focused in the inspector window.
1825 2010-12-13 Dan Bernstein <mitz@apple.com>
1829 * WebProcess/Downloads/mac/DownloadMac.mm:
1830 (WebKit::originatingURLFromBackForwardList):
1832 2010-12-13 Balazs Kelemen <kbalazs@webkit.org>
1834 Unreviewed trivial build fix (linux, 64 bit, gcc-4.5.1)
1836 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1837 (WebKit::WebChromeClient::exceededDatabaseQuota):
1838 Don't use unsigned long long as alias for uint64_t.
1840 2010-12-13 Anders Carlsson <andersca@apple.com>
1842 Reviewed by John Sullivan.
1844 Crash when clicking a download link that targets a new tab
1845 https://bugs.webkit.org/show_bug.cgi?id=50935
1846 <rdar://problem/8760572>
1848 Check for a null history item.
1850 * WebProcess/Downloads/mac/DownloadMac.mm:
1851 (WebKit::originatingURLFromBackForwardList):
1853 2010-12-13 Andras Becsi <abecsi@webkit.org>
1855 Reviewed by Csaba Osztrogonác.
1857 [Qt][WK2] Fix build if WebKitTools are not available
1858 https://bugs.webkit.org/show_bug.cgi?id=50242
1860 * DerivedSources.pro: Remove dependency to WebKitTools.
1861 * Scripts/generate-forwarding-headers.pl: Moved from WebKitTools/Scripts/generate-forwarding-headers.pl.
1863 2010-12-13 Csaba Osztrogonác <ossy@webkit.org>
1867 * WebKit2.pro: Remove non-existant Shared/DrawingAreaBase.h from build system.
1869 2010-10-28 MORITA Hajime <morrita@google.com>
1871 Reviewed by Ojan Vafai.
1873 spellcheck does not check pasted text
1874 https://bugs.webkit.org/show_bug.cgi?id=40092
1876 Added a stub implememntation.
1878 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1879 (WebKit::WebEditorClient::requestCheckingOfString):
1880 * WebProcess/WebCoreSupport/WebEditorClient.h:
1882 2010-12-12 Brian Weinstein <bweinstein@apple.com>
1884 Reviewed by Tim Hatcher.
1886 WebKit2: Implement WebInspector::localizedStringsURL on Windows
1887 https://bugs.webkit.org/show_bug.cgi?id=50896
1889 Find the localized strings file using CFBundleCopyResourceURL.
1891 * WebProcess/WebPage/win/WebInspectorWin.cpp:
1892 (WebKit::WebInspector::localizedStringsURL):
1894 2010-12-12 Sam Weinig <sam@webkit.org>
1896 Reviewed by Anders Carlsson.
1898 Give LogTextInput a sensible flag value.
1900 * Platform/Logging.cpp:
1902 2010-12-12 Sam Weinig <sam@webkit.org>
1904 Reviewed by Anders Carlsson.
1906 Remove incorrect assertion that has been firing in the API tester.
1908 * UIProcess/WebDatabaseManagerProxy.cpp:
1909 (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
1911 2010-12-12 Sam Weinig <sam@webkit.org>
1913 Reviewed by Anders Carlsson.
1915 Disable WebKit2 logging by default.
1916 https://bugs.webkit.org/show_bug.cgi?id=50878
1918 * Platform/Logging.cpp:
1919 (initializeLogChannelsIfNecessary):
1921 2010-12-11 Brian Weinstein <bweinstein@apple.com>
1923 Reviewed by Sam Weinig.
1925 Web Inspector: Make inspector on Windows show and be usable in WebKit2
1926 https://bugs.webkit.org/show_bug.cgi?id=50877
1928 Hook up the unimplemented methods in WebInspectorProxyWin to get the web inspector
1929 showing and usable in WebKit2 on Windows.
1931 * UIProcess/WebInspectorProxy.cpp:
1932 (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize Windows-specific variables to 0.
1933 * UIProcess/WebInspectorProxy.h:
1934 * UIProcess/win/WebInspectorProxyWin.cpp:
1935 (WebKit::WebInspectorProxy::registerInspectorViewWindowClass): Sets up the inspector view class.
1936 (WebKit::WebInspectorProxy::InspectorViewWndProc): Calls through to the WebInspectorProxy's non-static
1938 (WebKit::WebInspectorProxy::wndProc): Handles WM_SIZE, WM_CLOSE, and WM_GETMINMAXINFO, the rest go to
1940 (WebKit::WebInspectorProxy::onSizeEvent): Resize the WKView that has the inspector page to match the
1941 outer window that was just resized.
1942 (WebKit::WebInspectorProxy::onMinMaxInfoEvent): Set the minimum size the window can be resized to.
1943 (WebKit::WebInspectorProxy::onCloseEvent): Hide the window, and call WebInspectorProxy::close.
1944 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WKView and return its page.
1945 (WebKit::WebInspectorProxy::platformOpen): Create an HWND for the inspector, put the inspector's WKView
1946 inside of it, and show the window.
1947 (WebKit::WebInspectorProxy::platformClose): Destroy the inspector's window (which destroys the child WKView),
1948 and 0 out instance variables.
1949 (WebKit::WebInspectorProxy::inspectorPageURL): Finds inspector/inspector.html in the WebKit bundle.
1951 2010-12-12 Balazs Kelemen <kbalazs@webkit.org>
1953 Reviewed by Andreas Kling.
1955 [Qt][WK2] Crash in WebPage constructor.
1956 https://bugs.webkit.org/show_bug.cgi?id=50892
1958 * WebProcess/qt/WebProcessQt.cpp:
1959 (WebKit::WebProcess::platformInitializeWebProcess):
1960 Disable runtime enabled features that have no WebKit2 implementation yet.
1962 2010-12-10 Jon Honeycutt <jhoneycutt@apple.com>
1964 Select menus with short option titles do not paint properly
1965 https://bugs.webkit.org/show_bug.cgi?id=50860
1966 <rdar://problem/8660807>
1968 The backing stores used for painting the popup menu items were only as
1969 wide as the widest option title, but the popup window that we create is
1970 at least as wide as the <select> element. This adjusts the backing
1971 stores to be at least as wide as the <select>, as well.
1973 Reviewed by Sam Weinig.
1975 * UIProcess/win/WebPopupMenuProxyWin.cpp:
1976 (WebKit::WebPopupMenuProxyWin::paint):
1977 Paint using the width of the backing store.
1979 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1980 (WebKit::WebPopupMenu::show):
1981 Pass the page coordinates of the <select> element to
1982 setUpPlatformData().
1984 * WebProcess/WebCoreSupport/WebPopupMenu.h:
1985 Added new parameter to setUpPlatformData().
1987 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1988 (WebKit::WebPopupMenu::setUpPlatformData):
1991 * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
1992 (WebKit::WebPopupMenu::setUpPlatformData):
1995 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1996 (WebKit::WebPopupMenu::setUpPlatformData):
1997 Fixed a typo in a comment. Adjust the backing store size to be at least
1998 as wide as the <select> element, and use that width when painting the
1999 items to the backing store.
2001 2010-12-11 Csaba Osztrogonác <ossy@webkit.org>
2003 Unreviewed Qt buildfix after r73808.
2005 WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
2006 https://bugs.webkit.org/show_bug.cgi?id=50606
2008 * DerivedSources.pro:
2010 2010-12-11 Sheriff Bot <webkit.review.bot@gmail.com>
2012 Unreviewed, rolling out r73834.
2013 http://trac.webkit.org/changeset/73834
2014 https://bugs.webkit.org/show_bug.cgi?id=50866
2016 It broke Qt-WebKit2 build, because of missing WK2_DIR variable
2017 (Requested by Ossy on #webkit).
2021 2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
2023 Reviewed by Eric Seidel.
2025 [Qt][WK2] Make WebKit2 static library compile on Symbian
2026 https://bugs.webkit.org/show_bug.cgi?id=50861
2030 2010-12-10 Sam Weinig <sam@webkit.org>
2032 Reviewed by Anders Carlsson.
2034 Ensure that we are not getting too many wheel events
2035 <rdar://problem/7881465>
2037 Add simple coalescing of wheel events being sent to the WebProcess. This
2038 adds two models, one which drops interim events and one which merges events
2039 together. For now, we are using the simpler dropping model.
2041 * Shared/WebEvent.h:
2042 (WebKit::WebEvent::modifiers):
2043 * UIProcess/WebPageProxy.cpp:
2044 (WebKit::WebPageProxy::WebPageProxy):
2045 (WebKit::coalesceWheelEvents):
2046 (WebKit::WebPageProxy::handleWheelEvent):
2047 (WebKit::WebPageProxy::didReceiveEvent):
2048 * UIProcess/WebPageProxy.h:
2050 2010-12-10 Anders Carlsson <andersca@apple.com>
2052 Reviewed by John Sullivan.
2054 Make WKContextGetStatistics gather global statistics
2055 https://bugs.webkit.org/show_bug.cgi?id=50850
2057 Change WKContextGetStatistics to work on all objects in the process, and
2058 make it more robust by incrementing/decrementing the counts in the constructor
2059 and destructor respectively.
2061 Also, rename WKContextGetStatistics to WKContextGetGlobalStatistics to better match
2062 what it's actually doing.
2064 * UIProcess/API/C/WKContext.cpp:
2065 (WKContextGetStatistics):
2066 * UIProcess/API/C/WKContextPrivate.h:
2067 * UIProcess/API/mac/WKView.mm:
2068 (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
2069 (-[WKView dealloc]):
2070 * UIProcess/WebContext.cpp:
2071 (WebKit::WebContext::statistics):
2072 * UIProcess/WebContext.h:
2073 * UIProcess/WebFrameProxy.cpp:
2074 (WebKit::WebFrameProxy::WebFrameProxy):
2075 (WebKit::WebFrameProxy::~WebFrameProxy):
2076 * UIProcess/WebPageNamespace.cpp:
2077 * UIProcess/WebPageNamespace.h:
2078 * UIProcess/WebPageProxy.cpp:
2079 (WebKit::WebPageProxy::WebPageProxy):
2080 (WebKit::WebPageProxy::~WebPageProxy):
2081 * UIProcess/WebPageProxy.h:
2083 2010-12-10 Brian Weinstein <bweinstein@apple.com>
2085 Reviewed by Darin Adler.
2087 WebKit2: Context menu support on Windows
2088 <https://bugs.webkit.org/show_bug.cgi?id=50514>
2090 Implment showing of the context menu on Windows for WebKit2, and calling through to
2091 WebPageProxy::contextMenuItemSelected.
2093 * UIProcess/win/WebContextMenuProxyWin.cpp:
2094 (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin): Initialize the member variables.
2095 (WebKit::WebContextMenuProxyWin::populateMenu): Iterate over the vector of WebContextMenuItemData
2096 that was passed in, adding the menu items and recursively calling back into this function to populate
2097 any submenus that are needed. This function also sets up the map from action identifierss to WebContextMenuItemData,
2098 to use to find the WebContextMenuItemData from a selected menu item.
2099 (WebKit::WebContextMenuProxyWin::showContextMenu): Destroy any menu we have already created, populate the menu
2100 to show, and show the context menu. Once TrackPopupMenuEx returns, it returns identifier of the selected menu item.
2101 Look up that identifier in the map we created, and tell the WebPageProxy that a context menu item was selected.
2102 (WebKit::WebContextMenuProxyWin::hideContextMenu): Destroy the HMENU if it is non-null, and clear the identifier map.
2103 * UIProcess/win/WebContextMenuProxyWin.h:
2104 (WebKit::WebContextMenuProxyWin::create): Call through to the constructor, and change the arguments that it takes.
2105 * UIProcess/win/WebView.cpp:
2106 (WebKit::WebView::createContextMenuProxy): Call with the correct arguments.
2108 2010-12-10 Jessie Berlin <jberlin@apple.com>
2110 Qt Build Fix. Unreviewed.
2113 Add the Messages.h and MessageReceivers.h.
2115 2010-12-10 Jessie Berlin <jberlin@apple.com>
2117 Reviewed by Adam Roben and Sam Weinig.
2119 WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
2120 https://bugs.webkit.org/show_bug.cgi?id=50606
2122 Add a WebDatabaseManagerProxy owned by the WebContext.
2124 Expose API (similar to the WebKit1 API) to get a list of origins for which there are
2125 Databases, delete all the databases for a given origin, and delete all the databases.
2127 Add WebDatabaseManager and WebDatabaseManagerProxy as messages receivers.
2128 * DerivedSources.make:
2129 * Platform/CoreIPC/MessageID.h:
2131 Add the WebDatabaseManagerProxy as a UIProcess type (DatabaseManager).
2132 * Shared/API/c/WKBase.h:
2133 * Shared/APIObject.h:
2134 * UIProcess/API/C/WKAPICast.h:
2136 * UIProcess/API/C/WKContext.cpp:
2137 (WKContextGetDatabaseManager):
2138 Expose API to get the DatabaseManager.
2139 * UIProcess/API/C/WKContext.h:
2141 * UIProcess/API/C/WKDatabaseManager.cpp: Added.
2142 (WKDatabaseManagerGetTypeID):
2143 (WKDatabaseManagerGetDatabaseOrigins):
2144 (callGetDatabaseOriginsBlockBlockAndDispose):
2145 (WKDatabaseManagerGetDatabaseOrigins_b):
2146 (WKDatabaseManagerDeleteDatabasesForOrigin):
2147 (WKDatabaseManagerDeleteAllDatabases):
2148 * UIProcess/API/C/WKDatabaseManager.h: Added.
2150 * UIProcess/WebContext.cpp:
2151 (WebKit::WebContext::WebContext):
2152 Create the WebDatabaseManagerProxy.
2153 (WebKit::WebContext::processDidClose):
2154 Invalidate the WebDatabaseManagerProxy.
2155 (WebKit::WebContext::didReceiveMessage):
2156 Forward messages to the WebDatabaseManagerProxy.
2157 * UIProcess/WebContext.h:
2158 (WebKit::WebContext::databaseManagerProxy):
2160 * UIProcess/WebDatabaseManagerProxy.cpp: Added.
2161 (WebKit::WebDatabaseManagerProxy::create):
2162 (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
2163 (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
2164 (WebKit::WebDatabaseManagerProxy::invalidate):
2165 Invalidate the map of callbacks for getDatabaseOrigins.
2166 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
2167 Store the callback and send the request for the origins which have databases to the
2169 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
2170 Call the callback function with the SecurityOrigins created from the identifiers received.
2171 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
2172 If the origin exists, send the message on to the WebProcess to delete the databases
2173 associated with that origin.
2174 (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
2175 Send the message to the WebProcess to delete all the databases.
2176 * UIProcess/WebDatabaseManagerProxy.h: Added.
2177 (WebKit::WebDatabaseManagerProxy::type):
2178 * UIProcess/WebDatabaseManagerProxy.messages.in: Added.
2180 * UIProcess/WebPageProxy.cpp:
2181 Move invalidateCallbackMap from here ...
2182 * UIProcess/GenericCallback.h:
2183 (WebKit::invalidateCallbackMap):
2184 .. to here so that it can be used elsewhere (e.g. by WebDatabaseManagerProxy).
2186 * UIProcess/WebProcessProxy.cpp:
2187 (WebKit::WebProcessProxy::didReceiveMessage):
2188 Forward on all messages destined for the WebDatabaseManagerProxy to the WebContext.
2190 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2191 (WebKit::WebDatabaseManager::didReceiveMessage):
2192 (WebKit::WebDatabaseManager::getDatabaseOrigins):
2193 Send an array of the identifiers for the SecurityOrigins for which there are databases to
2195 (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2196 If the SecurityOrigin with that identifier exists, tell the DatabaseTracker to delete the
2197 databases for that origin.
2198 (WebKit::WebDatabaseManager::deleteAllDatabases):
2199 Tell the DatabaseTracker to delete the databases for that origin.
2200 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2201 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added.
2202 * WebProcess/WebProcess.cpp:
2203 (WebKit::WebProcess::didReceiveMessage):
2206 Add WKDatabaseManager.cpp/.h and WebDatabaseManagerProxy.cpp/.h
2207 * WebKit2.xcodeproj/project.pbxproj:
2208 Ditto, also add WebDatabaseManagerProxy.messages.in and WebDatabaseManager.messages.in.
2209 * win/WebKit2.vcproj:
2211 * win/WebKit2Generated.make:
2212 Make sure WKDatabaseManager.h is copied into WebKitBuild on Windows.
2214 2010-12-10 Ada Chan <adachan@apple.com>
2216 Reviewed by Anders Carlsson.
2218 Implement Download::start() and Download::startWithHandle() on Windows.
2219 https://bugs.webkit.org/show_bug.cgi?id=50844
2221 * WebProcess/Downloads/Download.h:
2222 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2223 (WebKit::Download::start): Create a CFURLDownloadRef and schedule it.
2224 (WebKit::Download::startWithHandle): Create a CFURLDownloadRef with the loading connection
2225 retrieved from the ResourceHandle.
2226 (WebKit::Download::platformInvalidate):
2227 (WebKit::downloadFromClientInfo):
2228 (WebKit::didStartCallback):
2229 (WebKit::willSendRequestCallback):
2230 (WebKit::didReceiveAuthenticationChallengeCallback):
2231 (WebKit::didReceiveResponseCallback):
2232 (WebKit::willResumeWithResponseCallback):
2233 (WebKit::didReceiveDataCallback):
2234 (WebKit::shouldDecodeDataOfMIMETypeCallback):
2235 (WebKit::decideDestinationWithSuggestedObjectNameCallback):
2236 (WebKit::didCreateDestinationCallback):
2237 (WebKit::didFinishCallback):
2238 (WebKit::didFailCallback):
2240 2010-12-10 Enrica Casucci <enrica@apple.com>
2242 Windows build fix. Unreviewed.
2244 Adding a dummy synchronous message for platforms
2245 that don't have any.
2247 * WebProcess/WebPage/WebPage.cpp:
2248 (WebKit::WebPage::dummy):
2249 * WebProcess/WebPage/WebPage.h:
2250 * WebProcess/WebPage/WebPage.messages.in:
2252 2010-12-09 Brian Weinstein <bweinstein@apple.com>
2254 Reviewed by Adam Roben.
2256 Prep for WebKit2: Context menu support on Windows
2257 https://bugs.webkit.org/show_bug.cgi?id=50514
2259 Update WebKit2 to call the correct code when CROSS_PLATFORM_CONTEXT_MENUS is set.
2261 * Shared/WebContextMenuItemData.cpp:
2262 (WebKit::WebContextMenuItemData::WebContextMenuItemData): Add a branch based on whether or not
2263 CROSS_PLATFORM_CONTEXT_MENUS is set.
2264 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2265 (WebKit::WebContextMenuClient::customizeMenu): Define different functions based on
2266 whether or not CROSS_PLATFORM_CONTEXT_MENUS. Both of these are stubs, so functionality
2267 doesn't need to be shared.
2268 * WebProcess/WebCoreSupport/WebContextMenuClient.h: Define different functions based on
2269 whether or not CROSS_PLATFORM_CONTEXT_MENUS.
2270 * WebProcess/WebPage/WebContextMenu.cpp:
2271 (WebKit::WebContextMenu::show): Add a branch based on whether or not
2272 CROSS_PLATFORM_CONTEXT_MENUS is set.
2274 2010-12-09 Enrica Casucci <enrica@apple.com>
2276 Reviewed by Alexey Proskuryakov.
2278 Implement IME support for Mac.
2279 <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
2280 https://bugs.webkit.org/show_bug.cgi?id=50788
2282 This patch addes support for input methods in WebKit2.
2283 In order to support IME, it was necessary to add synchronous calls from the UIProcess
2284 to the WebProcess. These calls all have a timeout of 1 second.
2285 The current implementation still uses the NSTextInput protocol, but the plan is to move
2286 to the NSTextInputClient protocol. This has not been done yet for ease of comparison with
2287 WebKit. attributedSubstringFromRange is the only method that has not been implemented, because
2288 I have not yet decided what is the best way to send an NSAttributedString across the process
2291 * Platform/CoreIPC/HandleMessage.h:
2292 (CoreIPC::callMemberFunction): Added template for member function.
2293 with four reply arguments.
2294 * Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header.
2295 * Shared/WebCoreArgumentCoders.h:
2296 (CoreIPC::): Added encoder/decoder for CompositionUnderline.
2297 * UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged.
2298 * UIProcess/API/mac/PageClientImpl.mm:
2299 (WebKit::PageClientImpl::selectionChanged): Added parameters.
2300 (WebKit::PageClientImpl::interceptKeyEvent): Added parameters.
2301 * UIProcess/API/mac/WKView.mm:
2302 (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members.
2303 (-[WKView insertText:]):
2304 (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters.
2305 (-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters.
2306 (-[WKView keyDown:]): Modified to reset state on each keyDown.
2307 (-[WKView selectedRange]): Added.
2308 (-[WKView hasMarkedText]): Added.
2309 (-[WKView unmarkText]): Added.
2310 (-[WKView validAttributesForMarkedText]): Added.
2311 (extractUnderlines): Added.
2312 (-[WKView setMarkedText:selectedRange:]): Added.
2313 (-[WKView markedRange]): Added.
2314 (-[WKView attributedSubstringFromRange:]): Added.
2315 (-[WKView characterIndexForPoint:]): Added.
2316 (-[WKView firstRectForCharacterRange:]): Added.
2317 (-[WKView conversationIdentifier]): Added.
2318 * UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged.
2319 * UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged.
2320 * UIProcess/WebPageProxy.cpp:
2321 (WebKit::WebPageProxy::getMarkedRange): Added.
2322 (WebKit::WebPageProxy::characterIndexForPoint): Added.
2323 (WebKit::WebPageProxy::firstRectForCharacterRange): Added.
2324 (WebKit::WebPageProxy::interpretKeyEvent): Additional parameters.
2325 (WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform.
2326 * UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange
2327 and interpretKeyEvent.
2328 * UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages.
2329 * UIProcess/WebProcessProxy.h:
2330 (WebKit::WebProcessProxy::sendSync): Added support for synchronous messages.
2331 The default timeout is 1 second.
2332 * WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now
2333 only for non Mac platform.
2334 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2335 (WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform.
2336 * WebProcess/WebPage/WebPage.cpp:
2337 (WebKit::WebPage::didReceiveSyncMessage): Added.
2338 * WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages.
2339 * WebProcess/WebPage/WebPage.messages.in: Added new messages.
2340 * WebProcess/WebPage/mac/WebPageMac.mm:
2341 (WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters.
2342 (WebKit::WebPage::convertRangeToPlatformRange): Added.
2343 (WebKit::WebPage::getMarkedRange): Added.
2344 (WebKit::characterRangeAtPoint): Added.
2345 (WebKit::WebPage::characterIndexForPoint): Added.
2346 (WebKit::convertToRange): Added.
2347 (WebKit::WebPage::firstRectForCharacterRange): Added.
2348 * WebProcess/WebProcess.cpp:
2349 (WebKit::WebProcess::didReceiveSyncMessage): Added.
2350 * WebProcess/WebProcess.h: Added didReceiveSyncMessage.
2352 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2354 Reviewed by Kenneth Rohde Christiansen.
2356 [Qt][WK2] Add the QWKContext API class to wrap the WebContext.
2357 https://bugs.webkit.org/show_bug.cgi?id=50750
2359 * UIProcess/API/qt/WKView.h:
2360 * UIProcess/API/qt/qgraphicswkview.cpp:
2361 (QGraphicsWKView::QGraphicsWKView):
2362 Change the WKPageNamespaceRef argument to QWKContext*
2363 * UIProcess/API/qt/qgraphicswkview.h:
2364 * UIProcess/API/qt/qwkcontext.cpp: Added.
2365 * UIProcess/API/qt/qwkcontext.h: Added.
2366 * UIProcess/API/qt/qwkcontext_p.h: Added.
2367 * UIProcess/API/qt/qwkpage.cpp:
2368 (QWKPagePrivate::QWKPagePrivate):
2370 Change the WKPageNamespaceRef argument to QWKContext*
2371 * UIProcess/API/qt/qwkpage.h:
2372 * UIProcess/API/qt/qwkpage_p.h:
2375 2010-12-10 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2377 Reviewed by Kenneth Rohde Christiansen.
2379 Flush IPC connection send buffer after each message.
2381 [Qt] [WK2] IPC messages are not sent until send buffer fills up
2382 https://bugs.webkit.org/show_bug.cgi?id=50667
2384 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2385 (CoreIPC::Connection::sendOutgoingMessage):
2387 2010-12-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2389 Reviewed by Kenneth Rohde Christiansen.
2391 [Qt][WK2] Use a single QNetworkAccessManager per web process.
2392 https://bugs.webkit.org/show_bug.cgi?id=50757
2394 This allows a better management of network resources and the use
2395 of global cookie jar and disk cache across all frames.
2397 * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
2398 (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
2399 (WebCore::WebFrameNetworkingContext::networkAccessManager):
2400 * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
2401 * WebProcess/WebProcess.cpp:
2402 (WebKit::WebProcess::WebProcess):
2403 (WebKit::WebProcess::initializeWebProcess):
2404 (WebKit::WebProcess::shutdownIfPossible):
2405 * WebProcess/WebProcess.h:
2406 (WebKit::WebProcess::networkAccessManager):
2407 * WebProcess/mac/WebProcessMac.mm:
2408 (WebKit::WebProcess::platformInitializeWebProcess):
2409 (WebKit::WebProcess::platformShutdown):
2410 * WebProcess/qt/WebProcessQt.cpp:
2411 (WebKit::WebProcess::platformInitializeWebProcess):
2412 (WebKit::WebProcess::platformShutdown):
2413 * WebProcess/win/WebProcessWin.cpp:
2414 (WebKit::WebProcess::platformInitializeWebProcess):
2415 (WebKit::WebProcess::platformShutdown):
2417 2010-12-09 Mark Rowe <mrowe@apple.com>
2419 Fix the 32-bit build.
2421 * Shared/cf/ArgumentCodersCF.cpp:
2422 (CoreIPC::sizeForNumberType):
2424 2010-12-09 Maciej Stachowiak <mjs@apple.com>
2426 Reviewed by Brady Eidson.
2428 WebKit2: Control-click doesn't invoke context menu
2429 https://bugs.webkit.org/show_bug.cgi?id=50793
2430 <rdar://problem/8664800>
2432 * WebProcess/WebPage/WebPage.cpp:
2433 (WebKit::isContextClick): New helper function - on Mac, not only right clicks
2434 but also control-left-clicks are context clicks.
2435 (WebKit::handleMouseEvent): Use above.
2437 2010-12-09 Anders Carlsson <andersca@apple.com>
2441 * Scripts/webkit2/messages.py:
2442 DrawingAreaInfo is a struct.
2444 * Shared/WebPreferencesStore.cpp:
2445 (WebKit::valueForKey):
2446 Move valueForKey above code that uses it.
2448 * UIProcess/mac/WebInspectorProxyMac.mm:
2449 (-[WebInspectorProxyObjCAdapter windowWillClose:]):
2450 Remove trailing semicolon.
2452 2010-12-09 Timothy Hatcher <timothy@apple.com>
2454 Add support for transparent WebKit2 WKViews.
2456 https://webkit.org/b/50785
2458 Reviewed by Anders Carlsson.
2460 * Shared/WebPageCreationParameters.cpp:
2461 (WebKit::WebPageCreationParameters::encode): Encode drawsBackground and drawsTransparentBackground.
2462 (WebKit::WebPageCreationParameters::decode): Decode drawsBackground and drawsTransparentBackground.
2463 * Shared/WebPageCreationParameters.h:
2464 * UIProcess/API/mac/WKView.h:
2465 * UIProcess/API/mac/WKView.mm:
2466 (-[WKView setDrawsBackground:]): Added.
2467 (-[WKView drawsBackground]): Added.
2468 (-[WKView setDrawsTransparentBackground:]): Added.
2469 (-[WKView drawsTransparentBackground]): Added.
2470 (-[WKView drawRect:]): Only fill the background if the WebProcess isn't valid and drawsBackground.
2471 Use white or clear based on setDrawsTransparentBackground.
2472 (-[WKView isOpaque]): Return drawsBackground.
2473 * UIProcess/WebPageProxy.cpp:
2474 (WebKit::WebPageProxy::WebPageProxy): Initialize m_drawsBackground and m_drawsTransparentBackground.
2475 (WebKit::WebPageProxy::setDrawsBackground): Added. Send a SetDrawsBackground message.
2476 (WebKit::WebPageProxy::setDrawsTransparentBackground): Added. Send a SetDrawsTransparentBackground message.
2477 (WebKit::WebPageProxy::creationParameters): Set drawsBackground and drawsTransparentBackground.
2478 * UIProcess/WebPageProxy.h:
2479 (WebKit::WebPageProxy::drawsBackground): Added. Return m_drawsBackground.
2480 (WebKit::WebPageProxy::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
2481 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2482 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): Use the copy blend mode when drawing a background.
2483 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Use the copy blend mode to replace existing content.
2484 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2485 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Setup the new view's background color and transparent flag.
2486 * WebProcess/WebPage/WebPage.cpp:
2487 (WebKit::WebPage::WebPage): Initialize m_drawsBackground and m_drawsTransparentBackground.
2488 (WebKit::WebPage::setDrawsBackground): Added. Propagate the flag to the FrameViews.
2489 (WebKit::WebPage::setDrawsTransparentBackground): Added. Propagate the background color to the FrameViews.
2490 * WebProcess/WebPage/WebPage.h:
2491 (WebKit::WebPage::drawsBackground): Added. Return m_drawsBackground.
2492 (WebKit::WebPage::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
2493 * WebProcess/WebPage/WebPage.messages.in: Added SetDrawsBackground and SetDrawsTransparentBackground.
2495 2010-12-09 Anders Carlsson <andersca@apple.com>
2497 Reviewed by Sam Weinig.
2499 Cannot use NSKeyedArchiver in WK2 for ResourceResponses
2500 https://bugs.webkit.org/show_bug.cgi?id=50792
2501 <rdar://problem/8741799>
2503 When encoding, first convert the requests and responses to the serializable dictionary representation
2504 and use the newly added CF CoreIPC encoders. When decoding, do the opposite.
2506 * Shared/mac/WebCoreArgumentCodersMac.mm:
2507 (CoreIPC::encodeResourceRequest):
2508 (CoreIPC::decodeResourceRequest):
2509 (CoreIPC::encodeResourceResponse):
2510 (CoreIPC::decodeResourceResponse):
2512 2010-12-09 Anders Carlsson <andersca@apple.com>
2514 Reviewed by Sam Weinig.
2516 Add CoreIPC coders for CF types
2517 https://bugs.webkit.org/show_bug.cgi?id=50791
2519 * Platform/CoreIPC/ArgumentDecoder.h:
2520 (CoreIPC::ArgumentDecoder::decodeEnum):
2521 * Platform/CoreIPC/ArgumentEncoder.h:
2522 (CoreIPC::ArgumentEncoder::encodeEnum):
2523 * Shared/cf/ArgumentCodersCF.cpp: Added.
2524 (CoreIPC::tokenNullTypeRef):
2525 (CoreIPC::typeFromCFTypeRef):
2528 (CoreIPC::sizeForNumberType):
2529 * Shared/cf/ArgumentCodersCF.h: Added.
2530 * WebKit2.xcodeproj/project.pbxproj:
2532 2010-12-09 Brady Eidson <beidson@apple.com>
2534 Reviewed by Sam Weinig.
2536 <rdar://problem/8749750> and https://bugs.webkit.org/show_bug.cgi?id=50786
2537 WK2 authentication never consults WebCore session credential storage.
2539 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2540 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Since we don't need to expose this as
2541 API at this time, always return true.
2543 2010-12-09 Sam Weinig <weinig@apple.com>
2545 Reviewed by Alexey Proskuryakov.
2547 WebKit2: Add support for access keys
2548 https://bugs.webkit.org/show_bug.cgi?id=49832
2550 * WebProcess/WebPage/WebPage.cpp:
2551 (WebKit::handleKeyEvent): Match windows WebKit and call
2552 the event handler's for handleAccessKey function for
2553 system keys. This will never be hit on the Mac.
2555 2010-12-09 Darin Adler <darin@apple.com>
2559 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Include "NotImplemented.h".
2561 2010-12-09 Steve Falkenburg <sfalken@apple.com>
2565 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
2567 2010-12-09 Brady Eidson <beidson@apple.com>
2569 Reviewed by Anders Carlsson.
2571 <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
2572 WebKit2 ContextMenuClient support
2574 Implement google search in a cross platform manner, and add a FIXME for download support:
2575 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2576 (WebKit::WebContextMenuClient::downloadURL):
2577 (WebKit::WebContextMenuClient::searchWithGoogle):
2579 Mac implementations for speaking and searching:
2580 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Added.
2581 (WebKit::WebContextMenuClient::lookUpInDictionary): Add a FIXME for now.
2582 (WebKit::WebContextMenuClient::isSpeaking):
2583 (WebKit::WebContextMenuClient::speak):
2584 (WebKit::WebContextMenuClient::stopSpeaking):
2585 (WebKit::WebContextMenuClient::searchWithSpotlight):
2587 Stubs for Win and Qt:
2588 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Added.
2589 (WebKit::WebContextMenuClient::lookUpInDictionary):
2590 (WebKit::WebContextMenuClient::isSpeaking):
2591 (WebKit::WebContextMenuClient::speak):
2592 (WebKit::WebContextMenuClient::stopSpeaking):
2593 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
2594 (WebKit::WebContextMenuClient::lookUpInDictionary):
2595 (WebKit::WebContextMenuClient::isSpeaking):
2596 (WebKit::WebContextMenuClient::speak):
2597 (WebKit::WebContextMenuClient::stopSpeaking):
2599 Project file stuffs:
2601 * WebKit2.xcodeproj/project.pbxproj:
2602 * win/WebKit2.vcproj:
2604 2010-12-09 Anders Carlsson <andersca@apple.com>
2606 Reviewed by Sam Weinig.
2608 Don't leak the PDFDocument
2609 https://bugs.webkit.org/show_bug.cgi?id=50771
2611 * UIProcess/API/mac/PDFViewController.mm:
2612 (WebKit::PDFViewController::setPDFDocumentData):
2614 2010-12-09 Anders Carlsson <andersca@apple.com>
2616 Reviewed by Sam Weinig.
2618 Add a basic implementation of PDF support on Mac
2619 https://bugs.webkit.org/show_bug.cgi?id=50768
2621 * UIProcess/API/mac/PDFViewController.h:
2622 * UIProcess/API/mac/PDFViewController.mm: Added.
2623 (-[WKPDFView initWithFrame:PDFViewController:WebKit::]):
2624 Setup the view hierarchy.
2626 (-[WKPDFView invalidate]):
2627 Set the controller to null.
2629 (-[WKPDFView pdfView]):
2630 Return the PDF view.
2632 (WebKit::PDFViewController::create):
2633 (WebKit::PDFViewController::PDFViewController):
2634 Create a WKPDFView and insert it as a subview of the WKView.
2636 (WebKit::PDFViewController::~PDFViewController):
2637 Remove the WKPDFView from the view hierarchy and invalidate it.
2639 (WebKit::convertPostScriptDataSourceToPDF):
2640 Convert the data in the data reference to PDF and return it as a CFDataRef.
2642 (WebKit::PDFViewController::setPDFDocumentData):
2643 Create a PDFDocument and set it on the PDF view.
2645 (WebKit::PDFViewController::pdfDocumentClass):
2646 (WebKit::PDFViewController::pdfPreviewViewClass):
2647 (WebKit::PDFViewController::pdfKitBundle):
2648 Add soft-linking helper functions.
2650 * UIProcess/API/mac/PageClientImpl.mm:
2651 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2652 (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2653 Call the WKView methods.
2655 * UIProcess/API/mac/WKView.mm:
2656 (-[WKView _setPageHasCustomRepresentation:]):
2657 Create a PDF view controller if necessary.
2659 (-[WKView _didFinishLoadingDataForCustomRepresentation:CoreIPC::]):
2660 Pass the data along to the PDF view controller.
2662 * WebKit2.xcodeproj/project.pbxproj:
2665 2010-12-09 Anders Carlsson <andersca@apple.com>
2667 Reviewed by Sam Weinig.
2669 Add support for custom representation
2670 https://bugs.webkit.org/show_bug.cgi?id=50767
2672 * Shared/WebProcessCreationParameters.cpp:
2673 (WebKit::WebProcessCreationParameters::encode):
2674 (WebKit::WebProcessCreationParameters::decode):
2675 * Shared/WebProcessCreationParameters.h:
2676 Add mimeTypesWithCustomRepresentation and encode and decode accordingly.
2678 * UIProcess/API/mac/PageClientImpl.h:
2679 * UIProcess/API/mac/PageClientImpl.mm:
2680 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2681 (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2682 Add empty stubs for now.
2684 * UIProcess/API/qt/qwkpage.cpp:
2685 (QWKPagePrivate::didCommitLoadForMainFrame):
2686 (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
2687 * UIProcess/API/qt/qwkpage_p.h:
2690 * UIProcess/PageClient.h:
2691 Add new functions for custom representations.
2693 * UIProcess/WebFrameProxy.cpp:
2694 (WebKit::WebFrameProxy::canShowMIMEType):
2695 Check that the mime type is not null.
2697 * UIProcess/WebPageProxy.cpp:
2698 (WebKit::WebPageProxy::didCommitLoadForFrame):
2699 This now takes an additional frameHasCustomRepresentation parameter.
2700 Call the page client function.
2702 (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
2703 Call the page client function.
2705 * UIProcess/WebPageProxy.messages.in:
2706 Change DidCommitLoadForFrame message, add DidFinishLoadingDataForCustomRepresentation message.
2708 * UIProcess/mac/WebContextMac.mm:
2709 (WebKit::WebContext::platformInitializeWebProcess):
2710 We want to use custom representations for PDF and PostScript MIME types.
2712 * UIProcess/win/WebView.cpp:
2713 (WebKit::WebView::didCommitLoadForMainFrame):
2714 (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
2715 * UIProcess/win/WebView.h:
2718 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2719 (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
2720 Initialize m_frameHasCustomRepresentation.
2722 (WebKit::WebFrameLoaderClient::hasHTMLView):
2723 The frame has a HTML view unless it has a custom representation.
2725 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2726 Pass along whether the frame has a custom representation.
2728 (WebKit::WebFrameLoaderClient::committedLoad):
2729 Don't send data back to WebCore if the frame has a custom representation.
2731 (WebKit::WebFrameLoaderClient::finishedLoading):
2732 Send all the data to the UI process.
2734 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2735 Update the m_frameHasCustomRepresentation state based on the MIME type.
2737 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2738 (WebKit::WebFrameLoaderClient::frameHasCustomRepresentation):
2741 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
2742 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2743 Don't do any painting if the main frame has a custom representation.
2745 * WebProcess/WebProcess.cpp:
2746 (WebKit::WebProcess::initializeWebProcess):
2747 Add all the MIME types with custom representations.
2749 * WebProcess/WebProcess.h:
2750 (WebKit::WebProcess::shouldUseCustomRepresentationForMIMEType):
2753 2010-12-09 Maciej Stachowiak <mjs@apple.com>
2755 Reviewed by Dan Bernstein.
2757 Implement "Use Selection for Find" in WebKit2
2758 https://bugs.webkit.org/show_bug.cgi?id=50737
2759 <rdar://problem/8564881>
2761 * UIProcess/API/mac/WKView.mm: Add support for the takeFindStringFromSelection:
2762 selector as a command.
2764 2010-12-09 Brady Eidson <beidson@apple.com>
2766 Reviewed by Maciej Stachowiak.
2768 <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
2769 WebKit2 Authentication Support
2771 Implement authentication-related coders:
2772 * Shared/WebCoreArgumentCoders.h:
2774 Allow the ResourceResponse coders to handle null responses:
2775 * Shared/mac/WebCoreArgumentCodersMac.mm:
2776 (CoreIPC::encodeResourceResponse):
2777 (CoreIPC::decodeResourceResponse):
2779 Add new API and Impl casts for ProtectionSpace and Credential enums:
2780 * UIProcess/API/C/WKAPICast.h:
2782 (WebKit::toCredentialPersistence):
2784 Move the DecisionListener to be accessed off the challenge itself, and fill in other
2786 * UIProcess/API/C/WKAuthenticationChallenge.cpp:
2787 (WKAuthenticationChallengeGetDecisionListener):
2788 (WKAuthenticationChallengeGetProtectionSpace):
2789 (WKAuthenticationChallengeGetProposedCredential):
2790 (WKAuthenticationChallengeGetPreviousFailureCount):
2791 * UIProcess/API/C/WKAuthenticationChallenge.h:
2792 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2793 (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
2794 (WebKit::AuthenticationChallengeProxy::proposedCredential):
2795 (WebKit::AuthenticationChallengeProxy::protectionSpace):
2796 * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2797 (WebKit::AuthenticationChallengeProxy::previousFailureCount):
2799 Fill in some credential API:
2800 * UIProcess/API/C/WKCredential.cpp:
2801 (WKCredentialCreate):
2802 (WKCredentialCopyUser):
2803 * UIProcess/API/C/WKCredential.h:
2804 * UIProcess/API/C/WKCredentialTypes.h: Added.
2805 * UIProcess/Authentication/WebCredential.cpp:
2806 (WebKit::WebCredential::WebCredential):
2807 (WebKit::WebCredential::user):
2808 * UIProcess/Authentication/WebCredential.h:
2809 (WebKit::WebCredential::create):
2811 Fill in some protection space API:
2812 * UIProcess/API/C/WKProtectionSpace.cpp:
2813 (WKProtectionSpaceCopyHost):
2814 (WKProtectionSpaceGetPort):
2815 (WKProtectionSpaceCopyRealm):
2816 (WKProtectionSpaceGetIsProxy):
2817 (WKProtectionSpaceGetServerType):
2818 (WKProtectionSpaceGetReceivesCredentialSecurely):
2819 (WKProtectionSpaceGetAuthenticationScheme):
2820 * UIProcess/API/C/WKProtectionSpace.h:
2821 * UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
2822 * UIProcess/Authentication/WebProtectionSpace.cpp:
2823 (WebKit::WebProtectionSpace::WebProtectionSpace):
2824 (WebKit::WebProtectionSpace::host):
2825 (WebKit::WebProtectionSpace::port):
2826 (WebKit::WebProtectionSpace::realm):
2827 (WebKit::WebProtectionSpace::isProxy):
2828 (WebKit::WebProtectionSpace::serverType):
2829 (WebKit::WebProtectionSpace::receivesCredentialSecurely):
2830 (WebKit::WebProtectionSpace::authenticationScheme):
2831 * UIProcess/Authentication/WebProtectionSpace.h:
2833 Change the authentication challenge callback to reflect the new ownership of
2834 the DecisionListener:
2835 * UIProcess/API/C/WKPage.h:
2836 * UIProcess/WebLoaderClient.cpp:
2837 (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
2838 * UIProcess/WebLoaderClient.h:
2839 * UIProcess/WebPageProxy.cpp:
2840 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
2843 * WebKit2.xcodeproj/project.pbxproj:
2844 * win/WebKit2.vcproj:
2845 * win/WebKit2Generated.make:
2847 2010-12-08 Sam Weinig <sam@webkit.org>
2849 Reviewed by Geoffrey "Error" Garen.
2851 Fix typo: Diplaying -> Displaying
2853 * UIProcess/API/C/WKFrame.cpp:
2854 (WKFrameIsDisplayingStandaloneImageDocument):
2855 (WKFrameIsDisplayingMarkupDocument):
2856 * UIProcess/API/C/WKFrame.h:
2857 * UIProcess/WebFrameProxy.cpp:
2858 (WebKit::WebFrameProxy::canProvideSource):
2859 (WebKit::WebFrameProxy::isDisplayingStandaloneImageDocument):
2860 (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
2861 * UIProcess/WebFrameProxy.h:
2863 2010-12-08 Sam Weinig <sam@webkit.org>
2865 Reviewed by Gavin Barraclough.
2867 Add WebKit2 Preference for TabsToLinks behavior.
2868 <rdar://problem/8664263>
2870 * Shared/WebPreferencesStore.h:
2871 * UIProcess/API/C/WKPreferences.cpp:
2872 (WKPreferencesSetTabsToLinks):
2873 (WKPreferencesGetTabsToLinks):
2874 * UIProcess/API/C/WKPreferences.h:
2875 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2876 (WebKit::WebChromeClient::tabsToLinks):
2877 * WebProcess/WebPage/WebPage.cpp:
2878 (WebKit::WebPage::WebPage):
2879 (WebKit::WebPage::updatePreferences):
2880 * WebProcess/WebPage/WebPage.h:
2881 (WebKit::WebPage::tabsToLinks):
2883 2010-12-08 Benjamin Poulain <benjamin.poulain@nokia.com>
2885 Reviewed by Andreas Kling.
2887 WebTouchEvent::isTouchEventType() does not take into account the type TouchCancel
2888 https://bugs.webkit.org/show_bug.cgi?id=50680
2890 Add the missing type check to WebTouchEvent::isTouchEventType().
2892 * Shared/WebTouchEvent.cpp:
2893 (WebKit::WebTouchEvent::isTouchEventType):
2895 2010-12-08 Sam Weinig <sam@webkit.org>
2897 Reviewed by Darin Adler.
2899 Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
2900 https://bugs.webkit.org/show_bug.cgi?id=50726
2902 Adds WKBundleNodeHandleCopyDocumentFrame, WKBundleNodeHandleCopyHTMLFrameElementContentFrame
2903 and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame, to handle the document, <frame>
2906 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2907 (WKBundleNodeHandleCopyDocumentFrame):
2908 (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
2909 (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
2910 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2911 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2912 (WebKit::InjectedBundleNodeHandle::copyDocumentFrame):
2913 (WebKit::InjectedBundleNodeHandle::copyHTMLFrameElementContentFrame):
2914 (WebKit::InjectedBundleNodeHandle::copyHTMLIFrameElementContentFrame):
2915 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2917 2010-12-08 Sam Weinig <sam@webkit.org>
2919 Reviewed by Gavin Barraclough.
2921 Need a WebKit2 way to test whether a frame is displaying a standalone image
2922 <rdar://problem/8443059>
2923 WebKit2: Need a way to test whether a page or frame is showing HTML content
2924 <rdar://problem/8642563>
2926 Add WKFrameIsDiplayingStandaloneImageDocument and WKFrameIsDiplayingMarkupDocument.
2928 * UIProcess/API/C/WKFrame.cpp:
2929 (WKFrameIsDiplayingStandaloneImageDocument):
2930 (WKFrameIsDiplayingMarkupDocument):
2931 * UIProcess/API/C/WKFrame.h:
2932 * UIProcess/WebFrameProxy.cpp:
2933 (WebKit::WebFrameProxy::canProvideSource): This now just calls isDiplayingMarkupDocument.
2934 (WebKit::WebFrameProxy::isDiplayingStandaloneImageDocument):
2935 (WebKit::WebFrameProxy::isDiplayingMarkupDocument):
2936 * UIProcess/WebFrameProxy.h:
2938 2010-12-08 Anders Carlsson <andersca@apple.com>
2940 Reviewed by Darin Adler.
2942 WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
2943 https://bugs.webkit.org/show_bug.cgi?id=50724
2945 * UIProcess/WebContext.cpp:
2946 (WebKit::WebContext::pdfAndPostScriptMIMETypes):
2947 * UIProcess/WebContext.h:
2948 * UIProcess/WebFrameProxy.cpp:
2949 (WebKit::WebFrameProxy::canShowMIMEType):
2951 2010-12-08 Brian Weinstein <bweinstein@apple.com>
2953 Reviewed by Brady Eidson.
2955 WebMenuTarget implemented in both WebKit and WebKit2
2956 https://bugs.webkit.org/show_bug.cgi?id=50665
2957 <rdar://problem/8742640>
2959 Rename WebMenuTarget to WKMenuTarget to prevent this warning and stay consistent with
2960 other WebKit2 namings.
2962 * UIProcess/mac/WebContextMenuProxyMac.mm:
2963 (+[WKMenuTarget sharedMenuTarget]):
2964 (WebKit::nsMenuItemVector):
2965 (WebKit::WebContextMenuProxyMac::showContextMenu):
2967 2010-12-08 Anders Carlsson <andersca@apple.com>
2969 Reviewed by Sam Weinig.
2971 Move canShowMIMEType to Frame
2972 https://bugs.webkit.org/show_bug.cgi?id=50723
2974 * UIProcess/API/C/WKFrame.cpp:
2975 (WKFrameCanShowMIMEType):
2976 * UIProcess/API/C/WKFrame.h:
2977 * UIProcess/API/C/WKPage.cpp:
2978 * UIProcess/API/C/WKPage.h:
2979 * UIProcess/WebFrameProxy.cpp:
2980 (WebKit::WebFrameProxy::canShowMIMEType):
2981 * UIProcess/WebFrameProxy.h:
2983 2010-12-08 Sam Weinig <sam@webkit.org>
2985 Reviewed by Oliver Hunt.
2987 Rename WKPreferencesGetFTPDirectoryTemplatePath to WKPreferencesCopyFTPDirectoryTemplatePath
2988 since it copies the value.
2990 * UIProcess/API/C/WKPreferences.cpp:
2991 (WKPreferencesCopyFTPDirectoryTemplatePath):
2992 * UIProcess/API/C/WKPreferencesPrivate.h:
2994 2010-12-08 Sam Weinig <sam@webkit.org>
2996 Reviewed by Brady Eidson.
2998 WebKit2: Can't open ftp directory
2999 <rdar://problem/8489321>
3001 * Shared/WebPreferencesStore.h:
3002 * UIProcess/API/C/WKPreferences.cpp:
3003 (WKPreferencesSetForceFTPDirectoryListings):
3004 (WKPreferencesGetForceFTPDirectoryListings):
3005 (WKPreferencesSetFTPDirectoryTemplatePath):
3006 (WKPreferencesGetFTPDirectoryTemplatePath):
3007 * UIProcess/API/C/WKPreferencesPrivate.h:
3008 * WebProcess/WebPage/WebPage.cpp:
3009 (WebKit::WebPage::updatePreferences):
3010 Pipe through the FTP directory listing preferences.
3012 2010-12-08 Chris Marrin <cmarrin@apple.com>
3014 Reviewed by Simon Fraser.
3016 Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
3017 https://bugs.webkit.org/show_bug.cgi?id=49388
3019 Fixes a build failure because WebChromeClient.cpp uses WebCore::Cursor.
3020 This patch adds an include of QuartzCore/CATransform3D, which includes
3021 a file that has a 'Cursor' object defined. So I had to qualify the
3022 use of Cursor in WebChromeClient.cpp.
3024 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3025 (WebKit::WebChromeClient::setCursor):
3027 2010-12-07 Brian Weinstein <bweinstein@apple.com>
3029 Reviewed by John Sullivan.
3031 Layering Violation in ContextMenu - member variable of type HitTestResult
3032 https://bugs.webkit.org/show_bug.cgi?id=50586
3034 Update users of ContextMenu and ContextMenuController to match where the new functions
3037 * Shared/WebContextMenuItemData.cpp:
3038 (WebKit::WebContextMenuItemData::WebContextMenuItemData): Remove the call to checkOrEnableItem, that call will be made when
3039 the ContextMenuItem is added to the ContextMenu through the ContextMenuController.
3040 * WebProcess/WebPage/WebContextMenu.cpp:
3041 (WebKit::WebContextMenu::show):
3043 2010-12-08 Jessie Berlin <jberlin@apple.com>
3045 Reviewed by Adam Roben.
3047 WebKit2: Implement WebChromeClient::exceededDatabaseQuota
3048 https://bugs.webkit.org/show_bug.cgi?id=50656
3050 The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous
3051 because the new quota is checked directly after exceededDatabaseQuota returns in order to
3052 determine if the new Database can be created.
3054 Pass all of the details from the WebProcess to the UIProcess in order to inform the
3055 decision in the UIProcess about the new quota. In WebKit1, these details were
3056 fetched through an additional call to the API detailsForDatabase (which is infeasible in
3057 WebKit2 since exceededDatabaseQuota is a synchronous call).
3059 * Platform/CoreIPC/HandleMessage.h:
3060 (CoreIPC::callMemberFunction):
3061 Add a version that takes 7 parameters.
3063 * UIProcess/API/C/WKPage.h:
3065 * UIProcess/API/qt/qwkpage.cpp:
3067 Indicate that exceededDatabaseQuota is not implemented.
3069 * UIProcess/WebPageProxy.cpp:
3070 (WebKit::WebPageProxy::exceededDatabaseQuota):
3071 Call the UIClient's exceededDatabaseQuota
3072 * UIProcess/WebPageProxy.h:
3073 * UIProcess/WebPageProxy.messages.in:
3075 * UIProcess/WebUIClient.cpp:
3076 (WebKit::WebUIClient::exceededDatabaseQuota):
3077 If the client does not implement exceededDatabaseQuota, return a the current quota.
3078 * UIProcess/WebUIClient.h:
3080 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3081 (WebKit::WebChromeClient::exceededDatabaseQuota):
3082 Send a synchronous message to the UIProcess to ask for the new quota for the origin for the
3085 2010-12-07 Anders Carlsson <andersca@apple.com>
3087 Reviewed by Sam Weinig.
3089 fast/loader/empty-embed-src-attribute.html asserts in debug builds
3090 https://bugs.webkit.org/show_bug.cgi?id=50643
3092 Just always ignore attempts to load requests with empty URLs.
3094 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3095 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3097 2010-12-07 Jessie Berlin <jberlin@apple.com>
3099 Build fix. Unreviewed.
3102 Added WebDatabaseManagerQt.cpp.
3103 * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Added.
3104 (WebKit::WebDatabaseManager::databaseDirectory):
3105 Added a FIXME to implement and return an empty string.
3107 2010-12-07 Darin Adler <darin@apple.com>
3109 Get a bit closer to making Qt WebKit2 compile again.
3111 * WebKit2.pro: Add the WebDatabaseManager source files.
3112 Still missing: The Qt version of the databaseDirectory function.
3114 2010-12-07 Jessie Berlin <jberlin@apple.com>
3116 Reviewed by Darin Adler.
3118 WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
3119 https://bugs.webkit.org/show_bug.cgi?id=50604
3121 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Added.
3122 (WebKit::WebDatabaseManager::shared):
3123 (WebKit::WebDatabaseManager::WebDatabaseManager):
3124 Initialize the DatabaseTracker with the Database directory.
3125 * WebProcess/WebCoreSupport/WebDatabaseManager.h: Added.
3126 * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Added.
3127 (WebKit::WebDatabaseManager::databaseDirectory):
3128 Copied from WebKitInitializeDatabasesIfNecessary in WebKit/mac/Storage/WebDatabaseManager.mm.
3129 * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Added.
3130 (WebKit::WebDatabaseManager::databaseDirectory):
3131 Copied from WebKitInitializeWebDatabasesIfNecessary in WebKit/win/WebDatabaseManager.cpp.
3133 * WebProcess/WebProcess.cpp:
3134 (WebKit::WebProcess::WebProcess):
3135 Make sure that the Databases directory has been set by calling WebDatabaseManager::shared().
3137 * WebKit2.xcodeproj/project.pbxproj:
3138 Add WebDatabaseManager.cpp/.h/Mac.cpp
3139 * win/WebKit2.vcproj:
3140 Add WebDatabaseManager.cpp/.h/Win.cpp
3142 2010-12-06 Darin Adler <darin@apple.com>
3144 Reviewed by Sam Weinig.
3146 Pass security origin to make local file decision correctly
3147 https://bugs.webkit.org/show_bug.cgi?id=48603
3149 * WebProcess/Plugins/PluginView.cpp:
3150 (WebKit::PluginView::loadURL): Pass security origin.
3151 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3152 (WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.
3154 2010-12-06 Simon Fraser <simon.fraser@apple.com>
3156 Reviewed by Sam Weinig.
3158 Fix two WebKit2 prefs issues.
3160 * Shared/WebPreferencesStore.h: Include font-family preferences
3161 in the FOR_EACH_WEBKIT_STRING_PREFERENCE macro, actually propagating
3162 font family prefs to WebCore settings.
3164 * UIProcess/WebPageGroup.cpp:
3165 (WebKit::WebPageGroup::WebPageGroup):
3166 (WebKit::WebPageGroup::~WebPageGroup): Add and remove the WebPageGroup
3167 from the preference object it creates. This allows preference changes
3168 to actually be propagated to the web process.
3170 2010-12-06 Anders Carlsson <andersca@apple.com>
3172 Reviewed by Sam Weinig.
3174 The plug-in process crashes if it can't load the plug-in module
3175 https://bugs.webkit.org/show_bug.cgi?id=50601
3176 <rdar://problem/8692654>
3178 * PluginProcess/PluginControllerProxy.cpp:
3179 (WebKit::PluginControllerProxy::initialize):
3180 Handle m_plugin being 0.
3182 * PluginProcess/PluginProcess.cpp:
3183 (WebKit::PluginProcess::netscapePluginModule):
3184 Create the plug-in module if it doesn't exist.
3186 (WebKit::PluginProcess::initialize):
3187 Store the plug-in path.
3189 * PluginProcess/PluginProcess.h:
3190 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3191 (WebKit::NetscapePlugin::create):
3192 Return null if the plug-in module doesn't exist.
3194 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3195 * WebProcess/WebPage/WebPage.cpp:
3196 (WebKit::WebPage::createPlugin):
3199 2010-12-06 Anders Carlsson <andersca@apple.com>
3201 Reviewed by Sam Weinig.
3203 WebProcess crash in NPRemoteObjectMap::invalidate when closing tab
3204 https://bugs.webkit.org/show_bug.cgi?id=50597
3205 <rdar://problem/8655584>
3207 When invalidating the NPRemoteObjectMap, we don't want NPObjectMessageReceiver to
3208 release all objects NPObjects blindly because NPJSObjects have already been deallocated by the plug-in view.
3210 This is not an ideal solution; an ideal solution would involve NPJSObjects notifying any NPObjectMessageReceiver objects
3211 that the NPJSObject is being destroyed. The NPObjectMessageReceiver could then simply null out the NPObject pointer.
3213 * Shared/Plugins/NPObjectMessageReceiver.cpp:
3214 (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
3215 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
3216 * Shared/Plugins/NPObjectMessageReceiver.h:
3217 * Shared/Plugins/NPRemoteObjectMap.cpp:
3218 (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
3219 (WebKit::NPRemoteObjectMap::invalidate):
3220 * Shared/Plugins/NPRemoteObjectMap.h:
3221 (WebKit::NPRemoteObjectMap::isInvalidating):
3223 2010-12-06 Sam Weinig <sam@webkit.org>
3225 Reviewed by Anders Carlsson.
3227 Generalize didChangeLocationWithinPageForFrame for all same document navigations
3228 https://bugs.webkit.org/show_bug.cgi?id=50584
3230 - Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
3231 - Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
3232 - Call didSameDocumentNavigationForFrame for HTML session state changes.
3234 * Shared/API/c/WKPageLoadTypes.h: Added.
3235 * Shared/API/c/WKSharedAPICast.h:
3237 Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.
3239 * Shared/SameDocumentNavigationType.h: Added.
3240 * UIProcess/API/C/WKAPICast.h:
3241 Moved WKFrameNavigationType conversion from here.
3243 * UIProcess/API/C/WKPage.h:
3244 * UIProcess/API/qt/qwkpage.cpp:
3248 * UIProcess/WebFrameProxy.cpp:
3249 (WebKit::WebFrameProxy::didSameDocumentNavigation):
3250 * UIProcess/WebFrameProxy.h:
3251 * UIProcess/WebLoaderClient.cpp:
3252 (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
3253 * UIProcess/WebLoaderClient.h:
3254 * UIProcess/WebPageProxy.cpp:
3255 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3256 * UIProcess/WebPageProxy.h:
3257 * UIProcess/WebPageProxy.messages.in:
3258 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3259 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3260 (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
3261 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3262 Pipe new name through.
3264 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3265 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3266 (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
3267 (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
3268 (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
3269 Call didChangeLocationWithinPageForFrame for session state changes.
3272 * WebKit2.xcodeproj/project.pbxproj:
3273 * win/WebKit2.vcproj:
3274 * win/WebKit2Generated.make:
3277 2010-12-06 Jessie Berlin <jberlin@apple.com>
3279 Reviewed by Dan Bernstein.
3281 WebKit2: Expose the preference to enable or disable HTML5 Databases.
3282 https://bugs.webkit.org/show_bug.cgi?id=50411
3284 * Shared/WebPreferencesStore.h:
3285 Make the preference to enable HTML5 Databases default ot true.
3287 * UIProcess/API/C/WKPreferences.cpp:
3288 (WKPreferencesSetDatabasesEnabled):
3289 (WKPreferencesGetDatabasesEnabled):
3290 * UIProcess/API/C/WKPreferences.h:
3292 * WebProcess/WebPage/WebPage.cpp:
3293 (WebKit::WebPage::updatePreferences):
3294 Set AbstractDatabase::isAvailable (mimicking how the preference is set in WebKit1).
3296 2010-12-06 Mark Rowe <mrowe@apple.com>
3300 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3301 (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Wrap Carbon-specific code in #ifndef NP_NO_CARBON.
3303 2010-12-06 Anders Carlsson <andersca@apple.com>
3305 Reviewed by Adam Roben.
3307 Add a shim for GetCurrentEventButtonState
3308 https://bugs.webkit.org/show_bug.cgi?id=50583
3310 * PluginProcess/mac/PluginProcessMac.mm:
3311 (WebKit::getCurrentEventButtonState):
3312 Get the event button state from the plug-in.
3314 (WebKit::PluginProcess::initializeShim):
3315 Add new shim callback.
3317 * PluginProcess/mac/PluginProcessShim.cpp:
3318 (WebKit::shimGetCurrentEventButtonState):
3321 * PluginProcess/mac/PluginProcessShim.h:
3322 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3323 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3324 (WebKit::NetscapePlugin::buttonState):
3325 Return the button state.
3327 (WebKit::NetscapePlugin::platformHandleMouseEvent):
3328 Update the button state. Also, make sure to actually pass the modifiers to NPP_HandleEvent.
3331 2010-12-06 Anders Carlsson <andersca@apple.com>
3333 Reviewed by Adam Roben.
3335 Add a shim for IsWindowActive
3336 https://bugs.webkit.org/show_bug.cgi?id=50582
3338 * PluginProcess/mac/PluginProcessMac.mm:
3339 (WebKit::isWindowActive):
3340 Get the NetscapePlugin from the WindowRef and check if the plug-in's window is active.
3342 (WebKit::PluginProcess::initializeShim):
3343 * PluginProcess/mac/PluginProcessShim.cpp
3344 (WebKit::shimIsWindowActive):
3345 Call isWindowActive. If it returns true, return the result value. Otherwise, call the real
3346 IsWindowActive function.
3348 * PluginProcess/mac/PluginProcessShim.h:
3349 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3350 (WebKit::NetscapePlugin::NetscapePlugin):
3351 Initialize m_isWindowactive.
3353 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3354 (WebKit::NetscapePlugin::isWindowActive):
3355 Return whether the window is active.
3357 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3358 (WebKit::windowMap):
3359 (WebKit::NetscapePlugin::platformPostInitialize):
3360 (WebKit::NetscapePlugin::platformDestroy):
3361 (WebKit::NetscapePlugin::netscapePluginFromWindow):
3362 Add a mapping between windows and the corresponding NetscapePlugin objects.
3364 (WebKit::NetscapePlugin::windowFocusChanged):
3365 Update the window focus member variable.
3367 2010-12-06 Anders Carlsson <andersca@apple.com>
3369 Reviewed by Dan Bernstein.
3371 REGERSSION (r73310?): Contents of <select> popup menus are upside-down on Windows
3372 https://bugs.webkit.org/show_bug.cgi?id=50544
3373 <rdar://problem/8732336>
3375 * Shared/BackingStore.cpp:
3376 * Shared/BackingStore.h:
3377 * Shared/cairo/BackingStoreCairo.cpp:
3378 Remove BackingStore::createFlippedGraphicsContext.
3380 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
3381 (WebKit::WebPopupMenu::setUpPlatformData):
3382 Don't create a flipped graphics context.
3384 2010-12-06 Anders Carlsson <andersca@apple.com>
3386 Reviewed by Dan Bernstein.
3388 REGRESSION: Text in Find indicator is vertically flipped
3389 https://bugs.webkit.org/show_bug.cgi?id=50524
3390 <rdar://problem/8732978>
3392 Don't flip the graphics context.
3394 * UIProcess/FindIndicator.cpp:
3395 (WebKit::FindIndicator::draw):
3397 2010-12-03 Anders Carlsson <andersca@apple.com>
3399 Reviewed by Sam Weinig.
3401 Dispatch keyboard events in the Carbon event model
3402 https://bugs.webkit.org/show_bug.cgi?id=50503
3404 * Shared/WebEvent.h:
3405 (WebKit::WebKeyboardEvent::macCharCode):
3406 * Shared/WebKeyboardEvent.cpp:
3407 (WebKit::WebKeyboardEvent::WebKeyboardEvent):
3408 (WebKit::WebKeyboardEvent::encode):
3409 (WebKit::WebKeyboardEvent::decode):
3410 Add macCharCode field.
3412 * Shared/mac/WebEventFactory.mm:
3413 (WebKit::WebEventFactory::createWebKeyboardEvent):
3414 * Shared/qt/WebEventFactoryQt.cpp:
3415 (WebKit::WebEventFactory::createWebKeyboardEvent):
3416 * Shared/win/WebEventFactory.cpp:
3417 (WebKit::WebEventFactory::createWebKeyboardEvent):
3418 Pass along the Mac char code.
3420 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3421 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
3422 Convert the event to a Carobn event.
3424 2010-12-03 John Sullivan <sullivan@apple.com>
3426 Reviewed by Adam Roben.
3428 https://bugs.webkit.org/show_bug.cgi?id=50504
3429 Expose some more WebCore settings in WebKit2 preferences
3431 * Shared/WebPreferencesStore.h:
3432 Changed name of existing FOR_EACH_WEBKIT_STRING_PREFERENCE macro to
3433 FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE since it was all about platform-specific
3434 font families, and I'm now introducing a non-platform-spacific string, and
3435 I didn't want to put the new preference in two platform-specific lists. Then
3436 added a new FOR_EACH_WEBKIT_STRING_PREFERENCE to hold the new preference. Note
3437 that the other preferences exposed in this patch were already declared here.
3439 * UIProcess/API/C/WKPreferences.cpp:
3440 (WKPreferencesSetDefaultFontSize):
3442 (WKPreferencesGetDefaultFontSize):
3444 (WKPreferencesSetDefaultFixedFontSize):
3446 (WKPreferencesGetDefaultFixedFontSize):
3448 (WKPreferencesSetDefaultTextEncodingName):
3450 (WKPreferencesCopyDefaultTextEncodingName):
3453 * UIProcess/API/C/WKPreferences.h:
3454 Declare new wrappers.
3456 2010-12-05 Adam Roben <aroben@apple.com>
3458 Windows production build fix
3460 Put spaces after trailing backslashes when setting
3461 %WebKitVSPropsRedirectionDir%. According to MSDN
3462 <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
3464 A backslash ( \ ) followed by a newline character is interpreted as
3465 a space in the command; use a backslash at the end of a line to
3466 continue a command onto the next line. NMAKE interprets the
3467 backslash literally if any other character, including a space or
3468 tab, follows the backslash.
3472 2010-12-04 Sam Weinig <sam@webkit.org>
3474 Reviewed by Jon Honeycutt.
3476 WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
3477 https://bugs.webkit.org/show_bug.cgi?id=50511
3479 Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
3480 updating the WebFrameProxy's URL on the way.
3482 Test: PageLoadDidChangeLocationWithinPageForFrame
3484 * UIProcess/API/C/WKPage.h:
3485 * UIProcess/API/qt/qwkpage.cpp:
3487 * UIProcess/WebFrameProxy.cpp:
3488 (WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
3489 * UIProcess/WebFrameProxy.h:
3490 * UIProcess/WebLoaderClient.cpp:
3491 (WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
3492 * UIProcess/WebLoaderClient.h:
3493 * UIProcess/WebPageProxy.cpp:
3494 (WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
3495 * UIProcess/WebPageProxy.h:
3496 * UIProcess/WebPageProxy.messages.in:
3497 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3498 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3499 (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
3500 (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
3501 (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
3502 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3503 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3504 (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
3505 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3507 2010-12-03 Timothy Hatcher <timothy@apple.com>
3509 Make the Web Inspector window show and be usable on Mac.
3511 https://webkit.org/b/50490
3513 Reviewed by Sam Weinig.
3515 * UIProcess/WebInspectorProxy.cpp:
3516 (WebKit::WebInspectorProxy::invalidate): Call platformClose.
3517 (WebKit::WebInspectorProxy::didLoadInspectorPage): Call platformOpen.
3518 (WebKit::WebInspectorProxy::didClose): Call platformClose.
3519 * UIProcess/WebInspectorProxy.h:
3520 * UIProcess/WebInspectorProxy.messages.in: Added DidClose.
3521 * UIProcess/mac/WebInspectorProxyMac.mm:
3522 (-[WebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): Added.
3523 (-[WebInspectorProxyObjCAdapter windowWillClose:]): Added. Call WebInspectorProxy::close.
3524 (WebKit::WebInspectorProxy::platformOpen): Added.
3525 (WebKit::WebInspectorProxy::platformClose): Added.
3526 * UIProcess/qt/WebInspectorProxyQt.cpp:
3527 (WebKit::WebInspectorProxy::platformOpen): Added stub.
3528 (WebKit::WebInspectorProxy::platformClose): Added stub.
3529 * UIProcess/win/WebInspectorProxyWin.cpp:
3530 (WebKit::WebInspectorProxy::platformOpen): Added stub.
3531 (WebKit::WebInspectorProxy::platformClose): Added stub.
3532 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3533 (WebKit::WebInspectorClient::sendMessageToFrontend): Added more null checks to avoid a crash.
3534 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3535 (WebKit::WebInspectorFrontendClient::closeWindow): Call WebInspector::didClose.
3536 (WebKit::WebInspectorFrontendClient::disconnectFromBackend): Ditto.
3537 (WebKit::WebInspectorFrontendClient::sendMessageToBackend): Removed. This does not need to be
3538 implemented by our subclass since we are in a single process.
3539 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed sendMessageToBackend.
3540 * WebProcess/WebPage/WebInspector.cpp:
3541 (WebKit::WebInspector::didClose): Added. Send a DidClose message to the UI process.
3542 * WebProcess/WebPage/WebInspector.h:
3544 2010-12-03 Anders Carlsson <andersca@apple.com>
3546 Reviewed by Sam Weinig and Dan Bernstein.
3548 Clean up the BackingStore implementation
3549 https://bugs.webkit.org/show_bug.cgi?id=50498
3551 * Shared/BackingStore.cpp:
3552 (WebKit::BackingStore::create):
3553 (WebKit::BackingStore::createSharable):
3554 (WebKit::BackingStore::resize):
3555 Use new numBytesForSize helper function.
3557 (WebKit::BackingStore::createFlippedGraphicsContext):
3558 Make this function platform independent.
3560 * Shared/BackingStore.h:
3561 (WebKit::BackingStore::numBytesForSize):
3562 Given a size, return the number of bytes needed for it.
3564 (WebKit::BackingStore::sizeInBytes):
3567 * Shared/cg/BackingStoreCG.cpp:
3568 (WebKit::BackingStore::paint):
3569 Don't use CGBitmapContextCreateImage; it creates an extra copy of the image data.
3571 * Shared/qt/BackingStoreQt.cpp:
3572 Remove createFlippedGraphicsContext.
3574 2010-12-03 Siddharth Mathur <siddharth.mathur@nokia.com>
3576 Reviewed by Laszlo Gombos.
3578 [Qt] [WK2] Build system improvements for non-Unix targets
3579 https://bugs.webkit.org/show_bug.cgi?id=50257
3581 * DerivedSources.pro:
3582 Fix dir seperator errors on Windows build host. Thanks to Laszlo Gombos.
3584 2010-12-03 Sam Weinig <sam@webkit.org>
3586 Reviewed by Maciej Stachowiak.
3588 Enable <a ping> for Mac/Windows/WebKit2 builds
3589 <rdar://problem/8504473>
3590 https://bugs.webkit.org/show_bug.cgi?id=50488
3592 * Shared/WebPreferencesStore.h:
3593 * UIProcess/API/C/WKPreferences.cpp: