1 2011-02-01 Sam Weinig <sam@webkit.org>
3 Reviewed by Beth Dakin.
5 Part 2 for <rdar://problem/8492788>
6 Adopt WKScrollbarPainterController
8 Use header detection to define scrollbar painting controller #define.
10 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
11 (InitWebCoreSystemInterface):
13 2011-02-01 David Hyatt <hyatt@apple.com>
15 Reviewed by Oliver Hunt.
17 https://bugs.webkit.org/show_bug.cgi?id=53520
19 Remove the physical terminology from IntRect and FloatRect.
21 Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
22 we need to update our terminology to be more accurate.
24 I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
25 renaming right() and bottom() to maxX() and maxY(). These terms remain accurate
26 even for flipped rectangles.
28 * Platform/Region.cpp:
29 (WebKit::Region::Shape::Shape):
30 * UIProcess/API/mac/WKPrintingView.mm:
31 (pageDidComputePageRects):
32 * UIProcess/FindIndicator.cpp:
33 (WebKit::FindIndicator::draw):
34 * UIProcess/TiledDrawingAreaProxy.cpp:
35 (WebKit::TiledDrawingAreaProxy::invalidate):
36 (WebKit::TiledDrawingAreaProxy::paint):
37 (WebKit::TiledDrawingAreaProxy::createTiles):
38 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
39 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
40 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
41 (WebKit::NetscapePlugin::callSetWindow):
43 2011-02-01 Anders Carlsson <andersca@apple.com>
45 Reviewed by Adam Roben.
47 Move flushPendingLayerChanges to LayerTreeHostMac
48 https://bugs.webkit.org/show_bug.cgi?id=53525
50 In preparation for adding more Mac specific code to flushPendingLayerChanges.
52 * WebProcess/WebPage/LayerTreeHost.cpp:
53 * WebProcess/WebPage/LayerTreeHost.h:
54 * WebProcess/WebPage/mac/LayerTreeHostMac.h:
55 * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
56 (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
58 2011-02-01 Beth Dakin <bdakin@apple.com>
60 Reviewed by Sam Weinig.
62 Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
64 Implement NSView's viewWillStartLiveResize and
65 viewDidEndLiveResize and propagate the messages down
67 * UIProcess/API/mac/WKView.mm:
68 (-[WKView viewWillStartLiveResize]):
69 (-[WKView viewDidEndLiveResize]):
70 * UIProcess/WebPageProxy.cpp:
71 (WebKit::WebPageProxy::viewWillStartLiveResize):
72 (WebKit::WebPageProxy::viewWillEndLiveResize):
73 * UIProcess/WebPageProxy.h:
74 * WebProcess/WebPage/WebPage.cpp:
75 (WebKit::WebPage::viewWillStartLiveResize):
76 (WebKit::WebPage::viewWillEndLiveResize):
77 * WebProcess/WebPage/WebPage.h:
78 * WebProcess/WebPage/WebPage.messages.in:
80 A bunch of new WebKitSystemInterface functions.
81 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
82 (InitWebCoreSystemInterface):
84 2011-02-01 Dave Hyatt <hyatt@apple.com>
86 Reviewed by Darin Adler.
88 https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
91 Change printing functions to check writing-mode and properly swap width and height
94 * WebProcess/WebPage/WebPage.cpp:
95 (WebKit::WebPage::computePagesForPrinting):
97 2011-01-31 Alexey Proskuryakov <ap@apple.com>
99 Reviewed by Maciej Stachowiak.
101 https://bugs.webkit.org/show_bug.cgi?id=53466
102 Move WebKit2 to printing via API methods
104 Also fixes <rdar://problem/8933724> REGRESSION: Wrong pages are printed when not printing from page 1
106 Also fixes horizontal tiling (no bug filed).
108 The main idea here is that we don't force AppKit to use a different scaling factor when
109 a Web view can't be resized to exact page size, and scale when drawing instead.
111 * UIProcess/API/mac/WKPrintingView.mm:
112 (-[WKPrintingView _firstPrintedPageNumber]): Factored out into a separate method.
113 (-[WKPrintingView _lastPrintedPageNumber]): Ditto.
114 (pageDidDrawToPDF): Avoid crashing if data is null.
115 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Use -_firstPrintedPageNumber
116 and -_lastPrintedPageNumber.
117 (pageDidComputePageRects): Set frame size to what it would have been for a normal NSView
118 that's been asked to resize.
119 (-[WKPrintingView _pageForRect:]): Check x(), because several pages can be at the same y()
120 when tiling horizontally.
121 (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Point to draw at and frame size are
122 now using different units, translate as appropriate.
123 (-[WKPrintingView _drawPreview:]): Scale the rect to WebCore units.
124 (-[WKPrintingView drawRect:]): Correctly calculate page number when the first page to print
126 (-[WKPrintingView rectForPage:]): Scale the rect to AppKit units.
128 2011-01-31 Darin Adler <darin@apple.com>
130 Reviewed by Adele Peterson.
132 WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
133 https://bugs.webkit.org/show_bug.cgi?id=53460
135 * UIProcess/API/mac/WKView.mm: Added WEBCORE_COMMAND macro for lots of editor commands that
136 are implemented in WebCore so they will get forwarded. Many of these will probably work without
137 any further changes required. Added comments about the methods that we do not yet forward.
138 (createSelectorExceptionMap): Map scrollPageDown: to ScrollPageForward and
139 scrollPageUp: to ScrollPageBackward because we want the page up and page down
140 keys to follow the document logical order, not physical order. This is equivalent
141 to what we do in WebPage::performDefaultBehaviorForKeyEvent.
143 2011-01-31 Jessie Berlin <jberlin@apple.com>
145 Reviewed by Steve Falkenburg.
147 WebKit2: the cookies used by the WebKit2 Web Process should not go in a top-level
149 https://bugs.webkit.org/show_bug.cgi?id=53278
151 Use the name WebKit2WebProcess since the default location for the cookies is determined
152 based on the process name (which is WebKit2WebProcess.exe on Windows).
155 Copy the WebKit2WebProcess.resources directory into the AppleInternal bin.
157 * win/WebKit2WebProcess.resources: Added.
158 * win/WebKit2WebProcess.resources/Info.plist: Added.
159 Copied from the WebKit version of Info.plist.
161 * win/WebKit2WebProcessPostBuild.cmd:
162 Copy the WebKit2WebProcess.resources directory into the WebKitOutPutDir's bin.
164 2011-01-31 Anders Carlsson <andersca@apple.com>
166 Reviewed by Adam Roben.
168 Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it
169 https://bugs.webkit.org/show_bug.cgi?id=53432
171 * WebKit2.xcodeproj/project.pbxproj:
172 Add LayerTreeHostMac.h.
174 * WebProcess/WebPage/DrawingAreaImpl.cpp:
175 * WebProcess/WebPage/DrawingAreaImpl.h:
176 Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately.
178 * WebProcess/WebPage/LayerTreeHost.cpp:
179 (WebKit::LayerTreeHost::create):
180 On Mac, create a LayerTreeHostMac instance.
182 (WebKit::LayerTreeHost::~LayerTreeHost):
183 No need to call platformInvalidate anymore.
185 * WebProcess/WebPage/LayerTreeHost.h:
186 * WebProcess/WebPage/mac/LayerTreeHostMac.h: Added.
187 * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
188 (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
189 Invalidate the run loop observer here instead of in platformInvalidate.
191 (WebKit::LayerTreeHostMac::scheduleLayerFlush):
192 (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
193 These are now members of LayerTreeHostMac.
195 2011-01-30 Geoffrey Garen <ggaren@apple.com>
197 Reviewed by Sam Weinig.
200 Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
201 https://bugs.webkit.org/show_bug.cgi?id=53408
203 * UIProcess/WebContext.cpp:
204 (WebKit::WebContext::didNavigateWithNavigationData):
205 (WebKit::WebContext::didPerformClientRedirect):
206 (WebKit::WebContext::didPerformServerRedirect):
207 (WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
208 we don't think we should be able to reach this state under normal conditions.
210 2011-01-30 Geoffrey Garen <ggaren@apple.com>
212 Reviewed by Maciej Stachowiak.
214 Fixed crash on window close (maybe crash on launch?) due to missing
216 https://bugs.webkit.org/show_bug.cgi?id=53408
218 * UIProcess/WebContext.cpp:
219 (WebKit::WebContext::didNavigateWithNavigationData):
220 (WebKit::WebContext::didPerformClientRedirect):
221 (WebKit::WebContext::didPerformServerRedirect):
222 (WebKit::WebContext::didUpdateHistoryTitle): Check for NULL, since we're
223 calling a function that can return it.
225 2011-01-30 Balazs Kelemen <kbalazs@webkit.org>
227 Reviewed by Csaba Osztrogonác.
229 [Qt][WK2]REGRESSION (r76991): Fix build errors
230 https://bugs.webkit.org/show_bug.cgi?id=53400
232 Revert the temporary build fix (http://trac.webkit.org/changeset/77088)
233 and remove WebKit2Prefix.h from the build.
234 * UIProcess/API/qt/qwkhistory.h:
235 * UIProcess/API/qt/qwkpage.h:
238 2011-01-30 Jeff Miller <jeffm@apple.com>
240 Reviewed by Dan Bernstein.
242 FindController::updateFindIndicator() crashes if selection isn't visible
243 https://bugs.webkit.org/show_bug.cgi?id=53399
245 * WebProcess/WebPage/FindController.cpp:
246 (WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).
248 2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
254 * UIProcess/API/qt/qwkhistory.h:
255 * UIProcess/API/qt/qwkpage.h:
257 2011-01-29 Maciej Stachowiak <mjs@apple.com>
259 Reviewed by Geoffrey Garen.
261 Add WKPageCopyPendingAPIRequestURL API
262 https://bugs.webkit.org/show_bug.cgi?id=53383
264 This API returns the last URL requested for load via API, if neither that load nor any
265 other load subsequently reaches the provisional state.
267 This is useful to be able to track loads initiated via the API
269 * UIProcess/API/C/WKPage.cpp:
270 (WKPageCopyPendingAPIRequestURL): Retrieve the pending URL.
271 * UIProcess/API/C/WKPage.h:
272 * UIProcess/WebPageProxy.cpp:
273 (WebKit::WebPageProxy::loadURL): Set pending URL.
274 (WebKit::WebPageProxy::loadURLRequest): ditto
275 (WebKit::WebPageProxy::reload): ditto
276 (WebKit::WebPageProxy::goForward): ditto
277 (WebKit::WebPageProxy::goBack): ditto
278 (WebKit::WebPageProxy::estimatedProgress): Assume the initial
279 progress value when there is a pending URL.
280 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear
281 pending URL; clients should look at the provisional URL now.
282 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear
283 pending URL if it doesn't match the policy URL; this means we
284 were interrupted by another load.
285 * UIProcess/WebPageProxy.h:
286 (WebKit::WebPageProxy::pendingAPIRequestURL): Helper function.
287 (WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto
288 (WebKit::WebPageProxy::setPendingAPIRequestURL): ditto
290 2011-01-28 Jon Honeycutt <jhoneycutt@apple.com>
292 Downloads in WK2 on Windows should write resume data to bundle
293 https://bugs.webkit.org/show_bug.cgi?id=53282
294 <rdar://problem/8753077>
296 Reviewed by Alice Liu.
298 * WebProcess/Downloads/Download.cpp:
299 (WebKit::Download::decideDestinationWithSuggestedFilename):
300 Call didDecideDestination(), now that the destination is decided.
302 * WebProcess/Downloads/Download.h:
303 Declare didDecideDestination(). Added member variables to hold the
304 destination file path and the download bundle path.
305 (WebKit::Download::destination):
306 Return the path to the final destination for this download.
308 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
309 (WebKit::Download::start):
310 Remove the name of an unused param.
311 (WebKit::Download::startWithHandle):
313 (WebKit::Download::cancel):
314 Tell CFNetwork not to delete the file upon failure, and tell it to
315 cancel the download. Copy the resume data for the download, and append
316 it to the download bundle. Call didCancel() with an empty
317 DataReference, since we have written our own resume data.
318 (WebKit::decideDestinationWithSuggestedObjectNameCallback):
319 Remove some unused param names. Removed the call to
320 CFURLDownloadSetDestination() - this is now handled in
321 Download::didDecideDestination().
322 (WebKit::didCreateDestinationCallback):
323 Report that the final destination was created, rather than the download
324 bundle, matching old WebKit.
325 (WebKit::Download::didDecideDestination):
326 Store the final destination and the download bundle paths, and call
327 CFURLDownloadSetDestination(), passing the path to the download bundle.
329 * WebProcess/Downloads/curl/DownloadCurl.cpp:
330 (WebKit::Download::didDecideDestination):
333 * WebProcess/Downloads/mac/DownloadMac.mm:
334 (WebKit::Download::didDecideDestination):
335 Stubbed - unneeded on the Mac.
337 * WebProcess/Downloads/qt/DownloadQt.cpp:
338 (WebKit::Download::didDecideDestination):
341 2011-01-29 Jeff Miller <jeffm@apple.com>
343 Reviewed by Anders Carlsson.
345 Support find bouncy in WebKit2 on Windows
346 https://bugs.webkit.org/show_bug.cgi?id=53329
347 <rdar://problem/8565843>
348 The Mac implements the find bouncy inside of WebKit in the UI process for WebKit2, but we need to do this inside Safari for WebKit2 on Windows.
349 Add infrastructure to call back into the app when the find indicator changes.
351 * UIProcess/API/C/win/WKView.cpp: Cleanup some code style violations.
352 (WKViewSetFindIndicatorCallback): Added.
353 (WKViewGetFindIndicatorCallback): Added.
354 * UIProcess/API/C/win/WKView.h: Cleanup some code style violations.
355 * UIProcess/FindIndicator.cpp:
356 (WebKit::FindIndicator::create):
357 (WebKit::FindIndicator::FindIndicator):
358 (WebKit::FindIndicator::frameRect):
359 (WebKit::FindIndicator::draw):
360 Rename m_selectionRect to m_selectionRectInWindowCoordinates and m_textRects to m_textRectsInSelectionRectCoordinates (along with similarly named local variables) to be more explict about the coordinate system.
361 * UIProcess/FindIndicator.h:
362 (WebKit::FindIndicator::selectionRectInWindowCoordinates): Added.
363 (WebKit::FindIndicator::textRects): Rename m_textRects to m_textRectsInSelectionRectCoordinates.
364 * UIProcess/WebPageProxy.cpp:
365 (WebKit::WebPageProxy::setFindIndicator): Rename selectionRect to selectionRectInWindowCoordinates and textRects to textRectsInSelectionRectCoordinates to be more explict about the coordinate system.
366 * UIProcess/WebPageProxy.h: Ditto.
367 * UIProcess/win/WebView.cpp:
368 (WebKit::WebView::WebView):
369 (WebKit::WebView::setFindIndicator): Added.
370 (WebKit::WebView::setFindIndicatorCallback): Added.
371 (WebKit::WebView::getFindIndicatorCallback): Added.
372 * UIProcess/win/WebView.h:
374 2011-01-28 Alexey Proskuryakov <ap@apple.com>
376 Reviewed by Dan Bernstein.
378 https://bugs.webkit.org/show_bug.cgi?id=53367
379 <rdar://problem/8926460> Remove dysfunctional code from -[WKPrintingView _isPrintingPreview].
381 * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _isPrintingPreview]): The common
382 branch works fine for now, no need to make platforms different.
384 2011-01-28 Maciej Stachowiak <mjs@apple.com>
386 Reviewed by Dan Bernstein.
388 WKPageGetEstimatedProgress returns wrong value after a mainframe provisional load has started
389 https://bugs.webkit.org/show_bug.cgi?id=53358
391 * UIProcess/WebPageProxy.cpp:
392 (WebKit::WebPageProxy::didStartProgress): Start progress at the magic initial value, not 0.
394 2011-01-28 Anders Carlsson <andersca@apple.com>
396 Yet another build fix (What was I thinking?)
398 * WebProcess/Downloads/Download.h:
399 * WebProcess/Plugins/PluginProxy.h:
401 2011-01-28 Anders Carlsson <andersca@apple.com>
405 * Shared/PrintInfo.h:
407 2011-01-28 Anders Carlsson <andersca@apple.com>
411 * Shared/mac/CoreAnimationRenderer.mm:
413 2011-01-28 Anders Carlsson <andersca@apple.com>
415 Reviewed by Sam Weinig.
417 Add CoreAnimationRenderer class
418 https://bugs.webkit.org/show_bug.cgi?id=53343
420 * Shared/mac/CoreAnimationRenderer.h: Added.
421 * Shared/mac/CoreAnimationRenderer.mm: Added.
423 (WebKit::CoreAnimationRenderer::CoreAnimationRenderer):
424 Initialize the underlying CARenderer object and hook up a notification observer.
426 (WebKit::CoreAnimationRenderer::~CoreAnimationRenderer):
427 Assert that the client is null. It has been set to null by the call to invalidate().
429 (WebKit::CoreAnimationRenderer::setBounds):
430 Update the bounds on the CARenderer and the root layer.
432 (WebKit::CoreAnimationRenderer::render):
433 Ask the renderer to render and return the next frame time.
435 (WebKit::CoreAnimationRenderer::invalidate):
436 Remove the change observer and reset the client.
438 (WebKit::CoreAnimationRenderer::rendererDidChange):
439 Call the client member function.
441 * WebKit2.xcodeproj/project.pbxproj:
444 2011-01-28 Anders Carlsson <andersca@apple.com>
446 Reviewed by Sam Weinig.
448 Add an OBJC_CLASS macro for forward declaring an Objective-C class
449 https://bugs.webkit.org/show_bug.cgi?id=53337
451 * Shared/NativeWebKeyboardEvent.h:
452 * Shared/PrintInfo.h:
453 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
454 * UIProcess/LayerBackedDrawingAreaProxy.h:
455 * UIProcess/WebInspectorProxy.h:
456 * UIProcess/mac/WebContextMenuProxyMac.h:
457 * UIProcess/mac/WebPopupMenuProxyMac.h:
458 * WebProcess/Downloads/Download.h:
459 * WebProcess/Plugins/PluginProxy.h:
460 * WebProcess/WebPage/LayerBackedDrawingArea.h:
461 * WebProcess/WebPage/WebPage.h:
464 2011-01-28 Anders Carlsson <andersca@apple.com>
466 Reviewed by Sam Weinig.
468 Don't put config.h in the message headers.
470 * Scripts/webkit2/messages.py:
471 * Scripts/webkit2/messages_unittest.py:
473 2011-01-28 Anders Carlsson <andersca@apple.com>
477 * Shared/mac/ShareableSurface.cpp:
479 2011-01-28 Anders Carlsson <andersca@apple.com>
481 Try to unbreak the Windows build.
483 * UIProcess/cf/WebPageProxyCF.cpp:
485 2011-01-28 Brady Eidson <beidson@apple.com>
487 Reviewed by John Sullivan.
489 https://bugs.webkit.org/show_bug.cgi?id=53330
490 Need InjectedBundle API to get the response MIMEType for a URL
492 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
493 (WKBundleFrameCopyMIMETypeForResourceWithURL):
494 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
496 Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
497 * WebProcess/WebPage/WebFrame.cpp:
498 (WebKit::WebFrame::mimeTypeForResourceWithURL):
499 * WebProcess/WebPage/WebFrame.h:
501 Get the MIMEType from the platform's disk cache if available:
502 * WebProcess/WebPage/WebPage.h:
503 * WebProcess/WebPage/mac/WebPageMac.mm:
504 (WebKit::WebPage::cachedResponseMIMETypeForURL):
505 * WebProcess/WebPage/qt/WebPageQt.cpp:
506 (WebKit::WebPage::cachedResponseMIMETypeForURL):
507 * WebProcess/WebPage/win/WebPageWin.cpp:
508 (WebKit::WebPage::cachedResponseMIMETypeForURL):
510 2011-01-28 Anders Carlsson <andersca@apple.com>
512 Reviewed by Sam Weinig.
514 Clean up the mess introduced when config.h was added to the project:
516 - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
517 twice in each file, probably slowing down compile time.
519 - Add config.h to all the files that were forgotten in order to keep the build from breaking.
521 - Added trap to ensure that config.h is included at the top of every implementation file. If this
522 had been added it would have caught the previous issue.
524 2011-01-28 Stephanie Lewis <slewis@apple.com>
526 Reviewed by Geoff Garen.
528 <rdar://problem/8857651> Implement unregisterWorld for WebKit2
529 Rename unregisterWorld to clearWrappers. Clearing the wrappers reduces the
530 memory use of isolated worlds.
532 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
533 (WKBundleScriptWorldClearWrappers):
534 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
535 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
536 (WebKit::InjectedBundleScriptWorld::clearWrappers):
537 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
539 2011-01-28 Dan Bernstein <mitz@apple.com>
541 Reviewed by Sam Weinig.
543 <select> can't display right-to-left (rtl) languages
544 https://bugs.webkit.org/show_bug.cgi?id=19785
546 * Shared/WebPopupItem.cpp:
547 (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
548 (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
549 (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
550 * Shared/WebPopupItem.h:
551 * UIProcess/WebPageProxy.cpp:
552 (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
553 * UIProcess/WebPageProxy.h:
554 * UIProcess/WebPageProxy.messages.in: Ditto.
555 * UIProcess/WebPopupMenuProxy.h:
556 * UIProcess/mac/WebPopupMenuProxyMac.h:
557 * UIProcess/mac/WebPopupMenuProxyMac.mm:
558 (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
559 Set items' text alignment to match the menu's writing direction. Set items' writing direction
560 and direction override according to their styles.
561 (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
562 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
563 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
564 (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
565 * WebProcess/WebCoreSupport/WebChromeClient.h:
566 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
567 (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
569 (WebKit::WebPopupMenu::show): Pass the menu's writing direction.
571 2011-01-28 Anders Carlsson <andersca@apple.com>
573 Reviewed by Adam Roben.
575 Add ShareableSurface class
576 https://bugs.webkit.org/show_bug.cgi?id=53313
578 * Shared/mac/ShareableSurface.cpp: Added.
579 (WebKit::ShareableSurface::Handle::Handle):
580 Initialize the mach port.
582 (WebKit::ShareableSurface::Handle::~Handle):
583 Deallocate our send right if needed.
585 (WebKit::ShareableSurface::Handle::encode):
586 Encode the send right, and then null it out.
588 (WebKit::ShareableSurface::Handle::decode):
589 Decode the send right.
591 (WebKit::createIOSurface):
592 Create an IOSurface with the given size.
594 (WebKit::ShareableSurface::create):
595 Create an IOSurface, either from a size or from a handle.
597 (WebKit::ShareableSurface::~ShareableSurface):
598 Delete the texture and framebuffer.
600 (WebKit::ShareableSurface::createHandle):
601 Create a mach port from the surface.
603 (WebKit::ShareableSurface::attach):
604 Create an FBO if needed and bind it.
606 (WebKit::ShareableSurface::detach):
609 (WebKit::ShareableSurface::textureID):
610 Generate a new texture and bind it to the IOSurface.
612 * Shared/mac/ShareableSurface.h: Added.
614 * WebKit2.xcodeproj/project.pbxproj:
617 2011-01-27 Adam Roben <aroben@apple.com>
619 Change BinarySemaphore to wrap an auto-reset Win32 event on Windows
621 Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
623 Reviewed by Dave Hyatt.
625 * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
627 * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
628 member that holds the event.
630 * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
631 (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
632 (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
633 (CoreIPC::BinarySemaphore::signal): Signal the event.
634 (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
635 for the event to be signaled or for the interval to elapse.
637 * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
639 2011-01-27 Chris Marrin <cmarrin@apple.com>
641 Reviewed by Anders Carlsson.
643 WebKit2: Page flashes just before accelerated compositing animation
644 https://bugs.webkit.org/show_bug.cgi?id=53274
646 When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
647 is getting created with the current page size. When the setSize() call is
648 subsequently made, the sizeDidChange() call is not made (which does the initial
649 render of the page) because the old size and new size are the same. The solution
650 is to skip the setting of the size in the ctor and let it go through a size
653 * UIProcess/DrawingAreaProxy.cpp:
654 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
656 2011-01-28 Alejandro G. Castro <alex@igalia.com>
658 Reviewed by Xan Lopez.
660 [GTK] Fix dist compilation for the release
661 https://bugs.webkit.org/show_bug.cgi?id=53290
663 * GNUmakefile.am: Remove a file that is not in the repository
667 2011-01-28 Andreas Kling <kling@webkit.org>
669 Rubber-stamped by Simon Hausmann.
671 [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
673 Having two signals for this is redundant, combine them into
674 QWKPage::engineConnectionChanged(bool connected).
676 * UIProcess/API/qt/qwkpage.cpp:
677 (QWKPagePrivate::didRelaunchProcess):
678 (QWKPagePrivate::processDidCrash):
679 * UIProcess/API/qt/qwkpage.h:
681 2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
683 Reviewed by Maciej Stachowiak.
685 Build fix for Mac Intel Debug after r76916
686 https://bugs.webkit.org/show_bug.cgi?id=53284
688 Fix macro redefinition by guarding the redefined macros.
692 2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
694 Unreviewed build fix for Mac Intel Debug after r76916.
696 Fix macro redefinition by guarding the redefined macros.
698 Check if the macro is already defined before defininig it.
699 c++config.h has the same macros with the same values.
703 2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
705 Reviewed by Adam Barth.
707 Update the expected results for test-webkitpy after r76916.
709 Include "config.h" in the expected results as well.
711 * Scripts/webkit2/messages_unittest.py:
713 2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
715 Unreviewed buildfix for SnowLeopard Intel Debug.
717 Fix macro redefinition by not including config.h.
719 Revert previous change in WebPageProxyCF.cpp.
721 * UIProcess/cf/WebPageProxyCF.cpp:
723 2011-01-27 Greg Coletta <greg.coletta@nokia.com>
725 Reviewed by Laszlo Gombos.
727 Get rid of prefix header dependency for WebKit2 build system.
728 https://bugs.webkit.org/show_bug.cgi?id=50174
730 Add config.h include explicitelly.
732 * Platform/CoreIPC/ArgumentDecoder.cpp:
733 * Platform/CoreIPC/ArgumentEncoder.cpp:
734 * Platform/CoreIPC/Attachment.cpp:
735 * Platform/CoreIPC/BinarySemaphore.cpp:
736 * Platform/CoreIPC/Connection.cpp:
737 * Platform/CoreIPC/DataReference.cpp:
738 * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
739 * Platform/CoreIPC/mac/ConnectionMac.cpp:
740 * Platform/CoreIPC/qt/ConnectionQt.cpp:
741 * Platform/CoreIPC/win/ConnectionWin.cpp:
742 * Platform/Logging.cpp:
743 * Platform/Module.cpp:
744 * Platform/Region.cpp:
745 * Platform/RunLoop.cpp:
746 * Platform/WorkQueue.cpp:
747 * Platform/cg/CGUtilities.cpp:
748 * Platform/gtk/RunLoopGtk.cpp:
749 * Platform/gtk/SharedMemoryGtk.cpp:
750 * Platform/gtk/WorkQueueGtk.cpp:
751 * Platform/mac/MachUtilities.cpp:
752 * Platform/mac/SharedMemoryMac.cpp:
753 * Platform/mac/WorkQueueMac.cpp:
754 * Platform/qt/MappedMemoryPool.cpp:
755 * Platform/qt/ModuleQt.cpp:
756 * Platform/qt/RunLoopQt.cpp:
757 * Platform/qt/WorkQueueQt.cpp:
758 * Platform/win/ModuleWin.cpp:
759 * Platform/win/RunLoopWin.cpp:
760 * Platform/win/SharedMemoryWin.cpp:
761 * Platform/win/WorkQueueWin.cpp:
762 * PluginProcess/PluginControllerProxy.cpp:
763 * PluginProcess/PluginProcess.cpp:
764 * PluginProcess/WebProcessConnection.cpp:
765 * Scripts/webkit2/messages.py:
766 * Shared/API/c/WKArray.cpp:
767 * Shared/API/c/WKCertificateInfo.cpp:
768 * Shared/API/c/WKContextMenuItem.cpp:
769 * Shared/API/c/WKData.cpp:
770 * Shared/API/c/WKDictionary.cpp:
771 * Shared/API/c/WKError.cpp:
772 * Shared/API/c/WKImage.cpp:
773 * Shared/API/c/WKMutableArray.cpp:
774 * Shared/API/c/WKMutableDictionary.cpp:
775 * Shared/API/c/WKNumber.cpp:
776 * Shared/API/c/WKSecurityOrigin.cpp:
777 * Shared/API/c/WKSerializedScriptValue.cpp:
778 * Shared/API/c/WKString.cpp:
779 * Shared/API/c/WKType.cpp:
780 * Shared/API/c/WKURL.cpp:
781 * Shared/API/c/WKURLRequest.cpp:
782 * Shared/API/c/WKURLResponse.cpp:
783 * Shared/API/c/WKUserContentURLPattern.cpp:
784 * Shared/API/c/cf/WKStringCF.cpp:
785 * Shared/API/c/cf/WKURLCF.cpp:
786 * Shared/API/c/cf/WKURLRequestCF.cpp:
787 * Shared/API/c/cf/WKURLResponseCF.cpp:
788 * Shared/API/c/cg/WKImageCG.cpp:
789 * Shared/API/c/win/WKCertificateInfoWin.cpp:
790 * Shared/ChildProcess.cpp:
791 * Shared/ImmutableArray.cpp:
792 * Shared/ImmutableDictionary.cpp:
793 * Shared/MutableArray.cpp:
794 * Shared/MutableDictionary.cpp:
795 * Shared/OriginAndDatabases.cpp:
796 * Shared/PlatformPopupMenuData.cpp:
797 * Shared/Plugins/NPIdentifierData.cpp:
798 * Shared/Plugins/NPObjectMessageReceiver.cpp:
799 * Shared/Plugins/NPObjectProxy.cpp:
800 * Shared/Plugins/NPRemoteObjectMap.cpp:
801 * Shared/Plugins/NPVariantData.cpp:
802 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
803 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
804 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
805 * Shared/Plugins/PluginProcessCreationParameters.cpp:
806 * Shared/PrintInfo.cpp:
807 * Shared/SessionState.cpp:
808 * Shared/ShareableBitmap.cpp:
809 * Shared/UpdateInfo.cpp:
810 * Shared/VisitedLinkTable.cpp:
811 * Shared/WebBackForwardListItem.cpp:
812 * Shared/WebContextMenuItem.cpp:
813 * Shared/WebContextMenuItemData.cpp:
814 * Shared/WebError.cpp:
815 * Shared/WebEvent.cpp:
816 * Shared/WebEventConversion.cpp:
817 * Shared/WebGeolocationPosition.cpp:
818 * Shared/WebImage.cpp:
819 * Shared/WebKeyboardEvent.cpp:
820 * Shared/WebMemorySampler.cpp:
821 * Shared/WebMouseEvent.cpp:
822 * Shared/WebOpenPanelParameters.cpp:
823 * Shared/WebPageCreationParameters.cpp:
824 * Shared/WebPageGroupData.cpp:
825 * Shared/WebPlatformTouchPoint.cpp:
826 * Shared/WebPopupItem.cpp:
827 * Shared/WebPreferencesStore.cpp:
828 * Shared/WebProcessCreationParameters.cpp:
829 * Shared/WebTouchEvent.cpp:
830 * Shared/WebURLRequest.cpp:
831 * Shared/WebURLResponse.cpp:
832 * Shared/WebWheelEvent.cpp:
833 * Shared/cairo/ShareableBitmapCairo.cpp:
834 * Shared/cf/ArgumentCodersCF.cpp:
835 * Shared/cg/ShareableBitmapCG.cpp:
836 * Shared/gtk/ShareableBitmapGtk.cpp:
837 * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
838 * Shared/mac/CommandLineMac.cpp:
839 * Shared/mac/UpdateChunk.cpp:
840 * Shared/qt/CleanupHandler.cpp:
841 * Shared/qt/NativeWebKeyboardEventQt.cpp:
842 * Shared/qt/ShareableBitmapQt.cpp:
843 * Shared/qt/UpdateChunk.cpp:
844 * Shared/qt/WebCoreArgumentCodersQt.cpp:
845 * Shared/qt/WebEventFactoryQt.cpp:
846 * Shared/qt/WebURLRequestQt.cpp:
847 * Shared/qt/WebURLResponseQt.cpp:
848 * Shared/win/CommandLineWin.cpp:
849 * Shared/win/NativeWebKeyboardEventWin.cpp:
850 * Shared/win/PlatformCertificateInfo.cpp:
851 * Shared/win/UpdateChunk.cpp:
852 * Shared/win/WebCoreArgumentCodersWin.cpp:
853 * Shared/win/WebEventFactory.cpp:
854 * Shared/win/WebURLRequestWin.cpp:
855 * Shared/win/WebURLResponseWin.cpp:
856 * UIProcess/API/C/WKAuthenticationChallenge.cpp:
857 * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
858 * UIProcess/API/C/WKBackForwardList.cpp:
859 * UIProcess/API/C/WKBackForwardListItem.cpp:
860 * UIProcess/API/C/WKContext.cpp:
861 * UIProcess/API/C/WKCredential.cpp:
862 * UIProcess/API/C/WKDatabaseManager.cpp:
863 * UIProcess/API/C/WKDownload.cpp:
864 * UIProcess/API/C/WKFormSubmissionListener.cpp:
865 * UIProcess/API/C/WKFrame.cpp:
866 * UIProcess/API/C/WKFramePolicyListener.cpp:
867 * UIProcess/API/C/WKGeolocationManager.cpp:
868 * UIProcess/API/C/WKGeolocationPermissionRequest.cpp:
869 * UIProcess/API/C/WKGeolocationPosition.cpp:
870 * UIProcess/API/C/WKInspector.cpp:
871 * UIProcess/API/C/WKNavigationData.cpp:
872 * UIProcess/API/C/WKOpenPanelParameters.cpp:
873 * UIProcess/API/C/WKOpenPanelResultListener.cpp:
874 * UIProcess/API/C/WKPage.cpp:
875 * UIProcess/API/C/WKPageGroup.cpp:
876 * UIProcess/API/C/WKPreferences.cpp:
877 * UIProcess/API/C/WKProtectionSpace.cpp:
878 * UIProcess/API/C/win/WKContextWin.cpp:
879 * UIProcess/API/C/win/WKView.cpp:
880 * UIProcess/API/C/win/WKViewPrivate.cpp:
881 * UIProcess/API/cpp/qt/WKStringQt.cpp:
882 * UIProcess/API/cpp/qt/WKURLQt.cpp:
883 * UIProcess/API/qt/ClientImpl.cpp:
884 * UIProcess/API/qt/qgraphicswkview.cpp:
885 * UIProcess/API/qt/qwkcontext.cpp:
886 * UIProcess/API/qt/qwkpage.cpp:
887 * UIProcess/API/qt/qwkpreferences.cpp:
888 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
889 * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
890 * UIProcess/Authentication/WebCredential.cpp:
891 * UIProcess/Authentication/WebProtectionSpace.cpp:
892 * UIProcess/BackingStore.cpp:
893 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
894 * UIProcess/Downloads/DownloadProxy.cpp:
895 * UIProcess/DrawingAreaProxy.cpp:
896 * UIProcess/DrawingAreaProxyImpl.cpp:
897 * UIProcess/FindIndicator.cpp:
898 * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
899 * UIProcess/GeolocationPermissionRequestProxy.cpp:
900 * UIProcess/Launcher/ProcessLauncher.cpp:
901 * UIProcess/Launcher/ThreadLauncher.cpp:
902 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
903 * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
904 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
905 * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
906 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
907 * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
908 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
909 * UIProcess/Plugins/PluginInfoStore.cpp:
910 * UIProcess/Plugins/PluginProcessManager.cpp:
911 * UIProcess/Plugins/PluginProcessProxy.cpp:
912 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
913 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
914 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
915 * UIProcess/ResponsivenessTimer.cpp:
916 * UIProcess/TiledDrawingAreaProxy.cpp:
917 * UIProcess/VisitedLinkProvider.cpp:
918 * UIProcess/WebBackForwardList.cpp:
919 * UIProcess/WebContext.cpp:
920 * UIProcess/WebContextInjectedBundleClient.cpp:
921 * UIProcess/WebContextMenuProxy.cpp:
922 * UIProcess/WebDatabaseManagerProxy.cpp:
923 * UIProcess/WebDatabaseManagerProxyClient.cpp:
924 * UIProcess/WebDownloadClient.cpp:
925 * UIProcess/WebEditCommandProxy.cpp:
926 * UIProcess/WebFindClient.cpp:
927 * UIProcess/WebFormClient.cpp:
928 * UIProcess/WebFormSubmissionListenerProxy.cpp:
929 * UIProcess/WebFrameListenerProxy.cpp:
930 * UIProcess/WebFramePolicyListenerProxy.cpp:
931 * UIProcess/WebFrameProxy.cpp:
932 * UIProcess/WebGeolocationManagerProxy.cpp:
933 * UIProcess/WebGeolocationProvider.cpp:
934 * UIProcess/WebHistoryClient.cpp:
935 * UIProcess/WebInspectorProxy.cpp:
936 * UIProcess/WebLoaderClient.cpp:
937 * UIProcess/WebNavigationData.cpp:
938 * UIProcess/WebOpenPanelResultListenerProxy.cpp:
939 * UIProcess/WebPageContextMenuClient.cpp:
940 * UIProcess/WebPageGroup.cpp:
941 * UIProcess/WebPageProxy.cpp:
942 * UIProcess/WebPolicyClient.cpp:
943 * UIProcess/WebPreferences.cpp:
944 * UIProcess/WebProcessManager.cpp:
945 * UIProcess/WebProcessProxy.cpp:
946 * UIProcess/WebResourceLoadClient.cpp:
947 * UIProcess/WebUIClient.cpp:
948 * UIProcess/cf/WebBackForwardListCF.cpp:
949 * UIProcess/cf/WebPageProxyCF.cpp:
950 * UIProcess/cf/WebPreferencesCF.cpp:
951 * UIProcess/gtk/TextCheckerGtk.cpp:
952 * UIProcess/gtk/WebInspectorGtk.cpp:
953 * UIProcess/gtk/WebPageProxyGtk.cpp:
954 * UIProcess/gtk/WebPreferencesGtk.cpp:
955 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
956 * UIProcess/qt/TextCheckerQt.cpp:
957 * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
958 * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
959 * UIProcess/qt/WebContextMenuProxyQt.cpp:
960 * UIProcess/qt/WebContextQt.cpp:
961 * UIProcess/qt/WebInspectorProxyQt.cpp:
962 * UIProcess/qt/WebPageProxyQt.cpp:
963 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
964 * UIProcess/qt/WebPreferencesQt.cpp:
965 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
966 * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
967 * UIProcess/win/TextCheckerWin.cpp:
968 * UIProcess/win/WebContextMenuProxyWin.cpp:
969 * UIProcess/win/WebContextWin.cpp:
970 * UIProcess/win/WebInspectorProxyWin.cpp:
971 * UIProcess/win/WebPageProxyWin.cpp:
972 * UIProcess/win/WebPopupMenuProxyWin.cpp:
973 * UIProcess/win/WebView.cpp:
974 * WebKit2.xcodeproj/project.pbxproj:
975 * WebProcess/Authentication/AuthenticationManager.cpp:
976 * WebProcess/Downloads/Download.cpp:
977 * WebProcess/Downloads/DownloadManager.cpp:
978 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
979 * WebProcess/Downloads/curl/DownloadCurl.cpp:
980 * WebProcess/Downloads/qt/DownloadQt.cpp:
981 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
982 * WebProcess/Geolocation/WebGeolocationManager.cpp:
983 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
984 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
985 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
986 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
987 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
988 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
989 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
990 * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
991 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
992 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
993 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
994 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
995 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
996 * WebProcess/InjectedBundle/InjectedBundle.cpp:
997 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
998 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
999 * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
1000 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1001 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1002 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1003 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1004 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1005 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1006 * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1007 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1008 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
1009 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
1010 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
1011 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1012 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1013 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1014 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1015 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
1016 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1017 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1018 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1019 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
1020 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
1021 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1022 * WebProcess/Plugins/Plugin.cpp:
1023 * WebProcess/Plugins/PluginProcessConnection.cpp:
1024 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1025 * WebProcess/Plugins/PluginProxy.cpp:
1026 * WebProcess/Plugins/PluginView.cpp:
1027 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1028 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1029 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1030 * WebProcess/WebCoreSupport/WebDragClient.cpp:
1031 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1032 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1033 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1034 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1035 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1036 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1037 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1038 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1039 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1040 * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
1041 * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
1042 * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1043 * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
1044 * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
1045 * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
1046 * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
1047 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1048 * WebProcess/WebKitMain.cpp:
1049 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1050 * WebProcess/WebPage/DecoderAdapter.cpp:
1051 * WebProcess/WebPage/DrawingArea.cpp:
1052 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1053 * WebProcess/WebPage/EncoderAdapter.cpp:
1054 * WebProcess/WebPage/FindController.cpp:
1055 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1056 * WebProcess/WebPage/PageOverlay.cpp:
1057 * WebProcess/WebPage/TiledDrawingArea.cpp:
1058 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1059 * WebProcess/WebPage/WebContextMenu.cpp:
1060 * WebProcess/WebPage/WebEditCommand.cpp:
1061 * WebProcess/WebPage/WebFrame.cpp:
1062 * WebProcess/WebPage/WebInspector.cpp:
1063 * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
1064 * WebProcess/WebPage/WebPage.cpp:
1065 * WebProcess/WebPage/WebPageGroupProxy.cpp:
1066 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
1067 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
1068 * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp:
1069 * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
1070 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1071 * WebProcess/WebPage/qt/WebPageQt.cpp:
1072 * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
1073 * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp:
1074 * WebProcess/WebPage/win/WebInspectorWin.cpp:
1075 * WebProcess/WebPage/win/WebPageWin.cpp:
1076 * WebProcess/WebProcess.cpp:
1077 * WebProcess/gtk/WebProcessGtk.cpp:
1078 * WebProcess/gtk/WebProcessMainGtk.cpp:
1079 * WebProcess/qt/WebProcessMainQt.cpp:
1080 * WebProcess/qt/WebProcessQt.cpp:
1081 * WebProcess/win/WebProcessMainWin.cpp:
1082 * WebProcess/win/WebProcessWin.cpp:
1083 * config.h: Copied from Source/WebKit2/WebKit2Prefix.h.
1084 * win/WebKit2Common.vsprops:
1086 2011-01-27 Maciej Stachowiak <mjs@apple.com>
1088 Reviewed by Darin Adler.
1090 execCommand("Paste") doesn't work in WebKitTestRunner
1091 https://bugs.webkit.org/show_bug.cgi?id=52785
1093 Thread through the new JavaScriptCanAccessClipboard setting.
1095 * Shared/WebPreferencesStore.h:
1096 * UIProcess/API/C/WKPreferences.cpp:
1097 (WKPreferencesSetJavaScriptCanAccessClipboard):
1098 (WKPreferencesGetJavaScriptCanAccessClipboard):
1099 * UIProcess/API/C/WKPreferences.h:
1100 * WebProcess/WebPage/WebPage.cpp:
1101 (WebKit::WebPage::updatePreferences):
1103 2011-01-27 Nate Chapin <japhet@chromium.org>
1105 Reviewed by Adam Barth.
1107 Use Document::url() instead of FrameLoader::url().
1108 https://bugs.webkit.org/show_bug.cgi?id=41165
1110 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1111 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
1112 (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
1113 (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
1114 (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
1115 * WebProcess/WebPage/WebFrame.cpp:
1116 (WebKit::WebFrame::url):
1118 2011-01-27 Sam Weinig <sam@webkit.org>
1120 Reviewed by Anders Carlsson.
1122 Encode/Decode hasPreciseScrollingDeltas bit in WebWheelEvent
1123 https://bugs.webkit.org/show_bug.cgi?id=53254
1125 * Shared/WebWheelEvent.cpp:
1126 (WebKit::WebWheelEvent::WebWheelEvent):
1127 Initialize m_phase and m_hasPreciseScrollingDeltas.
1129 (WebKit::WebWheelEvent::encode):
1130 (WebKit::WebWheelEvent::decode):
1131 Add missing coding for m_hasPreciseScrollingDeltas.
1133 2011-01-26 Enrica Casucci <enrica@apple.com>
1135 Reviewed by Darin Adler and Adam Roben.
1137 WebKit2: add support for drag and drop on Windows
1138 https://bugs.webkit.org/show_bug.cgi?id=52775
1139 <rdar://problem/8514409>
1141 On Windows the access to the content being dragged is
1142 provided via the IDataObject interface that is made available
1143 to the window that registers itself as drop target.
1144 Since this interface cannot be accessed from the WebProcess,
1145 in every call to one of the methods of the IDropTarget interface
1146 we serialize the content of the drag clipboard and send it over to
1147 the WebProcess. The implementation uses the same messages as the
1148 Mac one, with slightly different parameters to pass the serialized
1151 * UIProcess/WebPageProxy.cpp:
1152 (WebKit::WebPageProxy::performDragControllerAction): Added Windows
1153 specific implementation.
1154 * UIProcess/WebPageProxy.h:
1155 * UIProcess/win/WebView.cpp:
1156 (WebKit::WebView::WebView): Added dropTargetHelper object creation.
1157 (WebKit::WebView::initialize): Added to register for drag/drop with out
1159 (WebKit::WebView::close):
1160 (WebKit::WebView::windowReceivedMessage):
1161 (WebKit::WebView::QueryInterface):
1162 (WebKit::WebView::AddRef):
1163 (WebKit::WebView::Release):
1164 (WebKit::dragOperationToDragCursor):
1165 (WebKit::WebView::keyStateToDragOperation):
1166 (WebKit::WebView::DragEnter):
1167 (WebKit::WebView::DragOver):
1168 (WebKit::WebView::DragLeave):
1169 (WebKit::WebView::Drop):
1170 * UIProcess/win/WebView.h:
1171 (WebKit::WebView::create):
1172 * WebProcess/WebPage/WebPage.cpp:
1173 (WebKit::WebPage::performDragControllerAction):
1174 * WebProcess/WebPage/WebPage.h:
1175 * WebProcess/WebPage/WebPage.messages.in:
1177 2011-01-26 Alexey Proskuryakov <ap@apple.com>
1179 Reviewed by Darin Adler.
1181 https://bugs.webkit.org/show_bug.cgi?id=53197
1182 <rdar://problem/8895682> Make WebKit2 printing asynchronous
1184 <rdar://problem/8899988> REGRESSION(WebKit2): Attempting to print WHATWG HTML spec shows
1185 1-page blank preview
1187 <rdar://problem/8900078> WebKit2 printing has a separate message exchange per page when
1188 printing instead of printing all at once
1190 * UIProcess/API/mac/WKPrintingView.h: Store a lot more cached information.
1192 * UIProcess/API/mac/WKPrintingView.mm:
1193 (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use PrintOperation stored in
1194 class. We generally want that now, because current operation will not be set up on other threads.
1195 (-[WKPrintingView _isPrintingPreview]): Added. Preview is different, because it can draw
1196 a placeholder - but actual printing need to wait until UI process has data.
1197 (-[WKPrintingView _updatePreview]): Force AppKit to update print preview when we have real
1198 data to replace placeholder with.
1199 (-[WKPrintingView _hasPageRects]): Return if page rects have already been computed.
1200 (-[WKPrintingView _expectedPreviewCallbackForRect:]): Find an existing request for this rect,
1202 (pageDidDrawToPDF): Update preview - or if actually printing, release control to printing thread.
1203 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ask for a PDF document with
1204 pages the user asked to print.
1205 (pageDidComputePageRects): When web process returns page geometry data, we update preview to display
1206 a page count (which indirectly triggers a request for a preview). When actually printing,
1207 request a PDF right away, we'll need it later.
1208 (-[WKPrintingView _askPageToComputePageRects]): Ask web process for page geometry.
1209 (prepareDataForPrintingOnSecondaryThread): This function starts preparing all data necessary
1210 for actual printing on main thread.
1211 (-[WKPrintingView knowsPageRange:]): Changed to be async for preview, and to call main
1212 thread for actual printing.
1213 (-[WKPrintingView _pageForRect:]): Find page number for a given range, assuming that AppKit
1214 always asks for full pages.
1215 (-[WKPrintingView _drawPDFDocument:page:atPoint:]): A helper function to draw a PDF document.
1216 (-[WKPrintingView _drawPreview:]): Draw the whole page for preview.
1217 (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1218 Draw the whole page for actual printing.
1219 (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): Call drawPageBorderWithSize: with
1220 correct graphics context and print operation.
1221 (-[WKPrintingView drawPageBorderWithSize:]): Delegate work to main thread when called from a
1223 (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): Added an assertion that
1224 our stored NSPrintOperation isn't out of sync with reality.
1225 (-[WKPrintingView rectForPage:]): Handle the case where we don't have the data yet, drawing
1227 (-[WKPrintingView endDocument]): When page setup changes, we must reset all state.
1229 * UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): Tell
1230 NSPrintingView which operation it's serving, so that it knows it even when current operation
1233 * UIProcess/GenericCallback.h:
1234 (WebKit::ComputedPagesCallback::create):
1235 (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
1236 (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
1237 (WebKit::ComputedPagesCallback::invalidate):
1238 (WebKit::ComputedPagesCallback::callbackID):
1239 (WebKit::ComputedPagesCallback::generateCallbackID):
1240 (WebKit::ComputedPagesCallback::ComputedPagesCallback):
1241 Added ComputedPagesCallback, which returns a vector of IntRects and a double. Hopefully,
1242 it will become a specialization of GenericCallback one day.
1244 * UIProcess/WebPageProxy.cpp:
1245 (WebKit::WebPageProxy::close): Added m_voidCallbacks - it looks like they were omitted
1247 (WebKit::WebPageProxy::computedPagesCallback): Added.
1248 (WebKit::WebPageProxy::processDidCrash): Added m_computedPagesCallbacks.
1249 (WebKit::WebPageProxy::computePagesForPrinting): Async now!
1250 (WebKit::WebPageProxy::drawRectToPDF): Ditto.
1251 (WebKit::WebPageProxy::drawPagesToPDF): Added.
1252 * UIProcess/WebPageProxy.h:
1254 * UIProcess/WebPageProxy.messages.in: Added ComputedPagesCallback.
1256 * WebProcess/WebPage/WebPage.cpp:
1257 (WebKit::WebPage::beginPriting): Compute page rects right away - we'll need them in
1258 drawPagesToPDF(), which doesn't have a PrintInfo.
1259 (WebKit::WebPage::computePagesForPrinting): Send async response.
1260 (WebKit::WebPage::drawRectToPDF): This function used to draw into original
1261 location at frame coordinates, and now it draws at (0, 0).
1262 (WebKit::WebPage::drawPagesToPDF): Added - make a multi-page PDF.
1263 * WebProcess/WebPage/WebPage.h:
1265 * WebProcess/WebPage/WebPage.messages.in: Added DrawPagesToPDF.
1267 2011-01-27 Alejandro G. Castro <alex@igalia.com>
1269 Unreviewed GTK build fix after r76797.
1271 * Shared/WebPreferencesStore.h: Use Qt fonts preference for the moment.
1273 2011-01-27 Dan Bernstein <mitz@apple.com>
1275 Reviewed by Anders Carlsson.
1277 Allow pop-up menus to contain multiple items that have the same title.
1279 * UIProcess/mac/WebPopupMenuProxyMac.mm:
1280 (WebKit::WebPopupMenuProxyMac::populate): Set the item’s title after adding it rather than
1281 when adding it, so that it will not replace any existing item with the same title.
1283 2011-01-27 Andreas Kling <kling@webkit.org>
1285 Reviewed by Kenneth Rohde Christiansen.
1287 [Qt][WK2] Add QWKPage APIs regarding engine process availability
1288 https://bugs.webkit.org/show_bug.cgi?id=53237
1290 QWKPage will now emit engineConnected() and engineDisconnected()
1291 when the web process crashes and is relaunched respectively.
1293 Also added QWKPage::isConnectedToEngine() for convenience.
1295 * UIProcess/API/qt/qwkpage.cpp:
1296 (QWKPagePrivate::QWKPagePrivate):
1297 (QWKPagePrivate::didRelaunchProcess):
1298 (QWKPagePrivate::processDidCrash):
1299 (QWKPage::isConnectedToEngine):
1300 * UIProcess/API/qt/qwkpage.h:
1301 * UIProcess/API/qt/qwkpage_p.h:
1303 2011-01-27 Balazs Kelemen <kbalazs@webkit.org>
1305 Reviewed by Andreas Kling.
1307 [Qt][WK2] Lots of layout test failures due to wrong font type
1308 https://bugs.webkit.org/show_bug.cgi?id=53233
1310 * Shared/WebPreferencesStore.h:
1311 Specialize default font families for Qt.
1313 2011-01-26 Maciej Stachowiak <mjs@apple.com>
1315 Reviewed by Dan Bernstein.
1317 WebKitTestRunner needs to support layoutTestController.evaluateInWebInspector
1318 https://bugs.webkit.org/show_bug.cgi?id=42319
1320 Add WKBundleInspector and APIs needed to implement WebKitTestRunner APIs.
1323 * Shared/API/c/WKBase.h:
1324 * Shared/APIObject.h:
1326 * WebKit2.xcodeproj/project.pbxproj:
1327 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1328 * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: Added.
1329 (WKBundleInspectorGetTypeID):
1330 (WKBundleInspectorShow):
1331 (WKBundleInspectorClose):
1332 (WKBundleInspectorEvaluateScriptForTest):
1333 (WKBundleInspectorSetPageProfilingEnabled):
1334 * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: Added.
1335 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1336 (WKBundlePageGetInspector):
1337 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1338 * WebProcess/WebPage/WebInspector.cpp:
1339 (WebKit::WebInspector::create):
1340 (WebKit::WebInspector::evaluateScriptForTest):
1341 * WebProcess/WebPage/WebInspector.h:
1342 (WebKit::WebInspector::type):
1343 * WebProcess/WebPage/WebPage.cpp:
1344 (WebKit::WebPage::inspector):
1345 * WebProcess/WebPage/WebPage.h:
1346 * win/WebKit2.vcproj:
1347 * win/WebKit2Generated.make:
1349 2011-01-26 David Kilzer <ddkilzer@apple.com>
1351 <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
1352 <rdar://problem/8821760>
1354 Reviewed by Antti Koivisto.
1356 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1357 (InitWebCoreSystemInterface): Added initialization for
1358 GetHTTPPipeliningPriority and SetHTTPPipeliningPriority.
1360 2011-01-26 Beth Dakin <bdakin@apple.com>
1362 Reviewed by Darin Adler.
1364 Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics
1365 when using WKScrollbars.
1367 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1368 (InitWebCoreSystemInterface):
1370 2011-01-26 Sam Weinig <sam@webkit.org>
1372 Reviewed by Maciej Stachowiak.
1374 Add events to represent the start/end of a gesture scroll
1375 https://bugs.webkit.org/show_bug.cgi?id=53215
1377 * Scripts/webkit2/messages.py:
1378 * Shared/WebEvent.h:
1379 (WebKit::WebGestureEvent::WebGestureEvent):
1380 (WebKit::WebGestureEvent::position):
1381 (WebKit::WebGestureEvent::globalPosition):
1382 * Shared/WebEventConversion.cpp:
1383 (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
1385 * Shared/WebEventConversion.h:
1386 * Shared/WebGestureEvent.cpp: Added.
1387 (WebKit::WebGestureEvent::WebGestureEvent):
1388 (WebKit::WebGestureEvent::encode):
1389 (WebKit::WebGestureEvent::decode):
1390 (WebKit::WebGestureEvent::isGestureEventType):
1391 * Shared/mac/WebEventFactory.h:
1392 * Shared/mac/WebEventFactory.mm:
1393 (WebKit::gestureEventTypeForEvent):
1394 (WebKit::WebEventFactory::createWebGestureEvent):
1395 * UIProcess/API/mac/WKView.mm:
1396 (-[WKView shortCircuitedEndGestureWithEvent:]):
1397 (-[WKView beginGestureWithEvent:]):
1398 (-[WKView viewDidMoveToWindow]):
1399 * UIProcess/WebPageProxy.cpp:
1400 (WebKit::WebPageProxy::handleGestureEvent):
1401 (WebKit::WebPageProxy::didReceiveEvent):
1402 * UIProcess/WebPageProxy.h:
1403 * WebKit2.xcodeproj/project.pbxproj:
1404 * WebProcess/WebPage/WebPage.cpp:
1405 (WebKit::handleGestureEvent):
1406 (WebKit::WebPage::gestureEvent):
1407 * WebProcess/WebPage/WebPage.h:
1408 * WebProcess/WebPage/WebPage.messages.in:
1409 Pipe gesture events down to WebCore.
1411 2011-01-26 Dan Bernstein <mitz@apple.com>
1413 Reviewed by Dave Hyatt.
1415 <rdar://problem/8446709> Allow inter-ideograph justification for CJK
1416 https://bugs.webkit.org/show_bug.cgi?id=53184
1418 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1419 (WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the
1420 RenderText constructor.
1422 2011-01-26 Jing Jin <jjin@apple.com>
1424 Reviewed by Darin Adler.
1426 Methods to temporarily disable size updates to the page drawing area in WKView.
1427 https://bugs.webkit.org/show_bug.cgi?id=53206
1428 Part of <rdar://problem/8818585>
1430 * UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount.
1431 * UIProcess/API/mac/WKView.mm:
1432 (-[WKView setFrameSize:]): Only update page size if frame size updates are enabled.
1433 (-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size.
1434 (-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount
1435 (-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning
1436 that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame.
1437 (-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates.
1438 * UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled.
1439 * UIProcess/API/mac/WKViewPrivate.h: Added.
1440 * WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h
1442 2011-01-26 Jing Jin <jjin@apple.com>
1444 Rubber-stamped by Dan Bernstein.
1446 Several WKView Internal category methods are implemented in the main category.
1447 https://bugs.webkit.org/show_bug.cgi?id=53195
1449 * UIProcess/API/mac/WKView.mm:
1450 (-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal).
1451 (-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal).
1452 (-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal).
1453 (-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal).
1455 2011-01-26 Brian Weinstein <bweinstein@apple.com>
1457 Reviewed by John Sullivan.
1459 WebKit2: Need API to get the frame load state of a BundleFrame
1460 https://bugs.webkit.org/show_bug.cgi?id=53193
1462 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1463 (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
1464 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1466 2011-01-25 Brian Weinstein <bweinstein@apple.com>
1468 Reviewed by Antti Koivisto.
1470 Crashes loading pages when cancelling subresource loads through WebKit
1471 https://bugs.webkit.org/show_bug.cgi?id=53123
1472 <rdar://problem/8914361>
1474 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1475 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching
1478 2011-01-25 Chris Fleizach <cfleizach@apple.com>
1480 Reviewed by Darin Adler.
1482 WK2 leaks when a page is closed
1483 https://bugs.webkit.org/show_bug.cgi?id=53100
1485 Allow the WKView a chance to clean up on a page close. In this case,
1486 cleaning up means removing the references the accessibility token has
1489 * UIProcess/API/mac/PageClientImpl.h:
1490 * UIProcess/API/mac/PageClientImpl.mm:
1491 (WebKit::PageClientImpl::pageClosed):
1492 * UIProcess/API/mac/WKView.mm:
1493 (-[WKView _setRemoteAccessibilityWindow:]):
1494 (-[WKView _setAccessibilityChildToken:]):
1495 (-[WKView _processDidCrash]):
1496 (-[WKView _pageClosed]):
1497 * UIProcess/API/mac/WKViewInternal.h:
1498 * UIProcess/API/qt/qwkpage_p.h:
1499 (QWKPagePrivate::pageClosed):
1500 * UIProcess/PageClient.h:
1501 * UIProcess/WebPageProxy.cpp:
1502 (WebKit::WebPageProxy::close):
1503 * UIProcess/win/WebView.cpp:
1504 (WebKit::WebView::pageClosed):
1505 * UIProcess/win/WebView.h:
1507 2011-01-25 Chris Marrin <cmarrin@apple.com>
1509 Reviewed by Adam Roben.
1511 Expose WebGL flag set/get in WK2
1512 https://bugs.webkit.org/show_bug.cgi?id=53096
1514 * Shared/WebPreferencesStore.h:
1515 * UIProcess/API/C/WKPreferences.cpp:
1516 (WKPreferencesSetWebGLEnabled):
1517 (WKPreferencesGetWebGLEnabled):
1518 * UIProcess/API/C/WKPreferencesPrivate.h:
1519 * WebProcess/WebPage/WebPage.cpp:
1520 (WebKit::WebPage::updatePreferences):
1522 2011-01-25 Anders Carlsson <andersca@apple.com>
1524 Reviewed by Adam Roben.
1526 Add and implement LayerTreeHost::scheduleLayerFlush
1527 https://bugs.webkit.org/show_bug.cgi?id=53135
1529 * WebKit2.xcodeproj/project.pbxproj:
1530 Add LayerTreeHostMac.mm.
1532 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1533 (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
1534 Call LayerTreeHost::scheduleLayerFlush.
1536 * WebProcess/WebPage/LayerTreeHost.cpp:
1537 (WebKit::LayerTreeHost::~LayerTreeHost):
1538 Call platformInvalidate().
1540 (WebKit::LayerTreeHost::flushPendingLayerChanges):
1541 Rename from syncCompositingLayers.
1543 * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
1544 (WebKit::LayerTreeHost::scheduleLayerFlush):
1545 Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
1547 (WebKit::LayerTreeHost::platformInvalidate):
1548 Invalidate the run loop observer.
1550 (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
1551 Call flushPendingChanges() and remove the run loop observer if it succeeded.
1553 2011-01-25 Anders Carlsson <andersca@apple.com>
1555 Reviewed by Simon Fraser.
1557 Add LayerTreeHost class
1558 https://bugs.webkit.org/show_bug.cgi?id=53132
1560 * WebKit2.xcodeproj/project.pbxproj:
1561 Add LayerTreeHost files.
1563 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1564 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1565 Initialize m_layerTreeHost.
1567 (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1568 Call the m_layerTreeHost.
1570 * WebProcess/WebPage/LayerTreeHost.cpp: Added.
1571 (WebKit::LayerTreeHost::attachRootCompositingLayer):
1572 (WebKit::LayerTreeHost::detachRootCompositingLayer):
1573 Add stubbed out functions.
1575 (WebKit::LayerTreeHost::syncCompositingLayers):
1576 Sync the compositing layers in the main frame.
1578 * WebProcess/WebPage/LayerTreeHost.h: Added.
1580 2011-01-25 Steve Falkenburg <sfalken@apple.com>
1582 Rubber-stamped by Adam Roben.
1584 Windows production build fix.
1585 Use correct environment variable escaping
1588 * win/WebKit2Generated.make:
1590 2011-01-25 Anders Carlsson <andersca@apple.com>
1592 Reviewed by Sam Weinig.
1594 Don't inform the UI process about compositing changes when using the new drawing area
1595 https://bugs.webkit.org/show_bug.cgi?id=53120
1597 * WebProcess/WebPage/WebPage.cpp:
1598 (WebKit::WebPage::changeAcceleratedCompositingMode):
1599 Return early if we're using the new drawing area.
1601 (WebKit::WebPage::exitAcceleratedCompositingMode):
1602 Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing.
1604 2011-01-25 Sam Weinig <sam@webkit.org>
1606 Reviewed by Anders Carlsson.
1608 Pipe a timestamp down into the PlatformWheelEvent for the Mac.
1609 https://bugs.webkit.org/show_bug.cgi?id=53111
1611 * Shared/WebEventConversion.cpp:
1612 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1613 Assign the timestamp.
1615 2011-01-25 Sam Weinig <sam@webkit.org>
1617 Reviewed by Anders Carlsson.
1619 Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
1620 https://bugs.webkit.org/show_bug.cgi?id=53107
1622 * Shared/WebEvent.h:
1623 (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
1624 * Shared/WebEventConversion.cpp:
1625 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1626 * Shared/WebWheelEvent.cpp:
1627 (WebKit::WebWheelEvent::WebWheelEvent):
1628 * Shared/mac/WebEventFactory.mm:
1629 (WebKit::WebEventFactory::createWebWheelEvent):
1631 2011-01-25 Anders Carlsson <andersca@apple.com>
1633 Reviewed by Sam Weinig.
1635 need a way to request the host CALayer render server port
1636 https://bugs.webkit.org/show_bug.cgi?id=53101
1637 <rdar://problem/8913620>
1639 * PluginProcess/PluginControllerProxy.cpp:
1640 (WebKit::PluginControllerProxy::compositingRenderServerPort):
1641 Get the render server port from the plug-in process.
1643 * PluginProcess/PluginControllerProxy.h:
1644 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1645 (WebKit::NPN_GetValue):
1646 Call NetscapePlugin::compositingRenderServerPort.
1648 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1649 (WebKit::NetscapePlugin::compositingRenderServerPort):
1650 Call PluginController::compositingRenderServerPort.
1652 * WebProcess/Plugins/PluginView.cpp:
1653 (WebKit::PluginView::compositingRenderServerPort):
1654 Get the render server port from the web process.
1656 * WebProcess/Plugins/PluginView.h:
1657 Add compositingRenderServerPort.
1659 2011-01-25 Maciej Stachowiak <mjs@apple.com>
1661 Rubber stamped by Dan Bernstein.
1663 Change some floating point constants from 1.0 to 1.
1665 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1666 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1668 2011-01-25 Maciej Stachowiak <mjs@apple.com>
1670 Reviewed by Anders Carlsson.
1672 Improve scale factor resetting
1673 https://bugs.webkit.org/show_bug.cgi?id=53093
1676 - Don't set the scale factor to what it already is, as this causes an
1677 uneeded force layout and scroll
1678 - Don't ever set the scale factor based on a non-main frame committing
1680 This fixes two WebKit2 layout tests.
1682 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1683 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1685 2011-01-24 Chris Marrin <cmarrin@apple.com>
1687 Reviewed by Eric Seidel.
1689 Change ENABLE_3D_CANVAS to ENABLE_WEBGL
1690 https://bugs.webkit.org/show_bug.cgi?id=53041
1692 * Configurations/FeatureDefines.xcconfig:
1694 2011-01-25 Andreas Kling <kling@webkit.org>
1696 Reviewed by Kenneth Rohde Christiansen.
1698 [Qt][WK2] Add QWKPage::processCrashed() signal
1699 https://bugs.webkit.org/show_bug.cgi?id=53076
1701 * UIProcess/API/qt/qwkpage.cpp:
1702 (QWKPagePrivate::processDidCrash):
1703 * UIProcess/API/qt/qwkpage.h:
1704 * UIProcess/API/qt/qwkpage_p.h:
1706 2011-01-24 Anders Carlsson <andersca@apple.com>
1710 * WebProcess/mac/WebProcessMac.mm:
1711 (WebKit::initializeSandbox):
1713 2011-01-24 Anders Carlsson <andersca@apple.com>
1715 Reviewed by Dan Bernstein.
1717 Reset the page scale factor on standard frame loads
1718 https://bugs.webkit.org/show_bug.cgi?id=53058
1719 <rdar://problem/8908844>
1721 * UIProcess/WebPageProxy.cpp:
1722 (WebKit::WebPageProxy::scaleWebView):
1723 Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
1725 (WebKit::WebPageProxy::viewScaleFactorDidChange):
1726 Update m_viewScaleFactor.
1728 * UIProcess/WebPageProxy.h:
1729 Add viewScaleFactorDidChange.
1731 * UIProcess/WebPageProxy.messages.in:
1732 Add ViewScaleFactorDidChange message.
1734 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1735 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1736 Set the scale factor.
1738 (WebKit::WebFrameLoaderClient::restoreViewState):
1739 Inform the UI process about the new view scale factor.
1741 * WebProcess/WebPage/WebPage.cpp:
1742 (WebKit::WebPage::scaleWebView):
1743 Send a ViewScaleFactorDidChange message.
1745 2011-01-24 Maciej Stachowiak <mjs@apple.com>
1747 Reviewed by Anders Carlsson.
1749 Use designated temp directory for the database for WebKit2
1750 https://bugs.webkit.org/show_bug.cgi?id=53052
1752 Add the API necessary to support this. Database path is now
1753 determined on the UI process side and passed to the Web process.
1754 Reviewed by Anders Carlsson.
1757 * Shared/WebProcessCreationParameters.cpp:
1758 (WebKit::WebProcessCreationParameters::encode):
1759 (WebKit::WebProcessCreationParameters::decode):
1760 * Shared/WebProcessCreationParameters.h:
1761 * UIProcess/API/C/WKContext.cpp:
1762 (WKContextSetDatabaseDirectory):
1763 * UIProcess/API/C/WKContextPrivate.h:
1764 * UIProcess/WebContext.cpp:
1765 (WebKit::WebContext::ensureWebProcess):
1766 (WebKit::WebContext::databaseDirectory):
1767 * UIProcess/WebContext.h:
1768 (WebKit::WebContext::setDatabaseDirectory):
1769 * UIProcess/mac/WebContextMac.mm:
1770 (WebKit::WebContext::platformDefaultDatabaseDirectory):
1771 * UIProcess/qt/WebContextQt.cpp:
1772 (WebKit::WebContext::platformDefaultDatabaseDirectory):
1773 * UIProcess/win/WebContextWin.cpp:
1774 (WebKit::WebContext::platformDefaultDatabaseDirectory):
1776 * WebKit2.xcodeproj/project.pbxproj:
1777 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1778 (WebKit::WebDatabaseManager::initialize):
1779 (WebKit::WebDatabaseManager::WebDatabaseManager):
1780 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1781 * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
1782 * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
1783 * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
1784 * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
1785 * WebProcess/WebProcess.cpp:
1786 (WebKit::WebProcess::WebProcess):
1787 (WebKit::WebProcess::initializeWebProcess):
1788 * WebProcess/com.apple.WebProcess.sb:
1789 * WebProcess/mac/WebProcessMac.mm:
1790 (WebKit::initializeSandbox):
1791 * win/WebKit2.vcproj:
1793 2011-01-24 Brent Fulgham <bfulgham@webkit.org>
1795 Unreviewed build fix.
1797 * win/WebKit2.vcproj: Don't build the CG Utilities when building
1800 2011-01-24 Anders Carlsson <andersca@apple.com>
1802 Reviewed by John Sullivan.
1804 Don't use the timeout checker for non-user-interaction messages
1805 https://bugs.webkit.org/show_bug.cgi?id=53046
1807 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1808 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
1809 (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
1810 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1811 (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
1812 (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
1814 2011-01-24 Adam Roben <aroben@apple.com>
1816 Windows Production build fix
1818 * win/WebKit2.make: Update for move of WebKit2 into Source.
1820 2011-01-24 Jessie Berlin <jberlin@apple.com>
1822 Reviewed by Adam Roben.
1824 WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
1825 https://bugs.webkit.org/show_bug.cgi?id=53029
1827 * UIProcess/win/TextCheckerWin.cpp:
1828 Disable the warnings for this file.
1830 2011-01-24 Anders Carlsson <andersca@apple.com>
1832 Reviewed by Sam Weinig.
1834 Wait for half a second if we're asked to paint when receiving a DidSetSize message
1835 https://bugs.webkit.org/show_bug.cgi?id=53028
1837 * UIProcess/DrawingAreaProxyImpl.cpp:
1838 (WebKit::DrawingAreaProxyImpl::paint):
1840 2011-01-24 Anders Carlsson <andersca@apple.com>
1842 Reviewed by Sam Weinig.
1844 Implement forceRedisplay in the new drawing area
1845 https://bugs.webkit.org/show_bug.cgi?id=53026
1847 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1848 (WebKit::DrawingAreaImpl::forceRepaint):
1849 * WebProcess/WebPage/DrawingAreaImpl.h:
1851 2011-01-24 Anders Carlsson <andersca@apple.com>
1853 Reviewed by Sam Weinig.
1855 Fill unpainted rects with the background color.
1856 https://bugs.webkit.org/show_bug.cgi?id=53025
1858 * UIProcess/API/mac/WKView.mm:
1859 (drawPageBackground):
1860 Add new helper function.
1862 (-[WKView drawRect:]):
1863 Iterate over the unpainted rects and fill them with the background color.
1865 2011-01-24 Dan Bernstein <mitz@apple.com>
1867 Reviewed by John Sullivan.
1869 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
1871 * UIProcess/API/mac/PageClientImpl.mm:
1872 (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
1874 2011-01-24 Balazs Kelemen <kbalazs@webkit.org>
1876 Rubber-stamped by Csaba Osztrogonác.
1880 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1881 (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
1883 2011-01-24 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
1885 Reviewed by Kenneth Rohde Christiansen.
1887 [Qt] Remove CleanupHandler by passing file descriptors.
1889 Deleting files in signal handler of UI process is not a good idea,
1890 because the memory where filenames are stored might not be valid
1893 To avoid the need of using signal handlers for cleanup,
1895 1) Avoid passing filenames between processes, pass fds
1896 2) When mmap'ing files, delete them immediately after
1897 opening and mmap'ing them.
1898 3) Pass sockets with fds during fork+exec instead of
1899 passing them via the filesystem.
1900 4) Use mmap'ed files for implementation of SharedMemory.
1901 QSharedMemory does not support cleanup correctly.
1904 - Move MappedMemory to SharedMemory, make UpdateChunk use this.
1905 - Implement CoreIPC::Attachment using mmaped files.
1906 - Send messages using datagram socket. This solution works
1907 similiarly to Mach ports on Mac.
1908 - Send big messages out-of-line and thus avoid increasing
1910 - Remove MemoryMappedPool and rely on libc/kernel caching
1912 - Unmap memory areas after use.
1913 - When UI process crashes, kill the web process using SIGKILL.
1914 This is possible again because cleanup handler is not needed.
1916 [WK2][Qt] Multiple problems with MemoryMappedPool
1917 https://bugs.webkit.org/show_bug.cgi?id=51984
1919 * Platform/CoreIPC/Attachment.cpp:
1920 (CoreIPC::Attachment::Attachment):
1921 * Platform/CoreIPC/Attachment.h:
1922 (CoreIPC::Attachment::size):
1923 (CoreIPC::Attachment::releaseFileDescriptor):
1924 (CoreIPC::Attachment::fileDescriptor):
1925 * Platform/CoreIPC/Connection.h:
1926 * Platform/CoreIPC/qt/ConnectionQt.cpp:
1927 (CoreIPC::MessageInfo::MessageInfo):
1928 (CoreIPC::MessageInfo::setMessageBodyOOL):
1929 (CoreIPC::MessageInfo::isMessageBodyOOL):
1930 (CoreIPC::MessageInfo::bodySize):
1931 (CoreIPC::MessageInfo::messageID):
1932 (CoreIPC::MessageInfo::attachmentCount):
1933 (CoreIPC::Connection::platformInitialize):
1934 (CoreIPC::Connection::platformInvalidate):
1935 (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
1936 (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
1937 (CoreIPC::Connection::readyReadHandler):
1938 (CoreIPC::Connection::open):
1939 (CoreIPC::Connection::platformCanSendOutgoingMessages):
1940 (CoreIPC::Connection::sendOutgoingMessage):
1941 * Platform/SharedMemory.h:
1942 * Platform/WorkQueue.h:
1943 * Platform/qt/MappedMemoryPool.cpp: Removed.
1944 * Platform/qt/MappedMemoryPool.h: Removed.
1945 * Platform/qt/SharedMemoryQt.cpp:
1946 (WebKit::SharedMemory::Handle::Handle):
1947 (WebKit::SharedMemory::Handle::~Handle):
1948 (WebKit::SharedMemory::Handle::isNull):
1949 (WebKit::SharedMemory::Handle::encode):
1950 (WebKit::SharedMemory::Handle::decode):
1951 (WebKit::SharedMemory::Handle::releaseToAttachment):
1952 (WebKit::SharedMemory::Handle::adoptFromAttachment):
1953 (WebKit::SharedMemory::create):
1954 (WebKit::accessModeMMap):
1955 (WebKit::SharedMemory::~SharedMemory):
1956 (WebKit::accessModeFile):
1957 (WebKit::SharedMemory::createHandle):
1958 * Platform/qt/WorkQueueQt.cpp:
1959 (WorkQueue::registerSocketEventHandler):
1960 * Shared/qt/UpdateChunk.cpp:
1961 (WebKit::UpdateChunk::UpdateChunk):
1962 (WebKit::UpdateChunk::~UpdateChunk):
1963 (WebKit::UpdateChunk::encode):
1964 (WebKit::UpdateChunk::decode):
1965 (WebKit::UpdateChunk::createImage):
1966 * Shared/qt/UpdateChunk.h:
1967 * UIProcess/Launcher/ProcessLauncher.h:
1968 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1969 (WebKit::QtWebProcess::QtWebProcess):
1970 (WebKit::QtWebProcess::setupChildProcess):
1971 (WebKit::ProcessLauncher::launchProcess):
1972 (WebKit::ProcessLauncher::platformInvalidate):
1973 * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
1974 (WebKit::webThreadBody):
1975 (WebKit::ThreadLauncher::createWebThread):
1977 * WebProcess/qt/WebProcessMainQt.cpp:
1978 (WebKit::WebProcessMainQt):
1980 2011-01-24 Andras Becsi <abecsi@webkit.org>
1982 Reviewed by Csaba Osztrogonác.
1984 [Qt] Move project files into Source
1985 https://bugs.webkit.org/show_bug.cgi?id=52891
1987 * DerivedSources.pro:
1991 2011-01-23 Damian Kaleta <dkaleta@apple.com>
1993 Reviewed by Kevin Decker.
1995 <rdar://problem/8905171>
1996 https://bugs.webkit.org/show_bug.cgi?id=52985
1998 * UIProcess/WebPageProxy.cpp:
1999 (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it
2000 consistent with WebKit1.
2002 2011-01-23 Alexey Proskuryakov <ap@apple.com>
2004 Reviewed by Dan Bernstein.
2006 https://bugs.webkit.org/show_bug.cgi?id=52968
2007 Use a separate NSView for printing
2009 Also addresses <rdar://problem/8900148> Improper check for
2010 -[NSGraphicsContext currentContextDrawingToScreen]
2012 * UIProcess/API/mac/WKPrintingView.h: Added.
2013 * UIProcess/API/mac/WKPrintingView.mm: Added.
2014 (-[WKPrintingView initWithFrameProxy:]):
2015 (-[WKPrintingView isFlipped]):
2016 (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
2017 (-[WKPrintingView knowsPageRange:]):
2018 (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2019 (-[WKPrintingView drawPageBorderWithSize:]):
2020 (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
2021 (-[WKPrintingView rectForPage:]):
2022 * UIProcess/API/mac/WKView.mm:
2023 (-[WKView drawRect:]):
2024 (-[WKView canChangeFrameLayout:]):
2025 (-[WKView printOperationWithPrintInfo:forFrame:]):
2026 * WebKit2.xcodeproj/project.pbxproj:
2027 Moved printing code to a separate view, simplifying as appropriate. The view is currently not
2028 referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
2030 2011-01-22 Anders Carlsson <andersca@apple.com>
2032 Reviewed by Sam Weinig.
2034 Transparent windows with compositing WebKit2 content show garbage
2035 https://bugs.webkit.org/show_bug.cgi?id=52966
2036 <rdar://problem/8765051>
2038 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
2039 (WebKit::LayerBackedDrawingAreaProxy::paint):
2040 If the WKView should draw transparent background, do so.
2042 2011-01-22 Anders Carlsson <andersca@apple.com>
2044 Reviewed by Sam Weinig.
2046 Add an asynchronous WKPageForceRepaint
2047 https://bugs.webkit.org/show_bug.cgi?id=52964
2048 <rdar://problem/8898527>
2050 * UIProcess/API/C/WKPage.cpp:
2051 (WKPageForceRepaint):
2052 Call WebPageProxy::forceRepaint.
2054 * UIProcess/API/C/WKPage.h:
2055 Add WKPageForceRepaint.
2057 * UIProcess/GenericCallback.h:
2058 Add a "generic" VoidCallback class.
2060 * UIProcess/WebPageProxy.cpp:
2061 (WebKit::WebPageProxy::forceRepaint):
2062 Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
2064 (WebKit::WebPageProxy::voidCallback):
2065 Call the right void callback.
2067 (WebKit::WebPageProxy::processDidCrash):
2068 Invalidate m_voidCallbacks.
2070 * UIProcess/WebPageProxy.messages.in:
2071 Add a VoidCallback message.
2073 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2074 (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
2077 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2080 * WebProcess/WebPage/WebPage.cpp:
2081 (WebKit::WebPage::forceRepaint):
2082 Call forceRepaint on the drawing area.
2084 * WebProcess/WebPage/WebPage.messages.in:
2085 Add a ForceRepaint message.
2087 2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
2089 Reviewed by Dirk Schulze.
2091 Introduce FontMetrics abstraction
2092 https://bugs.webkit.org/show_bug.cgi?id=51456
2094 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
2095 (WebKit::WebPopupMenu::setUpPlatformData):
2097 2011-01-22 Alexey Proskuryakov <ap@apple.com>
2099 Reviewed by Dan Bernstein.
2101 https://bugs.webkit.org/show_bug.cgi?id=52950
2102 Leak in WebPage::drawRectToPDF
2104 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
2106 2011-01-22 Alexey Proskuryakov <ap@apple.com>
2108 Reviewed by Dan Bernstein.
2110 https://bugs.webkit.org/show_bug.cgi?id=52951
2111 WebKit2 generates a bad PDF for cross process messaging
2113 * UIProcess/API/mac/WKView.mm:
2114 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2115 Use a correct offset when flipping.
2117 2011-01-21 Alexey Proskuryakov <ap@apple.com>
2119 Reviewed by Dan Bernstein.
2121 https://bugs.webkit.org/show_bug.cgi?id=52943
2122 Objective-C files should use #import, not #include
2124 * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
2125 there is more than one WKView.h.
2127 * Platform/mac/ModuleMac.mm:
2128 * Platform/mac/RunLoopMac.mm:
2129 * PluginProcess/mac/PluginControllerProxyMac.mm:
2130 * PluginProcess/mac/PluginProcessMac.mm:
2131 * PluginProcess/mac/PluginProcessMainMac.mm:
2132 * Shared/API/c/mac/WKCertificateInfoMac.mm:
2133 * Shared/API/c/mac/WKURLRequestNS.mm:
2134 * Shared/API/c/mac/WKURLResponseNS.mm:
2135 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2136 * Shared/mac/PlatformCertificateInfo.mm:
2137 * Shared/mac/SandboxExtensionMac.mm:
2138 * Shared/mac/WebCoreArgumentCodersMac.mm:
2139 * Shared/mac/WebMemorySampler.mac.mm:
2140 * Shared/mac/WebURLRequestMac.mm:
2141 * Shared/mac/WebURLResponseMac.mm:
2142 * UIProcess/API/mac/FindIndicatorWindow.mm:
2143 * UIProcess/API/mac/WKTextInputWindowController.mm:
2144 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2145 * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
2146 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2147 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2148 * UIProcess/mac/BackingStoreMac.mm:
2149 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2150 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
2151 * UIProcess/mac/TextCheckerMac.mm:
2152 * UIProcess/mac/WebContextMac.mm:
2153 * UIProcess/mac/WebContextMenuProxyMac.mm:
2154 * UIProcess/mac/WebPageProxyMac.mm:
2155 * UIProcess/mac/WebPopupMenuProxyMac.mm:
2156 * UIProcess/mac/WebPreferencesMac.mm:
2157 * WebProcess/Downloads/mac/DownloadMac.mm:
2158 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2159 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
2160 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2161 * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
2162 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2163 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2164 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2165 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2166 * WebProcess/WebPage/mac/WebPageMac.mm:
2167 * WebProcess/mac/WebProcessMac.mm:
2169 2011-01-21 Mark Rowe <mrowe@apple.com>
2171 Reviewed by Sam Weinig.
2173 Fix the WebKit2 build with clang.
2175 * Scripts/webkit2/messages.py: Add some more structs to the list.
2176 * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
2177 * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
2178 * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
2179 * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
2180 functions expecting NSString* without generating warnings.
2181 * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
2182 * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
2183 * WebProcess/WebPage/WebPage.cpp:
2184 (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
2185 the if statement to suppress a warning.
2187 2011-01-21 Brian Weinstein <bweinstein@apple.com>
2189 Reviewed by Adam Roben.
2191 WebKit2: Need API to stop loading a WKFrame
2192 https://bugs.webkit.org/show_bug.cgi?id=52925
2194 * UIProcess/API/C/WKFrame.cpp:
2195 (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
2196 * UIProcess/API/C/WKFrame.h:
2197 * UIProcess/WebFrameProxy.cpp:
2198 (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
2199 with the passed in ID.
2200 * UIProcess/WebFrameProxy.h:
2201 * WebProcess/WebPage/WebPage.cpp:
2202 (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
2203 * WebProcess/WebPage/WebPage.h:
2204 * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
2206 2011-01-21 Brady Eidson <beidson@apple.com>
2208 Reviewed by Adam Roben.
2210 <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
2211 Expose "suggested filename" for a resource based on its resource response.
2214 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2215 (WKBundleFrameCopySuggestedFilenameForResourceURL):
2216 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2219 * WebProcess/WebPage/WebFrame.cpp:
2220 (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
2221 a resource for this URL and, if so, return the response's suggested filename.
2222 * WebProcess/WebPage/WebFrame.h:
2224 2011-01-21 Anders Carlsson <andersca@apple.com>
2226 Reviewed by Dan Bernstein.
2228 DrawingAreaProxyImpl::paint should return the unpainted region
2229 https://bugs.webkit.org/show_bug.cgi?id=52918
2231 * UIProcess/API/mac/WKView.mm:
2232 (-[WKView drawRect:]):
2233 Add unpaintedRegion parameter.
2235 * UIProcess/BackingStore.h:
2236 (WebKit::BackingStore::size):
2239 * UIProcess/DrawingAreaProxyImpl.cpp:
2240 (WebKit::DrawingAreaProxyImpl::paint):
2241 Initialize the unpainted region to the dirty region, then subtract the painted region.
2243 2011-01-21 Anders Carlsson <andersca@apple.com>
2245 Reviewed by Dan Bernstein and Maciej Stachowiak.
2247 Fix for <rdar://problem/8896057>
2249 Give the Web Process access to the PubSub agent.
2251 * WebProcess/com.apple.WebProcess.sb:
2253 2011-01-21 Sam Weinig <sam@webkit.org>
2255 Reviewed by Anders Carlsson.
2257 Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
2258 https://bugs.webkit.org/show_bug.cgi?id=52779
2260 Rename ScrollbarClient -> ScrollableArea.
2262 * UIProcess/win/WebPopupMenuProxyWin.cpp:
2263 (WebKit::WebPopupMenuProxyWin::onMouseWheel):
2264 (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
2265 * UIProcess/win/WebPopupMenuProxyWin.h:
2267 2011-01-21 Adam Roben <aroben@apple.com>
2269 Update for WKCACFLayerRenderer -> CACFLayerView rename
2271 Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
2273 Reviewed by Simon Fraser.
2275 * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
2278 2011-01-20 Darin Adler <darin@apple.com>
2280 Reviewed by Dan Bernstein.
2282 WebKit2: Implement showModalDialog
2283 https://bugs.webkit.org/show_bug.cgi?id=52855
2285 * Shared/WebPageCreationParameters.h: Added canRunModal.
2287 * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
2288 WKPageUIClient. Also removed a lot of redundant typedefs and added
2289 a new one, WKPageCallback, for callbacks without arguments or return
2292 * UIProcess/API/qt/qwkpage.cpp:
2293 (QWKPage::QWKPage): Added a runModal function pointer of 0.
2295 * UIProcess/WebPageProxy.cpp:
2296 (WebKit::WebPageProxy::creationParameters): Set canRunModal
2297 based on return value of WebUIClient::canRunModal.
2299 * UIProcess/WebPageProxy.h: Added runModal.
2300 Calls WebUIClient::runModal.
2302 * UIProcess/WebPageProxy.messages.in: Added RunModal message.
2303 Also removed the periods from the phrases in the comments
2304 as Maciej requested a while back.
2306 * UIProcess/WebUIClient.cpp:
2307 (WebKit::WebUIClient::canRunModal): Added. Returns true or false
2308 based on whether a runModal function was supplied in the
2309 WKPageUIClient structure.
2310 (WebKit::WebUIClient::runModal): Added. Calls the runModal
2311 function from the WKPageUIClient structure.
2312 * UIProcess/WebUIClient.h: Declared the above functions.
2314 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2315 (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
2316 (WebKit::WebChromeClient::runModal): Ditto.
2318 * WebProcess/WebPage/WebPage.cpp:
2319 (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
2320 creation parameters. Initialize m_isRunningModal to false.
2321 (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
2322 (WebKit::WebPage::runModal): Send a message to ask the UI process to run
2323 modal and then start a nested run loop. It gets stopped when the page is closed.
2324 * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
2325 and declared the runModal function.
2327 2011-01-20 Alexey Proskuryakov <ap@apple.com>
2329 Reviewed by Darin Adler.
2331 https://bugs.webkit.org/show_bug.cgi?id=52849
2332 Make window.print work with WebKit2
2334 * UIProcess/API/qt/qwkpage.cpp:
2336 * UIProcess/WebPageProxy.cpp:
2337 (WebKit::WebPageProxy::printFrame):
2338 * UIProcess/WebPageProxy.h:
2339 * UIProcess/WebPageProxy.messages.in:
2340 * UIProcess/WebUIClient.cpp:
2341 (WebKit::WebUIClient::printFrame):
2342 * UIProcess/WebUIClient.h:
2343 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2344 (WebKit::WebChromeClient::print):
2345 Just pass through deelagte call to a WebKit2 client.
2347 * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
2350 2011-01-20 Anders Carlsson <andersca@apple.com>
2352 Reviewed by Darin Adler.
2354 Keep track of the latest update timestamp in the backing store
2355 https://bugs.webkit.org/show_bug.cgi?id=52848
2357 * Shared/UpdateInfo.h:
2358 (WebKit::UpdateInfo::UpdateInfo):
2359 Initialize timestamp to 0.
2361 * UIProcess/BackingStore.cpp:
2362 (WebKit::BackingStore::BackingStore):
2363 Initialize m_latestUpdateTimestamp to 0.
2365 (WebKit::BackingStore::incorporateUpdate):
2366 If the update is too old, discard it. Otherwise, create a bitmap
2367 and pass it to platformIncorporateUpdate. Finally update the timestamp.
2369 * UIProcess/BackingStore.h:
2370 Add m_latestUpdateTimestamp.
2372 * UIProcess/mac/BackingStoreMac.mm:
2373 (WebKit::BackingStore::platformIncorporateUpdate):
2374 Update now that we are already given the shareable bitmap.
2376 2011-01-20 Beth Dakin <bdakin@apple.com>
2378 Reviewed by Geoffrey Garen.
2380 Fix for <rdar://problem/8890255>
2382 Allow WebKitSystemInterface to draw scrollbars
2384 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2385 (InitWebCoreSystemInterface):
2387 2011-01-20 Sam Weinig <sam@webkit.org>
2389 Reviewed by Dave Hyatt.
2391 Cleanup Scrollbar/ScrollbarClient relationship
2392 https://bugs.webkit.org/show_bug.cgi?id=52779
2394 * UIProcess/win/WebPopupMenuProxyWin.cpp:
2395 (WebKit::WebPopupMenuProxyWin::scrollPosition):
2396 (WebKit::WebPopupMenuProxyWin::setScrollOffset):
2397 (WebKit::WebPopupMenuProxyWin::scrollTo):
2398 (WebKit::WebPopupMenuProxyWin::onMouseWheel):
2399 (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
2400 * UIProcess/win/WebPopupMenuProxyWin.h:
2401 (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
2403 2011-01-20 Anders Carlsson <andersca@apple.com>
2405 Reviewed by Adam Roben.
2407 Add a timestamp to UpdateInfo
2408 https://bugs.webkit.org/show_bug.cgi?id=52844
2410 * Shared/UpdateInfo.cpp:
2411 (WebKit::UpdateInfo::encode):
2412 (WebKit::UpdateInfo::decode):
2413 * Shared/UpdateInfo.h:
2414 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2415 (WebKit::DrawingAreaImpl::setSize):
2416 (WebKit::DrawingAreaImpl::display):
2418 2011-01-20 Anders Carlsson <andersca@apple.com>
2420 Reviewed by Beth Dakin.
2422 Add Connection::waitForAndDispatchImmediately
2423 https://bugs.webkit.org/show_bug.cgi?id=52841
2425 * Platform/CoreIPC/Connection.h:
2426 (CoreIPC::Connection::waitForAndDispatchImmediately):
2428 2011-01-20 Kevin Decker <kdecker@apple.com>
2430 Reviewed by Anders Carlsson.
2432 <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
2433 https://bugs.webkit.org/show_bug.cgi?id=52823
2435 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2436 (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
2437 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
2438 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
2439 (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
2440 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2442 2011-01-20 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
2444 Reviewed by Andreas Kling.
2446 Remove null ptr deref that happens when reattaching to
2449 Implement didRelaunchProcess that sets the drawing area size
2450 after the drawing area is re-instantiated.
2452 [Qt][WK2] Null ptr deref in UI process after web process has crashed
2453 https://bugs.webkit.org/show_bug.cgi?id=52796
2455 * UIProcess/API/qt/qgraphicswkview.cpp:
2456 (QGraphicsWKView::QGraphicsWKView):
2457 * UIProcess/API/qt/qwkpage.cpp:
2458 (QWKPagePrivate::QWKPagePrivate):
2459 (QWKPagePrivate::init):
2460 (QWKPagePrivate::createDrawingAreaProxy):
2461 (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
2462 * UIProcess/API/qt/qwkpage_p.h:
2464 2011-01-20 Maciej Stachowiak <mjs@apple.com>
2466 Reviewed by Adam Roben.
2468 WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
2469 https://bugs.webkit.org/show_bug.cgi?id=42327
2471 Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
2472 that corresponds to a JSContextRef (or null if none).
2474 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2475 (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
2477 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2478 * WebProcess/WebPage/WebFrame.cpp:
2479 (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
2480 * WebProcess/WebPage/WebFrame.h:
2482 2011-01-20 Alejandro G. Castro <alex@igalia.com>
2484 Fix compilation error in GTK WebKit2.
2486 * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
2487 (CoreIPC::readBytesFromSocket):
2488 (CoreIPC::writeBytesToSocket):
2490 2011-01-20 Zoltan Horvath <zoltan@webkit.org>
2492 Reviewed by Csaba Osztrogonác.
2494 Refactoring of the custom allocation framework
2495 https://bugs.webkit.org/show_bug.cgi?id=49897
2497 Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
2498 The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
2499 equivalent macro implementation at the necessary places.
2501 2011-01-19 Simon Fraser <simon.fraser@apple.com>
2503 Fix the WebKit2 build.
2505 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2506 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2508 2011-01-19 Brian Weinstein <bweinstein@apple.com>
2510 Reviewed by Darin Adler.
2512 WebKit2: Need API to get the parent frame of a frame
2513 https://bugs.webkit.org/show_bug.cgi?id=52774
2515 Add the API to get the parent frame of a frame.
2517 * UIProcess/API/C/WKFrame.cpp:
2518 (WKFrameGetParentFrame):
2519 * UIProcess/API/C/WKFrame.h:
2521 2011-01-19 Enrica Casucci <enrica@apple.com>
2523 Reviewed by Darin Adler.
2525 WebKit2: add support for drag and drop
2526 https://bugs.webkit.org/show_bug.cgi?id=52343
2527 <rdar://problem/7660558>
2529 This patch contains the remaining work to support drag and drop on Mac.
2530 I've added a PasteboardTypes class to encapsulate all the pasteboard formats
2531 supported for drag and drop.
2532 In this implementation we don't support the promised types, since I could not
2533 find an efficient way to do this across processes.
2534 The bulk of the patch consists in creating a shareable bitmap for the drag image,
2535 pass its handle to the UI process and create a new NSImage from it to be given to
2536 AppKit for dragging.
2537 I've added the missing implementation of the methods in the drag client to hook
2538 up the placement of the data in the pasteboard.
2540 * Shared/mac/PasteboardTypes.h: Added.
2541 * Shared/mac/PasteboardTypes.mm: Added.
2542 (WebKit::PasteboardTypes::forEditing):
2543 (WebKit::PasteboardTypes::forURL):
2544 (WebKit::PasteboardTypes::forImages):
2545 (WebKit::PasteboardTypes::forImagesWithArchive):
2546 * UIProcess/API/mac/PageClientImpl.h:
2547 * UIProcess/API/mac/PageClientImpl.mm:
2548 (WebKit::PageClientImpl::setDragImage): Added.
2549 * UIProcess/API/mac/WKView.mm:
2550 (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
2551 (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2552 (-[WKView _setMouseDownEvent:]):
2553 (-[WKView _mouseHandler:]):
2554 (-[WKView mouseDown:]):
2555 (-[WKView mouseUp:]):
2556 (-[WKView mouseDragged:]):
2557 (-[WKView draggedImage:endedAt:operation:]):
2558 (-[WKView draggingEntered:]):
2559 (-[WKView _setDragImage:at:linkDrag:]):
2560 * UIProcess/API/mac/WKViewInternal.h:
2561 * UIProcess/PageClient.h:
2562 * UIProcess/WebPageProxy.cpp:
2563 (WebKit::WebPageProxy::setDragImage):
2564 (WebKit::WebPageProxy::dragEnded):
2565 * UIProcess/WebPageProxy.h:
2566 * UIProcess/WebPageProxy.messages.in:
2567 * WebKit2.xcodeproj/project.pbxproj:
2568 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2569 * WebProcess/WebCoreSupport/WebDragClient.h:
2570 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
2571 (WebKit::fontFromNSFont):
2572 (WebKit::WebDragClient::startDrag): Added implementation.
2573 (WebKit::WebDragClient::createDragImageForLink): Ditto.
2574 (WebKit::writeURL): Helper function.
2575 (WebKit::writeImage): Helper function.
2576 (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
2577 * WebProcess/WebPage/WebPage.cpp:
2578 (WebKit::WebPage::dragEnded):
2579 * WebProcess/WebPage/WebPage.h:
2580 * WebProcess/WebPage/WebPage.messages.in:
2582 2011-01-19 Anders Carlsson <andersca@apple.com>
2584 Reviewed by Dan Bernstein.
2586 Put the deprecated Connection member functions next to eachother
2587 https://bugs.webkit.org/show_bug.cgi?id=52767
2589 * Platform/CoreIPC/Connection.h:
2590 (CoreIPC::Connection::sendSync):
2591 (CoreIPC::Connection::send):
2593 2011-01-19 Anders Carlsson <andersca@apple.com>
2595 Reviewed by Sam Weinig.
2597 When resizing, the web process should repaint the page
2598 https://bugs.webkit.org/show_bug.cgi?id=52764
2600 * UIProcess/DrawingAreaProxyImpl.cpp:
2601 (WebKit::DrawingAreaProxyImpl::didSetSize):
2602 Incorporate the update.
2604 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2605 Return early if the update bounds rect is empty. This can happen if painting is
2606 disabled and we get a DidSetSize message.
2608 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2609 (WebKit::DrawingAreaImpl::setSize):
2610 If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
2611 paint and fill in the UpdateInfo struct.
2613 (WebKit::DrawingAreaImpl::display):
2614 Assert that painting is not disabled.
2616 2011-01-19 Alexey Proskuryakov <ap@apple.com>
2618 Reviewed by Darin Adler.
2620 https://bugs.webkit.org/show_bug.cgi?id=52739
2621 Make it possible for a WebKit2 client to print headers and footers
2623 * UIProcess/API/C/WKPage.h:
2624 * UIProcess/WebPageProxy.cpp:
2625 (WebKit::WebPageProxy::headerHeight):
2626 (WebKit::WebPageProxy::footerHeight):
2627 (WebKit::WebPageProxy::drawHeader):
2628 (WebKit::WebPageProxy::drawFooter):
2629 * UIProcess/WebPageProxy.h:
2630 * UIProcess/WebUIClient.cpp:
2631 (WebKit::WebUIClient::headerHeight):
2632 (WebKit::WebUIClient::footerHeight):
2633 (WebKit::WebUIClient::drawHeader):
2634 (WebKit::WebUIClient::drawFooter):
2635 * UIProcess/WebUIClient.h:
2636 Pass UIClient calls through.
2638 * UIProcess/API/mac/WKView.mm:
2639 (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
2640 (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
2641 print info to account for header and footer height as provided by the client.
2642 (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
2643 (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
2644 to do that. Code adapted form WebKit1.
2646 * UIProcess/API/qt/qwkpage:
2647 (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
2649 2011-01-19 Jessie Berlin <jberlin@apple.com>
2651 Reviewed by Darin Adler.
2653 Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
2655 https://bugs.webkit.org/show_bug.cgi?id=52730
2657 WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
2658 called in WebContext::processDidClose. However, m_webContext is only set in the
2659 constructor, which is only called from the constructor of WebContext, so attempting to send
2660 a message to any new WebProcess after the first one died was causing a null deref.
2662 This patch moves setting m_webcontext into clearContext and clearContext is only called in
2663 the WebContext destructor.
2665 This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
2666 the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
2667 attempt to dereference a null WebProcessProxy.
2669 * UIProcess/WebContext.cpp:
2670 (WebKit::WebContext::~WebContext):
2671 Call WebDatabaseManagerProxy::clearContext.
2672 * UIProcess/WebContext.h:
2673 (WebKit::WebContext::hasValidProcess):
2674 Make this method public so that it can be called from WebDatabaseManagerProxy.
2676 * UIProcess/WebDatabaseManagerProxy.cpp:
2677 (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
2678 If there isn't a valid process, invalidate the callback and return early.
2679 (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
2681 (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
2682 If tehre isn't a valid process return early.
2683 (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
2685 (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
2687 (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
2689 (WebKit::WebDatabaseManagerProxy::invalidate):
2690 Move setting m_webContext to 0 from here ...
2691 * UIProcess/WebDatabaseManagerProxy.h:
2692 (WebKit::WebDatabaseManagerProxy::clearContext):
2695 2011-01-19 Anders Carlsson <andersca@apple.com>
2697 Reviewed by Sam Weinig.
2699 Suspend/resume painting as the WKView visibility changes
2700 https://bugs.webkit.org/show_bug.cgi?id=52738
2702 * UIProcess/DrawingAreaProxy.h:
2703 (WebKit::DrawingAreaProxy::visibilityDidChange):
2704 Add new member function. It should really be pure virtual once setPageIsVisible
2707 * UIProcess/DrawingAreaProxyImpl.cpp:
2708 (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
2709 Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
2711 (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2712 Make this a stub; it should really be removed.
2714 * UIProcess/WebPageProxy.cpp:
2715 (WebKit::WebPageProxy::viewStateDidChange):
2716 Call visibilityDidChange.
2718 * UIProcess/WebPageProxy.h:
2719 (WebKit::WebPageProxy::isViewVisible):
2722 * WebProcess/WebPage/DrawingArea.messages.in:
2723 Add SuspendPainting and ResumePainting messages.
2725 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2726 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2727 Initialize m_isPaintingSuspended.
2729 (WebKit::DrawingAreaImpl::suspendPainting):
2730 Set m_isPaintingSuspended to true and stop the display timer.
2732 (WebKit::DrawingAreaImpl::resumePainting):
2733 Set m_isPaintingSuspended to false.
2735 (WebKit::DrawingAreaImpl::scheduleDisplay):
2736 (WebKit::DrawingAreaImpl::display):
2737 Bail if m_isPaintingSuspended is true.
2739 2011-01-19 Andreas Kling <kling@webkit.org>
2741 Reviewed by Simon Hausmann.
2743 [Qt][WK2] Implement formatLocalizedString() for Qt.
2745 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2746 (WebKit::formatLocalizedString):
2748 2011-01-19 Chris Marrin <cmarrin@apple.com>
2750 Reviewed by Simon Fraser.
2752 WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
2753 https://bugs.webkit.org/show_bug.cgi?id=52695
2755 Added a hostingLayer as the parent of the existing drawingLayer.
2756 The hostingLayer is now the root which is passed to the
2757 remote context. It never changes except to track the size
2758 of the window. The backingLayer is now a child of the
2759 hostingLayer, which allow it to switch between tiled and
2762 I also now give back accurate settings for debug borders and
2765 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2766 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
2767 (WebKit::LayerBackedDrawingArea::setSize):
2768 (WebKit::LayerBackedDrawingArea::showDebugBorders):
2769 (WebKit::LayerBackedDrawingArea::showRepaintCounter):
2770 * WebProcess/WebPage/LayerBackedDrawingArea.h:
2771 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2772 (WebKit::LayerBackedDrawingArea::platformInit):
2773 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
2774 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2776 2011-01-19 Anders Carlsson <andersca@apple.com>
2778 Reviewed by Sam Weinig.
2780 Send a new SetSize message if the size differs from the current size
2781 https://bugs.webkit.org/show_bug.cgi?id=52728
2783 * UIProcess/DrawingAreaProxy.h:
2784 (WebKit::DrawingAreaProxy::didSetSize):
2785 Add UpdateInfo parameter.
2787 * UIProcess/DrawingAreaProxy.messages.in:
2788 Add UpdateInfo parameter to the DidSetSize message.
2790 * UIProcess/DrawingAreaProxyImpl.cpp:
2791 (WebKit::DrawingAreaProxyImpl::didSetSize):
2792 If the view size differs from the current size send another SetSize message.
2794 * UIProcess/DrawingAreaProxyImpl.h:
2795 Add UpdateInfo parameter to didSetSize.
2797 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2798 (WebKit::DrawingAreaImpl::setSize):
2799 The DidSetSize message now takes an UpdateInfo parameter.
2801 2011-01-19 Anders Carlsson <andersca@apple.com>
2803 Reviewed by Darin Adler.
2805 Throttle sending of SetSize messages
2806 https://bugs.webkit.org/show_bug.cgi?id=52727
2808 * UIProcess/DrawingAreaProxyImpl.cpp:
2809 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2810 Initialize m_isWaitingForDidSetSize to false.
2812 (WebKit::DrawingAreaProxyImpl::didSetSize):
2813 Null out the backing store.
2815 (WebKit::DrawingAreaProxyImpl::sendSetSize):
2816 If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
2817 to true and send a SetSize message.
2819 * UIProcess/DrawingAreaProxyImpl.h:
2820 Add m_isWaitingForDidSetSize.
2822 2011-01-19 Anders Carlsson <andersca@apple.com>
2824 Reviewed by Darin Adler.
2826 Pass WebPageCreationParameters to DrawingArea::create
2827 https://bugs.webkit.org/show_bug.cgi?id=52726
2829 * WebProcess/WebPage/DrawingArea.cpp:
2830 (WebKit::DrawingArea::create):
2831 * WebProcess/WebPage/DrawingArea.h:
2832 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2833 (WebKit::DrawingAreaImpl::create):
2834 (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2835 * WebProcess/WebPage/DrawingAreaImpl.h:
2836 * WebProcess/WebPage/WebPage.cpp:
2837 (WebKit::WebPage::WebPage):
2838 (WebKit::WebPage::changeAcceleratedCompositingMode):
2840 2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
2842 Reviewed by Laszlo Gombos and Tor Arne Vestbø.
2844 [Qt] Remove unnecessary "../Source" from paths
2845 after moving source files into Source is finished.
2847 * DerivedSources.pro:
2850 2011-01-18 Maciej Stachowiak <mjs@apple.com>
2852 Reviewed by Sam Weinig.
2854 WebKitTestRunner should track loading more like DumpRenderTree
2855 https://bugs.webkit.org/show_bug.cgi?id=52692
2857 Relax the message check in didSaveFrameToPageCache a bit more, since
2858 layout tests were still hitting the old one.
2860 * UIProcess/WebPageProxy.cpp:
2861 (WebKit::isDisconnectedFrame):
2862 (WebKit::WebPageProxy::didSaveFrameToPageCache):
2864 2011-01-18 Brady Eidson <beidson@apple.com>
2866 Reviewed by Darin Adler.
2868 <rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599
2869 UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
2871 * UIProcess/WebPageProxy.cpp:
2872 (WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
2874 2011-01-18 Brady Eidson <beidson@apple.com>
2876 Reviewed by Maciej Stachowiak.
2878 <rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664
2879 Need WebKit2 API to asynchronously get the resource data for a URL
2881 Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
2882 new API to get a resource by URL:
2883 * UIProcess/API/C/WKFrame.cpp:
2884 (WKFrameGetMainResourceData):
2885 (WKFrameGetResourceData):
2886 (callGetResourceDataBlockAndDispose):
2887 (WKFrameGetMainResourceData_b):
2888 (WKFrameGetResourceData_b):
2889 * UIProcess/API/C/WKFrame.h:
2891 Implement the new API in the UIProcess side:
2892 * UIProcess/WebFrameProxy.cpp:
2893 (WebKit::WebFrameProxy::getResourceData):
2894 * UIProcess/WebFrameProxy.h:
2895 * UIProcess/WebPageProxy.cpp:
2896 (WebKit::WebPageProxy::getResourceDataFromFrame):
2897 * UIProcess/WebPageProxy.h:
2899 Have the WebProcess get the data and call back to the UIProcess:
2900 * WebProcess/WebPage/WebPage.cpp:
2901 (WebKit::WebPage::getResourceDataFromFrame):
2902 * WebProcess/WebPage/WebPage.h:
2903 * WebProcess/WebPage/WebPage.messages.in:
2905 2011-01-18 Anders Carlsson <andersca@apple.com>
2907 Reviewed by Dan Bernstein.
2909 Make PageClientImpl::scrollView do hardware blitting
2910 https://bugs.webkit.org/show_bug.cgi?id=52689
2912 * UIProcess/API/mac/PageClientImpl.mm:
2913 (WebKit::PageClientImpl::scrollView):
2914 Clip the scroll rect and scroll the view.
2916 * UIProcess/DrawingAreaProxyImpl.cpp:
2917 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2918 Scroll before painting.
2920 2011-01-18 Anders Carlsson <andersca@apple.com>
2922 Reviewed by Darin Adler.
2924 Artifacts when scrolling with new drawing area
2925 https://bugs.webkit.org/show_bug.cgi?id=52682
2927 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2928 (WebKit::WebChromeClient::scroll):
2929 When scrolling, we want the intersection of the scroll rect and clip rect.
2931 2011-01-18 Anders Carlsson <andersca@apple.com>
2933 Reviewed by Darin Adler.
2935 Use a CGLayer for the backing store when possible
2936 https://bugs.webkit.org/show_bug.cgi?id=52679
2938 * UIProcess/mac/BackingStoreMac.mm:
2939 (WebKit::BackingStore::paint):
2940 If there is a layer, paint it into the given context.
2942 (WebKit::BackingStore::backingStoreContext):
2943 If we can get the containing window graphics context, use it to create a
2944 CGLayer that we'll use for the backing store.
2946 (WebKit::BackingStore::scroll):
2947 Paint the layer into itself.
2949 * UIProcess/mac/WebPageProxyMac.mm:
2950 (WebKit::WebPageProxy::containingWindowGraphicsContext):
2951 Call the page client.
2953 2011-01-18 Anders Carlsson <andersca@apple.com>
2955 Reviewed by Dan Bernstein.
2957 Pass the web page proxy to BackingStore::create
2958 https://bugs.webkit.org/show_bug.cgi?id=52673
2960 * UIProcess/BackingStore.cpp:
2961 (WebKit::BackingStore::create):
2962 Add WebPageProxy parameter.
2964 (WebKit::BackingStore::BackingStore):
2965 Add WebPageProxy parameter.
2967 * UIProcess/BackingStore.h:
2968 Add WebPageProxy member variable.
2970 * UIProcess/DrawingAreaProxyImpl.cpp:
2971 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2972 Pass the web page proxy when creating the backing store.
2974 * UIProcess/mac/BackingStoreMac.mm:
2975 (WebKit::BackingStore::backingStoreContext):
2976 Set the default blend mode.
2978 2011-01-18 Anders Carlsson <andersca@apple.com>
2980 Reviewed by Darin Adler.
2982 Factor code to create the backing store bitmap context out into a new function
2983 https://bugs.webkit.org/show_bug.cgi?id=52670
2985 * UIProcess/BackingStore.h:
2986 * UIProcess/mac/BackingStoreMac.mm:
2987 (WebKit::BackingStore::backingStoreContext):
2988 Create the backing store context.
2990 (WebKit::BackingStore::incorporateUpdate):
2991 Call backingStoreContext.
2993 (WebKit::BackingStore::scroll):
2994 Assert that the context is not null.
2996 2011-01-18 Anders Carlsson <andersca@apple.com>
2998 Reviewed by Dan Bernstein.
3000 Add PageClientImpl::containingWindowGraphicsContext
3001 https://bugs.webkit.org/show_bug.cgi?id=52666
3003 * UIProcess/API/mac/PageClientImpl.h:
3004 * UIProcess/API/mac/PageClientImpl.mm:
3005 (WebKit::PageClientImpl::containingWindowGraphicsContext):
3006 * UIProcess/PageClient.h:
3007 * UIProcess/WebPageProxy.h:
3009 2011-01-18 Damian Kaleta <dkaleta@apple.com>
3011 Reviewed by Sam Weinig.
3013 WK2 methods WKPageScaleWebView and WKPageGetViewScaleFactor need to have consistent names
3014 https://bugs.webkit.org/show_bug.cgi?id=52647
3016 * UIProcess/API/C/WKPage.cpp:
3017 (WKPageSetScaleFactor):
3018 (WKPageGetScaleFactor):
3019 * UIProcess/API/C/WKPage.h:
3021 2011-01-18 Anders Carlsson <andersca@apple.com>
3023 Reviewed by Dan Bernstein.
3025 Ask the web page proxy to scroll the view when needed
3026 https://bugs.webkit.org/show_bug.cgi?id=52665
3028 * UIProcess/DrawingAreaProxyImpl.cpp:
3029 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3030 * UIProcess/WebPageProxy.cpp:
3031 (WebKit::WebPageProxy::scrollView):
3032 * UIProcess/WebPageProxy.h:
3034 2011-01-18 Anders Carlsson <andersca@apple.com>
3038 * UIProcess/win/WebView.cpp:
3039 (WebKit::WebView::scrollView):
3041 2011-01-18 Anders Carlsson <andersca@apple.com>
3043 Reviewed by Sam Weinig.
3045 Add PageClient::scrollView
3046 https://bugs.webkit.org/show_bug.cgi?id=52663
3048 * UIProcess/API/mac/PageClientImpl.h:
3049 * UIProcess/API/mac/PageClientImpl.mm:
3050 (WebKit::PageClientImpl::scrollView):
3051 * UIProcess/API/qt/qwkpage.cpp:
3052 (QWKPagePrivate::scrollView):
3053 * UIProcess/API/qt/qwkpage_p.h:
3054 * UIProcess/PageClient.h:
3055 * UIProcess/win/WebView.cpp:
3056 (WebKit::PageClientImpl::scrollView):
3057 * UIProcess/win/WebView.h:
3059 2011-01-18 Anders Carlsson <andersca@apple.com>
3061 Reviewed by Sam Weinig.
3063 Rename scrollDelta to scrollOffset everywhere.
3065 * Shared/UpdateInfo.cpp:
3066 (WebKit::UpdateInfo::encode):
3067 (WebKit::UpdateInfo::decode):
3068 * Shared/UpdateInfo.h:
3069 * UIProcess/BackingStore.h:
3070 * UIProcess/mac/BackingStoreMac.mm:
3071 (WebKit::BackingStore::incorporateUpdate):
3072 (WebKit::BackingStore::scroll):
3073 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3074 (WebKit::WebChromeClient::scroll):
3075 (WebKit::WebChromeClient::delegatedScrollRequested):
3076 * WebProcess/WebCoreSupport/WebChromeClient.h:
3077 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3078 (WebKit::ChunkedUpdateDrawingArea::scroll):
3079 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3080 * WebProcess/WebPage/DrawingArea.h:
3081 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3082 (WebKit::DrawingAreaImpl::scroll):
3083 (WebKit::DrawingAreaImpl::display):
3084 * WebProcess/WebPage/DrawingAreaImpl.h:
3085 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3086 (WebKit::LayerBackedDrawingArea::scroll):
3087 * WebProcess/WebPage/LayerBackedDrawingArea.h:
3089 2011-01-18 Anders Carlsson <andersca@apple.com>
3091 Reviewed by Sam Weinig.
3093 Get and paint each individual rect in -[WKView drawRect:]
3094 https://bugs.webkit.org/show_bug.cgi?id=52660
3096 * UIProcess/API/mac/WKView.mm:
3097 (-[WKView drawRect:]):
3099 2011-01-18 Anders Carlsson <andersca@apple.com>
3101 Reviewed by Darin Adler.
3103 Assertion when loading two URLs in quick succession
3104 https://bugs.webkit.org/show_bug.cgi?id=52649
3105 <rdar://problem/8764645>
3107 If beginLoad is called twice without didStartProvisionalLoad being called in between,
3108 m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
3110 * WebProcess/WebPage/WebPage.cpp:
3111 (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
3112 Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
3113 if it is not null, since that's valid.
3115 2011-01-18 Anders Carlsson <andersca@apple.com>
3117 Reviewed by Sam Weinig.
3119 Implement NPN_PopUpContextMenu
3120 https://bugs.webkit.org/show_bug.cgi?id=52646
3121 <rdar://problem/8735616>
3123 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3124 (WebKit::NPN_PopUpContextMenu):
3125 Call NetscapePlugin::popUpContextMenu.
3127 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3128 (WebKit::NetscapePlugin::NetscapePlugin):
3129 Initialize m_currentMouseEvent.
3131 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3132 Add m_currentMouseEvent.
3134 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3135 (WebKit::NetscapePlugin::popUpContextMenu):
3136 Convert the coordinates from the current mouse event to screen coordinates and call
3139 (WebKit::NetscapePlugin::platformHandleMouseEvent):
3140 Update m_currentMouseEvent.
3142 2011-01-18 Jessie Berlin <jberlin@apple.com>
3144 Reviewed by Darin Adler.
3146 WebKit2: Do not assert that the provisional and committed URLs cannot be empty/null
3147 https://bugs.webkit.org/show_bug.cgi?id=52641
3149 * UIProcess/WebFrameProxy.cpp:
3150 (WebKit::WebFrameProxy::didStartProvisionalLoad):
3151 (WebKit::WebFrameProxy::didCommitLoad):
3152 (WebKit::WebFrameProxy::didFinishLoad):
3154 2011-01-18 Anders Carlsson <andersca@apple.com>
3156 Reviewed by Sam Weinig.
3158 ASSERT in plug-in code when going to youtube
3159 https://bugs.webkit.org/show_bug.cgi?id=52638
3161 * PluginProcess/PluginControllerProxy.cpp:
3162 (WebKit::PluginControllerProxy::paintEntirePlugin):
3163 Don't try to paint the plug-in if the plug-in frame is empty.
3165 2011-01-18 Anders Carlsson <andersca@apple.com>
3167 Reviewed by Dan Bernstein.
3169 Plug-in hosting WebProcess instances appear in Activity Monitor as WebProcess
3170 https://bugs.webkit.org/show_bug.cgi?id=52635
3171 <rdar://problem/8731337>
3173 * PluginProcess/PluginProcess.cpp:
3174 (WebKit::PluginProcess::initialize):
3175 Call platformInitialize.
3177 * PluginProcess/PluginProcess.h:
3178 Add platformInitialize.
3180 * PluginProcess/mac/PluginProcessMac.mm:
3181 (WebKit::PluginProcess::platformInitialize):
3182 Set the compositing render server port and the visible application name.
3184 * Shared/Plugins/PluginProcessCreationParameters.cpp:
3185 (WebKit::PluginProcessCreationParameters::encode):
3186 (WebKit::PluginProcessCreationParameters::decode):
3187 Encode/decode the parent process name.
3189 * Shared/Plugins/PluginProcessCreationParameters.h:
3190 Add parentProcessName.
3192 * Shared/WebProcessCreationParameters.cpp:
3193 (WebKit::WebProcessCreationParameters::encode):
3194 (WebKit::WebProcessCreationParameters::decode):
3195 Encode/decode the parent process name.
3197 * Shared/WebProcessCreationParameters.h:
3198 Add parentProcessName.
3200 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3201 (WebKit::ProcessLauncher::launchProcess):
3202 Don't pass the parent process name here.
3204 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3205 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
3206 Set the visible name.
3208 * UIProcess/mac/WebContextMac.mm:
3209 (WebKit::WebContext::platformInitializeWebProcess):
3210 Pass along the parent process name.
3212 * WebProcess/mac/WebProcessMac.mm:
3213 (WebKit::WebProcess::platformInitializeWebProcess):
3214 Set the visible name.
3216 * WebProcess/mac/WebProcessMainMac.mm:
3217 (WebKit::WebProcessMain):
3218 Don't set the visible name here. It's done in platformInitializeWebProcess.
3220 2011-01-18 Balazs Kelemen <kbalazs@webkit.org>
3222 Reviewed by Csaba Osztrogonác.
3224 [Qt][WK2] Not implemented warnings should not break layout tests
3225 https://bugs.webkit.org/show_bug.cgi?id=52616
3227 * WebKit2Prefix.h: Define DISABLE_NOT_IMPLEMENTED_WARNINGS on Qt.
3229 2011-01-17 Jon Honeycutt <jhoneycutt@apple.com>
3231 Windows build fix. Unreviewed.
3233 * Shared/PrintInfo.cpp:
3234 Use #include, not #import.
3236 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3238 Actually wrote a FIXME promised for a review comment.
3240 * UIProcess/API/mac/WKView.mm:
3241 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3243 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3245 Reviewed by Anders Carlsson and Darin Adler.
3247 https://bugs.webkit.org/show_bug.cgi?id=52595
3248 Make basic printing work in WebKit2
3250 * Shared/WebPreferencesStore.h:
3251 * UIProcess/API/C/WKPreferences.cpp:
3252 (WKPreferencesSetShouldPrintBackgrounds):
3253 (WKPreferencesGetShouldPrintBackgrounds):
3254 * UIProcess/API/C/WKPreferences.h:
3255 Implement a preference for printing backgrounds.
3257 * Shared/PrintInfo.cpp: Added.
3258 (WebKit::PrintInfo::encode):
3259 (WebKit::PrintInfo::decode):
3260 * Shared/PrintInfo.h: Added.
3261 * Shared/mac/PrintInfoMac.mm: Added.
3262 (WebKit::PrintInfo::PrintInfo):
3263 A new class for passing page setup information down to the web process.
3265 * WebKit2.xcodeproj/project.pbxproj:
3268 * win/WebKit2.vcproj:
3271 * Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
3273 * UIProcess/API/mac/WKView.mm:
3274 (WKViewData): Cache page count and geometry.
3275 (WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
3276 (-[WKView drawRect:]): Added logging.
3277 (setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all
3278 methods invoked for this operation would know what's being printed.
3279 (frameBeingPrinted): Retrieve this data.
3280 (-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
3282 (-[WKView knowsPageRange:]): Ask the web process.
3283 (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3284 Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
3285 to page implementation.
3286 (-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
3287 (-[WKView rectForPage:]): Return a pre-calculated rect.
3289 * UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
3290 printing mode. The UI process controls that.
3292 * UIProcess/WebPageProxy.cpp:
3293 (WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
3294 (WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
3295 (WebKit::WebPageProxy::endPrinting): Ditto.
3296 (WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
3297 (WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
3299 * WebProcess/WebPage/WebPage.cpp:
3300 (WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
3301 (WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
3302 (WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
3303 already in printing mode).
3304 (WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
3305 (WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
3307 (WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
3308 of a page rect. It should really work for onscreen content, but we only need it for printing.
3310 * WebProcess/WebPage/WebPage.h:
3312 * WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
3313 ComputePagesForPrinting and DrawRectToPDF.
3315 2011-01-17 Tony Gentilcore <tonyg@chromium.org>
3317 Reviewed by Alexey Proskuryakov.
3319 Fix some headers with missing or misspelled #ifndef guards
3320 https://bugs.webkit.org/show_bug.cgi?id=52545
3322 * Shared/UserMessageCoders.h:
3323 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3324 * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
3325 * WebProcess/WebProcessMain.h:
3327 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3331 * Platform/Logging.cpp:
3333 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3335 Reviewed by Dan Bernstein.
3337 https://bugs.webkit.org/show_bug.cgi?id=52592
3338 Add a logging channel for WKView
3340 * Platform/Logging.cpp:
3341 * Platform/Logging.h:
3343 2011-01-17 Anders Carlsson <andersca@apple.com>
3345 Reviewed by Sam Weinig.
3347 Factor bitmap context drawing code out into a shared function
3348 https://bugs.webkit.org/show_bug.cgi?id=52589
3350 * Platform/cg/CGUtilities.h: Added.
3351 * Platform/cg/CGUtilities.cpp: Added.
3352 (WebKit::paintBitmapContext):
3353 New function that will paint a bitmap context into a CGContext.
3355 * Shared/cg/ShareableBitmapCG.cpp:
3356 (WebKit::ShareableBitmap::paint):
3357 Use paintBitmapContext.
3359 * UIProcess/mac/BackingStoreMac.mm:
3360 (WebKit::BackingStore::paint):
3361 (WebKit::BackingStore::scroll):
3362 Use paintBitmapContext.
3364 * WebKit2.xcodeproj/project.pbxproj:
3365 * win/WebKit2.vcproj:
3366 * win/WebKit2Common.vsprops:
3367 Add CGUtilities.{cpp|h}.
3369 2011-01-17 Dan Bernstein <mitz@apple.com>
3371 Rubber-stamped by Mark Rowe.
3373 Update xcodeproj svn:ignore to include xcuserdata.
3375 * WebKit2.xcodeproj: Modified property svn:ignore.
3377 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3379 Fixing a typo from a bad merge.
3381 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
3383 2011-01-17 Alexey Proskuryakov <ap@apple.com>
3385 Reviewed by John Sullivan.
3387 https://bugs.webkit.org/show_bug.cgi?id=52590
3388 Should pass a frame into -[WKView canPrintHeadersAndFooters]
3390 * UIProcess/API/mac/WKView.h:
3391 * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
3392 to canChangeFrameLayout.
3394 2011-01-17 Anders Carlsson <andersca@apple.com>
3396 Reviewed by Sam Weinig.
3398 Implement scrolling support
3399 https://bugs.webkit.org/show_bug.cgi?id=52502
3401 * Shared/UpdateInfo.cpp:
3402 (WebKit::UpdateInfo::encode):
3403 (WebKit::UpdateInfo::decode):
3404 * Shared/UpdateInfo.h:
3405 Add scrollRect and scrollDelta member variables.
3407 * UIProcess/BackingStore.h:
3408 Add scroll member function.
3410 * UIProcess/DrawingAreaProxyImpl.cpp:
3411 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3412 Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
3414 * UIProcess/mac/BackingStoreMac.mm:
3415 (WebKit::BackingStore::incorporateUpdate):
3418 (WebKit::BackingStore::scroll):
3419 Paint the backing store into itself.
3421 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3422 (WebKit::DrawingAreaImpl::display):
3423 Pass the scroll information in the update info.
3425 2011-01-17 Andrey Kosyakov <caseq@chromium.org>
3427 Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
3429 * win/WebKit2.vcproj:
3430 * win/WebKit2GeneratedCommon.vsprops:
3431 * win/WebKit2WebProcess.vcproj:
3433 2011-01-17 Pavel Feldman <pfeldman@chromium.org>
3435 Reviewed by Yury Semikhatsky.
3437 Web Inspector: simplify debugger enabling routine.
3438 https://bugs.webkit.org/show_bug.cgi?id=52472
3440 * WebProcess/WebPage/WebInspector.cpp:
3441 (WebKit::WebInspector::startJavaScriptDebugging):
3443 2011-01-17 Balazs Kelemen <kbalazs@webkit.org>
3445 Reviewed by Andreas Kling.
3447 [Qt][WK2] Crash due to double destruction of QSharedMemory
3448 https://bugs.webkit.org/show_bug.cgi?id=52569
3450 Avoid deleting the QSharedMemory twice.
3451 * Platform/qt/SharedMemoryQt.cpp:
3452 (WebKit::SharedMemory::~SharedMemory):
3453 * Shared/qt/CleanupHandler.cpp:
3454 Renamed m_inDeleteObjects to m_hasStartedDeleting and
3455 added a getter for it.
3456 (WebKit::CleanupHandler::CleanupHandler):
3457 (WebKit::CleanupHandler::deleteObjects):
3458 * Shared/qt/CleanupHandler.h:
3459 (WebKit::CleanupHandler::unmark):
3460 (WebKit::CleanupHandler::hasStartedDeleting):
3462 2011-01-15 Adam Barth <abarth@webkit.org>
3464 Rubber-stamped by Eric Seidel.
3466 Move WebKit2 into Source
3467 https://bugs.webkit.org/show_bug.cgi?id=52438
3469 * DerivedSources.pro:
3473 * win/WebKit2.vcproj:
3474 * win/WebKit2WebProcess.vcproj:
3476 2011-01-14 Yuzo Fujishima <yuzo@google.com>
3478 Reviewed by Antti Koivisto.
3480 Rename cache() to memoryCache()
3481 https://bugs.webkit.org/show_bug.cgi?id=52433
3483 * WebProcess/WebProcess.cpp:
3484 (WebKit::WebProcess::shutdownIfPossible):
3485 (WebKit::WebProcess::didClose):
3486 * WebProcess/mac/WebProcessMac.mm:
3487 (WebKit::WebProcess::platformSetCacheModel):
3488 * WebProcess/win/WebProcessWin.cpp:
3489 (WebKit::WebProcess::platformSetCacheModel):
3491 2011-01-13 Geoffrey Garen <ggaren@apple.com>
3493 Reviewed by Oliver Hunt.
3495 Split out a MarkedSpace strategy object from Heap.
3496 https://bugs.webkit.org/show_bug.cgi?id=52421
3498 * Shared/mac/WebMemorySampler.mac.mm:
3499 (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
3501 2011-01-14 Anders Carlsson <andersca@apple.com>
3503 Reviewed by Dan Bernstein.
3505 Add a new PageClient::displayView function and expose it on WebPageProxy
3506 https://bugs.webkit.org/show_bug.cgi?id=52500
3508 * UIProcess/API/mac/PageClientImpl.h:
3509 * UIProcess/API/mac/PageClientImpl.mm:
3510 (WebKit::PageClientImpl::displayView):
3511 * UIProcess/API/qt/qwkpage.cpp:
3512 (QWKPagePrivate::displayView):
3513 * UIProcess/API/qt/qwkpage_p.h:
3514 * UIProcess/PageClient.h:
3515 * UIProcess/WebPageProxy.cpp:
3516 (WebKit::WebPageProxy::displayView):
3517 * UIProcess/WebPageProxy.h:
3518 * UIProcess/win/WebView.cpp:
3519 (WebKit::WebView::displayView):
3520 * UIProcess/win/WebView.h:
3522 2011-01-14 Anders Carlsson <andersca@apple.com>
3524 Reviewed by Sam Weinig.
3526 Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
3527 https://bugs.webkit.org/show_bug.cgi?id=52499
3529 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3530 (WebKit::shouldPaintBoundsRect):
3531 Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
3533 (WebKit::DrawingAreaImpl::display):
3534 If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
3536 2011-01-14 Brian Weinstein <bweinstein@apple.com>
3538 Reviewed by Geoff Garen.
3540 ShouldLoadResourceForFrame should use strings, not URLs.