1 2014-05-25 Sam Weinig <sam@webkit.org>
5 * UIProcess/API/Cocoa/WKPreferences.h:
7 2014-05-24 Sam Weinig <sam@webkit.org>
9 [WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
10 https://bugs.webkit.org/show_bug.cgi?id=133258
12 Reviewed by Anders Carlsson.
14 To support changing default values of preferences based on which API you are using (either
15 the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
16 HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
17 instead of four HashMaps. This allows us to use two of these new HashMaps, one for the actual
18 set values, and one for overridden defaults. This new Value class will also allow easier incremental
19 updating of preferences in the future.
21 Other notable changes:
22 - Removed Float kind of preferences. There were none.
23 - Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
25 * Shared/WebPreferencesStore.cpp:
26 * Shared/WebPreferencesStore.h:
28 2014-05-25 David Kilzer <ddkilzer@apple.com>
30 Add type-checked casts for TransformOperations
31 <http://webkit.org/b/133217>
33 Reviewed by Simon Fraser.
35 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
36 (IPC::ArgumentCoder<TransformOperations>::encode):
37 - Switch to type-checked casts.
39 2014-05-25 David Kilzer <ddkilzer@apple.com>
41 Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
42 <http://webkit.org/b/133203>
44 Reviewed by Simon Fraser.
46 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
47 (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
48 - Replace static_cast<>() operators with type-checking
49 FilterOperation casts.
50 - Replace 'default' statement with 'case' statements so new
51 filters added later require an explicit decision to be made.
52 (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
53 - Replace 'default' statement with 'case' statements so new
54 filters added later require an explicit decision to be made.
56 2014-05-24 Jon Honeycutt <jhoneycutt@apple.com>
58 Potential null dereference in
59 WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
60 <https://bugs.webkit.org/show_bug.cgi?id=133193>
62 WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
63 InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
64 before sending a message to the UI process that a provisional load has
65 failed. It's possible for the provisional document loader to become
66 null while calling into the InjectedBundleLoaderClient (as is the case
67 with the WebKitTestRunner's injected bundle), leading to a null
68 dereference when trying to send the DidFailProvisionalLoadForFrame
71 Reviewed by Darin Adler.
73 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
74 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
75 Get the navigation ID before calling into the injected bundle.
77 2014-05-23 Simon Fraser <simon.fraser@apple.com>
79 Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
80 https://bugs.webkit.org/show_bug.cgi?id=133254
82 Reviewed by Tim Horton.
84 Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
86 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
87 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
88 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
90 2014-05-24 Chris Fleizach <cfleizach@apple.com>
92 AX: fix coordinate mapping for iOS accessibility
93 https://bugs.webkit.org/show_bug.cgi?id=133188
95 Reviewed by Sam Weinig.
97 Add in accessibility conversion methods that will check if the methods are present
98 (if accessibility is not on, they won't be)
99 and use those to convert points into the right coordinate space that VoiceOver is expecting.
101 * UIProcess/PageClient.h:
102 * UIProcess/WebPageProxy.cpp:
103 (WebKit::WebPageProxy::accessibilityScreenToRootView):
104 (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
105 * UIProcess/WebPageProxy.h:
106 * UIProcess/WebPageProxy.messages.in:
107 * UIProcess/ios/PageClientImplIOS.h:
108 * UIProcess/ios/PageClientImplIOS.mm:
109 (WebKit::PageClientImpl::accessibilityScreenToRootView):
110 (WebKit::PageClientImpl::rootViewToAccessibilityScreen):
111 * UIProcess/mac/PageClientImpl.h:
112 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
113 (WebKit::WebChromeClient::accessibilityScreenToRootView):
114 (WebKit::WebChromeClient::rootViewToAccessibilityScreen):
115 * WebProcess/WebCoreSupport/WebChromeClient.h:
116 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
117 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
118 * WebProcess/WebPage/WebPage.cpp:
119 (WebKit::WebPage::accessibilityScreenToRootView):
120 (WebKit::WebPage::rootViewToAccessibilityScreen):
121 * WebProcess/WebPage/WebPage.h:
123 2014-05-24 Carlos Garcia Campos <cgarcia@igalia.com>
125 REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
126 https://bugs.webkit.org/show_bug.cgi?id=131675
128 Reviewed by Anders Carlsson.
130 Since r165841 the connection is opened after the pending messages
131 are sent, because connectionWillOpen might send messages that we
132 want to happen after the ones already pending. The problem is that
133 Connection::canSendOutgoingMessages() returns false when
134 connection hasn't been opened. We should ensure no messages are
135 sent by connectionWillOpen.
137 * Shared/ChildProcessProxy.cpp:
138 (WebKit::ChildProcessProxy::didFinishLaunching): Open the
139 connection before sending pending messages.
140 * UIProcess/WebPageProxy.cpp:
141 (WebKit::WebPageProxy::connectionWillOpen): Do not call
142 VisitedLinkProvider::addProcess() here because it tries to send a
143 message to the web process, but the connection hasn't be opened yet.
144 (WebKit::WebPageProxy::processDidFinishLaunching): Call
145 VisitedLinkProvider::addProcess() here instead.
146 * UIProcess/WebPageProxy.h:
147 * UIProcess/WebProcessProxy.cpp:
148 (WebKit::WebProcessProxy::didFinishLaunching): Call
149 WebPageProxy::processDidFinishLaunching() for every web page.
151 2014-05-23 Ian Henderson <ianh@apple.com>
153 REGRESSION: Rubberbanding out jumps to top left corner on google.com
154 https://bugs.webkit.org/show_bug.cgi?id=133253
155 <rdar://problem/17025664>
157 Reviewed by Benjamin Poulain.
159 * UIProcess/API/Cocoa/WKWebView.mm:
160 (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
161 Avoid deceleration during zooming to work around a UIKit bug.
163 2014-05-23 Benjamin Poulain <bpoulain@apple.com>
165 [iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
166 https://bugs.webkit.org/show_bug.cgi?id=133255
167 <rdar://problem/16890926>
169 Reviewed by Simon Fraser.
171 All the updates were mostly harmless since they are pretty cheap, but they can be
172 very annoying for debugging.
174 This patch skips viewportUpdates in the trivial cases.
176 * UIProcess/API/Cocoa/WKWebView.mm:
177 (-[WKWebView _setMinimumLayoutSizeOverride:]):
178 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
179 * WebProcess/WebPage/WebPage.cpp:
180 (WebKit::WebPage::mainFrameDidLayout):
181 * WebProcess/WebPage/ios/WebPageIOS.mm:
182 (WebKit::WebPage::viewportPropertiesDidChange):
184 2014-05-23 Benjamin Poulain <bpoulain@apple.com>
186 [iOS][WK2] The page scale factor randomly resets to initial scale when editing
187 https://bugs.webkit.org/show_bug.cgi?id=133244
189 Reviewed by Enrica Casucci.
191 We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
192 to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
194 This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
195 and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
198 * UIProcess/API/Cocoa/WKWebView.mm:
199 (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
200 (-[WKWebView scrollViewWillBeginZooming:withView:]):
201 (-[WKWebView scrollViewWillBeginDragging:]):
202 * UIProcess/API/Cocoa/WKWebViewInternal.h:
203 * UIProcess/API/ios/WKViewIOS.mm:
204 (-[WKView scrollViewWillBeginDragging:]):
205 * UIProcess/ios/WKContentView.h:
206 * UIProcess/ios/WKContentView.mm:
207 (-[WKContentView willStartUserTriggeredZoom]):
208 (-[WKContentView willStartUserTriggeredScroll]): Deleted.
209 * UIProcess/ios/WKContentViewInteraction.h:
210 * UIProcess/ios/WKContentViewInteraction.mm:
211 (-[WKContentView willStartPanOrPinchGesture]):
212 (-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
214 2014-05-23 Tim Horton <timothy_horton@apple.com>
216 REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
217 https://bugs.webkit.org/show_bug.cgi?id=132794
218 <rdar://problem/16877909>
220 Reviewed by Simon Fraser.
222 * WebKit2.xcodeproj/project.pbxproj:
223 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
224 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
225 * WebProcess/WebCoreSupport/WebChromeClient.h:
226 * WebProcess/WebPage/DrawingArea.h:
227 (WebKit::DrawingArea::graphicsLayerFactory):
228 (WebKit::DrawingArea::createDisplayRefreshMonitor):
229 Plumb the DisplayRefreshMonitor request through to the DrawingArea.
230 RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
232 * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
233 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
234 * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
235 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
236 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
237 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
238 When requesting a display refresh callback, schedule a layer commit.
239 It may end up being empty, but will still call us back with a didUpdate,
240 upon which we'll fire the callback.
242 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
244 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
245 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
246 (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
247 (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
248 Keep track of the set of DisplayRefreshMonitors.
250 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
251 Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
253 2014-05-23 Jeremy Jones <jeremyj@apple.com>
255 Hide fullscreen immediately when switching tabs.
256 https://bugs.webkit.org/show_bug.cgi?id=133239
258 Reviewed by Eric Carlson.
260 Renamed a function to better describe it's new functionality.
262 * UIProcess/WebPageProxy.cpp:
263 (WebKit::WebPageProxy::viewStateDidChange):
264 now calls: requestHideAndExitFullscreen
266 2014-05-23 Enrica Casucci <enrica@apple.com>
268 REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
269 https://bugs.webkit.org/show_bug.cgi?id=133243
270 <rdar://problem/16761913>
272 Reviewed by Benjamin Poulain.
274 We need to ensure that when an element loses focus and another one gets it,
275 this is handled in one single message in the UI process to avoid seeing
276 the keyboard animating in and out.
277 This is accomplished by always postponing the blur notification until all events
279 If a new node is focused before the delayed blur notification is sent to the UI
280 process, the message we send includes both blur and focus notification. In this case,
281 the postponed blur notification is not sent.
283 * UIProcess/PageClient.h:
284 * UIProcess/WebPageProxy.h:
285 * UIProcess/WebPageProxy.messages.in:
286 * UIProcess/ios/PageClientImplIOS.h:
287 * UIProcess/ios/PageClientImplIOS.mm:
288 (WebKit::PageClientImpl::startAssistingNode):
289 * UIProcess/ios/WKContentViewInteraction.h:
290 * UIProcess/ios/WKContentViewInteraction.mm:
291 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
292 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
293 * UIProcess/ios/WebPageProxyIOS.mm:
294 (WebKit::WebPageProxy::startAssistingNode):
295 * WebProcess/WebPage/WebPage.cpp:
296 (WebKit::WebPage::WebPage):
297 * WebProcess/WebPage/WebPage.h:
298 * WebProcess/WebPage/ios/WebPageIOS.mm:
299 (WebKit::WebPage::elementDidFocus):
300 (WebKit::WebPage::elementDidBlur):
302 2014-05-23 Anders Carlsson <andersca@apple.com>
306 * WebProcess/WebPage/WebPage.cpp:
307 (WebKit::WebPage::loadRequest):
309 2014-05-23 Tim Horton <timothy_horton@apple.com>
311 [iOS] WKPDFView should have a page indicator
312 https://bugs.webkit.org/show_bug.cgi?id=133109
313 <rdar://problem/16383003>
315 Reviewed by Anders Carlsson.
317 * UIProcess/API/Cocoa/WKWebView.mm:
318 (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
319 (-[WKWebView _setObscuredInsets:]):
320 Forward obscured insets changes to the custom content view.
322 (-[WKWebView _updateScrollViewBackground]):
323 If we have a custom content view, use its background instead of the
324 (likely nonexistent) page's when updaing the scroll view's background color.
326 * UIProcess/API/Cocoa/WKWebViewInternal.h:
327 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
328 * UIProcess/Cocoa/WKWebViewContentProvider.h:
329 * UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
330 * UIProcess/API/Cocoa/WKWebView.mm:
331 (-[WKWebView _setInsetForOverlaidAccessoryViews:]):
332 Add SPI for clients to inform us about potential overlaid accessory views
333 which should be taken into account e.g. for positioning the page indicator.
335 Add a view that sits fixed on top of the WKWebView, ignores interaction,
336 but provides the WKWebViewContentProvider a place to install views
337 that don't scroll along with the content.
339 * UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
340 * UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
341 (-[WKPDFPageNumberIndicator initWithFrame:]):
342 (-[WKPDFPageNumberIndicator dealloc]):
343 (-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
344 (-[WKPDFPageNumberIndicator setPageCount:]):
345 (-[WKPDFPageNumberIndicator show]):
346 (-[WKPDFPageNumberIndicator hide:]):
347 (-[WKPDFPageNumberIndicator moveToPoint:animated:]):
348 (-[WKPDFPageNumberIndicator sizeThatFits:]):
349 (-[WKPDFPageNumberIndicator _updateLabel]):
350 (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
351 Add a page number indicator.
353 * UIProcess/ios/WKPDFView.mm:
354 (-[WKPDFView dealloc]):
355 (-[WKPDFView web_setScrollView:]):
356 (-[WKPDFView _revalidateViews]):
357 (-[WKPDFView _offsetForPageNumberIndicator]):
358 (-[WKPDFView _updatePageNumberIndicator]):
359 (-[WKPDFView web_setObscuredInsets:]):
360 (-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
361 (-[WKPDFView web_setFixedOverlayView:]):
362 (-[WKPDFView _computePageAndDocumentFrames]):
363 Update the page number indicator when the topmost visible page changes.
364 Move the page number indicator around when the obscured insets change.
366 * WebKit2.xcodeproj/project.pbxproj:
368 2014-05-23 Anders Carlsson <andersca@apple.com>
370 Fix test failures on the bot.
372 * UIProcess/API/Cocoa/WKProcessPool.mm:
373 (websiteDataDirectoryURL):
374 If we have no bundle identifier, use the process name.
376 2014-05-23 Enrica Casucci <enrica@apple.com>
378 REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
379 https://bugs.webkit.org/show_bug.cgi?id=133237
380 <rdar://problem/16655776>
382 Reviewed by Ryosuke Niwa.
384 * UIProcess/ios/WKContentViewInteraction.mm:
385 (-[WKContentView beginSelectionChange]):
386 (-[WKContentView endSelectionChange]):
388 When the selection is changed with a gesture in an editable element,
389 we must notify the keyboard to make sure the autocorrection engine
390 updates its typing context. WKContentView must implement
391 beginSelectionChange and endSelectionChange to call into
394 2014-05-22 Brent Fulgham <bfulgham@apple.com>
396 [iOS] WK2: Provide implementation for windowFrame
397 https://bugs.webkit.org/show_bug.cgi?id=133205
398 <rdar://problem/16894890>
400 Reviewed by Benjamin Poulain.
402 * UIProcess/Cocoa/UIDelegate.h:
403 * UIProcess/Cocoa/UIDelegate.mm:
404 (WebKit::UIDelegate::UIClient::windowFrame): Added.
405 * UIProcess/ios/PageClientImplIOS.mm:
406 (WebKit::PageClientImpl::convertToUserSpace): Added.
408 2014-05-20 Anders Carlsson <andersca@apple.com>
410 Use a per app directory structure for website data
411 https://bugs.webkit.org/show_bug.cgi?id=133125
412 <rdar://problem/16830143>
414 Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
416 Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
417 We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
419 * UIProcess/API/Cocoa/WKProcessPool.mm:
420 (websiteDataDirectoryURL):
421 (-[WKProcessPool _initWithConfiguration:]):
423 2014-05-23 Dan Bernstein <mitz@apple.com>
425 [Cocoa] WKNavigationResponsePrivate.h is internal
426 https://bugs.webkit.org/show_bug.cgi?id=133218
428 Reviewed by Dean Jackson.
430 * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
432 2014-05-23 Carlos Garcia Campos <cgarcia@igalia.com>
434 [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
435 https://bugs.webkit.org/show_bug.cgi?id=131024
437 Reviewed by Gustavo Noronha Silva.
439 Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
440 files that are now shared by GTK and EFL ports. These files call a
441 main method that wraps a new method ChildProcessMain that contains
442 the common code and uses a helper class for the platform specific
443 code. GTK+ and EFL ports implement that helper class for every process type.
445 * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
447 * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
448 (WebKit::NetworkProcessMainUnix):
449 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
450 (WebKit::NetworkProcessMainUnix):
451 * NetworkProcess/unix/NetworkProcessMainUnix.h:
454 * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
456 * PluginProcess/unix/PluginProcessMainUnix.cpp:
457 (WebKit::webkitXError):
458 (WebKit::PluginProcessMainUnix):
459 * PluginProcess/unix/PluginProcessMainUnix.h:
460 * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
461 (WebKit::ChildProcessMainBase::parseCommandLine):
462 * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
463 (WebKit::ChildProcessMainBase::platformInitialize):
464 (WebKit::ChildProcessMainBase::platformFinalize):
465 (WebKit::ChildProcessMainBase::initializationParameters):
466 (WebKit::ChildProcessMain):
467 * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
469 * WebProcess/efl/WebProcessMainEfl.cpp:
470 (WebKit::WebProcessMainUnix):
471 (dummyExtensionErrorHandler): Deleted.
472 * WebProcess/gtk/WebProcessMainGtk.cpp:
473 (WebKit::WebProcessMainUnix):
474 * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
476 2014-05-22 Zan Dobersek <zdobersek@igalia.com>
478 Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
479 https://bugs.webkit.org/show_bug.cgi?id=133082
481 Reviewed by Andreas Kling.
483 * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
484 This enforces a move instead of a copy if the decoded element's type is move-constructible.
486 2014-05-22 Zan Dobersek <zdobersek@igalia.com>
488 Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
489 https://bugs.webkit.org/show_bug.cgi?id=133080
491 Reviewed by Andreas Kling.
493 * Platform/IPC/MessageDecoder.cpp:
494 (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
495 Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
496 and produces a copy otherwise.
498 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
500 [iOS][WK2] Add support for minimal-ui viewports
501 https://bugs.webkit.org/show_bug.cgi?id=133162
503 Reviewed by Simon Fraser.
505 In the WebKit2 layers, we have two parts to minimal-ui.
506 -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
507 Another part is freezing the state on page load.
508 -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
509 the UI clients about minimal-ui changes.
511 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
512 * UIProcess/API/Cocoa/WKWebView.mm:
513 (-[WKWebView _setUsesMinimalUI:]):
514 (-[WKWebView _usesMinimalUI]):
515 (-[WKWebView _didCommitLayerTree:WebKit::]):
516 (-[WKWebView _frameOrBoundsChanged]):
517 (-[WKWebView _minimumLayoutSizeOverride]):
518 (-[WKWebView _setMinimumLayoutSizeOverride:]):
519 (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
520 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
521 (-[WKWebView _largestUnobscuredSizeOverride]):
522 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
523 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
524 (setViewportConfigurationMinimumLayoutSize): Deleted.
525 * UIProcess/API/Cocoa/WKWebViewInternal.h:
526 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
527 * UIProcess/PageClient.h:
528 * UIProcess/WebPageProxy.h:
529 * UIProcess/WebPageProxy.messages.in:
530 * UIProcess/ios/PageClientImplIOS.h:
531 * UIProcess/ios/PageClientImplIOS.mm:
532 (WebKit::PageClientImpl::setUsesMinimalUI):
533 * UIProcess/ios/WebPageProxyIOS.mm:
534 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
535 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
536 (WebKit::WebPageProxy::setMaximumUnobscuredSize):
537 (WebKit::WebPageProxy::setUsesMinimalUI):
538 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
539 * WebProcess/WebPage/WebPage.cpp:
540 (WebKit::WebPage::WebPage):
541 (WebKit::WebPage::didCommitLoad):
542 * WebProcess/WebPage/WebPage.h:
543 * WebProcess/WebPage/WebPage.messages.in:
544 * WebProcess/WebPage/ios/WebPageIOS.mm:
545 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
546 (WebKit::WebPage::setMaximumUnobscuredSize):
547 (WebKit::WebPage::willFlushLayers):
548 (WebKit::WebPage::dynamicViewportSizeUpdate):
549 (WebKit::WebPage::viewportConfigurationChanged):
550 (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
551 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
552 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
553 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
555 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
557 [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
558 https://bugs.webkit.org/show_bug.cgi?id=133165
559 <rdar://problem/16283914>
561 Reviewed by Andy Estes.
563 It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
564 and is reset after WKContentView was destructed.
565 This patch cleans up the target-action on destruction to avoid accessing a destructed object.
567 * UIProcess/ios/WKContentViewInteraction.mm:
568 (-[WKContentView cleanupInteraction]):
570 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
572 Do not force a layout when changing the FixedLayoutSize in WebPage
573 https://bugs.webkit.org/show_bug.cgi?id=133167
575 Reviewed by Andreas Kling.
577 WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
578 This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
580 FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
582 * WebProcess/WebPage/WebPage.cpp:
583 (WebKit::WebPage::setFixedLayoutSize):
585 2014-05-22 Andreas Kling <akling@apple.com>
587 [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
588 <https://webkit.org/b/133197>
589 <rdar://problem/17011561>
591 Try to free up as much memory as possible before going into background.
593 Reviewed by Gavin Barraclough.
595 * WebProcess/WebProcess.cpp:
596 (WebKit::WebProcess::processWillSuspend):
598 2014-05-22 Andreas Kling <akling@apple.com>
600 Hook up a setting for showing detailed logging during memory pressure relief.
601 <https://webkit.org/b/133194>
603 Plumb through the same setting that we used for detailed logging in WK1.
605 Reviewed by Gavin Barraclough.
607 * Shared/WebProcessCreationParameters.cpp:
608 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
609 (WebKit::WebProcessCreationParameters::encode):
610 (WebKit::WebProcessCreationParameters::decode):
611 * Shared/WebProcessCreationParameters.h:
612 * UIProcess/mac/WebContextMac.mm:
613 (WebKit::WebContext::platformInitializeWebProcess):
614 * WebProcess/cocoa/WebProcessCocoa.mm:
615 (WebKit::WebProcess::platformInitializeWebProcess):
617 2014-05-22 Andy Estes <aestes@apple.com>
619 [iOS] Send shareable resources to QuickLook if enabled
620 https://bugs.webkit.org/show_bug.cgi?id=133189
621 <rdar://problem/17003995>
623 Reviewed by Brady Eidson.
625 Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
628 * Shared/ShareableResource.cpp:
629 (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
630 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
631 * Shared/ShareableResource.h:
632 * WebProcess/Network/WebResourceLoader.cpp:
633 (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
636 2014-05-22 Martin Hock <mhock@apple.com>
638 [iOS] Enable -apple-system- styled elements to respond to system font size changes.
639 https://bugs.webkit.org/show_bug.cgi?id=133186
640 <rdar://problem/16583782>
642 Reviewed by Enrica Casucci.
644 * UIProcess/API/Cocoa/WKWebView.mm:
645 (-[WKWebView initWithFrame:configuration:]):
646 (-[WKWebView _contentSizeCategoryDidChange:]):
647 (-[WKWebView _contentSizeCategory]):
648 * UIProcess/WebPageProxy.h:
649 * UIProcess/ios/WebPageProxyIOS.mm:
650 (WebKit::WebPageProxy::contentSizeCategoryDidChange):
651 * WebProcess/WebPage/WebPage.h:
652 * WebProcess/WebPage/WebPage.messages.in:
653 * WebProcess/WebPage/ios/WebPageIOS.mm:
654 (WebKit::WebPage::contentSizeCategoryDidChange):
656 2014-05-22 Alexey Proskuryakov <ap@apple.com>
658 [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
659 https://bugs.webkit.org/show_bug.cgi?id=133187
660 <rdar://problem/16561084>
662 Reviewed by Tim Horton.
664 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
665 We already had it in WebContentService.Development, just not here.
667 2014-05-22 Alexey Proskuryakov <ap@apple.com>
669 [iOS][WK2] Application cache is broken
670 https://bugs.webkit.org/show_bug.cgi?id=133172
671 <rdar://problem/16994593>
673 Reviewed by Andy Estes.
675 * UIProcess/mac/WebContextMac.mm:
676 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
677 path for application cache database (same as WebKit1).
679 2014-05-22 Enrica Casucci <enrica@apple.com>
681 REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
682 https://bugs.webkit.org/show_bug.cgi?id=133183
683 <rdar://problem/17004207>
685 Reviewed by Geoff Garen.
687 The keyboard type should be search if the input type is search
688 or if it is text and it is inside a form with an action and either
689 name, id or title contain the word search. This matches the
690 heuristics we have in WK1 for iOS.
692 * WebProcess/WebPage/ios/WebPageIOS.mm:
693 (WebKit::WebPage::getAssistedNodeInformation):
695 2014-05-21 Oliver Hunt <oliver@apple.com>
697 Only enable sandbox extensions on mac.
703 2014-05-21 Oliver Hunt <oliver@apple.com>
705 [iOS] Enable sandboxing for the database process
706 https://bugs.webkit.org/show_bug.cgi?id=132963
708 Reviewed by Alexey Proskuryakov.
710 Simply ensure that the database process is running in a tight
711 sandbox. As part of this i've separated out ChildProcessIOS
712 and ensures that the database process loads a custom sandbox.
714 * Configurations/WebKit.xcconfig:
715 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
716 (WebKit::DatabaseProcess::initializeSandbox):
717 * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
718 * Shared/ios/ChildProcessIOS.mm: Added.
719 Essentially cloned from the Mac version, only all the OSX
720 specific logic has been stripped.
721 (WebKit::ChildProcess::setApplicationIsDaemon):
722 (WebKit::ChildProcess::platformInitialize):
723 (WebKit::ChildProcess::initializeSandbox):
724 (WebKit::ChildProcess::setQOS):
725 * Shared/mac/ChildProcessMac.mm:
726 Remove all the IOS ifdefs.
727 (WebKit::ChildProcess::setApplicationIsDaemon):
728 (WebKit::ChildProcess::platformInitialize):
729 (WebKit::ChildProcess::initializeSandbox):
730 (WebKit::ChildProcess::setQOS):
731 * WebKit2.xcodeproj/project.pbxproj:
733 2014-05-21 Andy Estes <aestes@apple.com>
735 [iOS] Create a UIPrintFormatter for WKWebView
736 https://bugs.webkit.org/show_bug.cgi?id=133005
738 Reviewed by Tim Horton.
740 Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
741 Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
742 of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
743 returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
744 overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
745 UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
746 returned the PDF data to us by the time we print the first page.
748 * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
749 * UIProcess/API/Cocoa/WKWebView.mm:
750 (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
751 (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
752 (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
753 If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
754 compute page rects for printing and then return the number of rects.
755 (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
756 (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
757 received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
758 since failing to receive the data results in printing some number of blank pages).
759 (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
760 * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
761 * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
762 * UIProcess/WKWebViewPrintFormatter.h: Added.
763 * UIProcess/WKWebViewPrintFormatter.mm: Added.
764 (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
765 (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
766 (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
767 and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
768 (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
770 (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
771 document into the given rect and context provided to us.
772 * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
773 * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
774 so that additoinal work could be performed after sending the response.
775 * UIProcess/ios/PageClientImplIOS.h:
776 * UIProcess/ios/PageClientImplIOS.mm:
777 (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
778 web process and called -[WKWebView _setPrintedDocument:].
779 * UIProcess/ios/WKPDFView.h:
780 * UIProcess/ios/WKPDFView.mm:
781 (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
782 (-[WKPDFView documentData]): Deleted.
783 * UIProcess/ios/WebPageProxyIOS.mm:
784 (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
785 * WebKit2.xcodeproj/project.pbxproj:
786 * WebProcess/WebPage/WebPage.cpp:
787 (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
788 (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
789 could be called by computePagesForPrintingAndStartDrawingToPDF.
790 (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
791 (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
792 by computePagesForPrintingAndStartDrawingToPDF.
793 * WebProcess/WebPage/WebPage.h:
794 * WebProcess/WebPage/WebPage.messages.in:
795 * WebProcess/WebPage/ios/WebPageIOS.mm:
796 (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
797 synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
798 WebPageProxy::DidFinishDrawingPagesToPDF.
800 2014-05-21 Michał Pakuła vel Rutka <m.pakula@samsung.com>
802 [EFL] Turn on ENABLE_CSS_FILTERS
803 https://bugs.webkit.org/show_bug.cgi?id=133153
805 Reviewed by Gyuyoung Kim.
807 Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
809 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
810 (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
812 2014-05-21 Brady Eidson <beidson@apple.com>
814 Special handling of telephone number detection menu.
815 <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
817 Reviewed by Geoff Garen.
819 Add a bool to ContextMenuContextData to represent telephone number menus:
820 * Shared/ContextMenuContextData.cpp:
821 (WebKit::ContextMenuContextData::ContextMenuContextData):
822 (WebKit::ContextMenuContextData::operator=):
823 (WebKit::ContextMenuContextData::encode):
824 (WebKit::ContextMenuContextData::decode):
825 * Shared/ContextMenuContextData.h:
826 (WebKit::ContextMenuContextData::ContextMenuContextData):
827 (WebKit::ContextMenuContextData::isTelephoneNumberContext):
829 * UIProcess/mac/WebContextMenuProxyMac.mm:
830 (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
831 number menu then display it using a specific AppKit API.
833 * UIProcess/mac/WebPageProxyMac.mm:
834 (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
835 through a new WKSI call, and then show it using a telephone number context.
837 2014-05-21 Alexey Proskuryakov <ap@apple.com>
839 [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
840 https://bugs.webkit.org/show_bug.cgi?id=133128
841 <rdar://problem/16890920>
843 Reviewed by Anders Carlsson.
845 * UIProcess/API/mac/WKView.mm:
846 (-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
847 plug-in input. Before async text input, we used to provide a nil input context due
848 to having _data->_interpretKeyEventsParameters while this function was executing,
849 and thus took a shortcut. The new behavior is different from pre-async in that
850 we don't collect commands at all, but I couldn't find any case where that mattered.
851 (-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
852 replacement for _interpretKeyEventsParameters one, because this variable is not
853 always set within -_interpretKeyEvent:completionHandler:.
855 * UIProcess/mac/WKTextInputWindowController.mm:
856 (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
857 While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
858 keep prediction pop-up on screen after hiding the bottom input window.
860 2014-05-16 Martin Robinson <mrobinson@igalia.com>
862 [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
863 https://bugs.webkit.org/show_bug.cgi?id=132819
865 Reviewed by Carlos Garcia Campos.
867 * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
868 * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
869 * efl/EWebKit2Config.cmake.in: Ditto.
870 * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
871 * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
872 the common CMake ones.
873 * webkit2gtk.pc.in: Ditto.
875 2014-05-21 Carlos Garcia Campos <cgarcia@igalia.com>
877 REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
878 https://bugs.webkit.org/show_bug.cgi?id=133118
880 Reviewed by Philippe Normand.
882 Call WebContext::applyPlatformSpecificConfigurationDefaults() to
883 initialize the WebContextConfiguration before creating the default WebContext.
885 * UIProcess/API/gtk/WebKitWebContext.cpp:
886 (createDefaultWebContext):
888 2014-05-21 Shivakumar JM <shiva.jm@samsung.com>
890 [WebKit2] Cleanup the build from unused variable in WebProcess module
891 https://bugs.webkit.org/show_bug.cgi?id=133062
893 Reviewed by Csaba Osztrogonác.
895 Fix unused parameter by using UNUSED_PARAM macro
897 * WebProcess/UserContent/WebUserContentController.cpp:
898 (WebKit::WebUserContentController::addUserScriptMessageHandlers):
899 (WebKit::WebUserContentController::removeUserScriptMessageHandler):
901 2014-05-20 Enrica Casucci <enrica@apple.com>
903 REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
904 https://bugs.webkit.org/show_bug.cgi?id=133140
905 <rdar://problem/16980898>
907 Reviewed by Benjamin Poulain.
909 When a page focuses a field on load, we receive the call to startAssistingNode
910 but we don't create a text interaction assistant if the focus is not originated
911 by a user action. Upon receiving the selection change notification we don't
912 call the text interaction assistant, since we don't have one, but we do call
913 the web selection assistant. We don't have any valid rects for web selection
914 and we clear the selection on the page, causing the caret not to appear and
915 the typing to have no effect.
917 * UIProcess/ios/WKContentViewInteraction.mm:
918 (-[WKContentView _updateChangedSelection]):
920 2014-05-20 Dean Jackson <dino@apple.com>
922 [Mac] Allow popup menus to override default appearance
923 https://bugs.webkit.org/show_bug.cgi?id=133129
925 Reviewed by Tim Horton.
927 Add an extra "hideArrows" flag to PlatformPopupMenuData
928 and replace the call to WKPopupMenuWithSize with WKPopupMenu.
930 * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
931 (WebKit::PlatformPopupMenuData::encode):
932 (WebKit::PlatformPopupMenuData::decode):
933 * Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
934 * UIProcess/mac/WebPopupMenuProxyMac.mm:
935 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
936 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
937 (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
938 true if we don't have the default appearance.
940 2014-05-20 Eric Carlson <eric.carlson@apple.com>
942 [Mac] do not deactivate an audio session that has running I/O
943 https://bugs.webkit.org/show_bug.cgi?id=133127
945 Reviewed by Jer Noble.
947 * WebProcess/WebPage/WebPage.cpp:
948 (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to
949 setShouldManageAudioSessionCategory, deal with it.
951 2014-05-19 Simon Fraser <simon.fraser@apple.com>
953 REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
954 https://bugs.webkit.org/show_bug.cgi?id=133106
955 <rdar://problem/16967648>
957 Reviewed by Sam Weinig.
959 Fix regression from r169063. That commit removed scrolledContentsLayers from
960 frame scrolling nodes, but they do actually use them.
962 So put them back; not in the base class, because they have a somewhat different
963 meaning for overflow scrolling and frame scrolling.
965 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
966 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
967 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
968 (WebKit::RemoteScrollingTreeTextStream::dump):
969 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
970 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
972 2014-05-20 Alexey Proskuryakov <ap@apple.com>
974 [Mac] WebProcess doesn't follow localization of UI process when run as a service
975 https://bugs.webkit.org/show_bug.cgi?id=133126
976 <rdar://problem/13396515>
977 <rdar://problem/16561084>
979 Reviewed by Sam Weinig and Tim Horton.
981 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
982 (WebKit::handleXPCBootstrap):
984 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
985 (WebKit::handleXPCBootstrap):
987 Set localization very early in process lifetime (in development builds, that's
988 even before WebKit framework is loaded).
990 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
991 Pass UI process localization to the service, computing it in the same way we do
994 2014-05-20 Anders Carlsson <andersca@apple.com>
997 https://bugs.webkit.org/show_bug.cgi?id=133123
998 <rdar://problem/16973783>
1000 Reviewed by Geoffrey Garen.
1002 * UIProcess/API/Cocoa/WKUserContentController.h:
1004 2014-05-20 Carlos Garcia Campos <cgarcia@igalia.com>
1006 [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
1007 https://bugs.webkit.org/show_bug.cgi?id=133119
1009 Reviewed by Sergio Villar Senin.
1011 The problem is that we were checking whether the passed in
1012 WKURLResponseRef is NULL or not, but it's always a valid object
1013 that can contain a NULL WebCore::ResourceResponse.
1015 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1016 (willSendRequestForFrame): Pass NULL as redirect-response
1017 parameter of WebKitWebPage::send-request signal when the
1018 WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
1020 2014-05-20 Antti Koivisto <antti@apple.com>
1022 Double-tap zoom does not take obscuring insets into account
1023 https://bugs.webkit.org/show_bug.cgi?id=133116
1024 <rdar://problem/16765604>
1026 Reviewed by Anders Carlsson.
1028 * UIProcess/API/Cocoa/WKWebView.mm:
1029 (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
1031 Compute the zoom target taking insets into account.
1033 2014-05-19 Gavin Barraclough <baraclough@apple.com>
1035 WebKit2/iOS: parented view should be considered hidden if app is backgrounded
1036 https://bugs.webkit.org/show_bug.cgi?id=133099
1039 Reviewed by Simon Fraser.
1041 * UIProcess/ios/PageClientImplIOS.mm:
1042 (WebKit::PageClientImpl::isViewWindowActive):
1043 - implemented in terms of isViewVisible.
1044 - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
1045 (WebKit::PageClientImpl::isViewFocused):
1046 - implemented in terms of isViewWindowActive.
1047 - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
1048 (WebKit::PageClientImpl::isViewVisible):
1049 - take UIApplication applicationState into account in determining visibility.
1050 (WebKit::PageClientImpl::isViewVisibleOrOccluded):
1051 - implemented in terms of isViewVisible.
1052 (WebKit::PageClientImpl::isVisuallyIdle):
1053 - implemented in terms of isViewVisible.
1054 * UIProcess/ios/WKContentView.mm:
1055 (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1056 - register for UIApplicationDidEnterBackgroundNotification.
1057 (-[WKContentView _applicationDidEnterBackground:]):
1058 (-[WKContentView _applicationWillEnterForeground:]):
1059 - when the application state changes all flags except IsInWindow may be affected.
1061 2014-05-19 Enrica Casucci <enrica@apple.com>
1063 WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
1064 https://bugs.webkit.org/show_bug.cgi?id=133100
1065 <rdar://problem/16808673>
1067 Reviewed by Benjamin Poulain.
1069 The call to focusNextAssistedNode is the result of a user action, since
1070 it is called when the user pressed the form navigation buttons.
1071 Therefore we must set m_userIsInteracting to true before changing the focus
1072 to make sure the focus change is honored.
1074 * WebProcess/WebPage/ios/WebPageIOS.mm:
1075 (WebKit::WebPage::focusNextAssistedNode):
1077 2014-05-19 Beth Dakin <bdakin@apple.com>
1079 TelephoneNumberOverlayController should use a modern loop for text quad bounding
1081 https://bugs.webkit.org/show_bug.cgi?id=133096
1083 Reviewed by Anders Carlsson.
1085 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1086 (WebKit::textQuadsToBoundingRectForRange):
1088 2014-05-19 Jeremy Jones <jeremyj@apple.com>
1090 PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
1091 https://bugs.webkit.org/show_bug.cgi?id=133025
1093 Reviewed by Simon Fraser.
1095 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1096 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
1097 Initialize PlatformCALayerRemote properties from the PlatformLayer.
1099 2014-05-19 Benjamin Poulain <bpoulain@apple.com>
1101 [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
1102 https://bugs.webkit.org/show_bug.cgi?id=133026
1103 <rdar://problem/16833971>
1105 Reviewed by Simon Fraser.
1107 When a page does not relayout, we keep the same width in view.
1108 When a page relayout, we should keep the same relative width in view.
1110 * WebProcess/WebPage/ios/WebPageIOS.mm:
1111 (WebKit::isResponsiveDesignWithContentLargerThanLayout):
1112 (WebKit::WebPage::dynamicViewportSizeUpdate):
1114 2014-05-19 Benjamin Poulain <benjamin@webkit.org>
1116 [WK2] Add some missing state reset on crash
1117 https://bugs.webkit.org/show_bug.cgi?id=133036
1119 Reviewed by Sam Weinig.
1121 * UIProcess/WebPageProxy.cpp:
1122 (WebKit::WebPageProxy::resetState):
1123 The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
1124 touch events when it shouldn't. That would only be for an active touch sequence.
1126 The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
1127 to the new page on reload, that is very bad.
1129 Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
1130 the callbacks for dictation.
1132 2014-05-19 Benjamin Poulain <bpoulain@apple.com>
1134 [iOS][WK2] Move scale noise filtering to the WebProcess
1135 https://bugs.webkit.org/show_bug.cgi?id=133021
1137 Reviewed by Darin Adler.
1139 Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
1141 The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
1142 is already supported. It is a better place to have the filtering.
1144 * UIProcess/ios/WKContentView.mm:
1145 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1146 * WebProcess/WebPage/ios/WebPageIOS.mm:
1147 (WebKit::WebPage::updateVisibleContentRects):
1149 2014-05-19 Simon Fraser <simon.fraser@apple.com>
1151 Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
1152 https://bugs.webkit.org/show_bug.cgi?id=133022
1154 Reviewed by Sam Weinig.
1156 In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
1157 into FrameScrolling and OverflowScrolling nodes.
1159 Move what was the "viewportSize" property onto the base class for the scrolling
1160 nodes, calling it "scrollableAreaSize".
1162 Make minimum/maximumScrollPosition() virtual so we can share more code (and there
1163 is more code sharing to be done in future).
1165 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1166 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1167 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1168 (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
1169 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1170 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1171 (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
1172 (WebKit::encodeNodeAndDescendants):
1173 (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1174 (WebKit::RemoteScrollingTreeTextStream::dump):
1175 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1176 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1177 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1178 (WebKit::RemoteScrollingTree::createNode):
1179 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1180 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
1181 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
1182 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1183 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
1184 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
1185 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
1186 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
1187 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
1188 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1189 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1191 2014-05-19 Alexey Proskuryakov <ap@apple.com>
1193 [Mac] Fix a typo in plug-in sandbox
1194 https://bugs.webkit.org/show_bug.cgi?id=133074
1196 Reviewed by Anders Carlsson.
1198 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1200 2014-05-16 Andy Estes <aestes@apple.com>
1202 [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
1203 https://bugs.webkit.org/show_bug.cgi?id=133010
1205 Reviewed by Geoffrey Garen.
1207 If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
1209 * Platform/IPC/Connection.cpp:
1210 (IPC::Connection::Connection):
1211 (IPC::Connection::waitForMessage):
1212 (IPC::Connection::connectionDidClose):
1213 * Platform/IPC/Connection.h:
1215 2014-05-19 Mark Rowe <mrowe@apple.com>
1217 Build fix after r169023.
1219 * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
1220 I hope for weinig's sake that no-one was relying on them.
1222 2014-05-18 Anders Carlsson <andersca@apple.com>
1224 Relax an assertion when creating document loaders
1225 https://bugs.webkit.org/show_bug.cgi?id=133058
1227 Reviewed by Sam Weinig.
1229 When navigating back/forward items recursively, createDocumentLoader will be called
1230 for subframes before main frames so only associate the navigation with main frames.
1232 * WebProcess/WebPage/WebPage.cpp:
1233 (WebKit::WebPage::createDocumentLoader):
1235 2014-05-18 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
1237 CMake Buildfix after r169023.
1239 Reviewed by Csaba Osztrogonác.
1241 * CMakeLists.txt: Add new files after r168994.
1243 2014-05-18 Sam Weinig <sam@webkit.org>
1245 [WebKit2] Implement ScriptMessageHandlers
1246 https://bugs.webkit.org/show_bug.cgi?id=133053
1248 Reviewed by Anders Carlsson.
1250 * DerivedSources.make:
1251 * Scripts/webkit2/messages.py:
1253 (argument_coder_headers_for_type):
1255 * UIProcess/API/Cocoa/WKScriptMessage.mm:
1256 (-[WKScriptMessage _initWithBody:webView:name:]):
1257 (-[WKScriptMessage body]):
1258 (-[WKScriptMessage webView]):
1259 (-[WKScriptMessage name]):
1260 (-[WKScriptMessage _scriptWorld]): Deleted.
1261 * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
1262 * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
1263 * UIProcess/API/Cocoa/WKUserContentController.mm:
1264 (-[WKUserContentController addScriptMessageHandler:name:]):
1265 (-[WKUserContentController removeScriptMessageHandlerForName:]):
1266 (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
1267 (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
1268 * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
1269 * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
1270 * UIProcess/API/Cocoa/WKWebView.mm:
1273 (-[WKWebView initWithFrame:configuration:]):
1274 (-[WKWebView dealloc]):
1275 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1276 * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
1277 (WebKit::WebScriptMessageHandlerHandle::encode):
1278 (WebKit::WebScriptMessageHandlerHandle::decode):
1279 (WebKit::generateIdentifier):
1280 (WebKit::WebScriptMessageHandler::create):
1281 (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
1282 (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
1283 * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
1284 (WebKit::WebScriptMessageHandler::Client::~Client):
1285 (WebKit::WebScriptMessageHandler::handle):
1286 (WebKit::WebScriptMessageHandler::identifier):
1287 (WebKit::WebScriptMessageHandler::name):
1288 (WebKit::WebScriptMessageHandler::client):
1289 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1290 (WebKit::WebUserContentControllerProxy::addProcess):
1291 (WebKit::WebUserContentControllerProxy::removeProcess):
1292 (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
1293 (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
1294 (WebKit::WebUserContentControllerProxy::didPostMessage):
1295 * UIProcess/UserContent/WebUserContentControllerProxy.h:
1296 * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
1297 * WebKit2.xcodeproj/project.pbxproj:
1298 * WebProcess/UserContent/WebUserContentController.cpp:
1299 (WebKit::WebUserMessageHandlerDescriptorProxy::create):
1300 (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
1301 (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
1302 (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
1303 (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
1304 (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
1305 (WebKit::WebUserContentController::addUserScriptMessageHandlers):
1306 (WebKit::WebUserContentController::removeUserScriptMessageHandler):
1307 * WebProcess/UserContent/WebUserContentController.h:
1308 * WebProcess/UserContent/WebUserContentController.messages.in:
1310 2014-05-18 Rik Cabanier <cabanier@adobe.com>
1312 support for navigator.hardwareConcurrency
1313 https://bugs.webkit.org/show_bug.cgi?id=132588
1315 Reviewed by Filip Pizlo.
1317 * Configurations/FeatureDefines.xcconfig:
1319 2014-05-18 Anders Carlsson <andersca@apple.com>
1321 Implement Navigations for all methods declared returning one
1322 https://bugs.webkit.org/show_bug.cgi?id=133048
1323 <rdar://problem/16830064>
1325 Reviewed by Sam Weinig.
1327 * UIProcess/API/Cocoa/WKWebView.mm:
1328 (-[WKWebView goToBackForwardListItem:]):
1329 (-[WKWebView goBack]):
1330 (-[WKWebView goForward]):
1331 (-[WKWebView reload]):
1332 (-[WKWebView reloadFromOrigin]):
1333 Create and return navigations.
1335 (-[WKWebView _reload]):
1336 Call -[WKWebView reload].
1338 * UIProcess/Cocoa/NavigationState.h:
1339 * UIProcess/Cocoa/NavigationState.mm:
1340 (WebKit::NavigationState::createBackForwardNavigation):
1341 Create a back/forward navigation.
1343 (WebKit::NavigationState::createReloadNavigation):
1344 Create a reload navigation.
1346 * UIProcess/WebPageProxy.cpp:
1347 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1348 Generate a navigation ID and send it with the GoToBackForwardItem message.
1350 (WebKit::WebPageProxy::reload):
1351 Return a navigation ID.
1353 (WebKit::WebPageProxy::goForward):
1354 Generate a navigation ID and send it with the GoForward message.
1356 (WebKit::WebPageProxy::goBack):
1357 Generate a navigation ID and send it with the GoBack message.
1359 (WebKit::WebPageProxy::goToBackForwardItem):
1360 Generate a navigation ID and send it with the GoToBackForwardItem message.
1362 * UIProcess/WebPageProxy.h:
1363 Return navigation IDs where appropriate.
1365 * UIProcess/cf/WebPageProxyCF.cpp:
1366 (WebKit::WebPageProxy::restoreFromSessionStateData):
1367 Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
1369 * WebProcess/WebPage/WebPage.cpp:
1370 (WebKit::WebPage::goForward):
1371 (WebKit::WebPage::goBack):
1372 (WebKit::WebPage::goToBackForwardItem):
1373 Set up the pending navigation ID.
1375 (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
1376 Call goToBackForwardItem with a navigation ID.
1378 * WebProcess/WebPage/WebPage.h:
1381 * WebProcess/WebPage/WebPage.messages.in:
1384 2014-05-18 Commit Queue <commit-queue@webkit.org>
1386 Unreviewed, rolling out r169001.
1387 https://bugs.webkit.org/show_bug.cgi?id=133050
1389 We can't expose the C SPI from WKWebView (Requested by
1390 andersca on #webkit).
1394 "Need a way to get a WKPageRef from a WKWebView"
1395 https://bugs.webkit.org/show_bug.cgi?id=133015
1396 http://trac.webkit.org/changeset/169001
1398 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
1400 [WK2][GTK] Buildfix after r168999.
1402 Reviewed by Csaba Osztrogonác.
1404 * UIProcess/gtk/WebContextGtk.cpp:
1405 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1406 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1408 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
1410 [WK2][EFL] Buildfix after r168999.
1412 Reviewed by Csaba Osztrogonác.
1414 * UIProcess/efl/WebContextEfl.cpp:
1415 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1416 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1418 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
1420 [WK2][cmake] Buildfix after r168994.
1422 Reviewed by Csaba Osztrogonác.
1424 * CMakeLists.txt: Added new files to the build system introduced in r168994.
1426 2014-05-17 Alexey Proskuryakov <ap@apple.com>
1428 REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
1429 https://bugs.webkit.org/show_bug.cgi?id=133007
1430 <rdar://problem/13702706>
1432 appcache tests often fail on the Mac WebKit2 bot
1433 https://bugs.webkit.org/show_bug.cgi?id=82061
1435 Reviewed by Maciej Stachowiak.
1437 * WebProcess/Network/WebResourceLoader.cpp:
1438 (WebKit::WebResourceLoader::willSendRequest):
1439 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
1440 (WebKit::WebResourceLoader::didFailResourceLoad):
1441 Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
1442 does. We should eventually come up with a way to share the code. Perhaps add a class that
1443 isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
1444 to be the class that isolates DocumentLoader from networking details. So, unsure.
1446 2014-05-17 Jae Hyun Park <jaepark@webkit.org>
1448 [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
1449 https://bugs.webkit.org/show_bug.cgi?id=132774
1451 Reviewed by Anders Carlsson.
1453 m_contentPosition is not used anywhere. So, this patch removes
1454 m_contentPosition and reduces one unnecessary assignment in
1455 setViewportPosition. Also, it renames contentsPoint to contentsPosition.
1457 * UIProcess/PageViewportControllerClient.h:
1458 * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1459 (WebKit::PageViewportControllerClientEfl::setViewportPosition):
1460 * UIProcess/efl/PageViewportControllerClientEfl.h:
1462 2014-05-17 David Kilzer <ddkilzer@apple.com>
1464 Need a way to get a WKPageRef from a WKWebView
1465 <http://webkit.org/b/133015>
1467 Reviewed by Benjamin Poulain.
1469 * UIProcess/API/Cocoa/WKWebView.mm:
1470 (-[WKWebView _pageRef]): Added.
1471 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1472 (-[WKWebView _pageRef]): Added declaration.
1474 2014-05-17 Anders Carlsson <andersca@apple.com>
1476 Give user scripts custom URLs
1477 https://bugs.webkit.org/show_bug.cgi?id=133035
1479 Reviewed by Beth Dakin.
1481 * UIProcess/API/Cocoa/WKUserContentController.mm:
1482 (-[WKUserContentController addUserScript:]):
1483 Create a user-script:<number> URL for user scripts.
1485 * UIProcess/API/Cocoa/WKUserScript.h:
1486 Move the init method after the properties.
1488 2014-05-17 Anders Carlsson <andersca@apple.com>
1490 Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
1491 https://bugs.webkit.org/show_bug.cgi?id=133033
1492 <rdar://problem/16830143>
1494 Reviewed by Sam Weinig.
1496 * Shared/WebProcessCreationParameters.cpp:
1497 (WebKit::WebProcessCreationParameters::encode):
1498 (WebKit::WebProcessCreationParameters::decode):
1499 * Shared/WebProcessCreationParameters.h:
1500 Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
1502 * UIProcess/API/C/WKContext.cpp:
1503 (WKContextSetDatabaseDirectory): Deleted.
1504 This is no longer needed.
1506 * UIProcess/API/C/WKContextConfigurationRef.cpp:
1507 (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
1508 (WKContextConfigurationSetIndexedDBDatabaseDirectory):
1509 (WKContextConfigurationCopyWebSQLDatabaseDirectory):
1510 (WKContextConfigurationSetWebSQLDatabaseDirectory):
1511 * UIProcess/API/C/WKContextConfigurationRef.h:
1512 Add setters and getters.
1514 * UIProcess/API/C/WKContextPrivate.h:
1515 Remove WKContextSetDatabaseDirectory.
1517 * UIProcess/APIContextConfiguration.cpp:
1518 (API::ContextConfiguration::webContextConfiguration):
1519 Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
1521 * UIProcess/APIContextConfiguration.h:
1522 (API::ContextConfiguration::indexedDBDatabaseDirectory):
1523 (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
1524 (API::ContextConfiguration::webSQLDatabaseDirectory):
1525 (API::ContextConfiguration::setWebSQLDatabaseDirectory):
1526 Add getters and setters to the C++ part of WKContextConfigurationRef.
1528 * UIProcess/WebContext.cpp:
1529 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1530 Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
1532 (WebKit::WebContext::WebContext):
1533 Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
1535 (WebKit::WebContext::ensureDatabaseProcess):
1536 Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
1538 (WebKit::WebContext::createNewWebProcess):
1539 Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
1541 * UIProcess/mac/WebContextMac.mm:
1542 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
1543 Rename this to indicate that it's about WebSQL databases.
1545 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
1548 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1549 (WebKit::WebDatabaseManager::initialize):
1550 Update for WebProcessCreationParameters rename.
1552 * WebProcess/cocoa/WebProcessCocoa.mm:
1553 (WebKit::WebProcess::platformInitializeWebProcess):
1554 Update for WebProcessCreationParameters rename.
1556 2014-05-17 Brent Fulgham <bfulgham@apple.com>
1558 [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
1559 https://bugs.webkit.org/show_bug.cgi?id=133024
1561 Reviewed by Sam Weinig.
1563 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1564 (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
1565 time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
1566 phone numbers to interact with.
1568 2014-05-17 Alexey Proskuryakov <ap@apple.com>
1570 NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
1571 https://bugs.webkit.org/show_bug.cgi?id=133032
1572 <rdar://problem/16951630>
1574 Reviewed by Geoffrey Garen.
1576 Replaced assertions with runtime checks. This can happen if NetworkProcess previously
1577 crashed for any unrelated reason.
1579 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1580 (WebKit::NetworkBlobRegistry::registerBlobURL):
1581 (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1582 (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1584 2014-05-17 Anders Carlsson <andersca@apple.com>
1586 -[WKWebView dealloc] should close the page
1587 https://bugs.webkit.org/show_bug.cgi?id=133031
1588 <rdar://problem/16929815>
1590 Reviewed by Simon Fraser.
1592 * UIProcess/API/Cocoa/WKWebView.mm:
1593 (-[WKWebView dealloc]):
1595 2014-05-16 Anders Carlsson <andersca@apple.com>
1597 Expose WKUserScript as API
1598 https://bugs.webkit.org/show_bug.cgi?id=133017
1599 <rdar://problem/16948059>
1601 Reviewed by Sam Weinig.
1603 * DerivedSources.make:
1604 Add WebUserContentController.
1606 * Shared/API/Cocoa/WebKit.h:
1609 * Shared/API/c/WKSharedAPICast.h:
1610 (WebKit::toUserScriptInjectionTime):
1611 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1613 * Shared/API/c/WKUserScriptInjectionTime.h:
1614 Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
1616 * Shared/WebPageCreationParameters.cpp:
1617 (WebKit::WebPageCreationParameters::encode):
1618 Encode the user content controller ID.
1620 (WebKit::WebPageCreationParameters::decode):
1621 Decode the user content controller ID.
1623 * Shared/WebPageCreationParameters.h:
1624 Add userContentControllerID.
1626 * UIProcess/API/C/WKPageGroup.cpp:
1627 (WKPageGroupAddUserScript):
1628 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1630 * UIProcess/API/C/WKPageGroup.h:
1631 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1633 * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1634 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1636 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1637 (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
1638 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1640 * UIProcess/API/Cocoa/WKUserContentController.h:
1643 * UIProcess/API/Cocoa/WKUserContentController.mm:
1644 (-[WKUserContentController init]):
1645 Create the WebUserContentControllerProxy object and user scripts array.
1647 (-[WKUserContentController userScripts]):
1648 Return the user scripts array.
1650 (toWebCoreUserScriptInjectionTime):
1651 Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
1653 (-[WKUserContentController addUserScript:]):
1654 Call through to the _userContentControllerProxy object.
1656 (-[WKUserContentController removeAllUserScripts]):
1657 Call through to the _userContentControllerProxy object.
1659 * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
1660 Add WebUserContentControllerProxy ivar.
1662 * UIProcess/API/Cocoa/WKUserScript.h: Added.
1665 * UIProcess/API/Cocoa/WKUserScript.mm:
1666 (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
1667 Initialize the WKUserScript object.
1669 (-[WKUserScript source]):
1670 (-[WKUserScript injectionTime]):
1671 (-[WKUserScript isForMainFrameOnly]):
1674 (-[WKUserScript copyWithZone:]):
1675 Since WKUserScript is immutable, just return a retained object.
1677 * UIProcess/API/Cocoa/WKUserScriptInternal.h:
1680 * UIProcess/API/Cocoa/WKWebView.mm:
1681 (-[WKWebView initWithFrame:configuration:]):
1682 Set the user content controller from the configuration.
1684 * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
1685 (WebKit::generateIdentifier):
1686 Return a unique identifier.
1688 (WebKit::WebUserContentControllerProxy::create):
1689 Return a new WebUserContentControllerProxy object.
1691 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1692 Initialize m_identifier.
1694 (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
1697 (WebKit::WebUserContentControllerProxy::addProcess):
1698 Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
1700 (WebKit::WebUserContentControllerProxy::removeProcess):
1701 Remove the process from m_processes.
1703 (WebKit::WebUserContentControllerProxy::addUserScript):
1704 Add the user script and let all the web processes know that it was added.
1706 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1707 Remove all user scripts and tell all the web processes about it.
1709 * UIProcess/UserContent/WebUserContentControllerProxy.h:
1712 * UIProcess/WebPageProxy.cpp:
1713 (WebKit::WebPageProxy::WebPageProxy):
1714 If the process is already running, add it to the user content controller.
1716 (WebKit::WebPageProxy::close):
1717 If the process is running, remove it from the user content controller.
1719 (WebKit::WebPageProxy::connectionWillOpen):
1720 Add the process to the user content controller.
1722 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1723 Remove the process from the user content controller.
1725 (WebKit::WebPageProxy::creationParameters):
1726 Pass along the user content controller ID when creating the web page.
1728 * UIProcess/WebPageProxy.h:
1729 Add a WebUserContentControllerProxy object to the web page configuration.
1731 * WebKit2.xcodeproj/project.pbxproj:
1734 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1735 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1736 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1738 * WebProcess/UserContent/WebUserContentController.cpp: Added.
1739 New class that manages a WebCore::UserContentController object.
1741 (WebKit::WebUserContentController::getOrCreate):
1742 Look up (or create) a WebUserContentController object given its identifier.
1744 (WebKit::WebUserContentController::WebUserContentController):
1745 Add ourselves as a message receiver.
1747 (WebKit::WebUserContentController::~WebUserContentController):
1748 Remove ourselves as a message receiver.
1750 (WebKit::WebUserContentController::addUserScripts):
1751 Add all passed in user scripts to the WebCore user content controller object.
1753 (WebKit::WebUserContentController::removeAllUserScripts):
1754 Remove all user scripts from the WebCore user content controller object.
1756 * WebProcess/UserContent/WebUserContentController.messages.in: Added.
1757 Add new messages file.
1759 * WebProcess/WebPage/WebPage.cpp:
1760 (WebKit::WebPage::WebPage):
1761 Get a WebUserContentController object and pass it along to WebCore.
1763 * WebProcess/WebPage/WebPage.h:
1764 Add WebUserContentController member.
1766 2014-05-16 Piotr Grad <p.grad@samsung.com>
1768 [GTK] Build break after 168978.
1769 https://bugs.webkit.org/show_bug.cgi?id=133012.
1771 Reviewed by Simon Fraser.
1773 * UIProcess/API/gtk/WebKitSettings.cpp:
1774 (webKitSettingsConstructed):
1776 2014-05-16 Simon Fraser <simon.fraser@apple.com>
1778 Put back a symbol removed in r168978 that Safari needs, but deprecate it.
1780 Reviewed by Anders Carlsson.
1782 * Shared/API/c/WKDeprecatedFunctions.cpp:
1783 (WKPreferencesSetRegionBasedColumnsEnabled):
1784 (WKPreferencesGetRegionBasedColumnsEnabled):
1786 2014-05-16 Oliver Hunt <oliver@apple.com>
1788 Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
1789 https://bugs.webkit.org/show_bug.cgi?id=133016
1791 Reviewed by Alexey Proskuryakov.
1793 Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
1794 and switch over to it in the places that extensions are used.
1796 * Shared/SandboxExtension.h:
1797 * Shared/mac/SandboxExtensionMac.mm:
1798 * UIProcess/WebPageProxy.cpp:
1799 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1801 * WebProcess/WebPage/WebPage.cpp:
1802 * WebProcess/WebPage/WebPage.h:
1803 * WebProcess/WebPage/WebPage.messages.in:
1804 * WebProcess/cocoa/WebProcessCocoa.mm:
1805 (WebKit::WebProcess::platformInitializeWebProcess):
1807 2014-05-16 Benjamin Poulain <bpoulain@apple.com>
1809 [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
1810 https://bugs.webkit.org/show_bug.cgi?id=132937
1811 <rdar://problem/16710097>
1813 Reviewed by Simon Fraser.
1815 When responsive websites have the content size lay out larger than the minimal layout size,
1816 we should not keep the relative horizontal position into view,
1817 many of those websites have all the content on the left.
1819 * WebProcess/WebPage/ios/WebPageIOS.mm:
1820 (WebKit::WebPage::dynamicViewportSizeUpdate):
1822 2014-05-16 Benjamin Poulain <bpoulain@apple.com>
1824 [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
1825 https://bugs.webkit.org/show_bug.cgi?id=132972
1827 Reviewed by Simon Fraser.
1829 When we set the content offset, UIScrollView limits the value to the current valid range for
1830 content size. Since the content size was only updated after the animation, when the first frame
1831 comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
1833 To fix this, set the expected future content size before changing the offset.
1835 During the animation, the content size could have changed arbitrarily. At the end of the animation,
1836 we take the actual frame and set the definite content size.
1837 Any update after that will be regular updates through didCommitLayer.
1839 * UIProcess/API/Cocoa/WKWebView.mm:
1840 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1841 (-[WKWebView _endAnimatedResize]):
1843 2014-05-16 Simon Fraser <simon.fraser@apple.com>
1845 Remove "region-based columns" prefs
1846 https://bugs.webkit.org/show_bug.cgi?id=133006
1847 <rdar://problem/16945824>
1849 Reviewed by Dave Hyatt.
1851 Remove "region-based columns" prefs and related code, since this is only
1852 way to render columns now.
1854 * Shared/WebPreferencesStore.h:
1855 * UIProcess/API/C/WKPreferences.cpp:
1856 (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
1857 (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
1858 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1859 * WebProcess/WebPage/WebPage.cpp:
1860 (WebKit::WebPage::updatePreferences):
1862 2014-05-16 Brent Fulgham <bfulgham@apple.com>
1864 Work around bug in Silverlight
1865 https://bugs.webkit.org/show_bug.cgi?id=133004
1867 Reviewed by Anders Carlsson.
1869 * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1870 (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
1871 to user defaults prior to NSApplication invocation. This code was moved from
1872 PluginProcess::platformInitializeProcess.
1873 * PluginProcess/mac/PluginProcessMac.mm:
1874 (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
1875 setting to PluginProcessMainDelegate.
1877 2014-05-16 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
1879 [WK2] Change the remaining framework includes from WebKit2 to WebKit
1880 https://bugs.webkit.org/show_bug.cgi?id=132956
1882 Reviewed by Sam Weinig.
1884 * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1885 * NetworkProcess/unix/NetworkProcessMainUnix.h:
1886 * PluginProcess/unix/PluginProcessMainUnix.h:
1887 * Shared/API/c/cairo/WKImageCairo.h:
1888 * Shared/API/c/cf/WKURLRequestCF.h:
1889 * Shared/API/c/cf/WKURLResponseCF.h:
1890 * Shared/API/c/efl/WKArrayEfl.cpp:
1891 * Shared/API/c/efl/WKArrayEfl.h:
1892 * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1893 * UIProcess/API/C/WKBatteryManager.h:
1894 * UIProcess/API/C/WKBatteryStatus.h:
1895 * UIProcess/API/C/WKGrammarDetail.h:
1896 * UIProcess/API/C/WKTextChecker.h:
1897 * UIProcess/API/C/WKVibration.h:
1898 * UIProcess/API/C/WKViewportAttributes.h:
1899 * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
1900 * UIProcess/API/C/efl/WKAPICastEfl.h:
1901 * UIProcess/API/C/efl/WKColorPickerResultListener.h:
1902 * UIProcess/API/C/efl/WKEventEfl.h:
1903 * UIProcess/API/C/efl/WKPageEfl.h:
1904 * UIProcess/API/C/efl/WKPopupItem.h:
1905 * UIProcess/API/C/efl/WKPopupMenuListener.h:
1906 * UIProcess/API/C/efl/WKViewEfl.cpp:
1907 * UIProcess/API/C/efl/WKViewEfl.h:
1908 * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
1909 * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
1910 * UIProcess/API/C/gtk/WKView.h:
1911 * UIProcess/API/C/gtk/WKViewPrivate.h:
1912 * UIProcess/API/C/soup/WKContextSoup.h:
1913 * UIProcess/API/C/soup/WKCookieManagerSoup.h:
1914 * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
1915 * UIProcess/API/C/soup/WKSoupRequestManager.h:
1916 * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
1917 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
1918 * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
1919 * UIProcess/API/cpp/efl/WKEinaSharedString.h:
1920 * UIProcess/API/efl/EwkView.cpp:
1921 * UIProcess/API/efl/EwkView.h:
1922 * UIProcess/API/efl/EwkViewCallbacks.h:
1923 * UIProcess/API/efl/GestureRecognizer.h:
1924 * UIProcess/API/efl/ewk_application_cache_manager_private.h:
1925 * UIProcess/API/efl/ewk_auth_request_private.h:
1926 * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
1927 * UIProcess/API/efl/ewk_back_forward_list_private.h:
1928 * UIProcess/API/efl/ewk_context_menu_item.cpp:
1929 * UIProcess/API/efl/ewk_context_private.h:
1930 * UIProcess/API/efl/ewk_cookie_manager_private.h:
1931 * UIProcess/API/efl/ewk_database_manager_private.h:
1932 * UIProcess/API/efl/ewk_error_private.h:
1933 * UIProcess/API/efl/ewk_favicon_database_private.h:
1934 * UIProcess/API/efl/ewk_file_chooser_request_private.h:
1935 * UIProcess/API/efl/ewk_page_group_private.h:
1936 * UIProcess/API/efl/ewk_popup_menu_item_private.h:
1937 * UIProcess/API/efl/ewk_popup_menu_private.h:
1938 * UIProcess/API/efl/ewk_security_origin_private.h:
1939 * UIProcess/API/efl/ewk_settings_private.h:
1940 * UIProcess/API/efl/ewk_storage_manager_private.h:
1941 * UIProcess/API/efl/ewk_view.cpp:
1942 * UIProcess/API/efl/ewk_view_private.h:
1943 * UIProcess/API/efl/ewk_window_features_private.h:
1944 * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
1945 * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
1946 * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1947 * UIProcess/API/gtk/WebKitPrivate.h:
1948 * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1949 * UIProcess/efl/BatteryProvider.h:
1950 * UIProcess/efl/ContextHistoryClientEfl.h:
1951 * UIProcess/efl/DownloadManagerEfl.h:
1952 * UIProcess/efl/FindClientEfl.h:
1953 * UIProcess/efl/FormClientEfl.h:
1954 * UIProcess/efl/PageLoadClientEfl.h:
1955 * UIProcess/efl/PagePolicyClientEfl.h:
1956 * UIProcess/efl/PageUIClientEfl.h:
1957 * UIProcess/efl/RequestManagerClientEfl.h:
1958 * UIProcess/efl/TextCheckerClientEfl.h:
1959 * UIProcess/efl/VibrationClientEfl.h:
1960 * UIProcess/efl/ViewClientEfl.cpp:
1961 * UIProcess/efl/ViewClientEfl.h:
1962 * UIProcess/efl/WebInspectorProxyEfl.cpp:
1963 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1964 * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1965 * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
1966 * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
1967 * WebProcess/efl/WebProcessMainEfl.cpp:
1968 * WebProcess/efl/WebProcessMainEfl.h:
1969 * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
1970 * WebProcess/gtk/WebProcessMainGtk.cpp:
1971 * WebProcess/gtk/WebProcessMainGtk.h:
1972 * mac/WKPreferences.h:
1974 2014-05-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1976 [EFL][WK2] Skip failing unit tests
1977 https://bugs.webkit.org/show_bug.cgi?id=132979
1979 Reviewed by Daniel Bates.
1981 * PlatformEfl.cmake: Skip failing unit tests for now.
1983 2014-05-15 Simon Fraser <simon.fraser@apple.com>
1985 [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
1986 https://bugs.webkit.org/show_bug.cgi?id=132978
1987 <rdar://problem/16894428>
1989 Reviewed by Benjamin Poulain.
1991 Move the static function fixedPositionRectFromExposedRect() to a member function on
1992 WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
1993 rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
1994 move fixed elements outside the document.
1996 * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
1997 * UIProcess/WebPageProxy.h:
1998 * UIProcess/ios/PageClientImplIOS.h:
1999 * UIProcess/ios/PageClientImplIOS.mm:
2000 (WebKit::PageClientImpl::minimumZoomScale):
2001 (WebKit::PageClientImpl::contentsSize):
2002 * UIProcess/ios/WKContentView.mm:
2003 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
2004 Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
2005 for the ScrollingCoordinator update.
2006 (adjustedUnexposedEdge): Deleted.
2007 (adjustedUnexposedMaxEdge): Deleted.
2008 (fixedPositionRectFromExposedRect): Deleted.
2009 * UIProcess/ios/WebPageProxyIOS.mm:
2010 (WebKit::adjustedUnexposedEdge):
2011 (WebKit::adjustedUnexposedMaxEdge):
2012 (WebKit::WebPageProxy::computeCustomFixedPositionRect):
2013 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2014 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
2015 was being updated while scrolling; we now pass the correct rect.
2017 2014-05-15 Mark Rowe <mrowe@apple.com>
2019 <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
2021 Discovery of sharing services can require disk access and IPC. Since the interface to
2022 ServicesController is already asynchronous, we can easily perform the discovery on a
2023 background queue. This can eliminate tens to hundreds of milliseconds worth of work
2024 from the main thread when creating the first web process.
2026 Reviewed by Brady Eidson.
2028 * UIProcess/mac/ServicesController.h:
2029 * UIProcess/mac/ServicesController.mm:
2030 (WebKit::ServicesController::ServicesController):
2031 (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
2032 in the process of refreshing the services. Kick the discovery over to a background queue,
2033 with it hopping back to the main queue to update the actual state and notify any contexts
2034 that were interested.
2036 2014-05-15 Dan Bernstein <mitz@apple.com>
2038 Fixed a typo in a comment and updated previous change log entry.
2040 * WebProcess/WebPage/ios/WebPageIOS.mm:
2041 (WebKit::WebPage::elementDidFocus):
2043 2014-05-15 Dan Bernstein <mitz@apple.com>
2045 <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
2046 https://bugs.webkit.org/show_bug.cgi?id=132974
2048 Reviewed by Enrica Casucci.
2050 * WebProcess/WebPage/ios/WebPageIOS.mm:
2051 (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
2052 focus isn’t user-initiated, because in that case the UI process will bail out of
2053 -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
2054 calling the -_webView:didStartInputSession:.
2056 2014-05-15 Benjamin Poulain <bpoulain@apple.com>
2058 [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
2059 https://bugs.webkit.org/show_bug.cgi?id=132941
2060 <rdar://problem/16921557>
2062 Reviewed by Tim Horton.
2064 Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
2065 we end up with invalid contentOffsets.
2067 To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
2070 * UIProcess/API/Cocoa/WKWebView.mm:
2071 (-[WKWebView _endAnimatedResize]):
2073 2014-05-15 Tim Horton <timothy_horton@apple.com>
2075 WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
2076 https://bugs.webkit.org/show_bug.cgi?id=132944
2077 <rdar://problem/15769454>
2079 Reviewed by Simon Fraser.
2081 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2082 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2083 If a layer flush occurs and we have an active transient zoom,
2084 re-apply the transient zoom to the relevant platform layers, because
2085 WebCore might have overwritten the relevant layer properties.
2087 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2088 Reset m_transientZoomScale before flushLayers() so that we don't
2089 re-apply the transient zoom when we're actually trying to commit it.
2091 2014-05-15 Alex Christensen <achristensen@webkit.org>
2093 Add pointer lock to features without enabling it.
2094 https://bugs.webkit.org/show_bug.cgi?id=132961
2096 Reviewed by Sam Weinig.
2098 * Configurations/FeatureDefines.xcconfig:
2099 Added ENABLE_POINTER_LOCK to list of features.
2101 2014-05-15 Simon Fraser <simon.fraser@apple.com>
2103 [UI-side compositing] Fix copying animations between layers, and pausing them
2104 https://bugs.webkit.org/show_bug.cgi?id=132943
2105 <rdar://problem/16906369&16906541>
2107 Reviewed by Tim Horton.
2109 Fix PlatformCAAnimationRemote to support animation copying, and to record
2110 the beginTime for implicitly started animations. This fixes animation pausing,
2111 and copying of animations between layers when they go between tiled and non-tiled.
2113 This requires sending the animation key back through animationDidStart() so that
2114 we can record this beginTime on the PlatformCAAnimationRemote in the web process.
2115 This path doesn't set the "hasExplicitBeginTime" flag.
2117 PlatformCAAnimationRemote also now stores a hash of active animations, so that
2118 it can implement animationForKey(), and record the beginTime.
2120 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2121 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2122 (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
2123 * UIProcess/mac/RemoteLayerTreeHost.h:
2124 * UIProcess/mac/RemoteLayerTreeHost.mm:
2125 (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
2126 animation; sadly CA doesn't give us an easier way.
2127 * WebProcess/WebPage/DrawingArea.h:
2128 (WebKit::DrawingArea::acceleratedAnimationDidStart):
2129 * WebProcess/WebPage/DrawingArea.messages.in:
2130 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2131 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2132 (-[WKAnimationDelegate animationDidStart:]):
2133 (WebKit::PlatformCAAnimationRemote::copy):
2134 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
2135 (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
2136 (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
2137 (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
2138 (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
2139 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
2140 (WebKit::addAnimationToLayer):
2141 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2142 (WebKit::PlatformCALayerRemote::addAnimationForKey):
2143 (WebKit::PlatformCALayerRemote::removeAnimationForKey):
2144 (WebKit::PlatformCALayerRemote::animationForKey):
2145 (WebKit::PlatformCALayerRemote::animationStarted):
2146 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2147 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2148 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2149 (WebKit::RemoteLayerTreeContext::animationDidStart):
2150 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2151 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2152 (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
2154 2014-05-14 Simon Fraser <simon.fraser@apple.com>
2156 Clean up "has non-zero begin time" terminology in animations
2157 https://bugs.webkit.org/show_bug.cgi?id=132942
2159 Reviewed by Tim Horton.
2161 Change the "non-zero beginTime" terminology in the platform CA animations
2162 code to "explicit beginTime": this flag really means that we explicitly set
2163 the beginTime of the animation, rather than let CA set the beginTime when
2164 committing the animation. This flag is used for animations with negative
2165 delay, and when pausing.
2167 * Shared/mac/RemoteLayerTreeTransaction.mm:
2168 (WebKit::RemoteLayerTreeTextStream::operator<<):
2169 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2170 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2171 (-[WKAnimationDelegate animationDidStart:]):
2172 (WebKit::PlatformCAAnimationRemote::Properties::encode):
2173 (WebKit::PlatformCAAnimationRemote::Properties::decode):
2174 (WebKit::PlatformCAAnimationRemote::setBeginTime):
2175 (WebKit::addAnimationToLayer):
2177 2014-05-15 Tim Horton <timothy_horton@apple.com>
2179 [iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
2180 https://bugs.webkit.org/show_bug.cgi?id=132934
2182 Reviewed by Simon Fraser.
2184 * UIProcess/API/Cocoa/WKWebView.mm:
2185 (-[WKWebView _updateVisibleContentRects]):
2186 If we're in a scroll-to-top programmatic scroll, the update is not stable.
2187 The last event comes in with _isScrollingToTop false, so we do our stable update.
2189 2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
2191 [GTK] Compile all installed resources as GResources
2192 https://bugs.webkit.org/show_bug.cgi?id=131099
2194 Reviewed by Philippe Normand.
2196 It avoids conflicts with old WebKit versions, and resources are
2197 always found even without installing or using environment variables.
2199 * PlatformGTK.cmake: Add rules to write the xml file with the
2200 resources depending on the configure options and to generate and
2201 build the GResources file.
2203 2014-05-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2205 [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
2206 https://bugs.webkit.org/show_bug.cgi?id=132902
2208 Reviewed by Anders Carlsson.
2210 This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs
2211 to check if registered callback function works well.
2213 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2214 (EWK2ContextTest::schemeRequestCallback):
2217 2014-05-14 Ryuan Choi <ryuan.choi@samsung.com>
2219 [EFL][WK2] Use default context for ewk_view_add
2220 https://bugs.webkit.org/show_bug.cgi?id=132936
2222 Reviewed by Gyuyoung Kim.
2224 Since r146265, ewk_view_add created new context and it's regression.
2225 This patch restores the behavior of ewk_view_add to original one.
2227 * UIProcess/API/efl/ewk_view.cpp:
2229 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2232 2014-05-14 Maciej Stachowiak <mjs@apple.com>
2234 Database Process crashes after loading html5test.com
2235 https://bugs.webkit.org/show_bug.cgi?id=132938
2236 <rdar://problem/16241419>
2238 Reviewed by Ryosuke Niwa.
2240 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2241 (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
2242 about the null check.
2243 (WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
2244 to pick up its null check and to avoid duplicating code.
2246 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
2248 [iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
2249 https://bugs.webkit.org/show_bug.cgi?id=132931
2251 Reviewed by Sam Weinig.
2253 The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
2254 Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
2256 For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
2257 a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
2258 Rotate back to landscape: the position is restored correct, but it is then overriden by
2259 the stick-to-edges branch.
2261 When we restore the position from history, we should only put it back in the valid bounds, skipping
2262 stick-to-edges entirely.
2264 * WebProcess/WebPage/ios/WebPageIOS.mm:
2265 (WebKit::WebPage::dynamicViewportSizeUpdate):
2267 2014-05-14 Tim Horton <timothy_horton@apple.com>
2269 Enable IOSurface view snapshots for 10.9+
2270 https://bugs.webkit.org/show_bug.cgi?id=132932
2271 <rdar://problem/16900619>
2273 Reviewed by Dean Jackson.
2275 * UIProcess/mac/ViewSnapshotStore.h:
2276 r166005 unintentionally worked around <rdar://problem/16734031>.
2277 r168689 fixed another bug that caused sometimes randomly white snapshots.
2278 It's safe to turn on IOSurface view snapshots where purgeability is supported.
2280 2014-05-14 Alexey Proskuryakov <ap@apple.com>
2282 Use the correct client in WebPageProxy::unwrapCryptoKey
2283 https://bugs.webkit.org/show_bug.cgi?id=132924
2285 Reviewed by Darin Adler.
2287 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
2288 we now do in wrapCryptoKey().
2290 2014-05-14 Zalan Bujtas <zalan@apple.com>
2292 Subpixel layout: Change Element.offset* client* scroll* return type to double.
2293 https://bugs.webkit.org/show_bug.cgi?id=132895
2295 Reviewed by Simon Fraser.
2297 This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
2298 type from long to double to match the latest CSSOM View Module spec[1].
2299 Element.offset* and Element.client* do return subpixel values from now on.
2300 Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
2302 subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
2303 from WK2 preferences. It toggles the return value from subpixel to floored integral.
2304 It does not change layout/rendering behavior.
2306 Reference list of what other browsers do:
2307 IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
2308 Blink: http://www.chromestatus.com/features/5497402177880064
2309 Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
2311 [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
2313 * Shared/WebPreferencesStore.h:
2314 * UIProcess/API/C/WKPreferences.cpp:
2315 (WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
2316 (WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
2317 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2318 * WebProcess/WebPage/WebPage.cpp:
2319 (WebKit::WebPage::updatePreferences):
2321 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
2323 [iOS][WK2] Expose the viewport meta tag width on the UIProcess
2324 https://bugs.webkit.org/show_bug.cgi?id=132926
2325 <rdar://problem/16892115>
2327 Reviewed by Sam Weinig.
2329 Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
2330 over to the UIProcess when it changes.
2332 * UIProcess/API/Cocoa/WKWebView.mm:
2333 (-[WKWebView initWithFrame:configuration:]):
2334 (-[WKWebView _setViewportMetaTagWidth:]):
2335 (-[WKWebView _viewportMetaTagWidth]):
2336 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2337 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2338 * UIProcess/PageClient.h:
2339 * UIProcess/WebPageProxy.h:
2340 * UIProcess/WebPageProxy.messages.in:
2341 * UIProcess/ios/PageClientImplIOS.h:
2342 * UIProcess/ios/PageClientImplIOS.mm:
2343 (WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
2344 * UIProcess/ios/WebPageProxyIOS.mm:
2345 (WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
2346 * WebProcess/WebPage/ios/WebPageIOS.mm:
2347 (WebKit::WebPage::viewportPropertiesDidChange):
2349 2014-05-13 Simon Fraser <simon.fraser@apple.com>
2351 [iOS WK2] Make view debugging easier
2352 https://bugs.webkit.org/show_bug.cgi?id=132892
2354 Reviewed by Tim Horton.
2356 Enhance -[WKCompositingView description] to show WebKit-related information
2357 which is useful when dumping a window's UIView hierarchy.
2359 Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
2360 and thereby get the hitTest:withEvent: override for free, as well as better dumping.
2362 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2363 (-[WKCompositingView description]):
2364 (-[WKTransformView hitTest:withEvent:]): Deleted.
2365 (-[WKRemoteView hitTest:withEvent:]): Deleted.
2367 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
2369 [iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
2370 https://bugs.webkit.org/show_bug.cgi?id=132920
2371 <rdar://problem/16836866>
2373 Reviewed by Simon Fraser.
2375 During the dynamic resize operation, we do not update the fixed position elements because
2376 it is a very hard problem on the UI Process side.
2378 When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
2381 The problem is sending the rect after the animation is too late, the content can observe the fixed
2382 elements layout through JavaScript and would get the old size.
2384 This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
2385 notifying the content of the resize.
2386 First, we layout the content to the new fixed layout size to get the new content size.
2387 Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
2388 this use the real content size and our estimated unobscured content rect.
2390 * WebProcess/WebPage/ios/WebPageIOS.mm:
2391 (WebKit::WebPage::dynamicViewportSizeUpdate):
2393 2014-05-14 Enrica Casucci <enrica@apple.com>
2395 REGRESSION(WK2): Many pages have very wrong text size after rotating.
2396 https://bugs.webkit.org/show_bug.cgi?id=132893
2397 <rdar://problem/16806958>
2399 Reviewed by Benjamin Poulain.
2401 Whenever our viewport width changes we must reset text autosizing
2404 * WebProcess/WebPage/WebPage.h:
2405 * WebProcess/WebPage/ios/WebPageIOS.mm:
2406 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
2407 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
2408 (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
2409 (WebKit::WebPage::dynamicViewportSizeUpdate):
2411 2014-05-14 Alex Christensen <achristensen@webkit.org>
2413 Use references instead of pointers with ResourceLoadTiming.
2414 https://bugs.webkit.org/show_bug.cgi?id=132846
2416 Reviewed by Alexey Proskuryakov.
2418 * Shared/WebCoreArgumentCoders.cpp:
2419 (IPC::ArgumentCoder<ResourceResponse>::encode):
2420 (IPC::ArgumentCoder<ResourceResponse>::decode):
2421 Use references instead of pointers and null checks.
2423 2014-05-14 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
2425 Remove CSS_STICKY_POSITION guards
2426 https://bugs.webkit.org/show_bug.cgi?id=132676
2428 Reviewed by Simon Fraser.
2430 * Configurations/FeatureDefines.xcconfig:
2432 2014-05-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2434 [EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
2435 https://bugs.webkit.org/show_bug.cgi?id=132811
2437 Reviewed by Christophe Dumez.
2439 Some EFL applications need to set size of fixed layout when enabling fixed layout.
2440 This APIs can pass ownership regarding the size of fixed layout to application side.
2442 * UIProcess/API/efl/ewk_view.cpp:
2443 (ewk_view_layout_fixed_size_set):
2444 (ewk_view_layout_fixed_size_get):
2445 * UIProcess/API/efl/ewk_view.h:
2446 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2449 2014-05-13 Simon Fraser <simon.fraser@apple.com>
2451 Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
2452 https://bugs.webkit.org/show_bug.cgi?id=132899
2454 Reviewed by Beth Dakin.
2456 The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
2457 need to be correctly encoded/decoded for UI-side compositing, and dumped
2460 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2461 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2462 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2463 (WebKit::RemoteScrollingTreeTextStream::dump):
2464 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2465 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2467 2014-05-13 Anders Carlsson <andersca@apple.com>
2471 Reviewed by Dan Bernstein.
2473 * Shared/API/Cocoa/WKFoundation.h:
2474 Make sure to include Availability.h
2476 2014-05-13 Beth Dakin <bdakin@apple.com>
2478 REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
2479 scrolling in News Feed
2480 https://bugs.webkit.org/show_bug.cgi?id=132889
2482 <rdar://problem/16715716>
2484 Reviewed by Simon Fraser.
2486 Re-name scrollOffsetRelativeToDocument() to
2487 documentScrollPositionRelativeToViewOrigin().
2488 * WebProcess/WebPage/FindController.cpp:
2489 (WebKit::FindController::rectsForTextMatches):
2490 * WebProcess/WebPage/WebPage.cpp:
2491 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2493 2014-05-13 Dean Jackson <dino@apple.com>
2495 [iOS] Page scale update messages for media controls should only fire at the end of zooming
2496 https://bugs.webkit.org/show_bug.cgi?id=132857
2497 <rdar://problem/16631009>
2499 Reviewed by Simon Fraser.
2501 As the user was zooming, the media controls that responded
2502 to the page scale (and resized themselves) would do so
2503 slightly out of sync with the screen refreshes, and it looked
2506 We already know if a pageScale change is happening inside
2507 a gesture using the inStableState property of the visibleContentRectUpdateInfo.
2508 Simply pass this along to WebCore::Page.
2510 * WebProcess/WebPage/ios/WebPageIOS.mm:
2511 (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
2512 WebCore::Page. Note that we have to send this message even if the
2513 scale has not changed, since the last changing update might not have
2516 2014-05-13 Benjamin Poulain <bpoulain@apple.com>
2518 [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
2519 https://bugs.webkit.org/show_bug.cgi?id=132849
2520 <rdar://problem/16863716>
2522 Reviewed by Anders Carlsson.
2524 When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
2525 state forwarded to the UIProcess.
2527 For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
2529 After that update, Safari would modify the insets, thus updating the state again.
2530 The first state changed by WKWebView is incomplete, and should never have been set.
2532 This patch works around the issue by delaying visible update rect in those cases.
2534 When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes
2535 [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
2536 [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
2538 Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
2540 * UIProcess/API/Cocoa/WKWebView.mm:
2541 (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
2542 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2543 (-[WKWebView _updateVisibleContentRects]):
2544 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2545 * UIProcess/API/ios/WKViewIOS.mm:
2546 (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2547 * UIProcess/ios/WKScrollView.h:
2548 * UIProcess/ios/WKScrollView.mm:
2549 (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
2550 (-[WKScrollViewDelegateForwarder forwardInvocation:]):
2551 (-[WKScrollView setInternalDelegate:]):
2553 2014-05-13 Benjamin Poulain <bpoulain@apple.com>
2555 [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
2556 https://bugs.webkit.org/show_bug.cgi?id=132848
2557 <rdar://problem/16875093>
2559 Reviewed by Darin Adler.
2561 The SPI is no longer needed by Safari.
2563 * UIProcess/API/Cocoa/WKWebView.mm:
2564 (-[WKWebView initWithFrame:configuration:]):
2565 (-[WKWebView _updateScrollViewBackground]):
2566 (-[WKWebView _frameOrBoundsChanged]):
2567 (-[WKWebView _setObscuredInsets:]):
2568 (-[WKWebView _endAnimatedResize]):
2569 (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
2570 (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
2571 (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
2572 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2574 2014-05-13 Samuel White <samuel_white@apple.com>
2576 AX: Hit testing not accounting for top content inset.
2577 https://bugs.webkit.org/show_bug.cgi?id=132876
2579 Reviewed by Chris Fleizach.
2581 Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
2583 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2584 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2586 2014-05-13 Enrica Casucci <enrica@apple.com>
2588 REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
2589 https://bugs.webkit.org/show_bug.cgi?id=132879
2590 <rdar://problem/16318049>
2592 Reviewed by Benjamin Poulain.
2594 Adds the heuristics to zoom and scroll to ensure the element being focused
2595 is fully visible and its text readable.
2597 * Shared/AssistedNodeInformation.cpp:
2598 (WebKit::AssistedNodeInformation::encode):
2599 (WebKit::AssistedNodeInformation::decode):
2600 * Shared/AssistedNodeInformation.h:
2601 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2602 * UIProcess/API/Cocoa/WKWebView.mm:
2603 (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2604 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2605 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2606 * UIProcess/ios/WKContentView.h:
2607 * UIProcess/ios/WKContentView.mm:
2608 (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2609 * UIProcess/ios/WKContentViewInteraction.mm:
2610 (-[WKContentView _displayFormNodeInputView]):
2611 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
2612 * WebProcess/WebPage/ios/WebPageIOS.mm:
2613 (WebKit::WebPage::getAssistedNodeInformation):
2615 2014-05-13 Simon Fraser <simon.fraser@apple.com>
2617 Fix the iOS Simulator build.
2619 * UIProcess/mac/ViewSnapshotStore.h:
2621 2014-05-13 Tim Horton <timothy_horton@apple.com>
2623 Speculative build fix for iOS.
2625 * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
2626 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
2627 (WebKit::WebMemoryPressureHandler::shared):
2628 (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2629 * WebKit2.xcodeproj/project.pbxproj:
2630 Make WebMemoryPressureHandlerIOS Obj-C.
2632 2014-05-13 Anders Carlsson <andersca@apple.com>
2634 Another follow-up build fix.
2636 * Shared/API/Cocoa/WKFoundation.h:
2638 2014-05-13 Anders Carlsson <andersca@apple.com>
2640 Another follow-up build fix.
2642 * Shared/API/Cocoa/WKFoundation.h:
2644 2014-05-13 Anders Carlsson <andersca@apple.com>
2648 * UIProcess/API/Cocoa/WKNavigationAction.mm:
2649 (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
2650 (-[WKNavigationAction _isUserInitiated]):
2652 2014-05-13 Anders Carlsson <andersca@apple.com>
2654 Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2655 https://bugs.webkit.org/show_bug.cgi?id=132880
2656 <rdar://problem/16901354>
2658 Reviewed by Dan Bernstein.
2660 * Shared/API/Cocoa/WKFoundation.h:
2661 Add typedef for older systems.
2663 * UIProcess/API/Cocoa/WKNavigationAction.h:
2664 Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2666 * UIProcess/API/Cocoa/WKNavigationAction.mm:
2667 (toWKNavigationType):
2668 This can be static now.
2670 (toNSEventModifierFlags):
2671 Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
2674 Helper to convert WebMouseEvent::Button to an AppKit button number.
2676 (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
2677 New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
2679 (-[WKNavigationAction _isUserInitiated]):
2680 Return the new ivar.
2682 * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2683 Remove readwrite overrides.
2685 * UIProcess/Cocoa/NavigationState.mm:
2686 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2687 Use initWithNavigationActionData:
2689 * UIProcess/Cocoa/UIDelegate.mm:
2690 (WebKit::UIDelegate::UIClient::createNewPage):
2691 Use initWithNavigationActionData:
2693 2014-05-13 Tim Horton <timothy_horton@apple.com>
2695 WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
2696 https://bugs.webkit.org/show_bug.cgi?id=127788
2697 <rdar://problem/15928241>
2699 Reviewed by Anders Carlsson.
2701 Allow JPEG snapshots. Compression is done asynchronously.
2702 Enable JPEG snapshots (for now) on all PLATFORM(MAC).
2703 We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
2705 * UIProcess/API/Cocoa/WKWebView.mm:
2706 * UIProcess/API/mac/WKView.mm:
2707 (-[WKView _takeViewSnapshot]):
2708 Store the image size on the ViewSnapshot.
2709 Move IOSurface-related code to ViewSnapshotStore.
2711 * UIProcess/ios/ViewGestureControllerIOS.mm:
2712 (WebKit::ViewGestureController::beginSwipeGesture):
2713 Adopt asLayerContents().
2715 * UIProcess/mac/ViewGestureController.h:
2716 * UIProcess/mac/ViewGestureControllerMac.mm:
2717 (WebKit::ViewGestureController::retrieveSnapshotForItem):
2718 (WebKit::ViewGestureController::beginSwipeGesture):
2719 (WebKit::ViewGestureController::removeSwipeSnapshot):
2720 Adopt asLayerContents().
2721 Put the snapshot on the right layer (the parent of the snapshot image layer);
2722 if it's on the snapshot image layer itself, if there is no image, the shadow
2723 is displayed on top of the white placeholder.
2724 Only reset snapshot purgeability if we're using IOSurface snapshots.
2726 * UIProcess/mac/ViewSnapshotStore.h:
2727 Add a bunch of macros to allow us to switch the snapshot backing store implementation.
2729 * UIProcess/mac/ViewSnapshotStore.mm:
2730 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2731 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2732 (WebKit::ViewSnapshotStore::recordSnapshot):
2733 If takeViewSnapshot() fails, don't remove the existing snapshot.
2735 (WebKit::createIOSurfaceFromImage):
2736 (WebKit::compressImageAsJPEG):
2737 (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
2738 (WebKit::ViewSnapshotStore::didCompressSnapshot):
2739 (WebKit::ViewSnapshot::clearImage):
2740 (WebKit::ViewSnapshot::asLayerContents):
2741 Asynchronously compress snapshots - if we're using JPEG snapshots - for a
2742 very large memory win (~20-30x).
2744 2014-05-12 Darin Adler <darin@apple.com>
2746 Make a few icon database improvements
2747 https://bugs.webkit.org/show_bug.cgi?id=132812
2749 Reviewed by Brady Eidson.
2751 * UIProcess/API/C/WKIconDatabase.cpp:
2752 (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
2753 out of the bindings into the WebIconDatabase class.
2755 * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
2757 * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
2758 (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
2759 (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
2760 (WebKit::WebIconDatabase::invalidate): Use nullptr.
2761 (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
2762 (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
2763 (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
2764 (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
2765 (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
2766 (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
2767 WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
2768 another copy of the data for each icon.
2770 * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
2771 IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
2772 function. Use a reference for the constructor argument. Use override for
2773 virtual functions. Use unique_ptr instead of OwnPtr.
2775 2014-05-12 Mark Lam <mark.lam@apple.com>
2777 WebKit2 on iOS needs to capture the main thread's floating point environment.
2778 <https://webkit.org/b/132755>
2780 Reviewed by Geoffrey Garen.
2782 * Shared/mac/ChildProcessMac.mm:
2783 (WebKit::ChildProcess::platformInitialize):
2784 - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
2785 the ARMv7 FP env to support denormalized numbers.
2786 - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
2789 2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2791 [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
2792 https://bugs.webkit.org/show_bug.cgi?id=132817
2794 Reviewed by Dirk Schulze.
2796 To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
2797 Besides this patch adds test html page for ewk_view_navigation unit test.
2799 * UIProcess/API/efl/tests/resources/Page1.html: Added.
2800 * UIProcess/API/efl/tests/resources/Page2.html: Added.
2801 * UIProcess/API/efl/tests/resources/Page3.html: Added.
2802 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2805 2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2807 Unreviewed, EFL build fix since r168625.
2809 * UIProcess/efl/WebContextEfl.cpp:
2810 (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
2812 2014-05-12 Simon Fraser <simon.fraser@apple.com>
2814 [iOS WK2] Fuzzy tiles on some sites on loading
2815 https://bugs.webkit.org/show_bug.cgi?id=132847
2816 <rdar://problem/16816178>
2818 Reviewed by Benjamin Poulain.
2820 PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
2821 causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
2822 scale wrong. Fix by overriding contentsScale() also.
2824 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2825 (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
2826 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2828 2014-05-12 Tim Horton <timothy_horton@apple.com>
2830 Triple-buffer RemoteLayerBackingStore
2831 https://bugs.webkit.org/show_bug.cgi?id=132786
2832 <rdar://problem/16877498>
2834 Reviewed by Simon Fraser.
2836 We need three buffers because we're currently unable to synchronize
2837 with the render server to swap when they're not in use, so we were
2838 throwing surfaces away far too frequently.
2840 This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
2842 * Shared/mac/RemoteLayerBackingStore.h:
2843 (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
2844 (WebKit::RemoteLayerBackingStore::volatility): Deleted.
2845 * Shared/mac/RemoteLayerBackingStore.mm:
2846 (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
2847 (WebKit::RemoteLayerBackingStore::clearBackingStore):
2848 (WebKit::RemoteLayerBackingStore::encode):
2849 (WebKit::RemoteLayerBackingStore::decode):
2850 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2851 (WebKit::RemoteLayerBackingStore::display):
2852 (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
2853 (WebKit::RemoteLayerBackingStore::setBufferVolatility):
2854 (WebKit::RemoteLayerBackingStore::Buffer::discard):
2855 (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
2856 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2857 (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
2858 Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
2859 Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
2860 We keep a volatility bit because querying IOSurface purgeability is expensive,
2861 and we have a guarantee that any changes will happen in the Web process
2862 and go through this class (the lack of this guarantee in most cases is why I'm not
2863 putting this bit in WebCore::IOSurface itself).
2865 Make it so that each buffer's volatility can be adjusted individually
2866 by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
2868 Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
2869 before swapping front and back if the back buffer (soon to be the front buffer)
2870 is still in use by the render server. This means that we will almost never
2871 have to throw away a surface because it's in use (and conversely never need
2872 to make a new surface).
2874 Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
2875 more aggressively than others.
2877 2014-05-12 Alexey Proskuryakov <ap@apple.com>
2879 REGRESSION (r165972): Can't type into text fields in Flash
2880 https://bugs.webkit.org/show_bug.cgi?id=132840
2881 <rdar://problem/16671969>
2883 Reviewed by Anders Carlsson.
2885 * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
2886 got accidentally lost when adding async text input code.
2888 2014-05-12 Chris Fleizach <cfleizach@apple.com>
2890 AX: .js dialogs shown in unload while AX is running crash WebKit.
2891 https://bugs.webkit.org/show_bug.cgi?id=123828
2893 Reviewed by Anders Carlsson.
2895 Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
2896 This allows us to avoid having special behavior for accessibility when the WebProcess needs
2899 * Platform/IPC/Connection.cpp:
2900 (IPC::Connection::waitForSyncReply):
2901 * Platform/IPC/Connection.h:
2902 * Platform/IPC/mac/ConnectionMac.cpp:
2903 (IPC::Connection::willSendSyncMessage):
2904 (IPC::Connection::didReceiveSyncReply):
2905 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2906 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2907 (WebKit::WebChromeClient::runJavaScriptAlert):
2908 (WebKit::WebChromeClient::runJavaScriptConfirm):
2909 (WebKit::WebChromeClient::runJavaScriptPrompt):
2910 (WebKit::WebChromeClient::print):
2911 (WebKit::WebChromeClient::exceededDatabaseQuota):
2912 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2913 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2915 2014-05-12 Alex Christensen <achristensen@webkit.org>
2917 Progress on web timing.
2918 https://bugs.webkit.org/show_bug.cgi?id=132574
2920 Reviewed by Alexey Proskuryakov.
2922 * Shared/WebCoreArgumentCoders.cpp:
2923 (IPC::ArgumentCoder<ResourceResponse>::encode):
2924 (IPC::ArgumentCoder<ResourceResponse>::decode):
2925 Transfer ResourceLoadTiming values if they exist.
2927 2014-05-12 Dan Bernstein <mitz@apple.com>
2929 [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
2930 https://bugs.webkit.org/show_bug.cgi?id=132836
2932 Reviewed by Anders Carlsson.
2934 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2935 (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
2936 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2938 2014-05-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
2940 REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
2941 https://bugs.webkit.org/show_bug.cgi?id=132831
2943 Unreviewed GTK build fix.
2945 * UIProcess/gtk/WebContextGtk.cpp:
2946 (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2947 This is now a static member function.
2949 2014-05-12 Anders Carlsson <andersca@apple.com>
2951 WKWebViewConfiguration should fill in the blanks
2952 https://bugs.webkit.org/show_bug.cgi?id=132832
2953 <rdar://problem/16886408>
2955 Reviewed by Dan Bernstein.
2957 * UIProcess/API/Cocoa/WKWebView.mm:
2958 (-[WKWebView initWithFrame:configuration:]):
2959 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2960 (-[WKWebViewConfiguration init]):
2961 (-[WKWebViewConfiguration _validate]):
2962 * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2964 2014-05-12 Anders Carlsson <andersca@apple.com>
2966 WKWebView should default to _backgroundExtendsBeyondPage = YES
2967 https://bugs.webkit.org/show_bug.cgi?id=132829
2968 <rdar://problem/16886364>
2970 Reviewed by Beth Dakin.
2972 * UIProcess/API/Cocoa/WKWebView.mm:
2973 (-[WKWebView initWithFrame:configuration:]):
2975 2014-05-12 Anders Carlsson <andersca@apple.com>
2977 Pass local storage directory to StorageManager::create
2978 https://bugs.webkit.org/show_bug.cgi?id=132827
2980 Reviewed by Tim Horton.
2982 Since we know the local storage directory at creation time and we know it never changes,
2983 we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
2985 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2986 (WebKit::LocalStorageDatabaseTracker::create):
2987 (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2988 (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2989 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
2990 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
2991 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2992 * UIProcess/Storage/StorageManager.cpp:
2993 (WebKit::StorageManager::create):
2994 (WebKit::StorageManager::StorageManager):
2995 (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
2996 * UIProcess/Storage/StorageManager.h:
2997 * UIProcess/WebContext.cpp:
2998 (WebKit::WebContext::WebContext):
3000 2014-05-11 Anders Carlsson <andersca@apple.com>
3002 Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
3003 https://bugs.webkit.org/show_bug.cgi?id=132809
3005 Reviewed by Dan Bernstein.
3007 * UIProcess/API/C/WKContext.cpp:
3008 (WKContextSetLocalStorageDirectory): Deleted.
3010 * UIProcess/API/C/WKContextConfigurationRef.cpp:
3011 (WKContextConfigurationCopyLocalStorageDirectory):
3012 (WKContextConfigurationSetLocalStorageDirectory):
3013 * UIProcess/API/C/WKContextConfigurationRef.h:
3014 Add getters and setters for the local storage directory.
3016 * UIProcess/API/C/WKContextPrivate.h:
3017 Remove WKContextSetLocalStorageDirectory.
3019 * UIProcess/API/Cocoa/WKProcessGroup.mm:
3020 (-[WKProcessGroup initWithInjectedBundleURL:]):
3021 Call WebContext::applyPlatformSpecificConfigurationDefaults.
3023 * UIProcess/API/Cocoa/WKProcessPool.mm:
3024 (-[WKProcessPool _initWithConfiguration:]):
3025 Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
3027 * UIProcess/APIContextConfiguration.cpp:
3028 (API::ContextConfiguration::webContextConfiguration):
3029 Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
3031 * UIProcess/APIContextConfiguration.h:
3032 (API::ContextConfiguration::injectedBundlePath):
3033 This should be const.
3035 (API::ContextConfiguration::localStorageDirectory):
3036 (API::ContextConfiguration::setLocalStorageDirectory):
3037 Add getter and setter.
3039 * UIProcess/Storage/StorageManager.cpp:
3040 (WebKit::StorageManager::setLocalStorageDirectory):
3041 ASSERT that the path isn't null.
3043 * UIProcess/WebContext.cpp:
3044 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
3045 New helper function that will fill in platform specific defaults for empty parameters.
3047 (WebKit::WebContext::WebContext):
3048 Get the local storage directory from the configuration.
3050 (WebKit::WebContext::setLocalStorageDirectory): Deleted.
3051 (WebKit::WebContext::localStorageDirectory): Deleted.
3052 These are no longer needed.
3054 * UIProcess/mac/WebContextMac.mm:
3055 (WebKit::WebContext::platformDefaultLocalStorageDirectory):
3056 This should be a static member function.
3058 2014-05-12 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
3060 Typo fix in generate-forwarding-headers
3061 https://bugs.webkit.org/show_bug.cgi?id=132820
3063 Reviewed by Anders Carlsson.
3065 * Scripts/generate-forwarding-headers.pl:
3066 (collectFrameworkHeaderPaths):
3068 2014-05-12 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
3070 [EFL] TLSErrors do not cause page load to fail when not ignored
3071 https://bugs.webkit.org/show_bug.cgi?id=131104
3073 Reviewed by Gyuyoung Kim.
3075 Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
3077 * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
3079 2014-05-11 Gordon Sheridan <gordon_sheridan@apple.com>
3081 Expose a function to copy favicon data without image conversion.
3082 https://bugs.webkit.org/show_bug.cgi?id=132805
3084 Reviewed by Darin Adler.
3086 * UIProcess/API/C/WKIconDatabase.cpp:
3087 (WKIconDatabaseCopyIconDataForPageURL):
3088 Add a function to copy the data from the image of a favicon for an associated page url.
3090 * UIProcess/API/C/WKIconDatabase.h:
3091 Declare WKIconDatabaseCopyIconDataForPageURL.
3093 2014-05-11 Seongjun Kim <isAir@company100.com>
3095 REGRESSION(r168603): [GTK] Build broken.
3096 https://bugs.webkit.org/show_bug.cgi?id=132810
3098 Reviewed by Carlos Garcia Campos.
3100 * UIProcess/API/gtk/WebKitWebContext.cpp:
3101 (createDefaultWebContext):
3102 Construct a WebContextConfiguration object and pass it to WebContext::create.
3104 2014-05-11 Anders Carlsson <andersca@apple.com>
3106 Remove local storage directory and sandbox extension from WebProcessCreationParameters
3107 https://bugs.webkit.org/show_bug.cgi?id=132808
3109 Reviewed by Beth Dakin.
3111 * Shared/WebProcessCreationParameters.cpp:
3112 (WebKit::WebProcessCreationParameters::encode):
3113 (WebKit::WebProcessCreationParameters::decode):
3114 * Shared/WebProcessCreationParameters.h:
3115 * UIProcess/WebContext.cpp:
3116 (WebKit::WebContext::createNewWebProcess):
3117 * WebProcess/cocoa/WebProcessCocoa.mm:
3118 (WebKit::WebProcess::platformInitializeWebProcess):
3120 2014-05-11 Jaehun Lim <ljaehun.lim@samsung.com>
3122 Unreviewed, CMake build fix after r168603
3124 Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
3128 2014-05-11 Anders Carlsson <andersca@apple.com>
3130 Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
3131 https://bugs.webkit.org/show_bug.cgi?id=132806
3132 <rdar://problem/16830143>
3134 Reviewed by Beth Dakin.
3136 Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
3137 configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
3138 as a configuration property. More setters will follow.
3140 * Shared/API/c/WKBase.h:
3141 Add WKContextConfigurationRef.
3143 * Shared/APIObject.h:
3144 Add ContextConfiguration enum declaration.
3146 * UIProcess/API/C/WKAPICast.h:
3147 Handle WKContextConfigurationRef.
3149 * UIProcess/API/C/WKContext.cpp:
3151 Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
3153 (WKContextCreateWithInjectedBundlePath):
3154 Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
3156 (WKContextCreateWithConfiguration):
3157 Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
3159 * UIProcess/API/C/WKContext.h:
3160 Add WKContextCreateWithConfiguration.
3162 * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
3163 (WKContextConfigurationCreate):
3164 Create an API::ContextConfiguration object.
3166 (WKContextConfigurationCopyInjectedBundlePath):
3167 Return the injected bundle path.
3169 (WKContextConfigurationSetInjectedBundlePath):
3170 Set the injected bundle path.
3172 * UIProcess/API/C/WKContextConfigurationRef.h: Added.
3175 * UIProcess/API/Cocoa/WKProcessGroup.mm:
3176 (-[WKProcessGroup initWithInjectedBundleURL:]):
3177 Construct a WebContextConfiguration object and pass it to WebContext::Create.
3179 * UIProcess/API/Cocoa/WKProcessPool.mm:
3180 (-[WKProcessPool _initWithConfiguration:]):
3181 Construct a WebContextConfiguration object and pass it to WebContext::Create.
3183 * UIProcess/APIContextConfiguration.cpp: Added.
3184 New API::ContextConfiguration object.
3186 (API::ContextConfiguration::webContextConfiguration):
3187 Construct a WebContextConfiguration struct from our current configuration.
3189 * UIProcess/APIContextConfiguration.h: Added.
3191 * UIProcess/WebContext.cpp:
3192 (WebKit::WebContext::create):
3193 Pass the WebContextConfiguration to the constructor.
3195 (WebKit::WebContext::WebContext):
3196 Set the injected bundle path from the WebContextConfiguration object.
3198 * UIProcess/WebContext.h:
3199 Change the WebContext constructor and create function to take a WebContextConfiguration object.
3201 * WebKit2.xcodeproj/project.pbxproj:
3204 2014-05-10 Csaba Osztrogonác <ossy@webkit.org>
3206 [WK2] URTBF after r168585.
3208 * Platform/IPC/Connection.h:
3209 * Shared/ChildProcessProxy.cpp:
3210 (WebKit::ChildProcessProxy::terminate):
3212 2014-05-10 Tim Horton <timothy_horton@apple.com>
3214 [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
3215 https://bugs.webkit.org/show_bug.cgi?id=132793
3216 <rdar://problem/16877870>
3218 Reviewed by Dan Bernstein.
3220 * UIProcess/API/Cocoa/WKWebView.mm:
3221 (-[WKWebView _updateScrollViewBackground]):
3222 Don't bypass the cache and make a copy of the CGColor just to set its alpha.
3223 Cache the last color and don't bother creating a UIColor nor updating the
3224 color on our views if it hasn't changed.
3226 2014-05-10 Tim Horton <timothy_horton@apple.com>
3228 Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
3229 https://bugs.webkit.org/show_bug.cgi?id=132790
3230 <rdar://problem/16877802>
3232 Reviewed by Dan Bernstein.
3234 * UIProcess/ios/WKScrollView.mm:
3235 (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
3236 If only one of the delegates will respond to a selector,
3237 we can return it from forwardingTargetForSelector: to avoid
3238 NSInvocation overhead.
3240 2014-05-10 Dan Bernstein <mitz@apple.com>
3242 [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
3243 https://bugs.webkit.org/show_bug.cgi?id=132776
3245 Reviewed by Darin Adler.
3247 * WebKit2.xcodeproj/project.pbxproj:
3249 2014-05-10 Ryuan Choi <ryuan.choi@samsung.com>
3251 [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
3252 https://bugs.webkit.org/show_bug.cgi?id=132771
3254 Reviewed by Gyuyoung Kim.
3256 Moved ownership of EwkSettings from EwkView to EwkPageGroup.
3258 * UIProcess/API/efl/EwkView.cpp:
3260 * UIProcess/API/efl/EwkView.h:
3261 (EwkView::settings): Deleted.
3262 * UIProcess/API/efl/ewk_page_group.cpp:
3263 (EwkPageGroup::EwkPageGroup):
3264 * UIProcess/API/efl/ewk_page_group_private.h:
3265 (EwkPageGroup::settings):
3266 * UIProcess/API/efl/ewk_settings_private.h:
3267 * UIProcess/API/efl/ewk_view.cpp:
3268 (ewk_view_settings_get):
3270 2014-05-10 Tim Horton <timothy_horton@apple.com>
3272 [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
3273 https://bugs.webkit.org/show_bug.cgi?id=132783
3274 <rdar://problem/16877326>
3276 Reviewed by Anders Carlsson.
3278 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3279 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
3280 There's a race window between the BackingStoreFlusher sending the new
3281 layer tree to the UI process and updating m_hasFlushed where we can
3282 get a reply back in (on the Web process main thread) from the UI process
3283 that we committed the new layer tree (didUpdate).
3284 This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
3285 Since the RELEASE_ASSERT is there only to avoid painting garbage, move
3286 our code to set m_hasFlushed=true to after we finish calling CGContextFlush
3287 on all of the contexts, instead of after we send the layer tree commit message,
3288 which will remove the race entirely.
3290 2014-05-10 Anders Carlsson <andersca@apple.com>
3292 ASSERTION FAILED: !m_connection under RunJavaScriptAlert
3293 https://bugs.webkit.org/show_bug.cgi?id=132792
3294 <rdar://problem/16691138>
3296 Reviewed by Dan Bernstein.
3298 Detect if someone implementing a UI delegate method with a completion handler never calls the completion
3299 handler and raise an exception instead of asserting.
3301 * UIProcess/Cocoa/UIDelegate.mm:
3302 (WebKit::CompletionHandlerCallChecker::create):
3303 (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
3304 (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
3305 (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
3306 (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
3307 (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
3308 (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
3309 (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
3311 2014-05-10 Anders Carlsson <andersca@apple.com>
3313 Use xpc_connection_kill for killing child processes where appropriate
3314 https://bugs.webkit.org/show_bug.cgi?id=132788
3315 <rdar://problem/16664185>
3317 Reviewed by Sam Weinig.
3319 * Platform/IPC/Connection.h:
3320 * Platform/IPC/mac/ConnectionMac.mm:
3321 (IPC::Connection::kill):
3322 * Platform/IPC/mac/XPCPtr.h:
3323 (IPC::XPCPtr::operator bool):
3324 * Shared/ChildProcessProxy.cpp:
3325 (WebKit::ChildProcessProxy::terminate):
3327 2014-05-10 Anders Carlsson <andersca@apple.com>
3329 WebKit2 is leaking an xpc_connection per web process it creates
3330 https://bugs.webkit.org/show_bug.cgi?id=132785
3331 <rdar://problem/14912160>
3333 Reviewed by Sam Weinig.
3335 Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
3337 Make sure we always adopt any connections that are created.
3339 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
3340 (DatabaseServiceInitializer):
3341 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3342 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
3343 (NetworkServiceInitializer):
3344 * Platform/IPC/Connection.h:
3345 (IPC::Connection::Identifier::Identifier):
3346 (IPC::Connection::xpcConnection):
3347 * Platform/IPC/mac/ConnectionMac.mm:
3348 (IPC::Connection::platformInvalidate):
3349 (IPC::Connection::platformInitialize):
3350 (IPC::Connection::getAuditToken):
3351 * Platform/IPC/mac/XPCPtr.h: Added.
3352 (IPC::XPCPtr::XPCPtr):
3353 (IPC::XPCPtr::~XPCPtr):
3355 (IPC::XPCPtr::operator!):
3356 (IPC::XPCPtr::operator=):
3358 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
3359 (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
3360 (PluginServiceInitializer):
3361 * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
3362 (WebKit::BootstrapMain):
3363 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3364 (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
3365 (WebKit::XPCServiceInitializer):
3366 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3367 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
3368 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
3369 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3370 (WebKit::XPCServiceEventHandler):
3371 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
3372 (WebKit::XPCServiceEventHandler):
3373 * UIProcess/Launcher/ProcessLauncher.cpp:
3374 (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3375 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3376 (WebKit::connectToService):
3377 * WebKit2.xcodeproj/project.pbxproj:
3378 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3379 (WebContentServiceInitializer):
3381 2014-05-10 Anders Carlsson <andersca@apple.com>
3383 Simplify createDataAvailableSource
3384 https://bugs.webkit.org/show_bug.cgi?id=132782
3385 <rdar://problem/16815202>
3387 Reviewed by Sam Weinig.
3389 * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
3390 Rename to make this Objective-C++ so we get the lambda-to-block conversion.
3392 (IPC::createDataAvailableSource):
3393 Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
3395 (IPC::Connection::open):
3396 Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
3398 * WebKit2.xcodeproj/project.pbxproj:
3399 Update for ConnectionMac.cpp to ConnectionMac.mm rename.
3401 2014-05-10 Anders Carlsson <andersca@apple.com>
3405 Reviewed by Darin Adler.
3407 * UIProcess/API/Cocoa/WKNavigationResponse.h:
3408 * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3409 (-[WKNavigationResponse isForMainFrame]):
3410 Use a slightly better name.
3412 2014-05-10 Anders Carlsson <andersca@apple.com>
3414 Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
3415 https://bugs.webkit.org/show_bug.cgi?id=132781
3416 <rdar://problem/16868319>
3418 Reviewed by Darin Adler.
3420 * UIProcess/API/Cocoa/WKNavigationResponse.h:
3421 * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3422 (-[WKNavigationResponse description]):
3423 (-[WKNavigationResponse isMainFrameNavigation]):
3424 (-[WKNavigationResponse _frame]):
3425 (-[WKNavigationResponse frame]): Deleted.
3426 (-[WKNavigationResponse setFrame:]): Deleted.
3427 * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
3428 * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
3429 * UIProcess/Cocoa/NavigationState.mm:
3430 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3431 * WebKit2.xcodeproj/project.pbxproj:
3433 2014-05-09 Dan Bernstein <mitz@apple.com>
3435 [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
3436 https://bugs.webkit.org/show_bug.cgi?id=132769
3438 Reviewed by Sam Weinig.
3440 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3441 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3443 2014-05-09 Benjamin Poulain <bpoulain@apple.com>
3445 [iOS][WK2] Fix bugs exposed by r168556
3446 https://bugs.webkit.org/show_bug.cgi?id=132768
3448 Reviewed by Ryosuke Niwa.
3450 Fix two bugs exposed by r168556.
3451 1) We were only changing the page scale factor when the scale was not adjusted by live
3452 resize. The idea was that the scale would either be the same (responsive content)
3453 or that it would be defined by the next viewContentRectUpdate.
3455 Now that we also send resize and scroll events, we must always update the scale since
3456 it affects some APIs observable from JavaScript (like scrolling bounds).
3458 2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
3459 were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
3462 * WebProcess/WebPage/ios/WebPageIOS.mm:
3463 (WebKit::withinEpsilon):
3464 (WebKit::WebPage::dynamicViewportSizeUpdate):
3466 2014-05-09 Ryuan Choi <ryuan.choi@samsung.com>
3468 [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
3469 https://bugs.webkit.org/show_bug.cgi?id=132767
3471 Reviewed by Gyuyoung Kim.
3473 IconDatabase should be closed explicitly.
3475 * UIProcess/API/efl/ewk_favicon_database.cpp:
3476 (EwkFaviconDatabase::~EwkFaviconDatabase):