1 2011-05-27 Stephanie Lewis <slewis@apple.com>
3 Rubber Stamped by Adam Roben.
5 Add Order File. Use -order_file flag since it can order more of the binary.
7 * Configurations/Base.xcconfig:
8 * mac/WebKit2.order: Added.
10 2011-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
12 Reviewed by Martin Robinson.
14 [CAIRO] Don't copy the surface before drawing it into the context in ShareableBitmap::paint()
15 https://bugs.webkit.org/show_bug.cgi?id=60757
17 cairo_image_surface_create_for_data() is already a shallow copy of
18 the image, so we don't need to copy it again.
20 * Shared/cairo/ShareableBitmapCairo.cpp:
21 (WebKit::ShareableBitmap::paint):
23 2011-05-26 Jeff Miller <jeffm@apple.com>
25 Reviewed by Alexey Proskuryakov.
27 Add a key handling logging channel for WebKit2
28 https://bugs.webkit.org/show_bug.cgi?id=61588
30 Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
31 I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
33 * Platform/Logging.cpp:
34 (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
35 * Platform/Logging.h: Added LogKeyHandling channel.
37 * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
38 (WebKit::webKeyboardEventTypeString): Added to support logging.
39 (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
40 (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
42 2011-05-26 Chris Fleizach <cfleizach@apple.com>
44 Reviewed by Darin Adler.
46 Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedTextMarkerRange of nil
47 https://bugs.webkit.org/show_bug.cgi?id=61492
49 The method for determining which WebPage is actually focused and foreground was faulty. More
50 extensive checks are required to check which WebPage should be returned as the focusable one.
52 * WebProcess/WebPage/WebPage.cpp:
53 (WebKit::WebPage::windowIsFocused):
55 2011-05-26 Jon Lee <jonlee@apple.com>
57 Reviewed by Darin Adler.
59 REGRESSION (5.0.5-Jazz): Transition to full screen video animates in wrong location when scrolled (61559)
60 https://bugs.webkit.org/show_bug.cgi?id=61559
61 <rdar://problem/9496054>
63 The CALayer that gets animated has a position that is offset by the scroll position of the web view. To
64 fix this, we set the destination location based on the rect of the full screen, and add a position
65 animation which keeps the position of the layer centered. This prevents glitches if others
66 are trying to change the layer position while the animation is running.
68 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Refactor the calculation of the CALayer windowed
69 position into a private helper function, as well as the animation setup.
70 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
71 (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
72 (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
73 (WebKit::WebFullScreenManagerMac::animateFullScreen): Sets up the zoom animation, and the position offset
75 (WebKit::WebFullScreenManagerMac::windowedCGTransform): Calculates the placement of the windowed layer
76 in screen coordinates.
78 2011-05-26 Qi Zhang <qi.2.zhang@nokia.com>
80 Reviewed by Andreas Kling.
82 WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
83 https://bugs.webkit.org/show_bug.cgi?id=42676
85 Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
87 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
88 (WKBundleSetAuthorAndUserStylesEnabled):
89 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
90 * WebProcess/InjectedBundle/InjectedBundle.cpp:
91 (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled):
92 * WebProcess/InjectedBundle/InjectedBundle.h:
94 2011-05-25 Brian Weinstein <bweinstein@apple.com>
96 Reviewed by Adam Roben.
98 WebKit2: Status bar, toolbar, and menu bar checks should be in the injected bundle
99 https://bugs.webkit.org/show_bug.cgi?id=61474
100 <rdar://problem/9468337>
102 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
103 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
104 (WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Call the function on the client
106 (WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto.
107 (WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto.
108 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
109 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
110 (WebKit::WebChromeClient::statusbarVisible): Add a possible short-circuit in the injected bundle.
111 (WebKit::WebChromeClient::menubarVisible): Ditto.
112 (WebKit::WebChromeClient::toolbarsVisible): Ditto.
114 2011-05-26 Steve Falkenburg <sfalken@apple.com>
116 Reviewed by Adam Roben.
118 WebKit2 bundle missing localization subdirectories
119 https://bugs.webkit.org/show_bug.cgi?id=61512
121 Better fix for this. We just need to specify CFBundleAllowMixedLocalizations.
123 * win/WebKit2WebProcess.resources/English.lproj: Removed.
124 * win/WebKit2WebProcess.resources/Info.plist:
125 * win/WebKit2WebProcess.resources/da.lproj: Removed.
126 * win/WebKit2WebProcess.resources/de.lproj: Removed.
127 * win/WebKit2WebProcess.resources/es.lproj: Removed.
128 * win/WebKit2WebProcess.resources/fi.lproj: Removed.
129 * win/WebKit2WebProcess.resources/fr.lproj: Removed.
130 * win/WebKit2WebProcess.resources/it.lproj: Removed.
131 * win/WebKit2WebProcess.resources/ja.lproj: Removed.
132 * win/WebKit2WebProcess.resources/ko.lproj: Removed.
133 * win/WebKit2WebProcess.resources/nb.lproj: Removed.
134 * win/WebKit2WebProcess.resources/nl.lproj: Removed.
135 * win/WebKit2WebProcess.resources/pl.lproj: Removed.
136 * win/WebKit2WebProcess.resources/pt.lproj: Removed.
137 * win/WebKit2WebProcess.resources/pt_PT.lproj: Removed.
138 * win/WebKit2WebProcess.resources/ru.lproj: Removed.
139 * win/WebKit2WebProcess.resources/sv.lproj: Removed.
140 * win/WebKit2WebProcess.resources/zh_CN.lproj: Removed.
141 * win/WebKit2WebProcess.resources/zh_TW.lproj: Removed.
143 2011-05-26 Steve Falkenburg <sfalken@apple.com>
145 Reviewed by Adam Roben.
147 WebKit2 bundle missing localization subdirectories
148 https://bugs.webkit.org/show_bug.cgi?id=61512
149 <rdar://problem/9498607>
151 These lproj directories are intentionally left empty.
152 Their presence indicates that this exe is localized to this
155 * win/WebKit2WebProcess.resources/English.lproj: Added.
156 * win/WebKit2WebProcess.resources/da.lproj: Added.
157 * win/WebKit2WebProcess.resources/de.lproj: Added.
158 * win/WebKit2WebProcess.resources/es.lproj: Added.
159 * win/WebKit2WebProcess.resources/fi.lproj: Added.
160 * win/WebKit2WebProcess.resources/fr.lproj: Added.
161 * win/WebKit2WebProcess.resources/it.lproj: Added.
162 * win/WebKit2WebProcess.resources/ja.lproj: Added.
163 * win/WebKit2WebProcess.resources/ko.lproj: Added.
164 * win/WebKit2WebProcess.resources/nb.lproj: Added.
165 * win/WebKit2WebProcess.resources/nl.lproj: Added.
166 * win/WebKit2WebProcess.resources/pl.lproj: Added.
167 * win/WebKit2WebProcess.resources/pt.lproj: Added.
168 * win/WebKit2WebProcess.resources/pt_PT.lproj: Added.
169 * win/WebKit2WebProcess.resources/ru.lproj: Added.
170 * win/WebKit2WebProcess.resources/sv.lproj: Added.
171 * win/WebKit2WebProcess.resources/zh_CN.lproj: Added.
172 * win/WebKit2WebProcess.resources/zh_TW.lproj: Added.
173 * win/WebKit2WebProcessPostBuild.cmd: Copy entire resources directory, exclude .svn directories.
174 * win/xcopy.excludes: Added. Excludes .svn directories.
176 2011-05-25 Qi Zhang <qi.2.zhang@nokia.com>
178 Reviewed by Simon Hausmann.
180 WebKitTestRunner needs layoutTestController.setPrivateBrowsingEnabled
181 https://bugs.webkit.org/show_bug.cgi?id=42697
183 Implemented layoutTestController.setPrivateBrowsingEnabled for WebKitTestRunner.
185 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
186 (WKBundleSetPrivateBrowsingEnabled):
187 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
188 * WebProcess/InjectedBundle/InjectedBundle.cpp:
189 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
190 * WebProcess/InjectedBundle/InjectedBundle.h:
192 2011-05-25 Mark Rowe <mrowe@apple.com>
194 Reviewed by Sam Weinig.
196 <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
198 Add WKBundleIsProcessingUserGesture.
200 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
201 (WKBundleIsPageBoxVisible):
202 (WKBundleIsProcessingUserGesture):
203 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
204 * WebProcess/InjectedBundle/InjectedBundle.cpp:
205 (WebKit::InjectedBundle::isProcessingUserGesture):
206 * WebProcess/InjectedBundle/InjectedBundle.h:
208 2011-05-24 Jer Noble <jer.noble@apple.com>
210 Reviewed by Darin Adler.
212 Video fails to play on Vimeo
213 https://bugs.webkit.org/show_bug.cgi?id=61403
215 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
216 (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and
217 wkQTMovieResolvedURL.
219 2011-05-25 Jon Honeycutt <jhoneycutt@apple.com>
221 REGRESSION (WebKit2): Crash in Flash on USA Today photo gallery
222 https://bugs.webkit.org/show_bug.cgi?id=61428
223 <rdar://problem/9457006>
225 Reviewed by Adam Roben.
227 The crash occurs when Flash posts a message to a window that it
228 creates, and in processing the message, it calls NPN_Evaluate to
229 evaluate JavaScript that removes the plug-in from the page. Flash then
230 crashes when we return to Flash code.
232 * Platform/WorkItem.h:
233 (DerefWorkItem::DerefWorkItem):
235 (DerefWorkItem::execute):
237 (WorkItem::createDeref):
238 Create and return a DerefWorkItem.
240 * WebProcess/Plugins/PluginView.cpp:
241 (WebKit::PluginView::unprotectPluginFromDestruction):
242 If the PluginView has only one reference left, deref it asynchronously.
244 2011-05-25 Dan Bernstein <mitz@apple.com>
246 Reviewed by Anders Carlsson.
248 <rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
249 https://bugs.webkit.org/show_bug.cgi?id=61448
251 * WebProcess/Plugins/PluginView.cpp:
252 (WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
253 after intersecting the two rectangles.
255 2011-05-24 Timothy Hatcher <timothy@apple.com>
257 Make the Web Inspector bring the right window to the front when docked.
259 rdar://problem/9464685
260 https://webkit.org/b/61420
262 Reviewed by Brian Weinstein.
264 * UIProcess/mac/WebInspectorProxyMac.mm:
265 (WebKit::WebInspectorProxy::platformBringToFront): Order front the parent window of the Inspector's WKView.
266 * UIProcess/win/WebInspectorProxyWin.cpp:
267 (WebKit::WebInspectorProxy::platformBringToFront): Ditto.
269 2011-05-24 Keishi Hattori <keishi@webkit.org>
271 Reviewed by Kent Tamura.
273 Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
274 https://bugs.webkit.org/show_bug.cgi?id=61273
276 * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
278 2011-05-24 Maciej Stachowiak <mjs@apple.com>
280 Reviewed by Dan Bernstein.
282 Update the WebProcess sandbox exceptions to silence warnings for a file that is accessed uselessly
283 https://bugs.webkit.org/show_bug.cgi?id=61349
284 <rdar://problem/9476255>
286 * WebProcess/com.apple.WebProcess.sb:
288 2011-05-24 Mark Rowe <mrowe@apple.com>
290 Fix the 32-bit build.
292 Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType,
293 as this is declared as different underlying types in 32- and 64-bit (unsigned long
296 * Shared/mac/KeychainAttribute.cpp:
300 2011-05-24 Sam Weinig <sam@webkit.org>
302 Reviewed by Maciej Stachowiak.
304 Enable coalesced wheel events
305 <rdar://problem/9444786>
307 * UIProcess/WebPageProxy.cpp:
308 Flip the switch for coalescing wheel events rather than dropping them.
310 2011-05-24 Sam Weinig <sam@webkit.org>
312 Reviewed by Maciej Stachowiak.
314 Additional sandbox extension required for quarantine database
315 <rdar://problem/9397494>
316 https://bugs.webkit.org/show_bug.cgi?id=61405
318 * WebProcess/com.apple.WebProcess.sb:
319 Add read-data access for ~/Library/Preferences.
321 2011-05-24 Michael Saboff <msaboff@apple.com>
323 Reviewed by Geoffrey Garen.
325 Improve handling in WebCore of low memory situations
326 https://bugs.webkit.org/show_bug.cgi?id=61222
328 Added call to enable memory pressure handling for Mac case.
330 * WebProcess/WebProcess.cpp:
331 (WebKit::WebProcess::initializeWebProcess):
332 * WebProcess/WebProcess.h:
333 * WebProcess/mac/WebProcessMac.mm:
334 (WebKit::WebProcess::platformInitializeWebProcess):
336 2011-05-24 Brady Eidson <beidson@apple.com>
338 Reviewed by Darin Adler.
340 Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
341 Should shim a few SecKeychainItem* methods on SnowLeopard
343 Initialize the KeychainItem shim on SnowLeopard:
344 * WebProcess/mac/WebProcessMac.mm:
345 (WebKit::WebProcess::initializeShim):
347 On SnowLeopard, shim the 4 SecKeychainItem methods:
348 * WebProcess/mac/WebProcessShim.h:
349 * WebProcess/mac/WebProcessShim.mm:
350 (WebKit::shimSecKeychainItemCopyContent):
351 (WebKit::shimSecKeychainItemCreateFromContent):
352 (WebKit::shimSecKeychainItemModifyContent):
353 (WebKit::shimSecKeychainItemFreeContent):
354 (WebKit::WebKitWebProcessKeychainItemShimInitialize):
356 * WebProcess/mac/KeychainItemShimMethods.h: Added.
357 * WebProcess/mac/KeychainItemShimMethods.mm: Added.
358 Manage a set of shim-controlled AttributeList data:
359 (WebKit::shimManagedAttributeLists):
360 (WebKit::freeAttributeListContents):
361 (WebKit::allocateAttributeListContents):
363 Manage a set of shim-controlled KeychainItem data:
364 (WebKit::shimManagedKeychainItemContents):
365 (WebKit::allocateKeychainItemContentData):
367 Free any shim-controlled AttributeList or KeychainItem data:
368 (WebKit::webFreeAttributeListContentOnMainThread):
369 (WebKit::webFreeAttributeListContent):
370 (WebKit::webFreeKeychainItemContentOnMainThread):
371 (WebKit::webFreeKeychainItemContent):
373 Marshall these 3 KeychainItem methods to the UIProcess:
374 (WebKit::webSecKeychainItemCopyContentOnMainThread):
375 (WebKit::webSecKeychainItemCopyContent):
376 (WebKit::webSecKeychainItemCreateFromContentOnMainThread):
377 (WebKit::webSecKeychainItemCreateFromContent):
378 (WebKit::webSecKeychainItemModifyContentOnMainThread):
379 (WebKit::webSecKeychainItemModifyContent):
380 (WebKit::initializeKeychainItemShim):
382 Container for an AttributeList entry that knows how to encode/decode:
383 * Shared/mac/KeychainAttribute.cpp: Added.
384 (WebKit::KeychainAttribute::KeychainAttribute):
387 * Shared/mac/KeychainAttribute.h: Added.
389 Container for the relevant arguments to the shimmed methods, to send to the UIProcess:
390 * Shared/mac/SecKeychainItemRequestData.cpp: Added.
391 (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
392 (WebKit::SecKeychainItemRequestData::initializeWithAttributeList):
393 (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
394 (WebKit::SecKeychainItemRequestData::attributeList):
395 (WebKit::SecKeychainItemRequestData::encode):
396 (WebKit::SecKeychainItemRequestData::decode):
397 * Shared/mac/SecKeychainItemRequestData.h: Added.
398 (WebKit::SecKeychainItemRequestData::keychainItem):
399 (WebKit::SecKeychainItemRequestData::itemClass):
400 (WebKit::SecKeychainItemRequestData::length):
401 (WebKit::SecKeychainItemRequestData::data):
403 Container for the possible output from the shimmed methods, to send back to the WebProcess:
404 * Shared/mac/SecKeychainItemResponseData.cpp: Added.
405 (WebKit::SecKeychainItemResponseData::SecKeychainItemResponseData):
406 (WebKit::SecKeychainItemResponseData::encode):
407 (WebKit::SecKeychainItemResponseData::decode):
408 * Shared/mac/SecKeychainItemResponseData.h: Added.
409 (WebKit::SecKeychainItemResponseData::itemClass):
410 (WebKit::SecKeychainItemResponseData::data):
411 (WebKit::SecKeychainItemResponseData::resultCode):
412 (WebKit::SecKeychainItemResponseData::attributes):
413 (WebKit::SecKeychainItemResponseData::keychainItem):
415 Actually implement the calls to the SecKeychainItem* methods in the UIProcess:
416 * UIProcess/WebProcessProxy.h:
417 * UIProcess/WebProcessProxy.messages.in:
418 * UIProcess/mac/WebProcessProxyMac.mm:
419 (WebKit::WebProcessProxy::secKeychainItemCopyContent):
420 (WebKit::WebProcessProxy::secKeychainItemCreateFromContent):
421 (WebKit::WebProcessProxy::secKeychainItemModifyContent):
423 * WebKit2.xcodeproj/project.pbxproj: Project file stuff
424 * Configurations/Shim.xcconfig:
426 2011-05-24 Jay Civelli <jcivelli@chromium.org>
428 Rubberstamped by David Kilzer.
430 Updated some files that I forgot in my previous MHTML CL.
432 * Configurations/FeatureDefines.xcconfig:
434 2011-05-24 Sam Weinig <sam@webkit.org>
436 Clean up after Geoff and fix the WebKit2 build.
438 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
440 2011-05-24 Adam Roben <aroben@apple.com>
442 Invalidate JSNPObjects when they are finalized
444 This will cause the underlying NPObject to be released at finalization time, rather than at
445 destruction time (which is unpredictable and could occur after the plugin has been
448 Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
450 Fixes <http://webkit.org/b/61316> <rdar://problem/9489824> Crash in deallocateNPObject when
451 reloading yahoo.com webarchive in WebKit2
453 Reviewed by Oliver Hunt.
455 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
456 (WebKit::JSNPObject::~JSNPObject): Assert that we've already been invalidated, rather than
457 trying to perform invalidation now (when the plugin might already be unloaded).
459 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
460 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
461 (WebKit::NPRuntimeObjectMap::invalidate):
462 Updated for m_jsNPObjects type change.
464 (WebKit::NPRuntimeObjectMap::finalize): Added. Invalidates the JSNPObject and removes it
467 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Now inherits from WeakHandleOwner.
468 Changed m_jsNPObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will be
469 notified when the JSNPObjects are finalized.
471 2011-05-24 Qi Zhang <qi.2.zhang@nokia.com>
473 Reviewed by Adam Roben.
475 WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
476 https://bugs.webkit.org/show_bug.cgi?id=42669
478 Fixes a typo issue for patch 94265.
480 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
481 (WKBundleSetJavaScriptCanAccessClipboard):
483 2011-05-24 Sam Weinig <sam@webkit.org>
485 Reviewed by John Sullivan.
487 WebKit tells client that the page has become unresponsive while the beforeUnloadConfirm dialog is up
488 https://bugs.webkit.org/show_bug.cgi?id=61372
490 * UIProcess/WebPageProxy.cpp:
491 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
492 Stop the unresponsiveness timer like we do for other client functions that spin a
495 2011-05-24 Andreas Kling <kling@webkit.org>
497 Reviewed by Simon Hausmann.
499 [WK2] Change TiledDrawingArea to use ShareableBitmap instead of UpdateChunk.
500 https://bugs.webkit.org/show_bug.cgi?id=61296
502 Pass UpdateInfo containing ShareableBitmaps instead of UpdateChunk for tile updates.
503 Only the bounds rect and bitmap handle in the UpdateInfo are used since none of the
504 other parameters are needed for TiledDrawingArea.
506 * Shared/ShareableBitmap.h:
507 * Shared/qt/ShareableBitmapQt.cpp:
508 (WebKit::ShareableBitmap::createQImage):
509 (WebKit::ShareableBitmap::createGraphicsContext):
510 (WebKit::ShareableBitmap::paint):
511 * Shared/qt/UpdateChunk.cpp: Removed.
512 * Shared/qt/UpdateChunk.h: Removed.
513 * UIProcess/TiledDrawingAreaProxy.cpp:
514 (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
515 (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
516 * UIProcess/TiledDrawingAreaProxy.h:
517 * UIProcess/TiledDrawingAreaTile.h:
518 * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
519 (WebKit::TiledDrawingAreaProxy::snapshotTaken):
520 * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
521 (WebKit::TiledDrawingAreaTile::incorporateUpdate):
523 * WebProcess/WebPage/TiledDrawingArea.cpp:
524 (WebKit::TiledDrawingArea::updateTile):
525 (WebKit::TiledDrawingArea::didReceiveMessage):
526 * WebProcess/WebPage/TiledDrawingArea.h:
527 * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
528 (WebKit::TiledDrawingArea::paintIntoBitmap):
530 2011-05-24 Brady Eidson <beidson@apple.com>
532 Build fix after r87153
534 * WebProcess/mac/SecItemShimMethods.mm: Don't compile this code on SnowLeopard.
536 2011-05-23 Brady Eidson <beidson@apple.com>
538 Reviewed by Sam Weinig.
540 Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
541 Should shim a few SecKeychainItem* methods on SnowLeopard
543 In preparation for different WebProcess shims depending on platform, move the current
544 shim to its own files.
546 * WebKit2.xcodeproj/project.pbxproj:
548 * WebProcess/mac/WebProcessMac.mm:
549 (WebKit::WebProcess::initializeShim): For non-SnowLeopard platforms, call initializeSecItemShim().
551 * WebProcess/mac/SecItemShimMethods.h: Added.
552 * WebProcess/mac/SecItemShimMethods.mm: Added. Actual webSecItem* methods moved from WebProcessMac.mm.
553 (WebKit::webSecItemCopyMatchingMainThread):
554 (WebKit::webSecItemCopyMatching):
555 (WebKit::webSecItemAddOnMainThread):
556 (WebKit::webSecItemAdd):
557 (WebKit::webSecItemUpdateOnMainThread):
558 (WebKit::webSecItemUpdate):
559 (WebKit::webSecItemDeleteOnMainThread):
560 (WebKit::webSecItemDelete):
561 (WebKit::initializeSecItemShim): Initialize the callbacks via WebKitWebProcessSecItemShimInitialize
563 * WebProcess/mac/WebProcessShim.h:
564 * WebProcess/mac/WebProcessShim.mm: Wrap all the actual code here in a !BUILDING_ON_SNOW_LEOPARD block
565 (WebKit::shimSecItemCopyMatching):
566 (WebKit::shimSecItemAdd):
567 (WebKit::shimSecItemUpdate):
568 (WebKit::shimSecItemDelete):
569 (WebKit::WebKitWebProcessSecItemShimInitialize):
571 2011-05-23 Anders Carlsson <andersca@apple.com>
573 Reviewed by Sam Weinig.
575 Cap painting to 30fps on Windows
576 https://bugs.webkit.org/show_bug.cgi?id=61337
577 <rdar://problem/9213388>
579 * WebProcess/WebPage/DrawingAreaImpl.cpp:
580 (WebKit::DrawingAreaImpl::displayTimerFired):
582 2011-05-23 Jeremy Noble <jer.noble@apple.com>
584 Reviewed by Darin Adler.
586 REGRESSION (r86990:86992): World leak when all windows closed
587 https://bugs.webkit.org/show_bug.cgi?id=61311
589 Three interlocking problems:
591 1) Calling [WKView fullScreenController] will create the controller if it doesn't all ready
592 exist, so move the closing code into WKView, where we can bail early if there isn't a
595 2) A retain-cycle exists between WKView and WKFullScreenWindowController. Make sure to break
596 the cycle explicitly by clearing the _fullScreenWindowController ivar when closing the
599 3) [NSWindowController close] was overridden without calling [super close]. Do that.
601 * UIProcess/API/mac/WKView.mm:
602 (-[WKView closeFullScreenWindowController]): Moved here from WebFullScreenManagerProxyMac.mm.
603 * UIProcess/API/mac/WKViewInternal.h:
604 * UIProcess/mac/WKFullScreenWindowController.mm:
605 (-[WKFullScreenWindowController close]): Call [super close].
606 * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
607 (WebKit::WebFullScreenManagerProxy::invalidate):
609 2011-05-20 Jer Noble <jer.noble@apple.com>
611 Reviewed by Darin Adler.
613 Video looks squished when animating to full screen.
614 https://bugs.webkit.org/show_bug.cgi?id=61220
616 Instead of scaling between the client sizes of the full-screen element before and after
617 entering full-screen, scale between their content boxes. The difference is that the client
618 sizes can have different aspect ratios, and thus the animation can end up "squishing" the
619 content at one end of the animation. When animating between the two content box sizes, their
620 aspect ratios (for the case of video) are equal, so the animation will appear to scale
621 smoothly between the two states without "squishing" the content.
623 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
624 (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Set the destination frame
625 to be the content box of the current full screen element.
626 (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
628 2011-05-23 Sam Weinig <sam@webkit.org>
630 Reviewed by Darin Adler.
632 Terminating a WebProcess should work even while a page is being closed
633 <rdar://problem/8934632>
634 https://bugs.webkit.org/show_bug.cgi?id=61299
636 * UIProcess/WebPageProxy.cpp:
637 (WebKit::WebPageProxy::terminateProcess):
638 Change validity check to only check for process validity, since terminating the process of a page that
639 is closed or is closing is acceptable behavior.
641 2011-05-23 Jessie Berlin <jberlin@apple.com>
643 Reviewed by Darin Adler.
645 [Windows] Initial Cookie Accept Policy not set on Deserialized Storage Session.
646 https://bugs.webkit.org/show_bug.cgi?id=61255
648 * WebProcess/win/WebProcessWin.cpp:
649 (WebKit::WebProcess::platformInitializeWebProcess):
650 Move the code to set the cookie policy before the early return that is taken when using the
651 default storage session from the UI Process.
652 Also, remove unnecessary #ifdefs (USE(CFURLSTORAGESESSIONS) is true if USE(CFNETWORK) is
653 true) and add a comment explaining the early return.
655 2011-05-23 Qi Zhang <qi.2.zhang@nokia.com>
657 Reviewed by Darin Adler.
659 WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
660 https://bugs.webkit.org/show_bug.cgi?id=42669
662 Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.
664 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
665 (WKBundleSetJavaScriptCanAccessClipboard):
666 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
667 * WebProcess/InjectedBundle/InjectedBundle.cpp:
668 (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard):
669 * WebProcess/InjectedBundle/InjectedBundle.h:
671 2011-05-23 Csaba Osztrogonác <ossy@webkit.org>
673 [Qt][WK2] Unreviewed trivial fix after r86990.
675 * WebKit2.pro: Remove UIProcess/ChunkedUpdateDrawingAreaProxy.h.
677 2011-05-23 Carlos Garcia Campos <cgarcia@igalia.com>
679 Unreviewed. Fix WebKit2 GTK build after r86990.
681 * GNUmakefile.am: Remove UpdateChunk.cpp and UpdateChunk.h.
683 2011-05-21 John Sullivan <sullivan@apple.com>
685 Reviewed by Darin Adler.
687 https://bugs.webkit.org/show_bug.cgi?id=61244
688 <rdar://problem/9482856>
689 Undo operations for a web page linger after page is destroyed
691 * UIProcess/WebPageProxy.cpp:
692 (WebKit::WebPageProxy::closePage):
693 Clear editing commands before telling UI client to close the page (this must be done
694 while the page is still in a window so its undo manager can be accessed, so waiting
695 for WebPageProxy::close() is too late).
697 2011-05-22 Jeff Miller <jeffm@apple.com>
699 Reviewed by Darin Adler.
701 Don't call WebKit::initializeLogChannelsIfNecessary if logging is disabled
702 https://bugs.webkit.org/show_bug.cgi?id=61249
704 * UIProcess/WebContext.cpp:
705 (WebKit::WebContext::WebContext): Check #if !LOG_DISABLED, not #ifndef NDEBUG, to decide whether to call WebKit::initializeLogChannelsIfNecessary().
707 2011-05-21 Nancy Piedra <nancy.piedra@nokia.com>
709 Reviewed by Andreas Kling.
711 [Qt][Symbian] WKStringCopyQString function is not exported
712 https://bugs.webkit.org/show_bug.cgi?id=59285
714 A few functions were declared twice but without the export macro.
715 On Symbian, the linking failed when trying to reference these functions.
717 * UIProcess/API/qt/qgraphicswkview.h:
719 2011-05-21 Jeremy Noble <jer.noble@apple.com>
721 Reviewed by Eric Carlson.
723 WebKit2: fix failing fullscreen/full-screen-remove* tests.
724 https://bugs.webkit.org/show_bug.cgi?id=61027
726 * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
727 (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Call the
728 exit functions (was calling the enter functions).
730 2011-05-20 Jeremy Noble <jer.noble@apple.com>
732 Reviewed by Mark Rowe.
734 Crash in WebFullScreenManager::didExitFullScreen when closing a window in Safari.
735 https://bugs.webkit.org/show_bug.cgi?id=61228
737 Do not attempt to exit full screen if we aren't in full screen to begin with, as the WebProcess
738 won't be expecting will/didExitFullScreen notifications.
740 * UIProcess/mac/WKFullScreenWindowController.mm:
741 (-[WKFullScreenWindowController close]):
743 2011-05-20 Andy Estes <aestes@apple.com>
745 Reviewed by Darin Adler.
747 WebView loses firstResponder status when entering full-screen mode.
748 https://bugs.webkit.org/show_bug.cgi?id=61153
750 * UIProcess/mac/WKFullScreenWindowController.mm:
751 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): If
752 the WebView was a descendant of the browser window's first responder
753 when entering full-screen mode, set the full-screen window's first
754 responder to that same NSResponder.
755 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Do the
756 reverse of what is done in finishedEnterFullScreenAnimation:.
758 2011-05-20 Jeremy Noble <jer.noble@apple.com>
760 Reviewed by Maciej Stachowiak.
762 WebKit2: Exit full screen mode if the WebProcess crashes.
763 https://bugs.webkit.org/show_bug.cgi?id=61151
765 If the WebProcess crashes, exit full-screen mode to avoid getting stuck. Move the
766 WebFullScreenManagerProxy::invalidate() implementation into the platform-specific
767 files, and have them close their respective platform's full-screen window.
769 * UIProcess/WebFullScreenManagerProxy.cpp:
770 * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
771 (WebKit::WebFullScreenManagerProxy::invalidate): Added. Copied from main implementation.
772 * UIProcess/mac/WKFullScreenWindowController.h:
773 * UIProcess/mac/WKFullScreenWindowController.mm:
774 (-[WKFullScreenWindowController close]): Added.
775 * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
776 (WebKit::WebFullScreenManagerProxy::invalidate): Added.
777 * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
778 (WebKit::WebFullScreenManagerProxy::invalidate): Added.
780 2011-05-20 Anders Carlsson <andersca@apple.com>
782 Reviewed by Dan Bernstein.
784 Remove the chunked update drawing area
785 https://bugs.webkit.org/show_bug.cgi?id=61216
787 The chunked update drawing area is no longer used in any port, so remove all traces of it.
789 Qt still uses UpdateChunks for the tiled drawing area so keep the Shared/qt/UpdateChunk.* classes for now.
792 * Shared/DrawingAreaInfo.h:
793 * Shared/gtk/UpdateChunk.cpp: Removed.
794 * Shared/gtk/UpdateChunk.h: Removed.
795 * Shared/mac/UpdateChunk.cpp: Removed.
796 * Shared/mac/UpdateChunk.h: Removed.
797 * Shared/win/UpdateChunk.cpp: Removed.
798 * Shared/win/UpdateChunk.h: Removed.
799 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: Removed.
800 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed.
801 * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Removed.
802 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: Removed.
803 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Removed.
804 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: Removed.
805 * UIProcess/win/WebView.cpp:
806 (WebKit::WebView::paint):
807 (WebKit::WebView::createDrawingAreaProxy):
808 (WebKit::WebView::enterAcceleratedCompositingMode):
809 (WebKit::WebView::exitAcceleratedCompositingMode):
811 * WebKit2.xcodeproj/project.pbxproj:
812 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: Removed.
813 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: Removed.
814 * WebProcess/WebPage/DrawingArea.cpp:
815 (WebKit::DrawingArea::create):
816 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: Removed.
817 * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Removed.
818 * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp: Removed.
819 * win/WebKit2.vcproj:
821 2011-05-20 Matthew Delaney <mdelaney@apple.com>
823 Reviewed by Steve Falkenburg.
825 Default min DOM Timer interval is not set soon enough for first page to pick it up in WK2
826 https://bugs.webkit.org/show_bug.cgi?id=61215
828 * WebProcess/WebPage/WebPage.cpp: Simply moving the DOM min timer interval setting to before the first page creation.
830 2011-05-20 Simon Fraser <simon.fraser@apple.com>
832 Reviewed by Sam Weinig.
834 numberOfActiveAnimations() can include animations from documents in the page cache
835 https://bugs.webkit.org/show_bug.cgi?id=53641
837 Pass the Frame's document as the one to count animations on.
839 * WebProcess/WebPage/WebFrame.cpp:
840 (WebKit::WebFrame::numberOfActiveAnimations):
842 2011-05-20 Simon Fraser <simon.fraser@apple.com>
844 Reviewed by Sam Weinig.
846 WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
847 https://bugs.webkit.org/show_bug.cgi?id=42550
849 Plumb through methods to pause a transition of a given property on an element.
851 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
852 (WKBundleFramePauseAnimationOnElementWithId):
853 (WKBundleFramePauseTransitionOnElementWithId):
854 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
855 * WebProcess/WebPage/WebFrame.cpp:
856 (WebKit::WebFrame::pauseTransitionOnElementWithId):
857 * WebProcess/WebPage/WebFrame.h:
859 2011-05-20 Sam Weinig <sam@webkit.org>
861 Reviewed by Anders Carlsson.
863 WebKit2: Media files cannot be saved in the Application Cache due to a sandbox violation
864 https://bugs.webkit.org/show_bug.cgi?id=61199
866 Instead of using a sandbox extension to give permission to the application cache directory,
867 initialize the sandbox with access to it like we do for other databases.
869 * Shared/WebProcessCreationParameters.cpp:
870 (WebKit::WebProcessCreationParameters::encode):
871 (WebKit::WebProcessCreationParameters::decode):
872 * Shared/WebProcessCreationParameters.h:
873 * UIProcess/WebContext.cpp:
874 (WebKit::WebContext::ensureWebProcess):
875 * WebProcess/WebProcess.cpp:
876 (WebKit::WebProcess::initializeWebProcess):
877 * WebProcess/com.apple.WebProcess.sb:
878 * WebProcess/mac/WebProcessMac.mm:
879 (WebKit::initializeSandbox):
881 2011-05-20 Jer Noble <jer.noble@apple.com>
883 Reviewed by Maciej Stachowiak.
885 Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
886 https://bugs.webkit.org/show_bug.cgi?id=61108
888 When the fullScreenController asks us to repaint, make an async repaint request, and when the
889 callback is fired, notify the fullScreenController that repaint has completed.
891 * UIProcess/win/WebView.cpp:
892 (WebKit::fullScreenClientForceRepaintCompleted): Added.
893 (WebKit::WebView::fullScreenClientForceRepaint): Added.
894 * UIProcess/win/WebView.h:
896 2011-05-19 Adam Roben <aroben@apple.com>
898 Don't try to process DownloadProxy messages twice (and robustify code that runs if we do)
900 Fixes <http://webkit.org/b/61142> <rdar://problem/9471680> REGRESSION (r86812): Crash
901 (preceded by assertion) in fastMalloc when downloading a file
903 Reviewed by Darin Adler.
905 * Platform/CoreIPC/ArgumentDecoder.cpp:
906 (CoreIPC::alignedBufferIsLargeEnoughToContain): Added. This helper function checks that the
907 given buffer is large enough to hold |size| bytes (and correctly handles the case where
908 we're already at the end or beyond the end of the buffer).
910 (CoreIPC::ArgumentDecoder::alignBufferPosition):
911 (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
912 Replaced old code that was vulnerable to underflow with the new helper function.
914 * UIProcess/WebProcessProxy.cpp:
915 (WebKit::WebProcessProxy::didReceiveSyncMessage): Added back an early return that was
916 mistakenly removed in r86812 so that we don't mistakenly pass DownloadProxy messages on to
917 a WebPageProxy after we've already handled them.
919 2011-05-19 Jer Noble <jer.noble@apple.com>
921 Reviewed by Maciej Stachowiak.
923 WebKit2: Flashing when entering and exiting full screen mode
924 https://bugs.webkit.org/show_bug.cgi?id=56957
926 In the WKFullscreenWindowController, when exiting accelerated compositing mode,
927 force a repaint, and don't actually remove the animation layer until the repaint
928 completes. Also, move back to parenting the WebView in a layer-backed view, and
929 work around the SnowLeopard bug which causes a crash in those situations. We no
930 longer need to do a bunch of work in finishedEnterFullScreenAnimation, because
931 the animation layer is "hiding" all the drawing happening in the webView underneath.
933 In the WebFullScreenManagerMac, when asked to tear down the root layer, instead
934 remove all its children, and set its contents to a flattened image of the full
935 screen element and its children. This helps patch over the time where everything
936 is re-rendering and helps give the appearance of continuousness in the animation.
938 * UIProcess/mac/WKFullScreenWindowController.mm:
939 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
940 (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
941 (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
942 (-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
943 (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]):
944 (exitCompositedModeRepaintCompleted):
945 (-[WKFullScreenWindowController _page]):
946 (-[WKFullScreenWindowController _manager]):
947 (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
948 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
949 (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
951 2011-05-19 Anders Carlsson <andersca@apple.com>
953 Address a review comment by Sam Weinig.
955 * UIProcess/WebContext.cpp:
956 (WebKit::WebContext::didUpdateHistoryTitle):
958 2011-05-19 Anders Carlsson <andersca@apple.com>
960 Reviewed by Sam Weinig.
962 Hang UI appears when WebProcess isn't running
963 https://bugs.webkit.org/show_bug.cgi?id=61147
964 <rdar://problem/9413683>
968 1. The HistoryClient related message handlers in WebContext could get invoked for pages that have been closed,
969 and thus didn't have any subframes. Since we have a MESSAGE_CHECK that checks that the frame exists, we'd
970 mark the currently dispatched message as invalid, which would end up calling Connection::Client::didReceiveInvalidMessage.
971 Fix this by checking that the page exists first.
973 2. In the call to WebProcessProxy::didReceiveInvalidMessage we'd first invalidate the CoreIPC connection to make sure
974 that we won't get any further messages from this connection. We'd then go ahead and terminate the web process,
975 but because we've already invalidated the CoreIPC connection we would never get the Connection::Client::didClose
976 callback that would call WebPageProxy::processDidCrash. Fix this by explicitly calling WebProcessProxy::didClose.
977 Also, add logging when we receive an invalid message
979 * UIProcess/WebContext.cpp:
980 (WebKit::WebContext::didNavigateWithNavigationData):
981 (WebKit::WebContext::didPerformClientRedirect):
982 (WebKit::WebContext::didPerformServerRedirect):
983 (WebKit::WebContext::didUpdateHistoryTitle):
984 * UIProcess/WebProcessProxy.cpp:
985 (WebKit::WebProcessProxy::didReceiveInvalidMessage):
987 2011-05-19 Brian Weinstein <bweinstein@apple.com>
989 Reviewed by Adam Roben.
991 Crash when detaching Web Inspector when parent is in process of closing.
992 https://bugs.webkit.org/show_bug.cgi?id=61141
993 <rdar://problem/9470027>
995 We were trying to send a WM_SIZE to a window that was in the process of closing. Switch
996 to using PostMessage, so the window will finish closing, and then it won't need to
997 process the WM_SIZE message anymore.
999 * UIProcess/win/WebInspectorProxyWin.cpp:
1000 (WebKit::WebInspectorProxy::platformAttach): Call PostMessage instead of SendMessage.
1001 (WebKit::WebInspectorProxy::platformDetach): Ditto.
1003 2011-05-19 Robert Hogan <robert@webkit.org>
1005 Reviewed by Andreas Kling.
1007 [Qt] Fix plugins/windowless_plugin_paint_test.html
1009 Call gdk_init_check before gdk_display_get_default().
1010 If we don't do this, gdk_display_get_default() will hang
1011 the next time it's called.
1013 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1014 (WebKit::getPluginDisplay):
1016 2011-05-18 Chris Marrin <cmarrin@apple.com>
1018 Reviewed by Anders Carlsson.
1020 Plug-ins at YouTube, cnn.com, nytimes vanish when their top/left is scrolled out of view when zoomed
1021 https://bugs.webkit.org/show_bug.cgi?id=61101
1023 Scale both bounding boxes sent to m_plugin->geometryDidChange(), not just the frameRect. This fools
1024 the plugin into thinking it is drawing into an unscaled box with an unscaled view even when scaled.
1026 * WebProcess/Plugins/PluginView.cpp:
1027 (WebKit::PluginView::frame):Made this const so it can be used in clipRectInWindowCoordinates()
1028 (WebKit::PluginView::viewGeometryDidChange):Used IntRect::scale() rather than scaling by hand
1029 (WebKit::PluginView::clipRectInWindowCoordinates):Added scale of clipRect.
1030 * WebProcess/Plugins/PluginView.h:
1032 2011-05-19 Carlos Garcia Campos <cgarcia@igalia.com>
1034 Reviewed by Anders Carlsson.
1036 Fix build with ENABLE_PLUGIN_PROCESS=1 for non-mac platforms after r86578
1037 https://bugs.webkit.org/show_bug.cgi?id=61113
1039 * PluginProcess/PluginControllerProxy.cpp:
1040 (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1041 (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1043 2011-05-19 Philippe Normand <pnormand@igalia.com>
1045 Unreviewed, follow-up fix of the messages python unittests after r86812.
1047 [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
1048 https://bugs.webkit.org/show_bug.cgi?id=60872
1050 * Scripts/webkit2/messages_unittest.py:
1052 2011-05-18 Brady Eidson <beidson@apple.com>
1054 As originally reviewed by Anders Carlsson.
1056 <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
1057 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
1059 Restore r86797 to how it was supposed to be using the appropriate #ifdef,
1060 reverting the temporary r86814 in the process.
1062 The #ifdef is BUILDING_ON_SNOW_LEOPARD, not BUILDING_ON_SNOWLEOPARD!
1064 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1065 (WebKit::ProcessLauncher::launchProcess):
1066 * WebProcess/mac/WebProcessMainMac.mm:
1067 (WebKit::WebProcessMain):
1069 2011-05-18 Brady Eidson <beidson@apple.com>
1071 Fix the WK2 SnowLeopard layouttests (again) until I can explore on a SnowLeopard machine tomorrow.
1073 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1074 (WebKit::ProcessLauncher::launchProcess):
1075 * WebProcess/mac/WebProcessMainMac.mm:
1076 (WebKit::WebProcessMain):
1078 2011-05-18 Darin Adler <darin@apple.com>
1080 Reviewed by Anders Carlsson.
1082 [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
1083 https://bugs.webkit.org/show_bug.cgi?id=60872
1085 Eliminate the concept of SyncReplyMode and instead hand around ownership
1086 of the reply decoder using an OwnPtr.
1088 * Platform/CoreIPC/Connection.cpp:
1089 (CoreIPC::Connection::dispatchSyncMessage): Eliminated comments that say
1090 the same things the code itself does. Removed code that handles the
1091 reply mode. Instead, pass the OwnPtr to the message handling function and
1092 make the call to sendSyncReply conditional on whether the reply encoder
1095 * Platform/CoreIPC/Connection.h: Removed SyncReplyMode. Made
1096 didReceiveSyncMessage return void, and take OwnPtr<ArgumentEncoder>& for
1099 * Platform/CoreIPC/HandleMessage.h:
1100 (CoreIPC::handleMessageDelayed): Take an OwnPtr&. Replaced the call to
1101 adoptPtr with a call to release.
1103 * PluginProcess/PluginControllerProxy.h: Updated to take an OwnPtr& and
1104 not return SyncReplyMode.
1105 * PluginProcess/WebProcessConnection.cpp:
1106 (WebKit::WebProcessConnection::didReceiveSyncMessage): Ditto.
1107 * PluginProcess/WebProcessConnection.h: Ditto.
1109 * Scripts/webkit2/messages.py: Updated for changes to sync messages.
1110 Eliminated unneeded return types and use get() when apporopriate to call
1111 the handleMessage functions.
1113 * Scripts/webkit2/messages_unittest.py: Tried to update this too.
1114 I don't know how to run the test, though.
1116 * Shared/Plugins/NPObjectMessageReceiver.h: Updated to take an OwnPtr& and
1117 not return SyncReplyMode.
1118 * Shared/Plugins/NPRemoteObjectMap.cpp:
1119 (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): Ditto.
1120 * Shared/Plugins/NPRemoteObjectMap.h: Ditto.
1121 * UIProcess/Downloads/DownloadProxy.h: Ditto.
1122 * UIProcess/WebContext.cpp:
1123 (WebKit::WebContext::didReceiveSyncMessage): Ditto.
1124 * UIProcess/WebContext.h: Ditto.
1125 * UIProcess/WebFullScreenManagerProxy.cpp:
1126 (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): Ditto.
1127 * UIProcess/WebFullScreenManagerProxy.h: Ditto.
1128 * UIProcess/WebIconDatabase.cpp:
1129 (WebKit::WebIconDatabase::didReceiveSyncMessage): Ditto.
1130 * UIProcess/WebIconDatabase.h: Ditto.
1131 * UIProcess/WebInspectorProxy.h: Ditto.
1132 * UIProcess/WebPageProxy.cpp:
1133 (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
1134 * UIProcess/WebPageProxy.h: Ditto.
1135 * UIProcess/WebProcessProxy.cpp:
1136 (WebKit::WebProcessProxy::didReceiveSyncMessage): Ditto.
1137 * UIProcess/WebProcessProxy.h: Ditto.
1139 * WebProcess/Plugins/Netscape/JSNPObject.cpp: Added a missing include.
1141 * WebProcess/Plugins/PluginProcessConnection.cpp:
1142 (WebKit::PluginProcessConnection::didReceiveSyncMessage): Updated to take
1143 an OwnPtr& and not return SyncReplyMode.
1144 * WebProcess/Plugins/PluginProcessConnection.h: Ditto.
1145 * WebProcess/Plugins/PluginProxy.h: Ditto.
1146 * WebProcess/WebPage/WebPage.cpp:
1147 (WebKit::WebPage::didReceiveSyncMessage): Ditto.
1148 * WebProcess/WebPage/WebPage.h: Ditto.
1149 * WebProcess/WebProcess.cpp:
1150 (WebKit::WebProcess::didReceiveSyncMessage): Ditto.
1151 * WebProcess/WebProcess.h: Ditto.
1153 2011-05-18 Chris Fleizach <cfleizach@apple.com>
1155 Reviewed by Maciej Stachowiak.
1157 WK2: VoiceOver cannot move focus into a web area programmatically
1158 https://bugs.webkit.org/show_bug.cgi?id=60661
1160 Add a makeFirstResponder method that will bring focus to the widget view within the UI
1163 * UIProcess/API/mac/PageClientImpl.h:
1164 * UIProcess/API/mac/PageClientImpl.mm:
1165 (WebKit::PageClientImpl::makeFirstResponder):
1166 * UIProcess/PageClient.h:
1167 * UIProcess/WebPageProxy.h:
1168 * UIProcess/WebPageProxy.messages.in:
1169 * UIProcess/mac/WebPageProxyMac.mm:
1170 (WebKit::WebPageProxy::makeFirstResponder):
1171 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1172 (WebKit::WebChromeClient::makeFirstResponder):
1173 * WebProcess/WebCoreSupport/WebChromeClient.h:
1175 2011-05-18 Brady Eidson <beidson@apple.com>
1177 Reviewed by Anders Carlsson.
1179 <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
1180 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
1182 * Platform/unix/EnvironmentUtilities.cpp: Remove an unnecessary #include, as reviewed.
1184 2011-05-17 Timothy Hatcher <timothy@apple.com>
1186 Update the the context menu to reflect the system search provider on Mac.
1188 <rdar://problem/9198419>
1190 Reviewed by Sam Weinig.
1192 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1193 (WebKit::WebContextMenuClient::searchWithGoogle): Add a FIXME about using NSPerformService on Mac.
1194 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1195 (InitWebCoreSystemInterface): Added CopyDefaultSearchProviderDisplayName.
1197 2011-05-18 Brady Eidson <beidson@apple.com>
1199 Reviewed by Anders Carlsson.
1201 <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
1202 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
1204 If the WebProcess or PluginProcess forks, it shouldn't pass WebKit2 shims along to the new process
1205 in the DYLD_INSERT_LIBRARIES environment variable.
1207 Add Environment Utilities helper to strip unwanted values from an environment variable:
1208 * Platform/unix/EnvironmentUtilities.cpp: Added.
1209 (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
1210 * Platform/unix/EnvironmentUtilities.h: Added.
1211 * WebKit2.xcodeproj/project.pbxproj:
1213 Strip PluginProcessShim.dylib from DYLD_INSERT_LIBRARIES:
1214 * PluginProcess/mac/PluginProcessMainMac.mm:
1215 (WebKit::PluginProcessMain):
1217 Strip WebProcessShim.dylib from DYLD_INSERT_LIBRARIES:
1218 * WebProcess/mac/WebProcessMainMac.mm:
1219 (WebKit::WebProcessMain):
1221 Unprotect SnowLeopard now that it will behave and not spawn processes trying to use WebKit2 shims:
1222 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1223 (WebKit::ProcessLauncher::launchProcess):
1225 2011-05-18 Jon Lee <jonlee@apple.com>
1227 Reviewed by Simon Fraser.
1229 Crash in injected bundle client
1230 https://bugs.webkit.org/show_bug.cgi?id=61086
1232 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1233 (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection): Check for existence of method in client prior to calling.
1235 2011-05-18 Andreas Kling <kling@webkit.org>
1237 Reviewed by Kenneth Rohde Christiansen.
1239 [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
1240 https://bugs.webkit.org/show_bug.cgi?id=60901
1242 To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
1243 make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
1245 * UIProcess/API/qt/qgraphicswkview.cpp:
1246 * UIProcess/API/qt/qgraphicswkview.h:
1247 * UIProcess/API/qt/qwkpage.cpp:
1248 (QWKPagePrivate::createDrawingAreaProxy):
1250 2011-05-18 Andreas Kling <kling@webkit.org>
1252 Reviewed by Kenneth Rohde Christiansen.
1254 [Qt][WK2] Don't lie about supporting accelerated compositing.
1255 https://bugs.webkit.org/show_bug.cgi?id=61054
1257 Until we have an implementation of LayerTreeHost, we shouldn't lie about it.
1260 * WebProcess/WebPage/LayerTreeHost.h:
1261 * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: Added.
1262 (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
1264 2011-05-17 Jeremy Noble <jer.noble@apple.com>
1266 Reviewed by Darin Adler.
1268 Exiting full screen will leave up invisible full-screen window, blocking all mouse clicks.
1269 https://bugs.webkit.org/show_bug.cgi?id=60982
1271 The GraphicsLayer tree has unparented m_fullScreenRootLayer behind our backs, replacing the
1272 tiled layer with a normal one. Instead of holding on to a specific layer, assume that the
1273 w_rootLayer will only have 0 or 1 children, and if a child is present, then that is our full-
1276 Additionally, check to see if the animating layer's presentationLayer is nil
1277 before calling it; asking a nil object for a CATransform3D will give back a struct full of
1280 In WKFullScreenWindowController, when the exit animation completes, ignore the "completed"
1281 parameter. This eliminates the possibility that the full screen window will end up left
1282 on top of the screen if the animation is cancelled and a enter full screen animation isn't
1285 * UIProcess/mac/WKFullScreenWindowController.mm:
1286 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1287 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
1288 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1289 (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
1290 (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
1291 (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
1293 2011-05-17 Dan Bernstein <mitz@apple.com>
1295 Reviewed by Alice Liu.
1297 <rdar://problem/9458300> REGRESSION (r86724): Repro crash loading any webpage in WebKit2 on SnowLeopard
1298 https://bugs.webkit.org/show_bug.cgi?id=61022
1300 * WebProcess/mac/WebProcessMainMac.mm:
1301 (WebKit::WebProcessMain): As long as we are not loading the shim on Snow Leopard, we should not
1302 try to initialize it.
1304 2011-05-17 Brady Eidson <beidson@apple.com>
1306 Rubberstamped by Sam Weinig.
1308 https://bugs.webkit.org/show_bug.cgi?id=60595
1309 Fix the rampant WebProcess crashing because we're trying to install the WebProcess shim
1310 into QTKitServer when we launch it.
1312 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1313 (WebKit::ProcessLauncher::launchProcess): This is only happening on SnowLeopard, so put
1314 SnowLeopard build guards around the shim install path.
1316 2011-05-17 Sheriff Bot <webkit.review.bot@gmail.com>
1318 Unreviewed, rolling out r86668.
1319 http://trac.webkit.org/changeset/86668
1320 https://bugs.webkit.org/show_bug.cgi?id=61001
1322 It made 52 tests crash on Qt WK2 bot (Requested by Ossy on
1325 * UIProcess/API/qt/qgraphicswkview.cpp:
1326 * UIProcess/API/qt/qgraphicswkview.h:
1327 * UIProcess/API/qt/qwkpage.cpp:
1328 (QWKPagePrivate::createDrawingAreaProxy):
1330 2011-05-17 Brian Weinstein <bweinstein@apple.com>
1332 Build fix after r86717.
1334 * UIProcess/API/C/win/WKView.h: Add a forward declaration of IDropTarget
1336 2011-05-17 Brian Weinstein <bweinstein@apple.com>
1338 Reviewed by Adam Roben.
1340 WebKit2: Needs API to set a custom drop target
1341 https://bugs.webkit.org/show_bug.cgi?id=60991
1342 <rdar://problem/9090868>
1344 Add API to set a custom drop target on a WKView.
1346 * UIProcess/API/C/win/WKView.cpp:
1347 (WKViewSetCustomDropTarget): Call through to WebView::setCustomDropTarget.
1348 * UIProcess/API/C/win/WKView.h:
1349 * UIProcess/win/WebView.cpp:
1350 (WebKit::WebView::setCustomDropTarget): Revoke the current drop target, and register the
1352 * UIProcess/win/WebView.h:
1354 2011-05-17 Sam Weinig <sam@webkit.org>
1356 Reviewed by Dan Bernstein.
1358 Add API to determine if a frame has any form elements without going to javascript
1359 https://bugs.webkit.org/show_bug.cgi?id=60999
1361 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1362 (WKBundleFrameContainsAnyFormElements):
1363 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1364 * WebProcess/WebPage/WebFrame.cpp:
1365 (WebKit::WebFrame::containsAnyFormElements):
1366 * WebProcess/WebPage/WebFrame.h:
1367 Add WKBundleFrameContainsAnyFormElements which does a walk of the document to determine
1368 if there are any form elements.
1370 2011-05-17 Andreas Kling <kling@webkit.org>
1372 Reviewed by Kenneth Rohde Christiansen.
1374 [Qt][WK2] Initial support for favicons.
1375 https://bugs.webkit.org/show_bug.cgi?id=58937
1377 Add the following API to QWKContext:
1379 - void setIconDatabasePath(QString)
1380 - void iconChangedForPageURL(QUrl) [signal]
1381 - QIcon iconForPageURL(QUrl)
1383 This is mostly analogous to the QWebSettings/QWebFrame icon API we had in WebKit1.
1385 * UIProcess/API/qt/ClientImpl.h: Added WKIconDatabaseClient methods.
1387 * UIProcess/API/qt/ClientImpl.cpp:
1388 (toQWKContext): Helper to cast from "void* clientInfo" to a QWKContext*.
1389 (qt_wk_didChangeIconForPageURL): Emits QWKContext::iconChangedForPageURL(QUrl).
1390 (qt_wk_didRemoveAllIcons): Stub.
1392 * UIProcess/API/qt/qwkcontext.h:
1393 * UIProcess/API/qt/qwkcontext_p.h:
1394 * UIProcess/API/qt/qwkcontext.cpp:
1395 (QWKContextPrivate::QWKContextPrivate): Set up and register a WKIconDatabaseClient.
1396 (QWKContext::QWKContext): Minor refactor to avoid code duplication in constructors.
1397 (QWKContext::setIconDatabasePath): Exactly what it sounds like.
1398 (QWKContext::iconForPageURL): Retrieves the favicon for a given page URL as a QIcon.
1400 * WebKit2API.pri: Add WKIconDatabase.cpp and WKIconDatabase.h to build.
1402 2011-05-17 Brady Eidson <beidson@apple.com>
1404 Reviewed by Anders Carlsson.
1406 Part 4 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1407 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1409 This patch actually hooks up the shim to the WebProcess shim callbacks, which messages these
1410 4 calls up to the UIProcess and returns the result.
1412 Note that this patch uncovered the fact that CoreIPC can't sync message out from a secondary thread,
1413 so I filed https://bugs.webkit.org/show_bug.cgi?id=60975 as a followup to allow that.
1415 * Shared/mac/SecItemResponseData.cpp:
1416 (WebKit::SecItemResponseData::SecItemResponseData): Reorder the constructor arguments to be
1418 * Shared/mac/SecItemResponseData.h:
1420 Call the shim callbacks for each method:
1421 * WebProcess/mac/WebProcessShim.mm:
1422 (WebKit::shimSecItemCopyMatching):
1423 (WebKit::shimSecItemAdd):
1424 (WebKit::shimSecItemUpdate):
1425 (WebKit::shimSecItemDelete):
1427 Implement the shim callbacks, which each marshall to the main thread, which then calls out to CoreIPC:
1428 * WebProcess/mac/WebProcessMac.mm:
1429 (WebKit::WebSecItemCopyMatchingMainThread):
1430 (WebKit::WebSecItemCopyMatching):
1431 (WebKit::WebSecItemAddOnMainThread):
1432 (WebKit::WebSecItemAdd):
1433 (WebKit::WebSecItemUpdateOnMainThread):
1434 (WebKit::WebSecItemUpdate):
1435 (WebKit::WebSecItemDeleteOnMainThread):
1436 (WebKit::WebSecItemDelete):
1438 Add the 4 messages and their implementations in the UIProcess:
1439 * UIProcess/WebProcessProxy.h:
1440 * UIProcess/WebProcessProxy.messages.in:
1441 * UIProcess/mac/WebProcessProxyMac.mm: Added.
1442 (WebKit::WebProcessProxy::secItemCopyMatching):
1443 (WebKit::WebProcessProxy::secItemAdd):
1444 (WebKit::WebProcessProxy::secItemUpdate):
1445 (WebKit::WebProcessProxy::secItemDelete):
1447 * WebKit2.xcodeproj/project.pbxproj:
1449 2011-05-17 Anders Carlsson <andersca@apple.com>
1451 Reviewed by Dan Bernstein.
1453 Incomplete page painting at dropbox.com
1454 https://bugs.webkit.org/show_bug.cgi?id=60974
1455 <rdar://problem/9448213>
1457 When we're exiting compositing mode and haven't sent an EnterAcceleratedCompositingMode
1458 message to the UI process, we still need to send the updated bits to the ui process.
1460 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1461 (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1463 2011-05-17 Brady Eidson <beidson@apple.com>
1465 Reviewed by Anders Carlsson.
1467 Part 3 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1468 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1470 Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back.
1472 Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs:
1473 * Shared/cf/ArgumentCodersCF.cpp:
1474 (CoreIPC::typeFromCFTypeRef):
1477 * Shared/cf/ArgumentCodersCF.h:
1479 Serializable object that contains the query CFDictionaryRef and optionally the
1480 "attributesToMatch" CFDictionaryRef:
1481 * Shared/mac/SecItemRequestData.cpp: Added.
1482 (WebKit::SecItemRequestData::SecItemRequestData):
1483 (WebKit::SecItemRequestData::encode):
1484 (WebKit::SecItemRequestData::decode):
1485 * Shared/mac/SecItemRequestData.h: Added.
1486 (WebKit::SecItemRequestData::query):
1487 (WebKit::SecItemRequestData::attributesToMatch):
1489 Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef:
1490 * Shared/mac/SecItemResponseData.cpp: Added.
1491 (WebKit::SecItemResponseData::SecItemResponseData):
1492 (WebKit::SecItemResponseData::encode):
1493 (WebKit::SecItemResponseData::decode):
1494 * Shared/mac/SecItemResponseData.h: Added.
1495 (WebKit::SecItemResponseData::resultObject):
1496 (WebKit::SecItemResponseData::resultCode):
1498 * WebKit2.xcodeproj/project.pbxproj:
1500 2011-05-17 Brady Eidson <beidson@apple.com>
1502 Reviewed by Anders Carlsson.
1504 Part 2 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1505 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1507 Hookup some of the methods we plan to shim in the patch, but just have them call through
1508 to the actual implementations for now.
1510 Also stub-out the future shimmed versions of the methods.
1512 * WebProcess/mac/WebProcessShim.h: Add the methods to the shim callbacks.
1513 * WebProcess/mac/WebProcessShim.mm:
1514 (WebKit::shimSecItemCopyMatching): Call through to the actual function for now.
1515 (WebKit::shimSecItemAdd): Ditto.
1516 (WebKit::shimSecItemUpdate): Ditto.
1517 (WebKit::shimSecItemDelete): Ditto.
1518 (WebKit::WebKitWebProcessShimInitialize): Copy over the shim callbacks.
1519 * WebKit2.xcodeproj/project.pbxproj: Link the shim to required frameworks.
1521 * WebProcess/mac/WebProcessMac.mm:
1522 (WebKit::WebSecItemCopyMatching): Add placeholders for the future to-be-shimmed functions.
1523 (WebKit::WebSecItemAdd): Ditto.
1524 (WebKit::WebSecItemUpdate): Ditto.
1525 (WebKit::WebSecItemDelete): Ditto.
1526 (WebKit::WebProcess::initializeShim): Pass along those placeholders to the shim initializer.
1528 2011-05-17 Brady Eidson <beidson@apple.com>
1530 Reviewed by Anders Carlsson.
1532 Part 1 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
1533 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
1535 Add am empty shim for a new WebProcess shim and install it at launch.
1537 Use the same Shim.xcconfig for both the web and plugin processes:
1538 * Configurations/PluginProcessShim.xcconfig: Removed.
1539 * Configurations/Shim.xcconfig: Copied from Configurations/PluginProcessShim.xcconfig.
1540 * WebKit2.xcodeproj/project.pbxproj:
1542 * WebProcess/WebProcess.h: Add initializeShim() for Mac-only
1543 * WebProcess/mac/WebProcessMac.mm:
1544 (WebKit::WebProcess::initializeShim): Initialize the (empty) shim callbacks.
1546 * WebProcess/mac/WebProcessMainMac.mm:
1547 (WebKit::WebProcessMain): Call initializeShim()
1549 * WebProcess/mac/WebProcessShim.h: Added.
1550 * WebProcess/mac/WebProcessShim.mm: Added.
1551 (WebKit::WebKitWebProcessShimInitialize): Empty for now.
1553 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1554 (WebKit::ProcessLauncher::launchProcess): Install the Plugin Process shim for plugin processes
1555 and the WebProcess shim for the web content process.
1557 2011-05-17 John Sullivan <sullivan@apple.com>
1559 Reviewed by Adam Roben.
1561 Loose end from fix for https://bugs.webkit.org/show_bug.cgi?id=60938
1563 * WebKit2.xcodeproj/project.pbxproj:
1564 Made new header file "private" instead of "project" so clients can access it.
1566 2011-05-17 Andreas Kling <kling@webkit.org>
1568 Reviewed by Kenneth Rohde Christiansen.
1570 [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
1571 https://bugs.webkit.org/show_bug.cgi?id=60901
1573 To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
1574 make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
1576 * UIProcess/API/qt/qgraphicswkview.cpp:
1577 * UIProcess/API/qt/qgraphicswkview.h:
1578 * UIProcess/API/qt/qwkpage.cpp:
1579 (QWKPagePrivate::createDrawingAreaProxy):
1581 2011-05-16 Martin Robinson <mrobinson@igalia.com>
1583 Take another shot at fixing the WinCairo build.
1585 * Shared/cairo/LayerTreeContextCairo.cpp: Include NotImplemented.h using a framework include.
1587 2011-05-16 Sam Weinig <sam@webkit.org>
1589 Reviewed by Jon Honeycutt.
1591 Add access to process pid in WebKit2 API
1592 https://bugs.webkit.org/show_bug.cgi?id=60938
1594 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: Added.
1595 (WKPageGetProcessIdentifier):
1596 * UIProcess/API/C/mac/WKPagePrivateMac.h: Added.
1597 * UIProcess/WebPageProxy.cpp:
1598 (WebKit::WebPageProxy::processIdentifier):
1599 * UIProcess/WebPageProxy.h:
1600 * WebKit2.xcodeproj/project.pbxproj:
1601 Add WKPageGetProcessIdentifier as SPI for the mac.
1603 2011-05-16 Martin Robinson <mrobinson@igalia.com>
1605 Add file missing from my previous commit.
1607 * Shared/cairo/LayerTreeContextCairo.cpp: Added.
1609 2011-05-16 Martin Robinson <martin.james.robinson@gmail.com>
1611 Try to fix the WinCairo build after r86612.
1613 Move the LayerTreeContextGtk.cpp stub to LayerTreeContextCairo.cpp and add
1614 it to the WinCairo build.
1616 * GNUmakefile.am: Update the source list.
1617 * Shared/cairo/LayerTreeContextCairo.cpp: Renamed from Source/WebKit2/Shared/gtk/LayerTreeContextGtk.cpp.
1618 * win/WebKit2.vcproj: Update the source list.
1620 2011-05-16 Martin Robinson <mrobinson@igalia.com>
1622 Reviewed by Anders Carlsson.
1624 [GTK] [WebKit2] Provide a fast version of the backing store for X11
1625 https://bugs.webkit.org/show_bug.cgi?id=60912
1627 Instead of allocating the backing store surface directly in WebKit2,
1628 instantiate the GtkWidgetBackingStore class which abstracts away the
1629 platform-specific details of maintaining the backing store.
1631 * UIProcess/BackingStore.h:
1632 * UIProcess/gtk/BackingStoreGtk.cpp:
1633 (WebKit::BackingStore::paint): Call into GtkWidgetBackingStore to get the Cairo surface now.
1634 (WebKit::BackingStore::incorporateUpdate): Ditto.
1635 (WebKit::BackingStore::scroll): Call into GtkWidgetBackingStore to do the actual backing store scroll.
1637 2011-05-16 Chris Marrin <cmarrin@apple.com>
1639 Reviewed by Darin Adler.
1641 Plug-in hit testing is broken after zooming
1642 https://bugs.webkit.org/show_bug.cgi?id=60916
1644 Construct a WebMouseEvent to send to plugin, adjusting values to take pageScaleFactor
1645 into account. Also adjusted bounds sent to viewGeometryDidChange to take pageScaleFactor
1646 into account. Both are needed or the plugin will think the mouse positions are outside
1649 * Shared/WebEvent.h:
1650 * Shared/WebMouseEvent.cpp:Add ctor to clone a WebMouseEvent and add a scaleFactor to values
1651 (WebKit::WebMouseEvent::WebMouseEvent):
1652 * WebProcess/Plugins/PluginView.cpp:
1653 (WebKit::PluginView::handleEvent):Adjust mouse coords to take pageScaleFactor into account
1654 (WebKit::PluginView::viewGeometryDidChange):Adjust bounds to take pageScaleFactor into account
1656 2011-05-16 Martin Robinson <mrobinson@igalia.com>
1658 Reviewed by Anders Carlsson.
1660 GTK port of WebKit2 should switch to new DrawingAreaImpl model
1661 https://bugs.webkit.org/show_bug.cgi?id=59655
1663 * GNUmakefile.am: Add the files necessary to use the DrawingAreaProxyImpl
1664 to the source list. The source list also needs the LayerContextTree stubs.
1665 * Shared/LayerTreeContext.h: This file should not be guarded by
1666 USE(ACCELERATED_COMPOSITING) as it's needed for the DrawingAreaProxyImpl
1668 * Shared/gtk/LayerTreeContextGtk.cpp: Added this stub.
1669 * UIProcess/API/gtk/PageClientImpl.cpp:
1670 (WebKit::PageClientImpl::createDrawingAreaProxy): Instead of creating the deprecated
1671 chunked drawing area, create a DrawingAreaProxyImpl.
1672 (WebKit::PageClientImpl::setViewNeedsDisplay): Here we must now queue a redraw. Previously
1673 the chunked drawing area was doing this manually. This is the appropriate place though.
1674 (WebKit::PageClientImpl::scrollView): Add an implementation that just calls into setViewNeedsDisplay.
1675 * UIProcess/API/gtk/PageClientImpl.h: Added a getter for m_viewWidget.
1676 (WebKit::PageClientImpl::viewWidget):
1677 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1678 (callDrawingAreaPaintMethod): Added this helper which reduces code duplication between
1680 (webkitWebViewBaseExpose): Call the new helper now.
1681 (webkitWebViewBaseDraw): Ditto.
1682 * UIProcess/BackingStore.h: Updated to include GTK+ specific types.
1683 * UIProcess/DrawingAreaProxy.h: Ditto.
1684 * UIProcess/DrawingAreaProxy.messages.in: Do not the DrawingAreaProxyImpl-specific
1685 message with USE(ACCELERATED_COMPOSITING).
1686 * UIProcess/WebPageProxy.cpp: Removed these guards, as DrawingAreProxyImpl is used on all platforms now.
1687 (WebKit::WebPageProxy::didReceiveMessage): Ditto.
1688 * UIProcess/WebPageProxy.h: Ditto.
1689 * UIProcess/gtk/BackingStoreGtk.cpp: Added. This implementation heavily uses Cairo,
1690 but depends on GTK+/GDK in a few places.
1691 (WebKit::BackingStore::paint):
1692 (WebKit::BackingStore::incorporateUpdate):
1693 (WebKit::BackingStore::scroll):
1694 * UIProcess/gtk/WebPageProxyGtk.cpp: Added a getting for the viewWidget, which is
1695 required by BackingStoreGtk. A similar getter exists for Windows and Mac.
1696 (WebKit::WebPageProxy::viewWidget): Ditto.
1697 * WebProcess/WebPage/DrawingArea.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
1698 (WebKit::DrawingArea::create): Ditto.
1699 * WebProcess/WebPage/DrawingArea.h: Ditto.
1700 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1701 (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Do not guard
1702 this DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING)
1703 * WebProcess/WebPage/WebPage.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
1704 (WebKit::WebPage::didReceiveMessage): Ditto.
1706 2011-05-16 Maciej Stachowiak <mjs@apple.com>
1708 Reviewed by Sam Weinig.
1710 Sandbox denies Kerberos authentication
1711 https://bugs.webkit.org/show_bug.cgi?id=60921
1712 <rdar://problem/9133872>
1714 * WebProcess/com.apple.WebProcess.sb:
1716 2011-05-16 David Kilzer <ddkilzer@apple.com>
1718 <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
1719 <rdar://problem/9446430>
1721 Reviewed by Mark Rowe.
1723 * Configurations/Base.xcconfig: Fixed typo.
1725 2011-05-16 Anders Carlsson <andersca@apple.com>
1727 Reviewed by Dan Bernstein.
1729 If the root compositing layer changes while we're about to exit compositing mode, make sure to enter compositing mode
1730 https://bugs.webkit.org/show_bug.cgi?id=60905
1731 <rdar://problem/9365574>
1733 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1734 (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1735 If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen
1736 when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host
1737 does it next flush. This will end up sending the EnterAcceleratedCompositingMode message.
1739 2011-05-13 Jer Noble <jer.noble@apple.com>
1741 Reviewed by Simon Fraser.
1743 Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
1744 https://bugs.webkit.org/show_bug.cgi?id=60826
1746 Emit a notification when moving a CALayer from the WebProcess's main
1747 layer host to a new context. This allows listeners to invalidate their
1748 layers which may not support moving between different CAContexts (as is
1749 the case with QTMovieLayer). In order to allow listeners to determine if they
1750 are affected, the notification will pass the root CALayer in a userInfo
1753 In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
1754 class (GraphicsLayer) to a retainable class (PlatformLayer).
1756 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
1757 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1758 (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
1759 m_fullScreenRootLayer now that it is a RetainPtr<>.
1760 (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
1761 after either creating or destroying the full screen layer host.
1762 (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
1763 (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
1765 2011-05-16 Siddharth Mathur <siddharth.mathur@nokia.com>
1767 Rubber-stamped by Csaba Osztrogonác.
1769 [Qt][Wk2][Symbian] Fix build after r86560
1770 https://bugs.webkit.org/show_bug.cgi?id=60887
1772 Temporarily fix Symbian build by re-enabling compilation
1773 of Qt/Gtk common code (as was the case for Symbian before r55875).
1774 This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875
1775 As of this revision, only the native SharedMemory implementation is in trunk.
1777 * Platform/CoreIPC/Attachment.h: Compile Qt/Gtk common code for Qt-Symbian too
1778 * Platform/CoreIPC/Connection.h: ditto
1779 * Platform/SharedMemory.h: ditto
1780 * Platform/qt/SharedMemorySymbian.cpp: stub implementations of attachment handling
1781 (WebKit::SharedMemory::Handle::releaseToAttachment):
1782 (WebKit::SharedMemory::Handle::adoptFromAttachment):
1784 2011-05-16 Jon Lee <jonlee@apple.com>
1786 Reviewed by Simon Fraser.
1788 Can't horizontally scroll iframes and overflow because wheel events are always accepted
1789 https://bugs.webkit.org/show_bug.cgi?id=60779
1791 We keep track of the number of horizontal scrollbars and mouse wheel event handlers in the
1792 UI process as a means of determining whether horizontal scroll events will be handled
1795 * UIProcess/WebPageProxy.cpp:
1796 (WebKit::WebPageProxy::willHandleHorizontalScrollEvents): Return true if there is at least
1797 one wheel event handler
1798 * UIProcess/WebPageProxy.h: Add new variable to cache the count
1799 (WebKit::WebPageProxy::numWheelEventHandlersChanged): Sets the count
1801 The rest just provides all the connections.
1802 * UIProcess/API/C/WKPage.cpp:
1803 (WKPageWillHandleHorizontalScrollEvents):
1804 * UIProcess/API/C/WKPage.h:
1805 * UIProcess/WebPageProxy.messages.in:
1806 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1807 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1808 (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection):
1809 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1810 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1811 (WebKit::WebChromeClient::shouldRubberBandInDirection): Forward to injected bundle UI client
1812 (WebKit::WebChromeClient::updateCountWheelEventHandlers): Updates the web page proxy
1813 * WebProcess/WebCoreSupport/WebChromeClient.h:
1815 2011-05-16 Anders Carlsson <andersca@apple.com>
1817 Reviewed by Oliver Hunt.
1819 Silverlight: Selection via keyboard selects the entire plugin instead of the contents of a TextBox
1820 https://bugs.webkit.org/show_bug.cgi?id=60898
1821 <rdar://problem/9309903>
1823 Special-case Command-A and always return true, indicating that the plug-in handled the event.
1824 This matches WebKit1.
1826 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1827 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
1829 2011-05-16 Anders Carlsson <andersca@apple.com>
1831 Reviewed by Oliver Hunt.
1833 Short-circuit NPRuntime calls made by Flash during plug-in instantiation
1834 https://bugs.webkit.org/show_bug.cgi?id=60894
1835 <rdar://problem/8804681>
1837 During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the
1838 URL of the current document as well as the URL of the toplevel document. This leads to
1839 a bunch of IPC traffic that slows down instantiation.
1841 Since we know what calls Flash is making and what results are expected, we can handle the
1842 NPRuntime calls directly in the plug-in process and avoid extra IPC overhead.
1844 * PluginProcess/PluginControllerProxy.cpp:
1845 (WebKit::PluginControllerProxy::PluginControllerProxy):
1846 Initialize m_pluginCreationParameters.
1848 (WebKit::PluginControllerProxy::initialize):
1849 Set m_pluginCreationParameters to point to the creation parameters right before
1850 calling Plugin::initialize and restore it back afterwards.
1852 (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1853 If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization
1854 quirk, and we're being initialized, check for the __flash_getWindowLocation and
1855 __flash_getTopLocation function calls and return the correct values.
1857 (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1858 Check if the script string has the definitions of __flash_getWindowLocation or __flash_getTopLocation
1859 and just ignore them. Note that ignoring them has the effect of not adding them to the window object,
1860 which could in theory be a backwards compatibility problem if web pages were to assume that these
1861 functions existed on a page with plug-ins. In practice this is probably not a problem, especially since
1862 these functions are only used on Mac WebKit.
1864 * PluginProcess/PluginControllerProxy.h:
1865 (WebKit::PluginControllerProxy::inInitialize):
1866 Add helper function.
1868 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1869 (WebKit::NetscapePluginModule::determineQuirks):
1870 Add the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk for Flash on Mac.
1872 * Shared/Plugins/PluginQuirks.h:
1873 Add Mac specific CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk.
1875 2011-05-16 Anders Carlsson <andersca@apple.com>
1877 Reviewed by Adam Roben.
1879 Add a returnValue parameter to tryToShortCircuitInvoke
1880 https://bugs.webkit.org/show_bug.cgi?id=60891
1882 tryToShortCircuitInvoke needs to be able to indicate that an invoke
1883 call failed. Add a returnValue parameter and have the real return value
1884 indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not.
1886 * PluginProcess/PluginControllerProxy.cpp:
1887 (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1888 * PluginProcess/PluginControllerProxy.h:
1889 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1890 (WebKit::NPN_Invoke):
1891 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1892 (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
1893 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1894 * WebProcess/Plugins/PluginController.h:
1895 * WebProcess/Plugins/PluginView.cpp:
1896 (WebKit::PluginView::tryToShortCircuitInvoke):
1897 * WebProcess/Plugins/PluginView.h:
1899 2011-05-16 Siddharth Mathur <siddharth.mathur@nokia.com>
1901 Reviewed by Csaba Osztrogonác.
1903 [Qt][Wk2][Symbian] Fix build after r86560
1904 https://bugs.webkit.org/show_bug.cgi?id=60887
1906 * Platform/CoreIPC/ArgumentDecoder.cpp:
1907 (CoreIPC::ArgumentDecoder::~ArgumentDecoder): guard Unix and Gtk code with USE(UNIX_DOMAIN_SOCKETS)
1908 * Platform/CoreIPC/ArgumentEncoder.cpp:
1909 (CoreIPC::ArgumentEncoder::~ArgumentEncoder): ditto
1911 2011-05-16 Anders Carlsson <andersca@apple.com>
1913 Reviewed by Adam Roben.
1915 Add the ability for a plug-in controller to short-circuit calls to NPN_Invoke
1916 https://bugs.webkit.org/show_bug.cgi?id=60886
1918 Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which
1919 will be useful for avoiding sync IPC messages during instantiation.
1921 * PluginProcess/PluginControllerProxy.cpp:
1922 (WebKit::PluginControllerProxy::evaluate):
1923 Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to
1924 the web process to ask it to evaluate the script string.
1926 (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1927 (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1928 Always return false for now.
1930 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1931 (WebKit::NPN_Invoke):
1932 Get the plug-in and call tryToShortCircuitInvoke.
1934 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1935 (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
1936 Call the plug-in controller.
1938 * WebProcess/Plugins/PluginView.cpp:
1939 (WebKit::PluginView::tryToShortCircuitInvoke):
1940 Always return false here, since there's no need to short-circuit calls
1941 for plug-ins that live in the web process.
1943 2011-05-16 Siddharth Mathur <siddharth.mathur@nokia.com>
1945 Reviewed by Laszlo Gombos.
1947 [Qt][WK2][Symbian] Shared memory implementation for Symbian
1948 https://bugs.webkit.org/show_bug.cgi?id=55875
1950 Use global chunks for sharing data between processes.
1951 This is an initial implementation. An outstanding issue
1952 is the correct way to close() the chunk in the SharedMemory d'tor
1953 without triggering a delete by the kernel when the ref-count
1954 temporarily goes to zero.
1956 * Platform/SharedMemory.h: platform specific handle and chunk name
1957 * Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation
1958 using RChunk.CreateGlobal() for named chunks. The chunk name is serialized
1959 and sent over the IPC channel and opened by the remote process using
1960 RChunk.OpenGlobal().
1962 (WebKit::SharedMemory::Handle::Handle):
1963 (WebKit::SharedMemory::Handle::~Handle):
1964 (WebKit::SharedMemory::Handle::isNull):
1965 (WebKit::SharedMemory::Handle::encode):
1966 (WebKit::SharedMemory::Handle::decode):
1967 (WebKit::SharedMemory::create):
1968 (WebKit::SharedMemory::~SharedMemory):
1969 (WebKit::SharedMemory::createHandle):
1970 (WebKit::SharedMemory::systemPageSize):
1971 * Platform/unix/SharedMemoryUnix.cpp: Exclude Qt-Symbian using HAVE(UNIX_DOMAIN_SOCKETS)
1972 * WebKit2.pro: Add SharedMemorySymbian.cpp
1974 2011-05-16 Carlos Garcia Campos <cgarcia@igalia.com>
1976 Unreviewed. Fix WebKit2 GTK build after r86489.
1978 * GNUmakefile.am: Add PluginProcess/PluginCreationParameters.cpp
1979 and PluginProcess/PluginCreationParameters.h to compilation.
1981 2011-05-16 Carlos Garcia Campos <cgarcia@igalia.com>
1983 Reviewed by Martin Robinson.
1985 [GTK] Enable building GTK port with ENABLE_PLUGIN_PROCESS=1
1986 https://bugs.webkit.org/show_bug.cgi?id=58223
1988 * GNUmakefile.am: Add new files to compilation.
1989 * PluginProcess/gtk/PluginControllerProxyGtk.cpp: Added.
1990 (WebKit::PluginControllerProxy::platformInitialize):
1991 (WebKit::PluginControllerProxy::platformDestroy):
1992 (WebKit::PluginControllerProxy::platformGeometryDidChange):
1993 * PluginProcess/gtk/PluginProcessGtk.cpp: Added.
1994 (WebKit::PluginProcess::platformInitialize):
1995 * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: Added.
1996 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1997 * WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp: Added.
1998 (WebKit::PluginProxy::needsBackingStore):
2000 2011-05-16 Adam Barth <abarth@webkit.org>
2002 Attempt to fix the Qt build. (Strict PassOwnPtr fix.)
2004 * Shared/qt/ShareableBitmapQt.cpp:
2005 (WebKit::ShareableBitmap::createGraphicsContext):
2007 2011-05-15 Michael Saboff <msaboff@apple.com>
2009 Reviewed by Geoffrey Garen.
2011 Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
2012 https://bugs.webkit.org/show_bug.cgi?id=60864
2014 Implemented reuse of BackingStore's in
2015 DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
2016 matches the size of the existing BackingStore.
2017 Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
2018 These changes reduces memory usage up to 10MB on memory tests.
2020 * UIProcess/DrawingAreaProxyImpl.cpp:
2021 (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2022 (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
2024 2011-05-15 Anders Carlsson <andersca@apple.com>
2026 Reviewed by Maciej Stachowiak.
2028 Pass the window NPObject identifier in the plug-in creation parameters
2029 https://bugs.webkit.org/show_bug.cgi?id=60865
2031 This avoids a synchronous call when the plug-in wants to get the NPObject that
2032 corresponds to the window.
2034 * PluginProcess/PluginControllerProxy.cpp:
2035 (WebKit::PluginControllerProxy::initialize):
2036 Change this to take the PluginCreationParameters. Initialize the window NPObject.
2038 (WebKit::PluginControllerProxy::windowScriptNPObject):
2039 Just return the window NPObject; it's already been initialized.
2041 * PluginProcess/PluginControllerProxy.h:
2042 * PluginProcess/PluginCreationParameters.cpp:
2043 (WebKit::PluginCreationParameters::PluginCreationParameters):
2044 (WebKit::PluginCreationParameters::encode):
2045 (WebKit::PluginCreationParameters::decode):
2046 * PluginProcess/PluginCreationParameters.h:
2047 Add the window NPObject ID.
2049 * PluginProcess/WebProcessConnection.cpp:
2050 (WebKit::WebProcessConnection::createPlugin):
2051 Pass the creation parameters to PluginControllerProxy::initialize.
2053 * WebProcess/Plugins/PluginProxy.cpp:
2054 (WebKit::PluginProxy::initialize):
2055 Initialize the window NPObject ID.
2057 * WebProcess/Plugins/PluginProxy.messages.in:
2058 Remove the GetWindowScriptNPObject message.
2060 2011-05-15 Anders Carlsson <andersca@apple.com>
2062 Reviewed by Geoffrey Garen.
2064 Pass the document URL and toplevel document URL when creating a plug-in
2065 https://bugs.webkit.org/show_bug.cgi?id=60863
2067 This is the first of a series of patches intended to reduce the IPC traffic
2068 during plug-in instantiation.
2070 * WebProcess/Plugins/Plugin.cpp:
2071 (WebKit::Plugin::Parameters::encode):
2074 (WebKit::Plugin::Parameters::decode):
2077 * WebProcess/Plugins/Plugin.h:
2078 Add the document and toplevel document URLs.
2080 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2081 (WebKit::WebFrameLoaderClient::createPlugin):
2082 Initialize the document and toplevel document URLs.
2084 2011-05-13 Oliver Hunt <oliver@apple.com>
2086 Reviewed by Geoffrey Garen.
2088 Make GC validation more aggressive
2089 https://bugs.webkit.org/show_bug.cgi?id=60802
2091 Add GC_VALIDATION calls to all the JSNPObject methods.
2093 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2094 (WebKit::JSNPObject::invalidate):
2095 (WebKit::JSNPObject::callMethod):
2096 (WebKit::JSNPObject::callObject):
2097 (WebKit::JSNPObject::callConstructor):
2098 (WebKit::JSNPObject::getCallData):
2099 (WebKit::JSNPObject::getConstructData):
2100 (WebKit::JSNPObject::getOwnPropertySlot):
2101 (WebKit::JSNPObject::getOwnPropertyDescriptor):
2102 (WebKit::JSNPObject::put):
2103 (WebKit::JSNPObject::getOwnPropertyNames):
2104 (WebKit::JSNPObject::propertyGetter):
2105 (WebKit::JSNPObject::methodGetter):
2107 2011-05-13 Oliver Hunt <oliver@apple.com>
2109 Reviewed by Geoffrey Garen.
2111 Make GC validation more aggressive
2112 https://bugs.webkit.org/show_bug.cgi?id=60802
2114 Add GC_VALIDATION calls to all the JSNPObject methods.
2116 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2117 (WebKit::JSNPObject::invalidate):
2118 (WebKit::JSNPObject::callMethod):
2119 (WebKit::JSNPObject::callObject):
2120 (WebKit::JSNPObject::callConstructor):
2121 (WebKit::JSNPObject::getCallData):
2122 (WebKit::JSNPObject::getConstructData):
2123 (WebKit::JSNPObject::getOwnPropertySlot):
2124 (WebKit::JSNPObject::getOwnPropertyDescriptor):
2125 (WebKit::JSNPObject::put):
2126 (WebKit::JSNPObject::getOwnPropertyNames):
2127 (WebKit::JSNPObject::propertyGetter):
2128 (WebKit::JSNPObject::methodGetter):
2130 2011-05-14 Alexey Proskuryakov <ap@apple.com>
2132 Reviewed by Sam Weinig.
2134 WebKit2: Smart cut&paste is broken
2135 https://bugs.webkit.org/show_bug.cgi?id=60840
2136 <rdar://problem/9439927>
2138 * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::isSmartInsertDeleteEnabled):
2139 Match WK1 - this default defaults to YES if not present.
2141 2011-05-14 Dan Bernstein <mitz@apple.com>
2143 Reviewed by Alice Liu.
2145 WKView does not draw after forced repaint before the first update
2146 https://bugs.webkit.org/show_bug.cgi?id=60845
2148 * UIProcess/DrawingAreaProxy.h:
2149 (WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
2150 * UIProcess/DrawingAreaProxyImpl.cpp:
2151 (WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
2152 to true, ensuring that paint() will wait for an update if needed.
2153 * UIProcess/DrawingAreaProxyImpl.h:
2154 * UIProcess/WebPageProxy.cpp:
2155 (WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().
2157 2011-05-14 Anders Carlsson <andersca@apple.com>
2159 Reviewed by Sam Weinig.
2161 Document the WantsMozillaUserAgent quirk and make it Windows specific
2162 https://bugs.webkit.org/show_bug.cgi?id=60843
2164 * Shared/Plugins/PluginQuirks.h:
2165 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2166 (WebKit::NetscapePlugin::userAgent):
2168 2011-05-14 Anders Carlsson <andersca@apple.com>
2170 Reviewed by Sam Weinig.
2172 Consolidate plug-in creation parameters to a single struct
2173 https://bugs.webkit.org/show_bug.cgi?id=60839
2175 * PluginProcess/PluginControllerProxy.cpp:
2176 (WebKit::PluginControllerProxy::create):
2177 (WebKit::PluginControllerProxy::PluginControllerProxy):
2178 * PluginProcess/PluginControllerProxy.h:
2179 * PluginProcess/PluginCreationParameters.cpp: Added.
2180 (WebKit::PluginCreationParameters::PluginCreationParameters):
2181 (WebKit::PluginCreationParameters::encode):
2182 (WebKit::PluginCreationParameters::decode):
2183 * PluginProcess/PluginCreationParameters.h: Added.
2184 * PluginProcess/WebProcessConnection.cpp:
2185 (WebKit::WebProcessConnection::createPlugin):
2186 * PluginProcess/WebProcessConnection.h:
2187 * PluginProcess/WebProcessConnection.messages.in:
2188 * Scripts/webkit2/messages.py:
2189 * WebKit2.xcodeproj/project.pbxproj:
2190 * WebProcess/Plugins/PluginProxy.cpp:
2191 (WebKit::PluginProxy::initialize):
2193 2011-05-14 Anders Carlsson <andersca@apple.com>
2195 Reviewed by Kevin Decker.
2197 NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
2198 https://bugs.webkit.org/show_bug.cgi?id=60823
2199 <rdar://problem/9430386>
2201 If a plug-in stream fails to load before it's been started, we won't destroy the stream.
2203 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2204 (WebKit::NetscapePluginStream::stop):
2205 Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
2207 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
2208 Pass the request URL to NPP_URLNotify, matching other browsers.
2210 2011-05-14 Jer Noble <jer.noble@apple.com>
2212 Reviewed by Simon Fraser.
2214 Flashing window frame and graphical glitches after exiting full screen mode.
2215 https://bugs.webkit.org/show_bug.cgi?id=60825
2217 A layer-backed WebView throws an exception when moved from a layer-backed parent view
2218 to a non-layer-backed one, so make the WebView a child of the content view, instead of
2219 the animation view. There is an unrelated fix in beganExitFullScreen, which was calling
2220 finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when
2221 notifications come out of order.
2223 * UIProcess/mac/WKFullScreenWindowController.mm:
2224 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView
2225 to the full screen window's content view, instead of the _animationView.
2226 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call
2227 finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.
2228 (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the
2229 _layerHostingView to the contentView, instead of the animationView.
2231 2011-05-14 Csaba Osztrogonác <ossy@webkit.org>
2233 Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
2235 Make GC validation more aggressive
2236 https://bugs.webkit.org/show_bug.cgi?id=60802
2238 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2239 (WebKit::JSNPObject::invalidate):
2240 (WebKit::JSNPObject::callMethod):
2241 (WebKit::JSNPObject::callObject):
2242 (WebKit::JSNPObject::callConstructor):
2243 (WebKit::JSNPObject::getCallData):
2244 (WebKit::JSNPObject::getConstructData):
2245 (WebKit::JSNPObject::getOwnPropertySlot):
2246 (WebKit::JSNPObject::getOwnPropertyDescriptor):
2247 (WebKit::JSNPObject::put):
2248 (WebKit::JSNPObject::getOwnPropertyNames):
2249 (WebKit::JSNPObject::propertyGetter):
2250 (WebKit::JSNPObject::methodGetter):
2252 2011-05-14 Sheriff Bot <webkit.review.bot@gmail.com>
2254 Unreviewed, rolling out r86476.
2255 http://trac.webkit.org/changeset/86476
2256 https://bugs.webkit.org/show_bug.cgi?id=60832
2258 It made plugins/get-url-notify-with-url-that-fails-to-
2259 load.html crash on GTK (Requested by Ossy on #webkit).
2261 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2262 (WebKit::NetscapePluginStream::stop):
2263 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
2265 2011-05-13 Enrica Casucci <enrica@apple.com>
2267 Reviewed by Darin Adler and Brian Weinstein.
2269 REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop
2270 https://bugs.webkit.org/show_bug.cgi?id=60819
2271 <rdar://problem/9370689>
2273 To support drag-and-drop to the desktop and other windows applications,
2274 we need to support the fileDescriptor and fileContentZero clipboard formats.
2275 This patch adds the support for serializing these types across the process boundary.
2277 * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
2278 (CoreIPC::Arguments10::Arguments10):
2279 (CoreIPC::Arguments10::encode):
2280 (CoreIPC::Arguments10::decode):
2283 * Platform/CoreIPC/HandleMessage.h:
2284 (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
2285 * UIProcess/WebPageProxy.cpp:
2286 (WebKit::WebPageProxy::startDragDrop):
2287 * UIProcess/WebPageProxy.h:
2288 * UIProcess/WebPageProxy.messages.in:
2289 * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
2290 (WebKit::WebDragClient::startDrag):
2292 2011-05-13 Anders Carlsson <andersca@apple.com>
2294 Reviewed by Sam Weinig.
2296 NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
2297 https://bugs.webkit.org/show_bug.cgi?id=60823
2298 <rdar://problem/9430386>
2300 If a plug-in stream fails to load before it's been started, we won't destroy the stream.
2302 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2303 (WebKit::NetscapePluginStream::stop):
2304 Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
2306 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
2307 Pass the request URL to NPP_URLNotify, matching other browsers.
2309 2011-05-13 Michael Saboff <msaboff@apple.com>
2311 Reviewed by Geoffrey Garen.
2313 Backing store may not get discarded due to stopped timer
2314 https://bugs.webkit.org/show_bug.cgi?id=60816
2316 Changed the backing store timer to restart if it has been stopped.
2317 The evaluation is done when the view's state is changed.
2318 This change appears to be worth ~3MB (one backing store worth)
2319 during memory tests.
2321 * UIProcess/DrawingAreaProxyImpl.cpp:
2322 (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
2323 * UIProcess/WebPageProxy.cpp:
2324 (WebKit::WebPageProxy::viewStateDidChange):
2326 2011-05-13 Oliver Hunt <oliver@apple.com>
2328 Reviewed by Geoffrey Garen.
2330 Make GC validation more aggressive
2331 https://bugs.webkit.org/show_bug.cgi?id=60802
2333 Add GC_VALIDATION calls to all the JSNPObject methods.
2335 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2336 (WebKit::JSNPObject::invalidate):
2337 (WebKit::JSNPObject::callMethod):
2338 (WebKit::JSNPObject::callObject):
2339 (WebKit::JSNPObject::callConstructor):
2340 (WebKit::JSNPObject::getCallData):
2341 (WebKit::JSNPObject::getConstructData):
2342 (WebKit::JSNPObject::getOwnPropertySlot):
2343 (WebKit::JSNPObject::getOwnPropertyDescriptor):
2344 (WebKit::JSNPObject::put):
2345 (WebKit::JSNPObject::getOwnPropertyNames):
2346 (WebKit::JSNPObject::propertyGetter):
2347 (WebKit::JSNPObject::methodGetter):
2349 2011-05-13 Anders Carlsson <andersca@apple.com>
2351 Reviewed by Sam Weinig.
2353 NPN_GetURL with a javascript: URL doesn't send back the result in the stream
2354 https://bugs.webkit.org/show_bug.cgi?id=60810
2356 In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL
2357 to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object
2358 to avoid sending it over the wire.
2360 * PluginProcess/PluginControllerProxy.cpp:
2361 (WebKit::PluginControllerProxy::didEvaluateJavaScript):
2362 * PluginProcess/PluginControllerProxy.h:
2363 * PluginProcess/PluginControllerProxy.messages.in:
2364 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2365 (WebKit::NetscapePlugin::loadURL):
2366 (WebKit::NetscapePlugin::didEvaluateJavaScript):
2367 (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
2368 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2369 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2370 (WebKit::NetscapePluginStream::NetscapePluginStream):
2371 (WebKit::NetscapePluginStream::sendJavaScriptStream):
2372 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2373 (WebKit::NetscapePluginStream::create):
2374 * WebProcess/Plugins/Plugin.h:
2375 * WebProcess/Plugins/PluginProxy.cpp:
2376 (WebKit::PluginProxy::didEvaluateJavaScript):
2377 * WebProcess/Plugins/PluginProxy.h:
2378 * WebProcess/Plugins/PluginView.cpp:
2379 (WebKit::PluginView::performJavaScriptURLRequest):
2381 2011-05-13 Jeff Miller <jeffm@apple.com>
2383 Reviewed by Darin Adler.
2385 Make some page() member functions const
2386 https://bugs.webkit.org/show_bug.cgi?id=60794
2388 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Make page() const.
2389 * UIProcess/WebFrameProxy.h:
2390 (WebKit::WebFrameProxy::page): Make page() const.
2391 * UIProcess/WebInspectorProxy.h:
2392 (WebKit::WebInspectorProxy::page): Make page() const.
2393 * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
2394 (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2395 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
2396 (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2397 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
2398 (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2399 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2400 (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
2402 2011-05-13 Adam Roben <aroben@apple.com>
2404 Load plugins in the order they're found
2406 Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
2407 doesn't prefer plugins in the additional plugins directory
2409 Reviewed by Anders Carlsson.
2411 * UIProcess/Plugins/PluginInfoStore.cpp:
2412 (WebKit::addFromVector):
2413 Changed to use a ListHashSet instead of a HashSet to store the plugin paths.
2415 2011-05-13 Sam Weinig <sam@webkit.org>
2417 Reviewed by Anders Carlsson.
2419 Prune #includes from FrameView.h (Part 2)
2420 https://bugs.webkit.org/show_bug.cgi?id=60748
2422 - Update files that were depending on FrameView.h #including Frame.h or
2425 * WebProcess/Plugins/PluginView.cpp:
2426 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2427 * WebProcess/WebPage/WebContextMenu.cpp:
2428 * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2430 2011-05-13 Martin Robinson <mrobinson@igalia.com>
2432 Reviewed by Eric Seidel.
2434 [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
2435 https://bugs.webkit.org/show_bug.cgi?id=59765
2437 Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
2438 class we can now share the code with WebKit2.
2440 * UIProcess/API/gtk/PageClientImpl.cpp:
2441 (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
2442 (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.
2443 * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member.
2445 2011-05-12 Pratik Solanki <psolanki@apple.com>
2447 Reviewed by Antti Koivisto.
2449 Part of WebCore should use CFNetwork-based loader on Mac
2450 https://bugs.webkit.org/show_bug.cgi?id=51836
2452 Use CFRunLoop when using CFNetwork.
2454 * WebProcess/WebPage/mac/WebPageMac.mm:
2455 (WebKit::WebPage::platformInitialize):
2457 2011-05-12 Sam Weinig <sam@webkit.org>
2459 Reviewed by Gavin Barraclough.
2461 WebProcess sandbox denies file:/// accesses after you navigate to a nonexistent file
2462 <rdar://problem/9427752>
2463 https://bugs.webkit.org/show_bug.cgi?id=60745
2465 * WebProcess/WebPage/WebPage.cpp:
2466 (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
2467 Don't attempt to re-use a non-existent committed sandbox extension. This can
2468 happen when the previous load was file: url, but did not require an extension,
2469 such as an error page.
2471 2011-05-12 Jia Pu <jpu@apple.com>
2473 Reviewed by Darin Adler.
2475 Regression caused by changeset 86281
2476 https://bugs.webkit.org/show_bug.cgi?id=60712
2477 <rdar://problem/9427970>
2479 Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking.
2480 So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal()
2481 returns. So we don't need to use the condition to coordinate between these two function. In fact,
2482 all callbacks are delivered on main thread. We don't really need any locking here.
2484 Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has
2487 * UIProcess/API/mac/PageClientImpl.mm:
2488 (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
2489 * UIProcess/mac/CorrectionPanel.h:
2490 * UIProcess/mac/CorrectionPanel.mm:
2491 (WebKit::CorrectionPanel::CorrectionPanel):
2492 (WebKit::CorrectionPanel::show):
2493 (WebKit::CorrectionPanel::dismiss):
2494 (WebKit::CorrectionPanel::dismissInternal):
2495 (WebKit::CorrectionPanel::handleAcceptedReplacement):
2497 2011-05-12 Brian Weinstein <bweinstein@apple.com>
2499 Reviewed by Adam Roben.
2501 WebKit2: Implement plugin quirk for Mozilla user agent for older Flash
2502 https://bugs.webkit.org/show_bug.cgi?id=60726
2503 <rdar://problem/8470824>
2505 Implement the quirk for versions of Flash before v10 that only request windowless plugins
2506 if we use a Mozilla user agent.
2508 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
2509 (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the
2510 "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use
2511 the Mozilla user agent.
2512 * Shared/Plugins/PluginQuirks.h:
2513 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2514 (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user
2516 * win/WebKit2.vcproj: Add PluginQuirks.h.
2518 2011-05-12 Anders Carlsson <andersca@apple.com>
2520 Reviewed by Simon Fraser.
2522 PluginView::invalidateRect doesn't work for transformed plug-ins
2523 https://bugs.webkit.org/show_bug.cgi?id=60727
2524 <rdar://problem/9331244>
2526 Ask the RenderObject to repaint the plug-in instead of using invalidateContentsAndWindow.
2527 This matches what we do in WebKit1.
2529 * WebProcess/Plugins/PluginView.cpp:
2530 (WebKit::PluginView::invalidateRect):
2532 2011-05-12 Jessie Berlin <jberlin@apple.com>
2534 Reviewed by Darin Adler.
2536 [Windows WebKit2] Use cookies set in WebKit1
2537 https://bugs.webkit.org/show_bug.cgi?id=60274
2539 Properly handle the case where there is no serialized default storage session by not trying
2540 to encode or decode 0, while still making sure to decode any valid storage session.
2542 * Shared/WebProcessCreationParameters.cpp:
2543 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2544 (WebKit::WebProcessCreationParameters::encode):
2545 Only encode the storage session if there is one to encode.
2546 (WebKit::WebProcessCreationParameters::decode):
2547 Only decode the storage session there is one to decode.
2548 * Shared/WebProcessCreationParameters.h:
2550 2011-05-11 Brian Weinstein <bweinstein@apple.com>
2552 Reviewed by Anders Carlsson.
2554 After relaunching an unresponsive web process, web page stops responding to mouse movement
2555 https://bugs.webkit.org/show_bug.cgi?id=60669
2556 <rdar://problem/9409934>
2558 * UIProcess/WebPageProxy.cpp:
2559 (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
2562 2011-05-10 Tony Gentilcore <tonyg@chromium.org>
2564 Reviewed by Darin Adler.
2566 Perform some forward declarations suggested by include-what-you-use
2567 https://bugs.webkit.org/show_bug.cgi?id=60545
2569 * WebProcess/WebPage/mac/WebPageMac.mm:
2571 2011-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
2573 Reviewed by Martin Robinson.
2575 Fix the build with ENABLE_PLUGIN_PROCESS
2576 https://bugs.webkit.org/show_bug.cgi?id=60628
2578 * WebProcess/Plugins/PluginProxy.cpp:
2579 (WebKit::PluginProxy::initialize): Move the call to
2580 pluginController->isAcceleratedCompositingEnabled() to a #ifdef block.
2581 * WebProcess/Plugins/PluginProxy.h: Add include for <WebCore/IntRect.h>.
2583 2011-05-11 Damian Kaleta <dkaleta@apple.com>
2585 Reviewed by Brady Eidson.
2587 Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
2588 https://bugs.webkit.org/show_bug.cgi?id=60674
2590 * UIProcess/API/C/WKPage.cpp:
2591 (WKPageTryRestoreScrollPosition):
2592 * UIProcess/API/C/WKPage.h:
2593 * UIProcess/WebPageProxy.cpp:
2594 (WebKit::WebPageProxy::tryRestoreScrollPosition):
2595 * UIProcess/WebPageProxy.h:
2596 * WebProcess/WebPage/WebPage.cpp:
2597 (WebKit::WebPage::tryRestoreScrollPosition):
2598 * WebProcess/WebPage/WebPage.h:
2599 * WebProcess/WebPage/WebPage.messages.in:
2601 2011-05-11 Sam Weinig <sam@webkit.org>
2603 Reviewed by Gavin Barraclough.
2605 WebKit2 doesn't build on Mac with strict PassOwnPtr
2606 https://bugs.webkit.org/show_bug.cgi?id=60655
2608 * Platform/CoreIPC/HandleMessage.h:
2609 (CoreIPC::handleMessageDelayed):
2610 Add explicit adoptPtr to indicate that the constructor is taking ownership.
2612 2011-05-11 Jessie Berlin <jberlin@apple.com>
2614 Reviewed by Steve Falkenburg.
2616 [Windows WebKit2] Use cookies set in WebKit1
2617 https://bugs.webkit.org/show_bug.cgi?id=60274
2619 Share the default storage session between the UI and Web Processes.
2621 * Shared/WebProcessCreationParameters.cpp:
2622 (WebKit::WebProcessCreationParameters::encode):
2623 Only encode the session parameter if it is valid.
2624 (WebKit::WebProcessCreationParameters::decode):
2625 Don't try to decode a null session data.
2626 * Shared/WebProcessCreationParameters.h:
2627 Add a parameter for a serialized default storage session, used only on Windows.
2629 * Shared/win/WebCoreArgumentCodersWin.cpp:
2630 (CoreIPC::decodeResourceRequest):
2631 Make sure to set the current storage session on any requests used by the Web
2632 Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2633 doing anything with the Web Process's default storage session.
2635 * UIProcess/win/WebContextWin.cpp:
2636 (WebKit::WebContext::platformInitializeWebProcess):
2637 Serialize the default storage session in the UI Process and add it to the
2638 WebProcessCreationParameters.
2640 * WebProcess/WebPage/win/WebPageWin.cpp:
2641 (WebKit::cachedResponseForURL):
2642 Use the cache associated with the current storage session and make sure the request has the
2643 current storage session set on it before doing anything with it.
2645 * WebProcess/win/WebProcessWin.cpp:
2646 (WebKit::WebProcess::platformSetCacheModel):
2647 Use the default storage session.
2648 (WebKit::WebProcess::platformClearResourceCaches):
2650 (WebKit::WebProcess::platformInitializeWebProcess):
2651 Deserialize the default storage session passed in by the UI Process and hand it to the
2654 2011-05-11 Jia Pu <jpu@apple.com>
2656 Reviewed by Darin Adler.
2658 CorrectionPanel sometimes hangs in dismissSoon().
2659 https://bugs.webkit.org/show_bug.cgi?id=60599
2660 <rdar://problem/9313628>
2662 Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal
2663 to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal,
2664 for condition checking.
2666 * UIProcess/mac/CorrectionPanel.h:
2667 * UIProcess/mac/CorrectionPanel.mm:
2668 (WebKit::CorrectionPanel::CorrectionPanel):
2669 (WebKit::CorrectionPanel::show):
2670 (WebKit::CorrectionPanel::dismissSoon):
2671 (WebKit::CorrectionPanel::dismissInternal):
2672 (WebKit::CorrectionPanel::handleAcceptedReplacement):
2674 2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
2676 Unreviewed, rolling out r86255.
2677 http://trac.webkit.org/changeset/86255
2678 https://bugs.webkit.org/show_bug.cgi?id=60660
2680 REGRESSION (r86255): Lots of tests crashing in
2681 CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
2682 (WebKit2 Tests) (Requested by aroben on #webkit).
2684 * Shared/WebProcessCreationParameters.cpp:
2685 (WebKit::WebProcessCreationParameters::encode):
2686 (WebKit::WebProcessCreationParameters::decode):
2687 * Shared/WebProcessCreationParameters.h:
2688 * Shared/win/WebCoreArgumentCodersWin.cpp:
2689 (CoreIPC::decodeResourceRequest):
2690 * UIProcess/win/WebContextWin.cpp:
2691 (WebKit::WebContext::platformInitializeWebProcess):
2692 * WebProcess/WebPage/win/WebPageWin.cpp:
2693 (WebKit::cachedResponseForURL):
2694 * WebProcess/win/WebProcessWin.cpp:
2695 (WebKit::WebProcess::platformSetCacheModel):
2696 (WebKit::WebProcess::platformClearResourceCaches):
2697 (WebKit::WebProcess::platformInitializeWebProcess):
2699 2011-05-11 Adam Roben <aroben@apple.com>
2701 Don't notify the plugin when a targeted javascript: URL request completes
2703 This matches Mozilla and WebKit1.
2705 Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
2706 plugin doesn't appear on a hanes.com page
2708 Test: plugins/get-targeted-javascript-url.html
2710 Reviewed by Anders Carlsson.
2712 * WebProcess/Plugins/PluginView.cpp:
2713 (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
2714 request had a target.
2716 2011-05-11 Jessie Berlin <jberlin@apple.com>
2718 Reviewed by Steve Falkenburg.
2720 [Windows WebKit2] Use cookies set in WebKit1
2721 https://bugs.webkit.org/show_bug.cgi?id=60274
2723 Share the default storage session between the UI and Web Processes.
2725 * Shared/WebProcessCreationParameters.cpp:
2726 (WebKit::WebProcessCreationParameters::encode):
2727 (WebKit::WebProcessCreationParameters::decode):
2728 * Shared/WebProcessCreationParameters.h:
2729 Add a parameter for a serialized default storage session, used only on Windows.
2731 * Shared/win/WebCoreArgumentCodersWin.cpp:
2732 (CoreIPC::decodeResourceRequest):
2733 Make sure to set the current storage session on any requests used by the Web
2734 Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2735 doing anything with the Web Process's default storage session.
2737 * UIProcess/win/WebContextWin.cpp:
2738 (WebKit::WebContext::platformInitializeWebProcess):
2739 Serialize the default storage session in the UI Process and add it to the
2740 WebProcessCreationParameters.
2742 * WebProcess/WebPage/win/WebPageWin.cpp:
2743 (WebKit::cachedResponseForURL):
2744 Use the cache associated with the current storage session and make sure the request has the
2745 current storage session set on it before doing anything with it.
2747 * WebProcess/win/WebProcessWin.cpp:
2748 (WebKit::WebProcess::platformSetCacheModel):
2749 Use the default storage session.
2750 (WebKit::WebProcess::platformClearResourceCaches):
2752 (WebKit::WebProcess::platformInitializeWebProcess):
2753 Deserialize the default storage session passed in by the UI Process and hand it to the
2756 2011-05-11 Sam Weinig <sam@webkit.org>
2758 Reviewed by Adam Roben.
2760 WebKit2 should tell app that is unresponsive in more cases
2761 <rdar://problem/9110151>
2762 https://bugs.webkit.org/show_bug.cgi?id=60608
2764 * UIProcess/DrawingAreaProxyImpl.cpp:
2765 (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2766 (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2767 Invoke the responsiveness time when forcing a backing store update
2768 to catch the cases of activating tabs, resizing the window, etc.
2770 2011-05-11 Martin Robinson <mrobinson@igalia.com>
2772 Try to fix the WinCairo build.
2774 * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and
2775 guard it with USE(CAIRO) instead of PLATFORM(CAIRO).
2777 2011-05-11 John Sullivan <sullivan@apple.com>
2779 Reviewed by Darin Adler.
2781 <https://bugs.webkit.org/show_bug.cgi?id=60631>
2782 <rdar://problem/9420520>
2784 WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631]
2786 * UIProcess/WebPageProxy.cpp:
2787 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2788 Call clearPendingAPIRequestURL().
2790 2011-05-11 Adam Roben <aroben@apple.com>
2792 Turn on strict PassOwnPtr on Windows
2794 Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
2796 Reviewed by Adam Barth.
2798 * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
2799 (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0.
2801 2011-05-11 Jessie Berlin <jberlin@apple.com>
2803 Reviewed by Darin Adler.
2805 [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information
2806 about the usage for both the origin overall and the database in question.
2807 https://bugs.webkit.org/show_bug.cgi?id=60573
2809 Add the currentOriginUsage parameter.
2811 * Platform/CoreIPC/HandleMessage.h:
2812 (CoreIPC::callMemberFunction):
2813 * UIProcess/API/C/WKPage.h:
2814 * UIProcess/WebPageProxy.cpp:
2815 (WebKit::WebPageProxy::exceededDatabaseQuota):
2816 * UIProcess/WebPageProxy.h:
2817 * UIProcess/WebPageProxy.messages.in:
2818 * UIProcess/WebUIClient.cpp:
2819 (WebKit::WebUIClient::exceededDatabaseQuota):
2820 * UIProcess/WebUIClient.h:
2821 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2822 (WebKit::WebChromeClient::exceededDatabaseQuota):
2824 2011-05-10 Oliver Hunt <oliver@apple.com>
2826 Reviewed by Geoffrey Garen.
2828 Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page
2829 https://bugs.webkit.org/show_bug.cgi?id=60580
2831 The plugin object map was incorrect trying to implement a weak map itself using
2832 destructors. Switch to a WeakGCMap and the problem is fixed.
2834 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2835 (WebKit::JSNPObject::~JSNPObject):
2836 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2837 (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
2838 (WebKit::NPRuntimeObjectMap::invalidate):
2839 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2841 2011-05-10 Sam Weinig <sam@webkit.org>
2843 Reviewed by Dan Bernstein.
2845 Yet more quarantine related sandbox denial when downloading files
2846 <rdar://problem/9397494>
2848 * WebProcess/com.apple.WebProcess.sb:
2850 2011-05-10 Sam Weinig <sam@webkit.org>
2852 Reviewed by Anders Carlsson.
2854 WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return
2855 https://bugs.webkit.org/show_bug.cgi?id=60584
2857 * UIProcess/WebPageProxy.cpp:
2858 (WebKit::WebPageProxy::handleWheelEvent):
2859 (WebKit::canCoalesce):
2861 (WebKit::coalescedWheelEvent):
2862 (WebKit::WebPageProxy::didReceiveEvent):
2863 (WebKit::WebPageProxy::processDidCrash):
2864 Reworks coalescing/merging code to happen on didReceiveEvent rather than in
2865 handleWheelEvent. This means we now store the pending events in a queue, and
2866 pull them out when we can.
2868 * UIProcess/WebPageProxy.h:
2869 Change single event containers to contain all pending/merged/coalesced events
2870 and remove unused flag.
2872 2011-05-09 Jeremy Noble <jer.noble@apple.com>
2874 Reviewed by Darin Adler.
2876 WebKit2: Cancelling full screen before animation completes leads to full screen window staying up.
2877 https://bugs.webkit.org/show_bug.cgi?id=60531
2879 Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and
2880 _isExitingFullScreen. These will ensure each is only called once per full screen request, and
2881 that if one exit/enter request interrupts another, that the required functions are called in
2884 * UIProcess/mac/WKFullScreenWindowController.h:
2885 * UIProcess/mac/WKFullScreenWindowController.mm:
2886 (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating.
2887 (-[WKFullScreenWindowController exitFullScreen]): Ditto.
2888 (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen
2889 and call [self finishedExitFullScreenAnimation:] if necessary.
2890 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen.
2891 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen
2892 and call [self finishedEnterFullScreenAnimation:] if necessary.
2893 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen.
2895 2011-05-10 Beth Dakin <bdakin@apple.com>
2897 Reviewed by Darin Adler.
2899 https://bugs.webkit.org/show_bug.cgi?id=60582
2900 Crash switching overlay/non-overlay scrollbar preference still possible
2902 <rdar://problem/9323983>
2904 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2905 (InitWebCoreSystemInterface):
2907 2011-05-10 Jeff Miller <jeffm@apple.com>
2909 Reviewed by Anders Carlsson.
2911 WebKit2: Windows clients need to know if the page overlay is installed
2912 https://bugs.webkit.org/show_bug.cgi?id=60562
2913 <rdar://problem/8940164>
2915 Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
2916 WebKit clients need to know whether WebKit is drawing the page overlay or not. Keep track of this in
2917 the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
2919 * UIProcess/API/C/win/WKView.cpp:
2920 (WKViewIsPageOverlayInstalled): Added.
2921 * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
2923 * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
2924 * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
2925 * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
2926 * UIProcess/win/WebPageProxyWin.cpp:
2927 (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
2929 * UIProcess/win/WebView.cpp:
2930 (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
2931 (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
2932 * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
2933 (WebKit::WebView::pageOverlayInstalled): Added.
2935 * WebProcess/WebPage/WebPage.cpp:
2936 (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
2937 (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
2939 2011-05-10 Anders Carlsson <andersca@apple.com>
2941 Reviewed by Adam Roben.
2943 Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply
2944 https://bugs.webkit.org/show_bug.cgi?id=60567
2945 <rdar://problem/9377845>
2947 It is possible to receive an incoming sync reply that is for a request we don't know about.
2948 This could happen if the sync message send timed out for example.
2950 * Platform/CoreIPC/Connection.cpp:
2951 (CoreIPC::Connection::processIncomingSyncReply):
2953 2011-05-05 Brent Fulgham <bfulgham@webkit.org> and Martin Robinson <mrobinson@igalia.com>
2955 Reviewed by Anders Carlsson.
2957 [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
2958 https://bugs.webkit.org/show_bug.cgi?id=60293
2960 * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo.
2961 * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations.
2962 * Shared/cairo/ShareableBitmapCairo.cpp:
2963 (WebKit::ShareableBitmap::createGraphicsContext): Added.
2964 (WebKit::ShareableBitmap::paint): Added.
2965 (WebKit::ShareableBitmap::createCairoSurface): Added.
2966 (WebKit::ShareableBitmap::releaseSurfaceData): Added.
2968 2011-05-10 Anders Carlsson <andersca@apple.com>
2970 Reviewed by Sam Weinig.
2972 Extra sign in required to view video on MobileMe Gallery album
2973 https://bugs.webkit.org/show_bug.cgi?id=60560
2975 Implement NPN_GetAuthenticationInfo.
2977 * PluginProcess/PluginControllerProxy.cpp:
2978 (WebKit::PluginControllerProxy::getAuthenticationInfo):
2979 Send a GetAuthenticationInfo message to the web process.
2981 * PluginProcess/PluginControllerProxy.h:
2982 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2983 (WebKit::initializeProtectionSpace):
2984 Initialize a WebCore::ProtectionSpace object from NPAPI parameters.
2986 (WebKit::NPN_GetAuthenticationInfo):
2987 Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo.
2988 Finally, copy the username/password and pass them back to the plug-in.
2990 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2991 (WebKit::NetscapePlugin::getAuthenticationInfo):
2992 Call the plug-in controller.
2994 * WebProcess/Plugins/PluginController.h:
2995 Add getAuthenticationInfo pure virtual member function.
2997 * WebProcess/Plugins/PluginProxy.cpp:
2998 (WebKit::PluginProxy::getAuthenticationInfo):
2999 Call the real plug-in controller's getAuthenticationInfo member function.
3001 * WebProcess/Plugins/PluginProxy.messages.in:
3002 Add GetAuthenticationInfo message.
3004 * WebProcess/Plugins/PluginView.cpp:
3005 (WebKit::PluginView::getAuthenticationInfo):
3006 Try to get the authentication info from the credential storage. Failing that,
3007 get it from the persistent credential storage.
3009 2011-05-10 Adam Roben <aroben@apple.com>
3011 Use FontSmoothingLevelWindows by default on Windows
3013 Fixes <http://webkit.org/b/60557> REGRESSION (r86077): Web Inspector uses CG font rendering
3014 in WebKit2 on Windows
3016 Reviewed by Darin Adler.
3018 * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL
3019 macro to let Windows have a different default font smoothing level from other platforms.
3021 * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font
3024 2011-05-06 Tony Gentilcore <tonyg@chromium.org>
3026 Reviewed by Darin Adler.
3028 Fix some unnecessary includes in headers
3029 https://bugs.webkit.org/show_bug.cgi?id=60388
3031 * WebProcess/FullScreen/WebFullScreenManager.cpp:
3033 2011-05-09 Jeremy Noble <jer.noble@apple.com>
3035 Reviewed by Darin Adler.
3037 Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
3038 https://bugs.webkit.org/show_bug.cgi?id=60496
3040 When animating into and out of full screen, order out and back in the original webView window,
3041 disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
3042 as the webView is hosted in the full screen window when we ask for it's parent window.
3044 * UIProcess/mac/WKFullScreenWindowController.mm:
3045 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3046 (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
3048 2011-05-09 Dan Bernstein <mitz@apple.com>
3050 Reviewed by Darin Adler.
3052 A WKView with plug-ins paints white when first moved into a window
3053 https://bugs.webkit.org/show_bug.cgi?id=60511
3055 The UI process’s wait for DidUpdateBackingStoreState would always time out because the Web process
3056 was blocked on a synchronous message the UI process trying to get the connections for plug-ins in
3057 the view. This is avoided by deferring the call to Page::setCanStartMedia().
3059 * WebProcess/WebPage/WebPage.cpp:
3060 (WebKit::WebPage::WebPage): Initialize the new m_setCanStartMediaTimer.
3061 (WebKit::WebPage::setCanStartMediaTimerFired): Added. Calls setCanStartMedia(true) when the timer
3063 (WebKit::WebPage::setIsInWindow): When going out of a window, stop the timer. When going into a
3065 * WebProcess/WebPage/WebPage.h:
3067 2011-05-09 Anders Carlsson <andersca@apple.com>
3069 Reviewed by Dan Bernstein.
3071 Crash when sending a sync message to a crashed web process
3072 https://bugs.webkit.org/show_bug.cgi?id=60514
3073 <rdar://problem/9281270>
3075 Change WebProcessProxy::sendSync to return false if there's no connection.
3077 Audit all WebProcessProxy::sendSync call sites to initialize reply parameters.
3079 * UIProcess/WebPageProxy.cpp:
3080 (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
3081 (WebKit::WebPageProxy::getSelectedText):
3082 (WebKit::WebPageProxy::gestureWillBegin):
3083 * UIProcess/WebProcessProxy.h:
3084 (WebKit::WebProcessProxy::sendSync):
3085 * UIProcess/mac/WebPageProxyMac.mm:
3086 (WebKit::WebPageProxy::insertText):
3087 (WebKit::WebPageProxy::getMarkedRange):
3088 (WebKit::WebPageProxy::getSelectedRange):
3089 (WebKit::WebPageProxy::characterIndexForPoint):
3090 (WebKit::WebPageProxy::executeKeypressCommands):
3091 (WebKit::WebPageProxy::writeSelectionToPasteboard):
3092 (WebKit::WebPageProxy::readSelectionFromPasteboard):
3094 2011-05-09 Anders Carlsson <andersca@apple.com>
3096 Reviewed by Sam Weinig.
3098 Create a plug-in's MIME types preferences plist if it doesn't exist.
3099 https://bugs.webkit.org/show_bug.cgi?id=57204
3100 <rdar://problem/9195048>
3102 Spawn a plug-in process and let it create the plist. For now, we'll do this on the
3103 main thread since it's a rare one-time computation and we have an API function,
3104 WKFrameCanShowMIMEType, which would have to block anyway.
3106 * PluginProcess/mac/PluginProcessMainMac.mm:
3107 (WebKit::PluginProcessMain):
3108 If -createPluginMIMETypesPreferences is one of the command line argument keys,
3109 the plug-in path will be the argument value. Call NetscapePluginModule::createPluginMIMETypesPreferences
3110 to create the preferences file and then exit.
3112 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3113 (WebKit::contentsOfPropertyListAtURL):
3114 Move code to read a property list out into a helper function.
3116 (WebKit::getMIMETypesFromPluginBundle):
3117 If there's no property list file, try to create one.
3119 (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences):
3120 Load the plug-in, find the BP_CreatePluginMIMETypesPreferences and call it.
3122 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3123 (WebKit::PluginProcessProxy::createPropertyListFile):
3124 Spawn a plug-in process and pass the -createPluginMIMETypesPreferences flag to it and then wait
3127 2011-05-09 Anders Carlsson <andersca@apple.com>
3129 Reviewed by Sam Weinig.
3131 Move EnvironmentVariables out into its own .cpp file
3132 https://bugs.webkit.org/show_bug.cgi?id=60507
3134 * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Added.
3135 (WebKit::EnvironmentVariables::EnvironmentVariables):
3136 (WebKit::EnvironmentVariables::~EnvironmentVariables):
3137 (WebKit::EnvironmentVariables::set):
3138 (WebKit::EnvironmentVariables::get):
3139 (WebKit::EnvironmentVariables::appendValue):
3140 (WebKit::EnvironmentVariables::valueIfVariableHasName):
3141 (WebKit::EnvironmentVariables::createStringForVariable):
3142 (WebKit::EnvironmentVariables::copyEnvironmentVariables):
3143 * UIProcess/Launcher/mac/EnvironmentVariables.h: Added.
3144 (WebKit::EnvironmentVariables::environmentPointer):
3145 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3146 * WebKit2.xcodeproj/project.pbxproj:
3148 2011-05-09 Adam Roben <aroben@apple.com>
3150 Always set the font rendering mode based on preference values
3152 WebPage::platformInitialize and WebPage::platformPreferencesDidChange were fighting over the
3153 font rendering mode. The platformInitialize code predates preference-based font rendering
3154 mode support, and is now redundant and incorrect.
3156 Fixes <http://webkit.org/b/60494> WebKit2 uses GDI text instead of CG text when
3157 FontSmoothing preference is set to kWKFontSmoothingLevelNoSubpixelAntiAliasing in a .plist
3160 Reviewed by Sam Weinig.
3162 * WebProcess/WebPage/win/WebPageWin.cpp:
3163 (WebKit::WebPage::platformInitialize): Removed code to set the font rendering mode.
3164 platformPreferencesDidChange will take care of this for us.
3166 2011-05-09 Anders Carlsson <andersca@apple.com>
3168 Reviewed by John Sullivan.
3170 Clean up NetscapePluginModule::getPluginInfo
3171 https://bugs.webkit.org/show_bug.cgi?id=60486
3173 Make all 'get' functions take a PluginInfoStore::Plugin reference, since getPluginInfoFromPropertyLists
3174 is going to need it to know the path and plug-in architecture.
3176 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3177 (WebKit::getPluginArchitecture):
3178 (WebKit::getPluginInfoFromPropertyLists):
3179 (WebKit::getPluginInfoFromCarbonResources):
3180 (WebKit::NetscapePluginModule::getPluginInfo):
3182 2011-05-09 Dan Bernstein <mitz@apple.com>
3184 Reviewed by Darin Adler.
3186 <rdar://problem/9005982> REGRESSION (r85780): Flash of white when a WKView with composited content moves on-screen
3187 https://bugs.webkit.org/show_bug.cgi?id=60488
3189 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3190 (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Update m_compositingAccordingToProxyMessages,
3191 since the DidUpdateBackingStoreState message also changes the compositing state in the proxy.
3193 2011-05-09 Benjamin Poulain <benjamin.poulain@nokia.com>
3195 Reviewed by Andreas Kling.
3197 Build fix for WebKit 2 on Qt
3199 Qt treats warnings as errors so it does not build with unused variables. This patch removed two unused variable in WebKit 2.
3201 * UIProcess/TiledDrawingAreaProxy.cpp:
3202 (WebKit::TiledDrawingAreaProxy::createTiles):
3203 * WebProcess/Plugins/PluginView.cpp:
3204 (WebKit::PluginView::~PluginView):
3206 2011-05-07 Dan Bernstein <mitz@apple.com>
3208 Reviewed by Timothy Hatcher.
3210 <rdar://problem/9365358> REGRESSION (WebKit2): When clicking in the page, Find overlay fades out instead of disappearing immediately
3212 * WebProcess/WebPage/FindController.cpp:
3213 (WebKit::FindController::hideFindUI): Do not fade out the overlay.
3215 2011-05-07 Dan Bernstein <mitz@apple.com>
3217 Avoid copying a header file into the WebKit2 framework wrapper.
3219 * WebKit2.xcodeproj/project.pbxproj: Corrected the target membership of HTTPCookieAcceptPolicy.h.
3221 2011-05-07 Sheriff Bot <webkit.review.bot@gmail.com>
3223 Unreviewed, rolling out r86016.
3224 http://trac.webkit.org/changeset/86016
3225 https://bugs.webkit.org/show_bug.cgi?id=60445
3227 caused crashes on the WK2 Windows bots (Requested by
3228 jessieberlin on #webkit).
3230 * Shared/WebProcessCreationParameters.cpp:
3231 (WebKit::WebProcessCreationParameters::encode):
3232 (WebKit::WebProcessCreationParameters::decode):
3233 * Shared/WebProcessCreationParameters.h:
3234 * Shared/win/WebCoreArgumentCodersWin.cpp:
3235 (CoreIPC::decodeResourceRequest):
3236 * UIProcess/win/WebContextWin.cpp:
3237 (WebKit::WebContext::platformInitializeWebProcess):
3238 * WebProcess/WebPage/win/WebPageWin.cpp:
3239 (WebKit::cachedResponseForURL):
3240 * WebProcess/win/WebProcessWin.cpp:
3241 (WebKit::WebProcess::platformSetCacheModel):
3242 (WebKit::WebProcess::platformClearResourceCaches):
3243 (WebKit::WebProcess::platformInitializeWebProcess):
3245 2011-05-07 Jessie Berlin <jberlin@apple.com>
3247 Reviewed by Steve Falkenburg.
3249 [Windows WebKit2] Use cookies set in WebKit1
3250 https://bugs.webkit.org/show_bug.cgi?id=60274
3252 Share the default storage session between the UI and Web Processes.
3254 * Shared/WebProcessCreationParameters.cpp:
3255 (WebKit::WebProcessCreationParameters::encode):
3256 (WebKit::WebProcessCreationParameters::decode):
3257 * Shared/WebProcessCreationParameters.h:
3258 Add a parameter for a serialized default storage session, used only on Windows.
3260 * Shared/win/WebCoreArgumentCodersWin.cpp:
3261 (CoreIPC::decodeResourceRequest):
3262 Make sure to set the current storage session on any requests used by the Web
3263 Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
3264 doing anything with the Web Process's default storage session.
3266 * UIProcess/win/WebContextWin.cpp:
3267 (WebKit::WebContext::platformInitializeWebProcess):
3268 Serialize the default storage session in the UI Process and add it to the
3269 WebProcessCreationParameters.
3271 * WebProcess/WebPage/win/WebPageWin.cpp:
3272 (WebKit::cachedResponseForURL):
3273 Use the cache associated with the current storage session and make sure the request has the
3274 current storage session set on it before doing anything with it.
3276 * WebProcess/win/WebProcessWin.cpp:
3277 (WebKit::WebProcess::platformSetCacheModel):
3278 Use the default storage session.
3279 (WebKit::WebProcess::platformClearResourceCaches):
3281 (WebKit::WebProcess::platformInitializeWebProcess):
3282 Deserialize the default storage session passed in by the UI Process and hand it to the
3285 2011-05-07 Keith Kyzivat <keith.kyzivat@nokia.com>
3287 Reviewed by Adam Roben.
3289 [Qt] Webkit2 PLUGIN_ARCHITECTURE(UNSUPPORTED) configuration broken by r85961
3290 https://bugs.webkit.org/show_bug.cgi?id=60420
3292 * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
3293 (WebKit::NetscapePlugin::platformVisibilityDidChange):
3295 2011-05-06 Martin Robinson <mrobinson@igalia.com>
3297 Reviewed by Xan Lopez.
3299 [GTK] [WebKit2] WebView::windowToScreen needs an implementation
3300 https://bugs.webkit.org/show_bug.cgi?id=55960
3302 Add an implementation of PageClient::windowToScreen for GTK+ WebKit2 using
3303 the newly abstracted widget to screen coordinate translation code in WebCore.
3305 * UIProcess/API/gtk/PageClientImpl.cpp:
3306 (WebKit::PageClientImpl::windowToScreen): Added implementation.
3308 2011-05-06 Anders Carlsson <andersca@apple.com>
3310 Reviewed by Dan Bernstein.
3312 Simplify the PluginInfoStore interface
3313 https://bugs.webkit.org/show_bug.cgi?id=60406
3315 Just expose a single API for getting a list of plug-ins from the info store,
3316 PluginInfoStore::plugins and remove PluginInfoStore::getPlugins and PluginInfoStore::getPluginPaths.
3318 Also, change the WebContext::pluginInfoStore() getter to return a reference.
3320 * UIProcess/Plugins/PluginInfoStore.cpp:
3321 (WebKit::PluginInfoStore::plugins):
3322 * UIProcess/Plugins/PluginInfoStore.h:
3323 * UIProcess/Plugins/PluginProcessManager.cpp:
3324 (WebKit::PluginProcessManager::getPluginProcessConnection):
3325 * UIProcess/Plugins/PluginProcessManager.h:
3326 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
3327 (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
3328 (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
3329 (WebKit::WebPluginSiteDataManager::getSitesWithData):
3330 (WebKit::WebPluginSiteDataManager::clearSiteData):
3331 * UIProcess/WebContext.cpp:
3332 (WebKit::WebContext::getPlugins):
3333 (WebKit::WebContext::getPluginPath):
3334 * UIProcess/WebContext.h:
3335 (WebKit::WebContext::pluginInfoStore):
3336 * UIProcess/WebPageProxy.cpp:
3337 (WebKit::WebPageProxy::canShowMIMEType):
3339 2011-05-06 Anders Carlsson <andersca@apple.com>
3343 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3344 (WebKit::PluginInfoStore::shouldUsePlugin):
3346 2011-05-06 Anders Carlsson <andersca@apple.com>
3348 Reviewed by Dan Bernstein.
3350 Make more PluginInfoStore member functions static
3351 https://bugs.webkit.org/show_bug.cgi?id=60401
3353 This is a first step towards making PluginInfoStore thread safe.
3355 * UIProcess/Plugins/PluginInfoStore.cpp:
3356 (WebKit::PluginInfoStore::loadPluginsIfNecessary):
3357 (WebKit::PluginInfoStore::loadPlugin):
3358 * UIProcess/Plugins/PluginInfoStore.h:
3359 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3360 (WebKit::PluginInfoStore::shouldUsePlugin):
3361 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3362 (WebKit::PluginInfoStore::shouldUsePlugin):
3363 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3364 (WebKit::PluginInfoStore::shouldUsePlugin):
3366 2011-05-06 Adam Roben <aroben@apple.com>
3370 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added a
3373 2011-05-06 Adam Roben <aroben@apple.com>
3375 Show/hide windowed plugins according to the plugin element's visibility CSS property
3377 Fixes <http://webkit.org/b/60285> <rdar://problem/9152400> REGRESSION (WebKit2): A white
3378 rectangle covers up important UI elements when composing a new message at mail.yahoo.com
3379 with BrowserPlus! plug-in installed
3381 Reviewed by Anders Carlsson.
3383 * PluginProcess/PluginControllerProxy.cpp:
3384 (WebKit::PluginControllerProxy::isPluginVisible):
3385 * PluginProcess/PluginControllerProxy.h:
3388 * Shared/win/WindowGeometry.cpp:
3389 (WebKit::WindowGeometry::WindowGeometry):
3390 (WebKit::WindowGeometry::encode):
3391 (WebKit::WindowGeometry::decode):
3392 * Shared/win/WindowGeometry.h:
3393 Added visible member.
3395 * UIProcess/win/WebView.cpp:
3396 (WebKit::WebView::updateChildWindowGeometries): Show or hide the window as specified in the
3399 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3400 (WebKit::NetscapePlugin::visibilityDidChange):
3401 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3402 Added. Calls through to platform-specific code.
3404 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3405 (WebKit::NetscapePlugin::platformVisibilityDidChange):
3406 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3407 (WebKit::NetscapePlugin::platformVisibilityDidChange):
3410 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3411 (WebKit::NetscapePlugin::platformGeometryDidChange): Moved most logic from here to
3412 scheduleWindowedGeometryUpdate.
3413 (WebKit::NetscapePlugin::platformVisibilityDidChange): Added. Calls through to
3414 scheduleWindowedGeometryUpdate.
3415 (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): Added. Code came from
3416 platformGeometryDidChange. Now also records whether the plugin element is visible.
3418 * WebProcess/Plugins/Plugin.h: Added visibilityDidChange.
3420 * WebProcess/Plugins/PluginController.h: Added isPluginVisible.
3422 * WebProcess/Plugins/PluginProxy.cpp:
3423 (WebKit::PluginProxy::visibilityDidChange):
3424 * WebProcess/Plugins/PluginProxy.h:
3427 * WebProcess/Plugins/PluginView.cpp:
3428 (WebKit::PluginView::show):
3429 (WebKit::PluginView::hide):
3430 Added. These Widget overrides were based on WebCore's PluginView class.
3432 (WebKit::PluginView::viewVisibilityDidChange): Added. Similar to viewGeometryDidChange.
3433 Calls down to the plugin if it's been initialized.
3434 (WebKit::PluginView::isPluginVisible): Added. Just calls up to the Widget base class.
3436 * WebProcess/Plugins/PluginView.h: Updated for PluginController changes.
3438 2011-05-06 Adam Roben <aroben@apple.com>
3440 Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message
3442 This will make it easier to add more info to this message in the future (like whether the
3445 Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate
3448 Reviewed by Anders Carlsson.
3450 * Scripts/webkit2/messages.py:
3451 (struct_or_class): Added WindowGeometry to the list of structs.
3453 * Shared/win/WindowGeometry.cpp: Added.
3454 * Shared/win/WindowGeometry.h: Added.
3456 * win/WebKit2.vcproj: Added new files.
3458 * UIProcess/PageClient.h:
3459 * UIProcess/WebPageProxy.h:
3460 * UIProcess/WebPageProxy.messages.in:
3461 * UIProcess/win/WebPageProxyWin.cpp:
3462 (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
3463 * UIProcess/win/WebView.cpp:
3464 (WebKit::WebView::scheduleChildWindowGeometryUpdate):
3465 (WebKit::WebView::updateChildWindowGeometries):
3466 * UIProcess/win/WebView.h:
3467 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3468 (WebKit::NetscapePlugin::platformGeometryDidChange):
3469 * WebProcess/Plugins/PluginController.h:
3470 * WebProcess/Plugins/PluginView.cpp:
3471 (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
3472 * WebProcess/Plugins/PluginView.h:
3473 * WebProcess/WebPage/WebPage.h:
3474 * WebProcess/WebPage/win/WebPageWin.cpp:
3475 (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
3476 Changed to use WindowGeometry.
3478 2011-05-06 David Kilzer <ddkilzer@apple.com>
3480 Remove unused GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings
3482 Reviewed by Jon Honeycutt.
3484 This fixes an Xcode 4 warning about using obsolete settings.