1 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3 Fixing a typo from a bad merge.
5 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
7 2011-01-17 Alexey Proskuryakov <ap@apple.com>
9 Reviewed by John Sullivan.
11 https://bugs.webkit.org/show_bug.cgi?id=52590
12 Should pass a frame into -[WKView canPrintHeadersAndFooters]
14 * UIProcess/API/mac/WKView.h:
15 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
16 to canChangeFrameLayout.
18 2011-01-17 Anders Carlsson <andersca@apple.com>
20 Reviewed by Sam Weinig.
22 Implement scrolling support
23 https://bugs.webkit.org/show_bug.cgi?id=52502
25 * Shared/UpdateInfo.cpp:
26 (WebKit::UpdateInfo::encode):
27 (WebKit::UpdateInfo::decode):
28 * Shared/UpdateInfo.h:
29 Add scrollRect and scrollDelta member variables.
31 * UIProcess/BackingStore.h:
32 Add scroll member function.
34 * UIProcess/DrawingAreaProxyImpl.cpp:
35 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
36 Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
38 * UIProcess/mac/BackingStoreMac.mm:
39 (WebKit::BackingStore::incorporateUpdate):
42 (WebKit::BackingStore::scroll):
43 Paint the backing store into itself.
45 * WebProcess/WebPage/DrawingAreaImpl.cpp:
46 (WebKit::DrawingAreaImpl::display):
47 Pass the scroll information in the update info.
49 2011-01-17 Andrey Kosyakov <caseq@chromium.org>
51 Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
54 * win/WebKit2GeneratedCommon.vsprops:
55 * win/WebKit2WebProcess.vcproj:
57 2011-01-17 Pavel Feldman <pfeldman@chromium.org>
59 Reviewed by Yury Semikhatsky.
61 Web Inspector: simplify debugger enabling routine.
62 https://bugs.webkit.org/show_bug.cgi?id=52472
64 * WebProcess/WebPage/WebInspector.cpp:
65 (WebKit::WebInspector::startJavaScriptDebugging):
67 2011-01-17 Balazs Kelemen <kbalazs@webkit.org>
69 Reviewed by Andreas Kling.
71 [Qt][WK2] Crash due to double destruction of QSharedMemory
72 https://bugs.webkit.org/show_bug.cgi?id=52569
74 Avoid deleting the QSharedMemory twice.
75 * Platform/qt/SharedMemoryQt.cpp:
76 (WebKit::SharedMemory::~SharedMemory):
77 * Shared/qt/CleanupHandler.cpp:
78 Renamed m_inDeleteObjects to m_hasStartedDeleting and
79 added a getter for it.
80 (WebKit::CleanupHandler::CleanupHandler):
81 (WebKit::CleanupHandler::deleteObjects):
82 * Shared/qt/CleanupHandler.h:
83 (WebKit::CleanupHandler::unmark):
84 (WebKit::CleanupHandler::hasStartedDeleting):
86 2011-01-15 Adam Barth <abarth@webkit.org>
88 Rubber-stamped by Eric Seidel.
90 Move WebKit2 into Source
91 https://bugs.webkit.org/show_bug.cgi?id=52438
98 * win/WebKit2WebProcess.vcproj:
100 2011-01-14 Yuzo Fujishima <yuzo@google.com>
102 Reviewed by Antti Koivisto.
104 Rename cache() to memoryCache()
105 https://bugs.webkit.org/show_bug.cgi?id=52433
107 * WebProcess/WebProcess.cpp:
108 (WebKit::WebProcess::shutdownIfPossible):
109 (WebKit::WebProcess::didClose):
110 * WebProcess/mac/WebProcessMac.mm:
111 (WebKit::WebProcess::platformSetCacheModel):
112 * WebProcess/win/WebProcessWin.cpp:
113 (WebKit::WebProcess::platformSetCacheModel):
115 2011-01-13 Geoffrey Garen <ggaren@apple.com>
117 Reviewed by Oliver Hunt.
119 Split out a MarkedSpace strategy object from Heap.
120 https://bugs.webkit.org/show_bug.cgi?id=52421
122 * Shared/mac/WebMemorySampler.mac.mm:
123 (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
125 2011-01-14 Anders Carlsson <andersca@apple.com>
127 Reviewed by Dan Bernstein.
129 Add a new PageClient::displayView function and expose it on WebPageProxy
130 https://bugs.webkit.org/show_bug.cgi?id=52500
132 * UIProcess/API/mac/PageClientImpl.h:
133 * UIProcess/API/mac/PageClientImpl.mm:
134 (WebKit::PageClientImpl::displayView):
135 * UIProcess/API/qt/qwkpage.cpp:
136 (QWKPagePrivate::displayView):
137 * UIProcess/API/qt/qwkpage_p.h:
138 * UIProcess/PageClient.h:
139 * UIProcess/WebPageProxy.cpp:
140 (WebKit::WebPageProxy::displayView):
141 * UIProcess/WebPageProxy.h:
142 * UIProcess/win/WebView.cpp:
143 (WebKit::WebView::displayView):
144 * UIProcess/win/WebView.h:
146 2011-01-14 Anders Carlsson <andersca@apple.com>
148 Reviewed by Sam Weinig.
150 Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
151 https://bugs.webkit.org/show_bug.cgi?id=52499
153 * WebProcess/WebPage/DrawingAreaImpl.cpp:
154 (WebKit::shouldPaintBoundsRect):
155 Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
157 (WebKit::DrawingAreaImpl::display):
158 If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
160 2011-01-14 Brian Weinstein <bweinstein@apple.com>
162 Reviewed by Geoff Garen.
164 ShouldLoadResourceForFrame should use strings, not URLs.
165 https://bugs.webkit.org/show_bug.cgi?id=52476
167 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
168 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
169 (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
170 a URL, and rename from subresourceURL to resourceURL.
172 2011-01-14 Anders Carlsson <andersca@apple.com>
174 Reviewed by Sam Weinig.
176 Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
178 Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
180 * Shared/WebProcessCreationParameters.cpp:
181 (WebKit::WebProcessCreationParameters::encode):
182 (WebKit::WebProcessCreationParameters::decode):
183 Encode and decode the uiProcessBundleResourcePath member variable.
185 * Shared/WebProcessCreationParameters.h:
186 Add uiProcessBundleResourcePath member variable.
188 * UIProcess/mac/WebContextMac.mm:
189 (WebKit::WebContext::platformInitializeWebProcess):
190 Set the uiProcessBundleResourcePath member variable.
192 * WebProcess/com.apple.WebProcess.sb:
193 Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
195 * WebProcess/mac/WebProcessMac.mm:
196 (WebKit::initializeSandbox):
197 When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
199 (WebKit::WebProcess::platformInitializeWebProcess):
200 Remove the code that would consume a sandbox extension for the url cache path.
202 2011-01-14 Anders Carlsson <andersca@apple.com>
204 Reviewed by Sam Weinig.
206 Delay initializing the sandbox until we get the InitializeWebProcess message.
208 * WebProcess/mac/WebProcessMac.mm:
209 (WebKit::initializeSandbox):
210 (WebKit::WebProcess::platformInitializeWebProcess):
211 * WebProcess/mac/WebProcessMainMac.mm:
212 (WebKit::WebProcessMain):
214 2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
216 Reviewed by Kenneth Rohde Christiansen.
218 Align import/export directives
219 https://bugs.webkit.org/show_bug.cgi?id=52208
221 * Shared/API/c/WKBase.h: Align import/export directives with
222 JavaScriptCore/API/JSBase.h.
224 2011-01-14 Pavel Feldman <pfeldman@chromium.org>
226 Reviewed by Yury Semikhatsky.
228 Web Inspector: extract InspectorSettings from InspectorState,
230 https://bugs.webkit.org/show_bug.cgi?id=52429
232 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
234 2011-01-13 Enrica Casucci <enrica@apple.com>
236 Reviewed by Darin Adler.
238 WebKit2: Add support for drag and drop
239 https://bugs.webkit.org/show_bug.cgi?id=52343
240 <rdar://problem/7660558>
242 This patch contains the changes required to support dropping content
243 in WebKit on the Mac. The DragData class has been extended to provide
244 additional context from the application (keyboard state, modal windows, etc.)
245 as well as information of the drag pasteboard being used.
246 The support for WebKit as drag source will be added with a separate patch.
248 * Shared/DragControllerAction.h: Added.
249 * UIProcess/API/mac/WKView.mm:
250 Added implemention of the methods required to add suport for a drop target.
251 To maintain asynchronous communication with the WebProcess, we always return
252 the previous calculated value for the drag operation.
253 (-[WKView _registerDraggedTypes]):
254 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
255 (-[WKView applicationFlags:]):
256 (-[WKView draggingEntered:]):
257 (-[WKView draggingUpdated:]):
258 (-[WKView draggingExited:]):
259 (-[WKView prepareForDragOperation:]):
260 (-[WKView performDragOperation:]):
261 * UIProcess/WebPageProxy.cpp:
262 (WebKit::WebPageProxy::WebPageProxy):
263 (WebKit::WebPageProxy::performDragControllerAction):
264 (WebKit::WebPageProxy::didPerformDragControllerAction):
265 * UIProcess/WebPageProxy.h:
266 (WebKit::WebPageProxy::dragOperation):
267 (WebKit::WebPageProxy::resetDragOperation):
268 * UIProcess/WebPageProxy.messages.in:
269 * WebKit2.xcodeproj/project.pbxproj:
270 * WebProcess/WebCoreSupport/WebDragClient.cpp:
271 (WebKit::WebDragClient::willPerformDragDestinationAction):
272 (WebKit::WebDragClient::willPerformDragSourceAction):
273 (WebKit::WebDragClient::actionMaskForDrag):
274 (WebKit::WebDragClient::dragSourceActionMaskForPoint):
275 (WebKit::WebDragClient::startDrag):
276 * WebProcess/WebPage/WebPage.cpp:
277 (WebKit::WebPage::performDragControllerAction):
278 * WebProcess/WebPage/WebPage.h:
279 * WebProcess/WebPage/WebPage.messages.in:
281 2011-01-13 Dan Bernstein <mitz@apple.com>
283 Reviewed by John Sullivan.
285 Incorrect assertion in DrawingAreaImpl::scroll()
286 https://bugs.webkit.org/show_bug.cgi?id=52376
288 * WebProcess/WebPage/DrawingAreaImpl.cpp:
289 (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
290 This made the assertion valid, but I removed it anyway.
292 2011-01-12 Balazs Kelemen <kbalazs@webkit.org>
296 Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
297 The argument is unused since http://trac.webkit.org/changeset/75468.
299 * UIProcess/API/qt/qgraphicswkview.cpp:
300 (QGraphicsWKView::QGraphicsWKView):
301 * UIProcess/API/qt/qwkpage.cpp:
302 (QWKPagePrivate::init):
303 * UIProcess/API/qt/qwkpage_p.h:
305 2011-01-12 Anders Carlsson <andersca@apple.com>
307 Reviewed by Sam Weinig.
309 Implement DrawingAreaImpl::scroll
310 https://bugs.webkit.org/show_bug.cgi?id=52346
312 * WebProcess/WebPage/DrawingAreaImpl.cpp:
313 (WebKit::DrawingAreaImpl::scroll):
314 If there is already an active scroll, compute the area of both scroll rects and
315 invalidate the smallest one. Compute a new dirty region if necessary and also
316 add the scroll repaint region to the dirty region.
318 (WebKit::DrawingAreaImpl::display):
319 Reset the scroll area and scroll delta.
321 * WebProcess/WebPage/DrawingAreaImpl.h:
322 Add scroll area and scroll delta member variables.
324 2011-01-12 Anders Carlsson <andersca@apple.com>
326 Reviewed by Dan Bernstein.
329 https://bugs.webkit.org/show_bug.cgi?id=52344
331 * Platform/Region.cpp:
332 (WebKit::Region::Shape::move):
333 (WebKit::Region::move):
334 Change Region::move to take an IntSize.
340 Add convenience functions.
342 2011-01-12 Ryosuke Niwa <rniwa@webkit.org>
344 Unreviewed Qt build fix for r75661
346 * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
348 2011-01-12 Beth Dakin <bdakin@apple.com>
350 Reviewed by Anders Carlsson.
352 Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
353 Expose fixed layout through WebKit SPI
355 <rdar://problem/8844464>
357 And now with getters!
358 * UIProcess/API/C/WKPage.cpp:
359 (WKPageUseFixedLayout):
360 (WKPageFixedLayoutSize):
361 * UIProcess/API/C/WKPage.h:
362 * UIProcess/WebPageProxy.h:
363 (WebKit::WebPageProxy::useFixedLayout):
364 (WebKit::WebPageProxy::fixedLayoutSize):
366 2011-01-12 Sam Weinig <sam@webkit.org>
368 Reviewed by Anders Carlsson.
370 https://bugs.webkit.org/show_bug.cgi?id=52337
371 PlatformWheelEvent should know about the scroll phase on the Mac
373 Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
376 (WebKit::WebWheelEvent::phase):
377 * Shared/WebEventConversion.cpp:
378 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
379 * Shared/WebWheelEvent.cpp:
380 (WebKit::WebWheelEvent::WebWheelEvent):
381 (WebKit::WebWheelEvent::encode):
382 (WebKit::WebWheelEvent::decode):
383 * Shared/mac/WebEventFactory.mm:
384 (WebKit::phaseForEvent):
385 (WebKit::WebEventFactory::createWebWheelEvent):
387 2011-01-12 Anders Carlsson <andersca@apple.com>
389 Reviewed by Sam Weinig.
391 Get rid of an unneeded parameter from DrawingArea::scroll
392 https://bugs.webkit.org/show_bug.cgi?id=52336
394 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
395 (WebKit::WebChromeClient::scroll):
396 * WebProcess/WebCoreSupport/WebChromeClient.h:
397 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
398 (WebKit::ChunkedUpdateDrawingArea::scroll):
399 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
400 * WebProcess/WebPage/DrawingArea.h:
401 * WebProcess/WebPage/DrawingAreaImpl.cpp:
402 (WebKit::DrawingAreaImpl::scroll):
403 * WebProcess/WebPage/DrawingAreaImpl.h:
404 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
405 (WebKit::LayerBackedDrawingArea::scroll):
406 * WebProcess/WebPage/LayerBackedDrawingArea.h:
407 * WebProcess/WebPage/TiledDrawingArea.cpp:
408 (WebKit::TiledDrawingArea::scroll):
409 * WebProcess/WebPage/TiledDrawingArea.h:
411 2011-01-12 Anders Carlsson <andersca@apple.com>
413 Reviewed by Sam Weinig.
415 Get the new drawing area painting to the screen
416 https://bugs.webkit.org/show_bug.cgi?id=52331
418 * UIProcess/DrawingAreaProxyImpl.cpp:
419 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
420 Call setViewNeedsDisplay on all the update rects.
422 * UIProcess/WebPageProxy.cpp:
423 (WebKit::WebPageProxy::setViewNeedsDisplay):
424 Call through to the page client.
426 (WebKit::WebPageProxy::processDidCrash):
427 Null out the drawing area proxy.
429 * UIProcess/mac/BackingStoreMac.mm:
430 (WebKit::BackingStore::paint):
433 2011-01-12 Anders Carlsson <andersca@apple.com>
435 Reviewed by Sam Weinig.
437 More work on getting the drawing area proxy to paint
438 https://bugs.webkit.org/show_bug.cgi?id=52328
440 * UIProcess/API/mac/WKView.mm:
441 (-[WKView drawRect:]):
442 Handle the new drawing area.
444 * UIProcess/BackingStore.cpp:
445 (WebKit::BackingStore::BackingStore):
446 Assert that the size isn't empty.
448 * UIProcess/BackingStore.h:
449 * UIProcess/mac/BackingStoreMac.mm:
450 (WebKit::BackingStore::incorporateUpdate):
451 Paint all update rects into the bitmap context.
453 * WebProcess/WebPage/DrawingAreaImpl.cpp:
454 (WebKit::DrawingAreaImpl::display):
455 Create a handle so the shareable bitmap will actually be transferred over.
457 2011-01-12 Anders Carlsson <andersca@apple.com>
461 * UIProcess/DrawingAreaProxyImpl.cpp:
462 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
464 2011-01-12 Anders Carlsson <andersca@apple.com>
466 Reviewed by Sam Weinig.
468 Begin stubbing out some more BackingStore member functions
469 https://bugs.webkit.org/show_bug.cgi?id=52323
471 * UIProcess/BackingStore.cpp:
472 (WebKit::BackingStore::~BackingStore):
473 This was accidentally made into a constructor; it should be a destructor.
475 * UIProcess/DrawingAreaProxyImpl.cpp:
476 (WebKit::DrawingAreaProxyImpl::paint):
477 Call the backing store.
479 (WebKit::DrawingAreaProxyImpl::update):
480 Incorporate the update.
482 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
483 Create the backing store if needed and incorporate the update.
485 * UIProcess/mac/BackingStoreMac.mm: Added.
486 (WebKit::BackingStore::platformInitialize):
487 Create a bitmap context.
489 (WebKit::BackingStore::paint):
490 (WebKit::BackingStore::incorporateUpdate):
493 * WebKit2.xcodeproj/project.pbxproj:
494 Add BackingStoreMac.mm
496 2011-01-12 Beth Dakin <bdakin@apple.com>
498 Reviewed by Anders Carlsson.
500 Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
501 fixed layout through WebKit SPI
503 <rdar://problem/8844464>
505 Store useFixedLayout and fixedLayoutSize in the
506 WebPageCreationParameters and the WebPageProxy.
507 * Shared/WebPageCreationParameters.cpp:
508 (WebKit::WebPageCreationParameters::encode):
509 (WebKit::WebPageCreationParameters::decode):
510 * Shared/WebPageCreationParameters.h:
511 * UIProcess/API/C/WKPage.cpp:
512 (WKPageSetUseFixedLayout):
513 (WKPageSetFixedLayoutSize):
514 * UIProcess/API/C/WKPage.h:
515 * UIProcess/WebPageProxy.cpp:
516 (WebKit::WebPageProxy::WebPageProxy):
517 (WebKit::WebPageProxy::setUseFixedLayout):
518 (WebKit::WebPageProxy::setFixedLayoutSize):
519 (WebKit::WebPageProxy::creationParameters):
520 * UIProcess/WebPageProxy.h:
521 * WebProcess/WebPage/WebPage.cpp:
522 (WebKit::WebPage::setUseFixedLayout):
523 (WebKit::WebPage::setFixedLayoutSize):
524 * WebProcess/WebPage/WebPage.h:
525 * WebProcess/WebPage/WebPage.messages.in:
527 2011-01-12 Anders Carlsson <andersca@apple.com>
529 Reviewed by Beth Dakin.
531 Add BackingStore class
532 https://bugs.webkit.org/show_bug.cgi?id=52318
534 * UIProcess/BackingStore.cpp: Added.
535 (WebKit::BackingStore::create):
536 (WebKit::BackingStore::BackingStore):
537 * UIProcess/BackingStore.h: Added.
538 * WebKit2.xcodeproj/project.pbxproj:
540 2011-01-12 Brady Eidson <beidson@apple.com>
542 Reviewed by Sam Weinig.
544 <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
545 Back/forward list recovery after a WebProcess crash is crashy itself.
547 Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
548 * Shared/SessionState.cpp:
549 (WebKit::SessionState::isEmpty):
550 * Shared/SessionState.h:
552 Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
553 * Shared/WebBackForwardListItem.cpp:
554 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
555 (WebKit::WebBackForwardListItem::highedUsedItemID):
556 * Shared/WebBackForwardListItem.h:
557 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
558 (WebKit::generateHistoryItemID):
559 (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
560 (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
561 now tells the WebProcess that a previous WebProcess created.
562 * WebProcess/WebPage/WebBackForwardListProxy.h:
564 Encode/decode data relevant to restoring a session on WebPage creation:
565 * Shared/WebPageCreationParameters.cpp:
566 (WebKit::WebPageCreationParameters::encode):
567 (WebKit::WebPageCreationParameters::decode):
568 * Shared/WebPageCreationParameters.h:
570 If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to
571 update the current back/forward item (if necessary) then relaunch the process:
572 * UIProcess/WebPageProxy.cpp:
573 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
574 (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
575 (WebKit::WebPageProxy::initializeWebPage):
576 (WebKit::WebPageProxy::loadURL):
577 (WebKit::WebPageProxy::loadURLRequest):
578 (WebKit::WebPageProxy::reload):
579 (WebKit::WebPageProxy::goForward):
580 (WebKit::WebPageProxy::goBack):
581 (WebKit::WebPageProxy::goToBackForwardItem):
582 (WebKit::WebPageProxy::creationParameters):
583 * UIProcess/WebPageProxy.h:
585 Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
586 * WebProcess/WebPage/WebPage.messages.in:
587 * UIProcess/cf/WebPageProxyCF.cpp:
588 (WebKit::WebPageProxy::restoreFromSessionStateData):
590 Restore a session on page creation if the parameters include it:
591 * WebProcess/WebPage/WebPage.cpp:
592 (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
593 (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
594 (WebKit::WebPage::restoreSession):
595 * WebProcess/WebPage/WebPage.h:
597 2011-01-12 Anders Carlsson <andersca@apple.com>
599 Reviewed by Sam Weinig.
601 Send Update and DidUpdate messages
602 https://bugs.webkit.org/show_bug.cgi?id=52316
604 * UIProcess/DrawingAreaProxy.h:
605 (WebKit::DrawingAreaProxy::update):
608 * UIProcess/DrawingAreaProxy.messages.in:
611 * UIProcess/DrawingAreaProxyImpl.cpp:
612 (WebKit::DrawingAreaProxyImpl::update):
613 Just send back a DidUpdate message.
615 * WebProcess/WebPage/DrawingArea.h:
616 (WebKit::DrawingArea::didUpdate):
619 * WebProcess/WebPage/DrawingArea.messages.in:
620 Add DidUpdate message.
622 * WebProcess/WebPage/DrawingAreaImpl.cpp:
623 (WebKit::DrawingAreaImpl::didUpdate):
626 (WebKit::DrawingAreaImpl::display):
627 Send an Update message.
629 2011-01-12 Anders Carlsson <andersca@apple.com>
631 Reviewed by Sam Weinig.
633 Make the new drawing area actually draw something
634 https://bugs.webkit.org/show_bug.cgi?id=52314
636 * Shared/UpdateInfo.cpp:
637 (WebKit::UpdateInfo::encode):
638 (WebKit::UpdateInfo::decode):
639 Encode and decode newly added fields.
641 * Shared/UpdateInfo.h:
642 Add a vector of update rects and a handle for the sharable bitmap.
644 * WebProcess/WebPage/DrawingAreaImpl.cpp:
645 (WebKit::DrawingAreaImpl::display):
646 Get the individual rects from the region and paint them into the shareable bitmap.
648 * WebProcess/WebPage/WebPage.cpp:
649 (WebKit::WebPage::mainFrameHasCustomRepresentation):
650 * WebProcess/WebPage/WebPage.h:
653 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
654 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
657 2011-01-12 Anders Carlsson <andersca@apple.com>
659 Reviewed by Sam Weinig.
662 https://bugs.webkit.org/show_bug.cgi?id=52306
664 * Shared/UpdateInfo.cpp: Added.
665 (WebKit::UpdateInfo::encode):
666 (WebKit::UpdateInfo::decode):
667 * Shared/UpdateInfo.h: Added.
668 (WebKit::UpdateInfo::UpdateInfo):
669 * WebKit2.xcodeproj/project.pbxproj:
671 2011-01-12 Anders Carlsson <andersca@apple.com>
673 Reviewed by Sam Weinig.
675 More work on the new drawing area implementation
676 https://bugs.webkit.org/show_bug.cgi?id=52302
678 * Platform/Region.cpp:
679 (WebKit::Region::Shape::segments_end):
680 segments_end could end up returning an iterator that is one element past the Vector data, so
681 we can't use operator[] since that will assert.
683 * WebProcess/WebPage/DrawingAreaImpl.cpp:
684 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
685 Initialize the timer.
687 (WebKit::DrawingAreaImpl::setNeedsDisplay):
688 Unite the rect with the dirty region and schedule a display.
690 (WebKit::DrawingAreaImpl::setSize):
691 Tell the web page to resize.
693 (WebKit::DrawingAreaImpl::scheduleDisplay):
694 Start a display timer if needed.
696 (WebKit::DrawingAreaImpl::display):
699 2011-01-12 Brent Fulgham <bfulgham@webkit.org>
701 Unreviewed build fix after r75527. Rename 'BackingStoreCairo.cpp'
702 to 'ShareableBitmapCairo.cpp' to match VS project changes.
704 * Shared/cairo/BackingStoreCairo.cpp: Removed.
705 * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
707 2011-01-11 Jeff Miller <jeffm@apple.com>
709 Reviewed by John Sullivan.
711 WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
712 https://bugs.webkit.org/show_bug.cgi?id=52242
714 * UIProcess/WebPageProxy.cpp:
715 (WebKit::WebPageProxy::showPopupMenu):
716 On Windows, stop the responsiveness timer before calling showPopupMenu().
718 2011-01-11 Maciej Stachowiak <mjs@apple.com>
720 Reviewed by Anders Carlsson.
722 UIProcess kills the WebProcess sometimes when detached frames exist
723 https://bugs.webkit.org/show_bug.cgi?id=52227
725 * UIProcess/WebPageProxy.cpp:
726 (WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
727 if it came in for a detached frame.
729 2011-01-11 Anders Carlsson <andersca@apple.com>
733 * WebKit2.xcodeproj/project.pbxproj:
735 2011-01-11 Anders Carlsson <andersca@apple.com>
737 Reviewed by Sam Weinig.
739 Add a Region class which represents a graphical region
740 https://bugs.webkit.org/show_bug.cgi?id=52255
742 * Platform/Region.cpp: Added.
743 (WebKit::Region::Region):
744 (WebKit::Region::rects):
745 (WebKit::Region::Shape::Shape):
746 (WebKit::Region::Shape::appendSpan):
747 (WebKit::Region::Shape::canCoalesce):
748 (WebKit::Region::Shape::appendSpans):
749 (WebKit::Region::Shape::appendSegment):
750 (WebKit::Region::Shape::spans_begin):
751 (WebKit::Region::Shape::spans_end):
752 (WebKit::Region::Shape::segments_begin):
753 (WebKit::Region::Shape::segments_end):
754 (WebKit::Region::Shape::dump):
755 (WebKit::Region::Shape::bounds):
756 (WebKit::Region::Shape::move):
757 (WebKit::Region::Shape::swap):
758 (WebKit::Region::Shape::shapeOperation):
759 (WebKit::Region::Shape::UnionOperation::trySimpleOperation):
760 (WebKit::Region::Shape::unionShapes):
761 (WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
762 (WebKit::Region::Shape::intersectShapes):
763 (WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
764 (WebKit::Region::Shape::subtractShapes):
765 (WebKit::Region::dump):
766 (WebKit::Region::intersect):
767 (WebKit::Region::unite):
768 (WebKit::Region::subtract):
769 (WebKit::Region::move):
770 * Platform/Region.h: Added.
771 (WebKit::Region::bounds):
772 (WebKit::Region::isEmpty):
773 (WebKit::Region::Span::Span):
774 (WebKit::Region::Shape::isEmpty):
775 * WebKit2.xcodeproj/project.pbxproj:
777 2011-01-11 Anders Carlsson <andersca@apple.com>
779 Reviewed by Darin Adler.
781 Add DidSetSize message
782 https://bugs.webkit.org/show_bug.cgi?id=52254
784 * DerivedSources.make:
785 Add DrawingAReaProxy.messages.in.
787 * Platform/CoreIPC/MessageID.h:
788 Add DrawingAreaProxy message class.
790 * UIProcess/DrawingAreaProxy.h:
791 (WebKit::DrawingAreaProxy::didSetSize):
792 Add CoreIPC message handler function.
794 * UIProcess/DrawingAreaProxy.messages.in: Added.
796 * UIProcess/DrawingAreaProxyImpl.cpp:
797 (WebKit::DrawingAreaProxyImpl::didSetSize):
800 * UIProcess/WebPageProxy.cpp:
801 (WebKit::WebPageProxy::didReceiveMessage):
802 Handle DrawingAreaProxy messages.
804 * WebKit2.xcodeproj/project.pbxproj:
807 * WebProcess/WebPage/DrawingAreaImpl.cpp:
808 (WebKit::DrawingAreaImpl::setSize):
809 Send a DidSetSize message for now.
811 2011-01-11 Sam Weinig <sam@webkit.org>
813 Reviewed by Anders Carlsson.
815 Fix spelling mistake. Sharable -> Shareable.
817 * Shared/API/c/WKImage.h:
818 * Shared/API/c/WKSharedAPICast.h:
819 (WebKit::toImageOptions):
820 * Shared/ImageOptions.h:
821 * Shared/WebImage.cpp:
822 (WebKit::WebImage::create):
824 2011-01-11 Anders Carlsson <andersca@apple.com>
826 Reviewed by Sam Weinig.
829 https://bugs.webkit.org/show_bug.cgi?id=52247
831 * DerivedSources.make:
832 Add DrawingArea.messages.in
834 * Platform/CoreIPC/MessageID.h:
835 Add DrawingArea message class.
837 * UIProcess/DrawingAreaProxyImpl.cpp:
838 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
841 (WebKit::DrawingAreaProxyImpl::sendSetSize):
842 Send a SetSize message.
844 * UIProcess/DrawingAreaProxyImpl.h:
845 Add setSize override.
847 * WebKit2.xcodeproj/project.pbxproj:
850 * WebProcess/WebPage/DrawingArea.h:
851 (WebKit::DrawingArea::setSize):
852 Add setSize member function.
854 * WebProcess/WebPage/DrawingArea.messages.in: Added.
856 * WebProcess/WebPage/DrawingAreaImpl.cpp:
857 * WebProcess/WebPage/DrawingAreaImpl.h:
860 * WebProcess/WebPage/WebPage.cpp:
861 (WebKit::WebPage::didReceiveMessage):
862 Handle drawing area messages.
864 2011-01-11 Anders Carlsson <andersca@apple.com>
866 Reviewed by Sam Weinig.
868 Replace ASSERTs with FIXMEs.
870 * UIProcess/DrawingAreaProxyImpl.cpp:
871 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
872 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
874 2011-01-11 Anders Carlsson <andersca@apple.com>
876 Reviewed by Sam Weinig.
878 Add DrawingAreaImpl skeleton class
879 https://bugs.webkit.org/show_bug.cgi?id=52246
881 * UIProcess/API/mac/WKView.mm:
883 New function which controls which drawing area to use, through an environment variable.
885 (-[WKView drawRect:]):
886 Bail if we're using the new drawing area (for now).
888 (-[WKView WebKit::]):
889 Create a DrawingAreaProxyImpl when asked to.
891 * WebKit2.xcodeproj/project.pbxproj:
894 * WebProcess/WebPage/DrawingArea.cpp:
895 (WebKit::DrawingArea::create):
896 Create a DrawingAreaImpl when asked to.
898 * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
899 * WebProcess/WebPage/DrawingAreaImpl.h: Added.
900 Add DrawingAreaImpl class.
902 2011-01-11 Anders Carlsson <andersca@apple.com>
904 Reviewed by Sam Weinig.
906 Add Mac-only DrawingAreaProxyImpl class skeleton
907 https://bugs.webkit.org/show_bug.cgi?id=52243
909 This is the proxy side of a new drawing area implementation. This is Mac only for now
910 while the design is being fleshed out.
912 * Shared/DrawingAreaInfo.h:
913 * UIProcess/API/mac/WKView.mm:
914 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
915 * UIProcess/DrawingAreaProxyImpl.cpp: Added.
916 (WebKit::DrawingAreaProxyImpl::create):
917 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
918 (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
919 (WebKit::DrawingAreaProxyImpl::didReceiveMessage):
920 (WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
921 (WebKit::DrawingAreaProxyImpl::paint):
922 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
923 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
924 (WebKit::DrawingAreaProxyImpl::attachCompositingContext):
925 (WebKit::DrawingAreaProxyImpl::detachCompositingContext):
926 * UIProcess/DrawingAreaProxyImpl.h: Added.
927 * WebKit2.xcodeproj/project.pbxproj:
928 * WebProcess/WebPage/DrawingArea.cpp:
929 (WebKit::DrawingArea::create):
931 2011-01-11 Anders Carlsson <andersca@apple.com>
935 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
936 (WebKit::WebPopupMenu::setUpPlatformData):
938 2011-01-11 Anders Carlsson <andersca@apple.com>
940 Reviewed by Sam Weinig.
942 Rename ShareableBitmap::createSharable to createShareable
943 https://bugs.webkit.org/show_bug.cgi?id=52234
945 * Shared/ShareableBitmap.cpp:
946 (WebKit::ShareableBitmap::createShareable):
947 * Shared/ShareableBitmap.h:
948 * Shared/WebImage.cpp:
949 (WebKit::WebImage::create):
950 * WebProcess/Plugins/PluginProxy.cpp:
951 (WebKit::PluginProxy::geometryDidChange):
952 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
953 (WebKit::WebPopupMenu::setUpPlatformData):
954 * WebProcess/WebPage/FindController.cpp:
955 (WebKit::FindController::updateFindIndicator):
957 2011-01-11 Anders Carlsson <andersca@apple.com>
959 Reviewed by Sam Weinig.
961 Rename BackingStore to ShareableBitmap
962 https://bugs.webkit.org/show_bug.cgi?id=52228
965 * PluginProcess/PluginControllerProxy.cpp:
966 (WebKit::PluginControllerProxy::geometryDidChange):
967 * PluginProcess/PluginControllerProxy.h:
968 * Shared/API/c/cg/WKImageCG.cpp:
969 (WKImageCreateCGImage):
970 * Shared/BackingStore.cpp: Removed.
971 * Shared/BackingStore.h: Removed.
972 * Shared/PlatformPopupMenuData.cpp:
973 (WebKit::PlatformPopupMenuData::decode):
974 * Shared/PlatformPopupMenuData.h:
975 * Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
976 (WebKit::ShareableBitmap::create):
977 (WebKit::ShareableBitmap::createSharable):
978 (WebKit::ShareableBitmap::createHandle):
979 (WebKit::ShareableBitmap::ShareableBitmap):
980 (WebKit::ShareableBitmap::~ShareableBitmap):
981 (WebKit::ShareableBitmap::resize):
982 (WebKit::ShareableBitmap::data):
983 * Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
984 * Shared/UserMessageCoders.h:
985 (WebKit::UserMessageEncoder::baseEncode):
986 (WebKit::UserMessageDecoder::baseDecode):
987 * Shared/WebImage.cpp:
988 (WebKit::WebImage::create):
989 (WebKit::WebImage::WebImage):
990 (WebKit::WebImage::~WebImage):
991 (WebKit::WebImage::size):
993 (WebKit::WebImage::bitmap):
994 * Shared/cairo/BackingStoreCairo.cpp:
995 (WebKit::ShareableBitmap::createGraphicsContext):
996 (WebKit::ShareableBitmap::paint):
997 * Shared/cg/BackingStoreCG.cpp: Removed.
998 * Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
999 (WebKit::ShareableBitmap::createGraphicsContext):
1000 (WebKit::ShareableBitmap::paint):
1001 * Shared/gtk/BackingStoreGtk.cpp: Removed.
1002 * Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
1003 (WebKit::ShareableBitmap::createGraphicsContext):
1004 (WebKit::ShareableBitmap::paint):
1005 * Shared/qt/BackingStoreQt.cpp: Removed.
1006 * Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
1007 (WebKit::ShareableBitmap::createGraphicsContext):
1008 (WebKit::ShareableBitmap::paint):
1009 * UIProcess/FindIndicator.cpp:
1010 (WebKit::FindIndicator::create):
1011 (WebKit::FindIndicator::FindIndicator):
1012 * UIProcess/FindIndicator.h:
1013 (WebKit::FindIndicator::contentImage):
1015 * WebKit2.xcodeproj/project.pbxproj:
1016 * WebProcess/Plugins/PluginProxy.cpp:
1017 (WebKit::PluginProxy::geometryDidChange):
1018 * WebProcess/Plugins/PluginProxy.h:
1019 * WebProcess/WebPage/FindController.cpp:
1020 (WebKit::FindController::updateFindIndicator):
1021 * WebProcess/WebPage/WebPage.cpp:
1022 (WebKit::WebPage::snapshotInViewCoordinates):
1023 (WebKit::WebPage::snapshotInDocumentCoordinates):
1024 * win/WebKit2.vcproj:
1026 2011-01-11 John Sullivan <sullivan@apple.com>
1028 Reviewed by Anders Carlsson.
1030 [WKView setFrameSize:] derefs _page->drawingArea() without null check
1031 <https://bugs.webkit.org/show_bug.cgi?id=52231>
1033 * UIProcess/API/mac/WKView.mm:
1034 (-[WKView setFrameSize:]):
1035 Null check drawingArea(). This is OK because if it doesn't exist then it will be
1036 created later with the correct initial size.
1038 2011-01-07 Enrica Casucci <enrica@apple.com>
1040 Reviewed by Alexey Proskuryakov.
1042 Paste and drag and drop use different code paths to interact with the pasteboard.
1043 https://bugs.webkit.org/show_bug.cgi?id=52093
1044 The change consists in a refactoring of the code to have only one class that
1045 deals with the pasteboard on Mac.
1047 * WebProcess/WebCoreSupport/WebEditorClient.h:
1048 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
1049 exposed by NSURLExtras.
1050 (WebKit::WebEditorClient::canonicalizeURL):
1051 (WebKit::WebEditorClient::canonicalizeURLString):
1053 2011-01-11 Jessie Berlin <jberlin@apple.com>
1055 Reviewed by Anders Carlsson and Sam Weinig.
1057 Fix crash on launch on Windows.
1059 * UIProcess/win/WebView.cpp:
1060 (WebKit::WebView::onSizeEvent):
1061 The drawing area is no longer initialized before the WebView is created and the first
1062 onSize is receieved.
1064 2011-01-11 Anders Carlsson <andersca@apple.com>
1066 Reviewed by Dan Bernstein.
1068 Automatically reinitialize the web page on relaunch
1069 https://bugs.webkit.org/show_bug.cgi?id=52224
1070 <rdar://problem/8765695>
1072 * UIProcess/API/mac/WKView.mm:
1073 (-[WKView _didRelaunchProcess]):
1074 Remove call to reinitializeWebPage.
1076 * UIProcess/WebPageProxy.cpp:
1077 (WebKit::WebPageProxy::relaunch):
1078 Call initializeWebPage().
1080 (WebKit::WebPageProxy::initializeWebPage):
1081 Assert that the web page is valid here.
1083 * UIProcess/WebPageProxy.h:
1084 Remove reinitializeWebPage.
1086 * UIProcess/win/WebView.cpp:
1087 (WebKit::WebView::didRelaunchProcess):
1088 Remove call to reinitializeWebPage.
1090 2011-01-10 Anders Carlsson <andersca@apple.com>
1092 Reviewed by Sam Weinig.
1094 Pass the view size to the DrawingAreaProxy constructor
1095 https://bugs.webkit.org/show_bug.cgi?id=52189
1097 * UIProcess/DrawingAreaProxy.cpp:
1098 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1099 * UIProcess/WebPageProxy.cpp:
1100 (WebKit::WebPageProxy::viewSize):
1101 * UIProcess/WebPageProxy.h:
1103 2011-01-11 Sam Weinig <sam@webkit.org>
1105 Roll r75460 back in with build fix.
1107 2011-01-11 Anders Carlsson <andersca@apple.com>
1109 Reviewed by Andreas Kling.
1111 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1112 https://bugs.webkit.org/show_bug.cgi?id=52184
1114 Qt part made my Balazs Kelemen.
1116 * UIProcess/API/mac/PageClientImpl.h:
1117 * UIProcess/API/mac/PageClientImpl.mm:
1118 (WebKit::PageClientImpl::createDrawingAreaProxy):
1119 Call -[WKView _createDrawingAreaProxy].
1121 (WebKit::PageClientImpl::setViewNeedsDisplay):
1122 Call setNeedsDisplayInRect on the WKView.
1124 * UIProcess/API/mac/WKView.mm:
1125 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1126 No need to set the drawing area proxy anymore.
1128 (-[WKView _createDrawingAreaProxy]):
1129 Create a chunked update drawing area proxy for now.
1131 * UIProcess/API/qt/qgraphicswkview.cpp:
1132 Added a QGraphicsItem* member that is initialized in init to the accociated view.
1133 Implement the new functions. This is a temporary solution, in the long term the view
1134 and the page should be decoupled.
1135 (QGraphicsWKView::QGraphicsWKView):
1136 * UIProcess/API/qt/qwkpage.cpp:
1137 (QWKPagePrivate::QWKPagePrivate):
1138 (QWKPagePrivate::init):
1139 (QWKPagePrivate::createDrawingAreaProxy):
1140 (QWKPagePrivate::setViewNeedsDisplay):
1141 * UIProcess/API/qt/qwkpage.h:
1142 * UIProcess/API/qt/qwkpage_p.h:
1144 * UIProcess/PageClient.h:
1145 Add new pure virtual member functions.
1147 * UIProcess/WebPageProxy.cpp:
1148 (WebKit::WebPageProxy::initializeWebPage):
1149 (WebKit::WebPageProxy::reinitializeWebPage):
1150 Set the new drawing area proxy.
1152 * UIProcess/win/WebView.cpp:
1153 (WebKit::WebView::WebView):
1154 No need to set the drawing area proxy anymore.
1156 (WebKit::WebView::createDrawingAreaProxy):
1157 Create a chunked update drawing area proxy for now.
1159 (WebKit::WebView::setViewNeedsDisplay):
1160 Invalidate the window.
1162 2011-01-11 Adam Roben <aroben@apple.com>
1164 Fix a typo in a comment
1166 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1168 2011-01-10 Sheriff Bot <webkit.review.bot@gmail.com>
1170 Unreviewed, rolling out r75460.
1171 http://trac.webkit.org/changeset/75460
1172 https://bugs.webkit.org/show_bug.cgi?id=52191
1174 It broke Qt-WK2 build (Requested by Ossy on #webkit).
1176 * Shared/API/c/WKBase.h:
1177 * Shared/APIObject.h:
1178 * UIProcess/API/C/WKAPICast.h:
1179 * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
1180 * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
1181 * UIProcess/API/C/WKPage.h:
1182 * UIProcess/API/C/WebKit2.h:
1183 * UIProcess/API/qt/qwkpage.cpp:
1185 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
1186 * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
1187 * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
1188 * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
1189 * UIProcess/WebPageProxy.cpp:
1190 (WebKit::WebPageProxy::WebPageProxy):
1191 (WebKit::WebPageProxy::close):
1192 (WebKit::WebPageProxy::processDidCrash):
1193 * UIProcess/WebPageProxy.h:
1194 * UIProcess/WebPageProxy.messages.in:
1195 * UIProcess/WebUIClient.cpp:
1196 * UIProcess/WebUIClient.h:
1198 * WebKit2.xcodeproj/project.pbxproj:
1199 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
1200 * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
1201 * WebProcess/Geolocation/WebGeolocationManager.cpp:
1202 * WebProcess/Geolocation/WebGeolocationManager.h:
1203 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1204 (WebKit::WebGeolocationClient::requestPermission):
1205 (WebKit::WebGeolocationClient::cancelPermissionRequest):
1206 * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1207 * WebProcess/WebPage/WebPage.cpp:
1208 (WebKit::WebPage::WebPage):
1209 * WebProcess/WebPage/WebPage.h:
1210 * WebProcess/WebPage/WebPage.messages.in:
1211 * win/WebKit2.vcproj:
1212 * win/WebKit2Generated.make:
1214 2011-01-10 Csaba Osztrogonác <ossy@webkit.org>
1216 Unreviewed, rolling out r75459
1217 http://trac.webkit.org/changeset/75459
1219 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1220 https://bugs.webkit.org/show_bug.cgi?id=52184
1222 * UIProcess/API/mac/PageClientImpl.h:
1223 * UIProcess/API/mac/PageClientImpl.mm:
1224 * UIProcess/API/mac/WKView.mm:
1225 * UIProcess/API/mac/WKViewInternal.h:
1226 * UIProcess/API/qt/qwkpage.cpp:
1227 * UIProcess/API/qt/qwkpage_p.h:
1228 * UIProcess/PageClient.h:
1229 * UIProcess/WebPageProxy.cpp:
1230 (WebKit::WebPageProxy::initializeWebPage):
1231 (WebKit::WebPageProxy::reinitializeWebPage):
1232 * UIProcess/win/WebView.cpp:
1233 (WebKit::WebView::WebView):
1234 * UIProcess/win/WebView.h:
1236 2011-01-10 Anders Carlsson <andersca@apple.com>
1238 Reviewed by Sam Weinig.
1240 Remove size parameter to WebPageProxy::initializeWebPage
1241 https://bugs.webkit.org/show_bug.cgi?id=52188
1243 * UIProcess/API/mac/WKView.mm:
1244 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1245 * UIProcess/API/qt/qwkpage.cpp:
1246 (QWKPagePrivate::init):
1247 * UIProcess/WebPageProxy.cpp:
1248 (WebKit::WebPageProxy::initializeWebPage):
1249 * UIProcess/WebPageProxy.h:
1250 * UIProcess/win/WebView.cpp:
1251 (WebKit::WebView::WebView):
1253 2011-01-10 Anders Carlsson <andersca@apple.com>
1255 Didn't mean to land this.
1257 * UIProcess/WebPageProxy.cpp:
1258 (WebKit::WebPageProxy::initializeWebPage):
1259 * UIProcess/WebPageProxy.h:
1261 2011-01-10 Anders Carlsson <andersca@apple.com>
1263 Reviewed by Sam Weinig.
1265 WebPageProxy::creationParameters no longer needs to take a size
1266 https://bugs.webkit.org/show_bug.cgi?id=52187
1268 WebPageProxy::creationParameters can just ask the page client for the view size now.
1270 * UIProcess/WebInspectorProxy.cpp:
1271 (WebKit::WebInspectorProxy::createInspectorPage):
1272 * UIProcess/WebPageProxy.cpp:
1273 (WebKit::WebPageProxy::initializeWebPage):
1274 (WebKit::WebPageProxy::reinitializeWebPage):
1275 (WebKit::WebPageProxy::createNewPage):
1276 (WebKit::WebPageProxy::creationParameters):
1277 * UIProcess/WebPageProxy.h:
1279 2011-01-10 Anders Carlsson <andersca@apple.com>
1281 Reviewed by Sam Weinig.
1283 Pass information about the view in the WebPageCreationParameters
1284 https://bugs.webkit.org/show_bug.cgi?id=52186
1286 * Shared/WebPageCreationParameters.cpp:
1287 (WebKit::WebPageCreationParameters::encode):
1288 (WebKit::WebPageCreationParameters::decode):
1289 Encode and decode the state flags.
1291 * Shared/WebPageCreationParameters.h:
1292 Add new state flags.
1294 * UIProcess/WebPageProxy.cpp:
1295 (WebKit::WebPageProxy::creationParameters):
1296 Initialize the state flags.
1298 * WebProcess/WebPage/WebPage.cpp:
1299 (WebKit::WebPage::WebPage):
1300 Update the page state from the state flags.
1302 2011-01-10 Sam Weinig <sam@webkit.org>
1304 Reviewed by Anders Carlsson.
1306 Make Geolocation features work in WebKit2
1307 https://bugs.webkit.org/show_bug.cgi?id=52078
1309 Step 2 - Add support for requesting and granting permission for geolocation.
1311 * Shared/API/c/WKBase.h:
1312 * Shared/APIObject.h:
1313 * UIProcess/API/C/WebKit2.h:
1314 * UIProcess/API/C/WKAPICast.h:
1315 * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
1316 * UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
1317 Add new API type, WKGeolocationPermissionRequestRef.
1319 * UIProcess/API/C/WKPage.h:
1320 Add new UIClient function for requesting permission.
1322 * UIProcess/API/qt/qwkpage.cpp:
1324 Stub out the UIClient.
1326 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
1327 * UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
1328 * UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
1329 * UIProcess/WebPageProxy.cpp:
1330 * UIProcess/WebPageProxy.h:
1331 * UIProcess/WebPageProxy.messages.in:
1332 * UIProcess/WebUIClient.cpp:
1333 * UIProcess/WebUIClient.h:
1334 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
1335 * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
1336 * WebProcess/Geolocation/WebGeolocationManager.cpp:
1337 * WebProcess/Geolocation/WebGeolocationManager.h:
1338 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1339 * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1340 * WebProcess/WebPage/WebPage.cpp:
1341 (WebKit::WebPage::WebPage):
1342 (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
1343 * WebProcess/WebPage/WebPage.h:
1344 (WebKit::WebPage::geolocationPermissionRequestManager):
1345 * WebProcess/WebPage/WebPage.messages.in:
1346 Track the permission request through both sides of the process divide.
1349 * WebKit2.xcodeproj/project.pbxproj:
1350 * win/WebKit2.vcproj:
1351 * win/WebKit2Generated.make:
1354 2011-01-10 Anders Carlsson <andersca@apple.com>
1356 Reviewed by Sam Weinig.
1358 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1359 https://bugs.webkit.org/show_bug.cgi?id=52184
1361 * UIProcess/API/mac/PageClientImpl.h:
1362 * UIProcess/API/mac/PageClientImpl.mm:
1363 (WebKit::PageClientImpl::createDrawingAreaProxy):
1364 Call -[WKView _createDrawingAreaProxy].
1366 (WebKit::PageClientImpl::setViewNeedsDisplay):
1367 Call setNeedsDisplayInRect on the WKView.
1369 * UIProcess/API/mac/WKView.mm:
1370 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1371 No need to set the drawing area proxy anymore.
1373 (-[WKView _createDrawingAreaProxy]):
1374 Create a chunked update drawing area proxy for now.
1376 * UIProcess/API/qt/qwkpage.cpp:
1377 (QWKPagePrivate::createDrawingAreaProxy):
1378 (QWKPagePrivate::setViewNeedsDisplay):
1381 * UIProcess/PageClient.h:
1382 Add new pure virtual member functions.
1384 * UIProcess/WebPageProxy.cpp:
1385 (WebKit::WebPageProxy::initializeWebPage):
1386 (WebKit::WebPageProxy::reinitializeWebPage):
1387 Set the new drawing area proxy.
1389 * UIProcess/win/WebView.cpp:
1390 (WebKit::WebView::WebView):
1391 No need to set the drawing area proxy anymore.
1393 (WebKit::WebView::createDrawingAreaProxy):
1394 Create a chunked update drawing area proxy for now.
1396 (WebKit::WebView::setViewNeedsDisplay):
1397 Invalidate the window.
1399 2011-01-10 Anders Carlsson <andersca@apple.com>
1401 Fix Windows build again.
1403 * UIProcess/win/WebView.cpp:
1404 (WebKit::WebView::isViewWindowActive):
1406 2011-01-10 Anders Carlsson <andersca@apple.com>
1410 * UIProcess/win/WebView.cpp:
1411 (WebKit::WebView::onShowWindowEvent):
1413 2011-01-10 Anders Carlsson <andersca@apple.com>
1415 Reviewed by Sam Weinig.
1417 Use a pull model for view state changes
1418 https://bugs.webkit.org/show_bug.cgi?id=52175
1420 Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
1421 WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
1422 function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
1424 * UIProcess/API/mac/PageClientImpl.h:
1425 * UIProcess/API/mac/PageClientImpl.mm:
1426 (WebKit::PageClientImpl::viewSize):
1427 (WebKit::PageClientImpl::isViewWindowActive):
1428 (WebKit::PageClientImpl::isViewFocused):
1429 (WebKit::PageClientImpl::isViewVisible):
1430 (WebKit::PageClientImpl::isViewInWindow):
1431 * UIProcess/API/mac/WKView.mm:
1432 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1433 (-[WKView becomeFirstResponder]):
1434 (-[WKView resignFirstResponder]):
1435 (-[WKView viewDidMoveToWindow]):
1436 (-[WKView _windowDidBecomeKey:]):
1437 (-[WKView _windowDidResignKey:]):
1438 (-[WKView viewDidHide]):
1439 (-[WKView viewDidUnhide]):
1440 (-[WKView _isFocused]):
1441 (-[WKView _didRelaunchProcess]):
1442 * UIProcess/API/mac/WKViewInternal.h:
1443 * UIProcess/API/qt/qgraphicswkview.cpp:
1444 (QGraphicsWKView::focusInEvent):
1445 (QGraphicsWKView::focusOutEvent):
1446 * UIProcess/API/qt/qwkpage.cpp:
1447 (QWKPagePrivate::QWKPagePrivate):
1448 (QWKPagePrivate::viewSize):
1449 (QWKPagePrivate::isViewWindowActive):
1450 (QWKPagePrivate::isViewFocused):
1451 (QWKPagePrivate::isViewVisible):
1452 (QWKPagePrivate::isViewInWindow):
1453 * UIProcess/API/qt/qwkpage_p.h:
1454 * UIProcess/PageClient.h:
1455 * UIProcess/WebContext.cpp:
1456 (WebKit::WebContext::createWebPage):
1457 * UIProcess/WebContext.h:
1458 * UIProcess/WebPageProxy.cpp:
1459 (WebKit::WebPageProxy::create):
1460 (WebKit::WebPageProxy::WebPageProxy):
1461 (WebKit::WebPageProxy::viewStateDidChange):
1462 * UIProcess/WebPageProxy.h:
1463 * UIProcess/WebProcessProxy.cpp:
1464 (WebKit::WebProcessProxy::createWebPage):
1465 * UIProcess/WebProcessProxy.h:
1466 * UIProcess/win/WebView.cpp:
1467 (WebKit::WebView::WebView):
1468 (WebKit::WebView::onSetFocusEvent):
1469 (WebKit::WebView::onKillFocusEvent):
1470 (WebKit::WebView::onShowWindowEvent):
1471 (WebKit::WebView::updateActiveState):
1472 (WebKit::WebView::viewSize):
1473 (WebKit::WebView::isViewWindowActive):
1474 (WebKit::WebView::isViewFocused):
1475 (WebKit::WebView::isViewVisible):
1476 (WebKit::WebView::isViewInWindow):
1477 (WebKit::WebView::didRelaunchProcess):
1478 (WebKit::WebView::setIsInWindow):
1479 * UIProcess/win/WebView.h:
1481 2011-01-10 Adam Roben <aroben@apple.com>
1483 Don't pass a reference type to va_start
1485 C++ says this results in undefined behavior:
1487 The restrictions that ISO C places on the second parameter to the
1488 va_start() macro in header <stdarg.h> are different in this
1489 International Standard. The parameter parmN is the identifier of
1490 the rightmost parameter in the variable parameter list of the
1491 function definition (the one just before the ...).221) If the
1492 parameter parmN is declared with a function, array, or reference
1493 type, or with a type that is not compatible with the type that
1494 results when passing an argument for which there is no parameter,
1495 the behavior is undefined.
1497 Fixes <http://webkit.org/b/52168> Title of standalone image document
1498 includes bogus image dimensions
1500 Rubber-stamped by Eric Seidel.
1502 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1503 (WebKit::formatLocalizedString): Don't use a reference type for
1506 2011-01-10 Siddharth Mathur <siddharth.mathur@nokia.com>
1508 Reviewed by Eric Seidel.
1510 Support for ARM's RVCT(ARMCC) compiler in import/export directives
1511 https://bugs.webkit.org/show_bug.cgi?id=52146
1513 * Shared/API/c/WKBase.h:
1515 2011-01-10 Sam Weinig <sam@webkit.org>
1519 * WebProcess/WebPage/WebPage.cpp:
1520 (WebKit::WebPage::WebPage):
1522 2011-01-10 Sam Weinig <sam@webkit.org>
1524 Reviewed by Anders Carlsson.
1526 Make Geolocation features work in WebKit2
1527 https://bugs.webkit.org/show_bug.cgi?id=52078
1529 Step 1 - Add enough support to get position data from a provider.
1530 This does not include permission support.
1532 * Platform/CoreIPC/HandleMessage.h:
1533 Add #include of Arguments.h for CoreIPC::In and Out definitions.
1535 * Platform/CoreIPC/MessageID.h:
1536 Add new message types.
1538 * Shared/API/c/WKBase.h:
1539 * Shared/APIObject.h:
1542 * Shared/WebGeolocationPosition.cpp: Added.
1543 * Shared/WebGeolocationPosition.h: Added.
1544 Internal position representation.
1546 * UIProcess/API/C/WKAPICast.h:
1547 Add casts for new API types.
1549 * UIProcess/API/C/WKContext.cpp:
1550 * UIProcess/API/C/WKContext.h:
1551 * UIProcess/API/C/WKGeolocationManager.cpp: Added.
1552 * UIProcess/API/C/WKGeolocationManager.h: Added.
1553 * UIProcess/API/C/WKGeolocationPosition.cpp: Added.
1554 * UIProcess/API/C/WKGeolocationPosition.h: Added.
1555 * UIProcess/API/C/WebKit2.h:
1556 Add API to provide and control geolocation data.
1558 * UIProcess/WebContext.cpp:
1559 (WebKit::WebContext::WebContext):
1560 (WebKit::WebContext::~WebContext):
1561 (WebKit::WebContext::processDidClose):
1562 (WebKit::WebContext::didReceiveMessage):
1563 * UIProcess/WebContext.h:
1564 (WebKit::WebContext::geolocationManagerProxy):
1565 * UIProcess/WebGeolocationManagerProxy.cpp: Added.
1566 (WebKit::WebGeolocationManagerProxy::create):
1567 (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
1568 (WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy):
1569 (WebKit::WebGeolocationManagerProxy::invalidate):
1570 (WebKit::WebGeolocationManagerProxy::initializeProvider):
1571 (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
1572 (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
1573 (WebKit::WebGeolocationManagerProxy::didReceiveMessage):
1574 (WebKit::WebGeolocationManagerProxy::startUpdating):
1575 (WebKit::WebGeolocationManagerProxy::stopUpdating):
1576 * UIProcess/WebGeolocationManagerProxy.h: Added.
1577 (WebKit::WebGeolocationManagerProxy::clearContext):
1578 (WebKit::WebGeolocationManagerProxy::type):
1579 * UIProcess/WebGeolocationManagerProxy.messages.in: Added.
1580 * UIProcess/WebGeolocationProvider.cpp: Added.
1581 (WebKit::WebGeolocationProvider::startUpdating):
1582 (WebKit::WebGeolocationProvider::stopUpdating):
1583 * UIProcess/WebGeolocationProvider.h: Added.
1584 * UIProcess/WebProcessProxy.cpp:
1585 (WebKit::WebProcessProxy::didReceiveMessage):
1586 * WebProcess/Geolocation: Added.
1587 * WebProcess/Geolocation/WebGeolocationManager.cpp: Added.
1588 (WebKit::WebGeolocationManager::WebGeolocationManager):
1589 (WebKit::WebGeolocationManager::~WebGeolocationManager):
1590 (WebKit::WebGeolocationManager::didReceiveMessage):
1591 (WebKit::WebGeolocationManager::registerWebPage):
1592 (WebKit::WebGeolocationManager::unregisterWebPage):
1593 (WebKit::WebGeolocationManager::didChangePosition):
1594 (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1595 * WebProcess/Geolocation/WebGeolocationManager.h: Added.
1596 * WebProcess/Geolocation/WebGeolocationManager.messages.in: Added.
1597 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: Added.
1598 (WebKit::WebGeolocationClient::geolocationDestroyed):
1599 (WebKit::WebGeolocationClient::startUpdating):
1600 (WebKit::WebGeolocationClient::stopUpdating):
1601 (WebKit::WebGeolocationClient::setEnableHighAccuracy):
1602 (WebKit::WebGeolocationClient::lastPosition):
1603 (WebKit::WebGeolocationClient::requestPermission):
1604 (WebKit::WebGeolocationClient::cancelPermissionRequest):
1605 * WebProcess/WebCoreSupport/WebGeolocationClient.h: Added.
1606 (WebKit::WebGeolocationClient::WebGeolocationClient):
1607 * WebProcess/WebPage/WebPage.cpp:
1608 (WebKit::WebPage::WebPage):
1609 * WebProcess/WebProcess.cpp:
1610 (WebKit::WebProcess::WebProcess):
1611 (WebKit::WebProcess::didReceiveMessage):
1612 * WebProcess/WebProcess.h:
1613 (WebKit::WebProcess::geolocationManager):
1614 Pipe geolocation positions/errors from the UIProcess to the WebProcess.
1616 * DerivedSources.make:
1617 * DerivedSources.pro:
1619 * WebKit2.xcodeproj/project.pbxproj:
1620 * win/WebKit2.vcproj:
1621 * win/WebKit2Common.vsprops:
1622 * win/WebKit2Generated.make:
1625 2011-01-10 Martin Robinson <mrobinson@igalia.com>
1627 GTK+ build fix. Continue to fix 'make dist.'
1629 * GNUmakefile.am: Remove more non-existent files from the WebKit2 build.
1631 2011-01-10 Alejandro G. Castro <alex@igalia.com>
1633 Reviewed by Martin Robinson.
1635 [GTK] Remove webkit2 files that are still not added to the
1636 repository from the makefile
1637 https://bugs.webkit.org/show_bug.cgi?id=52145
1639 This change is required for the release, we can add the lines
1640 again to the makefiles with the patches adding the files.
1644 2011-01-10 Andreas Kling <kling@webkit.org>
1646 Reviewed by Simon Hausmann.
1648 [Qt] [WK2] MiniBrowser does not load pages opened in new windows
1649 https://bugs.webkit.org/show_bug.cgi?id=52111
1651 * UIProcess/API/qt/qwkpage.cpp:
1652 (QWKPage::context): Implement this method.
1654 2011-01-09 Dan Bernstein <mitz@apple.com>
1656 Reviewed by Simon Fraser.
1658 <rdar://problem/8839498> Assertion failure in KURL::KURL when calling WKURLRequestCreateWithWKURL with a non-parsed URL
1659 https://bugs.webkit.org/show_bug.cgi?id=52132
1661 * Shared/API/c/WKURLRequest.cpp:
1662 (WKURLRequestCreateWithWKURL): Parse the URL.
1663 * Shared/WebString.h: Fixed a comment.
1664 * Shared/WebURL.h: Ditto.
1666 2011-01-09 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
1668 Reviewed by Martin Robinson.
1670 Changes to add Process Launcher and Thread Launcher implementation to the WebKit2 GTK port.
1671 The main() implementation for WebKitWebProcess binary to launch Web process from UI process.
1672 https://bugs.webkit.org/show_bug.cgi?id=48511
1674 * UIProcess/Launcher/gtk: Added.
1675 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Added. GTK (UNIX_X11 specific) implementation
1676 (WebKit::ProcessLauncher::launchProcess):
1677 (WebKit::ProcessLauncher::terminateProcess):
1678 (WebKit::ProcessLauncher::platformInvalidate):
1679 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
1680 (WebKit::ThreadLauncher::createWebThread):
1681 * WebProcess/gtk: Added.
1682 * WebProcess/gtk/WebProcessGtk.cpp: Added. The stubbed implementations of virtual functions of WebProcess.h for GTK port.
1683 (WebKit::WebProcess::platformSetCacheModel):
1684 (WebKit::WebProcess::platformClearResourceCaches):
1685 (WebKit::WebProcess::platformInitializeWebProcess):
1686 (WebKit::WebProcess::platformShutdown):
1687 * WebProcess/gtk/WebProcessMainGtk.cpp: Added. The WebProcessMain call which initiates the Web Process for GTK port.
1688 (WebKit::WebProcessMainGtk):
1689 * WebProcess/gtk/WebProcessMainGtk.h: Added. The WebProcessMain declaration for Web Process for GTK port.
1690 * gtk/MainGtk.cpp: Added. The main function implementation for binary WebKitWebProcess.
1693 2011-01-07 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
1695 Reviewed by Martin Robinson.
1697 [GTK] WebKit2 GNUmakefile is out of date from trunk
1698 https://bugs.webkit.org/show_bug.cgi?id=51883
1700 * GNUmakefile.am: Updated sources list as per latest revision
1701 * Platform/gtk/RunLoopGtk.cpp:
1702 (RunLoop::TimerBase::start):
1703 * Platform/gtk/WorkQueueGtk.cpp:
1704 (WorkQueue::scheduleWorkAfterDelay):
1705 * Shared/gtk/BackingStoreGtk.cpp:
1706 (WebKit::BackingStore::paint):
1707 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1708 (WebKit::InjectedBundle::load):
1709 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
1710 (WebKit::NetscapePlugin::platformInvalidate):
1712 2011-01-08 Dan Bernstein <mitz@apple.com>
1714 Reviewed by Sam Weinig.
1716 <rdar://problem/8812759> In WebKit2, PDF view settings (mode and scale) do not stick
1717 https://bugs.webkit.org/show_bug.cgi?id=52118
1719 * Shared/WebPreferencesStore.cpp:
1720 (WebKit::WebPreferencesStore::encode): Encode the double values map.
1721 (WebKit::WebPreferencesStore::decode): Decode the double values map.
1722 (WebKit::defaultValueForKey): Added double instance.
1723 (WebKit::WebPreferencesStore::setDoubleValueForKey): Added.
1724 (WebKit::WebPreferencesStore::getDoubleValueForKey): Added.
1725 * Shared/WebPreferencesStore.h: Added PDFScaleFactor and PDFDisplayMode preferences.
1726 * UIProcess/API/mac/PDFViewController.mm:
1727 (-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Initialize the _pdfViewController ivar.
1728 (-[WKPDFView invalidate]): Changed 'nil' to '0' in assignment to a non-Objective-C pointer.
1729 (-[WKPDFView setDocument:]): Added.
1730 (-[WKPDFView _applyPDFPreferences]): Added.
1731 (-[WKPDFView _updatePreferences:]): Added.
1732 (-[WKPDFView _updatePreferencesSoon]): Added.
1733 (-[WKPDFView _scaleOrDisplayModeOrPageChanged:]): Added.
1734 (-[WKPDFView viewDidMoveToWindow]): Added. Starts observing the PDF view for changes to scale
1736 (-[WKPDFView viewWillMoveToWindow:]): Added. Stops observing for changes.
1737 (WebKit::PDFViewController::setPDFDocumentData): Changed to call throguh -[WKPDFView setDocument:].
1738 * UIProcess/WebPreferences.cpp:
1739 (WebKit::WebPreferences::updateDoubleValueForKey): Added.
1740 * UIProcess/WebPreferences.h:
1741 * UIProcess/cf/WebPreferencesCF.cpp:
1742 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added empty implementation.
1743 * UIProcess/gtk/WebPreferencesGtk.cpp:
1744 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added stub.
1745 * UIProcess/mac/WebPreferencesMac.mm:
1746 (WebKit::setDoubleValueIfInUserDefaults): Added.
1747 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
1748 * UIProcess/qt/WebPreferencesQt.cpp:
1749 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
1751 2011-01-08 Dan Bernstein <mitz@apple.com>
1753 Reviewed by Maciej Stachowiak.
1755 In WebKit2, page zooming does not work with PDF
1756 https://bugs.webkit.org/show_bug.cgi?id=52113
1758 * UIProcess/API/C/WKPage.cpp:
1759 (WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
1760 * UIProcess/API/C/WKPage.h:
1761 * UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
1763 * UIProcess/API/mac/PDFViewController.mm:
1764 (WebKit::PDFViewController::zoomFactor): Added.
1765 (WebKit::PDFViewController::setZoomFactor): Added.
1766 * UIProcess/API/mac/PageClientImpl.h:
1767 * UIProcess/API/mac/PageClientImpl.mm:
1768 (WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
1769 (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
1770 * UIProcess/API/mac/WKView.mm:
1771 (-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
1772 (-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
1773 * UIProcess/API/mac/WKViewInternal.h:
1774 * UIProcess/API/qt/qwkpage_p.h:
1775 (QWKPagePrivate::customRepresentationZoomFactor): Added.
1776 (QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
1777 * UIProcess/PageClient.h:
1778 * UIProcess/WebPageProxy.cpp:
1779 (WebKit::WebPageProxy::WebPageProxy): Coding style fix.
1780 (WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
1781 representation or is a standalone image, true otherwise.
1782 (WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
1783 (WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
1784 zoom factor from the page client.
1785 (WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
1786 the client set the zoom factor.
1787 (WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
1788 * UIProcess/WebPageProxy.h:
1789 (WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
1791 * UIProcess/win/WebView.cpp:
1792 (WebKit::WebView::customRepresentationZoomFactor): Added.
1793 (WebKit::WebView::setCustomRepresentationZoomFactor): Added.
1794 * UIProcess/win/WebView.h:
1796 2011-01-08 Jeff Miller <jeffm@apple.com>
1798 Reviewed by Jon Honeycutt.
1800 Add WKBundleFrameGetVisibleContentBounds().
1801 https://bugs.webkit.org/show_bug.cgi?id=52089
1803 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1804 (WKBundleFrameGetVisibleContentBounds):
1805 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1806 Added WKBundleFrameGetVisibleContentBounds().
1808 2011-01-08 Balazs Kelemen <kbalazs@webkit.org>
1810 Reviewed by Kenneth Rohde Christiansen.
1812 [Qt][WK2] QWKView does not propagate show and hide events to the drawing area
1813 https://bugs.webkit.org/show_bug.cgi?id=52108
1815 * UIProcess/API/qt/qgraphicswkview.cpp:
1816 (QGraphicsWKView::event): Call setPageIsVisible on the drawing area
1817 if the event is Show or Hide.
1819 2011-01-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1821 Reviewed by Kenneth Rohde Christiansen.
1823 [Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian
1824 https://bugs.webkit.org/show_bug.cgi?id=31273
1826 On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
1827 are included before platform headers. On all other platforms continue to use
1828 INCLUDEPATH (as before).
1832 2011-01-08 Csaba Osztrogonác <ossy@webkit.org>
1834 [Qt][WK2] Unreviewed buildfix after r75313.
1836 * Scripts/generate-forwarding-headers.pl:
1838 2011-01-08 Adam Barth <abarth@webkit.org>
1840 Moving WebCore changes the layout of the Qt build directory as well,
1841 which means we need to change where we look for these generated files.
1843 * DerivedSources.pro:
1845 2011-01-07 Adam Barth <abarth@webkit.org>
1847 Rubber-stamped by Eric Seidel.
1849 Move WebCore to Source
1850 https://bugs.webkit.org/show_bug.cgi?id=52050
1854 2011-01-07 Stephanie Lewis <slewis@apple.com>
1856 Reviewed by Geoff Garen.
1858 <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
1859 https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
1861 Add a sampler for printing off process memory statistics.
1862 This tool can track:
1865 - FastMalloc allocations bytes (in use or committed)
1867 - Garbage collector heap bytes (in use or committed)
1868 - Stack bytes (committed only!)
1869 - JIT Code bytes (committed only!)
1871 - In use bytes for the following zones:
1872 * Default zone (in use or committed)
1873 * DispCon zone (in use or committed)
1874 * Purgable zone (in use or committed)
1876 - Resident size memory (RSIZE)
1878 Data collected is dumped to a temporary file.
1880 Create a sandbox for a temporary file.
1881 * Shared/SandboxExtension.h:
1882 (WebKit::SandboxExtension::createHandleForTemporaryFile):
1883 * Shared/mac/SandboxExtensionMac.mm:
1884 (WebKit::SandboxExtension::createHandleForTemporaryFile):
1886 Memory Sampler files
1888 * Shared/WebMemorySampler.cpp: Added.
1889 (WebKit::WebMemorySampler::shared):
1890 (WebKit::WebMemorySampler::WebMemorySampler):
1891 (WebKit::WebMemorySampler::start):
1892 (WebKit::WebMemorySampler::initializeTimers):
1893 (WebKit::WebMemorySampler::stop):
1894 (WebKit::WebMemorySampler::isRunning):
1895 (WebKit::WebMemorySampler::initializeTempLogFile):
1896 (WebKit::WebMemorySampler::initializeSandboxedLogFile):
1897 (WebKit::WebMemorySampler::writeHeaders):
1898 (WebKit::WebMemorySampler::sampleTimerFired):
1899 (WebKit::WebMemorySampler::stopTimerFired):
1900 (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
1901 * Shared/WebMemorySampler.h: Added.
1902 * Shared/mac/WebMemorySampler.mac.mm: Added.
1903 (WebKit::WebMemorySampler::sampleSystemMalloc):
1904 (WebKit::WebMemorySampler::sampleProcessCommittedBytes):
1905 (WebKit::WebMemorySampler::processName):
1906 (WebKit::WebMemorySampler::sampleWebKit):
1908 API to start and stop UIProcess and WebProcess sampling.
1910 * UIProcess/API/C/WKContext.cpp:
1911 (WKContextStartMemorySampler):
1912 (WKContextStopMemorySampler):
1913 * UIProcess/API/C/WKContext.h:
1915 Send messages to WebProcess to start and stop memory sampling.
1917 * UIProcess/WebContext.cpp:
1918 (WebKit::WebContext::WebContext):
1919 (WebKit::WebContext::processDidFinishLaunching):
1920 (WebKit::WebContext::startMemorySampler):
1921 (WebKit::WebContext::stopMemorySampler):
1922 * UIProcess/WebContext.h:
1923 * WebKit2.xcodeproj/project.pbxproj:
1924 * WebProcess/WebProcess.cpp:
1925 (WebKit::WebProcess::startMemorySampler):
1926 (WebKit::WebProcess::stopMemorySampler):
1927 * WebProcess/WebProcess.h:
1928 * WebProcess/WebProcess.messages.in:
1930 2011-01-07 Jessie Berlin <jberlin@apple.com>
1932 Reviewed by Dan Bernstein.
1934 WebKit2: Need WKBundleFrameCopyProvisionalURL
1935 https://bugs.webkit.org/show_bug.cgi?id=52083
1937 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1938 (WKBundleFrameCopyProvisionalURL):
1939 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1940 * WebProcess/WebPage/WebFrame.cpp:
1941 (WebKit::WebFrame::provisionalURL):
1942 Grab the URL from the provisional document loader.
1943 * WebProcess/WebPage/WebFrame.h:
1945 2011-01-07 James Robinson <jamesr@chromium.org>
1947 Revert "Implement mozilla's animationTime property"
1948 https://bugs.webkit.org/show_bug.cgi?id=51952
1950 This approach isn't quite right.
1952 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1953 (WebKit::ChunkedUpdateDrawingArea::display):
1954 (WebKit::ChunkedUpdateDrawingArea::setSize):
1955 * WebProcess/WebPage/WebPage.cpp:
1956 (WebKit::WebPage::drawRect):
1957 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1958 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1960 2011-01-07 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
1962 Reviewed by Martin Robinson.
1964 [GTK] WebKit2 GNUmakefile is out of date from trunk
1965 Adding new stub files for compiling on latest revision
1966 https://bugs.webkit.org/show_bug.cgi?id=51883
1968 * UIProcess/gtk: Added.
1969 * UIProcess/gtk/TextCheckerGtk.cpp: Added.
1970 (WebKit::TextChecker::state):
1971 (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
1972 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1973 (WebKit::TextChecker::setGrammarCheckingEnabled):
1974 (WebKit::TextChecker::uniqueSpellDocumentTag):
1975 (WebKit::TextChecker::closeSpellDocumentWithTag):
1976 (WebKit::TextChecker::checkTextOfParagraph):
1977 (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
1978 (WebKit::TextChecker::getGuessesForWord):
1979 (WebKit::TextChecker::learnWord):
1980 (WebKit::TextChecker::ignoreWord):
1981 * UIProcess/gtk/WebInspectorGtk.cpp: Added.
1982 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1983 (WebKit::WebInspectorProxy::platformOpen):
1984 (WebKit::WebInspectorProxy::platformClose):
1985 (WebKit::WebInspectorProxy::inspectorPageURL):
1986 * UIProcess/gtk/WebPageProxyGtk.cpp: Added.
1987 (WebKit::WebPageProxy::standardUserAgent):
1988 * UIProcess/gtk/WebPreferencesGtk.cpp: Added.
1989 (WebKit::WebPreferences::platformInitializeStore):
1990 (WebKit::WebPreferences::platformUpdateStringValueForKey):
1991 (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1992 (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1993 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Added.
1994 (WebKit::WebContextMenuClient::lookUpInDictionary):
1995 (WebKit::WebContextMenuClient::isSpeaking):
1996 (WebKit::WebContextMenuClient::speak):
1997 (WebKit::WebContextMenuClient::stopSpeaking):
1998 * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Added.
1999 (WebKit::WebDatabaseManager::databaseDirectory):
2000 * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: Added.
2001 (WebKit::WebPopupMenu::setUpPlatformData):
2002 * WebProcess/WebPage/gtk: Added.
2003 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Added.
2004 (WebKit::WebInspector::localizedStringsURL):
2006 2011-01-06 Adam Roben <aroben@apple.com>
2008 Don't ever call ::SetCursor(0)
2010 Doing so makes the cursor disappear from the screen.
2012 Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
2013 around a WKView before the web process has finished launching
2015 Reviewed by Jon Honeycutt.
2017 * UIProcess/win/WebView.cpp:
2018 (WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
2019 let Windows do its default thing (which is to set the cursor to the
2020 window class's cursor, which in our case is the arrow cursor).
2021 (WebKit::WebView::cursorToShow): Just return 0 when the page has
2022 crashed so that we'll show the default cursor (which is the arrow
2023 cursor). This change has no visible effect, but seems slightly better
2025 (WebKit::WebView::updateNativeCursor): Don't do anything if we don't
2026 have a cursor to set.
2028 2011-01-06 Adam Roben <aroben@apple.com>
2030 Fill the WKView with white when the web process hasn't drawn anything
2033 Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
2034 before web process has had a chance to draw anything (if Aero is
2037 Reviewed by Jon Honeycutt.
2039 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2040 (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
2041 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
2042 * UIProcess/DrawingAreaProxy.h:
2043 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2044 (WebKit::LayerBackedDrawingAreaProxy::paint):
2045 * UIProcess/LayerBackedDrawingAreaProxy.h:
2046 * UIProcess/TiledDrawingAreaProxy.cpp:
2047 (WebKit::TiledDrawingAreaProxy::paint):
2048 * UIProcess/TiledDrawingAreaProxy.h:
2049 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2050 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
2051 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
2052 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
2053 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2054 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
2055 * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
2056 (WebKit::LayerBackedDrawingAreaProxy::paint):
2057 Changed these functions to return a boolean indicating whether we
2058 actually painted anything.
2060 * UIProcess/win/WebView.cpp:
2061 (WebKit::WebView::onPaintEvent): Fill with white (and don't call
2062 didDraw) when the DrawingAreaProxy isn't able to paint.
2064 2011-01-06 Jessie Berlin <jberlin@apple.com>
2066 Reviewed by Jon Honeycutt.
2068 WebKit2: Need WKBundlePagePrivate equivalent of WebKit1's WebViewPrivate's setDefersCallbacks
2069 https://bugs.webkit.org/show_bug.cgi?id=52038
2071 The implementation of WebKit1's WebViewPrivate's setDefersCallbacks on both Windows and Mac
2072 calls WebCore::Page::setDefersLoading.
2074 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2075 (WKBundlePageSetDefersLoading):
2076 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2077 * WebProcess/WebPage/WebPage.cpp:
2078 (WebKit::WebPage::setDefersLoading):
2079 * WebProcess/WebPage/WebPage.h:
2081 2011-01-06 Brady Eidson <beidson@apple.com>
2083 Reviewed by Darin Adler.
2085 <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
2086 Change WebKit2 session restoring to restore the full back/forward list.
2088 * UIProcess/WebProcessProxy.cpp:
2089 (WebKit::WebProcessProxy::registerNewWebBackForwardListItem): Let the UIProcess register its own
2090 WebBackForwardListItems in its ID map upon creation.
2091 * UIProcess/WebProcessProxy.h:
2093 * UIProcess/cf/WebPageProxyCF.cpp:
2094 (WebKit::WebPageProxy::restoreFromSessionStateData): Register each new list entry in the
2097 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2098 (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Add this method to register UIProcess
2099 created items without doing any of the other work normally associated with adding a new back/forward item
2100 (such as notifying the UIProcess).
2101 * WebProcess/WebPage/WebBackForwardListProxy.h:
2103 * WebProcess/WebPage/WebPage.cpp:
2104 (WebKit::WebPage::restoreSession): Map all of the back/forward list entries from the UIProcess then
2105 cause a load of the current entry.
2107 2011-01-06 Adam Roben <aroben@apple.com>
2109 Always show the arrow cursor when the web process has crashed
2111 Fixes <http://webkit.org/b/52006> WKView shows a stale cursor when the
2114 Reviewed by Ada Chan.
2116 * UIProcess/win/WebView.cpp:
2117 (WebKit::WebView::processDidCrash):
2118 (WebKit::WebView::didRelaunchProcess):
2119 Update the cursor to reflect the new state.
2121 (WebKit::WebView::cursorToShow): Always show the arrow cursor when the
2122 web process has crashed.
2124 2011-01-06 Adam Roben <aroben@apple.com>
2126 Reduce code duplication in WebView::updateNativeCursor
2128 Fixes <http://webkit.org/b/52005> It's not easy to add new behavior to
2129 WebView::updateNativeCursor
2131 Reviewed by Ada Chan.
2133 * UIProcess/win/WebView.cpp:
2134 (WebKit::WebView::cursorToShow): Moved code to choose a cursor here...
2135 (WebKit::WebView::updateNativeCursor): ...from here.
2137 * UIProcess/win/WebView.h: Added cursorToShow.
2139 2011-01-06 Adam Roben <aroben@apple.com>
2141 Make WKView fill with white when the web process has crashed
2143 Previously we would just draw whatever we had last drawn into the
2144 WKView (i.e., a stale picture of the web page), which was confusing
2145 (because the web page would mysteriously not respond to input) and ugly
2146 (because it wouldn't behave properly if the window was resized).
2148 Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
2149 picture of the web page when the web process crashes
2151 Reviewed by Ada Chan.
2153 * UIProcess/win/WebView.cpp:
2154 (WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
2155 to fill with white if the page is invalid or has no DrawingArea. As a
2156 bonus, also ported the call to WebPageProxy::didDraw from that method.
2158 (WebKit::WebView::processDidCrash):
2159 (WebKit::WebView::didRelaunchProcess):
2160 Invalidate our window so that we'll redraw with white or the new page.
2162 2011-01-06 Adam Roben <aroben@apple.com>
2164 Make WKViews work on Windows after a crashed web process gets relaunched
2166 Fixes <http://webkit.org/b/52001> Relaunching the web process fails to
2167 revivify WKViews on Windows
2169 Reviewed by Ada Chan.
2171 * UIProcess/win/WebView.cpp:
2172 (WebKit::WebView::didRelaunchProcess): Implemented by porting code from
2173 -[WKView _didRelaunchProcess].
2175 2011-01-06 Adam Roben <aroben@apple.com>
2177 Remove WebView::m_rect
2179 It was only used in the constructor, and wasn't even kept up-to-date as
2180 the WebView's size changed.
2182 Fixes <http://webkit.org/b/52000> WebView::m_rect is unnecessary
2184 Reviewed by Ada Chan.
2186 * UIProcess/win/WebView.cpp:
2187 * UIProcess/win/WebView.h:
2189 2011-01-05 Brian Weinstein <bweinstein@apple.com>
2191 Reviewed by Ada Chan.
2193 WebKit2: Should be able to call into injected bundle to ask if we should allow resource loads
2194 https://bugs.webkit.org/show_bug.cgi?id=51969
2196 Add the ability to call into the injected bundle to ask if we should allow resource loads.
2197 If the injected bundle says we should cancel, we clear out the ResourceRequest that was
2198 passed into willSendRequest, which cancels the resource load.
2200 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add the new callback for allowing/cancelling
2202 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2203 (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Calls through to the client.
2204 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2205 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2206 (WebKit::WebFrameLoaderClient::dispatchWillSendRequest): Ask the InjectedBundlePageLoaderClient if we
2207 should load the resource or not.
2209 2011-01-06 Jeff Miller <jeffm@apple.com>
2211 Reviewed by Darin Adler.
2213 WebKit2: Add APIs to WKBundleFrame to get content bounds and scroll offset
2214 https://bugs.webkit.org/show_bug.cgi?id=51968
2216 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2217 (WKBundleFrameGetContentBounds):
2218 (WKBundleFrameGetScrollOffset):
2219 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2220 Add WKBundleFrameGetContentBounds() and WKBundleFrameGetScrollOffset().
2222 2011-01-06 James Robinson <jamesr@chromium.org>
2224 Reviewed by Simon Fraser.
2226 Implement mozilla's animationTime property
2227 https://bugs.webkit.org/show_bug.cgi?id=51952
2229 Tells the page to clear the current animation time after producing a frame.
2231 * WebProcess/WebPage/WebPage.cpp:
2232 (WebKit::WebPage::drawRect):
2233 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2234 (WebKit::ChunkedUpdateDrawingArea::display):
2235 (WebKit::ChunkedUpdateDrawingArea::setSize):
2236 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2237 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2239 2011-01-06 Darin Adler <darin@apple.com>
2241 Redo the half-done rename from the last check-in.
2242 Sorry for the broken build last night.
2244 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2245 (WebKit::WebBackForwardListProxy::removeItem): Renamed.
2246 * WebProcess/WebPage/WebBackForwardListProxy.h: Updated
2248 * WebProcess/WebPage/WebPage.cpp:
2249 (WebKit::WebPage::didRemoveBackForwardItem): Updated to
2252 2011-01-06 Maciej Stachowiak <mjs@apple.com>
2254 Rubber stamped by Dan Bernstein.
2256 Fix build for Darin's previous change w/ the obvious renaming.
2258 * WebProcess/WebPage/WebBackForwardListProxy.h:
2259 * WebProcess/WebPage/WebPage.cpp:
2260 (WebKit::WebPage::didRemoveBackForwardItem):
2262 2011-01-05 Darin Adler <darin@apple.com>
2264 Reviewed by Geoff Garen.
2266 Back/Forward entries in WebKit2 leak
2267 https://bugs.webkit.org/show_bug.cgi?id=51983
2269 Besides fixing the leak, this also fixes a problem where
2270 all history items were sent over to the UI process, but
2271 we wanted to send only back/forward items.
2273 * UIProcess/WebBackForwardList.cpp:
2274 (WebKit::WebBackForwardList::pageClosed): Added.
2275 Tells the web process about all the back/forward
2276 items being removed.
2277 (WebKit::WebBackForwardList::addItem): Ditto.
2278 Also removed a redundant call to didChangeBackForwardList.
2279 (WebKit::WebBackForwardList::clear): Ditto.
2281 * UIProcess/WebBackForwardList.h: Added pageClosed.
2283 * UIProcess/WebPageProxy.cpp:
2284 (WebKit::WebPageProxy::close): Added a call to pageClosed.
2285 (WebKit::WebPageProxy::backForwardRemovedItem): Added.
2286 Sends a message to the web page in the web process.
2288 * UIProcess/WebPageProxy.h: Added backForwardRemovedItem.
2290 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2291 (WebKit::updateBackForwardItem): Added an itemID argument,
2292 since callers will now be getting it and we don't want to
2293 get it twice. Removed the code to generate an ID. Also
2294 removed some local variables to make the code a little
2295 tighter and clearer.
2296 (WebKit::WK2NotifyHistoryItemChanged): Only call
2297 updateBackForwardItem for items that already have IDs.
2298 We don't want to send cross-process messages for every
2299 history item; just the ones that are top level back/forward
2301 (WebKit::WebBackForwardListProxy::removeItem):
2302 Added. For use when the UI process tells us to remove it.
2303 (WebKit::WebBackForwardListProxy::addItem): Added code to
2304 assign an ID and put this item into the maps. This is called
2305 exactly once on each back/forward item.
2307 * WebProcess/WebPage/WebBackForwardListProxy.h: Added
2310 * WebProcess/WebPage/WebPage.cpp:
2311 (WebKit::WebPage::didRemoveBackForwardItem): Added.
2313 * WebProcess/WebPage/WebPage.h: Added didRemoveBackForwardItem.
2315 * WebProcess/WebPage/WebPage.messages.in: Added
2316 DidRemoveBackForwardItem message.
2318 2011-01-05 Steve Falkenburg <sfalken@apple.com>
2320 Reviewed by Darin Adler.
2322 Debug and Release builds on Windows clobber each other
2323 https://bugs.webkit.org/show_bug.cgi?id=49185
2325 Changes the structure of WebKitBuild build products directory so we
2326 completely separate each build configuration into independent directories.
2328 Although we previously had per-configuration directories for obj, this change adds
2329 per-configuration directories for bin, lib, obj, and include. Each configuration's
2330 build products are stored within a directory inside of WebKitBuild.
2332 Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
2333 defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
2336 * win/WebKit2.vcproj:
2337 * win/WebKit2Common.vsprops:
2338 * win/WebKit2Generated.make:
2339 * win/WebKit2GeneratedCommon.vsprops:
2340 * win/WebKit2WebProcessPostBuild.cmd:
2341 * win/WebKit2WebProcessPreBuild.cmd:
2342 * win/WebKitPostBuild.cmd:
2343 * win/WebKitPreBuild.cmd:
2345 2011-01-05 Alexey Proskuryakov <ap@apple.com>
2347 Reviewed by Anders Carlsson.
2349 https://bugs.webkit.org/show_bug.cgi?id=51973
2350 Make main frame PDF printing work
2352 * UIProcess/API/mac/PDFViewController.h:
2353 * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::makePrintOperation):
2354 Ask PDFDocument to create an NSPrintOperation.
2356 * UIProcess/API/mac/WKView.h:
2357 * UIProcess/API/mac/WKView.mm:
2358 (-[WKView printOperationWithPrintInfo:forFrame:]): Create a new NSPrintOperation, either
2359 from scratch or from a PDF view.
2360 (-[WKView canPrintHeadersAndFooters]): Report if the view can be re-paginated to add headers
2363 2011-01-05 Anders Carlsson <andersca@apple.com>
2365 Reviewed by Sam Weinig.
2367 <rdar://problem/8750248>
2368 Need a way to create a new DownloadProxy from an arbitrary resource request
2370 <rdar://problem/8750465>
2371 Need a way to start a download in WKDownload
2373 <rdar://problem/8752204>
2374 WK2 Context Menus - "Save linked file" support
2376 * Shared/ContextMenuState.h: Added.
2377 Add a ContextMenuState struct which contains state for context menus.
2379 * UIProcess/API/C/WKContext.cpp:
2380 (WKContextDownloadURLRequest):
2381 Call WebContext::download.
2383 * UIProcess/WebContext.cpp:
2384 (WebKit::WebContext::download):
2385 Send a DownloadRequest message to the web process.
2387 * UIProcess/WebPageProxy.cpp:
2388 (WebKit::WebPageProxy::showContextMenu):
2389 Set the active context menu state.
2391 (WebKit::WebPageProxy::contextMenuItemSelected):
2392 Handle ContextMenuItemTagDownloadImageToDisk and ContextMenuItemTagDownloadLinkToDisk by calling
2393 WebContext::Download, passing the respective URLs.
2395 * UIProcess/WebPageProxy.messages.in:
2396 ShowContextMenu now takes state as well.
2398 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2399 (WebKit::WebContextMenuClient::downloadURL):
2400 Assert that this is never reached; downloads are handled in the UI process.
2402 * WebProcess/WebPage/WebContextMenu.cpp:
2403 (WebKit::WebContextMenu::show):
2404 Pass the context menu state along when sending the ShowContextMenu message.
2406 * WebProcess/WebProcess.cpp:
2407 (WebKit::WebProcess::downloadRequest):
2408 Call the shared DownloadManager.
2410 * WebProcess/WebProcess.messages.in:
2411 Add DownloadRequest message.
2413 * WebKit2.xcodeproj/project.pbxproj:
2414 * win/WebKit2.vcproj:
2415 Add ContextMenuState.h.
2417 2011-01-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2419 Unreviewed build fix.
2421 [Qt] [Symbian] Fix building NPAPI support
2423 NPEvent is mapped to QAction on Symbian. QAction has no
2424 default constructor, so toNP() fails to build. Add a case for
2425 Symbian behind the OS(SYMBIAN) guard.
2427 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2430 2011-01-05 Jeff Miller <jeffm@apple.com>
2432 Reviewed by Dan Bernstein.
2434 Copy WKImageCG.h to include\WebKit2 in build output
2435 https://bugs.webkit.org/show_bug.cgi?id=51944
2437 * win/WebKit2Generated.make:
2438 Add xcopy command to copy WKImageCG.h.
2440 2011-01-05 Brady Eidson <beidson@apple.com>
2442 Reviewed by Sam Weinig.
2444 Part of <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
2445 Change WebKit2 session restoring to restore the full back/forward list
2447 Add a new message to tell the WebProcess to restore a session state:
2448 * WebProcess/WebPage/WebPage.cpp:
2449 (WebKit::WebPage::restoreSession):
2450 * WebProcess/WebPage/WebPage.h:
2451 * WebProcess/WebPage/WebPage.messages.in: Add the new message, AND fix the intentional misspellings.
2455 Change WebProcess back/forward list item ids to be odd (UIProcess's will be even):
2456 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2457 (WebKit::generateHistoryItemID):
2459 Provide accessors to the entries in the list to pass to the WebProcess:
2460 * UIProcess/WebBackForwardList.h:
2461 (WebKit::WebBackForwardList::entries):
2462 (WebKit::WebBackForwardList::currentIndex):
2464 Add decoding of the saved back/forward list itmes (we already encode them):
2465 * UIProcess/cf/WebBackForwardListCF.cpp:
2466 (WebKit::generateWebBackForwardItemID):
2467 (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
2469 Instead of loading the current URL, pass the entire last back to the WebProcess:
2470 * UIProcess/cf/WebPageProxyCF.cpp:
2471 (WebKit::WebPageProxy::restoreFromSessionStateData):
2473 2011-01-05 Brady Eidson <beidson@apple.com>
2475 Reviewed by Darin Adler.
2477 https://bugs.webkit.org/show_bug.cgi?id=51953
2478 Add a "SessionState" object for IPC messaging.
2480 This object includes all data necessary to restore a session state;
2481 For now, this is just the back/forward list to restore.
2483 * Shared/SessionState.cpp: Added.
2484 (WebKit::SessionState::SessionState):
2485 (WebKit::SessionState::encode):
2486 (WebKit::SessionState::decode):
2487 * Shared/SessionState.h: Added.
2488 (WebKit::SessionState::list):
2489 (WebKit::SessionState::currentIndex):
2492 * WebKit2.xcodeproj/project.pbxproj:
2493 * win/WebKit2.vcproj:
2495 2011-01-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2497 Unreviewed build fix.
2499 Include unistd.h for _exit() for non-Windows builds.
2501 Build break noticed on QtWebkit Symbian builds.
2503 * Shared/ChildProcess.cpp:
2505 2011-01-05 Brady Eidson <beidson@apple.com>
2507 Reviewed by Darin Adler.
2509 https://bugs.webkit.org/show_bug.cgi?id=51949
2510 Make WebBackForwardListItem shared, and add encoders and decoders
2512 * Shared/WebBackForwardListItem.cpp: Copied from UIProcess/WebBackForwardListItem.cpp.
2513 (WebKit::WebBackForwardListItem::encode):
2514 (WebKit::WebBackForwardListItem::decode):
2515 * Shared/WebBackForwardListItem.h: Copied from UIProcess/WebBackForwardListItem.h.
2516 * UIProcess/WebBackForwardListItem.cpp: Removed.
2517 * UIProcess/WebBackForwardListItem.h: Removed.
2520 * WebKit2.xcodeproj/project.pbxproj:
2521 * win/WebKit2.vcproj:
2523 2011-01-05 Anders Carlsson <andersca@apple.com>
2525 Reviewed by Sam Weinig.
2527 Handle smart insert/delete
2528 https://bugs.webkit.org/show_bug.cgi?id=51946
2530 * Shared/WebPageCreationParameters.cpp:
2531 (WebKit::WebPageCreationParameters::encode):
2532 (WebKit::WebPageCreationParameters::decode):
2533 * Shared/WebPageCreationParameters.h:
2534 Add isSmartInsertDelete enabled.
2536 * UIProcess/API/mac/WKView.mm:
2537 (-[WKView validateUserInterfaceItem:]):
2538 Handle toggleSmartInsertDelete:.
2540 (-[WKView toggleSmartInsertDelete:]):
2541 Toggle the smart insert/delete state.
2543 * UIProcess/TextChecker.h:
2544 Add isSmartInsertDeleteEnabled and setSmartInsertDeleteEnabled.
2546 * UIProcess/WebPageProxy.cpp:
2547 (WebKit::WebPageProxy::WebPageProxy):
2548 Initialize m_isSmartInsertDeleteEnabled.
2550 (WebKit::WebPageProxy::contextMenuItemSelected):
2551 Handle ContextMenuItemTagSmartCopyPaste.
2553 (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
2554 Update the state and send a SetSmartInsertDeleteEnabled message.
2556 (WebKit::WebPageProxy::creationParameters):
2557 Initialize isSmartInsertDeleteEnabled.
2559 * UIProcess/WebPageProxy.h:
2560 (WebKit::WebPageProxy::isSmartInsertDeleteEnabled):
2561 Return m_isSmartInsertDeleteEnabled.
2563 * UIProcess/mac/TextCheckerMac.mm:
2564 (WebKit::TextChecker::isSmartInsertDeleteEnabled):
2565 (WebKit::TextChecker::setSmartInsertDeleteEnabled):
2566 Store and fetch the smart insert delete state.
2568 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2569 (WebKit::WebEditorClient::smartInsertDeleteEnabled):
2570 Call WebPage::isSmartInsertDeleteEnabled.
2572 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2573 (WebKit::WebEditorClient::toggleSmartInsertDelete):
2574 Assert that this is never called.
2576 * WebProcess/WebPage/WebPage.cpp:
2577 (WebKit::WebPage::WebPage):
2578 Initialize m_isSmartInsertDeleteEnabled
2580 * WebProcess/WebPage/WebPage.h:
2581 (WebKit::WebPage::isSmartInsertDeleteEnabled):
2582 (WebKit::WebPage::setSmartInsertDeleteEnabled):
2583 Add getter and setter.
2585 * WebProcess/WebPage/WebPage.messages.in:
2586 Add SetSmartInsertDeleteEnabled message.
2588 2011-01-05 Anders Carlsson <andersca@apple.com>
2592 * WebProcess/WebPage/WebPage.cpp:
2594 2011-01-05 Anders Carlsson <andersca@apple.com>
2596 Reviewed by Adele Peterson.
2598 Implement word transformation
2599 https://bugs.webkit.org/show_bug.cgi?id=51943
2601 * UIProcess/API/mac/WKView.mm:
2602 (-[WKView validateUserInterfaceItem:]):
2603 Handle the word transformation selectors.
2605 (-[WKView uppercaseWord:]):
2606 (-[WKView lowercaseWord:]):
2607 (-[WKView capitalizeWord:]):
2608 Call down to the WebPageProxy.
2610 * UIProcess/WebPageProxy.cpp:
2611 (WebKit::WebPageProxy::uppercaseWord):
2612 (WebKit::WebPageProxy::lowercaseWord):
2613 (WebKit::WebPageProxy::capitalizeWord):
2614 Send messages to the WebPage.
2616 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2617 (WebKit::changeWordCase):
2618 Add helper function.
2620 (WebKit::WebEditorClient::uppercaseWord):
2621 (WebKit::WebEditorClient::lowercaseWord):
2622 (WebKit::WebEditorClient::capitalizeWord):
2623 Call helper function.
2625 * WebProcess/WebPage/WebPage.cpp:
2626 (WebKit::WebPage::changeSpellingToWord):
2627 Call replaceSelectionWithText.
2629 (WebKit::WebPage::uppercaseWord):
2630 (WebKit::WebPage::lowercaseWord):
2631 (WebKit::WebPage::capitalizeWord):
2632 Call the editor functions.
2634 (WebKit::WebPage::replaceSelectionWithText):
2635 New helper function that replaces the selected string with another string.
2637 * WebProcess/WebPage/WebPage.messages.in:
2640 2011-01-05 Alexey Proskuryakov <ap@apple.com>
2642 Reviewed by Anders Carlsson.
2644 https://bugs.webkit.org/show_bug.cgi?id=51935
2645 Add WebKit2 API for largest frame
2647 * UIProcess/API/C/WKPage.cpp:
2648 (WKPageGetFrameSetLargestFrame):
2649 * UIProcess/API/C/WKPage.h:
2651 2011-01-05 Anders Carlsson <andersca@apple.com>
2653 Reviewed by Sam Weinig.
2655 More work on spelling
2656 https://bugs.webkit.org/show_bug.cgi?id=51939
2658 * UIProcess/API/mac/WKView.mm:
2659 (-[WKView validateUserInterfaceItem:]):
2660 Handle changeSpelling: as well.
2662 (-[WKView showGuessPanel:]):
2663 Show or hide the guess panel.
2665 (-[WKView checkSpelling:]):
2666 Pass false to advanceToNextMisspelling.
2668 (-[WKView changeSpelling:]):
2669 Call changeSpellingToWord.
2671 * UIProcess/TextChecker.h:
2672 * UIProcess/WebPageProxy.cpp:
2673 (WebKit::WebPageProxy::WebPageProxy):
2674 Initialize m_pendingLearnOrIgnoreWordMessageCount.
2676 (WebKit::WebPageProxy::contextMenuItemSelected):
2677 Handle smart toggles directly in the UI process, keep track of whether
2678 we're asked to learn or ignore a word.
2680 (WebKit::WebPageProxy::advanceToNextMisspelling):
2681 Pass the boolean through.
2683 (WebKit::WebPageProxy::changeSpellingToWord):
2684 Send a ChangeSpellingToWord message.
2686 (WebKit::WebPageProxy::learnWord):
2687 (WebKit::WebPageProxy::ignoreWord):
2688 Check that we do have a pending learn or ignore word message. Call through to
2691 (WebKit::WebPageProxy::processDidCrash):
2692 Reset the m_pendingLearnOrIgnoreWordMessageCount variable.
2694 * UIProcess/WebPageProxy.h:
2695 * UIProcess/WebPageProxy.messages.in:
2698 * UIProcess/mac/TextCheckerMac.mm:
2699 (WebKit::TextChecker::learnWord):
2700 (WebKit::TextChecker::ignoreWord):
2701 Implement in terms of NSSpellChecker.
2703 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2704 (WebKit::WebEditorClient::ignoreWordInSpellDocument):
2705 (WebKit::WebEditorClient::learnWord):
2706 Send IgnoreWord and LearnWord messages.
2708 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2709 (WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution):
2710 (WebKit::WebEditorClient::toggleAutomaticLinkDetection):
2711 (WebKit::WebEditorClient::toggleAutomaticDashSubstitution):
2712 (WebKit::WebEditorClient::toggleAutomaticTextReplacement):
2715 * WebProcess/WebPage/WebPage.cpp:
2716 (WebKit::WebPage::advanceToNextMisspelling):
2717 Pass the bool along to the Editor.
2719 (WebKit::WebPage::changeSpellingToWord):
2720 Replace the selected text.
2722 * WebProcess/WebPage/WebPage.messages.in:
2723 Add new ChangeSpellingToWord message and add a boolean to AdvanceToNextMisspelling.
2725 2011-01-05 Anders Carlsson <andersca@apple.com>
2727 Reviewed by Dan Bernstein.
2729 Keep track of active text substitution preferences
2730 https://bugs.webkit.org/show_bug.cgi?id=51931
2732 * Shared/TextCheckerState.h:
2733 * UIProcess/API/mac/WKView.mm:
2734 (-[WKView validateUserInterfaceItem:]):
2735 Handle new selectors, mostly copied from WebKit1 code.
2737 (-[WKView orderFrontSubstitutionsPanel:]):
2738 Open the substitution panel.
2740 (-[WKView isAutomaticQuoteSubstitutionEnabled]):
2741 (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
2742 (-[WKView toggleAutomaticQuoteSubstitution:]):
2743 (-[WKView isAutomaticDashSubstitutionEnabled]):
2744 (-[WKView setAutomaticDashSubstitutionEnabled:]):
2745 (-[WKView toggleAutomaticDashSubstitution:]):
2746 (-[WKView isAutomaticLinkDetectionEnabled]):
2747 (-[WKView setAutomaticLinkDetectionEnabled:]):
2748 (-[WKView toggleAutomaticLinkDetection:]):
2749 (-[WKView isAutomaticTextReplacementEnabled]):
2750 (-[WKView setAutomaticTextReplacementEnabled:]):
2751 (-[WKView toggleAutomaticTextReplacement:]):
2752 Call the text checker, and update the state in the web process if needed.
2754 * UIProcess/TextChecker.h:
2757 * UIProcess/mac/TextCheckerMac.mm:
2758 (WebKit::initializeState):
2759 Initialize flags from user defaults.
2761 (WebKit::TextChecker::setAutomaticQuoteSubstitutionEnabled):
2762 (WebKit::TextChecker::setAutomaticDashSubstitutionEnabled):
2763 (WebKit::TextChecker::setAutomaticLinkDetectionEnabled):
2764 (WebKit::TextChecker::setAutomaticTextReplacementEnabled):
2765 Update and save the flags.
2767 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2768 (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
2769 (WebKit::WebEditorClient::isAutomaticLinkDetectionEnabled):
2770 (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
2771 (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
2772 Get the text checker state.
2774 2011-01-05 Dan Bernstein <mitz@apple.com>
2776 Rubber-stamped by Darin Adler.
2778 Cleaned up com.apple.WebProcess.sb
2780 * WebProcess/com.apple.WebProcess.sb: Moved the closing parentheses of multi-line blocks to
2781 their own lines. Changed to use WebKit-standard 4-space indentation.
2783 2011-01-05 Alexey Proskuryakov <ap@apple.com>
2785 Reviewed by Sam Weinig.
2787 https://bugs.webkit.org/show_bug.cgi?id=51903
2788 Tell UI process which subframe is largest
2790 * UIProcess/WebPageProxy.h:
2791 (WebKit::WebPageProxy::frameSetLargestFrame):
2792 Remember largest frame in frameset pages.
2794 * UIProcess/WebPageProxy.cpp:
2795 (WebKit::WebPageProxy::frameDidBecomeFrameSet): Reset stored largest frame if main frame
2796 changes to a frameset or back.
2797 (WebKit::WebPageProxy::frameSetLargestFrameChanged): Store a new largest frame when notified
2800 * UIProcess/WebPageProxy.messages.in: Added FrameSetLargestFrameChanged.
2802 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2803 (WebKit::area): Calculate area of a frame.
2804 (WebKit::findLargestFrameInFrameSet): Find largest first-level subframe in a frameset page.
2805 (WebKit::WebChromeClient::contentsSizeChanged): Recalculate largest frame, and notify UI
2806 process if it changed.
2808 * WebProcess/WebCoreSupport/WebChromeClient.h: Store the latest largest frame.
2810 * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::size):
2811 * WebProcess/WebPage/WebFrame.h:
2814 2011-01-04 Benjamin Poulain <benjamin.poulain@nokia.com>
2816 Reviewed by Kenneth Rohde Christiansen.
2818 [Qt] [WK2] Add support for non-trivial context menu action
2819 https://bugs.webkit.org/show_bug.cgi?id=51902
2821 Implement a call back from the QAction triggered in the UIProcess to the
2822 action in WebProcess.
2824 A few basic actions have been implemented based on this feature.
2826 * UIProcess/API/qt/qwkpage.cpp:
2827 (contextMenuActionForWebAction):
2828 (QWKPage::triggerAction):
2830 * UIProcess/API/qt/qwkpage.h:
2831 * UIProcess/qt/WebContextMenuProxyQt.cpp:
2832 (WebKit::webActionForContextMenuAction):
2834 2011-01-04 Siddharth Mathur <siddharth.mathur@nokia.com>
2836 Reviewed by Laszlo Gombos.
2838 Include unistd.h for sleep() for non-Windows builds.
2840 * WebProcess/WebProcess.cpp:
2841 * WebProcess/qt/WebProcessMainQt.cpp:
2843 2011-01-04 Brian Weinstein <bweinstein@apple.com>
2845 Windows build fix. Change the inline type of consumePermanently.
2847 * Shared/SandboxExtension.h:
2848 (WebKit::SandboxExtension::consumePermanently):
2850 2011-01-04 Anders Carlsson <andersca@apple.com>
2852 Reviewed by Dan Bernstein.
2854 <rdar://problem/8821203> Sandbox violations trying to access the Safari cache
2856 * Shared/SandboxExtension.h:
2857 (WebKit::SandboxExtension::consumePermanently):
2858 New function which consumes a sandbox extension and destroys it, making it impossible
2861 * Shared/WebProcessCreationParameters.cpp:
2862 (WebKit::WebProcessCreationParameters::encode):
2863 (WebKit::WebProcessCreationParameters::decode):
2864 Encode and decode the path extension handle.
2866 * Shared/mac/SandboxExtensionMac.mm:
2867 (WebKit::SandboxExtension::createHandle):
2868 Standardize the path before creating the handle.
2870 * UIProcess/mac/WebContextMac.mm:
2871 (WebKit::WebContext::platformInitializeWebProcess):
2872 Create a sandbox extension for the cache path.
2874 * WebProcess/mac/WebProcessMac.mm:
2875 (WebKit::WebProcess::platformInitializeWebProcess):
2876 Consume the sandbox extension.
2878 2011-01-04 Anders Carlsson <andersca@apple.com>
2882 * UIProcess/mac/TextCheckerMac.mm:
2883 (WebKit::TextChecker::getGuessesForWord):
2885 2011-01-04 Jeff Miller <jeffm@apple.com>
2887 Reviewed by Darin Adler.
2889 Mouse events in WebKit2 on Windows need to know whether the click activated the WebView to match WebKit1 behavior.
2890 https://bugs.webkit.org/show_bug.cgi?id=51228
2892 * Shared/WebEvent.h:
2893 (WebKit::WebMouseEvent::didActivateWebView):
2894 Add m_didActivateWebView to WebMouseEvent on Windows.
2896 * Shared/WebEventConversion.cpp:
2897 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2898 Propagate whether the click activated the WebView when converting to a PlatformMouseEvent.
2900 * Shared/WebMouseEvent.cpp:
2901 (WebKit::WebMouseEvent::WebMouseEvent):
2902 Add m_didActivateWebView to WebMouseEvent on Windows.
2904 (WebKit::WebMouseEvent::encode):
2905 (WebKit::WebMouseEvent::decode):
2906 Encode and decode new m_didActivateWebView member variable.
2908 * Shared/win/WebEventFactory.cpp:
2909 (WebKit::WebEventFactory::createWebMouseEvent):
2910 * Shared/win/WebEventFactory.h:
2911 Add didActivateWebView parameter to createWebMouseEvent().
2913 * UIProcess/win/WebView.cpp:
2914 (WebKit::WebView::wndProc):
2915 (WebKit::WebView::WebView):
2916 (WebKit::WebView::onMouseEvent):
2917 * UIProcess/win/WebView.h:
2918 (WebKit::WebView::setWasActivatedByMouseEvent):
2919 Keep track of whether the click activated the WebView.
2921 2011-01-04 Ivan Krstić <ike@apple.com>
2923 Reviewed and landed by Anders Carlsson.
2925 <rdar://problem/8602585>
2926 <rdar://problem/8711641>
2928 * WebProcess/com.apple.WebProcess.sb:
2929 Fix a misplaced right parenthesis and add a new system path regex.
2931 2011-01-04 Anders Carlsson <andersca@apple.com>
2933 Reviewed by Sam Weinig.
2935 More work on spelling and grammar
2936 https://bugs.webkit.org/show_bug.cgi?id=51910
2938 * Scripts/webkit2/messages.py:
2939 Add special case for WebCore::TextCheckingResult.
2941 * Shared/NotImplemented.h:
2942 Fix macro so that defining DISABLE_NOT_IMPLEMENTED_WARNINGS to 0 will enable the warnings.
2944 * Shared/WebCoreArgumentCoders.h:
2945 Add argument coders for WebCore::GrammarDetail and WebCore::TextCheckingResult.
2947 * UIProcess/API/mac/WKView.mm:
2948 (-[WKView checkSpelling:]):
2949 Call advanceToNextMisspelling.
2951 * UIProcess/TextChecker.h:
2952 Add new NSSpellChecker wrappers.
2954 * UIProcess/WebPageProxy.cpp:
2955 (WebKit::WebPageProxy::WebPageProxy):
2956 Initialize the new member variables.
2958 (WebKit::WebPageProxy::~WebPageProxy):
2959 Call TextChecker::closeSpellDocumentWithTag.
2961 (WebKit::WebPageProxy::advanceToNextMisspelling):
2962 Send the AdvanceToNextMisspelling message.
2964 (WebKit::WebPageProxy::spellDocumentTag):
2965 Create a spell document tag if necessary.
2967 (WebKit::WebPageProxy::checkTextOfParagraph):
2968 (WebKit::WebPageProxy::updateSpellingUIWithMisspelledWord):
2969 (WebKit::WebPageProxy::getGuessesForWord):
2970 Call the TextChecker.
2972 * UIProcess/WebPageProxy.messages.in:
2975 * UIProcess/mac/TextCheckerMac.mm:
2976 (WebKit::TextChecker::uniqueSpellDocumentTag):
2977 (WebKit::TextChecker::closeSpellDocumentWithTag):
2978 (WebKit::TextChecker::checkTextOfParagraph):
2979 (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2980 (WebKit::TextChecker::getGuessesForWord):
2981 Add NSSpellChecker wrappers.
2983 * UIProcess/qt/TextCheckerQt.cpp:
2984 * UIProcess/win/TextCheckerWin.cpp:
2987 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2988 (WebKit::WebEditorClient::isContinuousSpellCheckingEnabled):
2989 (WebKit::WebEditorClient::isGrammarCheckingEnabled):
2990 Get the text checking state from the web process.
2992 (WebKit::WebEditorClient::updateSpellingUIWithMisspelledWord):
2993 (WebKit::WebEditorClient::getGuessesForWord):
2994 Proxy calls to the UI process.
2996 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2997 (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
2999 (WebKit::WebEditorClient::checkTextOfParagraph):
3000 Proxy calls to the UI process.
3002 * WebProcess/WebPage/WebPage.cpp:
3003 (WebKit::WebPage::advanceToNextMisspelling):
3006 * WebProcess/WebPage/WebPage.messages.in:
3007 Add AdvanceToNextMisspelling message.
3009 * WebProcess/WebProcess.cpp:
3010 (WebKit::WebProcess::initializeWebProcess):
3011 Set the text checker state.
3013 2011-01-04 Chris Fleizach <cfleizach@apple.com>
3015 Unreviewed. Build fix.
3017 WK2: Support Accessibility
3018 https://bugs.webkit.org/show_bug.cgi?id=51859
3020 * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
3022 2011-01-04 Chris Fleizach <cfleizach@apple.com>
3024 Unreviewed. Build fix.
3026 WK2: Support Accessibility
3027 https://bugs.webkit.org/show_bug.cgi?id=51859
3029 * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
3030 (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
3032 2011-01-04 Chris Fleizach <cfleizach@apple.com>
3034 Reviewed by Sam Weinig.
3036 WK2: Support Accessibility
3037 https://bugs.webkit.org/show_bug.cgi?id=51859
3039 Implement remote accessibility API to support cross process accessibility
3040 on the Mac platform.
3042 * Shared/WebProcessCreationParameters.cpp:
3043 (WebKit::WebProcessCreationParameters::encode):
3044 (WebKit::WebProcessCreationParameters::decode):
3045 * Shared/WebProcessCreationParameters.h:
3046 * UIProcess/API/mac/PageClientImpl.h:
3047 * UIProcess/API/mac/PageClientImpl.mm:
3048 (WebKit::PageClientImpl::accessibilityChildTokenReceived):
3049 * UIProcess/API/mac/WKView.mm:
3050 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3051 (-[WKView _updateWindowAndViewFrames]):
3052 (-[WKView _setAccessibilityChildToken:]):
3053 (-[WKView accessibilityIsIgnored]):
3054 (-[WKView accessibilityHitTest:]):
3055 (-[WKView accessibilityAttributeValue:]):
3056 * UIProcess/API/mac/WKViewInternal.h:
3057 * UIProcess/PageClient.h:
3058 * UIProcess/WebContext.cpp:
3059 (WebKit::WebContext::ensureWebProcess):
3060 * UIProcess/WebPageProxy.cpp:
3061 (WebKit::WebPageProxy::windowAndViewFramesChanged):
3062 (WebKit::WebPageProxy::didReceiveAccessibilityPageToken):
3063 (WebKit::WebPageProxy::sendAccessibilityPresenterToken):
3064 * UIProcess/WebPageProxy.h:
3065 * UIProcess/WebPageProxy.messages.in:
3066 * WebKit2.xcodeproj/project.pbxproj:
3067 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3068 (WebKit::WebFrameLoaderClient::accessibilityRemoteObject):
3069 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3070 * WebProcess/WebPage/WebPage.cpp:
3071 (WebKit::WebPage::windowAndViewFramesChanged):
3072 * WebProcess/WebPage/WebPage.h:
3073 (WebKit::WebPage::accessibilityPosition):
3074 * WebProcess/WebPage/WebPage.messages.in:
3075 * WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Added.
3076 * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Added.
3077 (-[AccessibilityWebPageObject setWebPage:]):
3078 (-[AccessibilityWebPageObject setRemoteParent:]):
3079 (-[AccessibilityWebPageObject dealloc]):
3080 (-[AccessibilityWebPageObject accessibilityIsIgnored]):
3081 (-[AccessibilityWebPageObject accessibilityAttributeNames]):
3082 (-[AccessibilityWebPageObject accessibilityIsAttributeSettable:]):
3083 (-[AccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
3084 (-[AccessibilityWebPageObject accessibilityActionNames]):
3085 (-[AccessibilityWebPageObject accessibilityChildren]):
3086 (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
3087 (-[AccessibilityWebPageObject accessibilityShouldUseUniqueId]):
3088 (-[AccessibilityWebPageObject accessibilityHitTest:]):
3089 (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
3090 * WebProcess/WebPage/mac/WebPageMac.mm:
3091 (WebKit::WebPage::platformInitialize):
3092 (WebKit::WebPage::sendAccessibilityPresenterToken):
3093 (WebKit::WebPage::accessibilityRemoteObject):
3094 * WebProcess/WebProcess.cpp:
3095 (WebKit::WebProcess::initializeWebProcess):
3096 * WebProcess/WebProcess.h:
3097 (WebKit::WebProcess::presenterApplicationPid):
3098 * WebProcess/mac/WebProcessMainMac.mm:
3099 (WebKit::WebProcessMain):
3101 2011-01-04 Brady Eidson <beidson@apple.com>
3103 Reviewed by Darin Adler.
3105 Get rid of an extra copy in the back/forward item IPC message by using a DataReference.
3107 * UIProcess/WebBackForwardListItem.cpp:
3108 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3109 (WebKit::WebBackForwardListItem::setBackForwardData):
3110 * UIProcess/WebBackForwardListItem.h:
3112 * UIProcess/WebPageProxy.cpp:
3113 (WebKit::WebPageProxy::dataCallback): Get rid of no-longer-needed check for size 0.
3115 * UIProcess/WebProcessProxy.cpp:
3116 (WebKit::WebProcessProxy::addBackForwardItem):
3117 * UIProcess/WebProcessProxy.h:
3119 * UIProcess/WebProcessProxy.messages.in:
3121 * WebProcess/WebPage/EncoderAdapter.cpp:
3122 (WebKit::EncoderAdapter::data):
3123 * WebProcess/WebPage/EncoderAdapter.h:
3125 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3127 2011-01-04 Brady Eidson <beidson@apple.com>
3129 Reviewed by Darin Adler.
3131 Store more data per history entry in the session state blob.
3133 * UIProcess/WebBackForwardListItem.cpp:
3134 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3135 * UIProcess/WebBackForwardListItem.h:
3136 (WebKit::WebBackForwardListItem::create):
3138 * UIProcess/WebProcessProxy.cpp:
3139 (WebKit::WebProcessProxy::addBackForwardItem):
3141 * UIProcess/cf/WebBackForwardListCF.cpp:
3142 (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
3144 * UIProcess/cf/WebPageProxyCF.cpp:
3146 2011-01-04 Darin Adler <darin@apple.com>
3148 Reviewed by Brady Eidson.
3150 Add back/forward encoding and decoding to WebKit2
3151 https://bugs.webkit.org/show_bug.cgi?id=51901
3153 * GNUmakefile.am: Added new source files.
3154 * WebKit2.pro: Ditto.
3155 * WebKit2.xcodeproj/project.pbxproj: Ditto.
3156 * win/WebKit2.vcproj: Ditto.
3158 * WebProcess/WebPage/DecoderAdapter.cpp: Added.
3159 * WebProcess/WebPage/DecoderAdapter.h: Added.
3160 * WebProcess/WebPage/EncoderAdapter.cpp: Added.
3161 * WebProcess/WebPage/EncoderAdapter.h: Added.
3163 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3164 (WebKit::updateBackForwardItem): Added code to encode the back/forward
3165 tree and send it along. The code to decode needs to wait on Brady's
3168 2011-01-04 Anders Carlsson <andersca@apple.com>
3170 Reviewed by Sam Weinig.
3172 <rdar://problem/8766999> WebKit2: Sandboxing causes certificate error on access to any HTTPS URL
3174 Allow read access to /Library/Preferences/com.apple.security.plist.
3176 * WebProcess/com.apple.WebProcess.sb:
3178 2011-01-04 Anders Carlsson <andersca@apple.com>
3182 * UIProcess/qt/TextCheckerQt.cpp:
3183 * UIProcess/win/TextCheckerWin.cpp:
3185 2011-01-04 Anders Carlsson <andersca@apple.com>
3187 Reviewed by Darin Adler.
3189 Don't use macros for the key names.
3191 * UIProcess/mac/TextCheckerMac.mm:
3193 2011-01-04 Anders Carlsson <andersca@apple.com>
3195 Reviewed by Sam Weinig.
3197 Send over text checker state to the web process
3198 https://bugs.webkit.org/show_bug.cgi?id=51896
3200 * Platform/CoreIPC/Arguments.h:
3201 Remove 'const' from the argument, this matches all the other Arguments classes.
3203 * Shared/TextCheckerState.h: Added.
3204 New class with text checker state.
3206 * Shared/WebProcessCreationParameters.cpp:
3207 (WebKit::WebProcessCreationParameters::encode):
3208 (WebKit::WebProcessCreationParameters::decode):
3209 * Shared/WebProcessCreationParameters.h:
3210 Add textCheckerState.
3212 * UIProcess/API/mac/WKView.mm:
3213 (-[WKView validateUserInterfaceItem:]):
3214 (-[WKView toggleContinuousSpellChecking:]):
3215 (-[WKView toggleGrammarChecking:]):
3216 (-[WKView toggleAutomaticSpellingCorrection:]):
3217 Get the needed flags from the text checker state.
3219 * UIProcess/TextChecker.h:
3220 Add state() function, remove getters.
3222 * UIProcess/WebContext.cpp:
3223 (WebKit::WebContext::ensureWebProcess):
3224 Initialize the text checker state.
3226 * UIProcess/WebProcessProxy.cpp:
3227 (WebKit::WebProcessProxy::updateTextCheckerState):
3228 Send the SetTextCheckerState message to the web process.
3230 * UIProcess/mac/TextCheckerMac.mm:
3231 (WebKit::initializeState):
3232 Initialize the state from the user defaults.
3234 (WebKit::TextChecker::state):
3237 (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3238 (WebKit::TextChecker::setGrammarCheckingEnabled):
3239 (WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
3240 Make sure to write the new state.
3242 * UIProcess/qt/TextCheckerQt.cpp:
3243 (WebKit::TextChecker::state):
3244 * UIProcess/win/TextCheckerWin.cpp:
3245 (WebKit::TextChecker::state):
3248 * WebKit2.xcodeproj/project.pbxproj:
3249 Add TextCheckerState.h.
3251 * WebProcess/WebProcess.cpp:
3252 (WebKit::WebProcess::WebProcess):
3253 Initialize m_textCheckerState.
3255 (WebKit::WebProcess::setTextCheckerState):
3258 * WebProcess/WebProcess.messages.in:
3259 Add SetTextCheckerState message.
3261 * win/WebKit2.vcproj:
3262 Add TextCheckerState.h.
3264 2011-01-04 Brady Eidson <beidson@apple.com>
3266 Rubberstamped by Anders Carlsson.
3268 Attach a radar # to this FIXME:
3269 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3271 2011-01-04 Anders Carlsson <andersca@apple.com>
3273 Reviewed by John Sullivan.
3275 Add more spelling/grammar related methods
3276 https://bugs.webkit.org/show_bug.cgi?id=51886
3278 * UIProcess/API/mac/WKView.mm:
3279 (-[WKView validateUserInterfaceItem:]):
3280 Handle more selectors.
3282 (-[WKView showGuessPanel:]):
3285 (-[WKView checkSpelling:]):
3288 (-[WKView toggleAutomaticSpellingCorrection:]):
3289 Toggle automatic spelling correction.
3291 * UIProcess/TextChecker.h:
3292 Add setAutomaticSpellingCorrectionEnabled and isAutomaticSpellingCorrectionEnabled.
3294 * UIProcess/mac/TextCheckerMac.mm:
3295 (WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
3296 (WebKit::TextChecker::isAutomaticSpellingCorrectionEnabled):
3299 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3300 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
3301 Add a Radar URL for the localization FIXMEs.
3303 2011-01-04 Brent Fulgham <bfulgham@webkit.org>
3305 Unreviewed build fix.
3307 * win/WebKit2.vcproj: Correct the missing $(WebKitVSPropsRedirectionDir)
3308 variables that Visual Studio helpfully removes when making changes.
3310 2011-01-04 Brent Fulgham <bfulgham@webkit.org>
3312 Unreviewed build fix.
3314 * win/WebKit2.vcproj: Disable CG-specific WKImageCG.cpp from
3315 Debug_Cairo_CFLite/Release_Cario_CFLite builds.
3317 2011-01-04 Brady Eidson <beidson@apple.com>
3319 Reviewed by Darin Adler.
3321 https://bugs.webkit.org/show_bug.cgi?id=51856
3322 Pass encoded back/forward tree data from the WebProcess to the UIProcess
3324 Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
3325 * UIProcess/API/C/WKBackForwardListItem.cpp:
3326 * UIProcess/API/C/WKBackForwardListItem.h:
3327 * UIProcess/API/qt/qwkhistory.cpp:
3328 * UIProcess/API/qt/qwkhistory.h:
3330 * UIProcess/WebBackForwardListItem.cpp:
3331 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3332 * UIProcess/WebBackForwardListItem.h:
3333 (WebKit::WebBackForwardListItem::create):
3334 (WebKit::WebBackForwardListItem::setBackForwardData):
3335 (WebKit::WebBackForwardListItem::backForwardData):
3337 * UIProcess/WebProcessProxy.cpp:
3338 (WebKit::WebProcessProxy::addBackForwardItem):
3339 * UIProcess/WebProcessProxy.h:
3341 * UIProcess/WebProcessProxy.messages.in:
3343 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3344 (WebKit::updateBackForwardItem):
3346 2011-01-04 Balazs Kelemen <kbalazs@webkit.org>
3348 Reviewed by Kenneth Rohde Christiansen.
3350 [Qt][WK2] Incomplete clean up on termination
3351 https://bugs.webkit.org/show_bug.cgi?id=51474
3353 Do not kill the web process to force it's termination.
3354 Fix object destruction and cleanup logic and make the cleanup more reliable.
3355 Do not try to cleanup on crash because it is not reliable.
3357 * Platform/CoreIPC/qt/ConnectionQt.cpp:
3358 (CoreIPC::Connection::platformInvalidate): Do not delete the socket if we
3359 do not own it. This is the case with a server connection.
3360 * Platform/qt/MappedMemoryPool.cpp:
3361 Turn MappedMemoryPool into a QObject so the CleanupHandler can destruct it
3362 in the same way as the other objects.
3363 (WebKit::MappedMemoryPool::instance):
3364 (WebKit::MappedMemoryPool::~MappedMemoryPool):
3365 * Platform/qt/MappedMemoryPool.h:
3366 (WebKit::MappedMemoryPool::MappedMemoryPool):
3367 * Platform/qt/SharedMemoryQt.cpp:
3368 (WebKit::SharedMemory::create): No need to care about QCoreApplication::aboutToQuit.
3369 It is handled by the CleanupHandler.
3370 (WebKit::SharedMemory::~SharedMemory): Ditto.
3371 * Shared/qt/CleanupHandler.cpp: Renamed from WebKit2/Shared/qt/CrashHandler.cpp.
3372 No longer try to handle crash but just normal termination.
3373 (WebKit::CleanupHandler::CleanupHandler): Connect deleteObjects with QCoreApplication::aboutToQuit.
3374 Ensure appropriate thread affinity.
3375 (WebKit::CleanupHandler::sigTermHandler): Stop the main event loop.
3376 (WebKit::CleanupHandler::deleteObjects): Use deleteLater instead of delete since it is more reliable.
3377 * Shared/qt/CleanupHandler.h: Renamed from WebKit2/Shared/qt/CrashHandler.h.
3378 (WebKit::CleanupHandler::instance):
3379 (WebKit::CleanupHandler::markForCleanup):
3380 (WebKit::CleanupHandler::unmark):
3381 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3382 Do not kill the web process immidiately but give it a chance to cleanup.
3383 Use QLocalServer::removeServer for assuring that the socket file will be removed.
3384 (WebKit::ProcessLauncherHelper::serverName):
3385 (WebKit::cleanupAtExit): Renamed from cleanupProcesses. Only kill the web process when it times
3386 out terminating. Fixed the bug of changing the list while iterating it over by disconnecting
3387 from the processStateChanged slot.
3388 (WebKit::QtWebProcess::QtWebProcess): Added missing meta type registration of QProcess::ProcessState.
3389 (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
3390 (WebKit::ProcessLauncherHelper::ProcessLauncherHelper): No need to add the the instance to the
3391 CleanupHandler because we will remove the socket file in cleanupAtExit.
3392 (WebKit::ProcessLauncherHelper::instance):
3393 (WebKit::ProcessLauncher::terminateProcess):
3396 2011-01-04 Benjamin Poulain <benjamin.poulain@nokia.com>
3398 Reviewed by Kenneth Rohde Christiansen.
3400 [Qt] [WK2] create an initial implementation of the context menu handling for WebKit 2
3401 https://bugs.webkit.org/show_bug.cgi?id=51825
3403 Implement the necessary methods to get a basic context menu working for Qt.
3405 Only 4 basic WebAction have been added on the UIProcess side: back, forward, stop and reload.
3407 * UIProcess/API/qt/qgraphicswkview.cpp:
3408 (QGraphicsWKView::QGraphicsWKView):
3409 (QGraphicsWKView::showContextMenu):
3410 (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
3411 * UIProcess/API/qt/qgraphicswkview.h:
3412 * UIProcess/API/qt/qwkpage.cpp:
3413 (QWKPagePrivate::createContextMenuProxy):
3414 * UIProcess/API/qt/qwkpage.h:
3415 * UIProcess/qt/WebContextMenuProxyQt.cpp:
3416 (WebKit::webActionForContextMenuAction):
3417 (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3418 (WebKit::WebContextMenuProxyQt::create):
3419 (WebKit::WebContextMenuProxyQt::showContextMenu):
3420 (WebKit::WebContextMenuProxyQt::hideContextMenu):
3421 (WebKit::WebContextMenuProxyQt::createContextMenu):
3422 * UIProcess/qt/WebContextMenuProxyQt.h:
3424 2011-01-03 Yi Shen <yi.4.shen@nokia.com>
3426 Reviewed by Adam Barth.
3428 [Qt] Add SelectAll option to the context menu for the editor
3429 https://bugs.webkit.org/show_bug.cgi?id=50049
3431 Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
3433 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3434 (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
3435 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3437 2011-01-03 Sam Weinig <sam@webkit.org>
3439 Reviewed by Anders Carlsson.
3441 Ensure that the correct initial focusable area is focused when tabbing
3442 and shift-tabbing into the WKView.
3444 * UIProcess/API/mac/WKView.mm:
3445 (-[WKView becomeFirstResponder]): Use the keyViewSelectionDirection to set
3448 2011-01-02 Dan Bernstein <mitz@apple.com>
3450 Rubber-stamped by Simon Fraser.
3452 <rdar://problem/8812159> Update copyright strings
3455 * WebProcess/Info.plist:
3457 2011-01-02 Benjamin Poulain <benjamin.poulain@nokia.com>
3459 Reviewed by Csaba Osztrogonác.
3461 WebKit 2 does not build on 64bits with a recent GCC
3462 https://bugs.webkit.org/show_bug.cgi?id=51754
3464 Change the argument coding for DatabaseDetails to use explicitly the 64 bits type.
3466 * Shared/OriginAndDatabases.h:
3467 * Shared/WebCoreArgumentCoders.h:
3469 2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
3471 Reviewed by Adam Barth.
3473 Move JavaScriptCore to Source
3474 https://bugs.webkit.org/show_bug.cgi?id=51604
3476 Workaround until moving all sources to Source directory is finished.
3478 * Scripts/generate-forwarding-headers.pl: Add Sources to searching path for JavaScriptCore.
3480 2011-01-01 Adam Barth <abarth@webkit.org>
3482 Speculative build fix for Qt. Add some more include paths.
3486 2011-01-01 Adam Barth <abarth@webkit.org>
3488 Reviewed by Eric Seidel.
3490 Move JavaScriptCore to Source
3491 https://bugs.webkit.org/show_bug.cgi?id=51604
3494 - Point to JavaScriptCore in its new location.
3496 2010-12-15 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
3498 Reviewed by Martin Robinson.
3500 [GTK] Enable building whatever already exists of WebKit2
3501 https://bugs.webkit.org/show_bug.cgi?id=37369
3503 * GNUmakefile.am: Added.
3504 * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header
3505 file for WebKit2 sources files.
3507 * gtk/webkit2.pc.in: Added.
3509 2010-12-29 Juha Savolainen <juha.savolainen@weego.fi>
3511 Reviewed by Kenneth Rohde Christiansen.
3513 [Qt] [WK2] Added more webattributes to the qwkpreferences
3514 https://bugs.webkit.org/show_bug.cgi?id=51697
3516 Added PrivateBrowsingEnabled, DeveloperExtrasEnabled, DnsPrefetchEnabled attributes
3518 * UIProcess/API/qt/qwkpreferences.cpp:
3519 (QWKPreferences::testAttribute):
3520 (QWKPreferences::setAttribute):
3521 * UIProcess/API/qt/qwkpreferences.h:
3523 2010-12-27 Sam Weinig <sam@webkit.org>
3525 Reviewed by Anders Carlsson.
3527 WebKit2 snapshots should contain accelerated content
3528 <rdar://problem/8807393>
3529 https://bugs.webkit.org/show_bug.cgi?id=51660
3531 When creating a snapshot, flatten the layer tree for painting so that
3532 accelerated content is included in the snapshot.
3534 * WebProcess/WebPage/WebPage.cpp:
3535 (WebKit::WebPage::snapshotInViewCoordinates):
3536 (WebKit::WebPage::snapshotInDocumentCoordinates):
3538 2010-12-27 Daniel Bates <dbates@rim.com>
3540 Attempt to fix the WebKit2 Windows build after changeset 74698
3541 <http://trac.webkit.org/changeset/74698> (bug #51656).
3543 Add "..\Shared\API\c\WKImage.h" to WebKit2Generated.make.
3545 * win/WebKit2Generated.make:
3547 2010-12-27 Sam Weinig <sam@webkit.org>
3549 Reviewed by Anders Carlsson.
3551 WebKit2: Add API for getting snapshots
3552 https://bugs.webkit.org/show_bug.cgi?id=51656
3554 * Shared/API/c/WKBase.h:
3555 * Shared/API/c/WKImage.cpp: Added.
3559 * Shared/API/c/WKImage.h: Added.
3560 * Shared/WebImage.cpp: Added.
3561 (WebKit::WebImage::create):
3562 (WebKit::WebImage::size):
3563 * Shared/WebImage.h: Added.
3564 (WebKit::WebImage::backingStore):
3565 (WebKit::WebImage::WebImage):
3566 (WebKit::WebImage::type):
3567 Add a general purpose API image class.
3569 * Shared/API/c/cg: Added.
3570 * Shared/API/c/cg/WKImageCG.cpp: Added.
3571 (WKImageCreateCGImage):
3572 * Shared/API/c/cg/WKImageCG.h: Added.
3573 Add function to convert a WKImageRef to a CGImageRef for platforms that use CG.
3575 * Shared/API/c/WKSharedAPICast.h:
3576 (WebKit::toFloatRect):
3577 (WebKit::toIntSize):
3578 (WebKit::toIntPoint):
3579 (WebKit::toIntRect):
3580 (WebKit::toImageOptions):
3581 Make conversion functions that are ambiguous more explicit.
3583 * Shared/APIObject.h:
3584 * Shared/BackingStore.h:
3585 (WebKit::BackingStore::isBackedBySharedMemory):
3586 * Shared/ImageOptions.h: Added.
3587 * Shared/UserMessageCoders.h:
3588 (WebKit::UserMessageEncoder::baseEncode):
3589 (WebKit::UserMessageDecoder::baseDecode):
3590 Allow a WKImageRef to be passed in user messages. Right now, it only
3591 works if the image is sharable.
3593 * UIProcess/API/C/WKPage.cpp:
3594 (WKPageScaleWebView):
3595 * UIProcess/WebUIClient.cpp:
3596 (WebKit::WebUIClient::windowFrame):
3597 Use the more explicit conversion function name.
3599 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3600 (WKBundlePageCreateSnapshotInViewCoordinates):
3601 (WKBundlePageCreateSnapshotInDocumentCoordinates):
3602 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3603 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3604 (WKBundlePageOverlaySetNeedsDisplay):
3605 * WebProcess/WebPage/WebPage.cpp:
3606 (WebKit::WebPage::snapshotInViewCoordinates):
3607 (WebKit::WebPage::snapshotInDocumentCoordinates):
3608 Add function to take the snapshot.
3610 * WebProcess/WebPage/WebPage.h:
3612 * WebKit2.xcodeproj/project.pbxproj:
3613 * win/WebKit2.vcproj:
3616 2010-12-27 Sam Weinig <sam@webkit.org>
3618 Reviewed by Anders Carlsson.
3620 WebKit2: Add additional API for managing databases
3621 https://bugs.webkit.org/show_bug.cgi?id=51629
3623 - Adds client for the database manager to get notifications
3624 of changes to databases.
3626 * UIProcess/API/C/WKDatabaseManager.cpp:
3627 (WKDatabaseManagerSetClient):
3628 * UIProcess/API/C/WKDatabaseManager.h:
3629 * UIProcess/WebDatabaseManagerProxy.cpp:
3630 (WebKit::WebDatabaseManagerProxy::initializeClient):
3631 (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
3632 (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
3633 * UIProcess/WebDatabaseManagerProxy.h:
3634 * UIProcess/WebDatabaseManagerProxy.messages.in:
3635 * UIProcess/WebDatabaseManagerProxyClient.cpp: Added.
3636 (WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
3637 (WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
3638 * UIProcess/WebDatabaseManagerProxyClient.h: Added.
3640 * WebKit2.xcodeproj/project.pbxproj:
3641 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3642 (WebKit::WebDatabaseManager::WebDatabaseManager):
3643 (WebKit::WebDatabaseManager::~WebDatabaseManager):
3644 (WebKit::WebDatabaseManager::dispatchDidModifyOrigin):
3645 (WebKit::WebDatabaseManager::dispatchDidModifyDatabase):
3646 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3647 * win/WebKit2.vcproj:
3649 2010-12-27 Sam Weinig <sam@webkit.org>
3651 Reviewed by Anders Carlsson.
3653 WebKit2: Add additional API for managing databases
3654 https://bugs.webkit.org/show_bug.cgi?id=51629
3656 - Adds WKDatabaseManagerGetDatabasesByOrigin, which asynchronously returns
3657 an array of dictionaries containing details about each origin using
3658 databases and details about each database. Keys were added for accessing
3659 the data in the dictionaries.
3660 - Adds WKDatabaseManagerDeleteDatabasesWithNameForOrigin to delete a database
3661 with a specific identifier.
3662 - Adds WKDatabaseManagerSetQuotaForOrigin to set the quota for an origin.
3664 * Shared/OriginAndDatabases.cpp: Added.
3665 (WebKit::OriginAndDatabases::encode):
3666 (WebKit::OriginAndDatabases::decode):
3667 * Shared/OriginAndDatabases.h: Added.
3668 * Shared/WebCoreArgumentCoders.h:
3669 * UIProcess/API/C/WKDatabaseManager.cpp:
3670 (WKDatabaseManagerGetOriginKey):
3671 (WKDatabaseManagerGetOriginQuotaKey):
3672 (WKDatabaseManagerGetOriginUsageKey):
3673 (WKDatabaseManagerGetDatabaseDetailsKey):
3674 (WKDatabaseManagerGetDatabaseDetailsNameKey):
3675 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
3676 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
3677 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
3678 (WKDatabaseManagerGetDatabasesByOrigin):
3679 (callGetDatabasesByOriginBlockAndDispose):
3680 (WKDatabaseManagerGetDatabasesByOrigin_b):
3681 (WKDatabaseManagerGetDatabaseOrigins):
3682 (callGetDatabaseOriginsBlockBlockAndDispose):
3683 (WKDatabaseManagerGetDatabaseOrigins_b):
3684 (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
3685 (WKDatabaseManagerDeleteDatabasesForOrigin):
3686 (WKDatabaseManagerDeleteAllDatabases):
3687 (WKDatabaseManagerSetQuotaForOrigin):
3688 * UIProcess/API/C/WKDatabaseManager.h:
3689 * UIProcess/WebDatabaseManagerProxy.cpp:
3690 (WebKit::WebDatabaseManagerProxy::originKey):
3691 (WebKit::WebDatabaseManagerProxy::originQuotaKey):
3692 (WebKit::WebDatabaseManagerProxy::originUsageKey):
3693 (WebKit::WebDatabaseManagerProxy::databaseDetailsKey):
3694 (WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey):
3695 (WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey):
3696 (WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey):
3697 (WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey):
3698 (WebKit::WebDatabaseManagerProxy::invalidate):
3699 (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
3700 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
3701 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
3702 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
3703 (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
3704 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
3705 (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
3706 * UIProcess/WebDatabaseManagerProxy.h:
3707 * UIProcess/WebDatabaseManagerProxy.messages.in:
3709 * WebKit2.xcodeproj/project.pbxproj:
3710 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3711 (WebKit::WebDatabaseManager::getDatabasesByOrigin):
3712 (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
3713 (WebKit::WebDatabaseManager::setQuotaForOrigin):
3714 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3715 * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
3716 * win/WebKit2.vcproj:
3718 2010-12-26 Anders Carlsson <andersca@apple.com>
3720 Reviewed by Dan Bernstein.
3722 Rename DrawingAreaMessage and DrawingAreaLegacyMessage and
3723 DrawingAreaProxyMessage to DrawingAreaProxyLegacyMessage.
3725 * Platform/CoreIPC/MessageID.h:
3726 * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
3727 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
3728 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
3729 (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
3730 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
3731 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
3732 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
3733 (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
3734 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
3735 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
3736 (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
3737 (WebKit::LayerBackedDrawingAreaProxy::update):
3738 (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
3739 (WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
3740 * UIProcess/TiledDrawingAreaProxy.cpp:
3741 (WebKit::TiledDrawingAreaProxy::sizeDidChange):
3742 (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
3743 (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
3744 (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
3745 (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
3746 (WebKit::TiledDrawingAreaProxy::takeSnapshot):
3747 (WebKit::TiledDrawingAreaProxy::removeTile):
3748 * UIProcess/WebPageProxy.cpp:
3749 (WebKit::WebPageProxy::didReceiveMessage):
3750 (WebKit::WebPageProxy::didReceiveSyncMessage):
3751 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3752 (WebKit::ChunkedUpdateDrawingArea::display):
3753 (WebKit::ChunkedUpdateDrawingArea::setSize):
3754 (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
3755 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3756 (WebKit::LayerBackedDrawingArea::setSize):
3757 (WebKit::LayerBackedDrawingArea::didReceiveMessage):
3758 * WebProcess/WebPage/TiledDrawingArea.cpp:
3759 (WebKit::TiledDrawingArea::display):
3760 (WebKit::TiledDrawingArea::setSize):
3761 (WebKit::TiledDrawingArea::updateTile):
3762 (WebKit::TiledDrawingArea::tileUpdateTimerFired):
3763 (WebKit::TiledDrawingArea::didReceiveMessage):
3764 * WebProcess/WebPage/WebPage.cpp:
3765 (WebKit::WebPage::didReceiveMessage):
3766 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3767 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
3769 2010-12-26 Anders Carlsson <andersca@apple.com>
3771 Reviewed by Sam Weinig.
3773 Drawing area cleanup. Remove a bunch of redundant functions that just ended
3774 up calling setNeedsDisplay.
3776 * UIProcess/DrawingAreaProxy.h:
3777 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3778 (WebKit::WebChromeClient::invalidateWindow):
3779 (WebKit::WebChromeClient::invalidateContentsAndWindow):
3780 (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
3781 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3782 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3783 * WebProcess/WebPage/DrawingArea.h:
3784 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3785 * WebProcess/WebPage/LayerBackedDrawingArea.h:
3786 * WebProcess/WebPage/TiledDrawingArea.cpp:
3787 * WebProcess/WebPage/TiledDrawingArea.h:
3789 2010-12-25 Sam Weinig <sam@webkit.org>
3791 Reviewed by Dan Bernstein.
3793 Fill in some more preferences for WebKit2
3794 https://bugs.webkit.org/show_bug.cgi?id=51610
3796 * Shared/WebPreferencesStore.h:
3797 * UIProcess/API/C/WKPreferences.cpp:
3798 (WKPreferencesSetAuthorAndUserStylesEnabled):
3799 (WKPreferencesGetAuthorAndUserStylesEnabled):
3800 (WKPreferencesSetWebArchiveDebugModeEnabled):
3801 (WKPreferencesGetWebArchiveDebugModeEnabled):
3802 (WKPreferencesSetLocalFileContentSniffingEnabled):
3803 (WKPreferencesGetLocalFileContentSniffingEnabled):
3804 (WKPreferencesSetPageCacheEnabled):
3805 (WKPreferencesGetPageCacheEnabled):
3806 (WKPreferencesSetPaginateDuringLayoutEnabled):
3807 (WKPreferencesGetPaginateDuringLayoutEnabled):
3808 (WKPreferencesSetDOMPasteAllowedEnabled):
3809 (WKPreferencesGetDOMPasteAllowedEnabled):
3810 * UIProcess/API/C/WKPreferences.h:
3811 * UIProcess/API/C/WKPreferencesPrivate.h:
3812 * WebProcess/WebPage/WebPage.cpp:
3813 (WebKit::WebPage::updatePreferences):
3814 Pipe through some more preferences.
3816 2010-12-24 Dan Bernstein <mitz@apple.com>
3818 Reviewed by Alexey Proskuryakov.
3820 REGRESSION (r74648): XHR layout test failures
3821 https://bugs.webkit.org/show_bug.cgi?id=51603
3825 * UIProcess/WebPageProxy.cpp:
3826 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
3827 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3828 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
3829 * WebProcess/mac/WebProcessMainMac.mm:
3830 (WebKit::WebProcessMain):
3832 2010-12-24 Simon Fraser <simon.fraser@apple.com>
3834 Fix the Qt build after r74650.
3836 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3838 2010-12-24 Benjamin Poulain <ikipou@gmail.com>
3840 Reviewed by Darin Adler.
3842 [Qt] [WK2] WebKit 2 does not build on mac, missing reference to RetainPtr
3843 https://bugs.webkit.org/show_bug.cgi?id=51598
3845 Fix the build, add the missing header.
3847 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3849 2010-12-24 Dan Bernstein <mitz@apple.com>
3851 Reviewed by Anders Carlsson.
3853 <rdar://problem/8758386> The web process uses its own credential storage
3854 https://bugs.webkit.org/show_bug.cgi?id=51599
3856 * UIProcess/WebPageProxy.cpp:
3857 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Try to answer the challenge using
3858 the UI process’s credential storage first.
3859 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3860 (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Prevent the web process from using
3861 its own credential storage.
3862 * WebProcess/mac/WebProcessMainMac.mm:
3863 (WebKit::WebProcessMain): Ditto.
3865 2010-12-23 Dan Bernstein <mitz@apple.com>
3867 Reviewed by Sam Weinig.
3869 Make dragging work again after r74591.
3871 * UIProcess/WebPageProxy.cpp:
3872 (WebKit::WebPageProxy::didReceiveEvent): Fixed a typo.
3874 2010-12-23 Jessie Berlin <jberlin@apple.com>
3876 Reviewed by Sam Weinig.
3878 Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
3879 https://bugs.webkit.org/show_bug.cgi?id=51563
3881 Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).
3883 * Shared/API/c/WKSecurityOrigin.cpp:
3884 (WKSecurityOriginCreateFromIdentifier):
3885 Renamed so as not to clash with the new WKSecurityOriginCreate.
3886 (WKSecurityOriginCreate):
3887 * Shared/API/c/WKSecurityOrigin.h:
3888 * Shared/WebSecurityOrigin.h:
3889 (WebKit::WebSecurityOrigin::create):
3891 2010-12-23 Anders Carlsson <andersca@apple.com>
3893 Reviewed by Simon Fraser.
3895 Ensure that we are not getting too many mouse move events
3896 https://bugs.webkit.org/show_bug.cgi?id=51568
3897 <rdar://problem/7881470>
3898 <rdar://problem/8735512>
3900 Implement throttling of mouse move events.
3902 * UIProcess/WebPageProxy.cpp:
3903 (WebKit::WebPageProxy::WebPageProxy):
3904 Initialize m_processingMouseMoveEvent to false.
3906 (WebKit::WebPageProxy::handleMouseEvent):
3907 If we're already processing a mouse move events, just update
3908 m_nextMouseMoveEvent and return.
3910 (WebKit::WebPageProxy::didReceiveEvent):
3911 If we received a mouse move event, send the next mouse move event if there is one.
3913 2010-12-23 Brian Weinstein <bweinstein@apple.com>
3915 Reviewed by Anders Carlsson.
3917 Assertion when loading www.yahoo.com in WebKit2 under decodeResourceRequest
3918 https://bugs.webkit.org/show_bug.cgi?id=51562
3920 Don't assert that our data reference isn't empty when we try to get the data from it.
3921 If it is empty, just return 0.
3923 All callers are safe with this function returning 0.
3925 * Platform/CoreIPC/DataReference.h:
3926 (CoreIPC::DataReference::data): Change the assert to an early return.
3927 * Shared/cf/ArgumentCodersCF.cpp:
3928 (CoreIPC::decode): Add an assert, and remove a ternarny operator because the function now does
3929 this for us (if the data is empty, return 0).
3931 2010-12-23 Sam Weinig <sam@webkit.org>
3933 Fix incorrect assertion causing all pages with subframes to crash.
3935 * UIProcess/WebFrameProxy.cpp:
3936 (WebKit::WebFrameProxy::appendChild):
3938 2010-12-23 Anders Carlsson <andersca@apple.com>
3940 Reviewed by Darin Adler.
3942 Clean up the selection handling code
3943 https://bugs.webkit.org/show_bug.cgi?id=51550
3945 * Shared/SelectionState.h: Added.
3946 Add SelectionState class which hold information about the current selection.
3948 * UIProcess/API/mac/PageClientImpl.h:
3949 * UIProcess/API/mac/PageClientImpl.mm:
3950 Remove selectionChanged function.
3952 * UIProcess/API/mac/WKView.mm:
3953 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3954 Remove all the selection related state; it lives in the WebPageProxy object now.
3956 (-[WKView insertText:]):
3957 (-[WKView selectedRange]):
3958 (-[WKView hasMarkedText]):
3959 Get the selection information from the WebPageProxy.
3961 * UIProcess/API/mac/WKViewInternal.h:
3962 Remove _selectionChanged declaration.
3964 * UIProcess/PageClient.h:
3965 Remove selectionChanged functions.
3967 * UIProcess/WebPageProxy.cpp:
3968 (WebKit::WebPageProxy::selectionStateChanged):
3969 Update the selection state.
3971 * UIProcess/WebPageProxy.h:
3972 (WebKit::WebPageProxy::selectionState):
3973 Return the selection state.
3975 * UIProcess/WebPageProxy.messages.in:
3976 Add SelectionStateChanged message.
3978 * UIProcess/win/WebView.cpp:
3979 (WebKit::WebView::WebView):
3980 Remove all the selection related state; it lives in the WebPageProxy object now.
3982 (WebKit::WebView::compositionSelectionChanged):
3983 (WebKit::WebView::onIMEComposition):
3984 (WebKit::WebView::onIMEEndComposition):
3985 (WebKit::WebView::onIMERequestCharPosition):
3986 (WebKit::WebView::onIMERequest):
3987 Get the selection information from the WebPageProxy.
3989 * WebKit2.xcodeproj/project.pbxproj:
3990 Add SelectionState.h
3992 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3993 (WebKit::WebEditorClient::respondToChangedSelection):
3994 Send a SelectionStateChanged message with the updated state.
3996 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3997 Remove mac specific code.
3999 * WebProcess/WebPage/WebPage.cpp:
4000 (WebKit::WebPage::getLocationAndLengthFromRange):
4001 Rename this function from convertRangeToPlatformRange and move it out of WebPageMac.mm
4003 * WebProcess/WebPage/mac/WebPageMac.mm:
4004 (WebKit::WebPage::getMarkedRange):
4005 (WebKit::WebPage::characterIndexForPoint):
4006 Call getLocationAndLengthFromRange.
4008 * win/WebKit2.vcproj:
4009 Add SelectionState.h
4011 2010-12-23 Darin Adler <darin@apple.com>
4013 Reviewed by Sam Weinig.
4015 WKView should not try to do asynchronous validation for selectors that are not editor commands
4016 https://bugs.webkit.org/show_bug.cgi?id=51555
4018 * UIProcess/API/mac/WKView.mm:
4019 (-[WKView validateUserInterfaceItem:]): Removed the special case for startSpeaking.
4020 Added call to commandIsSupportedFromMenuOrKeyBinding so we only try to do validation
4021 for commands that are supported. Tweaked comments and added some bug numbers.
4022 (-[WKView _setUserInterfaceItemState:enabled:state:]): Tweaked comment and added
4025 2010-12-23 Sam Weinig <sam@webkit.org>
4027 Reviewed by Anders Carlsson.
4029 <rdar://problem/8799032>
4030 REGRESSION(r74436) Crash opening many pages with WebKit2
4032 * Shared/cf/ArgumentCodersCF.cpp:
4034 Fix paste-o. Decode into a CFDataRef not a CFDictionaryRef
4035 when decoding CFDataRefs.
4037 2010-12-22 Sam Weinig <sam@webkit.org>
4039 Reviewed by Darin Adler.
4041 WebKit2 needs to mirror the frame tree in the UIProcess
4042 https://bugs.webkit.org/show_bug.cgi?id=51546
4044 * UIProcess/API/C/WKFrame.cpp:
4045 (WKFrameCopyChildFrames):
4046 * UIProcess/API/C/WKFrame.h:
4047 Add API to get the child frames of a frame.
4049 * UIProcess/WebFrameProxy.cpp:
4050 (WebKit::WebFrameProxy::WebFrameProxy):
4051 (WebKit::WebFrameProxy::disconnect):
4052 (WebKit::WebFrameProxy::appendChild):
4053 (WebKit::WebFrameProxy::removeChild):
4054 (WebKit::WebFrameProxy::isDescendantOf):
4055 (WebKit::WebFrameProxy::dumpFrameTree):
4056 (WebKit::WebFrameProxy::didRemoveFromHierarchy):
4057 (WebKit::WebFrameProxy::childFrames):
4058 * UIProcess/WebFrameProxy.h:
4059 (WebKit::WebFrameProxy::parentFrame): Add getter.
4060 (WebKit::WebFrameProxy::nextSibling): Add getter.
4061 (WebKit::WebFrameProxy::previousSibling): Add getter.
4062 (WebKit::WebFrameProxy::firstChild): Add getter.
4063 (WebKit::WebFrameProxy::lastChild): Add getter.
4064 Make frames keep track of their subframes.
4066 * UIProcess/WebPageProxy.cpp:
4067 (WebKit::WebPageProxy::didCreateSubframe):
4068 Use the now passed parentID to insert the frame into the hierarchy
4070 (WebKit::WebPageProxy::didSaveFrameToPageCache):
4071 When a frame is added to the page cache, remove it from the hierarchy.
4073 (WebKit::WebPageProxy::didRestoreFrameFromPageCache):
4074 When a frame is restored from the page cache, add it back to the hierarchy.
4076 (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
4077 Detached frames should also be removed from the hierarchy.
4079 * UIProcess/WebPageProxy.h:
4080 Add new declarations for didSaveFrameToPageCache and didRestoreFrameFromPageCache.
4082 * UIProcess/WebPageProxy.messages.in:
4083 Add messages for DidSaveFrameToPageCache and DidRestoreFrameFromPageCache.
4085 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4086 (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
4087 (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
4088 Remove notImplemented, there is no work we need to do here.
4090 (WebKit::WebFrameLoaderClient::didSaveToPageCache):
4091 (WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
4092 Send message to UIProcess to indicate this happened.
4093 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
4095 * WebProcess/WebPage/WebFrame.cpp:
4096 (WebKit::WebFrame::createSubframe):
4097 Send parent frameID in addition to our own in the message to UIProcess.
4099 2010-12-23 Anders Carlsson <andersca@apple.com>
4101 Reviewed by Sam Weinig.
4103 New popup windows open disproportionately big
4104 https://bugs.webkit.org/show_bug.cgi?id=51547
4105 <rdar://problem/8637029>
4107 * UIProcess/WebPageProxy.cpp:
4108 (WebKit::WebPageProxy::createNewPage):
4109 Pass the correct size back to the UI process.
4111 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4112 (WebKit::WebChromeClient::pageRect):
4113 Implement this and return the size of the page.
4115 2010-12-23 Anders Carlsson <andersca@apple.com>
4117 Reviewed by John Sullivan.
4119 Nothing happens clicking "launch live player" on live.cnn.com
4120 https://bugs.webkit.org/show_bug.cgi?id=51540
4121 <rdar://problem/8791086>
4123 Implement NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState.
4125 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
4126 (WebKit::NPN_PushPopupsEnabledState):
4127 Call NetscapePlugin::pushPopupsEnabledState.
4129 (WebKit::NPN_PopPopupsEnabledState):
4130 Call NetscapePlugin::popPopupsEnabledState.
4132 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
4133 (WebKit::NetscapePlugin::pushPopupsEnabledState):
4134 Append the boolean to the vector.
4136 (WebKit::NetscapePlugin::popPopupsEnabledState):
4137 Remove the last boolean from the vector.
4139 (WebKit::NetscapePlugin::allowPopups):
4140 Return the last boolean from the vector.
4142 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
4143 * WebProcess/Plugins/PluginView.cpp:
4144 (WebKit::PluginView::performJavaScriptURLRequest):
4145 Update the "allowPopupsFromPlugin" state.
4147 2010-12-22 Anders Carlsson <andersca@apple.com>
4149 Reviewed by Sam Weinig.
4151 Webkit2: WebProcess crashes when Private browsing is turned on on yahoo.com
4152 https://bugs.webkit.org/show_bug.cgi?id=51516
4153 <rdar://problem/8766995>
4155 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
4156 (WebKit::NetscapePlugin::NPP_SetValue):
4157 Add a null check for NPP_SetValue.
4159 2010-12-22 Anders Carlsson <andersca@apple.com>
4161 Reviewed by Sam Weinig.
4163 REGRESSION (WK2): Plugins swallow CMD-W, CMD-Q, and probably other shortcuts
4164 https://bugs.webkit.org/show_bug.cgi?id=51515
4165 <rdar://problem/8740926>
4167 Always return false for keyboard events where the command key is down.
4169 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
4170 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
4172 2010-12-22 Sam Weinig <sam@webkit.org>
4174 Reviewed by Darin Adler.
4176 WebProcess should be terminated if invalid frameIDs are
4177 passed to the UIProcess.
4178 https://bugs.webkit.org/show_bug.cgi?id=51508
4180 - Introduce a mechanism to mark a messages as invalid due to
4181 reasons other than in ability to decode the message, eg. an
4182 invalid frameID is passed in a message.
4184 * Platform/CoreIPC/Connection.cpp:
4185 (CoreIPC::Connection::Connection):
4186 (CoreIPC::Connection::markCurrentlyDispatchedMessageAsInvalid): Sets
4187 the m_didReceiveInvalidMessage bit so that it can be picked up in
4188 (CoreIPC::Connection::dispatchMessages): Check for m_didReceiveInvalidMessage in
4189 addition to tainted arguments.
4190 * Platform/CoreIPC/Connection.h:
4191 Add base macro for others to extend, that calls markCurrentlyDispatchedMessageAsInvalid()
4192 ASSERTs, and returns.
4194 * UIProcess/WebPageProxy.cpp:
4195 Add Message checks for all WebFrameProxy's gotten from frameIDs passed
4197 * UIProcess/WebProcessProxy.cpp:
4198 (WebKit::isGoodMapKey):
4199 Checks that the key can be inserted safely into a map (eg. not the empty or deleted value).