1 2011-01-25 Andreas Kling <kling@webkit.org>
3 Reviewed by Kenneth Rohde Christiansen.
5 [Qt][WK2] Add QWKPage::processCrashed() signal
6 https://bugs.webkit.org/show_bug.cgi?id=53076
8 * UIProcess/API/qt/qwkpage.cpp:
9 (QWKPagePrivate::processDidCrash):
10 * UIProcess/API/qt/qwkpage.h:
11 * UIProcess/API/qt/qwkpage_p.h:
13 2011-01-24 Anders Carlsson <andersca@apple.com>
17 * WebProcess/mac/WebProcessMac.mm:
18 (WebKit::initializeSandbox):
20 2011-01-24 Anders Carlsson <andersca@apple.com>
22 Reviewed by Dan Bernstein.
24 Reset the page scale factor on standard frame loads
25 https://bugs.webkit.org/show_bug.cgi?id=53058
26 <rdar://problem/8908844>
28 * UIProcess/WebPageProxy.cpp:
29 (WebKit::WebPageProxy::scaleWebView):
30 Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
32 (WebKit::WebPageProxy::viewScaleFactorDidChange):
33 Update m_viewScaleFactor.
35 * UIProcess/WebPageProxy.h:
36 Add viewScaleFactorDidChange.
38 * UIProcess/WebPageProxy.messages.in:
39 Add ViewScaleFactorDidChange message.
41 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
42 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
45 (WebKit::WebFrameLoaderClient::restoreViewState):
46 Inform the UI process about the new view scale factor.
48 * WebProcess/WebPage/WebPage.cpp:
49 (WebKit::WebPage::scaleWebView):
50 Send a ViewScaleFactorDidChange message.
52 2011-01-24 Maciej Stachowiak <mjs@apple.com>
54 Reviewed by Anders Carlsson.
56 Use designated temp directory for the database for WebKit2
57 https://bugs.webkit.org/show_bug.cgi?id=53052
59 Add the API necessary to support this. Database path is now
60 determined on the UI process side and passed to the Web process.
61 Reviewed by Anders Carlsson.
64 * Shared/WebProcessCreationParameters.cpp:
65 (WebKit::WebProcessCreationParameters::encode):
66 (WebKit::WebProcessCreationParameters::decode):
67 * Shared/WebProcessCreationParameters.h:
68 * UIProcess/API/C/WKContext.cpp:
69 (WKContextSetDatabaseDirectory):
70 * UIProcess/API/C/WKContextPrivate.h:
71 * UIProcess/WebContext.cpp:
72 (WebKit::WebContext::ensureWebProcess):
73 (WebKit::WebContext::databaseDirectory):
74 * UIProcess/WebContext.h:
75 (WebKit::WebContext::setDatabaseDirectory):
76 * UIProcess/mac/WebContextMac.mm:
77 (WebKit::WebContext::platformDefaultDatabaseDirectory):
78 * UIProcess/qt/WebContextQt.cpp:
79 (WebKit::WebContext::platformDefaultDatabaseDirectory):
80 * UIProcess/win/WebContextWin.cpp:
81 (WebKit::WebContext::platformDefaultDatabaseDirectory):
83 * WebKit2.xcodeproj/project.pbxproj:
84 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
85 (WebKit::WebDatabaseManager::initialize):
86 (WebKit::WebDatabaseManager::WebDatabaseManager):
87 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
88 * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
89 * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
90 * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
91 * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
92 * WebProcess/WebProcess.cpp:
93 (WebKit::WebProcess::WebProcess):
94 (WebKit::WebProcess::initializeWebProcess):
95 * WebProcess/com.apple.WebProcess.sb:
96 * WebProcess/mac/WebProcessMac.mm:
97 (WebKit::initializeSandbox):
100 2011-01-24 Brent Fulgham <bfulgham@webkit.org>
102 Unreviewed build fix.
104 * win/WebKit2.vcproj: Don't build the CG Utilities when building
107 2011-01-24 Anders Carlsson <andersca@apple.com>
109 Reviewed by John Sullivan.
111 Don't use the timeout checker for non-user-interaction messages
112 https://bugs.webkit.org/show_bug.cgi?id=53046
114 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
115 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
116 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
117 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
118 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
119 (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
121 2011-01-24 Adam Roben <aroben@apple.com>
123 Windows Production build fix
125 * win/WebKit2.make: Update for move of WebKit2 into Source.
127 2011-01-24 Jessie Berlin <jberlin@apple.com>
129 Reviewed by Adam Roben.
131 WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
132 https://bugs.webkit.org/show_bug.cgi?id=53029
134 * UIProcess/win/TextCheckerWin.cpp:
135 Disable the warnings for this file.
137 2011-01-24 Anders Carlsson <andersca@apple.com>
139 Reviewed by Sam Weinig.
141 Wait for half a second if we're asked to paint when receiving a DidSetSize message
142 https://bugs.webkit.org/show_bug.cgi?id=53028
144 * UIProcess/DrawingAreaProxyImpl.cpp:
145 (WebKit::DrawingAreaProxyImpl::paint):
147 2011-01-24 Anders Carlsson <andersca@apple.com>
149 Reviewed by Sam Weinig.
151 Implement forceRedisplay in the new drawing area
152 https://bugs.webkit.org/show_bug.cgi?id=53026
154 * WebProcess/WebPage/DrawingAreaImpl.cpp:
155 (WebKit::DrawingAreaImpl::forceRepaint):
156 * WebProcess/WebPage/DrawingAreaImpl.h:
158 2011-01-24 Anders Carlsson <andersca@apple.com>
160 Reviewed by Sam Weinig.
162 Fill unpainted rects with the background color.
163 https://bugs.webkit.org/show_bug.cgi?id=53025
165 * UIProcess/API/mac/WKView.mm:
166 (drawPageBackground):
167 Add new helper function.
169 (-[WKView drawRect:]):
170 Iterate over the unpainted rects and fill them with the background color.
172 2011-01-24 Dan Bernstein <mitz@apple.com>
174 Reviewed by John Sullivan.
176 WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter
178 * UIProcess/API/mac/PageClientImpl.mm:
179 (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
181 2011-01-24 Balazs Kelemen <kbalazs@webkit.org>
183 Rubber-stamped by Csaba Osztrogonác.
187 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
188 (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
190 2011-01-24 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
192 Reviewed by Kenneth Rohde Christiansen.
194 [Qt] Remove CleanupHandler by passing file descriptors.
196 Deleting files in signal handler of UI process is not a good idea,
197 because the memory where filenames are stored might not be valid
200 To avoid the need of using signal handlers for cleanup,
202 1) Avoid passing filenames between processes, pass fds
203 2) When mmap'ing files, delete them immediately after
204 opening and mmap'ing them.
205 3) Pass sockets with fds during fork+exec instead of
206 passing them via the filesystem.
207 4) Use mmap'ed files for implementation of SharedMemory.
208 QSharedMemory does not support cleanup correctly.
211 - Move MappedMemory to SharedMemory, make UpdateChunk use this.
212 - Implement CoreIPC::Attachment using mmaped files.
213 - Send messages using datagram socket. This solution works
214 similiarly to Mach ports on Mac.
215 - Send big messages out-of-line and thus avoid increasing
217 - Remove MemoryMappedPool and rely on libc/kernel caching
219 - Unmap memory areas after use.
220 - When UI process crashes, kill the web process using SIGKILL.
221 This is possible again because cleanup handler is not needed.
223 [WK2][Qt] Multiple problems with MemoryMappedPool
224 https://bugs.webkit.org/show_bug.cgi?id=51984
226 * Platform/CoreIPC/Attachment.cpp:
227 (CoreIPC::Attachment::Attachment):
228 * Platform/CoreIPC/Attachment.h:
229 (CoreIPC::Attachment::size):
230 (CoreIPC::Attachment::releaseFileDescriptor):
231 (CoreIPC::Attachment::fileDescriptor):
232 * Platform/CoreIPC/Connection.h:
233 * Platform/CoreIPC/qt/ConnectionQt.cpp:
234 (CoreIPC::MessageInfo::MessageInfo):
235 (CoreIPC::MessageInfo::setMessageBodyOOL):
236 (CoreIPC::MessageInfo::isMessageBodyOOL):
237 (CoreIPC::MessageInfo::bodySize):
238 (CoreIPC::MessageInfo::messageID):
239 (CoreIPC::MessageInfo::attachmentCount):
240 (CoreIPC::Connection::platformInitialize):
241 (CoreIPC::Connection::platformInvalidate):
242 (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
243 (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
244 (CoreIPC::Connection::readyReadHandler):
245 (CoreIPC::Connection::open):
246 (CoreIPC::Connection::platformCanSendOutgoingMessages):
247 (CoreIPC::Connection::sendOutgoingMessage):
248 * Platform/SharedMemory.h:
249 * Platform/WorkQueue.h:
250 * Platform/qt/MappedMemoryPool.cpp: Removed.
251 * Platform/qt/MappedMemoryPool.h: Removed.
252 * Platform/qt/SharedMemoryQt.cpp:
253 (WebKit::SharedMemory::Handle::Handle):
254 (WebKit::SharedMemory::Handle::~Handle):
255 (WebKit::SharedMemory::Handle::isNull):
256 (WebKit::SharedMemory::Handle::encode):
257 (WebKit::SharedMemory::Handle::decode):
258 (WebKit::SharedMemory::Handle::releaseToAttachment):
259 (WebKit::SharedMemory::Handle::adoptFromAttachment):
260 (WebKit::SharedMemory::create):
261 (WebKit::accessModeMMap):
262 (WebKit::SharedMemory::~SharedMemory):
263 (WebKit::accessModeFile):
264 (WebKit::SharedMemory::createHandle):
265 * Platform/qt/WorkQueueQt.cpp:
266 (WorkQueue::registerSocketEventHandler):
267 * Shared/qt/UpdateChunk.cpp:
268 (WebKit::UpdateChunk::UpdateChunk):
269 (WebKit::UpdateChunk::~UpdateChunk):
270 (WebKit::UpdateChunk::encode):
271 (WebKit::UpdateChunk::decode):
272 (WebKit::UpdateChunk::createImage):
273 * Shared/qt/UpdateChunk.h:
274 * UIProcess/Launcher/ProcessLauncher.h:
275 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
276 (WebKit::QtWebProcess::QtWebProcess):
277 (WebKit::QtWebProcess::setupChildProcess):
278 (WebKit::ProcessLauncher::launchProcess):
279 (WebKit::ProcessLauncher::platformInvalidate):
280 * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
281 (WebKit::webThreadBody):
282 (WebKit::ThreadLauncher::createWebThread):
284 * WebProcess/qt/WebProcessMainQt.cpp:
285 (WebKit::WebProcessMainQt):
287 2011-01-24 Andras Becsi <abecsi@webkit.org>
289 Reviewed by Csaba Osztrogonác.
291 [Qt] Move project files into Source
292 https://bugs.webkit.org/show_bug.cgi?id=52891
294 * DerivedSources.pro:
298 2011-01-23 Damian Kaleta <dkaleta@apple.com>
300 Reviewed by Kevin Decker.
302 <rdar://problem/8905171>
303 https://bugs.webkit.org/show_bug.cgi?id=52985
305 * UIProcess/WebPageProxy.cpp:
306 (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it
307 consistent with WebKit1.
309 2011-01-23 Alexey Proskuryakov <ap@apple.com>
311 Reviewed by Dan Bernstein.
313 https://bugs.webkit.org/show_bug.cgi?id=52968
314 Use a separate NSView for printing
316 Also addresses <rdar://problem/8900148> Improper check for
317 -[NSGraphicsContext currentContextDrawingToScreen]
319 * UIProcess/API/mac/WKPrintingView.h: Added.
320 * UIProcess/API/mac/WKPrintingView.mm: Added.
321 (-[WKPrintingView initWithFrameProxy:]):
322 (-[WKPrintingView isFlipped]):
323 (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
324 (-[WKPrintingView knowsPageRange:]):
325 (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
326 (-[WKPrintingView drawPageBorderWithSize:]):
327 (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
328 (-[WKPrintingView rectForPage:]):
329 * UIProcess/API/mac/WKView.mm:
330 (-[WKView drawRect:]):
331 (-[WKView canChangeFrameLayout:]):
332 (-[WKView printOperationWithPrintInfo:forFrame:]):
333 * WebKit2.xcodeproj/project.pbxproj:
334 Moved printing code to a separate view, simplifying as appropriate. The view is currently not
335 referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
337 2011-01-22 Anders Carlsson <andersca@apple.com>
339 Reviewed by Sam Weinig.
341 Transparent windows with compositing WebKit2 content show garbage
342 https://bugs.webkit.org/show_bug.cgi?id=52966
343 <rdar://problem/8765051>
345 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
346 (WebKit::LayerBackedDrawingAreaProxy::paint):
347 If the WKView should draw transparent background, do so.
349 2011-01-22 Anders Carlsson <andersca@apple.com>
351 Reviewed by Sam Weinig.
353 Add an asynchronous WKPageForceRepaint
354 https://bugs.webkit.org/show_bug.cgi?id=52964
355 <rdar://problem/8898527>
357 * UIProcess/API/C/WKPage.cpp:
358 (WKPageForceRepaint):
359 Call WebPageProxy::forceRepaint.
361 * UIProcess/API/C/WKPage.h:
362 Add WKPageForceRepaint.
364 * UIProcess/GenericCallback.h:
365 Add a "generic" VoidCallback class.
367 * UIProcess/WebPageProxy.cpp:
368 (WebKit::WebPageProxy::forceRepaint):
369 Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
371 (WebKit::WebPageProxy::voidCallback):
372 Call the right void callback.
374 (WebKit::WebPageProxy::processDidCrash):
375 Invalidate m_voidCallbacks.
377 * UIProcess/WebPageProxy.messages.in:
378 Add a VoidCallback message.
380 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
381 (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
384 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
387 * WebProcess/WebPage/WebPage.cpp:
388 (WebKit::WebPage::forceRepaint):
389 Call forceRepaint on the drawing area.
391 * WebProcess/WebPage/WebPage.messages.in:
392 Add a ForceRepaint message.
394 2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
396 Reviewed by Dirk Schulze.
398 Introduce FontMetrics abstraction
399 https://bugs.webkit.org/show_bug.cgi?id=51456
401 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
402 (WebKit::WebPopupMenu::setUpPlatformData):
404 2011-01-22 Alexey Proskuryakov <ap@apple.com>
406 Reviewed by Dan Bernstein.
408 https://bugs.webkit.org/show_bug.cgi?id=52950
409 Leak in WebPage::drawRectToPDF
411 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
413 2011-01-22 Alexey Proskuryakov <ap@apple.com>
415 Reviewed by Dan Bernstein.
417 https://bugs.webkit.org/show_bug.cgi?id=52951
418 WebKit2 generates a bad PDF for cross process messaging
420 * UIProcess/API/mac/WKView.mm:
421 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
422 Use a correct offset when flipping.
424 2011-01-21 Alexey Proskuryakov <ap@apple.com>
426 Reviewed by Dan Bernstein.
428 https://bugs.webkit.org/show_bug.cgi?id=52943
429 Objective-C files should use #import, not #include
431 * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
432 there is more than one WKView.h.
434 * Platform/mac/ModuleMac.mm:
435 * Platform/mac/RunLoopMac.mm:
436 * PluginProcess/mac/PluginControllerProxyMac.mm:
437 * PluginProcess/mac/PluginProcessMac.mm:
438 * PluginProcess/mac/PluginProcessMainMac.mm:
439 * Shared/API/c/mac/WKCertificateInfoMac.mm:
440 * Shared/API/c/mac/WKURLRequestNS.mm:
441 * Shared/API/c/mac/WKURLResponseNS.mm:
442 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
443 * Shared/mac/PlatformCertificateInfo.mm:
444 * Shared/mac/SandboxExtensionMac.mm:
445 * Shared/mac/WebCoreArgumentCodersMac.mm:
446 * Shared/mac/WebMemorySampler.mac.mm:
447 * Shared/mac/WebURLRequestMac.mm:
448 * Shared/mac/WebURLResponseMac.mm:
449 * UIProcess/API/mac/FindIndicatorWindow.mm:
450 * UIProcess/API/mac/WKTextInputWindowController.mm:
451 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
452 * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
453 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
454 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
455 * UIProcess/mac/BackingStoreMac.mm:
456 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
457 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
458 * UIProcess/mac/TextCheckerMac.mm:
459 * UIProcess/mac/WebContextMac.mm:
460 * UIProcess/mac/WebContextMenuProxyMac.mm:
461 * UIProcess/mac/WebPageProxyMac.mm:
462 * UIProcess/mac/WebPopupMenuProxyMac.mm:
463 * UIProcess/mac/WebPreferencesMac.mm:
464 * WebProcess/Downloads/mac/DownloadMac.mm:
465 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
466 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
467 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
468 * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
469 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
470 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
471 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
472 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
473 * WebProcess/WebPage/mac/WebPageMac.mm:
474 * WebProcess/mac/WebProcessMac.mm:
476 2011-01-21 Mark Rowe <mrowe@apple.com>
478 Reviewed by Sam Weinig.
480 Fix the WebKit2 build with clang.
482 * Scripts/webkit2/messages.py: Add some more structs to the list.
483 * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
484 * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
485 * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
486 * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
487 functions expecting NSString* without generating warnings.
488 * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
489 * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
490 * WebProcess/WebPage/WebPage.cpp:
491 (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
492 the if statement to suppress a warning.
494 2011-01-21 Brian Weinstein <bweinstein@apple.com>
496 Reviewed by Adam Roben.
498 WebKit2: Need API to stop loading a WKFrame
499 https://bugs.webkit.org/show_bug.cgi?id=52925
501 * UIProcess/API/C/WKFrame.cpp:
502 (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
503 * UIProcess/API/C/WKFrame.h:
504 * UIProcess/WebFrameProxy.cpp:
505 (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
506 with the passed in ID.
507 * UIProcess/WebFrameProxy.h:
508 * WebProcess/WebPage/WebPage.cpp:
509 (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
510 * WebProcess/WebPage/WebPage.h:
511 * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
513 2011-01-21 Brady Eidson <beidson@apple.com>
515 Reviewed by Adam Roben.
517 <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
518 Expose "suggested filename" for a resource based on its resource response.
521 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
522 (WKBundleFrameCopySuggestedFilenameForResourceURL):
523 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
526 * WebProcess/WebPage/WebFrame.cpp:
527 (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
528 a resource for this URL and, if so, return the response's suggested filename.
529 * WebProcess/WebPage/WebFrame.h:
531 2011-01-21 Anders Carlsson <andersca@apple.com>
533 Reviewed by Dan Bernstein.
535 DrawingAreaProxyImpl::paint should return the unpainted region
536 https://bugs.webkit.org/show_bug.cgi?id=52918
538 * UIProcess/API/mac/WKView.mm:
539 (-[WKView drawRect:]):
540 Add unpaintedRegion parameter.
542 * UIProcess/BackingStore.h:
543 (WebKit::BackingStore::size):
546 * UIProcess/DrawingAreaProxyImpl.cpp:
547 (WebKit::DrawingAreaProxyImpl::paint):
548 Initialize the unpainted region to the dirty region, then subtract the painted region.
550 2011-01-21 Anders Carlsson <andersca@apple.com>
552 Reviewed by Dan Bernstein and Maciej Stachowiak.
554 Fix for <rdar://problem/8896057>
556 Give the Web Process access to the PubSub agent.
558 * WebProcess/com.apple.WebProcess.sb:
560 2011-01-21 Sam Weinig <sam@webkit.org>
562 Reviewed by Anders Carlsson.
564 Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
565 https://bugs.webkit.org/show_bug.cgi?id=52779
567 Rename ScrollbarClient -> ScrollableArea.
569 * UIProcess/win/WebPopupMenuProxyWin.cpp:
570 (WebKit::WebPopupMenuProxyWin::onMouseWheel):
571 (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
572 * UIProcess/win/WebPopupMenuProxyWin.h:
574 2011-01-21 Adam Roben <aroben@apple.com>
576 Update for WKCACFLayerRenderer -> CACFLayerView rename
578 Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
580 Reviewed by Simon Fraser.
582 * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
585 2011-01-20 Darin Adler <darin@apple.com>
587 Reviewed by Dan Bernstein.
589 WebKit2: Implement showModalDialog
590 https://bugs.webkit.org/show_bug.cgi?id=52855
592 * Shared/WebPageCreationParameters.h: Added canRunModal.
594 * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
595 WKPageUIClient. Also removed a lot of redundant typedefs and added
596 a new one, WKPageCallback, for callbacks without arguments or return
599 * UIProcess/API/qt/qwkpage.cpp:
600 (QWKPage::QWKPage): Added a runModal function pointer of 0.
602 * UIProcess/WebPageProxy.cpp:
603 (WebKit::WebPageProxy::creationParameters): Set canRunModal
604 based on return value of WebUIClient::canRunModal.
606 * UIProcess/WebPageProxy.h: Added runModal.
607 Calls WebUIClient::runModal.
609 * UIProcess/WebPageProxy.messages.in: Added RunModal message.
610 Also removed the periods from the phrases in the comments
611 as Maciej requested a while back.
613 * UIProcess/WebUIClient.cpp:
614 (WebKit::WebUIClient::canRunModal): Added. Returns true or false
615 based on whether a runModal function was supplied in the
616 WKPageUIClient structure.
617 (WebKit::WebUIClient::runModal): Added. Calls the runModal
618 function from the WKPageUIClient structure.
619 * UIProcess/WebUIClient.h: Declared the above functions.
621 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
622 (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
623 (WebKit::WebChromeClient::runModal): Ditto.
625 * WebProcess/WebPage/WebPage.cpp:
626 (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
627 creation parameters. Initialize m_isRunningModal to false.
628 (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
629 (WebKit::WebPage::runModal): Send a message to ask the UI process to run
630 modal and then start a nested run loop. It gets stopped when the page is closed.
631 * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
632 and declared the runModal function.
634 2011-01-20 Alexey Proskuryakov <ap@apple.com>
636 Reviewed by Darin Adler.
638 https://bugs.webkit.org/show_bug.cgi?id=52849
639 Make window.print work with WebKit2
641 * UIProcess/API/qt/qwkpage.cpp:
643 * UIProcess/WebPageProxy.cpp:
644 (WebKit::WebPageProxy::printFrame):
645 * UIProcess/WebPageProxy.h:
646 * UIProcess/WebPageProxy.messages.in:
647 * UIProcess/WebUIClient.cpp:
648 (WebKit::WebUIClient::printFrame):
649 * UIProcess/WebUIClient.h:
650 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
651 (WebKit::WebChromeClient::print):
652 Just pass through deelagte call to a WebKit2 client.
654 * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
657 2011-01-20 Anders Carlsson <andersca@apple.com>
659 Reviewed by Darin Adler.
661 Keep track of the latest update timestamp in the backing store
662 https://bugs.webkit.org/show_bug.cgi?id=52848
664 * Shared/UpdateInfo.h:
665 (WebKit::UpdateInfo::UpdateInfo):
666 Initialize timestamp to 0.
668 * UIProcess/BackingStore.cpp:
669 (WebKit::BackingStore::BackingStore):
670 Initialize m_latestUpdateTimestamp to 0.
672 (WebKit::BackingStore::incorporateUpdate):
673 If the update is too old, discard it. Otherwise, create a bitmap
674 and pass it to platformIncorporateUpdate. Finally update the timestamp.
676 * UIProcess/BackingStore.h:
677 Add m_latestUpdateTimestamp.
679 * UIProcess/mac/BackingStoreMac.mm:
680 (WebKit::BackingStore::platformIncorporateUpdate):
681 Update now that we are already given the shareable bitmap.
683 2011-01-20 Beth Dakin <bdakin@apple.com>
685 Reviewed by Geoffrey Garen.
687 Fix for <rdar://problem/8890255>
689 Allow WebKitSystemInterface to draw scrollbars
691 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
692 (InitWebCoreSystemInterface):
694 2011-01-20 Sam Weinig <sam@webkit.org>
696 Reviewed by Dave Hyatt.
698 Cleanup Scrollbar/ScrollbarClient relationship
699 https://bugs.webkit.org/show_bug.cgi?id=52779
701 * UIProcess/win/WebPopupMenuProxyWin.cpp:
702 (WebKit::WebPopupMenuProxyWin::scrollPosition):
703 (WebKit::WebPopupMenuProxyWin::setScrollOffset):
704 (WebKit::WebPopupMenuProxyWin::scrollTo):
705 (WebKit::WebPopupMenuProxyWin::onMouseWheel):
706 (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
707 * UIProcess/win/WebPopupMenuProxyWin.h:
708 (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
710 2011-01-20 Anders Carlsson <andersca@apple.com>
712 Reviewed by Adam Roben.
714 Add a timestamp to UpdateInfo
715 https://bugs.webkit.org/show_bug.cgi?id=52844
717 * Shared/UpdateInfo.cpp:
718 (WebKit::UpdateInfo::encode):
719 (WebKit::UpdateInfo::decode):
720 * Shared/UpdateInfo.h:
721 * WebProcess/WebPage/DrawingAreaImpl.cpp:
722 (WebKit::DrawingAreaImpl::setSize):
723 (WebKit::DrawingAreaImpl::display):
725 2011-01-20 Anders Carlsson <andersca@apple.com>
727 Reviewed by Beth Dakin.
729 Add Connection::waitForAndDispatchImmediately
730 https://bugs.webkit.org/show_bug.cgi?id=52841
732 * Platform/CoreIPC/Connection.h:
733 (CoreIPC::Connection::waitForAndDispatchImmediately):
735 2011-01-20 Kevin Decker <kdecker@apple.com>
737 Reviewed by Anders Carlsson.
739 <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
740 https://bugs.webkit.org/show_bug.cgi?id=52823
742 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
743 (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
744 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
745 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
746 (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
747 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
749 2011-01-20 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
751 Reviewed by Andreas Kling.
753 Remove null ptr deref that happens when reattaching to
756 Implement didRelaunchProcess that sets the drawing area size
757 after the drawing area is re-instantiated.
759 [Qt][WK2] Null ptr deref in UI process after web process has crashed
760 https://bugs.webkit.org/show_bug.cgi?id=52796
762 * UIProcess/API/qt/qgraphicswkview.cpp:
763 (QGraphicsWKView::QGraphicsWKView):
764 * UIProcess/API/qt/qwkpage.cpp:
765 (QWKPagePrivate::QWKPagePrivate):
766 (QWKPagePrivate::init):
767 (QWKPagePrivate::createDrawingAreaProxy):
768 (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
769 * UIProcess/API/qt/qwkpage_p.h:
771 2011-01-20 Maciej Stachowiak <mjs@apple.com>
773 Reviewed by Adam Roben.
775 WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
776 https://bugs.webkit.org/show_bug.cgi?id=42327
778 Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
779 that corresponds to a JSContextRef (or null if none).
781 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
782 (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
784 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
785 * WebProcess/WebPage/WebFrame.cpp:
786 (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
787 * WebProcess/WebPage/WebFrame.h:
789 2011-01-20 Alejandro G. Castro <alex@igalia.com>
791 Fix compilation error in GTK WebKit2.
793 * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
794 (CoreIPC::readBytesFromSocket):
795 (CoreIPC::writeBytesToSocket):
797 2011-01-20 Zoltan Horvath <zoltan@webkit.org>
799 Reviewed by Csaba Osztrogonác.
801 Refactoring of the custom allocation framework
802 https://bugs.webkit.org/show_bug.cgi?id=49897
804 Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
805 The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
806 equivalent macro implementation at the necessary places.
808 2011-01-19 Simon Fraser <simon.fraser@apple.com>
810 Fix the WebKit2 build.
812 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
813 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
815 2011-01-19 Brian Weinstein <bweinstein@apple.com>
817 Reviewed by Darin Adler.
819 WebKit2: Need API to get the parent frame of a frame
820 https://bugs.webkit.org/show_bug.cgi?id=52774
822 Add the API to get the parent frame of a frame.
824 * UIProcess/API/C/WKFrame.cpp:
825 (WKFrameGetParentFrame):
826 * UIProcess/API/C/WKFrame.h:
828 2011-01-19 Enrica Casucci <enrica@apple.com>
830 Reviewed by Darin Adler.
832 WebKit2: add support for drag and drop
833 https://bugs.webkit.org/show_bug.cgi?id=52343
834 <rdar://problem/7660558>
836 This patch contains the remaining work to support drag and drop on Mac.
837 I've added a PasteboardTypes class to encapsulate all the pasteboard formats
838 supported for drag and drop.
839 In this implementation we don't support the promised types, since I could not
840 find an efficient way to do this across processes.
841 The bulk of the patch consists in creating a shareable bitmap for the drag image,
842 pass its handle to the UI process and create a new NSImage from it to be given to
844 I've added the missing implementation of the methods in the drag client to hook
845 up the placement of the data in the pasteboard.
847 * Shared/mac/PasteboardTypes.h: Added.
848 * Shared/mac/PasteboardTypes.mm: Added.
849 (WebKit::PasteboardTypes::forEditing):
850 (WebKit::PasteboardTypes::forURL):
851 (WebKit::PasteboardTypes::forImages):
852 (WebKit::PasteboardTypes::forImagesWithArchive):
853 * UIProcess/API/mac/PageClientImpl.h:
854 * UIProcess/API/mac/PageClientImpl.mm:
855 (WebKit::PageClientImpl::setDragImage): Added.
856 * UIProcess/API/mac/WKView.mm:
857 (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
858 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
859 (-[WKView _setMouseDownEvent:]):
860 (-[WKView _mouseHandler:]):
861 (-[WKView mouseDown:]):
862 (-[WKView mouseUp:]):
863 (-[WKView mouseDragged:]):
864 (-[WKView draggedImage:endedAt:operation:]):
865 (-[WKView draggingEntered:]):
866 (-[WKView _setDragImage:at:linkDrag:]):
867 * UIProcess/API/mac/WKViewInternal.h:
868 * UIProcess/PageClient.h:
869 * UIProcess/WebPageProxy.cpp:
870 (WebKit::WebPageProxy::setDragImage):
871 (WebKit::WebPageProxy::dragEnded):
872 * UIProcess/WebPageProxy.h:
873 * UIProcess/WebPageProxy.messages.in:
874 * WebKit2.xcodeproj/project.pbxproj:
875 * WebProcess/WebCoreSupport/WebDragClient.cpp:
876 * WebProcess/WebCoreSupport/WebDragClient.h:
877 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
878 (WebKit::fontFromNSFont):
879 (WebKit::WebDragClient::startDrag): Added implementation.
880 (WebKit::WebDragClient::createDragImageForLink): Ditto.
881 (WebKit::writeURL): Helper function.
882 (WebKit::writeImage): Helper function.
883 (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
884 * WebProcess/WebPage/WebPage.cpp:
885 (WebKit::WebPage::dragEnded):
886 * WebProcess/WebPage/WebPage.h:
887 * WebProcess/WebPage/WebPage.messages.in:
889 2011-01-19 Anders Carlsson <andersca@apple.com>
891 Reviewed by Dan Bernstein.
893 Put the deprecated Connection member functions next to eachother
894 https://bugs.webkit.org/show_bug.cgi?id=52767
896 * Platform/CoreIPC/Connection.h:
897 (CoreIPC::Connection::sendSync):
898 (CoreIPC::Connection::send):
900 2011-01-19 Anders Carlsson <andersca@apple.com>
902 Reviewed by Sam Weinig.
904 When resizing, the web process should repaint the page
905 https://bugs.webkit.org/show_bug.cgi?id=52764
907 * UIProcess/DrawingAreaProxyImpl.cpp:
908 (WebKit::DrawingAreaProxyImpl::didSetSize):
909 Incorporate the update.
911 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
912 Return early if the update bounds rect is empty. This can happen if painting is
913 disabled and we get a DidSetSize message.
915 * WebProcess/WebPage/DrawingAreaImpl.cpp:
916 (WebKit::DrawingAreaImpl::setSize):
917 If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
918 paint and fill in the UpdateInfo struct.
920 (WebKit::DrawingAreaImpl::display):
921 Assert that painting is not disabled.
923 2011-01-19 Alexey Proskuryakov <ap@apple.com>
925 Reviewed by Darin Adler.
927 https://bugs.webkit.org/show_bug.cgi?id=52739
928 Make it possible for a WebKit2 client to print headers and footers
930 * UIProcess/API/C/WKPage.h:
931 * UIProcess/WebPageProxy.cpp:
932 (WebKit::WebPageProxy::headerHeight):
933 (WebKit::WebPageProxy::footerHeight):
934 (WebKit::WebPageProxy::drawHeader):
935 (WebKit::WebPageProxy::drawFooter):
936 * UIProcess/WebPageProxy.h:
937 * UIProcess/WebUIClient.cpp:
938 (WebKit::WebUIClient::headerHeight):
939 (WebKit::WebUIClient::footerHeight):
940 (WebKit::WebUIClient::drawHeader):
941 (WebKit::WebUIClient::drawFooter):
942 * UIProcess/WebUIClient.h:
943 Pass UIClient calls through.
945 * UIProcess/API/mac/WKView.mm:
946 (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
947 (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
948 print info to account for header and footer height as provided by the client.
949 (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
950 (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
951 to do that. Code adapted form WebKit1.
953 * UIProcess/API/qt/qwkpage:
954 (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
956 2011-01-19 Jessie Berlin <jberlin@apple.com>
958 Reviewed by Darin Adler.
960 Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
962 https://bugs.webkit.org/show_bug.cgi?id=52730
964 WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
965 called in WebContext::processDidClose. However, m_webContext is only set in the
966 constructor, which is only called from the constructor of WebContext, so attempting to send
967 a message to any new WebProcess after the first one died was causing a null deref.
969 This patch moves setting m_webcontext into clearContext and clearContext is only called in
970 the WebContext destructor.
972 This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
973 the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
974 attempt to dereference a null WebProcessProxy.
976 * UIProcess/WebContext.cpp:
977 (WebKit::WebContext::~WebContext):
978 Call WebDatabaseManagerProxy::clearContext.
979 * UIProcess/WebContext.h:
980 (WebKit::WebContext::hasValidProcess):
981 Make this method public so that it can be called from WebDatabaseManagerProxy.
983 * UIProcess/WebDatabaseManagerProxy.cpp:
984 (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
985 If there isn't a valid process, invalidate the callback and return early.
986 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
988 (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
989 If tehre isn't a valid process return early.
990 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
992 (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
994 (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
996 (WebKit::WebDatabaseManagerProxy::invalidate):
997 Move setting m_webContext to 0 from here ...
998 * UIProcess/WebDatabaseManagerProxy.h:
999 (WebKit::WebDatabaseManagerProxy::clearContext):
1002 2011-01-19 Anders Carlsson <andersca@apple.com>
1004 Reviewed by Sam Weinig.
1006 Suspend/resume painting as the WKView visibility changes
1007 https://bugs.webkit.org/show_bug.cgi?id=52738
1009 * UIProcess/DrawingAreaProxy.h:
1010 (WebKit::DrawingAreaProxy::visibilityDidChange):
1011 Add new member function. It should really be pure virtual once setPageIsVisible
1014 * UIProcess/DrawingAreaProxyImpl.cpp:
1015 (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
1016 Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
1018 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
1019 Make this a stub; it should really be removed.
1021 * UIProcess/WebPageProxy.cpp:
1022 (WebKit::WebPageProxy::viewStateDidChange):
1023 Call visibilityDidChange.
1025 * UIProcess/WebPageProxy.h:
1026 (WebKit::WebPageProxy::isViewVisible):
1029 * WebProcess/WebPage/DrawingArea.messages.in:
1030 Add SuspendPainting and ResumePainting messages.
1032 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1033 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1034 Initialize m_isPaintingSuspended.
1036 (WebKit::DrawingAreaImpl::suspendPainting):
1037 Set m_isPaintingSuspended to true and stop the display timer.
1039 (WebKit::DrawingAreaImpl::resumePainting):
1040 Set m_isPaintingSuspended to false.
1042 (WebKit::DrawingAreaImpl::scheduleDisplay):
1043 (WebKit::DrawingAreaImpl::display):
1044 Bail if m_isPaintingSuspended is true.
1046 2011-01-19 Andreas Kling <kling@webkit.org>
1048 Reviewed by Simon Hausmann.
1050 [Qt][WK2] Implement formatLocalizedString() for Qt.
1052 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1053 (WebKit::formatLocalizedString):
1055 2011-01-19 Chris Marrin <cmarrin@apple.com>
1057 Reviewed by Simon Fraser.
1059 WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
1060 https://bugs.webkit.org/show_bug.cgi?id=52695
1062 Added a hostingLayer as the parent of the existing drawingLayer.
1063 The hostingLayer is now the root which is passed to the
1064 remote context. It never changes except to track the size
1065 of the window. The backingLayer is now a child of the
1066 hostingLayer, which allow it to switch between tiled and
1069 I also now give back accurate settings for debug borders and
1072 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1073 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1074 (WebKit::LayerBackedDrawingArea::setSize):
1075 (WebKit::LayerBackedDrawingArea::showDebugBorders):
1076 (WebKit::LayerBackedDrawingArea::showRepaintCounter):
1077 * WebProcess/WebPage/LayerBackedDrawingArea.h:
1078 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1079 (WebKit::LayerBackedDrawingArea::platformInit):
1080 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
1081 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1083 2011-01-19 Anders Carlsson <andersca@apple.com>
1085 Reviewed by Sam Weinig.
1087 Send a new SetSize message if the size differs from the current size
1088 https://bugs.webkit.org/show_bug.cgi?id=52728
1090 * UIProcess/DrawingAreaProxy.h:
1091 (WebKit::DrawingAreaProxy::didSetSize):
1092 Add UpdateInfo parameter.
1094 * UIProcess/DrawingAreaProxy.messages.in:
1095 Add UpdateInfo parameter to the DidSetSize message.
1097 * UIProcess/DrawingAreaProxyImpl.cpp:
1098 (WebKit::DrawingAreaProxyImpl::didSetSize):
1099 If the view size differs from the current size send another SetSize message.
1101 * UIProcess/DrawingAreaProxyImpl.h:
1102 Add UpdateInfo parameter to didSetSize.
1104 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1105 (WebKit::DrawingAreaImpl::setSize):
1106 The DidSetSize message now takes an UpdateInfo parameter.
1108 2011-01-19 Anders Carlsson <andersca@apple.com>
1110 Reviewed by Darin Adler.
1112 Throttle sending of SetSize messages
1113 https://bugs.webkit.org/show_bug.cgi?id=52727
1115 * UIProcess/DrawingAreaProxyImpl.cpp:
1116 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1117 Initialize m_isWaitingForDidSetSize to false.
1119 (WebKit::DrawingAreaProxyImpl::didSetSize):
1120 Null out the backing store.
1122 (WebKit::DrawingAreaProxyImpl::sendSetSize):
1123 If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
1124 to true and send a SetSize message.
1126 * UIProcess/DrawingAreaProxyImpl.h:
1127 Add m_isWaitingForDidSetSize.
1129 2011-01-19 Anders Carlsson <andersca@apple.com>
1131 Reviewed by Darin Adler.
1133 Pass WebPageCreationParameters to DrawingArea::create
1134 https://bugs.webkit.org/show_bug.cgi?id=52726
1136 * WebProcess/WebPage/DrawingArea.cpp:
1137 (WebKit::DrawingArea::create):
1138 * WebProcess/WebPage/DrawingArea.h:
1139 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1140 (WebKit::DrawingAreaImpl::create):
1141 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1142 * WebProcess/WebPage/DrawingAreaImpl.h:
1143 * WebProcess/WebPage/WebPage.cpp:
1144 (WebKit::WebPage::WebPage):
1145 (WebKit::WebPage::changeAcceleratedCompositingMode):
1147 2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
1149 Reviewed by Laszlo Gombos and Tor Arne Vestbø.
1151 [Qt] Remove unnecessary "../Source" from paths
1152 after moving source files into Source is finished.
1154 * DerivedSources.pro:
1157 2011-01-18 Maciej Stachowiak <mjs@apple.com>
1159 Reviewed by Sam Weinig.
1161 WebKitTestRunner should track loading more like DumpRenderTree
1162 https://bugs.webkit.org/show_bug.cgi?id=52692
1164 Relax the message check in didSaveFrameToPageCache a bit more, since
1165 layout tests were still hitting the old one.
1167 * UIProcess/WebPageProxy.cpp:
1168 (WebKit::isDisconnectedFrame):
1169 (WebKit::WebPageProxy::didSaveFrameToPageCache):
1171 2011-01-18 Brady Eidson <beidson@apple.com>
1173 Reviewed by Darin Adler.
1175 <rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599
1176 UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
1178 * UIProcess/WebPageProxy.cpp:
1179 (WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
1181 2011-01-18 Brady Eidson <beidson@apple.com>
1183 Reviewed by Maciej Stachowiak.
1185 <rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664
1186 Need WebKit2 API to asynchronously get the resource data for a URL
1188 Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
1189 new API to get a resource by URL:
1190 * UIProcess/API/C/WKFrame.cpp:
1191 (WKFrameGetMainResourceData):
1192 (WKFrameGetResourceData):
1193 (callGetResourceDataBlockAndDispose):
1194 (WKFrameGetMainResourceData_b):
1195 (WKFrameGetResourceData_b):
1196 * UIProcess/API/C/WKFrame.h:
1198 Implement the new API in the UIProcess side:
1199 * UIProcess/WebFrameProxy.cpp:
1200 (WebKit::WebFrameProxy::getResourceData):
1201 * UIProcess/WebFrameProxy.h:
1202 * UIProcess/WebPageProxy.cpp:
1203 (WebKit::WebPageProxy::getResourceDataFromFrame):
1204 * UIProcess/WebPageProxy.h:
1206 Have the WebProcess get the data and call back to the UIProcess:
1207 * WebProcess/WebPage/WebPage.cpp:
1208 (WebKit::WebPage::getResourceDataFromFrame):
1209 * WebProcess/WebPage/WebPage.h:
1210 * WebProcess/WebPage/WebPage.messages.in:
1212 2011-01-18 Anders Carlsson <andersca@apple.com>
1214 Reviewed by Dan Bernstein.
1216 Make PageClientImpl::scrollView do hardware blitting
1217 https://bugs.webkit.org/show_bug.cgi?id=52689
1219 * UIProcess/API/mac/PageClientImpl.mm:
1220 (WebKit::PageClientImpl::scrollView):
1221 Clip the scroll rect and scroll the view.
1223 * UIProcess/DrawingAreaProxyImpl.cpp:
1224 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1225 Scroll before painting.
1227 2011-01-18 Anders Carlsson <andersca@apple.com>
1229 Reviewed by Darin Adler.
1231 Artifacts when scrolling with new drawing area
1232 https://bugs.webkit.org/show_bug.cgi?id=52682
1234 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1235 (WebKit::WebChromeClient::scroll):
1236 When scrolling, we want the intersection of the scroll rect and clip rect.
1238 2011-01-18 Anders Carlsson <andersca@apple.com>
1240 Reviewed by Darin Adler.
1242 Use a CGLayer for the backing store when possible
1243 https://bugs.webkit.org/show_bug.cgi?id=52679
1245 * UIProcess/mac/BackingStoreMac.mm:
1246 (WebKit::BackingStore::paint):
1247 If there is a layer, paint it into the given context.
1249 (WebKit::BackingStore::backingStoreContext):
1250 If we can get the containing window graphics context, use it to create a
1251 CGLayer that we'll use for the backing store.
1253 (WebKit::BackingStore::scroll):
1254 Paint the layer into itself.
1256 * UIProcess/mac/WebPageProxyMac.mm:
1257 (WebKit::WebPageProxy::containingWindowGraphicsContext):
1258 Call the page client.
1260 2011-01-18 Anders Carlsson <andersca@apple.com>
1262 Reviewed by Dan Bernstein.
1264 Pass the web page proxy to BackingStore::create
1265 https://bugs.webkit.org/show_bug.cgi?id=52673
1267 * UIProcess/BackingStore.cpp:
1268 (WebKit::BackingStore::create):
1269 Add WebPageProxy parameter.
1271 (WebKit::BackingStore::BackingStore):
1272 Add WebPageProxy parameter.
1274 * UIProcess/BackingStore.h:
1275 Add WebPageProxy member variable.
1277 * UIProcess/DrawingAreaProxyImpl.cpp:
1278 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1279 Pass the web page proxy when creating the backing store.
1281 * UIProcess/mac/BackingStoreMac.mm:
1282 (WebKit::BackingStore::backingStoreContext):
1283 Set the default blend mode.
1285 2011-01-18 Anders Carlsson <andersca@apple.com>
1287 Reviewed by Darin Adler.
1289 Factor code to create the backing store bitmap context out into a new function
1290 https://bugs.webkit.org/show_bug.cgi?id=52670
1292 * UIProcess/BackingStore.h:
1293 * UIProcess/mac/BackingStoreMac.mm:
1294 (WebKit::BackingStore::backingStoreContext):
1295 Create the backing store context.
1297 (WebKit::BackingStore::incorporateUpdate):
1298 Call backingStoreContext.
1300 (WebKit::BackingStore::scroll):
1301 Assert that the context is not null.
1303 2011-01-18 Anders Carlsson <andersca@apple.com>
1305 Reviewed by Dan Bernstein.
1307 Add PageClientImpl::containingWindowGraphicsContext
1308 https://bugs.webkit.org/show_bug.cgi?id=52666
1310 * UIProcess/API/mac/PageClientImpl.h:
1311 * UIProcess/API/mac/PageClientImpl.mm:
1312 (WebKit::PageClientImpl::containingWindowGraphicsContext):
1313 * UIProcess/PageClient.h:
1314 * UIProcess/WebPageProxy.h:
1316 2011-01-18 Damian Kaleta <dkaleta@apple.com>
1318 Reviewed by Sam Weinig.
1320 WK2 methods WKPageScaleWebView and WKPageGetViewScaleFactor need to have consistent names
1321 https://bugs.webkit.org/show_bug.cgi?id=52647
1323 * UIProcess/API/C/WKPage.cpp:
1324 (WKPageSetScaleFactor):
1325 (WKPageGetScaleFactor):
1326 * UIProcess/API/C/WKPage.h:
1328 2011-01-18 Anders Carlsson <andersca@apple.com>
1330 Reviewed by Dan Bernstein.
1332 Ask the web page proxy to scroll the view when needed
1333 https://bugs.webkit.org/show_bug.cgi?id=52665
1335 * UIProcess/DrawingAreaProxyImpl.cpp:
1336 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1337 * UIProcess/WebPageProxy.cpp:
1338 (WebKit::WebPageProxy::scrollView):
1339 * UIProcess/WebPageProxy.h:
1341 2011-01-18 Anders Carlsson <andersca@apple.com>
1345 * UIProcess/win/WebView.cpp:
1346 (WebKit::WebView::scrollView):
1348 2011-01-18 Anders Carlsson <andersca@apple.com>
1350 Reviewed by Sam Weinig.
1352 Add PageClient::scrollView
1353 https://bugs.webkit.org/show_bug.cgi?id=52663
1355 * UIProcess/API/mac/PageClientImpl.h:
1356 * UIProcess/API/mac/PageClientImpl.mm:
1357 (WebKit::PageClientImpl::scrollView):
1358 * UIProcess/API/qt/qwkpage.cpp:
1359 (QWKPagePrivate::scrollView):
1360 * UIProcess/API/qt/qwkpage_p.h:
1361 * UIProcess/PageClient.h:
1362 * UIProcess/win/WebView.cpp:
1363 (WebKit::PageClientImpl::scrollView):
1364 * UIProcess/win/WebView.h:
1366 2011-01-18 Anders Carlsson <andersca@apple.com>
1368 Reviewed by Sam Weinig.
1370 Rename scrollDelta to scrollOffset everywhere.
1372 * Shared/UpdateInfo.cpp:
1373 (WebKit::UpdateInfo::encode):
1374 (WebKit::UpdateInfo::decode):
1375 * Shared/UpdateInfo.h:
1376 * UIProcess/BackingStore.h:
1377 * UIProcess/mac/BackingStoreMac.mm:
1378 (WebKit::BackingStore::incorporateUpdate):
1379 (WebKit::BackingStore::scroll):
1380 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1381 (WebKit::WebChromeClient::scroll):
1382 (WebKit::WebChromeClient::delegatedScrollRequested):
1383 * WebProcess/WebCoreSupport/WebChromeClient.h:
1384 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1385 (WebKit::ChunkedUpdateDrawingArea::scroll):
1386 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1387 * WebProcess/WebPage/DrawingArea.h:
1388 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1389 (WebKit::DrawingAreaImpl::scroll):
1390 (WebKit::DrawingAreaImpl::display):
1391 * WebProcess/WebPage/DrawingAreaImpl.h:
1392 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1393 (WebKit::LayerBackedDrawingArea::scroll):
1394 * WebProcess/WebPage/LayerBackedDrawingArea.h:
1396 2011-01-18 Anders Carlsson <andersca@apple.com>
1398 Reviewed by Sam Weinig.
1400 Get and paint each individual rect in -[WKView drawRect:]
1401 https://bugs.webkit.org/show_bug.cgi?id=52660
1403 * UIProcess/API/mac/WKView.mm:
1404 (-[WKView drawRect:]):
1406 2011-01-18 Anders Carlsson <andersca@apple.com>
1408 Reviewed by Darin Adler.
1410 Assertion when loading two URLs in quick succession
1411 https://bugs.webkit.org/show_bug.cgi?id=52649
1412 <rdar://problem/8764645>
1414 If beginLoad is called twice without didStartProvisionalLoad being called in between,
1415 m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
1417 * WebProcess/WebPage/WebPage.cpp:
1418 (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
1419 Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
1420 if it is not null, since that's valid.
1422 2011-01-18 Anders Carlsson <andersca@apple.com>
1424 Reviewed by Sam Weinig.
1426 Implement NPN_PopUpContextMenu
1427 https://bugs.webkit.org/show_bug.cgi?id=52646
1428 <rdar://problem/8735616>
1430 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1431 (WebKit::NPN_PopUpContextMenu):
1432 Call NetscapePlugin::popUpContextMenu.
1434 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1435 (WebKit::NetscapePlugin::NetscapePlugin):
1436 Initialize m_currentMouseEvent.
1438 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1439 Add m_currentMouseEvent.
1441 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1442 (WebKit::NetscapePlugin::popUpContextMenu):
1443 Convert the coordinates from the current mouse event to screen coordinates and call
1446 (WebKit::NetscapePlugin::platformHandleMouseEvent):
1447 Update m_currentMouseEvent.
1449 2011-01-18 Jessie Berlin <jberlin@apple.com>
1451 Reviewed by Darin Adler.
1453 WebKit2: Do not assert that the provisional and committed URLs cannot be empty/null
1454 https://bugs.webkit.org/show_bug.cgi?id=52641
1456 * UIProcess/WebFrameProxy.cpp:
1457 (WebKit::WebFrameProxy::didStartProvisionalLoad):
1458 (WebKit::WebFrameProxy::didCommitLoad):
1459 (WebKit::WebFrameProxy::didFinishLoad):
1461 2011-01-18 Anders Carlsson <andersca@apple.com>
1463 Reviewed by Sam Weinig.
1465 ASSERT in plug-in code when going to youtube
1466 https://bugs.webkit.org/show_bug.cgi?id=52638
1468 * PluginProcess/PluginControllerProxy.cpp:
1469 (WebKit::PluginControllerProxy::paintEntirePlugin):
1470 Don't try to paint the plug-in if the plug-in frame is empty.
1472 2011-01-18 Anders Carlsson <andersca@apple.com>
1474 Reviewed by Dan Bernstein.
1476 Plug-in hosting WebProcess instances appear in Activity Monitor as WebProcess
1477 https://bugs.webkit.org/show_bug.cgi?id=52635
1478 <rdar://problem/8731337>
1480 * PluginProcess/PluginProcess.cpp:
1481 (WebKit::PluginProcess::initialize):
1482 Call platformInitialize.
1484 * PluginProcess/PluginProcess.h:
1485 Add platformInitialize.
1487 * PluginProcess/mac/PluginProcessMac.mm:
1488 (WebKit::PluginProcess::platformInitialize):
1489 Set the compositing render server port and the visible application name.
1491 * Shared/Plugins/PluginProcessCreationParameters.cpp:
1492 (WebKit::PluginProcessCreationParameters::encode):
1493 (WebKit::PluginProcessCreationParameters::decode):
1494 Encode/decode the parent process name.
1496 * Shared/Plugins/PluginProcessCreationParameters.h:
1497 Add parentProcessName.
1499 * Shared/WebProcessCreationParameters.cpp:
1500 (WebKit::WebProcessCreationParameters::encode):
1501 (WebKit::WebProcessCreationParameters::decode):
1502 Encode/decode the parent process name.
1504 * Shared/WebProcessCreationParameters.h:
1505 Add parentProcessName.
1507 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1508 (WebKit::ProcessLauncher::launchProcess):
1509 Don't pass the parent process name here.
1511 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1512 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1513 Set the visible name.
1515 * UIProcess/mac/WebContextMac.mm:
1516 (WebKit::WebContext::platformInitializeWebProcess):
1517 Pass along the parent process name.
1519 * WebProcess/mac/WebProcessMac.mm:
1520 (WebKit::WebProcess::platformInitializeWebProcess):
1521 Set the visible name.
1523 * WebProcess/mac/WebProcessMainMac.mm:
1524 (WebKit::WebProcessMain):
1525 Don't set the visible name here. It's done in platformInitializeWebProcess.
1527 2011-01-18 Balazs Kelemen <kbalazs@webkit.org>
1529 Reviewed by Csaba Osztrogonác.
1531 [Qt][WK2] Not implemented warnings should not break layout tests
1532 https://bugs.webkit.org/show_bug.cgi?id=52616
1534 * WebKit2Prefix.h: Define DISABLE_NOT_IMPLEMENTED_WARNINGS on Qt.
1536 2011-01-17 Jon Honeycutt <jhoneycutt@apple.com>
1538 Windows build fix. Unreviewed.
1540 * Shared/PrintInfo.cpp:
1541 Use #include, not #import.
1543 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1545 Actually wrote a FIXME promised for a review comment.
1547 * UIProcess/API/mac/WKView.mm:
1548 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1550 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1552 Reviewed by Anders Carlsson and Darin Adler.
1554 https://bugs.webkit.org/show_bug.cgi?id=52595
1555 Make basic printing work in WebKit2
1557 * Shared/WebPreferencesStore.h:
1558 * UIProcess/API/C/WKPreferences.cpp:
1559 (WKPreferencesSetShouldPrintBackgrounds):
1560 (WKPreferencesGetShouldPrintBackgrounds):
1561 * UIProcess/API/C/WKPreferences.h:
1562 Implement a preference for printing backgrounds.
1564 * Shared/PrintInfo.cpp: Added.
1565 (WebKit::PrintInfo::encode):
1566 (WebKit::PrintInfo::decode):
1567 * Shared/PrintInfo.h: Added.
1568 * Shared/mac/PrintInfoMac.mm: Added.
1569 (WebKit::PrintInfo::PrintInfo):
1570 A new class for passing page setup information down to the web process.
1572 * WebKit2.xcodeproj/project.pbxproj:
1575 * win/WebKit2.vcproj:
1578 * Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
1580 * UIProcess/API/mac/WKView.mm:
1581 (WKViewData): Cache page count and geometry.
1582 (WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
1583 (-[WKView drawRect:]): Added logging.
1584 (setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all
1585 methods invoked for this operation would know what's being printed.
1586 (frameBeingPrinted): Retrieve this data.
1587 (-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
1589 (-[WKView knowsPageRange:]): Ask the web process.
1590 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1591 Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
1592 to page implementation.
1593 (-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
1594 (-[WKView rectForPage:]): Return a pre-calculated rect.
1596 * UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
1597 printing mode. The UI process controls that.
1599 * UIProcess/WebPageProxy.cpp:
1600 (WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
1601 (WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
1602 (WebKit::WebPageProxy::endPrinting): Ditto.
1603 (WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
1604 (WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
1606 * WebProcess/WebPage/WebPage.cpp:
1607 (WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
1608 (WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
1609 (WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
1610 already in printing mode).
1611 (WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
1612 (WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
1614 (WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
1615 of a page rect. It should really work for onscreen content, but we only need it for printing.
1617 * WebProcess/WebPage/WebPage.h:
1619 * WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
1620 ComputePagesForPrinting and DrawRectToPDF.
1622 2011-01-17 Tony Gentilcore <tonyg@chromium.org>
1624 Reviewed by Alexey Proskuryakov.
1626 Fix some headers with missing or misspelled #ifndef guards
1627 https://bugs.webkit.org/show_bug.cgi?id=52545
1629 * Shared/UserMessageCoders.h:
1630 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1631 * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
1632 * WebProcess/WebProcessMain.h:
1634 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1638 * Platform/Logging.cpp:
1640 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1642 Reviewed by Dan Bernstein.
1644 https://bugs.webkit.org/show_bug.cgi?id=52592
1645 Add a logging channel for WKView
1647 * Platform/Logging.cpp:
1648 * Platform/Logging.h:
1650 2011-01-17 Anders Carlsson <andersca@apple.com>
1652 Reviewed by Sam Weinig.
1654 Factor bitmap context drawing code out into a shared function
1655 https://bugs.webkit.org/show_bug.cgi?id=52589
1657 * Platform/cg/CGUtilities.h: Added.
1658 * Platform/cg/CGUtilities.cpp: Added.
1659 (WebKit::paintBitmapContext):
1660 New function that will paint a bitmap context into a CGContext.
1662 * Shared/cg/ShareableBitmapCG.cpp:
1663 (WebKit::ShareableBitmap::paint):
1664 Use paintBitmapContext.
1666 * UIProcess/mac/BackingStoreMac.mm:
1667 (WebKit::BackingStore::paint):
1668 (WebKit::BackingStore::scroll):
1669 Use paintBitmapContext.
1671 * WebKit2.xcodeproj/project.pbxproj:
1672 * win/WebKit2.vcproj:
1673 * win/WebKit2Common.vsprops:
1674 Add CGUtilities.{cpp|h}.
1676 2011-01-17 Dan Bernstein <mitz@apple.com>
1678 Rubber-stamped by Mark Rowe.
1680 Update xcodeproj svn:ignore to include xcuserdata.
1682 * WebKit2.xcodeproj: Modified property svn:ignore.
1684 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1686 Fixing a typo from a bad merge.
1688 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
1690 2011-01-17 Alexey Proskuryakov <ap@apple.com>
1692 Reviewed by John Sullivan.
1694 https://bugs.webkit.org/show_bug.cgi?id=52590
1695 Should pass a frame into -[WKView canPrintHeadersAndFooters]
1697 * UIProcess/API/mac/WKView.h:
1698 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
1699 to canChangeFrameLayout.
1701 2011-01-17 Anders Carlsson <andersca@apple.com>
1703 Reviewed by Sam Weinig.
1705 Implement scrolling support
1706 https://bugs.webkit.org/show_bug.cgi?id=52502
1708 * Shared/UpdateInfo.cpp:
1709 (WebKit::UpdateInfo::encode):
1710 (WebKit::UpdateInfo::decode):
1711 * Shared/UpdateInfo.h:
1712 Add scrollRect and scrollDelta member variables.
1714 * UIProcess/BackingStore.h:
1715 Add scroll member function.
1717 * UIProcess/DrawingAreaProxyImpl.cpp:
1718 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1719 Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
1721 * UIProcess/mac/BackingStoreMac.mm:
1722 (WebKit::BackingStore::incorporateUpdate):
1725 (WebKit::BackingStore::scroll):
1726 Paint the backing store into itself.
1728 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1729 (WebKit::DrawingAreaImpl::display):
1730 Pass the scroll information in the update info.
1732 2011-01-17 Andrey Kosyakov <caseq@chromium.org>
1734 Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
1736 * win/WebKit2.vcproj:
1737 * win/WebKit2GeneratedCommon.vsprops:
1738 * win/WebKit2WebProcess.vcproj:
1740 2011-01-17 Pavel Feldman <pfeldman@chromium.org>
1742 Reviewed by Yury Semikhatsky.
1744 Web Inspector: simplify debugger enabling routine.
1745 https://bugs.webkit.org/show_bug.cgi?id=52472
1747 * WebProcess/WebPage/WebInspector.cpp:
1748 (WebKit::WebInspector::startJavaScriptDebugging):
1750 2011-01-17 Balazs Kelemen <kbalazs@webkit.org>
1752 Reviewed by Andreas Kling.
1754 [Qt][WK2] Crash due to double destruction of QSharedMemory
1755 https://bugs.webkit.org/show_bug.cgi?id=52569
1757 Avoid deleting the QSharedMemory twice.
1758 * Platform/qt/SharedMemoryQt.cpp:
1759 (WebKit::SharedMemory::~SharedMemory):
1760 * Shared/qt/CleanupHandler.cpp:
1761 Renamed m_inDeleteObjects to m_hasStartedDeleting and
1762 added a getter for it.
1763 (WebKit::CleanupHandler::CleanupHandler):
1764 (WebKit::CleanupHandler::deleteObjects):
1765 * Shared/qt/CleanupHandler.h:
1766 (WebKit::CleanupHandler::unmark):
1767 (WebKit::CleanupHandler::hasStartedDeleting):
1769 2011-01-15 Adam Barth <abarth@webkit.org>
1771 Rubber-stamped by Eric Seidel.
1773 Move WebKit2 into Source
1774 https://bugs.webkit.org/show_bug.cgi?id=52438
1776 * DerivedSources.pro:
1780 * win/WebKit2.vcproj:
1781 * win/WebKit2WebProcess.vcproj:
1783 2011-01-14 Yuzo Fujishima <yuzo@google.com>
1785 Reviewed by Antti Koivisto.
1787 Rename cache() to memoryCache()
1788 https://bugs.webkit.org/show_bug.cgi?id=52433
1790 * WebProcess/WebProcess.cpp:
1791 (WebKit::WebProcess::shutdownIfPossible):
1792 (WebKit::WebProcess::didClose):
1793 * WebProcess/mac/WebProcessMac.mm:
1794 (WebKit::WebProcess::platformSetCacheModel):
1795 * WebProcess/win/WebProcessWin.cpp:
1796 (WebKit::WebProcess::platformSetCacheModel):
1798 2011-01-13 Geoffrey Garen <ggaren@apple.com>
1800 Reviewed by Oliver Hunt.
1802 Split out a MarkedSpace strategy object from Heap.
1803 https://bugs.webkit.org/show_bug.cgi?id=52421
1805 * Shared/mac/WebMemorySampler.mac.mm:
1806 (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
1808 2011-01-14 Anders Carlsson <andersca@apple.com>
1810 Reviewed by Dan Bernstein.
1812 Add a new PageClient::displayView function and expose it on WebPageProxy
1813 https://bugs.webkit.org/show_bug.cgi?id=52500
1815 * UIProcess/API/mac/PageClientImpl.h:
1816 * UIProcess/API/mac/PageClientImpl.mm:
1817 (WebKit::PageClientImpl::displayView):
1818 * UIProcess/API/qt/qwkpage.cpp:
1819 (QWKPagePrivate::displayView):
1820 * UIProcess/API/qt/qwkpage_p.h:
1821 * UIProcess/PageClient.h:
1822 * UIProcess/WebPageProxy.cpp:
1823 (WebKit::WebPageProxy::displayView):
1824 * UIProcess/WebPageProxy.h:
1825 * UIProcess/win/WebView.cpp:
1826 (WebKit::WebView::displayView):
1827 * UIProcess/win/WebView.h:
1829 2011-01-14 Anders Carlsson <andersca@apple.com>
1831 Reviewed by Sam Weinig.
1833 Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
1834 https://bugs.webkit.org/show_bug.cgi?id=52499
1836 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1837 (WebKit::shouldPaintBoundsRect):
1838 Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
1840 (WebKit::DrawingAreaImpl::display):
1841 If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
1843 2011-01-14 Brian Weinstein <bweinstein@apple.com>
1845 Reviewed by Geoff Garen.
1847 ShouldLoadResourceForFrame should use strings, not URLs.
1848 https://bugs.webkit.org/show_bug.cgi?id=52476
1850 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1851 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1852 (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
1853 a URL, and rename from subresourceURL to resourceURL.
1855 2011-01-14 Anders Carlsson <andersca@apple.com>
1857 Reviewed by Sam Weinig.
1859 Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
1861 Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
1863 * Shared/WebProcessCreationParameters.cpp:
1864 (WebKit::WebProcessCreationParameters::encode):
1865 (WebKit::WebProcessCreationParameters::decode):
1866 Encode and decode the uiProcessBundleResourcePath member variable.
1868 * Shared/WebProcessCreationParameters.h:
1869 Add uiProcessBundleResourcePath member variable.
1871 * UIProcess/mac/WebContextMac.mm:
1872 (WebKit::WebContext::platformInitializeWebProcess):
1873 Set the uiProcessBundleResourcePath member variable.
1875 * WebProcess/com.apple.WebProcess.sb:
1876 Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
1878 * WebProcess/mac/WebProcessMac.mm:
1879 (WebKit::initializeSandbox):
1880 When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
1882 (WebKit::WebProcess::platformInitializeWebProcess):
1883 Remove the code that would consume a sandbox extension for the url cache path.
1885 2011-01-14 Anders Carlsson <andersca@apple.com>
1887 Reviewed by Sam Weinig.
1889 Delay initializing the sandbox until we get the InitializeWebProcess message.
1891 * WebProcess/mac/WebProcessMac.mm:
1892 (WebKit::initializeSandbox):
1893 (WebKit::WebProcess::platformInitializeWebProcess):
1894 * WebProcess/mac/WebProcessMainMac.mm:
1895 (WebKit::WebProcessMain):
1897 2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1899 Reviewed by Kenneth Rohde Christiansen.
1901 Align import/export directives
1902 https://bugs.webkit.org/show_bug.cgi?id=52208
1904 * Shared/API/c/WKBase.h: Align import/export directives with
1905 JavaScriptCore/API/JSBase.h.
1907 2011-01-14 Pavel Feldman <pfeldman@chromium.org>
1909 Reviewed by Yury Semikhatsky.
1911 Web Inspector: extract InspectorSettings from InspectorState,
1913 https://bugs.webkit.org/show_bug.cgi?id=52429
1915 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1917 2011-01-13 Enrica Casucci <enrica@apple.com>
1919 Reviewed by Darin Adler.
1921 WebKit2: Add support for drag and drop
1922 https://bugs.webkit.org/show_bug.cgi?id=52343
1923 <rdar://problem/7660558>
1925 This patch contains the changes required to support dropping content
1926 in WebKit on the Mac. The DragData class has been extended to provide
1927 additional context from the application (keyboard state, modal windows, etc.)
1928 as well as information of the drag pasteboard being used.
1929 The support for WebKit as drag source will be added with a separate patch.
1931 * Shared/DragControllerAction.h: Added.
1932 * UIProcess/API/mac/WKView.mm:
1933 Added implemention of the methods required to add suport for a drop target.
1934 To maintain asynchronous communication with the WebProcess, we always return
1935 the previous calculated value for the drag operation.
1936 (-[WKView _registerDraggedTypes]):
1937 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1938 (-[WKView applicationFlags:]):
1939 (-[WKView draggingEntered:]):
1940 (-[WKView draggingUpdated:]):
1941 (-[WKView draggingExited:]):
1942 (-[WKView prepareForDragOperation:]):
1943 (-[WKView performDragOperation:]):
1944 * UIProcess/WebPageProxy.cpp:
1945 (WebKit::WebPageProxy::WebPageProxy):
1946 (WebKit::WebPageProxy::performDragControllerAction):
1947 (WebKit::WebPageProxy::didPerformDragControllerAction):
1948 * UIProcess/WebPageProxy.h:
1949 (WebKit::WebPageProxy::dragOperation):
1950 (WebKit::WebPageProxy::resetDragOperation):
1951 * UIProcess/WebPageProxy.messages.in:
1952 * WebKit2.xcodeproj/project.pbxproj:
1953 * WebProcess/WebCoreSupport/WebDragClient.cpp:
1954 (WebKit::WebDragClient::willPerformDragDestinationAction):
1955 (WebKit::WebDragClient::willPerformDragSourceAction):
1956 (WebKit::WebDragClient::actionMaskForDrag):
1957 (WebKit::WebDragClient::dragSourceActionMaskForPoint):
1958 (WebKit::WebDragClient::startDrag):
1959 * WebProcess/WebPage/WebPage.cpp:
1960 (WebKit::WebPage::performDragControllerAction):
1961 * WebProcess/WebPage/WebPage.h:
1962 * WebProcess/WebPage/WebPage.messages.in:
1964 2011-01-13 Dan Bernstein <mitz@apple.com>
1966 Reviewed by John Sullivan.
1968 Incorrect assertion in DrawingAreaImpl::scroll()
1969 https://bugs.webkit.org/show_bug.cgi?id=52376
1971 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1972 (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
1973 This made the assertion valid, but I removed it anyway.
1975 2011-01-12 Balazs Kelemen <kbalazs@webkit.org>
1979 Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
1980 The argument is unused since http://trac.webkit.org/changeset/75468.
1982 * UIProcess/API/qt/qgraphicswkview.cpp:
1983 (QGraphicsWKView::QGraphicsWKView):
1984 * UIProcess/API/qt/qwkpage.cpp:
1985 (QWKPagePrivate::init):
1986 * UIProcess/API/qt/qwkpage_p.h:
1988 2011-01-12 Anders Carlsson <andersca@apple.com>
1990 Reviewed by Sam Weinig.
1992 Implement DrawingAreaImpl::scroll
1993 https://bugs.webkit.org/show_bug.cgi?id=52346
1995 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1996 (WebKit::DrawingAreaImpl::scroll):
1997 If there is already an active scroll, compute the area of both scroll rects and
1998 invalidate the smallest one. Compute a new dirty region if necessary and also
1999 add the scroll repaint region to the dirty region.
2001 (WebKit::DrawingAreaImpl::display):
2002 Reset the scroll area and scroll delta.
2004 * WebProcess/WebPage/DrawingAreaImpl.h:
2005 Add scroll area and scroll delta member variables.
2007 2011-01-12 Anders Carlsson <andersca@apple.com>
2009 Reviewed by Dan Bernstein.
2012 https://bugs.webkit.org/show_bug.cgi?id=52344
2014 * Platform/Region.cpp:
2015 (WebKit::Region::Shape::move):
2016 (WebKit::Region::move):
2017 Change Region::move to take an IntSize.
2019 * Platform/Region.h:
2020 (WebKit::intersect):
2023 Add convenience functions.
2025 2011-01-12 Ryosuke Niwa <rniwa@webkit.org>
2027 Unreviewed Qt build fix for r75661
2029 * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
2031 2011-01-12 Beth Dakin <bdakin@apple.com>
2033 Reviewed by Anders Carlsson.
2035 Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
2036 Expose fixed layout through WebKit SPI
2038 <rdar://problem/8844464>
2040 And now with getters!
2041 * UIProcess/API/C/WKPage.cpp:
2042 (WKPageUseFixedLayout):
2043 (WKPageFixedLayoutSize):
2044 * UIProcess/API/C/WKPage.h:
2045 * UIProcess/WebPageProxy.h:
2046 (WebKit::WebPageProxy::useFixedLayout):
2047 (WebKit::WebPageProxy::fixedLayoutSize):
2049 2011-01-12 Sam Weinig <sam@webkit.org>
2051 Reviewed by Anders Carlsson.
2053 https://bugs.webkit.org/show_bug.cgi?id=52337
2054 PlatformWheelEvent should know about the scroll phase on the Mac
2056 Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
2058 * Shared/WebEvent.h:
2059 (WebKit::WebWheelEvent::phase):
2060 * Shared/WebEventConversion.cpp:
2061 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2062 * Shared/WebWheelEvent.cpp:
2063 (WebKit::WebWheelEvent::WebWheelEvent):
2064 (WebKit::WebWheelEvent::encode):
2065 (WebKit::WebWheelEvent::decode):
2066 * Shared/mac/WebEventFactory.mm:
2067 (WebKit::phaseForEvent):
2068 (WebKit::WebEventFactory::createWebWheelEvent):
2070 2011-01-12 Anders Carlsson <andersca@apple.com>
2072 Reviewed by Sam Weinig.
2074 Get rid of an unneeded parameter from DrawingArea::scroll
2075 https://bugs.webkit.org/show_bug.cgi?id=52336
2077 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2078 (WebKit::WebChromeClient::scroll):
2079 * WebProcess/WebCoreSupport/WebChromeClient.h:
2080 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2081 (WebKit::ChunkedUpdateDrawingArea::scroll):
2082 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2083 * WebProcess/WebPage/DrawingArea.h:
2084 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2085 (WebKit::DrawingAreaImpl::scroll):
2086 * WebProcess/WebPage/DrawingAreaImpl.h:
2087 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2088 (WebKit::LayerBackedDrawingArea::scroll):
2089 * WebProcess/WebPage/LayerBackedDrawingArea.h:
2090 * WebProcess/WebPage/TiledDrawingArea.cpp:
2091 (WebKit::TiledDrawingArea::scroll):
2092 * WebProcess/WebPage/TiledDrawingArea.h:
2094 2011-01-12 Anders Carlsson <andersca@apple.com>
2096 Reviewed by Sam Weinig.
2098 Get the new drawing area painting to the screen
2099 https://bugs.webkit.org/show_bug.cgi?id=52331
2101 * UIProcess/DrawingAreaProxyImpl.cpp:
2102 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2103 Call setViewNeedsDisplay on all the update rects.
2105 * UIProcess/WebPageProxy.cpp:
2106 (WebKit::WebPageProxy::setViewNeedsDisplay):
2107 Call through to the page client.
2109 (WebKit::WebPageProxy::processDidCrash):
2110 Null out the drawing area proxy.
2112 * UIProcess/mac/BackingStoreMac.mm:
2113 (WebKit::BackingStore::paint):
2116 2011-01-12 Anders Carlsson <andersca@apple.com>
2118 Reviewed by Sam Weinig.
2120 More work on getting the drawing area proxy to paint
2121 https://bugs.webkit.org/show_bug.cgi?id=52328
2123 * UIProcess/API/mac/WKView.mm:
2124 (-[WKView drawRect:]):
2125 Handle the new drawing area.
2127 * UIProcess/BackingStore.cpp:
2128 (WebKit::BackingStore::BackingStore):
2129 Assert that the size isn't empty.
2131 * UIProcess/BackingStore.h:
2132 * UIProcess/mac/BackingStoreMac.mm:
2133 (WebKit::BackingStore::incorporateUpdate):
2134 Paint all update rects into the bitmap context.
2136 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2137 (WebKit::DrawingAreaImpl::display):
2138 Create a handle so the shareable bitmap will actually be transferred over.
2140 2011-01-12 Anders Carlsson <andersca@apple.com>
2144 * UIProcess/DrawingAreaProxyImpl.cpp:
2145 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2147 2011-01-12 Anders Carlsson <andersca@apple.com>
2149 Reviewed by Sam Weinig.
2151 Begin stubbing out some more BackingStore member functions
2152 https://bugs.webkit.org/show_bug.cgi?id=52323
2154 * UIProcess/BackingStore.cpp:
2155 (WebKit::BackingStore::~BackingStore):
2156 This was accidentally made into a constructor; it should be a destructor.
2158 * UIProcess/DrawingAreaProxyImpl.cpp:
2159 (WebKit::DrawingAreaProxyImpl::paint):
2160 Call the backing store.
2162 (WebKit::DrawingAreaProxyImpl::update):
2163 Incorporate the update.
2165 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2166 Create the backing store if needed and incorporate the update.
2168 * UIProcess/mac/BackingStoreMac.mm: Added.
2169 (WebKit::BackingStore::platformInitialize):
2170 Create a bitmap context.
2172 (WebKit::BackingStore::paint):
2173 (WebKit::BackingStore::incorporateUpdate):
2176 * WebKit2.xcodeproj/project.pbxproj:
2177 Add BackingStoreMac.mm
2179 2011-01-12 Beth Dakin <bdakin@apple.com>
2181 Reviewed by Anders Carlsson.
2183 Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
2184 fixed layout through WebKit SPI
2186 <rdar://problem/8844464>
2188 Store useFixedLayout and fixedLayoutSize in the
2189 WebPageCreationParameters and the WebPageProxy.
2190 * Shared/WebPageCreationParameters.cpp:
2191 (WebKit::WebPageCreationParameters::encode):
2192 (WebKit::WebPageCreationParameters::decode):
2193 * Shared/WebPageCreationParameters.h:
2194 * UIProcess/API/C/WKPage.cpp:
2195 (WKPageSetUseFixedLayout):
2196 (WKPageSetFixedLayoutSize):
2197 * UIProcess/API/C/WKPage.h:
2198 * UIProcess/WebPageProxy.cpp:
2199 (WebKit::WebPageProxy::WebPageProxy):
2200 (WebKit::WebPageProxy::setUseFixedLayout):
2201 (WebKit::WebPageProxy::setFixedLayoutSize):
2202 (WebKit::WebPageProxy::creationParameters):
2203 * UIProcess/WebPageProxy.h:
2204 * WebProcess/WebPage/WebPage.cpp:
2205 (WebKit::WebPage::setUseFixedLayout):
2206 (WebKit::WebPage::setFixedLayoutSize):
2207 * WebProcess/WebPage/WebPage.h:
2208 * WebProcess/WebPage/WebPage.messages.in:
2210 2011-01-12 Anders Carlsson <andersca@apple.com>
2212 Reviewed by Beth Dakin.
2214 Add BackingStore class
2215 https://bugs.webkit.org/show_bug.cgi?id=52318
2217 * UIProcess/BackingStore.cpp: Added.
2218 (WebKit::BackingStore::create):
2219 (WebKit::BackingStore::BackingStore):
2220 * UIProcess/BackingStore.h: Added.
2221 * WebKit2.xcodeproj/project.pbxproj:
2223 2011-01-12 Brady Eidson <beidson@apple.com>
2225 Reviewed by Sam Weinig.
2227 <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
2228 Back/forward list recovery after a WebProcess crash is crashy itself.
2230 Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
2231 * Shared/SessionState.cpp:
2232 (WebKit::SessionState::isEmpty):
2233 * Shared/SessionState.h:
2235 Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
2236 * Shared/WebBackForwardListItem.cpp:
2237 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
2238 (WebKit::WebBackForwardListItem::highedUsedItemID):
2239 * Shared/WebBackForwardListItem.h:
2240 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2241 (WebKit::generateHistoryItemID):
2242 (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
2243 (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
2244 now tells the WebProcess that a previous WebProcess created.
2245 * WebProcess/WebPage/WebBackForwardListProxy.h:
2247 Encode/decode data relevant to restoring a session on WebPage creation:
2248 * Shared/WebPageCreationParameters.cpp:
2249 (WebKit::WebPageCreationParameters::encode):
2250 (WebKit::WebPageCreationParameters::decode):
2251 * Shared/WebPageCreationParameters.h:
2253 If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to
2254 update the current back/forward item (if necessary) then relaunch the process:
2255 * UIProcess/WebPageProxy.cpp:
2256 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2257 (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
2258 (WebKit::WebPageProxy::initializeWebPage):
2259 (WebKit::WebPageProxy::loadURL):
2260 (WebKit::WebPageProxy::loadURLRequest):
2261 (WebKit::WebPageProxy::reload):
2262 (WebKit::WebPageProxy::goForward):
2263 (WebKit::WebPageProxy::goBack):
2264 (WebKit::WebPageProxy::goToBackForwardItem):
2265 (WebKit::WebPageProxy::creationParameters):
2266 * UIProcess/WebPageProxy.h:
2268 Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
2269 * WebProcess/WebPage/WebPage.messages.in:
2270 * UIProcess/cf/WebPageProxyCF.cpp:
2271 (WebKit::WebPageProxy::restoreFromSessionStateData):
2273 Restore a session on page creation if the parameters include it:
2274 * WebProcess/WebPage/WebPage.cpp:
2275 (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
2276 (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
2277 (WebKit::WebPage::restoreSession):
2278 * WebProcess/WebPage/WebPage.h:
2280 2011-01-12 Anders Carlsson <andersca@apple.com>
2282 Reviewed by Sam Weinig.
2284 Send Update and DidUpdate messages
2285 https://bugs.webkit.org/show_bug.cgi?id=52316
2287 * UIProcess/DrawingAreaProxy.h:
2288 (WebKit::DrawingAreaProxy::update):
2291 * UIProcess/DrawingAreaProxy.messages.in:
2294 * UIProcess/DrawingAreaProxyImpl.cpp:
2295 (WebKit::DrawingAreaProxyImpl::update):
2296 Just send back a DidUpdate message.
2298 * WebProcess/WebPage/DrawingArea.h:
2299 (WebKit::DrawingArea::didUpdate):
2302 * WebProcess/WebPage/DrawingArea.messages.in:
2303 Add DidUpdate message.
2305 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2306 (WebKit::DrawingAreaImpl::didUpdate):
2309 (WebKit::DrawingAreaImpl::display):
2310 Send an Update message.
2312 2011-01-12 Anders Carlsson <andersca@apple.com>
2314 Reviewed by Sam Weinig.
2316 Make the new drawing area actually draw something
2317 https://bugs.webkit.org/show_bug.cgi?id=52314
2319 * Shared/UpdateInfo.cpp:
2320 (WebKit::UpdateInfo::encode):
2321 (WebKit::UpdateInfo::decode):
2322 Encode and decode newly added fields.
2324 * Shared/UpdateInfo.h:
2325 Add a vector of update rects and a handle for the sharable bitmap.
2327 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2328 (WebKit::DrawingAreaImpl::display):
2329 Get the individual rects from the region and paint them into the shareable bitmap.
2331 * WebProcess/WebPage/WebPage.cpp:
2332 (WebKit::WebPage::mainFrameHasCustomRepresentation):
2333 * WebProcess/WebPage/WebPage.h:
2334 Add helper function.
2336 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
2337 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2338 Use helper function.
2340 2011-01-12 Anders Carlsson <andersca@apple.com>
2342 Reviewed by Sam Weinig.
2344 Add UpdateInfo class
2345 https://bugs.webkit.org/show_bug.cgi?id=52306
2347 * Shared/UpdateInfo.cpp: Added.
2348 (WebKit::UpdateInfo::encode):
2349 (WebKit::UpdateInfo::decode):
2350 * Shared/UpdateInfo.h: Added.
2351 (WebKit::UpdateInfo::UpdateInfo):
2352 * WebKit2.xcodeproj/project.pbxproj:
2354 2011-01-12 Anders Carlsson <andersca@apple.com>
2356 Reviewed by Sam Weinig.
2358 More work on the new drawing area implementation
2359 https://bugs.webkit.org/show_bug.cgi?id=52302
2361 * Platform/Region.cpp:
2362 (WebKit::Region::Shape::segments_end):
2363 segments_end could end up returning an iterator that is one element past the Vector data, so
2364 we can't use operator[] since that will assert.
2366 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2367 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2368 Initialize the timer.
2370 (WebKit::DrawingAreaImpl::setNeedsDisplay):
2371 Unite the rect with the dirty region and schedule a display.
2373 (WebKit::DrawingAreaImpl::setSize):
2374 Tell the web page to resize.
2376 (WebKit::DrawingAreaImpl::scheduleDisplay):
2377 Start a display timer if needed.
2379 (WebKit::DrawingAreaImpl::display):
2382 2011-01-12 Brent Fulgham <bfulgham@webkit.org>
2384 Unreviewed build fix after r75527. Rename 'BackingStoreCairo.cpp'
2385 to 'ShareableBitmapCairo.cpp' to match VS project changes.
2387 * Shared/cairo/BackingStoreCairo.cpp: Removed.
2388 * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
2390 2011-01-11 Jeff Miller <jeffm@apple.com>
2392 Reviewed by John Sullivan.
2394 WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
2395 https://bugs.webkit.org/show_bug.cgi?id=52242
2397 * UIProcess/WebPageProxy.cpp:
2398 (WebKit::WebPageProxy::showPopupMenu):
2399 On Windows, stop the responsiveness timer before calling showPopupMenu().
2401 2011-01-11 Maciej Stachowiak <mjs@apple.com>
2403 Reviewed by Anders Carlsson.
2405 UIProcess kills the WebProcess sometimes when detached frames exist
2406 https://bugs.webkit.org/show_bug.cgi?id=52227
2408 * UIProcess/WebPageProxy.cpp:
2409 (WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
2410 if it came in for a detached frame.
2412 2011-01-11 Anders Carlsson <andersca@apple.com>
2416 * WebKit2.xcodeproj/project.pbxproj:
2418 2011-01-11 Anders Carlsson <andersca@apple.com>
2420 Reviewed by Sam Weinig.
2422 Add a Region class which represents a graphical region
2423 https://bugs.webkit.org/show_bug.cgi?id=52255
2425 * Platform/Region.cpp: Added.
2426 (WebKit::Region::Region):
2427 (WebKit::Region::rects):
2428 (WebKit::Region::Shape::Shape):
2429 (WebKit::Region::Shape::appendSpan):
2430 (WebKit::Region::Shape::canCoalesce):
2431 (WebKit::Region::Shape::appendSpans):
2432 (WebKit::Region::Shape::appendSegment):
2433 (WebKit::Region::Shape::spans_begin):
2434 (WebKit::Region::Shape::spans_end):
2435 (WebKit::Region::Shape::segments_begin):
2436 (WebKit::Region::Shape::segments_end):
2437 (WebKit::Region::Shape::dump):
2438 (WebKit::Region::Shape::bounds):
2439 (WebKit::Region::Shape::move):
2440 (WebKit::Region::Shape::swap):
2441 (WebKit::Region::Shape::shapeOperation):
2442 (WebKit::Region::Shape::UnionOperation::trySimpleOperation):
2443 (WebKit::Region::Shape::unionShapes):
2444 (WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
2445 (WebKit::Region::Shape::intersectShapes):
2446 (WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
2447 (WebKit::Region::Shape::subtractShapes):
2448 (WebKit::Region::dump):
2449 (WebKit::Region::intersect):
2450 (WebKit::Region::unite):
2451 (WebKit::Region::subtract):
2452 (WebKit::Region::move):
2453 * Platform/Region.h: Added.
2454 (WebKit::Region::bounds):
2455 (WebKit::Region::isEmpty):
2456 (WebKit::Region::Span::Span):
2457 (WebKit::Region::Shape::isEmpty):
2458 * WebKit2.xcodeproj/project.pbxproj:
2460 2011-01-11 Anders Carlsson <andersca@apple.com>
2462 Reviewed by Darin Adler.
2464 Add DidSetSize message
2465 https://bugs.webkit.org/show_bug.cgi?id=52254
2467 * DerivedSources.make:
2468 Add DrawingAReaProxy.messages.in.
2470 * Platform/CoreIPC/MessageID.h:
2471 Add DrawingAreaProxy message class.
2473 * UIProcess/DrawingAreaProxy.h:
2474 (WebKit::DrawingAreaProxy::didSetSize):
2475 Add CoreIPC message handler function.
2477 * UIProcess/DrawingAreaProxy.messages.in: Added.
2479 * UIProcess/DrawingAreaProxyImpl.cpp:
2480 (WebKit::DrawingAreaProxyImpl::didSetSize):
2483 * UIProcess/WebPageProxy.cpp:
2484 (WebKit::WebPageProxy::didReceiveMessage):
2485 Handle DrawingAreaProxy messages.
2487 * WebKit2.xcodeproj/project.pbxproj:
2490 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2491 (WebKit::DrawingAreaImpl::setSize):
2492 Send a DidSetSize message for now.
2494 2011-01-11 Sam Weinig <sam@webkit.org>
2496 Reviewed by Anders Carlsson.
2498 Fix spelling mistake. Sharable -> Shareable.
2500 * Shared/API/c/WKImage.h:
2501 * Shared/API/c/WKSharedAPICast.h:
2502 (WebKit::toImageOptions):
2503 * Shared/ImageOptions.h:
2504 * Shared/WebImage.cpp:
2505 (WebKit::WebImage::create):
2507 2011-01-11 Anders Carlsson <andersca@apple.com>
2509 Reviewed by Sam Weinig.
2512 https://bugs.webkit.org/show_bug.cgi?id=52247
2514 * DerivedSources.make:
2515 Add DrawingArea.messages.in
2517 * Platform/CoreIPC/MessageID.h:
2518 Add DrawingArea message class.
2520 * UIProcess/DrawingAreaProxyImpl.cpp:
2521 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2524 (WebKit::DrawingAreaProxyImpl::sendSetSize):
2525 Send a SetSize message.
2527 * UIProcess/DrawingAreaProxyImpl.h:
2528 Add setSize override.
2530 * WebKit2.xcodeproj/project.pbxproj:
2533 * WebProcess/WebPage/DrawingArea.h:
2534 (WebKit::DrawingArea::setSize):
2535 Add setSize member function.
2537 * WebProcess/WebPage/DrawingArea.messages.in: Added.
2539 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2540 * WebProcess/WebPage/DrawingAreaImpl.h:
2543 * WebProcess/WebPage/WebPage.cpp:
2544 (WebKit::WebPage::didReceiveMessage):
2545 Handle drawing area messages.
2547 2011-01-11 Anders Carlsson <andersca@apple.com>
2549 Reviewed by Sam Weinig.
2551 Replace ASSERTs with FIXMEs.
2553 * UIProcess/DrawingAreaProxyImpl.cpp:
2554 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2555 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2557 2011-01-11 Anders Carlsson <andersca@apple.com>
2559 Reviewed by Sam Weinig.
2561 Add DrawingAreaImpl skeleton class
2562 https://bugs.webkit.org/show_bug.cgi?id=52246
2564 * UIProcess/API/mac/WKView.mm:
2565 (useNewDrawingArea):
2566 New function which controls which drawing area to use, through an environment variable.
2568 (-[WKView drawRect:]):
2569 Bail if we're using the new drawing area (for now).
2571 (-[WKView WebKit::]):
2572 Create a DrawingAreaProxyImpl when asked to.
2574 * WebKit2.xcodeproj/project.pbxproj:
2577 * WebProcess/WebPage/DrawingArea.cpp:
2578 (WebKit::DrawingArea::create):
2579 Create a DrawingAreaImpl when asked to.
2581 * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
2582 * WebProcess/WebPage/DrawingAreaImpl.h: Added.
2583 Add DrawingAreaImpl class.
2585 2011-01-11 Anders Carlsson <andersca@apple.com>
2587 Reviewed by Sam Weinig.
2589 Add Mac-only DrawingAreaProxyImpl class skeleton
2590 https://bugs.webkit.org/show_bug.cgi?id=52243
2592 This is the proxy side of a new drawing area implementation. This is Mac only for now
2593 while the design is being fleshed out.
2595 * Shared/DrawingAreaInfo.h:
2596 * UIProcess/API/mac/WKView.mm:
2597 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
2598 * UIProcess/DrawingAreaProxyImpl.cpp: Added.
2599 (WebKit::DrawingAreaProxyImpl::create):
2600 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2601 (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
2602 (WebKit::DrawingAreaProxyImpl::didReceiveMessage):
2603 (WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
2604 (WebKit::DrawingAreaProxyImpl::paint):
2605 (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2606 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2607 (WebKit::DrawingAreaProxyImpl::attachCompositingContext):
2608 (WebKit::DrawingAreaProxyImpl::detachCompositingContext):
2609 * UIProcess/DrawingAreaProxyImpl.h: Added.
2610 * WebKit2.xcodeproj/project.pbxproj:
2611 * WebProcess/WebPage/DrawingArea.cpp:
2612 (WebKit::DrawingArea::create):
2614 2011-01-11 Anders Carlsson <andersca@apple.com>
2618 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2619 (WebKit::WebPopupMenu::setUpPlatformData):
2621 2011-01-11 Anders Carlsson <andersca@apple.com>
2623 Reviewed by Sam Weinig.
2625 Rename ShareableBitmap::createSharable to createShareable
2626 https://bugs.webkit.org/show_bug.cgi?id=52234
2628 * Shared/ShareableBitmap.cpp:
2629 (WebKit::ShareableBitmap::createShareable):
2630 * Shared/ShareableBitmap.h:
2631 * Shared/WebImage.cpp:
2632 (WebKit::WebImage::create):
2633 * WebProcess/Plugins/PluginProxy.cpp:
2634 (WebKit::PluginProxy::geometryDidChange):
2635 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2636 (WebKit::WebPopupMenu::setUpPlatformData):
2637 * WebProcess/WebPage/FindController.cpp:
2638 (WebKit::FindController::updateFindIndicator):
2640 2011-01-11 Anders Carlsson <andersca@apple.com>
2642 Reviewed by Sam Weinig.
2644 Rename BackingStore to ShareableBitmap
2645 https://bugs.webkit.org/show_bug.cgi?id=52228
2648 * PluginProcess/PluginControllerProxy.cpp:
2649 (WebKit::PluginControllerProxy::geometryDidChange):
2650 * PluginProcess/PluginControllerProxy.h:
2651 * Shared/API/c/cg/WKImageCG.cpp:
2652 (WKImageCreateCGImage):
2653 * Shared/BackingStore.cpp: Removed.
2654 * Shared/BackingStore.h: Removed.
2655 * Shared/PlatformPopupMenuData.cpp:
2656 (WebKit::PlatformPopupMenuData::decode):
2657 * Shared/PlatformPopupMenuData.h:
2658 * Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
2659 (WebKit::ShareableBitmap::create):
2660 (WebKit::ShareableBitmap::createSharable):
2661 (WebKit::ShareableBitmap::createHandle):
2662 (WebKit::ShareableBitmap::ShareableBitmap):
2663 (WebKit::ShareableBitmap::~ShareableBitmap):
2664 (WebKit::ShareableBitmap::resize):
2665 (WebKit::ShareableBitmap::data):
2666 * Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
2667 * Shared/UserMessageCoders.h:
2668 (WebKit::UserMessageEncoder::baseEncode):
2669 (WebKit::UserMessageDecoder::baseDecode):
2670 * Shared/WebImage.cpp:
2671 (WebKit::WebImage::create):
2672 (WebKit::WebImage::WebImage):
2673 (WebKit::WebImage::~WebImage):
2674 (WebKit::WebImage::size):
2675 * Shared/WebImage.h:
2676 (WebKit::WebImage::bitmap):
2677 * Shared/cairo/BackingStoreCairo.cpp:
2678 (WebKit::ShareableBitmap::createGraphicsContext):
2679 (WebKit::ShareableBitmap::paint):
2680 * Shared/cg/BackingStoreCG.cpp: Removed.
2681 * Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
2682 (WebKit::ShareableBitmap::createGraphicsContext):
2683 (WebKit::ShareableBitmap::paint):
2684 * Shared/gtk/BackingStoreGtk.cpp: Removed.
2685 * Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
2686 (WebKit::ShareableBitmap::createGraphicsContext):
2687 (WebKit::ShareableBitmap::paint):
2688 * Shared/qt/BackingStoreQt.cpp: Removed.
2689 * Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
2690 (WebKit::ShareableBitmap::createGraphicsContext):
2691 (WebKit::ShareableBitmap::paint):
2692 * UIProcess/FindIndicator.cpp:
2693 (WebKit::FindIndicator::create):
2694 (WebKit::FindIndicator::FindIndicator):
2695 * UIProcess/FindIndicator.h:
2696 (WebKit::FindIndicator::contentImage):
2698 * WebKit2.xcodeproj/project.pbxproj:
2699 * WebProcess/Plugins/PluginProxy.cpp:
2700 (WebKit::PluginProxy::geometryDidChange):
2701 * WebProcess/Plugins/PluginProxy.h:
2702 * WebProcess/WebPage/FindController.cpp:
2703 (WebKit::FindController::updateFindIndicator):
2704 * WebProcess/WebPage/WebPage.cpp:
2705 (WebKit::WebPage::snapshotInViewCoordinates):
2706 (WebKit::WebPage::snapshotInDocumentCoordinates):
2707 * win/WebKit2.vcproj:
2709 2011-01-11 John Sullivan <sullivan@apple.com>
2711 Reviewed by Anders Carlsson.
2713 [WKView setFrameSize:] derefs _page->drawingArea() without null check
2714 <https://bugs.webkit.org/show_bug.cgi?id=52231>
2716 * UIProcess/API/mac/WKView.mm:
2717 (-[WKView setFrameSize:]):
2718 Null check drawingArea(). This is OK because if it doesn't exist then it will be
2719 created later with the correct initial size.
2721 2011-01-07 Enrica Casucci <enrica@apple.com>
2723 Reviewed by Alexey Proskuryakov.
2725 Paste and drag and drop use different code paths to interact with the pasteboard.
2726 https://bugs.webkit.org/show_bug.cgi?id=52093
2727 The change consists in a refactoring of the code to have only one class that
2728 deals with the pasteboard on Mac.
2730 * WebProcess/WebCoreSupport/WebEditorClient.h:
2731 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
2732 exposed by NSURLExtras.
2733 (WebKit::WebEditorClient::canonicalizeURL):
2734 (WebKit::WebEditorClient::canonicalizeURLString):
2736 2011-01-11 Jessie Berlin <jberlin@apple.com>
2738 Reviewed by Anders Carlsson and Sam Weinig.
2740 Fix crash on launch on Windows.
2742 * UIProcess/win/WebView.cpp:
2743 (WebKit::WebView::onSizeEvent):
2744 The drawing area is no longer initialized before the WebView is created and the first
2745 onSize is receieved.
2747 2011-01-11 Anders Carlsson <andersca@apple.com>
2749 Reviewed by Dan Bernstein.
2751 Automatically reinitialize the web page on relaunch
2752 https://bugs.webkit.org/show_bug.cgi?id=52224
2753 <rdar://problem/8765695>
2755 * UIProcess/API/mac/WKView.mm:
2756 (-[WKView _didRelaunchProcess]):
2757 Remove call to reinitializeWebPage.
2759 * UIProcess/WebPageProxy.cpp:
2760 (WebKit::WebPageProxy::relaunch):
2761 Call initializeWebPage().
2763 (WebKit::WebPageProxy::initializeWebPage):
2764 Assert that the web page is valid here.
2766 * UIProcess/WebPageProxy.h:
2767 Remove reinitializeWebPage.
2769 * UIProcess/win/WebView.cpp:
2770 (WebKit::WebView::didRelaunchProcess):
2771 Remove call to reinitializeWebPage.
2773 2011-01-10 Anders Carlsson <andersca@apple.com>
2775 Reviewed by Sam Weinig.
2777 Pass the view size to the DrawingAreaProxy constructor
2778 https://bugs.webkit.org/show_bug.cgi?id=52189
2780 * UIProcess/DrawingAreaProxy.cpp:
2781 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2782 * UIProcess/WebPageProxy.cpp:
2783 (WebKit::WebPageProxy::viewSize):
2784 * UIProcess/WebPageProxy.h:
2786 2011-01-11 Sam Weinig <sam@webkit.org>
2788 Roll r75460 back in with build fix.
2790 2011-01-11 Anders Carlsson <andersca@apple.com>
2792 Reviewed by Andreas Kling.
2794 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
2795 https://bugs.webkit.org/show_bug.cgi?id=52184
2797 Qt part made my Balazs Kelemen.
2799 * UIProcess/API/mac/PageClientImpl.h:
2800 * UIProcess/API/mac/PageClientImpl.mm:
2801 (WebKit::PageClientImpl::createDrawingAreaProxy):
2802 Call -[WKView _createDrawingAreaProxy].
2804 (WebKit::PageClientImpl::setViewNeedsDisplay):
2805 Call setNeedsDisplayInRect on the WKView.
2807 * UIProcess/API/mac/WKView.mm:
2808 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2809 No need to set the drawing area proxy anymore.
2811 (-[WKView _createDrawingAreaProxy]):
2812 Create a chunked update drawing area proxy for now.
2814 * UIProcess/API/qt/qgraphicswkview.cpp:
2815 Added a QGraphicsItem* member that is initialized in init to the accociated view.
2816 Implement the new functions. This is a temporary solution, in the long term the view
2817 and the page should be decoupled.
2818 (QGraphicsWKView::QGraphicsWKView):
2819 * UIProcess/API/qt/qwkpage.cpp:
2820 (QWKPagePrivate::QWKPagePrivate):
2821 (QWKPagePrivate::init):
2822 (QWKPagePrivate::createDrawingAreaProxy):
2823 (QWKPagePrivate::setViewNeedsDisplay):
2824 * UIProcess/API/qt/qwkpage.h:
2825 * UIProcess/API/qt/qwkpage_p.h:
2827 * UIProcess/PageClient.h:
2828 Add new pure virtual member functions.
2830 * UIProcess/WebPageProxy.cpp:
2831 (WebKit::WebPageProxy::initializeWebPage):
2832 (WebKit::WebPageProxy::reinitializeWebPage):
2833 Set the new drawing area proxy.
2835 * UIProcess/win/WebView.cpp:
2836 (WebKit::WebView::WebView):
2837 No need to set the drawing area proxy anymore.
2839 (WebKit::WebView::createDrawingAreaProxy):
2840 Create a chunked update drawing area proxy for now.
2842 (WebKit::WebView::setViewNeedsDisplay):
2843 Invalidate the window.
2845 2011-01-11 Adam Roben <aroben@apple.com>
2847 Fix a typo in a comment
2849 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2851 2011-01-10 Sheriff Bot <webkit.review.bot@gmail.com>
2853 Unreviewed, rolling out r75460.
2854 http://trac.webkit.org/changeset/75460
2855 https://bugs.webkit.org/show_bug.cgi?id=52191
2857 It broke Qt-WK2 build (Requested by Ossy on #webkit).
2859 * Shared/API/c/WKBase.h:
2860 * Shared/APIObject.h:
2861 * UIProcess/API/C/WKAPICast.h:
2862 * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
2863 * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
2864 * UIProcess/API/C/WKPage.h:
2865 * UIProcess/API/C/WebKit2.h:
2866 * UIProcess/API/qt/qwkpage.cpp:
2868 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
2869 * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
2870 * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
2871 * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
2872 * UIProcess/WebPageProxy.cpp:
2873 (WebKit::WebPageProxy::WebPageProxy):
2874 (WebKit::WebPageProxy::close):
2875 (WebKit::WebPageProxy::processDidCrash):
2876 * UIProcess/WebPageProxy.h:
2877 * UIProcess/WebPageProxy.messages.in:
2878 * UIProcess/WebUIClient.cpp:
2879 * UIProcess/WebUIClient.h:
2881 * WebKit2.xcodeproj/project.pbxproj:
2882 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
2883 * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
2884 * WebProcess/Geolocation/WebGeolocationManager.cpp:
2885 * WebProcess/Geolocation/WebGeolocationManager.h:
2886 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
2887 (WebKit::WebGeolocationClient::requestPermission):
2888 (WebKit::WebGeolocationClient::cancelPermissionRequest):
2889 * WebProcess/WebCoreSupport/WebGeolocationClient.h:
2890 * WebProcess/WebPage/WebPage.cpp:
2891 (WebKit::WebPage::WebPage):
2892 * WebProcess/WebPage/WebPage.h:
2893 * WebProcess/WebPage/WebPage.messages.in:
2894 * win/WebKit2.vcproj:
2895 * win/WebKit2Generated.make:
2897 2011-01-10 Csaba Osztrogonác <ossy@webkit.org>
2899 Unreviewed, rolling out r75459
2900 http://trac.webkit.org/changeset/75459
2902 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
2903 https://bugs.webkit.org/show_bug.cgi?id=52184
2905 * UIProcess/API/mac/PageClientImpl.h:
2906 * UIProcess/API/mac/PageClientImpl.mm:
2907 * UIProcess/API/mac/WKView.mm:
2908 * UIProcess/API/mac/WKViewInternal.h:
2909 * UIProcess/API/qt/qwkpage.cpp:
2910 * UIProcess/API/qt/qwkpage_p.h:
2911 * UIProcess/PageClient.h:
2912 * UIProcess/WebPageProxy.cpp:
2913 (WebKit::WebPageProxy::initializeWebPage):
2914 (WebKit::WebPageProxy::reinitializeWebPage):
2915 * UIProcess/win/WebView.cpp:
2916 (WebKit::WebView::WebView):
2917 * UIProcess/win/WebView.h:
2919 2011-01-10 Anders Carlsson <andersca@apple.com>
2921 Reviewed by Sam Weinig.
2923 Remove size parameter to WebPageProxy::initializeWebPage
2924 https://bugs.webkit.org/show_bug.cgi?id=52188
2926 * UIProcess/API/mac/WKView.mm:
2927 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2928 * UIProcess/API/qt/qwkpage.cpp:
2929 (QWKPagePrivate::init):
2930 * UIProcess/WebPageProxy.cpp:
2931 (WebKit::WebPageProxy::initializeWebPage):
2932 * UIProcess/WebPageProxy.h:
2933 * UIProcess/win/WebView.cpp:
2934 (WebKit::WebView::WebView):
2936 2011-01-10 Anders Carlsson <andersca@apple.com>
2938 Didn't mean to land this.
2940 * UIProcess/WebPageProxy.cpp:
2941 (WebKit::WebPageProxy::initializeWebPage):
2942 * UIProcess/WebPageProxy.h:
2944 2011-01-10 Anders Carlsson <andersca@apple.com>
2946 Reviewed by Sam Weinig.
2948 WebPageProxy::creationParameters no longer needs to take a size
2949 https://bugs.webkit.org/show_bug.cgi?id=52187
2951 WebPageProxy::creationParameters can just ask the page client for the view size now.
2953 * UIProcess/WebInspectorProxy.cpp:
2954 (WebKit::WebInspectorProxy::createInspectorPage):
2955 * UIProcess/WebPageProxy.cpp:
2956 (WebKit::WebPageProxy::initializeWebPage):
2957 (WebKit::WebPageProxy::reinitializeWebPage):
2958 (WebKit::WebPageProxy::createNewPage):
2959 (WebKit::WebPageProxy::creationParameters):
2960 * UIProcess/WebPageProxy.h:
2962 2011-01-10 Anders Carlsson <andersca@apple.com>
2964 Reviewed by Sam Weinig.
2966 Pass information about the view in the WebPageCreationParameters
2967 https://bugs.webkit.org/show_bug.cgi?id=52186
2969 * Shared/WebPageCreationParameters.cpp:
2970 (WebKit::WebPageCreationParameters::encode):
2971 (WebKit::WebPageCreationParameters::decode):
2972 Encode and decode the state flags.
2974 * Shared/WebPageCreationParameters.h:
2975 Add new state flags.
2977 * UIProcess/WebPageProxy.cpp:
2978 (WebKit::WebPageProxy::creationParameters):
2979 Initialize the state flags.
2981 * WebProcess/WebPage/WebPage.cpp:
2982 (WebKit::WebPage::WebPage):
2983 Update the page state from the state flags.
2985 2011-01-10 Sam Weinig <sam@webkit.org>
2987 Reviewed by Anders Carlsson.
2989 Make Geolocation features work in WebKit2
2990 https://bugs.webkit.org/show_bug.cgi?id=52078
2992 Step 2 - Add support for requesting and granting permission for geolocation.
2994 * Shared/API/c/WKBase.h:
2995 * Shared/APIObject.h:
2996 * UIProcess/API/C/WebKit2.h:
2997 * UIProcess/API/C/WKAPICast.h:
2998 * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
2999 * UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
3000 Add new API type, WKGeolocationPermissionRequestRef.
3002 * UIProcess/API/C/WKPage.h:
3003 Add new UIClient function for requesting permission.
3005 * UIProcess/API/qt/qwkpage.cpp:
3007 Stub out the UIClient.
3009 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
3010 * UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
3011 * UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
3012 * UIProcess/WebPageProxy.cpp:
3013 * UIProcess/WebPageProxy.h:
3014 * UIProcess/WebPageProxy.messages.in:
3015 * UIProcess/WebUIClient.cpp:
3016 * UIProcess/WebUIClient.h:
3017 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
3018 * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
3019 * WebProcess/Geolocation/WebGeolocationManager.cpp:
3020 * WebProcess/Geolocation/WebGeolocationManager.h:
3021 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
3022 * WebProcess/WebCoreSupport/WebGeolocationClient.h:
3023 * WebProcess/WebPage/WebPage.cpp:
3024 (WebKit::WebPage::WebPage):
3025 (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
3026 * WebProcess/WebPage/WebPage.h:
3027 (WebKit::WebPage::geolocationPermissionRequestManager):
3028 * WebProcess/WebPage/WebPage.messages.in:
3029 Track the permission request through both sides of the process divide.
3032 * WebKit2.xcodeproj/project.pbxproj:
3033 * win/WebKit2.vcproj:
3034 * win/WebKit2Generated.make:
3037 2011-01-10 Anders Carlsson <andersca@apple.com>
3039 Reviewed by Sam Weinig.
3041 Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
3042 https://bugs.webkit.org/show_bug.cgi?id=52184
3044 * UIProcess/API/mac/PageClientImpl.h:
3045 * UIProcess/API/mac/PageClientImpl.mm:
3046 (WebKit::PageClientImpl::createDrawingAreaProxy):
3047 Call -[WKView _createDrawingAreaProxy].
3049 (WebKit::PageClientImpl::setViewNeedsDisplay):
3050 Call setNeedsDisplayInRect on the WKView.
3052 * UIProcess/API/mac/WKView.mm:
3053 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3054 No need to set the drawing area proxy anymore.
3056 (-[WKView _createDrawingAreaProxy]):
3057 Create a chunked update drawing area proxy for now.
3059 * UIProcess/API/qt/qwkpage.cpp:
3060 (QWKPagePrivate::createDrawingAreaProxy):
3061 (QWKPagePrivate::setViewNeedsDisplay):
3064 * UIProcess/PageClient.h:
3065 Add new pure virtual member functions.
3067 * UIProcess/WebPageProxy.cpp:
3068 (WebKit::WebPageProxy::initializeWebPage):
3069 (WebKit::WebPageProxy::reinitializeWebPage):
3070 Set the new drawing area proxy.
3072 * UIProcess/win/WebView.cpp:
3073 (WebKit::WebView::WebView):
3074 No need to set the drawing area proxy anymore.
3076 (WebKit::WebView::createDrawingAreaProxy):
3077 Create a chunked update drawing area proxy for now.
3079 (WebKit::WebView::setViewNeedsDisplay):
3080 Invalidate the window.
3082 2011-01-10 Anders Carlsson <andersca@apple.com>
3084 Fix Windows build again.
3086 * UIProcess/win/WebView.cpp:
3087 (WebKit::WebView::isViewWindowActive):
3089 2011-01-10 Anders Carlsson <andersca@apple.com>
3093 * UIProcess/win/WebView.cpp:
3094 (WebKit::WebView::onShowWindowEvent):
3096 2011-01-10 Anders Carlsson <andersca@apple.com>
3098 Reviewed by Sam Weinig.
3100 Use a pull model for view state changes
3101 https://bugs.webkit.org/show_bug.cgi?id=52175
3103 Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
3104 WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
3105 function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
3107 * UIProcess/API/mac/PageClientImpl.h:
3108 * UIProcess/API/mac/PageClientImpl.mm:
3109 (WebKit::PageClientImpl::viewSize):
3110 (WebKit::PageClientImpl::isViewWindowActive):
3111 (WebKit::PageClientImpl::isViewFocused):
3112 (WebKit::PageClientImpl::isViewVisible):
3113 (WebKit::PageClientImpl::isViewInWindow):
3114 * UIProcess/API/mac/WKView.mm:
3115 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3116 (-[WKView becomeFirstResponder]):
3117 (-[WKView resignFirstResponder]):
3118 (-[WKView viewDidMoveToWindow]):
3119 (-[WKView _windowDidBecomeKey:]):
3120 (-[WKView _windowDidResignKey:]):
3121 (-[WKView viewDidHide]):
3122 (-[WKView viewDidUnhide]):
3123 (-[WKView _isFocused]):
3124 (-[WKView _didRelaunchProcess]):
3125 * UIProcess/API/mac/WKViewInternal.h:
3126 * UIProcess/API/qt/qgraphicswkview.cpp:
3127 (QGraphicsWKView::focusInEvent):
3128 (QGraphicsWKView::focusOutEvent):
3129 * UIProcess/API/qt/qwkpage.cpp:
3130 (QWKPagePrivate::QWKPagePrivate):
3131 (QWKPagePrivate::viewSize):
3132 (QWKPagePrivate::isViewWindowActive):
3133 (QWKPagePrivate::isViewFocused):
3134 (QWKPagePrivate::isViewVisible):
3135 (QWKPagePrivate::isViewInWindow):
3136 * UIProcess/API/qt/qwkpage_p.h:
3137 * UIProcess/PageClient.h:
3138 * UIProcess/WebContext.cpp:
3139 (WebKit::WebContext::createWebPage):
3140 * UIProcess/WebContext.h:
3141 * UIProcess/WebPageProxy.cpp:
3142 (WebKit::WebPageProxy::create):
3143 (WebKit::WebPageProxy::WebPageProxy):
3144 (WebKit::WebPageProxy::viewStateDidChange):
3145 * UIProcess/WebPageProxy.h:
3146 * UIProcess/WebProcessProxy.cpp:
3147 (WebKit::WebProcessProxy::createWebPage):
3148 * UIProcess/WebProcessProxy.h:
3149 * UIProcess/win/WebView.cpp:
3150 (WebKit::WebView::WebView):
3151 (WebKit::WebView::onSetFocusEvent):
3152 (WebKit::WebView::onKillFocusEvent):
3153 (WebKit::WebView::onShowWindowEvent):
3154 (WebKit::WebView::updateActiveState):
3155 (WebKit::WebView::viewSize):
3156 (WebKit::WebView::isViewWindowActive):
3157 (WebKit::WebView::isViewFocused):
3158 (WebKit::WebView::isViewVisible):
3159 (WebKit::WebView::isViewInWindow):
3160 (WebKit::WebView::didRelaunchProcess):
3161 (WebKit::WebView::setIsInWindow):
3162 * UIProcess/win/WebView.h:
3164 2011-01-10 Adam Roben <aroben@apple.com>
3166 Don't pass a reference type to va_start
3168 C++ says this results in undefined behavior:
3170 The restrictions that ISO C places on the second parameter to the
3171 va_start() macro in header <stdarg.h> are different in this
3172 International Standard. The parameter parmN is the identifier of
3173 the rightmost parameter in the variable parameter list of the
3174 function definition (the one just before the ...).221) If the
3175 parameter parmN is declared with a function, array, or reference
3176 type, or with a type that is not compatible with the type that
3177 results when passing an argument for which there is no parameter,
3178 the behavior is undefined.
3180 Fixes <http://webkit.org/b/52168> Title of standalone image document
3181 includes bogus image dimensions
3183 Rubber-stamped by Eric Seidel.
3185 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3186 (WebKit::formatLocalizedString): Don't use a reference type for
3189 2011-01-10 Siddharth Mathur <siddharth.mathur@nokia.com>
3191 Reviewed by Eric Seidel.
3193 Support for ARM's RVCT(ARMCC) compiler in import/export directives
3194 https://bugs.webkit.org/show_bug.cgi?id=52146
3196 * Shared/API/c/WKBase.h:
3198 2011-01-10 Sam Weinig <sam@webkit.org>
3202 * WebProcess/WebPage/WebPage.cpp:
3203 (WebKit::WebPage::WebPage):
3205 2011-01-10 Sam Weinig <sam@webkit.org>
3207 Reviewed by Anders Carlsson.
3209 Make Geolocation features work in WebKit2
3210 https://bugs.webkit.org/show_bug.cgi?id=52078
3212 Step 1 - Add enough support to get position data from a provider.
3213 This does not include permission support.
3215 * Platform/CoreIPC/HandleMessage.h:
3216 Add #include of Arguments.h for CoreIPC::In and Out definitions.
3218 * Platform/CoreIPC/MessageID.h:
3219 Add new message types.
3221 * Shared/API/c/WKBase.h:
3222 * Shared/APIObject.h:
3225 * Shared/WebGeolocationPosition.cpp: Added.
3226 * Shared/WebGeolocationPosition.h: Added.
3227 Internal position representation.
3229 * UIProcess/API/C/WKAPICast.h:
3230 Add casts for new API types.
3232 * UIProcess/API/C/WKContext.cpp:
3233 * UIProcess/API/C/WKContext.h:
3234 * UIProcess/API/C/WKGeolocationManager.cpp: Added.
3235 * UIProcess/API/C/WKGeolocationManager.h: Added.
3236 * UIProcess/API/C/WKGeolocationPosition.cpp: Added.
3237 * UIProcess/API/C/WKGeolocationPosition.h: Added.
3238 * UIProcess/API/C/WebKit2.h:
3239 Add API to provide and control geolocation data.
3241 * UIProcess/WebContext.cpp:
3242 (WebKit::WebContext::WebContext):
3243 (WebKit::WebContext::~WebContext):
3244 (WebKit::WebContext::processDidClose):
3245 (WebKit::WebContext::didReceiveMessage):
3246 * UIProcess/WebContext.h:
3247 (WebKit::WebContext::geolocationManagerProxy):
3248 * UIProcess/WebGeolocationManagerProxy.cpp: Added.
3249 (WebKit::WebGeolocationManagerProxy::create):
3250 (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
3251 (WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy):
3252 (WebKit::WebGeolocationManagerProxy::invalidate):
3253 (WebKit::WebGeolocationManagerProxy::initializeProvider):
3254 (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
3255 (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
3256 (WebKit::WebGeolocationManagerProxy::didReceiveMessage):
3257 (WebKit::WebGeolocationManagerProxy::startUpdating):
3258 (WebKit::WebGeolocationManagerProxy::stopUpdating):
3259 * UIProcess/WebGeolocationManagerProxy.h: Added.
3260 (WebKit::WebGeolocationManagerProxy::clearContext):
3261 (WebKit::WebGeolocationManagerProxy::type):
3262 * UIProcess/WebGeolocationManagerProxy.messages.in: Added.
3263 * UIProcess/WebGeolocationProvider.cpp: Added.
3264 (WebKit::WebGeolocationProvider::startUpdating):
3265 (WebKit::WebGeolocationProvider::stopUpdating):
3266 * UIProcess/WebGeolocationProvider.h: Added.
3267 * UIProcess/WebProcessProxy.cpp:
3268 (WebKit::WebProcessProxy::didReceiveMessage):
3269 * WebProcess/Geolocation: Added.
3270 * WebProcess/Geolocation/WebGeolocationManager.cpp: Added.
3271 (WebKit::WebGeolocationManager::WebGeolocationManager):
3272 (WebKit::WebGeolocationManager::~WebGeolocationManager):
3273 (WebKit::WebGeolocationManager::didReceiveMessage):
3274 (WebKit::WebGeolocationManager::registerWebPage):
3275 (WebKit::WebGeolocationManager::unregisterWebPage):
3276 (WebKit::WebGeolocationManager::didChangePosition):
3277 (WebKit::WebGeolocationManager::didFailToDeterminePosition):
3278 * WebProcess/Geolocation/WebGeolocationManager.h: Added.
3279 * WebProcess/Geolocation/WebGeolocationManager.messages.in: Added.
3280 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: Added.
3281 (WebKit::WebGeolocationClient::geolocationDestroyed):
3282 (WebKit::WebGeolocationClient::startUpdating):
3283 (WebKit::WebGeolocationClient::stopUpdating):
3284 (WebKit::WebGeolocationClient::setEnableHighAccuracy):
3285 (WebKit::WebGeolocationClient::lastPosition):
3286 (WebKit::WebGeolocationClient::requestPermission):
3287 (WebKit::WebGeolocationClient::cancelPermissionRequest):
3288 * WebProcess/WebCoreSupport/WebGeolocationClient.h: Added.
3289 (WebKit::WebGeolocationClient::WebGeolocationClient):
3290 * WebProcess/WebPage/WebPage.cpp:
3291 (WebKit::WebPage::WebPage):
3292 * WebProcess/WebProcess.cpp:
3293 (WebKit::WebProcess::WebProcess):
3294 (WebKit::WebProcess::didReceiveMessage):
3295 * WebProcess/WebProcess.h:
3296 (WebKit::WebProcess::geolocationManager):
3297 Pipe geolocation positions/errors from the UIProcess to the WebProcess.
3299 * DerivedSources.make:
3300 * DerivedSources.pro:
3302 * WebKit2.xcodeproj/project.pbxproj:
3303 * win/WebKit2.vcproj:
3304 * win/WebKit2Common.vsprops:
3305 * win/WebKit2Generated.make:
3308 2011-01-10 Martin Robinson <mrobinson@igalia.com>
3310 GTK+ build fix. Continue to fix 'make dist.'
3312 * GNUmakefile.am: Remove more non-existent files from the WebKit2 build.
3314 2011-01-10 Alejandro G. Castro <alex@igalia.com>
3316 Reviewed by Martin Robinson.
3318 [GTK] Remove webkit2 files that are still not added to the
3319 repository from the makefile
3320 https://bugs.webkit.org/show_bug.cgi?id=52145
3322 This change is required for the release, we can add the lines
3323 again to the makefiles with the patches adding the files.
3327 2011-01-10 Andreas Kling <kling@webkit.org>
3329 Reviewed by Simon Hausmann.
3331 [Qt] [WK2] MiniBrowser does not load pages opened in new windows
3332 https://bugs.webkit.org/show_bug.cgi?id=52111
3334 * UIProcess/API/qt/qwkpage.cpp:
3335 (QWKPage::context): Implement this method.
3337 2011-01-09 Dan Bernstein <mitz@apple.com>
3339 Reviewed by Simon Fraser.
3341 <rdar://problem/8839498> Assertion failure in KURL::KURL when calling WKURLRequestCreateWithWKURL with a non-parsed URL
3342 https://bugs.webkit.org/show_bug.cgi?id=52132
3344 * Shared/API/c/WKURLRequest.cpp:
3345 (WKURLRequestCreateWithWKURL): Parse the URL.
3346 * Shared/WebString.h: Fixed a comment.
3347 * Shared/WebURL.h: Ditto.
3349 2011-01-09 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
3351 Reviewed by Martin Robinson.
3353 Changes to add Process Launcher and Thread Launcher implementation to the WebKit2 GTK port.
3354 The main() implementation for WebKitWebProcess binary to launch Web process from UI process.
3355 https://bugs.webkit.org/show_bug.cgi?id=48511
3357 * UIProcess/Launcher/gtk: Added.
3358 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Added. GTK (UNIX_X11 specific) implementation
3359 (WebKit::ProcessLauncher::launchProcess):
3360 (WebKit::ProcessLauncher::terminateProcess):
3361 (WebKit::ProcessLauncher::platformInvalidate):
3362 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3363 (WebKit::ThreadLauncher::createWebThread):
3364 * WebProcess/gtk: Added.
3365 * WebProcess/gtk/WebProcessGtk.cpp: Added. The stubbed implementations of virtual functions of WebProcess.h for GTK port.
3366 (WebKit::WebProcess::platformSetCacheModel):
3367 (WebKit::WebProcess::platformClearResourceCaches):
3368 (WebKit::WebProcess::platformInitializeWebProcess):
3369 (WebKit::WebProcess::platformShutdown):
3370 * WebProcess/gtk/WebProcessMainGtk.cpp: Added. The WebProcessMain call which initiates the Web Process for GTK port.
3371 (WebKit::WebProcessMainGtk):
3372 * WebProcess/gtk/WebProcessMainGtk.h: Added. The WebProcessMain declaration for Web Process for GTK port.
3373 * gtk/MainGtk.cpp: Added. The main function implementation for binary WebKitWebProcess.
3376 2011-01-07 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
3378 Reviewed by Martin Robinson.
3380 [GTK] WebKit2 GNUmakefile is out of date from trunk
3381 https://bugs.webkit.org/show_bug.cgi?id=51883
3383 * GNUmakefile.am: Updated sources list as per latest revision
3384 * Platform/gtk/RunLoopGtk.cpp:
3385 (RunLoop::TimerBase::start):
3386 * Platform/gtk/WorkQueueGtk.cpp:
3387 (WorkQueue::scheduleWorkAfterDelay):
3388 * Shared/gtk/BackingStoreGtk.cpp:
3389 (WebKit::BackingStore::paint):
3390 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
3391 (WebKit::InjectedBundle::load):
3392 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3393 (WebKit::NetscapePlugin::platformInvalidate):
3395 2011-01-08 Dan Bernstein <mitz@apple.com>
3397 Reviewed by Sam Weinig.
3399 <rdar://problem/8812759> In WebKit2, PDF view settings (mode and scale) do not stick
3400 https://bugs.webkit.org/show_bug.cgi?id=52118
3402 * Shared/WebPreferencesStore.cpp:
3403 (WebKit::WebPreferencesStore::encode): Encode the double values map.
3404 (WebKit::WebPreferencesStore::decode): Decode the double values map.
3405 (WebKit::defaultValueForKey): Added double instance.
3406 (WebKit::WebPreferencesStore::setDoubleValueForKey): Added.
3407 (WebKit::WebPreferencesStore::getDoubleValueForKey): Added.
3408 * Shared/WebPreferencesStore.h: Added PDFScaleFactor and PDFDisplayMode preferences.
3409 * UIProcess/API/mac/PDFViewController.mm:
3410 (-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Initialize the _pdfViewController ivar.
3411 (-[WKPDFView invalidate]): Changed 'nil' to '0' in assignment to a non-Objective-C pointer.
3412 (-[WKPDFView setDocument:]): Added.
3413 (-[WKPDFView _applyPDFPreferences]): Added.
3414 (-[WKPDFView _updatePreferences:]): Added.
3415 (-[WKPDFView _updatePreferencesSoon]): Added.
3416 (-[WKPDFView _scaleOrDisplayModeOrPageChanged:]): Added.
3417 (-[WKPDFView viewDidMoveToWindow]): Added. Starts observing the PDF view for changes to scale
3419 (-[WKPDFView viewWillMoveToWindow:]): Added. Stops observing for changes.
3420 (WebKit::PDFViewController::setPDFDocumentData): Changed to call throguh -[WKPDFView setDocument:].
3421 * UIProcess/WebPreferences.cpp:
3422 (WebKit::WebPreferences::updateDoubleValueForKey): Added.
3423 * UIProcess/WebPreferences.h:
3424 * UIProcess/cf/WebPreferencesCF.cpp:
3425 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added empty implementation.
3426 * UIProcess/gtk/WebPreferencesGtk.cpp:
3427 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added stub.
3428 * UIProcess/mac/WebPreferencesMac.mm:
3429 (WebKit::setDoubleValueIfInUserDefaults): Added.
3430 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
3431 * UIProcess/qt/WebPreferencesQt.cpp:
3432 (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
3434 2011-01-08 Dan Bernstein <mitz@apple.com>
3436 Reviewed by Maciej Stachowiak.
3438 In WebKit2, page zooming does not work with PDF
3439 https://bugs.webkit.org/show_bug.cgi?id=52113
3441 * UIProcess/API/C/WKPage.cpp:
3442 (WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
3443 * UIProcess/API/C/WKPage.h:
3444 * UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
3446 * UIProcess/API/mac/PDFViewController.mm:
3447 (WebKit::PDFViewController::zoomFactor): Added.
3448 (WebKit::PDFViewController::setZoomFactor): Added.
3449 * UIProcess/API/mac/PageClientImpl.h:
3450 * UIProcess/API/mac/PageClientImpl.mm:
3451 (WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
3452 (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
3453 * UIProcess/API/mac/WKView.mm:
3454 (-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
3455 (-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
3456 * UIProcess/API/mac/WKViewInternal.h:
3457 * UIProcess/API/qt/qwkpage_p.h:
3458 (QWKPagePrivate::customRepresentationZoomFactor): Added.
3459 (QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
3460 * UIProcess/PageClient.h:
3461 * UIProcess/WebPageProxy.cpp:
3462 (WebKit::WebPageProxy::WebPageProxy): Coding style fix.
3463 (WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
3464 representation or is a standalone image, true otherwise.
3465 (WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
3466 (WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
3467 zoom factor from the page client.
3468 (WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
3469 the client set the zoom factor.
3470 (WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
3471 * UIProcess/WebPageProxy.h:
3472 (WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
3474 * UIProcess/win/WebView.cpp:
3475 (WebKit::WebView::customRepresentationZoomFactor): Added.
3476 (WebKit::WebView::setCustomRepresentationZoomFactor): Added.
3477 * UIProcess/win/WebView.h:
3479 2011-01-08 Jeff Miller <jeffm@apple.com>
3481 Reviewed by Jon Honeycutt.
3483 Add WKBundleFrameGetVisibleContentBounds().
3484 https://bugs.webkit.org/show_bug.cgi?id=52089
3486 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3487 (WKBundleFrameGetVisibleContentBounds):
3488 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3489 Added WKBundleFrameGetVisibleContentBounds().
3491 2011-01-08 Balazs Kelemen <kbalazs@webkit.org>
3493 Reviewed by Kenneth Rohde Christiansen.
3495 [Qt][WK2] QWKView does not propagate show and hide events to the drawing area
3496 https://bugs.webkit.org/show_bug.cgi?id=52108
3498 * UIProcess/API/qt/qgraphicswkview.cpp:
3499 (QGraphicsWKView::event): Call setPageIsVisible on the drawing area
3500 if the event is Show or Hide.
3502 2011-01-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3504 Reviewed by Kenneth Rohde Christiansen.
3506 [Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian
3507 https://bugs.webkit.org/show_bug.cgi?id=31273
3509 On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
3510 are included before platform headers. On all other platforms continue to use
3511 INCLUDEPATH (as before).
3515 2011-01-08 Csaba Osztrogonác <ossy@webkit.org>
3517 [Qt][WK2] Unreviewed buildfix after r75313.
3519 * Scripts/generate-forwarding-headers.pl:
3521 2011-01-08 Adam Barth <abarth@webkit.org>
3523 Moving WebCore changes the layout of the Qt build directory as well,
3524 which means we need to change where we look for these generated files.
3526 * DerivedSources.pro:
3528 2011-01-07 Adam Barth <abarth@webkit.org>
3530 Rubber-stamped by Eric Seidel.
3532 Move WebCore to Source
3533 https://bugs.webkit.org/show_bug.cgi?id=52050
3537 2011-01-07 Stephanie Lewis <slewis@apple.com>
3539 Reviewed by Geoff Garen.
3541 <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
3542 https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
3544 Add a sampler for printing off process memory statistics.
3545 This tool can track:
3548 - FastMalloc allocations bytes (in use or committed)
3550 - Garbage collector heap bytes (in use or committed)
3551 - Stack bytes (committed only!)
3552 - JIT Code bytes (committed only!)
3554 - In use bytes for the following zones:
3555 * Default zone (in use or committed)
3556 * DispCon zone (in use or committed)
3557 * Purgable zone (in use or committed)
3559 - Resident size memory (RSIZE)
3561 Data collected is dumped to a temporary file.
3563 Create a sandbox for a temporary file.
3564 * Shared/SandboxExtension.h:
3565 (WebKit::SandboxExtension::createHandleForTemporaryFile):
3566 * Shared/mac/SandboxExtensionMac.mm:
3567 (WebKit::SandboxExtension::createHandleForTemporaryFile):
3569 Memory Sampler files