1 2011-03-06 Jessie Berlin <jberlin@apple.com>
3 Reviewed by Sam Weinig.
5 WebKit2: Use CFNetwork Sessions API.
6 https://bugs.webkit.org/show_bug.cgi?id=55435.
8 When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
9 Private Browsing Storage Session.
11 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
12 (InitWebCoreSystemInterface):
13 Add support for using the new WKSI functions in WebCore.
15 2011-03-06 Oleg Romashin <romaxa@gmail.com>
17 Reviewed by Kenneth Rohde Christiansen.
19 [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
20 Adding dummy Qt files for Plugin Process implementation,
21 Adding missing sources into Qt pro files
22 https://bugs.webkit.org/show_bug.cgi?id=55719
25 * PluginProcess/qt: Added.
26 * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
27 (WebKit::PluginControllerProxy::platformInitialize):
28 (WebKit::PluginControllerProxy::platformDestroy):
29 (WebKit::PluginControllerProxy::platformGeometryDidChange):
30 * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
31 (WebKit::PluginProcessMain):
32 * PluginProcess/qt/PluginProcessQt.cpp: Added.
33 (WebKit::PluginProcess::platformInitialize):
34 * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
35 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
39 * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
40 (WebKit::PluginProxy::needsBackingStore):
42 2011-03-05 Sam Weinig <sam@webkit.org>
44 Reviewed by Dan Bernstein.
46 Remove unneeded onPageClose function from DrawingArea
47 https://bugs.webkit.org/show_bug.cgi?id=55836
49 * WebProcess/WebPage/DrawingArea.h:
50 Remove empty function.
52 * WebProcess/WebPage/WebPage.cpp:
53 (WebKit::WebPage::close):
56 2011-03-04 Jon Honeycutt <jhoneycutt@apple.com>
60 * UIProcess/API/C/WKPage.cpp:
61 (WKPageComputePagesForPrinting):
62 (WKPageBeginPrinting):
64 * UIProcess/API/C/WKPagePrivate.h:
66 2011-03-04 Jon Honeycutt <jhoneycutt@apple.com>
70 * UIProcess/API/C/WKPagePrivate.h:
72 2011-03-04 Jon Honeycutt <jhoneycutt@apple.com>
74 WK2 needs printing support on Windows
75 https://bugs.webkit.org/show_bug.cgi?id=55800
76 <rdar://problem/8903808>
78 Reviewed by Darin Adler.
80 * UIProcess/API/C/WKPage.cpp:
81 (ComputedPagesContext::ComputedPagesContext):
82 (computedPagesCallback):
83 From the Vector of WebCore::IntRects, build up a Vector of WKRects.
84 Call the callback, passing these rects and the scale factor.
85 (printInfoFromWKPrintInfo):
86 Return a PrintInfo structure from the WKPrintInfo.
87 (WKPageComputePagesForPrinting):
88 Call WebPageProxy::computePagesForPrinting(). Pass
89 computedPagesCallback as the callback function, so that we can
90 translate the WebCore rect type to WKRect before calling the caller's
92 (WKPageBeginPrinting):
93 Call WebPageProxy::beginPrinting().
94 (WKPageDrawPagesToPDF):
95 Call WebPageProxy::drawPagesToPDF().
97 * UIProcess/API/C/WKPagePrivate.h:
98 Declare the WKPrintInfo type and new functions.
100 * UIProcess/WebPageProxy.cpp:
101 Compile this code on Windows.
103 * UIProcess/WebPageProxy.h:
106 * UIProcess/win/WebView.cpp:
107 (WebKit::WebView::paint):
108 We're painting the window; leave printing mode.
110 * WebProcess/WebPage/WebPage.cpp:
111 Compile this code on Windows.
113 * WebProcess/WebPage/WebPage.h:
116 * WebProcess/WebPage/WebPage.messages.in:
119 2011-03-04 Steve Falkenburg <sfalken@apple.com>
121 Reviewed by Darin Adler.
123 Adopt VersionStamper tool for Windows WebKit DLLs
124 https://bugs.webkit.org/show_bug.cgi?id=55784
125 <rdar://problem/9021320>
127 We now use a tool to stamp the version number onto the Apple WebKit DLLs
128 during the post-build step.
130 Fetch the WebKit version from a string resource instead of the version resource.
132 * UIProcess/win/WebPageProxyWin.cpp:
133 (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
134 * win/WebKit2.rc: Removed version, added stringtable.
135 * win/WebKit2WebProcess.rc: Removed.
136 * win/WebKit2WebProcess.vcproj:
137 * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
138 * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
139 * win/WebKitPostBuild.cmd: Stamp version.
141 2011-03-04 Jeff Miller <jeffm@apple.com>
143 Reviewed by Darin Adler.
145 Add WKPageValidateCommand()
146 https://bugs.webkit.org/show_bug.cgi?id=55793
148 On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
149 However, on Windows we need to do this in the client, so expose this functionality
150 in the API via WKPageValidateCommand().
152 Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
153 to match this new API, so it no longer has to go through PageClient to get notified
154 when a command is validated. This makes PageClient::setEditCommandState() obsolete,
155 so I removed the stub implementations in qt and gtk as well.
157 * UIProcess/API/C/WKPage.cpp:
158 (WKPageValidateCommand): Added.
159 * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
160 * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
161 * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
162 * UIProcess/API/mac/WKView.mm:
163 (validateCommandCallback): Added.
164 (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
165 * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
166 * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
167 * UIProcess/PageClient.h: Removed setEditCommandState().
168 * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
169 (WebKit::WebPageProxy::validateCommand): This now takes a callback.
170 (WebKit::WebPageProxy::validateCommandCallback): Added.
171 (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
172 * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
173 (WebKit::ValidateCommandCallback::create): Added.
174 (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
175 (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
176 (WebKit::ValidateCommandCallback::invalidate): Added.
177 (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
178 * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
179 * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
180 * UIProcess/gtk/WebView.h: Removed setEditCommandState().
181 * UIProcess/win/WebView.cpp: Removed setEditCommandState().
182 * UIProcess/win/WebView.h: Removed setEditCommandState().
183 * WebProcess/WebPage/WebPage.cpp:
184 (WebKit::WebPage::validateCommand): This now takes a callbackID.
185 * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
186 * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
188 2011-03-04 Brian Weinstein <bweinstein@apple.com>
190 Reviewed by Darin Adler.
192 Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
193 https://bugs.webkit.org/show_bug.cgi?id=53919
194 <rdar://problem/8966020>
196 Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
198 * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
199 (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
201 2011-03-04 Darin Adler <darin@apple.com>
203 Reviewed by Mark Rowe.
205 WebKit2 session state should include even loads too new to be in the back/forward list
206 https://bugs.webkit.org/show_bug.cgi?id=55781
207 part of <rdar://problem/8968847>
209 * UIProcess/cf/WebPageProxyCF.cpp:
210 (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
211 process to not be included in the back/forward list yet: The pending API request URL and
213 (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
214 list is not restored and a URL is present. Later we can improve the way we handle the
215 case where we have both a back/forward list and a URL.
217 2011-03-04 Jessie Berlin <jberlin@apple.com>
219 Reviewed by Darin Adler.
221 WebKit2: Use CFNetwork Sessions API.
222 https://bugs.webkit.org/show_bug.cgi?id=55435.
224 Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
225 contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
227 * UIProcess/mac/WebContextMac.mm:
228 (WebKit::WebContext::platformInitializeWebProcess):
229 * UIProcess/win/WebContextWin.cpp:
230 (WebKit::WebContext::platformInitializeWebProcess):
232 2011-03-04 Jessie Berlin <jberlin@apple.com>
234 Reviewed by Maciej Stachowiak.
236 WebKit2: Use CFNetwork Sessions API.
237 https://bugs.webkit.org/show_bug.cgi?id=55435.
239 When Private Browsing is enabled, get the cached url response from the cache associated with
240 the Private Browsing Storage Session.
242 * WebProcess/WebPage/mac/WebPageMac.mm:
243 (WebKit::WebPage::platformHasLocalDataForURL):
244 If Private Browsing is enabled, call into WKSI to get the response.
245 (WebKit::WebPage::cachedResponseMIMETypeForURL):
247 * WebProcess/WebPage/win/WebPageWin.cpp:
248 (WebKit::WebPage::platformHasLocalDataForURL):
249 If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
250 (WebKit::WebPage::cachedResponseMIMETypeForURL):
253 2011-03-04 Jeff Miller <jeffm@apple.com>
255 Reviewed by Darin Adler.
257 Move WKViewExecuteCommand() to WKPageExecuteCommand()
258 https://bugs.webkit.org/show_bug.cgi?id=55744
260 Executing a command operates on a page, so it makes more sense for it to be in WKPage.
261 This also makes it available on all platforms, not just Windows.
263 * UIProcess/API/C/WKPage.cpp:
264 (WKPageExecuteCommand): Added.
265 * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
266 * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
267 * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
269 2011-03-04 Dan Bernstein <mitz@apple.com>
271 LLVM Compiler build fix.
273 * WebProcess/WebPage/WebPage.cpp:
274 (WebKit::WebPage::runJavaScriptInMainFrame):
276 2011-03-03 Timothy Hatcher <timothy@apple.com>
278 Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
280 https://webkit.org/b/55623
282 Reviewed by Darin Adler.
284 * UIProcess/API/C/WKPage.cpp:
285 (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
286 (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
287 * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
288 * UIProcess/WebPageProxy.cpp:
289 (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
290 (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
291 (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
292 from the DataReference before calling the callback.
293 (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
294 * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
295 * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
296 * WebProcess/WebPage/WebPage.cpp:
297 (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
298 And use ScriptValueCallback to send the message back.
300 2011-03-03 Brian Weinstein <bweinstein@apple.com>
302 Reviewed by Adam Roben.
304 Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
306 Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
307 on all platforms, and stub the functions on platforms that don't implement them.
309 * WebProcess/Cookies/WebCookieManager.cpp:
310 (WebKit::WebCookieManager::startObservingCookieChanges):
311 (WebKit::WebCookieManager::stopObservingCookieChanges):
313 2011-03-03 Jeff Miller <jeffm@apple.com>
315 Reviewed by Darin Adler.
317 Refactor classes in GenericCallback.h
318 https://bugs.webkit.org/show_bug.cgi?id=55732
320 Since we're going to need to add additional callback classes, make a CallbackBase class that manages
321 the context and the callback ID. The existing callback classes (VoidCallback, GenericCallback, and
322 ComputedPagesCallback) now all derive from CallbackBase.
324 Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
325 constructor instead (we forgot the leading ~).
327 * UIProcess/GenericCallback.h:
328 (WebKit::CallbackBase::~CallbackBase):
329 (WebKit::CallbackBase::callbackID):
330 (WebKit::CallbackBase::CallbackBase):
331 (WebKit::CallbackBase::context):
332 (WebKit::CallbackBase::generateCallbackID):
333 (WebKit::VoidCallback::~VoidCallback):
334 (WebKit::VoidCallback::performCallback):
335 (WebKit::VoidCallback::invalidate):
336 (WebKit::VoidCallback::VoidCallback):
337 (WebKit::GenericCallback::create):
338 (WebKit::GenericCallback::~GenericCallback):
339 (WebKit::GenericCallback::performCallbackWithReturnValue):
340 (WebKit::GenericCallback::invalidate):
341 (WebKit::GenericCallback::GenericCallback):
342 (WebKit::ComputedPagesCallback::create):
343 (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
344 (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
345 (WebKit::ComputedPagesCallback::invalidate):
346 (WebKit::ComputedPagesCallback::ComputedPagesCallback):
348 2011-03-03 Adam Roben <aroben@apple.com>
350 Don't assume the web process has had a chance to paint before the view has to paint
352 Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
355 Reviewed by Anders Carlsson.
357 * UIProcess/DrawingAreaProxyImpl.cpp:
358 (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
361 2011-03-03 Adam Roben <aroben@apple.com>
363 Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
365 The intent is to save memory for views that aren't painting.
367 Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
368 backing store after not painting for a while
370 Reviewed by Anders Carlsson.
372 * UIProcess/DrawingAreaProxyImpl.cpp:
373 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
374 (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
375 bail if we're in accelerated compositing mode); we might have thrown it away to save memory
376 but now are being asked to paint by the view. The existing code in this function will handle
377 getting a new backing store if possible by blocking for a little while to try to receive a
378 DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
379 don't have any outstanding UpdateBackingStoreState requests. After painting, call
380 discardBackingStoreSoon to update our timer.
381 (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
383 (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
384 the web process we'll need a full backing store update on the next paint.
386 * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
388 2011-03-03 Adam Roben <aroben@apple.com>
390 Add a way to tell the web process to perform a full backing store update on its next paint
392 Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
393 full backing store update should happen immediately or should be deferred until the next
394 paint or compositing mode change occurs. The deferred update isn't used yet, but will be
395 used when we start throwing away backing stores to save memory.
397 Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
398 store needs a full update on the next paint
400 Reviewed by Anders Carlsson.
402 * UIProcess/DrawingAreaProxyImpl.cpp:
403 (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
404 request, tell the web process to perform the backing store update right away, in case we
405 previously told it it could defer the update.
406 (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
408 (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
409 were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
410 for the web process to decide to send us this message on its own (if we asked it to do a
411 deferred backing store update and then it needed to paint some part of the page). Specify
412 that we need an immediate backing store update if the web process hasn't updated to our
413 latest state, as we're about to draw potentially out-of-date bits to the screen and want to
414 get the right bits as soon as possible. Also added a FIXME about a potential optimization.
415 (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
416 parameter, which is just passed through to sendUpdateBackingStoreState.
417 (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
418 parameter that is used to specify to the web process whether to perform the full backing
419 store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
420 thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
421 the web process for an immediate response; otherwise we could end up accidentally calling
422 waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
425 * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
427 * WebProcess/WebPage/DrawingArea.h:
428 (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
430 * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
431 UpdateBackingStoreState message.
433 * WebProcess/WebPage/DrawingAreaImpl.cpp:
434 (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
435 whether we should send a DidUpdateBackingStoreState message instead of an Update or
436 compositing mode change message. This will be set to true when a deferred backing store
438 (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
439 DidUpdateBackingStoreState message instead of a compositing mode change message.
440 (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
441 we've already been told about this state ID (as can happen when the UI process decides it
442 needs an immediate update to a state that it previously requested a deferred update to),
443 don't bother updating the page's size, etc. In addition, if we've already sent a
444 DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
445 Moved code to send the DidUpdateBackingStoreState message from here...
446 (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
447 (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
448 even if painting is suspended or we're in the process of updating the backing store state.
449 It causes no harm and simplifies the code. If a deferred update is pending, send a
450 DidUpdateBackingStoreState message instead of a compositing mode change message. Also
451 removed a redundant if.
452 (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
453 backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
454 messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
455 of an Update message.
457 * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
458 class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
460 2011-03-03 Andy Estes <aestes@apple.com>
462 Reviewed by Darin Adler.
464 When displaying the missing plug-in sheet, pass the 'pluginspage'
465 attribute to the UI process.
466 https://bugs.webkit.org/show_bug.cgi?id=55553
468 * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
469 missingPluginButtonClicked.
470 * UIProcess/WebPageProxy.cpp:
471 (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
472 * UIProcess/WebPageProxy.h: Ditto.
473 * UIProcess/WebPageProxy.messages.in: Ditto.
474 * UIProcess/WebUIClient.cpp:
475 (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
476 * UIProcess/WebUIClient.h: Ditto.
477 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
478 (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
481 2011-03-03 Alexey Proskuryakov <ap@apple.com>
483 Suggested by Dan Bernstein.
485 Move "const" around "NSString *", so that it suddenly begins to make sense.
487 * WebProcess/mac/FullKeyboardAccessWatcher.mm:
489 2011-03-03 Jeff Miller <jeffm@apple.com>
491 Reviewed by Anders Carlsson.
493 WebKit2: Add WKViewRef API for executing edit commands
494 https://bugs.webkit.org/show_bug.cgi?id=49829
496 Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
498 * UIProcess/API/C/win/WKView.cpp:
499 (WKViewExecuteCommand): Added.
500 * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
502 2011-03-03 Jessie Berlin <jberlin@apple.com>
504 Reviewed by Adam Roben.
506 WebKit2: Use CFNetwork Sessions API.
507 https://bugs.webkit.org/show_bug.cgi?id=55435
509 Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
511 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
512 (InitWebCoreSystemInterface):
513 Support using WKCopyRequestWithStorageSession in WebCore.
515 2011-03-03 Adam Roben <aroben@apple.com>
517 Don't try to paint outside the page's bounds
519 When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
520 size, even though we only needed to paint at the new, smaller size.
522 The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
523 test if this fix gets broken in the future.
525 Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
526 the page is resized smaller
528 Reviewed by Anders Carlsson.
530 * WebProcess/WebPage/DrawingAreaImpl.cpp:
531 (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
532 is suspended (but still refrain from updating it when in accelerated compositing mode).
533 Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
534 region with the page's new bounds. This prevents us from accumulating a dirty region that is
535 larger than the page in the case where the page is being resized smaller.
536 (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
537 outside of the page's bounds.
539 2011-03-03 Maciej Stachowiak <mjs@apple.com>
541 Reviewed by Brady Eidson.
543 WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
544 https://bugs.webkit.org/show_bug.cgi?id=55701
545 <rdar://problem/9074017>
547 * Shared/WebProcessCreationParameters.cpp:
548 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
549 flag parameters to false.
550 (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
551 (WebKit::WebProcessCreationParameters::decode): And deserialize.
553 2011-03-03 Alexey Proskuryakov <ap@apple.com>
555 Reviewed by Darin Adler.
557 REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
558 https://bugs.webkit.org/show_bug.cgi?id=55633
559 <rdar://problem/8963023>
561 * WebKit2.xcodeproj/project.pbxproj:
562 * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
563 * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
564 (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
565 (-[FullKeyboardAccessWatcher init]):
566 (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
567 Get the current state of full keyboard access, listening for change notifications.
569 * WebProcess/WebProcess.h: Added fullKeyboardAccessEnabled().
571 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
572 WebKit1 also doesn't implement this on platforms other than Mac.
574 * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
575 Just ask FullKeyboardAccessWatcher.
577 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
578 * WebProcess/WebCoreSupport/WebChromeClient.h:
579 Added keyboardUIMode(), removed tabsToLinks().
581 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
582 * WebProcess/WebPage/WebPage.h:
583 Generate keyboard UI mode from tabToLinks preference and current state of FKA.
585 2011-03-03 Sam Weinig <sam@webkit.org>
587 Reviewed by Anders Carlsson.
589 Give the Bundle's policy client the option of deciding the policy
590 https://bugs.webkit.org/show_bug.cgi?id=55699
592 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
593 Add WKBundlePagePolicyAction enum and make it the return value of
594 the WKBundlePagePolicyClient functions.
596 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
597 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
598 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
599 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
600 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
601 Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
603 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
604 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
605 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
606 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
607 Call the policy function early if the bundle handles it.
609 2011-03-02 Brian Weinstein <bweinstein@apple.com>
611 Reviewed by Adam Roben.
613 Rest of WebKit2: Need a way to send notifications to client when cookies change
614 https://bugs.webkit.org/show_bug.cgi?id=55427
615 <rdar://problem/9056027>
617 This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
618 listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
619 when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
620 change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
622 * UIProcess/API/C/WKCookieManager.cpp:
623 (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
624 (WKCookieManagerStartObservingCookieChanges): Ditto.
625 (WKCookieManagerStopObservingCookieChanges): Ditto.
627 * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
628 which is responsible for cookiesDidChange.
630 * UIProcess/WebCookieManagerProxy.cpp:
631 (WebKit::WebCookieManagerProxy::initializeClient):
632 (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
633 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
634 (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
636 * UIProcess/WebCookieManagerProxy.h:
637 * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
639 * UIProcess/WebCookieManagerProxyClient.cpp: Added.
640 (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
642 * UIProcess/WebCookieManagerProxyClient.h: Added.
644 * WebProcess/Cookies/WebCookieManager.cpp:
645 (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
646 (on platforms that support it).
647 (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
648 (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
649 * WebProcess/Cookies/WebCookieManager.h:
650 * WebProcess/Cookies/WebCookieManager.messages.in:
654 * WebKit2.xcodeproj/project.pbxproj:
656 * win/WebKit2.vcproj:
658 2011-03-03 Anders Carlsson <andersca@apple.com>
660 Reviewed by Darin Adler.
662 Remove CanRunBeforeUnloadConfirmPanel sync message
663 https://bugs.webkit.org/show_bug.cgi?id=55689
665 * Shared/WebPageCreationParameters.cpp:
666 (WebKit::WebPageCreationParameters::encode):
667 (WebKit::WebPageCreationParameters::decode):
668 Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
669 being encoded/decoded.
671 * Shared/WebPageCreationParameters.h:
672 Add canRunBeforeUnloadConfirmPanel.
674 * UIProcess/WebPageProxy.cpp:
675 (WebKit::WebPageProxy::initializeUIClient):
676 Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
678 (WebKit::WebPageProxy::creationParameters):
679 Initialize parameters.canRunBeforeUnloadConfirmPanel.
681 * UIProcess/WebPageProxy.messages.in:
682 Remove CanRunBeforeUnloadConfirmPanel message.
684 * UIProcess/WebUIClient.cpp:
685 (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
686 * UIProcess/WebUIClient.h:
687 Make canRunBeforeUnloadConfirmPanel const.
689 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
690 (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
691 Ask the web page instead of sending a synchronous message.
693 * WebProcess/WebPage/WebPage.cpp:
694 (WebKit::WebPage::WebPage):
695 Initialize m_canRunBeforeUnloadConfirmPanel.
697 * WebProcess/WebPage/WebPage.h:
698 (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
699 (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
700 Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
702 (WebKit::WebPage::setCanRunModal):
703 Add setter for m_canRunModal.
705 * WebProcess/WebPage/WebPage.messages.in:
706 Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
708 2011-03-03 Adam Roben <aroben@apple.com>
710 Create the CFBundleRef for WebKit.dll on Windows if needed
712 WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
713 out or crash on Windows 7 Release (WebKit2 Tests)
715 Reviewed by Darin Adler.
717 * Shared/win/WebKitBundle.cpp: Added.
718 (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
719 and returns a new bundle.
720 (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
722 * Shared/win/WebKitBundle.h: Added.
724 * UIProcess/win/WebInspectorProxyWin.cpp:
725 (WebKit::WebInspectorProxy::inspectorPageURL):
726 * WebProcess/WebPage/win/WebInspectorWin.cpp:
727 (WebKit::WebInspector::localizedStringsURL):
728 Changed to use webKitBundle() to ensure that the bundle has been created.
730 * win/WebKit2.vcproj: Added new files.
732 2011-03-03 Peter Kasting <pkasting@google.com>
734 Reviewed by James Robinson.
736 Drop redundant "Windows; " from the Windows-specific User Agent string.
737 https://bugs.webkit.org/show_bug.cgi?id=54567
739 * UIProcess/win/WebPageProxyWin.cpp:
740 (WebKit::WebPageProxy::standardUserAgent):
742 2011-03-02 Sheriff Bot <webkit.review.bot@gmail.com>
744 Unreviewed, rolling out r80188.
745 http://trac.webkit.org/changeset/80188
746 https://bugs.webkit.org/show_bug.cgi?id=55647
748 Broke the WebKit API tests. (Requested by xenon on #webkit).
750 * UIProcess/API/C/WKPage.cpp:
751 (WKPageRunJavaScriptInMainFrame):
752 (callRunJavaScriptBlockAndRelease):
753 * UIProcess/API/C/WKPage.h:
754 * UIProcess/WebPageProxy.cpp:
755 (WebKit::WebPageProxy::close):
756 (WebKit::WebPageProxy::runJavaScriptInMainFrame):
757 (WebKit::WebPageProxy::processDidCrash):
758 * UIProcess/WebPageProxy.h:
759 * UIProcess/WebPageProxy.messages.in:
760 * WebProcess/WebPage/WebPage.cpp:
761 (WebKit::WebPage::runJavaScriptInMainFrame):
763 2011-03-02 Jeff Miller <jeffm@apple.com>
765 Reviewed by Darin Adler.
767 Rename WebKit::WebPage::validateMenuItem() to validateCommand()
768 https://bugs.webkit.org/show_bug.cgi?id=55636
770 Since this method can validate more than menu items, validateCommand() is a better name. Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
772 * UIProcess/API/mac/WKView.mm:
773 (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
774 * UIProcess/WebPageProxy.cpp:
775 (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
776 (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
777 * UIProcess/WebPageProxy.h:
778 * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
779 * WebProcess/WebPage/WebPage.cpp:
780 (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
781 * WebProcess/WebPage/WebPage.h:
782 * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
784 2011-03-02 Anders Carlsson <andersca@apple.com>
786 Reviewed by Sam Weinig.
788 WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
789 https://bugs.webkit.org/show_bug.cgi?id=55635
791 * Shared/WebPageCreationParameters.cpp:
792 (WebKit::WebPageCreationParameters::encode):
793 (WebKit::WebPageCreationParameters::decode):
794 Encode and decode areMemoryCacheClientCallsEnabled.
796 * Shared/WebPageCreationParameters.h:
797 Add areMemoryCacheClientCallsEnabled member variable.
799 * UIProcess/WebPageProxy.cpp:
800 (WebKit::WebPageProxy::WebPageProxy):
801 Initialize m_areMemoryCacheClientCallsEnabled.
803 (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
804 Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
806 (WebKit::WebPageProxy::creationParameters):
807 Set areMemoryCacheClientCallsEnabled.
809 * WebProcess/WebPage/WebPage.cpp:
810 (WebKit::WebPage::WebPage):
811 Call WebPage::setMemoryCacheMessagesEnabled.
813 2011-03-02 Timothy Hatcher <timothy@apple.com>
815 Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
817 https://webkit.org/b/55623
819 Reviewed by Darin Adler.
821 * UIProcess/API/C/WKPage.cpp:
822 (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
823 (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
824 * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
825 * UIProcess/WebPageProxy.cpp:
826 (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
827 (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
828 (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
829 from the DataReference before calling the callback.
830 (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
831 * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
832 * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
833 * WebProcess/WebPage/WebPage.cpp:
834 (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
835 And use ScriptValueCallback to send the message back.
837 2011-03-02 Jessie Berlin <jberlin@apple.com>
839 Reviewed by Adam Roben.
841 WebKit2: Use CFNetwork Sessions API.
842 https://bugs.webkit.org/show_bug.cgi?id=55435
844 Add the ability to create a Private Browsing Storage Session.
846 * Shared/WebProcessCreationParameters.cpp:
847 (WebKit::WebProcessCreationParameters::encode):
848 Encode the UI Process bundle identifier.
849 (WebKit::WebProcessCreationParameters::decode):
850 Decode the UI Process bundle identifier.
851 * Shared/WebProcessCreationParameters.h:
853 * UIProcess/mac/WebContextMac.mm:
854 (WebKit::WebContext::platformInitializeWebProcess):
855 Grab the bundle identifier and use it to set the WebProcessCreationParameter.
856 * UIProcess/win/WebContextWin.cpp:
857 (WebKit::WebContext::platformInitializeWebProcess):
860 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
861 (InitWebCoreSystemInterface):
862 Support using the wkCreatePrivateStorageSession WKSI in WebCore.
864 * WebProcess/WebProcess.cpp:
865 (WebKit::WebProcess::initializeWebProcess):
866 Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
867 from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
868 same identifier as WebKit2.
870 2011-03-01 Brian Weinstein <bweinstein@apple.com>
872 Reviewed by Adam Roben.
874 Part of WebKit2: Need a way to send notifications to client when cookies change
875 https://bugs.webkit.org/show_bug.cgi?id=55427
876 <rdar://problem/9056027>
878 * WebProcess/Cookies/WebCookieManager.cpp:
879 (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a
880 message to the UI process.
882 * WebProcess/Cookies/WebCookieManager.h:
883 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
884 (WebKit::WebPlatformStrategies::createCookiesStrategy):
885 (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
886 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
888 2011-03-02 Andras Becsi <abecsi@webkit.org>
890 Reviewed by Laszlo Gombos.
892 [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
893 https://bugs.webkit.org/show_bug.cgi?id=55478
895 On case insensitive systems the generated forwarding headers cause build problems.
897 * Scripts/generate-forwarding-headers.pl: The generated header should
898 also contain the framework name.
900 2011-03-01 Jeff Miller <jeffm@apple.com>
902 Reviewed by Darin Adler.
904 Expose some selection state fields in WKPage
905 https://bugs.webkit.org/show_bug.cgi?id=55541
907 Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
908 Edit menu items properly on Windows when using WebKit2.
910 * UIProcess/API/C/WKPage.cpp:
911 (WKPageCanDelete): Added.
912 (WKPageHasSelectedRange): Added.
913 (WKPageIsContentEditable): Added.
914 * UIProcess/API/C/WKPage.h: Added new functions.
915 * UIProcess/WebPageProxy.h:
916 (WebKit::WebPageProxy::canDelete): Added.
917 (WebKit::WebPageProxy::hasSelectedRange): Added.
918 (WebKit::WebPageProxy::isContentEditable): Added.
920 2011-03-01 Mark Rowe <mrowe@apple.com>
922 Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
924 * Configurations/Base.xcconfig:
926 2011-03-01 Mark Rowe <mrowe@apple.com>
928 Reviewed by Sam Weinig.
930 Add verification scripts to WebKit2 project and fix the issues they reveal.
932 * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
933 library functions from being exported as weak externals.
934 * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
935 * Shared/WebContextMenuItem.cpp:
936 (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
937 * UIProcess/WebPageGroup.cpp:
938 (WebKit::webPageGroupMap): Ditto.
939 * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
940 Run verification scripts at the appropriate times.
941 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
942 (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
943 (WebKit::WebEditorClient::respondToChangedContents): Ditto.
944 (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
945 (WebKit::WebEditorClient::didEndEditing): Ditto.
946 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
947 (WebKit::idToHistoryItemMap): Ditto.
948 (WebKit::historyItemToIDMap): Ditto.
950 2011-03-01 Joseph Pecoraro <joepeck@webkit.org>
952 Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
954 * UIProcess/API/qt/qwkpage.cpp:
955 (QWKPage::viewportAttributesForSize):
957 2011-03-01 Joseph Pecoraro <joepeck@webkit.org>
959 Unreviewed, missed updating a call to WebCore::computeViewportAttributes
960 who's prototype changed.
962 Viewport Warning/Error Messages Are Now Inaccurate
963 https://bugs.webkit.org/show_bug.cgi?id=53707
965 * UIProcess/API/qt/qwkpage.cpp:
966 (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
968 2011-03-01 Anders Carlsson <andersca@apple.com>
970 Reviewed by Sam Weinig.
972 WKPluginSiteDataManagerClearAllSiteData is not working
973 https://bugs.webkit.org/show_bug.cgi?id=55528
974 <rdar://problem/9071823>
976 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
977 (WebKit::NetscapePluginModule::tryGetSitesWithData):
978 Remove version checks, checking that the function pointer is not null is enough.
980 (WebKit::NetscapePluginModule::tryClearSiteData):
981 Remove version checks, checking that the function pointer is not null is enough.
982 Also, correctly convert a null String to a null CString.
984 2011-03-01 Adam Roben <aroben@apple.com>
986 Incorporate a review comment I missed in r80051
988 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
990 2011-03-01 Adam Roben <aroben@apple.com>
992 Make the PLUGIN_ARCHITECTURE() macro work with MSVC
994 Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
995 plugins tests crashing in NetscapePlugin::initialize on Windows
997 Reviewed by Anders Carlsson.
999 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
1000 PLUGIN_ARCHITECTURE() is defined for some platform.
1002 * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
1003 macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
1004 replaced the nonsense OS(WIN) with OS(WINDOWS).
1006 * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
1008 2011-03-01 Sam Weinig <sam@webkit.org>
1010 Reviewed by Timothy Hatcher.
1012 WebKit2 needs to be made localizable
1013 https://bugs.webkit.org/show_bug.cgi?id=55483
1015 * PluginProcess/mac/PluginProcessMainMac.mm:
1016 * WebProcess/mac/WebProcessMainMac.mm:
1017 Set the default localization from the passed in parameter.
1019 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1020 Add the preferred localization as a parameter when launching processes
1021 so that they can set their localization to match the launching app.
1023 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1024 Use WebCore's localizedString function on the mac, to actually localize
1027 (WebKit::WebPlatformStrategies::imageTitle):
1028 Switch to using replace, instead of concatenation, to give localizers a chance
1029 to rearrange the wording.
1031 2011-03-01 Balazs Kelemen <kbalazs@webkit.org>
1033 Reviewed by Anders Carlsson.
1035 [Qt][WK2] Plugin initialization
1036 https://bugs.webkit.org/show_bug.cgi?id=48127
1038 Apply the quirks that are necessary for the flash plugin
1039 to not crash on X11.
1041 * Platform/qt/ModuleQt.cpp:
1042 (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
1043 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1044 (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
1045 if PLUGIN_ARCHITECTURE is X11.
1046 * Shared/Plugins/Netscape/NetscapePluginModule.h:
1047 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1048 (WebKit::initializeGTK): The same hack that we do in WebCore.
1049 Call gtk_init because flash don't do it for itself.
1050 (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
1051 Do the hacks that we need to do before calling NP_Initialize on the
1052 flash plugin to save it form crashing.
1053 * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
1054 Added RequiresGTKToolKit quirk for X11.
1055 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1056 (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
1057 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1058 (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
1059 quirks to be available in NPN_GetValue.
1061 2011-03-01 Adam Roben <aroben@apple.com>
1063 Convert seconds to milliseconds before calling ::SetTimer
1065 Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
1068 Reviewed by Anders Carlsson.
1070 * Platform/win/RunLoopWin.cpp:
1071 (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
1074 2011-03-01 Andras Becsi <abecsi@webkit.org>
1076 Reviewed by Csaba Osztrogonác.
1078 [Qt] Clean up the project files and move common options to WebKit.pri.
1080 * WebKit2.pro: Deduplicate options.
1082 2011-03-01 Juha Savolainen <juha.savolainen@weego.fi>
1084 Reviewed by Andreas Kling.
1086 [Qt] WebKit2 needs to support font size changing and getting default font size
1087 https://bugs.webkit.org/show_bug.cgi?id=53671
1089 Added new enum for font size type and added methods to set and get default font sizes.
1091 * UIProcess/API/qt/qwkpreferences.cpp:
1092 (QWKPreferences::setFontSize): Added.
1093 (QWKPreferences::fontSize): Added.
1094 * UIProcess/API/qt/qwkpreferences.h:
1096 2011-02-28 Alice Liu <alice.liu@apple.com>
1098 Reviewed by Adam Roben and Gavin Barraclough.
1100 https://bugs.webkit.org/show_bug.cgi?id=54898
1101 InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
1103 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1104 (WKBundleHitTestResultCopyNodeHandle):
1105 Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
1106 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1107 Renamed from "get" to "copy", because it leaksRef.
1109 2011-02-28 Alice Liu <alice.liu@apple.com>
1111 Reviewed by Gavin Barraclough.
1113 https://bugs.webkit.org/show_bug.cgi?id=55442
1114 Webarchives don't contain subframe content
1116 * WebProcess/WebPage/WebPage.cpp:
1117 (WebKit::WebPage::getWebArchiveOfFrame):
1118 Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
1120 2011-02-28 Benjamin Poulain <benjamin.poulain@nokia.com>
1122 Reviewed by Kenneth Rohde Christiansen.
1124 [Qt][WK2] Add a way to test the WebKit 2 APIs
1125 https://bugs.webkit.org/show_bug.cgi?id=55408
1127 Add an initial test for the WebKit 2 APIs of Qt.
1129 * UIProcess/API/qt/tests/html/basic_page.html: Added.
1130 * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
1131 * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
1133 (View::resizeEvent):
1134 (tst_QGraphicsWKView::init):
1135 (tst_QGraphicsWKView::cleanup):
1136 (tst_QGraphicsWKView::loadEmptyPage):
1137 * UIProcess/API/qt/tests/tests.pri: Added.
1138 * UIProcess/API/qt/tests/tests.pro: Added.
1139 * UIProcess/API/qt/tests/util.h: Added.
1142 2011-02-28 Anders Carlsson <andersca@apple.com>
1146 * UIProcess/API/mac/FindIndicatorWindow.mm:
1147 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1148 (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
1149 (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
1150 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1151 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1152 (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
1153 (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1154 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1156 2011-02-28 Dan Bernstein <mitz@apple.com>
1158 Rubber-stamped by Anders Carlsson.
1160 Do not copy config.h into WebKit2.
1162 * WebKit2.xcodeproj/project.pbxproj:
1164 2011-02-28 Dan Bernstein <mitz@apple.com>
1166 LLVM Compiler build fix.
1168 * Scripts/webkit2/messages.py:
1169 * UIProcess/WebPageProxy.h:
1171 2011-02-28 Anders Carlsson <andersca@apple.com>
1173 Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
1175 Open PDF in Preview doesn't work
1176 https://bugs.webkit.org/show_bug.cgi?id=55400
1177 <rdar://problem/8750353>
1179 * UIProcess/API/mac/PDFViewController.mm:
1180 (-[WKPDFView initWithFrame:PDFViewController:]):
1181 Set the WKPDFView as the delegate of itself.
1183 (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
1184 Call PDFViewController::openPDFInFinder.
1186 (WebKit::PDFViewController::PDFViewController):
1187 Initialize m_hasWrittenPDFToDisk to false.
1189 (WebKit::PDFViewController::openPDFInFinder):
1190 Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
1192 (WebKit::temporaryPDFDirectoryPath):
1193 Create a directory to put PDFs in.
1195 (WebKit::PDFViewController::pathToPDFOnDisk):
1196 Return a path to a (non-existent) file in the temporary PDF directory.
1198 2011-02-28 Alexey Proskuryakov <ap@apple.com>
1200 Reviewed by Dan Bernstein.
1202 Frequent crashes in CFURLCache code on Snow Leopard
1203 https://bugs.webkit.org/show_bug.cgi?id=55412
1204 <rdar://problem/9063922>
1206 CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
1207 creates a string with maximum possible buffer size. A path with garbage at the end confused
1208 CFURLCache into corrupting its data structures.
1210 * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
1211 This problem wouldn't have occured if we didn't use CString in the first place.
1213 * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
1214 Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
1215 have liked trailing slash).
1217 * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
1218 Made slash removal conditional for robustness.
1220 * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
1221 Use actual string length, not CString::length().
1223 2011-02-28 Balazs Kelemen <kbalazs@webkit.org>
1225 Reviewed by Anders Carlsson.
1227 [Qt][WK2] Plugin initialization
1228 https://bugs.webkit.org/show_bug.cgi?id=48127
1230 Specialize the way of initializing the plugin for X11.
1231 Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
1234 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1235 (WebKit::NetscapePluginModule::tryLoad):
1238 2011-02-28 Sam Weinig <sam@webkit.org>
1240 Reviewed by Brady Eidson.
1242 WK2 Context Menus - Implement LookUpInDictionary
1243 https://bugs.webkit.org/show_bug.cgi?id=55405
1245 * Shared/DictionaryPopupInfo.cpp:
1246 (WebKit::DictionaryPopupInfo::encode):
1247 (WebKit::DictionaryPopupInfo::decode):
1248 * Shared/DictionaryPopupInfo.h:
1249 Add type to differentiate between HotKey and ContextMenu triggered
1250 dictionary popups. This is necessary since HotKey triggered ones want
1251 to override the style to always be overlay.
1253 * UIProcess/API/mac/PageClientImpl.mm:
1254 (WebKit::PageClientImpl::didPerformDictionaryLookup):
1255 Only force the overlay style for HotKey triggered dictionary lookups.
1257 * WebProcess/WebPage/WebPage.h:
1258 * WebProcess/WebPage/mac/WebPageMac.mm:
1259 (WebKit::WebPage::performDictionaryLookupAtLocation):
1260 (WebKit::WebPage::performDictionaryLookupForRange):
1261 Factor out shared functionality into performDictionaryLookupForRange.
1263 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1264 (WebKit::WebContextMenuClient::lookUpInDictionary):
1265 Get selected range and call newly factored out performDictionaryLookupForRange.
1267 2011-02-28 Anders Carlsson <andersca@apple.com>
1269 Reviewed by Dan Bernstein.
1271 PDFViewController should hold a reference to the PDF data
1272 https://bugs.webkit.org/show_bug.cgi?id=55394
1274 * UIProcess/API/mac/PDFViewController.h:
1275 * UIProcess/API/mac/PDFViewController.mm:
1276 (WebKit::PDFViewController::setPDFDocumentData):
1278 2011-02-28 Sam Weinig <sam@webkit.org>
1280 Reviewed by Darin Adler.
1282 Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
1283 https://bugs.webkit.org/show_bug.cgi?id=48234
1285 * Shared/TextInfo.cpp: Removed.
1286 * Shared/TextInfo.h: Removed.
1287 Replace this with the more appropriately DictionaryPopupInfo.
1289 * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
1290 (WebKit::DictionaryPopupInfo::encode):
1291 (WebKit::DictionaryPopupInfo::decode):
1292 * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
1293 (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
1294 Replace individual font related fields with FontInfo.
1296 * Shared/FontInfo.cpp: Added.
1297 (WebKit::FontInfo::FontInfo):
1298 (WebKit::FontInfo::encode):
1299 (WebKit::FontInfo::decode):
1300 * Shared/FontInfo.h: Added.
1301 Add class to encapsulate passing a font description over the wire.
1303 * Shared/PlatformPopupMenuData.cpp:
1304 (WebKit::PlatformPopupMenuData::encode):
1305 (WebKit::PlatformPopupMenuData::decode):
1306 * Shared/PlatformPopupMenuData.h:
1307 Add FontInfo as extra data for the Mac.
1309 * UIProcess/API/mac/PageClientImpl.h:
1310 * UIProcess/API/mac/PageClientImpl.mm:
1311 (WebKit::PageClientImpl::didPerformDictionaryLookup):
1312 * UIProcess/PageClient.h:
1313 Add scaleFactor and use it to construct a font at the right size.
1315 * UIProcess/WebPageProxy.cpp:
1316 (WebKit::WebPageProxy::showPopupMenu):
1317 (WebKit::WebPageProxy::didPerformDictionaryLookup):
1318 * UIProcess/WebPageProxy.h:
1319 * UIProcess/WebPageProxy.messages.in:
1320 * UIProcess/WebPopupMenuProxy.h:
1321 * UIProcess/mac/WebPopupMenuProxyMac.h:
1322 (WebKit::WebPopupMenuProxyMac::create):
1323 * UIProcess/mac/WebPopupMenuProxyMac.mm:
1324 (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
1325 (WebKit::WebPopupMenuProxyMac::populate):
1326 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1327 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1328 (WebKit::WebPopupMenuProxyQt::showPopupMenu):
1329 * UIProcess/qt/WebPopupMenuProxyQt.h:
1330 * UIProcess/win/WebPopupMenuProxyWin.cpp:
1331 (WebKit::WebPopupMenuProxyWin::showPopupMenu):
1332 * UIProcess/win/WebPopupMenuProxyWin.h:
1333 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1334 (WebKit::WebPopupMenu::setUpPlatformData):
1335 * WebProcess/WebPage/mac/WebPageMac.mm:
1336 (WebKit::WebPage::performDictionaryLookupAtLocation):
1337 Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
1340 * WebKit2.xcodeproj/project.pbxproj:
1341 * win/WebKit2.vcproj:
1344 2011-02-28 Adam Roben <aroben@apple.com>
1346 One more rename as a followup to r79868
1348 Rubber-stamped by Anders Carlsson.
1350 * UIProcess/DrawingAreaProxyImpl.cpp:
1351 * UIProcess/DrawingAreaProxyImpl.h:
1352 Rename stateDidChange to backingStoreStateDidChange.
1354 2011-02-28 Adam Roben <aroben@apple.com>
1356 Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
1358 Rubber-stamped (and suggested) by Anders Carlsson.
1360 * UIProcess/DrawingAreaProxy.h:
1361 * UIProcess/DrawingAreaProxy.messages.in:
1362 * UIProcess/DrawingAreaProxyImpl.cpp:
1363 * UIProcess/DrawingAreaProxyImpl.h:
1364 * WebProcess/WebPage/DrawingArea.h:
1365 * WebProcess/WebPage/DrawingArea.messages.in:
1366 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1367 * WebProcess/WebPage/DrawingAreaImpl.h:
1370 2011-02-28 Adam Roben <aroben@apple.com>
1372 Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
1374 The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
1375 DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
1376 store. (Currently, this is just when the size changes.) This function will sometimes (but
1377 not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
1378 to the web process. This means it's now possible for the state IDs sent in consecutive
1379 UpdateState messages to increase by more than one, but that's OK.
1381 This should cause no change in behavior.
1383 Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
1384 its state changes, not just when we send an UpdateState message
1386 Reviewed by Anders Carlsson.
1388 * UIProcess/DrawingAreaProxyImpl.cpp:
1389 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
1390 (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
1391 (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
1392 sendUpdateState whenever our state has changed for any reason since the last UpdateState
1394 (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
1395 through to sendUpdateState.
1396 (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
1397 the state ID we send to the web process from here to stateDidChange, and added an assertion.
1399 * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
1400 the comment explaining its meaning.
1402 2011-02-28 Adam Roben <aroben@apple.com>
1404 Pass the right dirty rect to Plugin::paint
1406 A typo in r79040 broke this. Much of this patch is just support for testing the fix.
1408 Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
1409 Large portions of pages with plugins paint black
1411 Reviewed by Anders Carlsson.
1413 * WebProcess/Plugins/PluginView.cpp:
1414 (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
1415 rather than just passing along the dirty rect that was passed into this function. This is
1418 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1419 (WKBundlePageForceRepaint):
1420 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1421 Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
1423 * WebProcess/WebPage/WebPage.cpp:
1424 (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
1425 (WebKit::WebPage::forceRepaint): ...from here.
1427 * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
1429 2011-02-27 Sam Weinig <sam@webkit.org>
1431 Reviewed by Dan Bernstein.
1433 Force dictionary popup to use overlay type
1434 <rdar://problem/9052483>
1435 https://bugs.webkit.org/show_bug.cgi?id=55337
1437 * UIProcess/API/mac/PageClientImpl.mm:
1438 (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
1439 used for the hot key version of the dictionary popup, force the overlay
1442 2011-02-27 Benjamin Poulain <benjamin.poulain@nokia.com>
1444 Reviewed by Kenneth Rohde Christiansen.
1446 [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
1447 https://bugs.webkit.org/show_bug.cgi?id=55330
1449 Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
1452 * UIProcess/API/qt/qgraphicswkview.cpp:
1453 * UIProcess/API/qt/qgraphicswkview.h:
1455 2011-02-27 Alejandro G. Castro <alex@igalia.com>
1457 Unreviewed, fixed GTK compilation after r79806.
1459 * UIProcess/gtk/WebView.cpp:
1460 (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
1461 * UIProcess/gtk/WebView.h:
1463 2011-02-26 Anders Carlsson <andersca@apple.com>
1465 Reviewed by Dan Bernstein.
1467 Asynchronous response to FramePolicyListener is not finishing the load
1468 https://bugs.webkit.org/show_bug.cgi?id=55305
1469 <rdar://problem/9044356>
1471 Always initialize the receivedPolicyAction reply parameter.
1473 * UIProcess/WebPageProxy.cpp:
1474 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1475 (WebKit::WebPageProxy::decidePolicyForMIMEType):
1477 2011-02-26 Anders Carlsson <andersca@apple.com>
1479 Reviewed by Sam Weinig.
1481 DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
1482 https://bugs.webkit.org/show_bug.cgi?id=55304
1484 * UIProcess/API/mac/PDFViewController.h:
1485 * UIProcess/API/mac/PDFViewController.mm:
1486 (WebKit::PDFViewController::setPDFDocumentData):
1487 * UIProcess/API/mac/PageClientImpl.h:
1488 * UIProcess/API/mac/PageClientImpl.mm:
1489 (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
1490 * UIProcess/API/mac/WKView.mm:
1491 (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
1492 * UIProcess/API/mac/WKViewInternal.h:
1493 * UIProcess/API/qt/qwkpage.cpp:
1494 (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
1495 * UIProcess/API/qt/qwkpage_p.h:
1496 * UIProcess/PageClient.h:
1497 * UIProcess/WebPageProxy.cpp:
1498 (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
1499 * UIProcess/WebPageProxy.h:
1500 * UIProcess/WebPageProxy.messages.in:
1501 * UIProcess/win/WebView.cpp:
1502 (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
1503 * UIProcess/win/WebView.h:
1504 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1505 (WebKit::WebFrameLoaderClient::finishedLoading):
1507 2011-02-26 Anders Carlsson <andersca@apple.com>
1509 Reviewed by Oliver Hunt.
1511 DrawingArea should not be reference counted
1512 https://bugs.webkit.org/show_bug.cgi?id=55284
1514 * Shared/DrawingAreaInfo.h:
1515 * Shared/WebPageCreationParameters.cpp:
1516 (WebKit::WebPageCreationParameters::encode):
1517 (WebKit::WebPageCreationParameters::decode):
1518 * Shared/WebPageCreationParameters.h:
1519 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1520 (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
1521 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
1522 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
1523 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
1524 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1525 * UIProcess/DrawingAreaProxy.cpp:
1526 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1527 * UIProcess/DrawingAreaProxy.h:
1528 (WebKit::DrawingAreaProxy::type):
1529 * UIProcess/DrawingAreaProxyImpl.cpp:
1530 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1531 * UIProcess/DrawingAreaProxyImpl.h:
1532 * UIProcess/TiledDrawingAreaProxy.cpp:
1533 (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
1534 * UIProcess/TiledDrawingAreaProxy.h:
1535 * UIProcess/WebPageProxy.cpp:
1536 (WebKit::WebPageProxy::didReceiveSyncMessage):
1537 (WebKit::WebPageProxy::creationParameters):
1538 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1539 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1540 (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1541 (WebKit::ChunkedUpdateDrawingArea::display):
1542 (WebKit::ChunkedUpdateDrawingArea::setSize):
1543 (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1544 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1545 * WebProcess/WebPage/DrawingArea.cpp:
1546 (WebKit::DrawingArea::create):
1547 (WebKit::DrawingArea::DrawingArea):
1548 * WebProcess/WebPage/DrawingArea.h:
1549 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1550 (WebKit::DrawingAreaImpl::create):
1551 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1552 * WebProcess/WebPage/DrawingAreaImpl.h:
1553 * WebProcess/WebPage/TiledDrawingArea.cpp:
1554 (WebKit::TiledDrawingArea::TiledDrawingArea):
1555 * WebProcess/WebPage/TiledDrawingArea.h:
1556 * WebProcess/WebPage/WebPage.cpp:
1557 (WebKit::WebPage::drawRect):
1558 * WebProcess/WebPage/WebPage.h:
1560 2011-02-26 Vsevolod Vlasov <vsevik@chromium.org>
1562 Reviewed by Pavel Feldman.
1564 DumpRenderTree should reset frame opener between tests.
1565 https://bugs.webkit.org/show_bug.cgi?id=54874
1567 Added clearOpener method to WKBundleWebFramePrivate.
1569 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1570 (WKBundleFrameClearOpener):
1571 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1573 2011-02-26 Yael Aharon <yael.aharon@nokia.com>
1575 Reviewed by Andreas Kling.
1577 [Qt] Fix the focus in MiniBrowser.
1578 https://bugs.webkit.org/show_bug.cgi?id=55288
1580 Implement basic functionality for focus in QWKPagePrivate.
1582 * UIProcess/API/qt/qwkpage.cpp:
1583 (QWKPagePrivate::isViewWindowActive):
1584 (QWKPagePrivate::isViewFocused):
1585 (QWKPagePrivate::isViewVisible):
1587 2011-02-26 Sheriff Bot <webkit.review.bot@gmail.com>
1589 Unreviewed, rolling out r79764.
1590 http://trac.webkit.org/changeset/79764
1591 https://bugs.webkit.org/show_bug.cgi?id=55295
1593 "broke Chromium builds" (Requested by rniwa on #webkit).
1595 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1596 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1598 2011-02-26 Vsevolod Vlasov <vsevik@chromium.org>
1600 Reviewed by Pavel Feldman.
1602 DumpRenderTree should reset frame opener between tests.
1603 https://bugs.webkit.org/show_bug.cgi?id=54874
1605 Added clearOpener method to WKBundleWebFramePrivate.
1607 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1608 (WKBundleFrameClearOpener):
1609 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1611 2011-02-25 Anders Carlsson <andersca@apple.com>
1613 Reviewed by Darin Adler.
1615 Plug-in process crashes when using GuardMalloc
1616 https://bugs.webkit.org/show_bug.cgi?id=55279
1617 <rdar://problem/9044618>
1619 Update m_environmentPointer after copying the environment variables.
1621 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1622 (WebKit::EnvironmentVariables::copyEnvironmentVariables):
1624 2011-02-25 Darin Adler <darin@apple.com>
1626 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1627 (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.
1629 2011-02-25 Darin Adler <darin@apple.com>
1631 Reviewed by Mark Rowe.
1633 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1634 (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
1635 builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.
1637 2011-02-25 Darin Adler <darin@apple.com>
1639 Reviewed by Anders Carlsson.
1641 <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set
1643 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1644 (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
1645 the strings here because they are allocated with fastMalloc, not new.
1646 (WebKit::EnvironmentVariables::set): Use const more.
1647 (WebKit::EnvironmentVariables::get): Ditto.
1648 (WebKit::EnvironmentVariables::appendValue): Ditto.
1649 (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
1650 where this would match if the name matched only a prefix of the environment variable's
1651 name. We want to match the whole name, so we need to use memcmp, not strncmp.
1652 (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
1653 (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
1654 for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
1655 ensuring we can pick up other frameworks from the same directory in the web process.
1656 Use a const_cast instead of a C-style cast.
1658 2011-02-25 Chris Fleizach <cfleizach@apple.com>
1660 Reviewed by Anders Carlsson.
1662 AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
1663 https://bugs.webkit.org/show_bug.cgi?id=55277
1665 * UIProcess/API/mac/WKView.mm:
1666 (-[WKView accessibilityFocusedUIElement]):
1668 2011-02-25 Alexey Proskuryakov <ap@apple.com>
1670 Reviewed by Anders Carlsson.
1672 https://bugs.webkit.org/show_bug.cgi?id=55276
1673 WebPage::close() accesses "this" after it is destroyed.
1675 This was making many tests crash with GuardMalloc.
1677 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
1678 destroyed, not after.
1680 2011-02-25 Balazs Kelemen <kbalazs@webkit.org>
1683 Add missing sources to WebKit2API.pri.
1687 2011-02-25 Anders Carlsson <andersca@apple.com>
1689 Reviewed by Darin Adler.
1691 A WKView without a window will cause CG errors in the console
1692 https://bugs.webkit.org/show_bug.cgi?id=55264
1693 <rdar://problem/9044281>
1695 Check that the window has a valid window number before trying to get its graphics context.
1697 * UIProcess/API/mac/PageClientImpl.mm:
1698 (WebKit::PageClientImpl::containingWindowGraphicsContext):
1700 2011-02-25 Brian Weinstein <bweinstein@apple.com>
1702 Reviewed by Brady Eidson and looked over by Jessie Berlin.
1704 WebKit2: Need a way to manage cookies from the web process
1705 https://bugs.webkit.org/show_bug.cgi?id=55086
1707 Call through to WebCore::CookieJar in our WebCookieManager functions.
1709 * WebProcess/Cookies/WebCookieManager.cpp:
1710 (WebKit::WebCookieManager::getHostnamesWithCookies):
1711 (WebKit::WebCookieManager::deleteCookiesForHostname):
1712 (WebKit::WebCookieManager::deleteAllCookies):
1714 2011-02-25 Anders Carlsson <andersca@apple.com>
1716 Reviewed by Sam Weinig.
1718 Option-clicking on links doesn't download them due to sandbox violation
1719 https://bugs.webkit.org/show_bug.cgi?id=55250
1720 <rdar://problem/9018359>
1722 The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
1723 decided policy was "Download". Fix this by passing along the download ID back to the web process.
1725 * Platform/CoreIPC/HandleMessage.h:
1726 (CoreIPC::callMemberFunction):
1729 * UIProcess/WebPageProxy.cpp:
1730 (WebKit::WebPageProxy::WebPageProxy):
1731 Initialize m_syncNavigationActionPolicyDownloadID.
1733 (WebKit::WebPageProxy::receivedPolicyDecision):
1734 Set m_syncNavigationActionPolicyDownloadID to the download ID.
1736 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1737 Return the m_syncNavigationActionPolicyDownloadID.
1739 * UIProcess/WebPageProxy.h:
1740 * UIProcess/WebPageProxy.messages.in:
1741 Add a DownloadID reply parameter.
1743 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1744 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1745 Don't pass a zero download ID to didReceivePolicyDecision.
1747 2011-02-25 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com> and Alejandro G. Castro <alex@igalia.com>
1749 Reviewed by Martin Robinson.
1751 [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
1752 https://bugs.webkit.org/show_bug.cgi?id=48510
1755 * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
1756 and constructors, in our case we need it because we use a pointer
1758 (WebKit::NativeWebKeyboardEvent::nativeEvent):
1759 * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
1760 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
1761 to copy the event in the constructor to avoid two references to
1763 * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
1764 functions to add const, we need it for the NativeWebKeyboardEvent
1766 (WebKit::modifiersForEvent):
1767 (WebKit::WebEventFactory::createWebKeyboardEvent):
1768 * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
1769 for GTK port. Yet to implement.
1770 (WebKit::WebContext::applicationCacheDirectory):
1771 (WebKit::WebContext::platformInitializeWebProcess):
1772 (WebKit::WebContext::platformDefaultDatabaseDirectory):
1773 * UIProcess/gtk/WebView.cpp:
1774 (WebKit::WebView::handleKeyboardEvent):
1776 2011-02-25 Anders Carlsson <andersca@apple.com>
1778 Reviewed by Sam Weinig.
1780 Get rid of more old accelerated compositing code
1781 https://bugs.webkit.org/show_bug.cgi?id=55235
1783 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
1784 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1785 * UIProcess/DrawingAreaProxy.h:
1786 * UIProcess/DrawingAreaProxyImpl.cpp:
1787 * UIProcess/DrawingAreaProxyImpl.h:
1788 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1789 * WebProcess/WebPage/DrawingArea.h:
1790 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1791 * WebProcess/WebPage/DrawingAreaImpl.h:
1793 2011-02-25 Andras Becsi <abecsi@webkit.org>
1795 Reviewed by Csaba Osztrogonác.
1797 [Qt] Make the WebKit2 build system less confusing for non-Qt developers
1798 https://bugs.webkit.org/show_bug.cgi?id=55213
1800 * WebKit2API.pri: Added.
1802 2011-02-25 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com> and Alejandro G. Castro <alex@igalia.com>
1804 Reviewed by Martin Robinson.
1806 [GTK] Implement WebView and WebKitWebView classes for WebKit2
1807 https://bugs.webkit.org/show_bug.cgi?id=48509
1810 * UIProcess/API/C/gtk/WKView.cpp:
1811 * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
1813 * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
1814 for WebView. The GObject is the GtkWidget handle which is used by
1815 WebView class for GTK port.
1816 * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
1817 declarations for GtkWidget handle for GTK port.
1818 * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
1819 for GTK port which is associated with each WKViewRef.
1820 * UIProcess/gtk/WebView.h: Added. Class which implements the
1821 PageClient interface. It is a wrapper over the native GtkWidget
1822 handle associated with each WKViewRef for GTK port.
1824 2011-02-25 Alejandro G. Castro <alex@igalia.com>
1826 Fix GTK compilation after r79654.
1830 2011-02-24 Brian Weinstein <bweinstein@apple.com>
1836 2011-02-24 Brady Eidson <beidson@apple.com>
1838 Reviewed by Sam Weinig and looked over by Brian Weinstein.
1840 Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
1841 Need WebKit2 API to view/manage origins with LocalStorage.
1847 * WebKit2.xcodeproj/project.pbxproj:
1848 * win/WebKit2.vcproj:
1849 * win/WebKit2Common.vsprops:
1850 * win/WebKit2Generated.make:
1852 WK2 derived sources and API stuff:
1853 * DerivedSources.make:
1854 * DerivedSources.pro:
1855 * Platform/CoreIPC/MessageID.h:
1856 * Shared/API/c/WKBase.h:
1857 * Shared/APIObject.h:
1858 * UIProcess/API/C/WKAPICast.h:
1860 Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
1861 * UIProcess/WebContext.cpp:
1862 (WebKit::WebContext::WebContext):
1863 (WebKit::WebContext::~WebContext):
1864 (WebKit::WebContext::disconnectProcess):
1865 (WebKit::WebContext::didReceiveMessage):
1866 * UIProcess/WebContext.h:
1867 (WebKit::WebContext::keyValueStorageManagerProxy):
1869 Add API to get the KeyValueStorageManager for a context:
1870 * UIProcess/API/C/WKContext.cpp:
1871 (WKContextGetKeyValueStorageManager):
1872 * UIProcess/API/C/WKContext.h:
1874 Route messages to the right place:
1875 * UIProcess/WebProcessProxy.cpp:
1876 (WebKit::WebProcessProxy::didReceiveMessage):
1877 * WebProcess/WebProcess.cpp:
1878 (WebKit::WebProcess::didReceiveMessage):
1880 Add the API object, which wraps to WebKeyValueStorageManagerProxy:
1881 * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
1882 (WKKeyValueStorageManagerGetTypeID):
1883 (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1884 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1885 (WKKeyValueStorageManagerDeleteAllEntries):
1886 * UIProcess/API/C/WKKeyValueStorageManager.h: Added.
1888 The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
1889 * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
1890 (WebKit::WebKeyValueStorageManagerProxy::create):
1891 (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
1892 (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
1893 (WebKit::WebKeyValueStorageManagerProxy::invalidate):
1894 (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
1895 (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1896 (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
1897 (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
1898 (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
1899 * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
1900 (WebKit::WebKeyValueStorageManagerProxy::clearContext):
1901 (WebKit::WebKeyValueStorageManagerProxy::type):
1902 * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.
1904 The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
1905 * WebProcess/KeyValueStorage: Added.
1906 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
1907 (WebKit::WebKeyValueStorageManager::shared):
1908 (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
1909 (WebKit::WebKeyValueStorageManager::didReceiveMessage):
1910 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1911 (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1912 (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1913 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
1914 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.
1916 2011-02-24 Darin Adler <darin@apple.com>
1918 Reviewed by Anders Carlsson.
1920 WebKit2: Image-based cursors do not work
1921 https://bugs.webkit.org/show_bug.cgi?id=55184
1923 * Shared/ShareableBitmap.h: Added releaseData function
1924 declaration. This is only defined for CG, but we can declare
1925 it without defining it on non-CG platforms without causing problems.
1927 * Shared/WebCoreArgumentCoders.cpp: Added.
1928 (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
1929 (CoreIPC::decodeImage): Ditto.
1931 * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
1932 and decoder to handle image-based cursors, using the new encodeImage
1933 and decodeImage functions.
1935 * Shared/cg/ShareableBitmapCG.cpp:
1936 (WebKit::ShareableBitmap::releaseData): Added.
1937 (WebKit::ShareableBitmap::createGraphicsContext): Use
1938 CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
1939 to guarantee we outlast the CGBitmapContext we create.
1940 (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.
1942 * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
1943 (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.
1945 * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
1946 and WebCoreArgumentCodersCG.cpp.
1947 * win/WebKit2.vcproj: Ditto.
1949 2011-02-24 Anders Carlsson <andersca@apple.com>
1951 Reviewed by Dan Bernstein.
1953 Crash when trying to send a sync message on an invalid connection
1954 https://bugs.webkit.org/show_bug.cgi?id=55190
1955 <rdar://problem/9035806>
1957 * Platform/CoreIPC/Connection.cpp:
1958 (CoreIPC::Connection::sendSyncMessage):
1959 Don't try to call a client function if isValid() returns false since the client
1960 will be null in that case.
1962 2011-02-24 Anders Carlsson <andersca@apple.com>
1964 Reviewed by Dan Bernstein.
1966 Remove the layer backed drawing area
1967 https://bugs.webkit.org/show_bug.cgi?id=55174
1970 * Shared/DrawingAreaInfo.h:
1971 * UIProcess/API/mac/WKView.mm:
1972 * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
1973 * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
1974 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
1975 * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
1976 * UIProcess/win/WebView.cpp:
1977 * WebKit2.xcodeproj/project.pbxproj:
1978 * WebProcess/WebPage/DrawingArea.cpp:
1979 (WebKit::DrawingArea::create):
1980 * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
1981 * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
1982 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
1983 * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
1984 * win/WebKit2.vcproj:
1986 2011-02-24 Mike Thole <mthole@apple.com>
1988 Reviewed by Sam Weinig.
1990 WK2: Add ability to get document node for a WKBundleNodeHandle
1991 https://bugs.webkit.org/post_bug.cgi
1993 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1994 (WKBundleNodeHandleCopyDocument):
1995 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1996 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1997 (WebKit::InjectedBundleNodeHandle::document):
1998 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2000 2011-02-24 Brady Eidson <beidson@apple.com>
2002 Reviewed by Adam Roben and looked at by Brian Weinstein.
2004 https://bugs.webkit.org/show_bug.cgi?id=55165
2005 Can call CF API with a null CFArray in WebResourceCacheManager
2007 * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2008 (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef,
2009 so the call to CFArrayGetCount must be null checked.
2011 2011-02-24 Anders Carlsson <andersca@apple.com>
2013 Reviewed by Simon Fraser.
2015 ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
2016 https://bugs.webkit.org/show_bug.cgi?id=55162
2017 <rdar://problem/9048523>
2019 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2020 (WebKit::DrawingAreaImpl::updateState):
2021 Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
2022 EnterAcceleratedCompositingMode message.
2024 (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2025 setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
2027 * WebProcess/WebPage/LayerTreeHost.h:
2028 * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2029 * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2030 (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
2031 Make this take a boolean.
2033 2011-02-24 Peter Kasting <pkasting@google.com>
2035 Reviewed by Eric Seidel.
2037 Drop the "U; " encryption level from the User Agent string.
2038 https://bugs.webkit.org/show_bug.cgi?id=54566
2040 * UIProcess/gtk/WebPageProxyGtk.cpp:
2041 (WebKit::WebPageProxy::standardUserAgent):
2042 * UIProcess/mac/WebPageProxyMac.mm:
2043 (WebKit::WebPageProxy::standardUserAgent):
2044 * UIProcess/qt/WebPageProxyQt.cpp:
2045 (WebKit::WebPageProxy::standardUserAgent):
2046 * UIProcess/win/WebPageProxyWin.cpp:
2047 (WebKit::WebPageProxy::standardUserAgent):
2049 2011-02-24 Andrew Wilson <atwilson@chromium.org>
2051 Unreviewed, rolling out r79570.
2052 http://trac.webkit.org/changeset/79570
2053 https://bugs.webkit.org/show_bug.cgi?id=54874
2055 Breaks chromium build because glue/mocks/mock_web_frame.h/cc
2058 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2059 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2061 2011-02-23 Brian Weinstein <bweinstein@apple.com>
2063 Reviewed by Adam Roben and looked over by Jessie Berlin.
2065 Part of WebKit2: Need a way to manage cookies from the web process
2066 https://bugs.webkit.org/show_bug.cgi?id=55086
2068 This patch adds the plumbing and classes that are needed to manage cookies from the web process.
2069 The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
2071 Project file changes.
2072 * DerivedSources.make:
2073 * DerivedSources.pro:
2077 * WebKit2.xcodeproj/project.pbxproj:
2078 * win/WebKit2.vcproj:
2079 * win/WebKit2Common.vsprops:
2080 * win/WebKit2Generated.make:
2082 Add some needed plumbing for WebCookieManager{Proxy}.
2083 * Platform/CoreIPC/MessageID.h:
2084 * Shared/API/c/WKBase.h:
2085 * Shared/APIObject.h:
2086 * UIProcess/API/C/WKAPICast.h:
2088 * UIProcess/API/C/WKContext.cpp:
2089 (WKContextGetCookieManager): Gets the cookie manager proxy.
2090 * UIProcess/API/C/WKContext.h:
2091 * UIProcess/API/C/WKCookieManager.cpp: Added.
2092 (WKCookieManagerGetTypeID):
2093 (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
2094 (WKCookieManagerDeleteCookiesForHostname): Ditto.
2095 (WKCookieManagerDeleteAllCookies): Ditto.
2096 * UIProcess/API/C/WKCookieManager.h: Added.
2098 * UIProcess/WebProcessProxy.cpp:
2099 (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
2100 * UIProcess/WebContext.cpp:
2101 (WebKit::WebContext::WebContext): Initialize the cookie manager.
2102 (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
2103 (WebKit::WebContext::disconnectProcess): Ditto.
2104 (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
2105 * UIProcess/WebContext.h:
2106 (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
2107 * WebProcess/WebProcess.cpp:
2108 (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
2110 * UIProcess/WebCookieManagerProxy.cpp: Added.
2111 (WebKit::WebCookieManagerProxy::create):
2112 (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2113 (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
2114 (WebKit::WebCookieManagerProxy::invalidate):
2115 (WebKit::WebCookieManagerProxy::didReceiveMessage):
2116 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
2117 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
2118 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
2120 (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
2121 * UIProcess/WebCookieManagerProxy.h: Added.
2122 (WebKit::WebCookieManagerProxy::clearContext):
2123 (WebKit::WebCookieManagerProxy::type):
2124 * UIProcess/WebCookieManagerProxy.messages.in: Added.
2126 * WebProcess/Cookies: Added.
2127 * WebProcess/Cookies/WebCookieManager.cpp: Added.
2128 (WebKit::WebCookieManager::shared):
2129 (WebKit::WebCookieManager::WebCookieManager):
2130 (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
2131 (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and
2132 convert that HashSet to a Vector to send to the UI process.
2133 (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
2134 (WebKit::WebCookieManager::deleteAllCookies): Ditto.
2135 * WebProcess/Cookies/WebCookieManager.h: Added.
2136 * WebProcess/Cookies/WebCookieManager.messages.in: Added.
2138 2011-02-24 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com> and Alejandro G. Castro <alex@igalia.com>
2140 Reviewed by Martin Robinson.
2142 [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
2143 https://bugs.webkit.org/show_bug.cgi?id=48510
2146 * Shared/gtk/WebEventFactory.cpp: Added. implementation for
2147 WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
2148 * Shared/gtk/WebEventFactory.h: Added.
2149 * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
2150 implementation for GTK port.
2152 2011-02-24 Vsevolod Vlasov <vsevik@chromium.org>
2154 Reviewed by Alexey Proskuryakov.
2156 DumpRenderTree should reset frame opener between tests.
2157 https://bugs.webkit.org/show_bug.cgi?id=54874
2159 Added clearOpener method to WKBundleWebFramePrivate.
2161 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2162 (WKBundleFrameClearOpener):
2163 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2165 2011-02-24 Benjamin Poulain <benjamin.poulain@nokia.com>
2167 Reviewed by Eric Seidel.
2169 Support building WebKit with Python 3
2170 https://bugs.webkit.org/show_bug.cgi?id=55038
2172 Update the generator scripts to support Python 3.
2174 * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
2175 sys.stdout to be compatible with Python 2 and 3.
2176 * Scripts/generate-messages-header.py:
2177 * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
2178 to dict.items which is common to Python 2 and 3.
2180 2011-02-24 Andras Becsi <abecsi@webkit.org>
2182 Reviewed by Laszlo Gombos.
2184 [Qt] MinGW build fails to link
2185 https://bugs.webkit.org/show_bug.cgi?id=55050
2187 Prepend the libraries of subcomponents instead of appending them
2188 to fix the library order according to the dependency of the libraries
2192 2011-02-24 Andras Becsi <abecsi@webkit.org>
2194 Reviewed by Csaba Osztrogonác.
2196 [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
2197 https://bugs.webkit.org/show_bug.cgi?id=47589
2199 In case of file name clashes only generate forwarding header for the current platform.
2201 * Scripts/generate-forwarding-headers.pl:
2203 2011-02-23 Anders Carlsson <andersca@apple.com>
2205 Reviewed by Sam Weinig.
2207 Remove some of the old accelerated compositing code
2208 https://bugs.webkit.org/show_bug.cgi?id=55084
2210 * UIProcess/API/mac/PageClientImpl.h:
2211 * UIProcess/API/mac/PageClientImpl.mm:
2212 (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
2213 * UIProcess/API/mac/WKView.mm:
2214 * UIProcess/API/mac/WKViewInternal.h:
2215 * UIProcess/API/qt/qwkpage_p.h:
2216 * UIProcess/PageClient.h:
2217 * UIProcess/WebPageProxy.cpp:
2218 (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
2219 * UIProcess/WebPageProxy.h:
2220 * UIProcess/WebPageProxy.messages.in:
2221 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
2222 (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
2223 (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
2224 * UIProcess/win/WebView.cpp:
2225 * UIProcess/win/WebView.h:
2226 * WebProcess/WebPage/WebPage.cpp:
2227 (WebKit::WebPage::enterAcceleratedCompositingMode):
2228 (WebKit::WebPage::exitAcceleratedCompositingMode):
2229 * WebProcess/WebPage/WebPage.h:
2231 2011-02-23 Enrica Casucci <enrica@apple.com>
2233 Reverting an unintentional change that was part of http://trac.webkit.org/changeset/79494.
2236 * WebProcess/WebPage/mac/WebPageMac.mm:
2237 (WebKit::WebPage::interceptEditingKeyboardEvent):
2239 2011-02-18 Enrica Casucci <enrica@apple.com>
2241 Reviewed by Adam Roben.
2243 Mac OS X Services are not available for selected text in WebKit2 windows.
2244 https://bugs.webkit.org/show_bug.cgi?id=54777
2245 <rdar://problem/8666428>
2247 This patch adds support for Mac OS X Services in WebKit2 windows.
2248 In WKView we now call registerServicesMenuSendTypes providing the
2249 pasteboard types supported by WebKit and we also implement the two
2250 protocol methods required to validate the send type and write the
2251 content to the pasteboard. Unfortunately, AppKit expects the content
2252 to be available in the pasteboard upon return from writeSelectionToPasteboard and
2253 this is the reason why the call to the WebProcess is synchronous.
2255 * Shared/SelectionState.h:
2256 (WebKit::SelectionState::SelectionState): Extended to include
2257 isContentRichlyEditable
2258 * Shared/mac/PasteboardTypes.h:
2259 * Shared/mac/PasteboardTypes.mm:
2260 (WebKit::PasteboardTypes::forSelection): Added.
2261 * UIProcess/API/mac/WKView.mm:
2262 (-[WKView initWithFrame:contextRef:pageGroupRef:]): Added call
2263 to registerServicesMenuSendTypes.
2264 (-[WKView writeSelectionToPasteboard:types:]): Added.
2265 (-[WKView validRequestorForSendType:returnType:]): Added.
2266 * UIProcess/WebPageProxy.cpp:
2267 (WebKit::WebPageProxy::writeSelectionToPasteboard):
2268 * UIProcess/WebPageProxy.h:
2269 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2270 (WebKit::WebEditorClient::respondToChangedSelection): Modified to
2271 support the new SelectionState value.
2272 * WebProcess/WebPage/WebPage.h:
2273 * WebProcess/WebPage/WebPage.messages.in:
2274 * WebProcess/WebPage/mac/WebPageMac.mm:
2275 (WebKit::WebPage::writeSelectionToPasteboard): Added synchronous
2276 message to write the selected content to the pasteboard.
2278 2011-02-23 Anders Carlsson <andersca@apple.com>
2280 Reviewed by Sam Weinig.
2282 Add a ShareableBitmap::create overload that takes an existing SharedMemory object
2283 https://bugs.webkit.org/show_bug.cgi?id=55081
2285 * Shared/ShareableBitmap.cpp:
2286 (WebKit::ShareableBitmap::createShareable):
2287 (WebKit::ShareableBitmap::create):
2288 * Shared/ShareableBitmap.h:
2290 2011-02-23 Anders Carlsson <andersca@apple.com>
2292 Reviewed by Dan Bernstein.
2294 Web Inspector toolbar looks bad in WebKit2
2295 https://bugs.webkit.org/show_bug.cgi?id=55076
2296 <rdar://problem/8866258>
2298 * UIProcess/API/mac/WKView.mm:
2299 (-[WKView mouseDownCanMoveWindow]):
2300 Return NO from mouseDownCanMoveWindow to prevent drags in the (now transparent) inspector WKView
2301 from dragging the window around.
2303 * UIProcess/mac/WebInspectorProxyMac.mm:
2304 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2305 Call [WKView setDrawsBackground:NO].
2307 2011-02-23 Sam Weinig <sam@webkit.org>
2309 Reviewed by Anders Carlsson.
2311 Remove WKPageForceRepaintWithInvalidation and instead make WKPageForceRepaint
2312 always dirty the entire page.
2314 * Shared/ForceRepaintFlags.h: Removed.
2315 * UIProcess/API/C/WKPage.cpp:
2316 (WKPageForceRepaint):
2317 * UIProcess/API/C/WKPage.h:
2318 * UIProcess/WebPageProxy.cpp:
2319 (WebKit::WebPageProxy::forceRepaint):
2320 * UIProcess/WebPageProxy.h:
2322 * WebKit2.xcodeproj/project.pbxproj:
2323 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2324 (WebKit::DrawingAreaImpl::forceRepaint):
2325 * WebProcess/WebPage/WebPage.cpp:
2326 (WebKit::WebPage::forceRepaint):
2327 * WebProcess/WebPage/WebPage.h:
2328 * WebProcess/WebPage/WebPage.messages.in:
2329 * win/WebKit2.vcproj:
2331 2011-02-23 Anders Carlsson <andersca@apple.com>
2333 Reviewed by Sam Weinig.
2335 Race condition when creating and destroying pages quickly
2336 https://bugs.webkit.org/show_bug.cgi?id=55061
2337 <rdar://problem/8708435>
2339 When the last page in a web process is closed, the web process would
2340 previously terminate, even if the UI process had created a new page
2341 (the CreateNewPage message just wouldn't have reached the web process yet).
2343 Fix this by adding a ShouldTerminate message that the web process sends when it's
2344 about to terminate. If the UI process has any pending pages, downloads etc. it will
2345 prevent the web process from terminating. Otherwise, it will immmediately disconnect
2346 the WebPageProxy so that creating a page after that will launch a new web process.
2348 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2349 (WebKit::WebPluginSiteDataManager::shouldTerminate):
2350 * UIProcess/Plugins/WebPluginSiteDataManager.h:
2351 * UIProcess/WebContext.cpp:
2352 (WebKit::WebContext::shouldTerminate):
2353 (WebKit::WebContext::disconnectProcess):
2354 * UIProcess/WebContext.h:
2355 * UIProcess/WebProcessProxy.cpp:
2356 (WebKit::WebProcessProxy::disconnect):
2357 (WebKit::WebProcessProxy::didReceiveSyncMessage):
2358 (WebKit::WebProcessProxy::didClose):
2359 (WebKit::WebProcessProxy::shouldTerminate):
2360 * UIProcess/WebProcessProxy.h:
2361 * UIProcess/WebProcessProxy.messages.in:
2362 * WebProcess/WebProcess.cpp:
2363 (WebKit::WebProcess::terminateIfPossible):
2365 2011-02-23 Mike Thole <mthole@apple.com>
2367 Reviewed by Darin Adler.
2369 WKBundleNavigationAction.h should be exposed as a public header
2370 https://bugs.webkit.org/show_bug.cgi?id=55059
2372 * WebKit2.xcodeproj/project.pbxproj:
2373 Changed WKBundleNavigationAction.h from 'project' to 'public'.
2375 2011-02-23 Siddharth Mathur <siddharth.mathur@nokia.com>
2377 Reviewed by Laszlo Gombos.
2379 [Qt] Make sure Symbian binary UIDs are unique
2381 * WebProcess.pro: Resolve the UID collision with QtTestBrowser.pro
2382 by changing the UID.
2384 2011-02-23 Siddharth Mathur <siddharth.mathur@nokia.com>
2386 Reviewed by Laszlo Gombos.
2388 [Qt] Fix the Symbian build after r79334
2389 https://bugs.webkit.org/show_bug.cgi?id=55044
2391 * WebKit2.pri: Copy the rules from JavaScriptCore.pri for
2394 Remove addWebKit2LibWholeArchive as it is no longer needed.
2396 2011-02-23 Alejandro G. Castro <alex@igalia.com>
2398 Unreviewed, fixed GTK WebKit2 compilation after r79366.
2402 2011-02-23 Patrick Gansterer <paroga@webkit.org>
2404 Reviewed by Darin Adler.
2406 Rename PLATFORM(CF) to USE(CF)
2407 https://bugs.webkit.org/show_bug.cgi?id=53540
2409 * UIProcess/WebBackForwardList.h:
2410 * UIProcess/WebPageProxy.cpp:
2411 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2412 (WebKit::formatLocalizedString):
2414 2011-02-23 Benjamin Poulain <benjamin.poulain@nokia.com>
2416 Reviewed by Andreas Kling.
2418 [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
2419 https://bugs.webkit.org/show_bug.cgi?id=54996
2421 Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
2422 is empty/contain only disabled elements.
2424 * UIProcess/API/qt/qgraphicswkview.cpp:
2425 (QGraphicsWKView::showContextMenu):
2426 * UIProcess/qt/WebContextMenuProxyQt.cpp:
2427 (WebKit::WebContextMenuProxyQt::showContextMenu):
2429 2011-02-22 Dan Bernstein <mitz@apple.com>
2431 LLVM Compiler build fix.
2433 * Scripts/webkit2/messages.py:
2434 * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
2436 2011-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2438 Reviewed by Alexey Proskuryakov.
2440 Drop the language tag part from the User Agent string
2441 https://bugs.webkit.org/show_bug.cgi?id=54560
2443 * UIProcess/gtk/WebPageProxyGtk.cpp:
2444 (WebKit::WebPageProxy::standardUserAgent):
2446 * UIProcess/mac/WebPageProxyMac.mm:
2447 (WebKit::WebPageProxy::standardUserAgent):
2449 * UIProcess/qt/WebPageProxyQt.cpp:
2450 (WebKit::WebPageProxy::standardUserAgent):
2452 * UIProcess/win/WebPageProxyWin.cpp:
2453 (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
2456 2011-02-22 Sam Weinig <sam@webkit.org>
2458 Reviewed by Anders Carlsson.
2460 Add WebKit2 API to force a repaint with an invalidation
2461 https://bugs.webkit.org/show_bug.cgi?id=55015
2463 * Shared/ForceRepaintFlags.h: Added.
2464 * UIProcess/API/C/WKPage.cpp:
2465 (WKPageForceRepaint):
2466 (WKPageForceRepaintWithInvalidation):
2467 * UIProcess/API/C/WKPage.h:
2468 Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
2469 but also calls setNeedsDisplay on the entire bounds of the page.
2471 * UIProcess/WebPageProxy.cpp:
2472 (WebKit::WebPageProxy::forceRepaint):
2473 * UIProcess/WebPageProxy.h:
2474 * WebProcess/WebPage/WebPage.cpp:
2475 (WebKit::WebPage::forceRepaint):
2476 * WebProcess/WebPage/WebPage.h:
2477 * WebProcess/WebPage/WebPage.messages.in:
2478 Pipe the flag down to the WebProcess.
2481 * WebKit2.xcodeproj/project.pbxproj:
2482 * win/WebKit2.vcproj:
2483 Add ForceRepaintFlags.h.
2485 2011-02-22 Simon Fraser <simon.fraser@apple.com>
2487 Reviewed by Dan Bernstein.
2489 <rdar://problem/9039670>
2491 Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
2492 non-composited content layer if the preference is set.
2494 * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2495 (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2497 2011-02-22 Brady Eidson <beidson@apple.com>
2499 Fix it Windows-style.
2501 * WebProcess/WebProcess.cpp:
2502 (WebKit::WebProcess::getSitesWithPluginData):
2503 (WebKit::WebProcess::clearPluginSiteData):
2505 2011-02-22 Anders Carlsson <andersca@apple.com>
2507 Reviewed by Dan Bernstein.
2509 Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
2510 https://bugs.webkit.org/show_bug.cgi?id=55008
2512 * WebProcess/Downloads/DownloadManager.cpp:
2513 (WebKit::DownloadManager::downloadFinished):
2514 * WebProcess/WebProcess.cpp:
2515 (WebKit::WebProcess::removeWebPage):
2516 (WebKit::WebProcess::terminateIfPossible):
2517 (WebKit::WebProcess::getSitesWithPluginData):
2518 * WebProcess/WebProcess.h:
2519 * WebProcess/gtk/WebProcessGtk.cpp:
2520 (WebKit::WebProcess::platformTerminate):
2521 * WebProcess/mac/WebProcessMac.mm:
2522 (WebKit::WebProcess::platformTerminate):
2523 * WebProcess/qt/WebProcessQt.cpp:
2524 (WebKit::WebProcess::platformTerminate):
2525 * WebProcess/win/WebProcessWin.cpp:
2526 (WebKit::WebProcess::platformTerminate):
2528 2011-02-22 Brady Eidson <beidson@apple.com>
2530 Windows build-fix attempt.
2532 * win/WebKit2Generated.make:
2534 2011-02-22 Csaba Osztrogonác <ossy@webkit.org>
2538 <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
2539 API to view and delete Application Cache data by origin.
2541 [Qt][WK2] Buildfix after r79364.
2543 * DerivedSources.pro:
2546 2011-02-22 Brady Eidson <beidson@apple.com>
2548 Reviewed by Anders Carlsson and looked over by Brian Weinstein.
2550 <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
2551 API to view and delete Application Cache data by origin.
2553 I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
2554 it's sorting was wrong due to a last minute name change.
2556 Project file changes:
2558 * win/WebKit2.vcproj:
2559 * win/WebKit2Common.vsprops:
2560 * win/WebKit2Generated.make:
2562 * WebKit2.xcodeproj/project.pbxproj:
2564 WK2 build-system and API paperwork:
2565 * DerivedSources.make:
2566 * Platform/CoreIPC/MessageID.h:
2567 * Shared/API/c/WKBase.h:
2568 * Shared/APIObject.h:
2569 * UIProcess/API/C/WKAPICast.h:
2571 Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
2572 * Shared/SecurityOriginData.cpp:
2573 (WebKit::performAPICallbackWithSecurityOriginDataVector):
2574 * Shared/SecurityOriginData.h:
2575 * UIProcess/WebResourceCacheManagerProxy.cpp:
2576 (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2578 Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
2579 * UIProcess/WebContext.cpp:
2580 (WebKit::WebContext::WebContext):
2581 (WebKit::WebContext::~WebContext):
2582 (WebKit::WebContext::processDidClose):
2583 (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
2584 * UIProcess/WebContext.h:
2585 (WebKit::WebContext::applicationCacheManagerProxy):
2586 (WebKit::WebContext::resourceCacheManagerProxy):
2588 Add API to get the ApplicationCacheManager for a context:
2589 * UIProcess/API/C/WKContext.cpp:
2590 (WKContextGetApplicationCacheManager):
2591 (WKContextGetResourceCacheManager):
2592 * UIProcess/API/C/WKContext.h:
2594 Route messages to the right place:
2595 * UIProcess/WebProcessProxy.cpp:
2596 (WebKit::WebProcessProxy::didReceiveMessage):
2597 * WebProcess/WebProcess.cpp:
2598 (WebKit::WebProcess::didReceiveMessage):
2600 Add the API object, which wraps to WebApplicationCacheManagerProxy:
2601 * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
2602 (WKApplicationCacheManagerGetTypeID):
2603 (WKApplicationCacheManagerGetApplicationCacheOrigins):
2604 (WKApplicationCacheManagerDeleteEntriesForOrigin):
2605 (WKApplicationCacheManagerDeleteAllEntries):
2606 * UIProcess/API/C/WKApplicationCacheManager.h: Added.
2608 The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
2609 * UIProcess/WebApplicationCacheManagerProxy.cpp: Added.
2610 (WebKit::WebApplicationCacheManagerProxy::create):
2611 (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
2612 (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy):
2613 (WebKit::WebApplicationCacheManagerProxy::invalidate):
2614 (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
2615 (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
2616 (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2617 (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
2618 (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
2619 * UIProcess/WebApplicationCacheManagerProxy.h: Added.
2620 (WebKit::WebApplicationCacheManagerProxy::clearContext):
2621 (WebKit::WebApplicationCacheManagerProxy::type):
2622 * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added.
2624 The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
2625 * WebProcess/ApplicationCache: Added.
2626 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added.
2627 (WebKit::WebApplicationCacheManager::shared):
2628 (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
2629 (WebKit::WebApplicationCacheManager::didReceiveMessage):
2630 (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
2631 (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
2632 (WebKit::WebApplicationCacheManager::deleteAllEntries):
2633 * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added.
2634 * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added.
2636 2011-02-22 Anders Carlsson <andersca@apple.com>
2638 Reviewed by Sam Weinig.
2640 Get rid of WebProcessManager
2641 https://bugs.webkit.org/show_bug.cgi?id=55001
2643 WebProcessManager had become a stupid map of WebContext > WebProcess relations,
2644 which isn't really useful since the WebContext already knows about its process.
2646 * Shared/WebURLRequest.cpp:
2647 * UIProcess/API/mac/WKView.mm:
2648 * UIProcess/WebContext.cpp:
2649 (WebKit::WebContext::~WebContext):
2650 (WebKit::WebContext::ensureWebProcess):
2651 (WebKit::WebContext::processDidFinishLaunching):
2652 * UIProcess/WebProcessManager.cpp: Removed.
2653 * UIProcess/WebProcessManager.h: Removed.
2654 * UIProcess/WebProcessProxy.cpp:
2655 (WebKit::WebProcessProxy::didClose):
2657 * WebKit2.xcodeproj/project.pbxproj:
2658 * win/WebKit2.vcproj:
2660 2011-02-22 Anders Carlsson <andersca@apple.com>
2662 Reviewed by Darin Adler.
2664 Get rid of WebProcessManager::getAllWebProcessContexts
2665 https://bugs.webkit.org/show_bug.cgi?id=55000
2667 * Shared/WebURLRequest.cpp:
2668 (WebKit::WebURLRequest::setDefaultTimeoutInterval):
2669 Call WebContext::allContexts instead.
2671 * UIProcess/WebContext.cpp:
2672 * UIProcess/WebContext.h:
2673 Add a vector of WebContext objects. Update it when creating and destroying contexts.
2675 * UIProcess/WebProcessManager.cpp:
2676 * UIProcess/WebProcessManager.h:
2677 Remove WebProcessManager::getAllWebProcessContexts.
2679 2011-02-22 Sam Weinig <sam@webkit.org>
2681 Reviewed by Anders Carlsson.
2683 Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents
2684 a crash running fast/loader/empty-embed-src-attribute.html. This matches a
2685 bail out in the default policy delegate in WebKit1.
2687 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2688 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2690 2011-02-22 Anders Carlsson <andersca@apple.com>
2692 Reviewed by Dan Bernstein.
2694 Grammar correction from Spelling & Grammar window doesn't work
2695 https://bugs.webkit.org/show_bug.cgi?id=54982
2696 <rdar://problem/8940918>
2698 * UIProcess/API/mac/WKView.mm:
2699 (-[WKView isGrammarCheckingEnabled]):
2700 (-[WKView setGrammarCheckingEnabled:]):
2701 Call down to the text checker.
2703 * UIProcess/TextChecker.h:
2704 Add updateSpellingUIWithGrammarString.
2706 * UIProcess/WebPageProxy.cpp:
2707 (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
2708 Call TextChecker::updateSpellingUIWithGrammarString.
2710 * UIProcess/WebPageProxy.messages.in:
2711 Add UpdateSpellingUIWithGrammarString message.
2713 * UIProcess/gtk/TextCheckerGtk.cpp:
2714 (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2715 * UIProcess/qt/TextCheckerQt.cpp:
2716 (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2717 * UIProcess/win/TextCheckerWin.cpp:
2718 (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2721 * UIProcess/mac/TextCheckerMac.mm:
2722 (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2723 Update the spelling panel.
2725 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2726 (WebKit::WebEditorClient::updateSpellingUIWithGrammarString):
2727 Send an UpdateSpellingUIWithGrammarString message to the UI process.
2729 2011-02-22 Balazs Kelemen <kbalazs@webkit.org>
2731 Reviewed by Anders Carlsson.
2733 notImplemented() should behave identical in WebCore and WebKit2
2734 https://bugs.webkit.org/show_bug.cgi?id=54449
2736 Use NotImplemented.h from WebCore. Initialize logging channels.
2737 Remove the WebKit2 concept of notImplemented().
2739 * Platform/gtk/SharedMemoryGtk.cpp:
2740 * Platform/gtk/WorkQueueGtk.cpp:
2741 * Platform/qt/WorkQueueQt.cpp:
2742 * Platform/win/WorkQueueWin.cpp:
2743 * Shared/NotImplemented.h: Removed.
2744 * Shared/Plugins/NPIdentifierData.cpp:
2745 * Shared/Plugins/NPRemoteObjectMap.cpp:
2746 * Shared/Plugins/NPVariantData.cpp:
2747 * Shared/cairo/ShareableBitmapCairo.cpp:
2748 * Shared/gtk/ShareableBitmapGtk.cpp:
2749 * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2750 * Shared/qt/WebCoreArgumentCodersQt.cpp:
2751 * Shared/win/LayerTreeContextWin.cpp:
2752 * UIProcess/API/mac/PageClientImpl.mm:
2753 * UIProcess/API/qt/qwkpage.cpp:
2754 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2755 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2756 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2757 * UIProcess/WebContext.cpp:
2758 (WebKit::WebContext::WebContext):
2759 * UIProcess/WebInspectorProxy.cpp:
2760 * UIProcess/gtk/TextCheckerGtk.cpp:
2761 * UIProcess/gtk/WebInspectorGtk.cpp:
2762 * UIProcess/gtk/WebPreferencesGtk.cpp:
2763 * UIProcess/qt/TextCheckerQt.cpp:
2764 * UIProcess/qt/WebInspectorProxyQt.cpp:
2765 * UIProcess/win/TextCheckerWin.cpp:
2766 * UIProcess/win/WebContextMenuProxyWin.cpp:
2768 * WebKit2.xcodeproj/project.pbxproj:
2769 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2770 * WebProcess/Downloads/curl/DownloadCurl.cpp:
2771 * WebProcess/Downloads/mac/DownloadMac.mm:
2772 * WebProcess/Downloads/qt/DownloadQt.cpp:
2773 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2774 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2775 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2776 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2777 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2778 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2779 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2780 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2781 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2782 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2783 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2784 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2785 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2786 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2787 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2788 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2789 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2790 * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2791 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2792 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2793 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2794 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2795 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2796 * WebProcess/WebProcess.cpp:
2797 (WebKit::WebProcess::WebProcess):
2798 * WebProcess/gtk/WebProcessGtk.cpp:
2800 * win/WebKit2.vcproj:
2802 2011-02-22 Brian Weinstein <bweinstein@apple.com>
2804 Rubber-stamped by Brady Eidson.
2806 Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.
2808 * UIProcess/WebContext.cpp:
2809 (WebKit::WebContext::processDidClose):
2811 2011-02-21 Adam Roben <aroben@apple.com>
2813 Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process
2815 This will be useful for sending repeated messages for the same state ID to the web process.
2816 We don't do this currently, but will need to if we're asked to paint after we've thrown away
2817 our backing store to save memory.
2819 Fixes <http://webkit.org/b/54916> DrawingAreaProxyImpl should keep track of the state ID it
2820 last sent to the web process
2822 Reviewed by Anders Carlsson.
2824 * UIProcess/DrawingAreaProxyImpl.cpp:
2825 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and
2826 reordered member initialization to match the new declaration order.
2827 (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got
2828 from the web process is no newer than the most recent one we requested.
2829 (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send
2830 m_requestedStateID instead of a new global stateID.
2832 * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before
2833 other data members. Also beefed the comment explaining m_currentStateID.
2835 2011-02-22 Andras Becsi <abecsi@webkit.org>
2837 Reviewed by Laszlo Gombos.
2839 [Qt] Redesign the build system
2840 https://bugs.webkit.org/show_bug.cgi?id=51339
2844 Build WebCore as a static library, compile the WebKit API and WebKit2 API
2845 in a final step and link to WebKit2, WebCore and JSC libraries to fix
2846 linking issues resulting from stripped away symbols.
2848 * WebKit2.pri: Add include paths.
2849 * WebKit2.pro: Move include paths to WebKit2.pri and move
2850 the API source to WebKit/qt/QtWebKit.pro
2852 2011-02-22 Benjamin Poulain <benjamin.poulain@nokia.com>
2854 Reviewed by Kenneth Rohde Christiansen.
2856 [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2
2857 https://bugs.webkit.org/show_bug.cgi?id=54902
2859 Refactor the context menu handling of Qt to make it simpler to manage memory.
2861 WebContextMenuProxyQt uses smart pointer for all the references to menu so
2862 there is no need to delete it explicitely.
2864 Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so
2865 the client can choose to handle the memory, but there is no leak if it does not.
2867 * UIProcess/API/qt/qgraphicswkview.cpp:
2868 (QGraphicsWKView::QGraphicsWKView):
2869 (QGraphicsWKView::showContextMenu):
2870 * UIProcess/API/qt/qgraphicswkview.h:
2871 * UIProcess/API/qt/qwkpage.h:
2872 * UIProcess/qt/WebContextMenuProxyQt.cpp:
2873 (WebKit::WebContextMenuProxyQt::showContextMenu):
2874 (WebKit::WebContextMenuProxyQt::createContextMenu):
2875 * UIProcess/qt/WebContextMenuProxyQt.h:
2877 2011-02-22 Philippe Normand <pnormand@igalia.com>
2879 Reviewed by Xan Lopez.
2881 [GTK] make distcheck fails
2882 https://bugs.webkit.org/show_bug.cgi?id=54943
2884 Removed reference to NotImplemented.h which was removed.
2888 2011-02-22 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2890 Reviewed by Kenneth Rohde Christiansen.
2892 [Qt] QtWebProcess should be installed with 'make install'
2893 https://bugs.webkit.org/show_bug.cgi?id=44100
2895 Follow the standard in other project files and allow install
2896 location to be changed with INSTALL_BINS variable.
2898 * WebProcess.pro: Install QtWebProcess.
2900 2011-02-22 Sheriff Bot <webkit.review.bot@gmail.com>
2902 Unreviewed, rolling out r79296.
2903 http://trac.webkit.org/changeset/79296
2904 https://bugs.webkit.org/show_bug.cgi?id=54941
2906 Breaks compilation on SnowLeapard Intel Release (Requested by
2907 kbalazs_ on #webkit).
2909 * Platform/gtk/SharedMemoryGtk.cpp:
2910 * Platform/gtk/WorkQueueGtk.cpp:
2911 * Platform/qt/WorkQueueQt.cpp:
2912 * Platform/win/WorkQueueWin.cpp:
2913 * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
2914 * Shared/Plugins/NPIdentifierData.cpp:
2915 * Shared/Plugins/NPRemoteObjectMap.cpp:
2916 * Shared/Plugins/NPVariantData.cpp:
2917 * Shared/cairo/ShareableBitmapCairo.cpp:
2918 * Shared/gtk/ShareableBitmapGtk.cpp:
2919 * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2920 * Shared/qt/WebCoreArgumentCodersQt.cpp:
2921 * Shared/win/LayerTreeContextWin.cpp:
2922 * UIProcess/API/mac/PageClientImpl.mm:
2923 * UIProcess/API/qt/qwkpage.cpp:
2924 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2925 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2926 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2927 * UIProcess/WebContext.cpp:
2928 (WebKit::WebContext::WebContext):
2929 * UIProcess/WebInspectorProxy.cpp:
2930 * UIProcess/gtk/TextCheckerGtk.cpp:
2931 * UIProcess/gtk/WebInspectorGtk.cpp:
2932 * UIProcess/gtk/WebPreferencesGtk.cpp:
2933 * UIProcess/qt/TextCheckerQt.cpp:
2934 * UIProcess/qt/WebInspectorProxyQt.cpp:
2935 * UIProcess/win/TextCheckerWin.cpp:
2936 * UIProcess/win/WebContextMenuProxyWin.cpp:
2938 * WebKit2.xcodeproj/project.pbxproj:
2939 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2940 * WebProcess/Downloads/curl/DownloadCurl.cpp:
2941 * WebProcess/Downloads/mac/DownloadMac.mm:
2942 * WebProcess/Downloads/qt/DownloadQt.cpp:
2943 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2944 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2945 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2946 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2947 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2948 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2949 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2950 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2951 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2952 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2953 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2954 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2955 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2956 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2957 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2958 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2959 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2960 * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2961 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2962 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2963 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2964 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2965 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2966 * WebProcess/WebProcess.cpp:
2967 (WebKit::WebProcess::WebProcess):
2968 * WebProcess/gtk/WebProcessGtk.cpp:
2970 * win/WebKit2.vcproj:
2972 2011-02-16 Balazs Kelemen <kbalazs@webkit.org>
2974 Reviewed by Anders Carlsson.
2976 notImplemented() should behave identical in WebCore and WebKit2
2977 https://bugs.webkit.org/show_bug.cgi?id=54449
2979 Use NotImplemented.h from WebCore. Initialize logging channels.
2980 Remove the WebKit2 concept of notImplemented().
2982 * Platform/gtk/SharedMemoryGtk.cpp:
2983 * Platform/gtk/WorkQueueGtk.cpp:
2984 * Platform/qt/WorkQueueQt.cpp:
2985 * Platform/win/WorkQueueWin.cpp:
2986 * Shared/NotImplemented.h: Removed.
2987 * Shared/Plugins/NPIdentifierData.cpp:
2988 * Shared/Plugins/NPRemoteObjectMap.cpp:
2989 * Shared/Plugins/NPVariantData.cpp:
2990 * Shared/cairo/ShareableBitmapCairo.cpp:
2991 * Shared/gtk/ShareableBitmapGtk.cpp:
2992 * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2993 * Shared/qt/WebCoreArgumentCodersQt.cpp:
2994 * Shared/win/LayerTreeContextWin.cpp:
2995 * UIProcess/API/qt/qwkpage.cpp:
2996 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2997 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2998 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2999 * UIProcess/WebContext.cpp:
3000 (WebKit::WebContext::WebContext):
3001 * UIProcess/WebInspectorProxy.cpp:
3002 * UIProcess/gtk/TextCheckerGtk.cpp:
3003 * UIProcess/gtk/WebInspectorGtk.cpp:
3004 * UIProcess/gtk/WebPreferencesGtk.cpp:
3005 * UIProcess/qt/TextCheckerQt.cpp:
3006 * UIProcess/qt/WebInspectorProxyQt.cpp:
3007 * UIProcess/win/TextCheckerWin.cpp:
3008 * UIProcess/win/WebContextMenuProxyWin.cpp:
3010 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3011 * WebProcess/Downloads/curl/DownloadCurl.cpp:
3012 * WebProcess/Downloads/mac/DownloadMac.mm:
3013 * WebProcess/Downloads/qt/DownloadQt.cpp:
3014 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
3015 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3016 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3017 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3018 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3019 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3020 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
3021 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3022 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3023 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3024 * WebProcess/WebCoreSupport/WebDragClient.cpp:
3025 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3026 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3027 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3028 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3029 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3030 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
3031 * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
3032 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3033 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3034 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
3035 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3036 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3037 * WebProcess/WebProcess.cpp:
3038 (WebKit::WebProcess::WebProcess):
3039 * WebProcess/gtk/WebProcessGtk.cpp:
3041 2011-02-21 Timothy Hatcher <timothy@apple.com>
3043 Set and update the window title for the Web Inspector in WebKit2.
3045 https://webkit.org/b/50945
3046 rdar://problem/8762410
3048 Reviewed by Adam Roben.
3050 * UIProcess/WebInspectorProxy.cpp:
3051 (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged.
3052 * UIProcess/WebInspectorProxy.h:
3053 * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged.
3054 * UIProcess/mac/WebInspectorProxyMac.mm:
3055 (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
3056 * UIProcess/win/WebInspectorProxyWin.cpp:
3057 (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
3058 * UIProcess/gtk/WebInspectorGtk.cpp:
3059 (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
3060 * UIProcess/qt/WebInspectorProxyQt.cpp:
3061 (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
3062 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3063 (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged.
3064 * WebProcess/WebPage/WebInspector.cpp:
3065 (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message.
3066 * WebProcess/WebPage/WebInspector.h:
3068 2011-02-21 Sam Weinig <sam@webkit.org>
3070 Reviewed by Anders Carlsson.
3072 Can't paste from 3rd party text editor into WebKit2 window.
3073 <rdar://problem/8978624>
3075 * WebProcess/com.apple.WebProcess.sb:
3077 2011-02-21 Anders Carlsson <andersca@apple.com>
3079 Reviewed by Dan Bernstein.
3081 Initialize DrawingAreaProxy::m_size
3082 https://bugs.webkit.org/show_bug.cgi?id=54913
3084 This was removed in r76962 since it caused flashes when switching drawing areas due to
3085 entering and exiting composited mode, but since we no longer switch drawing areas we can
3088 * UIProcess/DrawingAreaProxy.cpp:
3089 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3091 2011-02-21 Adam Roben <aroben@apple.com>
3093 Add some assertions about the state IDs we receive from the web process
3095 Rubber-stamped by Anders Carlsson.
3097 * UIProcess/DrawingAreaProxyImpl.cpp:
3098 (WebKit::DrawingAreaProxyImpl::update):
3099 (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3100 (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
3101 Assert that the state ID the web process sent us is no newer than our own state ID.
3103 2011-02-21 Adam Roben <aroben@apple.com>
3105 Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID".
3107 As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes
3108 all operations performed before that state change to become invalid. Currently, this state
3109 consists of a single piece of data: the view's size. Eventually it will encompass more data
3110 (e.g., the backing store we're drawing into; when we start throwing away the backing store
3111 to save memory, our state will have changed, and any operations that were intended for the
3112 old backing store will have become invalid). r79251 effectively transformed
3113 DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl
3114 sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's
3117 This patch is just a set of simple renames to reflect the transformation that r79251
3118 effected. It should not introduce any changes in behavior. The renames are:
3119 - Messages::DrawingArea::SetSize -> UpdateState
3120 - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState
3121 - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID
3122 - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState
3123 - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState
3124 - DrawingAreaImpl::m_inSetSize -> m_inUpdateState
3125 - generateSequenceNumber -> generateStateID
3126 - sequenceNumber -> stateID
3128 Fixes <http://webkit.org/b/54911> DrawingArea[Proxy]Impl's "sequence number" concept should
3129 be renamed to "state ID"
3131 Reviewed by Anders Carlsson.
3133 * UIProcess/DrawingAreaProxy.h:
3134 * UIProcess/DrawingAreaProxy.messages.in:
3135 * UIProcess/DrawingAreaProxyImpl.cpp:
3136 * UIProcess/DrawingAreaProxyImpl.h:
3137 * WebProcess/WebPage/DrawingArea.h:
3138 * WebProcess/WebPage/DrawingArea.messages.in:
3139 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3140 * WebProcess/WebPage/DrawingAreaImpl.h:
3141 Performed the renames described above.
3143 2011-02-21 Alexey Proskuryakov <ap@apple.com>
3145 Reviewed by Adam Roben.
3147 REGRESSION (WebKit2): HTTP requests time out after 60 seconds
3148 https://bugs.webkit.org/show_bug.cgi?id=54755
3149 <rdar://problem/9006592>
3151 * Shared/API/c/WKURLRequest.cpp:
3152 (WKURLRequestSetDefaultTimeoutInterval):
3153 * Shared/API/c/WKURLRequest.h:
3154 Added an API to set a default timeout interval for requests created from URLs. The API
3155 affects both the UI process and requests created internally by the Web process. Requests
3156 created from NSURLRequest or CFURLRequest take timeout from those.
3158 * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval):
3159 * Shared/WebURLRequest.h:
3160 Pipe the default timeout interval from WKURLRequest down to actual implementation. Since
3161 WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects
3162 NSURLRequest default timeout interval.
3164 * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts):
3165 * UIProcess/WebProcessManager.h:
3166 Added a way to enumerate all contexts running in separate processes.
3168 * Shared/WebProcessCreationParameters.cpp:
3169 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3170 (WebKit::WebProcessCreationParameters::encode):
3171 (WebKit::WebProcessCreationParameters::decode):
3172 * Shared/WebProcessCreationParameters.h:
3173 (WebKit::WebContext::ensureWebProcess):
3174 (WebKit::WebContext::setDefaultRequestTimeoutInterval):
3175 * UIProcess/WebContext.h:
3176 * WebProcess/WebProcess.cpp:
3177 (WebKit::WebProcess::initializeWebProcess):
3178 (WebKit::WebProcess::setDefaultRequestTimeoutInterval):
3179 * WebProcess/WebProcess.h:
3180 * WebProcess/WebProcess.messages.in:
3181 Use UI process default timeout interval in separate process contexts, too.
3183 2011-02-18 Brian Weinstein <bweinstein@apple.com>
3185 Reviewed by Adam Roben.
3187 WebResourceCacheManager should be responsible for managing the CFURLCache as well
3188 as the WebCore memory cache.
3189 https://bugs.webkit.org/show_bug.cgi?id=54886
3190 Part of <rdar://problem/8971738>
3192 * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3193 (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add
3194 create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache.
3195 (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for
3196 the origin's hostname.
3197 * WebProcess/ResourceCache/WebResourceCacheManager.h:
3199 * WebProcess/ResourceCache/cf: Added.
3200 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added.
3201 (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface.
3202 (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto.
3204 * win/WebKit2.vcproj: Added new file.
3205 * WebKit2.xcodeproj/project.pbxproj: Ditto.
3207 2011-02-21 Adam Roben <aroben@apple.com>
3209 Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl
3211 DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed
3212 before that state change to become invalid. When painting, we need to have performed at
3213 least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits
3216 Currently, this state consists of a single piece of data: the view's size. Whenever the
3217 state (i.e., size) changes, we tell the web process via the SetSize message, and the web
3218 process lets us know that it has updated to match the new state (i.e., size) via the
3221 When it's time to paint, if we're waiting for the web process to update to match our current
3222 state (i.e., size), we block for a little while hoping to receive a DidSetSize message so
3223 that we can paint up-to-date bits into the window. This can cause us to receive messages
3224 out-of-order; the DidSetSize message will be processed immediately, and any messages that
3225 were sent before the DidSetSize message will be processed later. Since the messages from
3226 before the DidSetSize message correspond to an old state (i.e., size), they are no longer
3227 useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so
3230 The way we identify and discard these messages is by keeping track of a sequence number.
3231 Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to
3232 DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize
3233 message, it records the sequence number that came along with it. If we then later receive
3234 any messages that have a lower sequence number, we know they correspond to an old state
3235 (i.e., size) and can discard them.
3237 This patch moves control of the sequence number to DrawingAreaProxyImpl.
3238 DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize
3239 message. DrawingAreaImpl records this sequence number when it receives the SetSize message,
3240 and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same
3243 This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a
3244 full backing store update (by incrementing the sequence number) at times other than when the
3245 view's size changes (e.g., after it has thrown away its backing store in order to save
3248 Fixes <http://webkit.org/b/54907> DrawingAreaProxyImpl should tell DrawingAreaImpl what
3249 sequence number to use
3251 Reviewed by Anders Carlsson.
3253 * UIProcess/DrawingAreaProxyImpl.cpp:
3254 (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp.
3255 (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the
3257 (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a
3258 potential improvement.
3260 * WebProcess/WebPage/DrawingArea.h:
3261 (WebKit::DrawingArea::setSize): Updated to match the message's new parameters.
3263 * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize.
3265 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3266 (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber.
3267 (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process.
3269 (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
3270 (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
3271 (WebKit::DrawingAreaImpl::display):
3272 Send m_sequenceNumber, instead of a new sequence number, back to the UI process.
3274 * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to
3275 match the base class.
3277 2011-02-21 Gavin Barraclough <barraclough@apple.com>
3279 Reviewed by Sam Weinig.
3281 Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
3283 The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
3284 containing a pointer to its parent class. These links should reflect the inheritance
3285 hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
3286 entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
3287 since intervening C++ classes may not have ClassInfo - but would be a potential bug
3288 were ClassInfo were to be added.
3290 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3292 2011-02-21 Balazs Kelemen <kbalazs@webkit.org>
3294 Reviewed by Kenneth Rohde Christiansen.
3296 [Qt] Implement WorkQueue::sheduleWorkAfterDelay
3297 https://bugs.webkit.org/show_bug.cgi?id=54878
3299 * Platform/qt/WorkQueueQt.cpp:
3300 (WorkQueue::scheduleWorkAfterDelay):
3302 2011-02-20 Alejandro G. Castro <alex@igalia.com>
3304 Reviewed by Martin Robinson.
3306 [GTK] Add WebResourceCacheDataManager to the compilation after r78848
3307 https://bugs.webkit.org/show_bug.cgi?id=54732
3309 Added resource cache manager API to GTK+ compilation after r78848.
3313 2011-02-20 Sam Weinig <sam@webkit.org>
3315 Reviewed by Dan Bernstein.
3317 Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46
3318 <rdar://problem/8942726>
3320 * WebProcess/WebPage/WebPage.cpp:
3321 (WebKit::WebPage::goForward):
3322 (WebKit::WebPage::goBack):
3323 (WebKit::WebPage::goToBackForwardItem):
3324 Defend agains null HistoryItems.
3326 2011-02-20 Anders Carlsson <andersca@apple.com>
3328 Reviewed by Maciej Stachowiak.
3330 Crash when a plug-in requests a javascript: url that destroys the plug-in
3331 https://bugs.webkit.org/show_bug.cgi?id=54837
3332 <rdar://problem/9005475>
3334 * WebProcess/Plugins/PluginProxy.cpp:
3335 (WebKit::PluginProxy::destroy):
3336 Null out m_pluginController.
3338 * WebProcess/Plugins/PluginView.cpp:
3339 (WebKit::PluginView::performJavaScriptURLRequest):
3340 Don't access the frame through m_pluginElement since it will be nulled out
3341 when the plug-in is destroyed.
3343 2011-02-20 Anders Carlsson <andersca@apple.com>
3345 Reviewed by Sam Weinig.
3347 Fix another crash when a plug-in is destroyed when evaluating JavaScript
3348 https://bugs.webkit.org/show_bug.cgi?id=54834
3349 <rdar://problem/9005475>
3351 This contains three separate fixes:
3353 - In unprotectPluginFromDestruction we can't just destroy the plug-in once
3354 the count reaches zero, because the plug-in might still have code executing
3355 on the stack. To fix this we use a zero-delay timer to defer destruction
3358 - Trying to get the NPObject for the window using NPN_GetValue would return
3359 NPERR_NO_ERROR, even if the returned NPObject was null. Fix this to return
3360 NPERR_GENERIC_ERROR instead.
3362 - Protect the plug-in from destruction anytime an NPAPI call that sends a
3363 synchronous IPC message is made.
3365 * PluginProcess/PluginControllerProxy.cpp:
3366 (WebKit::PluginControllerProxy::PluginControllerProxy):
3367 (WebKit::PluginControllerProxy::destroy):
3368 (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
3369 * PluginProcess/PluginControllerProxy.h:
3370 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3371 (WebKit::PluginDestructionProtector::PluginDestructionProtector):
3372 (WebKit::NPN_GetValue):
3373 (WebKit::NPN_Evaluate):
3374 (WebKit::NPN_GetProperty):
3375 (WebKit::NPN_SetProperty):
3376 (WebKit::NPN_RemoveProperty):
3377 (WebKit::NPN_HasProperty):
3378 (WebKit::NPN_HasMethod):
3379 (WebKit::NPN_Enumerate):
3380 (WebKit::NPN_Construct):
3381 (WebKit::NPN_GetValueForURL):
3382 (WebKit::NPN_SetValueForURL):
3384 2011-02-19 Sam Weinig <sam@webkit.org>
3386 Reviewed by Anders Carlsson.
3388 Add phase in addition to momentumPhase to platform wheel events
3389 Part of <rdar://problem/8945362>
3391 Rename existing phase to momentumPhase.
3393 * Shared/WebEvent.h:
3394 (WebKit::WebWheelEvent::momentumPhase):
3395 * Shared/WebEventConversion.cpp:
3396 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
3397 * Shared/WebWheelEvent.cpp:
3398 (WebKit::WebWheelEvent::WebWheelEvent):
3399 (WebKit::WebWheelEvent::encode):
3400 (WebKit::WebWheelEvent::decode):
3401 * Shared/mac/WebEventFactory.mm:
3402 (WebKit::phaseForEvent):
3403 (WebKit::momentumPhaseForEvent):
3404 (WebKit::WebEventFactory::createWebWheelEvent):
3406 2011-02-19 Anders Carlsson <andersca@apple.com>
3408 Reviewed by Dan Bernstein.
3410 Crash when trying to take a snapshot of an uninitialized plug-in
3411 https://bugs.webkit.org/show_bug.cgi?id=54812
3413 * WebProcess/Plugins/PluginView.cpp:
3414 (WebKit::PluginView::notifyWidget):
3415 Don't try to create a snapshot of the plug-in if it hasn't been initialized.
3417 2011-02-18 Gavin Barraclough <barraclough@apple.com>
3419 Reviewed by Sam Weinig.
3421 Bug 54786 - Devirtualize JSCell::classInfo()
3423 Instead of making a virtual function call, add a pointer to the ClassInfo
3426 This removes a virtual function call, and paves the way towards removing all
3427 the createStructure methods, and StructureFlags/AnonymousSlotCount properties
3428 (these should be able to move onto ClassInfo).
3430 Calls to Structure::create must now pass a pointer to the ClassInfo for the
3431 structure. All objects now have a ClassInfo pointer, non-object cell types
3434 Changes are most mechanical, involving three steps:
3435 * Remove virtual classInfo() methods.
3436 * Add &s_info parameter to calls to Structure::create.
3437 * Rename ClassInfo static members on classes from 'info' to 's_info',
3440 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3441 (WebKit::JSNPMethod::JSNPMethod):
3442 * WebProcess/Plugins/Netscape/JSNPMethod.h:
3443 (WebKit::JSNPMethod::createStructure):
3444 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3445 (WebKit::JSNPObject::JSNPObject):
3446 * WebProcess/Plugins/Netscape/JSNPObject.h:
3447 (WebKit::JSNPObject::createStructure):
3449 2011-02-19 Sam Weinig <sam@webkit.org>
3451 Reviewed by Anders Carlsson.
3453 Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation
3455 * UIProcess/API/mac/WKView.mm:
3456 (-[WKView performDictionaryLookupAtCurrentMouseLocation]):
3457 * UIProcess/API/mac/WKViewPrivate.h:
3459 2011-02-19 Charlie Reis <creis@chromium.org>
3461 Reviewed by Mihai Parparita.
3463 Ensure loading has stopped in HistoryController::goToItem
3464 https://bugs.webkit.org/show_bug.cgi?id=54517
3466 Add a FrameLoaderClient callback for whether to stop loading before goToItem.
3468 Test: http/tests/navigation/forward-to-fragment-fires-onload.html
3470 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3471 (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
3472 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3474 2011-02-18 Sam Weinig <sam@webkit.org>
3476 Reviewed by Adele Peterson.