1 2014-07-24 Simon Fraser <simon.fraser@apple.com>
3 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
4 https://bugs.webkit.org/show_bug.cgi?id=135221
5 <rdar://problem/17542454>
7 Reviewed by Benjamin Poulain.
9 The call to didCommitLayerTree() can cause one or two visible rect updates,
10 via changes to the UIScrollView contentSize and contentOffset. As a result, we
11 would notify the scrolling tree about a viewport change, but using the old
12 scrolling tree rather than the new one, so we could move layers around for
13 nodes which are about to be removed from the tree.
15 However, we also have to ensure that programmatic scrolls are applied after
16 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
17 store data about programmatic scrolls and return them to the caller, which
18 can apply them after didCommitLayerTree().
20 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
21 for the duration of the tree update, so that we can store requested scroll info in it.
22 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
23 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
24 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
25 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
26 * UIProcess/WebPageProxy.cpp:
27 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
28 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
29 (WebKit::WebPageProxy::editorState):
30 (WebKit::WebPageProxy::canDelete):
31 (WebKit::WebPageProxy::hasSelectedRange):
32 (WebKit::WebPageProxy::isContentEditable):
33 (WebKit::WebPageProxy::maintainsInactiveSelection):
34 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
35 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
36 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
37 by any programmatic scroll.
39 2014-07-24 Peyton Randolph <prandolph@apple.com>
41 Rename feature flag for long-press gesture on Mac.
42 https://bugs.webkit.org/show_bug.cgi?id=135259
44 Reviewed by Beth Dakin.
46 * Configurations/FeatureDefines.xcconfig:
47 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
49 2014-07-24 Dan Bernstein <mitz@apple.com>
51 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
52 https://bugs.webkit.org/show_bug.cgi?id=135229
54 Reviewed by Alexey Proskuryakov.
56 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
58 * Shared/WebCoreArgumentCoders.cpp:
59 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
60 platform data, do that.
61 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
62 * Shared/WebCoreArgumentCoders.h:
64 * Shared/mac/WebCoreArgumentCodersMac.mm:
65 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
66 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
68 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
69 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
70 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
72 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
74 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
75 https://bugs.webkit.org/show_bug.cgi?id=135227
76 <rdar://problem/17279500>
78 Reviewed by Simon Fraser.
80 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
81 instead of sticking the to real viewport in the UIProcess.
83 The sequence of event is:
84 1) A layer becomes fixed in some ScrollingTree transaction.
85 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
86 ScrollingTree update is made.
87 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
88 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
89 and the position is not corrected.
90 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
92 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
93 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
95 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
96 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
97 is called to "fix" the position.
99 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
100 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
101 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
102 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
103 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
104 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
105 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
106 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
107 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
109 2014-07-24 Oliver Hunt <oliver@apple.com>
111 Need to explicitly support location services in webcontent profile
112 https://bugs.webkit.org/show_bug.cgi?id=135251
115 Reviewed by Dan Bernstein.
117 Switching to uikit-app means that we remove the implicit support
118 for location services. This makes us explicitly opt-in.
120 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
122 2014-07-24 Tim Horton <timothy_horton@apple.com>
124 Crash at [WKContentView _applicationWillEnterForeground:] + 28
125 <rdar://problem/17797103>
127 Reviewed by Sam Weinig.
129 * UIProcess/ios/WKContentView.mm:
130 (-[WKContentView _applicationWillEnterForeground:]):
131 Drawing area can be null; null check it!
132 It's ok if we don't hide the content in this case, because if the drawing area is null,
133 it doesn't have any layers in the tree anyway.
135 2014-07-23 Simon Fraser <simon.fraser@apple.com>
137 [iOS WK2] Some help.apple.com pages not scrollable
138 https://bugs.webkit.org/show_bug.cgi?id=135228
139 <rdar://problem/17790792>
141 Reviewed by Benjamin Poulain.
143 On pages which size their document to the device size, the WKContentView size
144 never changes after it's created. In this situation, we never set a bounds
145 on the _rootContentView, so it remains zero-sized which breaks hit testing
146 on all enclosed UIScrollViews for overflow:scroll.
148 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
149 so they are always the size of their parent view, and remove the explicit setting
152 * UIProcess/ios/WKContentView.mm:
153 (-[WKContentView initWithFrame:context:configuration:webView:]):
154 (-[WKContentView setShowingInspectorIndication:]):
155 (-[WKContentView _didCommitLayerTree:]):
157 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
159 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
160 https://bugs.webkit.org/show_bug.cgi?id=135187
162 Reviewed by Simon Fraser.
164 Unfortunately, restricting the input into the document rect does not work.
165 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
166 the valid range should account for that.
168 Instead of playing with the keyboard rect, we can limit the scroll position
169 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
170 range as needed to give access to the content. Using that range is a bit more permissive
171 because the page could scroll to reveal content in the content inset defined by the client
172 of the API (this could actually be quite useful for hybrid apps).
174 There was already a function to change the content offset in the valid scrollview
175 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
176 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
178 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
179 system. The scroll position we get from the WebProcess is in document coordinates, while
180 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
181 To fix that, we scale the input position to get to the same scale as UIScrollView, then
182 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
184 * UIProcess/API/Cocoa/WKWebView.mm:
185 (contentOffsetBoundedInValidRange):
186 (changeContentOffsetBoundedInValidRange):
187 (-[WKWebView _scrollToContentOffset:]):
189 2014-07-23 Commit Queue <commit-queue@webkit.org>
191 Unreviewed, rolling out r171498.
192 https://bugs.webkit.org/show_bug.cgi?id=135223
194 It will regress some scroll position restoration on navigation
195 (r167916). (Requested by smfr on #webkit).
199 "[iOS WK2] Header bar on nytimes articles lands in the wrong
200 place after rubberbanding"
201 https://bugs.webkit.org/show_bug.cgi?id=135221
202 http://trac.webkit.org/changeset/171498
204 2014-07-23 Simon Fraser <simon.fraser@apple.com>
206 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
207 https://bugs.webkit.org/show_bug.cgi?id=135221
209 Reviewed by Tim Horton.
211 The call to didCommitLayerTree() can cause one or two visible rect updates,
212 via changes to the UIScrollView contentSize and contentOffset. As a result, we
213 would notify the scrolling tree about a viewport change, but using the old
214 scrolling tree rather than the new one, so we could move layers around for
215 nodes which are about to be removed from the tree.
217 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
220 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
221 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
223 2014-07-23 Oliver Hunt <oliver@apple.com>
225 Add a pseudo target to create sandbox override roots
226 https://bugs.webkit.org/show_bug.cgi?id=135216
229 Reviewed by Alexey Proskuryakov.
231 Just a duplicate of the standard ios sandbox target, targetting
232 the profile overrides directory. This means we can make roots
235 * WebKit2.xcodeproj/project.pbxproj:
237 2014-07-23 Oliver Hunt <oliver@apple.com>
239 Incorrect commit for sandbox profile
240 https://bugs.webkit.org/show_bug.cgi?id=135214
243 Reviewed by Anders Carlsson.
245 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
247 2014-07-23 Dan Bernstein <mitz@apple.com>
249 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
250 https://bugs.webkit.org/show_bug.cgi?id=135206
252 Reviewed by Anders Carlsson.
254 * Shared/cf/ArgumentCodersCF.cpp:
255 (IPC::copyPersistentRef): Added this helper function. It differs from
256 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
257 ensures that we get a reference to the copy that is in the keychain access group that the
258 Networking process can use.
259 (IPC::encode): Use copyPersistentRef.
261 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
263 Remove CSS_EXCLUSIONS compile flag and leftover code
264 https://bugs.webkit.org/show_bug.cgi?id=135175
266 Reviewed by Zoltan Horvath.
268 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
269 stubs. This removes the flag and the useless code.
271 * Configurations/FeatureDefines.xcconfig:
273 2014-07-23 Timothy Horton <timothy_horton@apple.com>
275 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
276 https://bugs.webkit.org/show_bug.cgi?id=135177
277 <rdar://problem/17764847>
279 Reviewed by Dan Bernstein.
281 * UIProcess/WebPageProxy.cpp:
282 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
283 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
284 * UIProcess/WebPageProxy.h:
285 * UIProcess/WebPageProxy.messages.in:
286 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
287 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
288 * WebProcess/WebPage/WebPage.cpp:
289 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
290 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
291 * WebProcess/WebPage/WebPage.h:
292 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
293 Only send it when the current history item for the main frame changes.
295 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
297 [EFL] EWebKit2.h should contain version information
298 https://bugs.webkit.org/show_bug.cgi?id=135189
300 Reviewed by Gyuyoung Kim.
302 Generate EWebKit2.h to contain the version information.
305 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
307 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
309 [EFL] Do not generate forwarding header for ewk headers
310 https://bugs.webkit.org/show_bug.cgi?id=135147
312 Reviewed by Gyuyoung Kim.
314 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
317 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
318 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
319 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
320 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
321 * UIProcess/efl/TextCheckerClientEfl.h:
323 2014-07-22 Commit Queue <commit-queue@webkit.org>
325 Unreviewed, rolling out r171366.
326 https://bugs.webkit.org/show_bug.cgi?id=135190
328 Broke three API tests (Requested by ap on #webkit).
332 "REGRESSION (r171239): Much more time spent taking snapshots
334 https://bugs.webkit.org/show_bug.cgi?id=135177
335 http://trac.webkit.org/changeset/171366
337 2014-07-22 Oliver Hunt <oliver@apple.com>
339 Reduce the size of the root WebContent sandbox profile
340 https://bugs.webkit.org/show_bug.cgi?id=135182
341 <rdar://problem/17739108>
343 Reviewed by Alexey Proskuryakov.
345 Switch from apple-ui-app to uikit-app as the root of the webcontent
348 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
350 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
352 Unreviewed build fix on EFL port after r171356.
354 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
356 * UIProcess/efl/WebContextEfl.cpp:
357 (WebKit::WebContext::platformMediaCacheDirectory):
359 2014-07-22 Enrica Casucci <enrica@apple.com>
361 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
362 https://bugs.webkit.org/show_bug.cgi?id=135180
363 <rdar://problem/16721055>
365 Reviewed by Simon Fraser.
367 Adds notifications to the WKContentView to know when scrolling starts and ends
368 in an overflow scroll. When scrolling starts, we hide the selection and we restore
369 it when scrolling ends, though not before the selection information in the editor
370 state has been updated.
371 It also adds a new method to the EditorClient class to force the
372 selection update when scrolling is completed.
374 * UIProcess/PageClient.h:
375 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
376 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
377 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
378 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
379 * UIProcess/Scrolling/RemoteScrollingTree.h:
380 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
381 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
382 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
383 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
384 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
385 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
386 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
387 * UIProcess/WebPageProxy.h:
388 * UIProcess/ios/PageClientImplIOS.h:
389 * UIProcess/ios/PageClientImplIOS.mm:
390 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
391 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
392 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
393 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
394 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
395 * UIProcess/ios/WKContentViewInteraction.h:
396 * UIProcess/ios/WKContentViewInteraction.mm:
397 (-[WKContentView _overflowScrollingWillBegin]):
398 (-[WKContentView _overflowScrollingDidEnd]):
399 (-[WKContentView _updateChangedSelection]):
400 * UIProcess/ios/WebPageProxyIOS.mm:
401 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
402 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
403 * WebProcess/WebCoreSupport/WebEditorClient.h:
404 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
405 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
406 (WebKit::WebEditorClient::updateSelection):
408 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
410 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
411 https://bugs.webkit.org/show_bug.cgi?id=135169
412 <rdar://problem/17740149>
414 Reviewed by Tim Horton.
416 * UIProcess/ios/WebPageProxyIOS.mm:
417 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
418 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
419 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
421 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
422 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
425 2014-07-22 Timothy Horton <timothy_horton@apple.com>
427 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
428 https://bugs.webkit.org/show_bug.cgi?id=135177
429 <rdar://problem/17764847>
431 Reviewed by Dan Bernstein.
433 * UIProcess/WebPageProxy.cpp:
434 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
435 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
436 * UIProcess/WebPageProxy.h:
437 * UIProcess/WebPageProxy.messages.in:
438 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
439 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
440 * WebProcess/WebPage/WebPage.cpp:
441 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
442 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
443 * WebProcess/WebPage/WebPage.h:
444 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
445 Only send it when the current history item for the main frame changes.
447 2014-07-22 Oliver Hunt <oliver@apple.com>
449 Add accountsd access to network sandbox profile
450 https://bugs.webkit.org/show_bug.cgi?id=135176
453 Reviewed by Anders Carlsson.
455 This is available to the webcontent process already, but is also
456 needed for the networking process.
458 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
460 2014-07-22 Oliver Hunt <oliver@apple.com>
462 Remove unused com.apple.webkit.* rules from profiles
463 https://bugs.webkit.org/show_bug.cgi?id=135174
466 Reviewed by Anders Carlsson.
468 We never send these rules so we should just remove use of them
471 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
472 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
474 2014-07-22 Oliver Hunt <oliver@apple.com>
476 Provide networking process with access to its HSTS db
477 https://bugs.webkit.org/show_bug.cgi?id=135121
480 Reviewed by Alexey Proskuryakov.
482 Add an extension parameter to pass the hsts database file.
483 This requires us to create the Caches/com.apple.WebKit.Networking
484 directory in the UI process, as the network sandbox
485 does not allow it to create the containing directory.
487 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
488 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
489 * Shared/Network/NetworkProcessCreationParameters.cpp:
490 (WebKit::NetworkProcessCreationParameters::encode):
491 (WebKit::NetworkProcessCreationParameters::decode):
492 * Shared/Network/NetworkProcessCreationParameters.h:
493 * UIProcess/WebContext.cpp:
494 (WebKit::WebContext::ensureNetworkProcess):
495 (WebKit::WebContext::networkingHSTSDatabasePath):
496 * UIProcess/WebContext.h:
497 * UIProcess/mac/WebContextMac.mm:
498 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
500 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
502 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
503 https://bugs.webkit.org/show_bug.cgi?id=135140
504 <rdar://problem/17754921>
506 Reviewed by Tim Horton.
508 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
509 everything is set up on the LayerTransaction.
511 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
512 should be the actual min/max for the current page state.
514 This patch split the two explicitely.
515 For layer transactions, the values are taken from the viewport configuration directly.
516 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
517 have been updated to take into account allowsUserScaling.
519 * WebProcess/WebPage/WebPage.cpp:
520 (WebKit::WebPage::willCommitLayerTree):
521 * WebProcess/WebPage/ios/WebPageIOS.mm:
522 (WebKit::WebPage::minimumPageScaleFactor):
523 (WebKit::WebPage::maximumPageScaleFactor):
524 (WebKit::WebPage::getAssistedNodeInformation):
526 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
528 Web Inspector: Fix unused parameter build warning
529 https://bugs.webkit.org/show_bug.cgi?id=135151
531 Reviewed by Joseph Pecoraro.
533 Fix unused parameter build warning by removing the parameter name
535 * WebProcess/WebPage/WebInspector.cpp:
536 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
538 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
540 Fix unused parameter build warning in UIProcess module
541 https://bugs.webkit.org/show_bug.cgi?id=135154
543 Reviewed by Alexey Proskuryakov.
545 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
547 * UIProcess/WebPageProxy.cpp:
548 (WebKit::WebPageProxy::viewStateDidChange):
550 2014-07-22 Jeremy Jones <jeremyj@apple.com>
552 Don't create new UIWindow for video fullscreen.
553 https://bugs.webkit.org/show_bug.cgi?id=135038
555 Reviewed by Darin Adler.
557 Use root UIView to parent fullscreen interface.
559 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
560 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
561 * WebProcess/ios/WebVideoFullscreenManager.mm:
562 (WebKit::screenRectForNode): Use client rect instead of screen rect.
564 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
566 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
567 https://bugs.webkit.org/show_bug.cgi?id=135144
569 Reviewed by Gyuyoung Kim.
571 All public enums of ewebkit should start with Ewk prefix.
572 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
573 In addition, added missing description and default value for Ewk_Event_Modifier.
575 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
576 (toEwkEventMouseButton):
577 (toEwkEventModifiers):
578 (EwkNavigationPolicyDecision::mouseButton):
579 (EwkNavigationPolicyDecision::modifiers):
580 (ewk_navigation_policy_mouse_button_get):
581 (ewk_navigation_policy_modifiers_get):
582 (toEventMouseButton): Deleted.
583 (toEventModifierKeys): Deleted.
584 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
585 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
587 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
589 [iOS][WK2] Improve event throttling for Scroll Events
590 https://bugs.webkit.org/show_bug.cgi?id=135082
591 <rdar://problem/17445266>
593 Reviewed by Simon Fraser.
595 In the WebKit layer, we want a measure that is representative of the responsiveness.
597 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
598 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
600 The value used for eventThrottlingDelay() is computed by averaging the new value with
601 the old values with a 80/20 split, favoring the old data. Favoring historical data
602 over the last timing avoid excessively throttling for a single slow frame.
604 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
605 a first cut keeping things simple.
607 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
608 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
609 and nothing is throttled.
611 If is it more than a frame, we throttle such that we can at least render two frames
612 per event dispatch based on the historical data.
614 The exact values will need some tweaking, but this set ensures well written pages get
615 60 events per seconds, while slow pages do not waste too much time on events.
617 * WebProcess/WebCoreSupport/WebChromeClient.h:
618 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
619 (WebKit::WebChromeClient::eventThrottlingDelay):
620 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
621 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
622 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
623 * WebProcess/WebPage/ViewUpdateDispatcher.h:
624 * WebProcess/WebPage/WebPage.cpp:
625 (WebKit::WebPage::WebPage):
626 (WebKit::WebPage::didFlushLayerTreeAtTime):
627 (WebKit::WebPage::didCommitLoad):
628 * WebProcess/WebPage/WebPage.h:
629 * WebProcess/WebPage/ios/WebPageIOS.mm:
630 (WebKit::WebPage::eventThrottlingDelay):
631 (WebKit::WebPage::updateVisibleContentRects):
632 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
633 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
635 2014-07-21 Simon Fraser <simon.fraser@apple.com>
637 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
638 https://bugs.webkit.org/show_bug.cgi?id=135141
639 <rdar://problem/17627525>
641 Reviewed by Benjamin Poulain.
643 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
644 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
645 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
648 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
651 * UIProcess/API/Cocoa/WKWebView.mm:
652 (-[WKWebView _computedContentInset]):
653 (-[WKWebView _setObscuredInsets:]):
655 2014-07-21 Oliver Hunt <oliver@apple.com>
657 Remove global cookie workaround from sandbox profiles
658 https://bugs.webkit.org/show_bug.cgi?id=135138
661 Reviewed by Alexey Proskuryakov.
663 Remove the workaround needed for global cookie access, and silencing
664 of the associated sandbox violation.
666 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
667 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
668 * UIProcess/mac/WebContextMac.mm:
669 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
671 2014-07-21 Oliver Hunt <oliver@apple.com>
673 Correct sandbox profiles to fix some excess privileges
674 https://bugs.webkit.org/show_bug.cgi?id=135134
675 <rdar://problem/17741886>
676 <rdar://problem/17739080>
678 Reviewed by Alexey Proskuryakov.
680 This cleans up our sandbox profiles to fix a few issues - the profiles
681 no longer allow us to issue file extension we have the ability to consume,
682 and tightens some of the other file access rules.
684 This means we have to addd some rules to allow us to access things
685 that we previously had access to due to lax file system restrictions.
687 Some of the features were fixable simply by using entitlements on the
688 process rather than custom rules.
690 * Configurations/WebContent-iOS.entitlements:
691 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
692 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
693 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
695 2014-07-21 Simon Fraser <simon.fraser@apple.com>
697 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
698 https://bugs.webkit.org/show_bug.cgi?id=132537
700 Reviewed by Benjamin Poulain.
702 Make interaction with form elements inside position:fixed less terrible by re-laying out
703 fixed elements relative to the document while we have an assisted node. This ensures
704 that all parts of a position:fixed are accessible (e.g. inputs on the right side
705 of a fixed-width top bar).
707 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
708 and encode/decode it.
709 (WebKit::AssistedNodeInformation::encode):
710 (WebKit::AssistedNodeInformation::decode):
711 * Shared/AssistedNodeInformation.h:
712 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
713 * UIProcess/PageClient.h: Add isAssistingNode().
714 * UIProcess/ios/PageClientImplIOS.h:
715 * UIProcess/ios/PageClientImplIOS.mm:
716 (WebKit::PageClientImpl::isAssistingNode):
717 * UIProcess/ios/WebPageProxyIOS.mm:
718 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
719 node, just use the document rect as the custom fixed position rect.
720 * WebProcess/WebPage/ios/WebPageIOS.mm:
721 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
722 since we have to fix it up for position:fixed. If the element is inside fixed
723 position in the main frame, re-set the fixed position rect to the document rect
724 (which forces a layout), re-fetch elementRect, then set it back. This ensures
725 that the UI process gets an elementRect which it can zoom to correctly.
727 2014-07-21 Timothy Horton <timothy_horton@apple.com>
729 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
730 https://bugs.webkit.org/show_bug.cgi?id=135132
731 <rdar://problem/17719832>
733 Reviewed by Simon Fraser.
735 * UIProcess/ProcessThrottler.cpp:
736 (WebKit::ProcessThrottler::ProcessThrottler):
737 (WebKit::ProcessThrottler::suspendTimerFired):
738 * UIProcess/ProcessThrottler.h:
739 * UIProcess/ios/ViewGestureControllerIOS.mm:
740 (WebKit::ViewGestureController::ViewGestureController):
741 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
742 * UIProcess/mac/ViewGestureController.h:
743 * UIProcess/mac/ViewGestureControllerMac.mm:
744 (WebKit::ViewGestureController::ViewGestureController):
745 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
746 We can't use WebCore timers in the UI process because of coexistence concerns
747 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
749 2014-07-21 Andy Estes <aestes@apple.com>
751 [iOS] Handle QuickLook ResourceLoaders in the web process
752 https://bugs.webkit.org/show_bug.cgi?id=135113
754 Reviewed by David Kilzer.
756 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
757 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
758 generated the main resource.
760 * WebProcess/Network/WebResourceLoadScheduler.cpp:
761 (WebKit::WebResourceLoadScheduler::scheduleLoad):
763 2014-07-21 Brady Eidson <beidson@apple.com>
765 DatabaseProcess doesn't relaunch after crashing.
766 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
768 Reviewed by Alexey Proskuryakov.
770 * UIProcess/Databases/DatabaseProcessProxy.cpp:
771 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
773 * UIProcess/WebContext.cpp:
774 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
775 * UIProcess/WebContext.h:
777 * UIProcess/WebContextSupplement.h:
778 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
780 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
782 Fix warnings caused by unused parameter.
783 https://bugs.webkit.org/show_bug.cgi?id=134975
785 Reviewed by Gyuyoung Kim.
787 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
789 * UIProcess/API/efl/EwkView.cpp:
790 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
791 * UIProcess/LegacySessionStateCodingNone.cpp:
792 (WebKit::decodeLegacySessionState):
794 2014-07-20 Jeremy Jones <jeremyj@apple.com>
796 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
797 https://bugs.webkit.org/show_bug.cgi?id=134894
799 Reviewed by Darin Adler.
801 Add setCanPlayFastReverse
803 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
804 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
805 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
806 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
808 2014-07-20 Jeremy Jones <jeremyj@apple.com>
810 Decrease flicker when enter and exit fullscreen.
811 https://bugs.webkit.org/show_bug.cgi?id=134919
813 Reviewed by Simon Fraser.
815 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
817 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
818 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
819 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
820 * WebProcess/ios/WebVideoFullscreenManager.mm:
821 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
823 2014-07-20 Dan Bernstein <mitz@apple.com>
825 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
826 https://bugs.webkit.org/show_bug.cgi?id=135099
828 Reviewed by David Kilzer.
830 * WebProcess/WebPage/ios/WebPageIOS.mm:
831 (WebKit::WebPage::getPositionInformation): Added a null check.
833 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
835 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
836 https://bugs.webkit.org/show_bug.cgi?id=135047
838 Reviewed by Darin Adler.
840 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
841 in WebProcess as well.
843 * WebProcess/WebPage/WebPage.h:
844 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
845 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
846 (WebKit::WebPage::setAcceleratedCompositingWindowId):
848 2014-07-18 Oliver Hunt <oliver@apple.com>
850 We don't provide an extension to the temp file used for uploads
851 https://bugs.webkit.org/show_bug.cgi?id=135079
853 Reviewed by Sam Weinig.
855 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
856 extensions for the files passed to the content process.
858 * UIProcess/WebPageProxy.cpp:
859 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
861 2014-07-18 Tim Horton <timothy_horton@apple.com>
863 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
864 https://bugs.webkit.org/show_bug.cgi?id=135080
865 <rdar://problem/17734714>
867 Reviewed by Sam Weinig.
869 * UIProcess/ios/ViewGestureControllerIOS.mm:
870 (WebKit::ViewGestureController::beginSwipeGesture):
871 (WebKit::ViewGestureController::canSwipeInDirection):
873 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
875 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
876 https://bugs.webkit.org/show_bug.cgi?id=135077
878 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
879 doesn't have title attribute.
881 Reviewed by Dan Bernstein.
883 * WebProcess/WebPage/ios/WebPageIOS.mm:
884 (WebKit::WebPage::getPositionInformation):
886 2014-07-18 Andy Estes <aestes@apple.com>
888 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
889 https://bugs.webkit.org/show_bug.cgi?id=135072
890 <rdar://problem/17528188>
892 Reviewed by David Kilzer.
894 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
895 * Shared/mac/WebCoreArgumentCodersMac.mm:
896 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
897 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
898 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
899 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
900 * UIProcess/WebFrameProxy.cpp:
901 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
902 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
903 If the unblock is successful, reload the WebPageProxy.
904 * UIProcess/WebFrameProxy.h:
905 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
906 * UIProcess/WebPageProxy.cpp:
907 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
908 request and ignore if so.
909 * UIProcess/WebPageProxy.h:
910 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
911 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
912 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
913 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
915 2014-07-18 Simon Fraser <simon.fraser@apple.com>
917 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
918 https://bugs.webkit.org/show_bug.cgi?id=135078
919 <rdar://problem/17401823>
921 Reviewed by Tim Horton.
923 Fix the logging of requested scroll position and frame scale factor.
925 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
926 (WebKit::RemoteScrollingTreeTextStream::dump):
928 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
930 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
931 https://bugs.webkit.org/show_bug.cgi?id=135062
933 Reviewed by Anders Carlsson.
935 Switch to RetainPtr instead of manual memory management of ivars.
937 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
938 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
939 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
940 (-[_WKRemoteObjectInterface identifier]):
941 (-[_WKRemoteObjectInterface description]):
942 (-[_WKRemoteObjectInterface dealloc]): Deleted.
944 2014-07-18 Tim Horton <timothy_horton@apple.com>
946 Take navigation snapshots whenever the current back-forward item is going to change
947 https://bugs.webkit.org/show_bug.cgi?id=135058
948 <rdar://problem/17464515>
950 Reviewed by Dan Bernstein.
952 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
953 snapshot whenever the Web process says that the current back-forward item is going to change.
954 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
955 just two places instead of 5.
957 * UIProcess/WebPageProxy.cpp:
958 (WebKit::WebPageProxy::goForward):
959 (WebKit::WebPageProxy::goBack):
960 (WebKit::WebPageProxy::goToBackForwardItem):
961 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
962 We no longer need to special-case taking navigation snapshots
963 when the UI process changes the back forward item or upon
964 didStartProvisionalLoadForFrame, because we'll always snapshot
965 in willChangeCurrentHistoryItem in all of these cases.
967 * UIProcess/WebPageProxy.cpp:
968 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
969 * UIProcess/WebPageProxy.h:
970 * UIProcess/WebPageProxy.messages.in:
971 Add willChangeCurrentHistoryItem message, which comes from the Web process.
972 When it arrives, take a navigation snapshot.
974 * UIProcess/ios/ViewGestureControllerIOS.mm:
975 (WebKit::ViewGestureController::beginSwipeGesture):
976 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
977 so that it doesn't bail from taking the snapshot because we have a snapshot up.
979 (WebKit::ViewGestureController::endSwipeGesture):
980 We no longer need to explicitly disable snapshotting while navigating, because
981 we will avoid taking the snapshot if there's a snapshot being displayed.
983 * UIProcess/mac/ViewGestureControllerMac.mm:
984 (WebKit::ViewGestureController::~ViewGestureController):
985 Remove the snapshot if it's still up when ViewGestureController is destroyed.
986 The Mac version of ViewGestureController is destroyed on Web process crashes
987 because it is a message receiver, so it is not guaranteed to have the same
988 lifetime as the WebPageProxy and friends.
990 (WebKit::ViewGestureController::trackSwipeGesture):
991 Make use of recordNavigationSnapshot.
993 (WebKit::ViewGestureController::endSwipeGesture):
994 Ditto from the Mac version.
996 * UIProcess/mac/ViewSnapshotStore.h:
997 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
998 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
999 * UIProcess/mac/ViewSnapshotStore.mm:
1000 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1001 (WebKit::ViewSnapshotStore::recordSnapshot):
1002 Remove the snapshot disabling mechanism and bail from snapshotting if we're
1003 showing a snapshot, as mentioned above.
1005 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1006 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1007 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1008 * WebProcess/WebPage/WebPage.cpp:
1009 (WebKit::WebPage::willChangeCurrentHistoryItem):
1010 * WebProcess/WebPage/WebPage.h:
1011 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
1013 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
1015 REGRESSION: Crash when typing into text field that clears itself on iOS
1017 <https://bugs.webkit.org/show_bug.cgi?id=135044>
1018 <rdar://problem/17640443>
1020 Reviewed by Darin Adler.
1022 * WebProcess/WebPage/ios/WebPageIOS.mm:
1023 (WebKit::WebPage::requestAutocorrectionData):
1024 wordRangeFromPosition() returns null in some cases; null check range
1025 before dereferencing it. Moved some variable declarations around to
1026 better match our style.
1028 2014-07-18 Tim Horton <timothy_horton@apple.com>
1030 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
1031 https://bugs.webkit.org/show_bug.cgi?id=134999
1032 <rdar://problem/17238025>
1034 Reviewed by Sam Weinig.
1036 In some cases, clients may need to throw a WKWebView with no back-forward list over
1037 another WKWebView, and want to participate in gesture swipe as if they were actually
1038 the page being overlaid.
1040 * UIProcess/API/Cocoa/WKWebView.mm:
1041 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1042 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1043 (-[WKWebViewConfiguration copyWithZone:]):
1044 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
1045 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
1046 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1047 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
1048 will use as the real source of back-forward items, and the destination of the swipe navigation.
1049 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
1050 and will be doing the navigation.
1052 * UIProcess/ios/ViewGestureControllerIOS.mm:
1053 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
1054 (WebKit::ViewGestureController::beginSwipeGesture):
1055 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
1056 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
1057 so that when swiping forward from the alternate view, it will have the "right" snapshot.
1058 Get the target back forward item from the alternate view.
1059 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
1061 (WebKit::ViewGestureController::canSwipeInDirection):
1062 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
1064 (WebKit::ViewGestureController::endSwipeGesture):
1065 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
1066 Perform the navigation on the alternate view if necessary.
1068 (WebKit::ViewGestureController::removeSwipeSnapshot):
1069 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
1071 * UIProcess/mac/ViewGestureController.h:
1073 2014-07-17 David Kilzer <ddkilzer@apple.com>
1075 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
1076 <http://webkit.org/b/135006>
1078 Reviewed by Darin Adler.
1080 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
1082 * Configurations/DebugRelease.xcconfig: Remove empty
1083 SECTORDER_FLAGS definition.
1084 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
1085 SECTORDER_FLAGS is only set on Production builds.
1087 2014-07-17 Alexey Proskuryakov <ap@apple.com>
1089 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
1090 https://bugs.webkit.org/show_bug.cgi?id=135032
1091 <rdar://problem/17716602>
1093 Reviewed by Dan Bernstein.
1095 * UIProcess/WebPageProxy.cpp:
1096 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
1097 transaction in resetStateAfterProcessExited() wouldn't be committed.
1098 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
1099 the most important fact that this is a stack object that can't be simply moved to
1100 a different function.
1102 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
1104 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
1105 https://bugs.webkit.org/show_bug.cgi?id=135036
1107 Reviewed by Dan Bernstein.
1109 * WebProcess/WebPage/ios/WebPageIOS.mm:
1110 (WebKit::WebPage::updateVisibleContentRects):
1111 I forgot to update one of the condition after changing from lastTransaction to next transaction
1114 2014-07-17 Enrica Casucci <enrica@apple.com>
1116 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
1117 https://bugs.webkit.org/show_bug.cgi?id=135023
1118 <rdar://problem/17617282>
1120 Reviewed by Benjamin Poulain and Ryosuke Niwa.
1122 WKContentView needs to implement hasContent to correctly show
1123 the appropriate menu bar content. The patch adds this information
1126 * Shared/EditorState.cpp:
1127 (WebKit::EditorState::encode):
1128 (WebKit::EditorState::decode):
1129 * Shared/EditorState.h:
1130 (WebKit::EditorState::EditorState):
1131 * UIProcess/ios/WKContentViewInteraction.mm:
1132 (-[WKContentView hasContent]):
1133 * WebProcess/WebPage/WebPage.cpp:
1134 (WebKit::WebPage::editorState):
1136 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
1138 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
1139 https://bugs.webkit.org/show_bug.cgi?id=135010
1141 Reviewed by Darin Adler.
1143 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
1144 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
1146 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
1147 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
1148 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
1150 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
1153 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
1154 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
1155 is initialized, and doing an animated resize would trash the WebProcess state.
1156 I wish I had a better solution, this is not great.
1158 * UIProcess/API/Cocoa/WKWebView.mm:
1159 (-[WKWebView _processDidExit]):
1160 (-[WKWebView _didCommitLoadForMainFrame]):
1161 (-[WKWebView _didCommitLayerTree:]):
1162 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
1163 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
1164 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
1167 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
1168 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
1170 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
1171 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
1172 everything we need and does not use any synchronous messages.
1174 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
1175 (-[WKWebView _restorePageStateToExposedRect:scale:]):
1176 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
1177 (-[WKWebView _scrollToContentOffset:]):
1178 (-[WKWebView _frameOrBoundsChanged]):
1179 (-[WKWebView _updateVisibleContentRects]):
1180 (-[WKWebView _setMinimumLayoutSizeOverride:]):
1181 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
1182 (-[WKWebView _setInterfaceOrientationOverride:]):
1183 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
1184 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1185 (-[WKWebView _endAnimatedResize]):
1186 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
1187 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1189 2014-07-17 Brent Fulgham <bfulgham@apple.com>
1191 [Mac] Full screen video not always animating in the correct Space
1192 https://bugs.webkit.org/show_bug.cgi?id=135020
1193 <rdar://problem/17542310>
1195 Reviewed by Dean Jackson.
1197 The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
1198 mode. Subsequent fullscreen transitions will always start from this Space, even if you move
1199 the WebKit-hosted application to a different Space.
1201 We can help the display system know when we've moved to a new Space by calling NSWindow's
1202 'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
1203 This method call hooks the window into the current Space so everything works properly.
1205 * UIProcess/mac/WKFullScreenWindowController.mm:
1206 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
1207 new fullscreen window to the current Space before starting transition to fullscreen.
1209 2014-07-17 Timothy Hatcher <timothy@apple.com>
1211 Make console.profile record to the Timeline.
1213 https://bugs.webkit.org/show_bug.cgi?id=134643
1215 Reviewed by Joseph Pecoraro.
1217 * WebProcess/WebPage/WebInspector.cpp:
1218 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
1219 (WebKit::WebInspector::startJavaScriptProfiling):
1220 (WebKit::WebInspector::stopJavaScriptProfiling):
1222 2014-07-17 Brady Eidson <beidson@apple.com>
1224 Crash in ServicesOverlayController::~ServicesOverlayController.
1225 <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
1227 Reviewed by Tim Horton.
1229 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1230 (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
1231 PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
1233 2014-07-17 Tim Horton <timothy_horton@apple.com>
1235 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
1236 https://bugs.webkit.org/show_bug.cgi?id=135018
1237 <rdar://problem/17615038>
1239 Reviewed by Simon Fraser.
1241 * UIProcess/DrawingAreaProxy.h:
1242 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
1243 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1244 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1245 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
1246 * UIProcess/mac/RemoteLayerTreeHost.h:
1247 * UIProcess/mac/RemoteLayerTreeHost.mm:
1248 (WebKit::RemoteLayerTreeHost::detachRootLayer):
1249 Add a mechanism to "hide" drawing area content until the next commit,
1250 by detaching the root layer. RemoteLayerTreeHost will automatically reattach
1251 it at the next commit.
1253 * UIProcess/WebPageProxy.cpp:
1254 (WebKit::WebPageProxy::viewStateDidChange):
1255 * UIProcess/WebPageProxy.h:
1256 Add a parameter to viewStateDidChange specifying whether dispatching the change
1257 to the Web process is deferrable or not. We will also automatically use "Immediate" if
1258 the view is coming in-window, like we did before.
1260 * UIProcess/ios/WKContentView.mm:
1261 (-[WKContentView _applicationWillEnterForeground:]):
1262 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
1263 view state changes when coming into the foreground, and will have removed the root layer
1264 if a commit didn't come in while waitForDidUpdateViewState blocks.
1266 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
1268 [EFL][WK2] Add a "focus,notfound" signal.
1269 https://bugs.webkit.org/show_bug.cgi?id=134674
1271 Reviewed by Gyuyoung Kim.
1273 Add a "focus,notfound" signal to handover focus control to application
1274 because there are no elements of webview to focus on the given direction.
1276 Application can decide to move the focus to next widget of ewk_view or something else
1277 by using this signal.
1279 * UIProcess/API/efl/EwkViewCallbacks.h:
1280 * UIProcess/API/efl/ewk_view.h:
1281 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
1282 (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
1283 (EWK2UnitTest::EWK2UnitTestBase::keyDown):
1284 (EWK2UnitTest::EWK2UnitTestBase::keyUp):
1285 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1286 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1287 (EWK2ViewTest::FocusNotFoundCallback):
1289 * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
1290 (WebKit::PageUIClientEfl::takeFocus):
1292 2014-07-16 Brady Eidson <beidson@apple.com>
1294 Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
1295 https://bugs.webkit.org/show_bug.cgi?id=134984
1297 Reviewed by David Kilzer.
1299 * UIProcess/API/Cocoa/WKProcessPool.mm:
1300 (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
1301 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1303 2014-07-16 Alexey Proskuryakov <ap@apple.com>
1305 A test that hangs at cleanup stage confuses webkitpy hugely
1306 https://bugs.webkit.org/show_bug.cgi?id=122475
1307 <rdar://problem/17184354>
1309 Reviewed by Anders Carlsson.
1311 Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
1312 new process for the same WebPageProxy would hit assertions.
1314 * UIProcess/WebPageProxy.cpp:
1315 (WebKit::WebPageProxy::processDidCrash):
1316 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1318 2014-07-16 David Kilzer <ddkilzer@apple.com>
1320 [iOS] Update order file paths for WebKit and WebKit2
1321 <http://webkit.org/b/134993>
1322 <rdar://problem/17557776>
1324 Reviewed by Darin Adler.
1326 * Configurations/Base.xcconfig: Add order file for iOS
1329 2014-07-16 Brady Eidson <beidson@apple.com>
1331 Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
1332 <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
1334 Reviewed by Dan Bernstein.
1336 Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
1337 * UIProcess/API/Cocoa/WKProcessPool.mm:
1338 (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
1339 (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
1340 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1342 Add a big shiny comment in a few key places:
1343 * DatabaseProcess/DatabaseProcess.cpp:
1344 (WebKit::DatabaseProcess::initializeDatabaseProcess):
1345 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1346 (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
1347 * UIProcess/WebContext.cpp:
1348 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1349 (WebKit::WebContext::ensureDatabaseProcess):
1351 2014-07-16 Enrica Casucci <enrica@apple.com>
1353 REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
1354 https://bugs.webkit.org/show_bug.cgi?id=134992
1355 <rdar://problem/17528020>
1357 Reviewed by Benjamin Poulain.
1359 This patch exposes the scroller and the visible content rect so that
1360 UIKit can implement autoscroll when dragging the selections.
1361 It also changes that way we do hit testing to allow hit test outside
1362 the clipping region and fixes the way we compute the selection rectangle
1363 for the block selection, ensuring that we consider also non text elements
1366 * UIProcess/ios/WKContentViewInteraction.mm:
1367 (-[WKContentView scroller]):
1368 (-[WKContentView visibleRect]):
1369 * WebProcess/WebPage/ios/WebPageIOS.mm:
1370 (WebKit::selectionBoxForRange):
1371 (WebKit::WebPage::rangeForWebSelectionAtPosition):
1372 (WebKit::WebPage::rangeForBlockAtPoint):
1373 (WebKit::WebPage::expandedRangeFromHandle):
1374 (WebKit::WebPage::contractedRangeFromHandle):
1375 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
1376 (WebKit::WebPage::changeBlockSelection):
1378 2014-07-16 Alexey Proskuryakov <ap@apple.com>
1380 <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
1381 CFNetwork cache path in WebContent process
1383 Rubber-stamped by Sam Weinig.
1385 Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
1386 false at this point in initialization sequence. But we did the right thing, as we
1387 always need to set the cache path, even when network process is used for most loading.
1389 * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
1391 2014-07-16 Timothy Horton <timothy_horton@apple.com>
1393 Dispatch top content inset changes immediately if synchronously waiting for view state changes
1394 https://bugs.webkit.org/show_bug.cgi?id=134942
1395 <rdar://problem/17666800>
1397 Reviewed by Simon Fraser.
1399 * UIProcess/API/mac/WKView.mm:
1400 (-[WKView _dispatchSetTopContentInset]):
1401 (-[WKView _setTopContentInset:]):
1402 Move the check from _setTopContentInset: to _dispatchSetTopContentInset
1403 that ensures that we only send the message if the top content inset changed.
1405 2014-07-16 Benjamin Poulain <bpoulain@apple.com>
1407 [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
1408 https://bugs.webkit.org/show_bug.cgi?id=134965
1409 Related to <rdar://problem/17082607>
1411 Reviewed by Tim Horton.
1413 Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
1414 to the page at the new size during the transition.
1416 Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
1417 can be applied to the wrong set of tiles.
1418 This is mostly a problem for unresponsive WebProcess or when the synchronization is done
1421 There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
1422 completely fails to get the new page, the UIProcess is in a somewhat messy state.
1423 I will look into that separately than the layer tree synchronization.
1425 * UIProcess/API/Cocoa/WKWebView.mm:
1426 (-[WKWebView _didCommitLayerTree:]):
1427 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
1428 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
1429 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1430 * UIProcess/PageClient.h:
1431 * UIProcess/WebPageProxy.cpp:
1432 (WebKit::WebPageProxy::WebPageProxy):
1433 (WebKit::WebPageProxy::resetState):
1434 * UIProcess/WebPageProxy.h:
1435 * UIProcess/ios/PageClientImplIOS.h:
1436 * UIProcess/ios/PageClientImplIOS.mm:
1437 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
1438 * UIProcess/ios/WebPageProxyIOS.mm:
1439 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1440 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
1441 (WebKit::WebPageProxy::didCommitLayerTree):
1442 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
1443 * WebProcess/WebPage/WebPage.cpp:
1444 (WebKit::WebPage::WebPage):
1445 (WebKit::WebPage::didCommitLoad):
1446 * WebProcess/WebPage/WebPage.h:
1447 * WebProcess/WebPage/WebPage.messages.in:
1448 * WebProcess/WebPage/ios/WebPageIOS.mm:
1449 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
1450 (WebKit::WebPage::updateVisibleContentRects):
1451 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1452 (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
1453 (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
1455 2014-07-16 Dan Bernstein <mitz@apple.com>
1457 REGRESSION (r170653): Web Content service’s Info.plist has wrong format
1458 https://bugs.webkit.org/show_bug.cgi?id=134973
1460 Reviewed by Alexey Proskuryakov.
1462 * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
1463 script build phases to convert Info.plist back to binary format if the
1464 PLIST_FILE_OUTPUT_FORMAT build setting requires it.
1466 2014-07-15 Benjamin Poulain <bpoulain@apple.com>
1470 * UIProcess/API/Cocoa/WKWebView.mm:
1471 (-[WKWebView _scrollToContentOffset:]):
1472 On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
1473 of those was ignored.
1475 2014-07-15 Dan Bernstein <mitz@apple.com>
1477 WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
1478 https://bugs.webkit.org/show_bug.cgi?id=134951
1480 Reviewed by Tim Horton.
1482 * UIProcess/API/Cocoa/WKWebView.mm:
1483 (-[WKWebView _setFormDelegate:]):
1485 2014-07-15 Benjamin Poulain <benjamin@webkit.org>
1487 [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
1488 https://bugs.webkit.org/show_bug.cgi?id=134952
1489 <rdar://problem/17647116>
1491 Reviewed by Enrica Casucci.
1493 When we received a scroll request, we were taking that offset directly to set the UIScrollView
1494 scroll position. This is a problem if a page request scrolling to an invalid position, we were
1497 This patch limits the position to be inside the document.
1499 -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
1501 Some pages rely on the page scale factor changing instantly, because that is how it worked
1504 On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
1505 dynamically, and the page scale factor can change in response to WebProcess events (the focus
1506 changing for example). To make the page works, the WebProcess does not restrict the scroll position.
1508 In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
1510 -- Why not use changeContentOffsetBoundedInValidRange()?
1512 The scroll offset as seen by the page is relative to the unobscured rect. While the position used
1513 for history item is a visual position. All we need in this case is a position in the view.
1515 * UIProcess/API/Cocoa/WKWebView.mm:
1516 (-[WKWebView _scrollToContentOffset:]):
1517 * UIProcess/WebPageProxy.h:
1518 * UIProcess/ios/WebPageProxyIOS.mm:
1519 (WebKit::WebPageProxy::resendLastVisibleContentRects):
1521 2014-07-15 Timothy Horton <timothy_horton@apple.com>
1523 Dispatch top content inset changes immediately if synchronously waiting for view state changes
1524 https://bugs.webkit.org/show_bug.cgi?id=134942
1525 <rdar://problem/17666800>
1527 Reviewed by Simon Fraser.
1529 * UIProcess/API/mac/WKView.mm:
1530 (-[WKView endDeferringViewInWindowChanges]):
1531 (-[WKView endDeferringViewInWindowChangesSync]):
1532 (-[WKView _dispatchSetTopContentInset]):
1533 (-[WKView _setTopContentInset:]):
1534 Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
1535 This will ensure that the incoming contents have the right top content inset, and we don't
1536 flash between the wrong inset and the right one.
1538 2014-07-15 Enrica Casucci <enrica@apple.com>
1540 REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
1541 https://bugs.webkit.org/show_bug.cgi?id=134934
1542 <rdar://problem/17224638>
1544 Reviewed by Tim Horton.
1546 * UIProcess/ios/WKContentViewInteraction.mm:
1548 Tab and back tab should be handled as special keys that have
1549 a command associated. The command specifies for each key the relevant
1550 action. This patch implements the commands property to create the association
1551 between key and command and the relevant actions that will execute the same
1552 code executed when the used taps on the < > buttons in the accessory bar.
1554 (-[WKContentView keyCommands]):
1555 (-[WKContentView _nextAccessoryTab:]):
1556 (-[WKContentView _prevAccessoryTab:]):
1558 2014-07-15 Oliver Hunt <oliver@apple.com>
1560 More tidying of the webcontent sandbox profile
1561 https://bugs.webkit.org/show_bug.cgi?id=134938
1563 Reviewed by Alexey Proskuryakov.
1565 Remove some excessive abilities from the profile and make
1566 the required ones explicit.
1568 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1570 2014-07-14 Andreas Kling <akling@apple.com>
1572 [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
1573 <https://webkit.org/b/134915>
1575 When we're under memory pressure, the last thing we want to be doing is
1576 creating gratuitous new IOSurfaces. Just wait for the gesture to end before
1577 rendering at the new scale.
1579 Reviewed by Tim Horton.
1581 * WebProcess/WebPage/ios/WebPageIOS.mm:
1582 (WebKit::WebPage::updateVisibleContentRects):
1584 2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
1586 [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
1587 https://bugs.webkit.org/show_bug.cgi?id=134914
1589 Reviewed by Simon Fraser.
1591 Release our copied NSString in dealloc.
1593 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1594 (-[_WKRemoteObjectInterface dealloc]):
1596 2014-07-14 Dean Jackson <dino@apple.com>
1598 [PlugIns] Check for a non-null snapshot image before trying to decode it
1599 https://bugs.webkit.org/show_bug.cgi?id=134913
1600 <rdar://problem/17606033>
1602 Reviewed by Tim Horton.
1604 Changeset r169820 introduced a bug where we could examine the pixels of
1605 an image (looking for solid colors) before checking if the image actually
1608 I added a null check, and moved the code around a bit to avoid checking
1609 for existence three times.
1611 * WebProcess/Plugins/PluginView.cpp:
1612 (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
1613 before trying to look at it.
1615 2014-07-14 Anders Carlsson <andersca@apple.com>
1619 * UIProcess/Cocoa/SessionStateCoding.mm:
1620 (WebKit::encodeSessionState):
1622 2014-07-14 Anders Carlsson <andersca@apple.com>
1624 Use the legacy session coder for encoding/decoding session state
1625 https://bugs.webkit.org/show_bug.cgi?id=134910
1627 Reviewed by Beth Dakin.
1629 * UIProcess/Cocoa/SessionStateCoding.mm:
1630 (WebKit::encodeSessionState):
1631 (WebKit::decodeSessionState):
1633 2014-07-14 Oliver Hunt <oliver@apple.com>
1635 Restrict network process to remote connections
1636 https://bugs.webkit.org/show_bug.cgi?id=134908
1638 Reviewed by Geoffrey Garen.
1640 Further restrict network client
1642 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1644 2014-07-14 Tim Horton <timothy_horton@apple.com>
1646 ASSERT(isMainThread()) under OneShotDisplayLinkHandler
1647 https://bugs.webkit.org/show_bug.cgi?id=134900
1649 Reviewed by Simon Fraser.
1651 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1652 (-[OneShotDisplayLinkHandler displayLinkFired:]):
1653 isMainThread means the Web thread sometimes.
1655 2014-07-14 Tim Horton <timothy_horton@apple.com>
1659 * UIProcess/API/Cocoa/WKWebView.mm:
1660 (-[WKWebView _frameOrBoundsChanged]):
1661 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1662 * UIProcess/API/ios/WKViewIOS.mm:
1663 (-[WKView _frameOrBoundsChanged]):
1665 2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
1667 [UNIX] Log error description when failing to create shared memory file.
1668 https://bugs.webkit.org/show_bug.cgi?id=134892
1670 Reviewed by Darin Adler.
1672 * Platform/unix/SharedMemoryUnix.cpp:
1673 (WebKit::SharedMemory::create): Print the string describing the error number (errno).
1675 2014-07-14 Benjamin Poulain <benjamin@webkit.org>
1677 [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
1678 https://bugs.webkit.org/show_bug.cgi?id=134875
1680 Reviewed by Tim Horton.
1682 On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
1683 changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
1684 at the wrong orientation.
1686 This patch fixes the issue by making a special case for animated resize:
1687 -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
1688 the API's client changing the WKWebView. In that case, we do not update the drawing area.
1689 -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
1690 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
1691 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
1692 order, and the updateGeometry() is always done after the viewport configuration has been updated.
1694 * UIProcess/API/Cocoa/WKWebView.mm:
1695 (-[WKWebView _frameOrBoundsChanged]):
1696 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1697 * UIProcess/ios/WKContentView.h:
1698 * UIProcess/ios/WKContentView.mm:
1699 (-[WKContentView setMinimumSize:]): Deleted.
1701 2014-07-14 Benjamin Poulain <bpoulain@apple.com>
1703 [iOS][WK2] Fix withinEpsilon()
1704 https://bugs.webkit.org/show_bug.cgi?id=134798
1706 Reviewed by Darin Adler.
1708 Move the function back to WKWebView, it is no longer needed in WKContentView.
1710 Use the real types as input to properly verify that the two inputs are within
1711 a small value of the 32bit floating point.
1713 The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
1714 that would not make any difference on float.
1716 The source of those small changes comes from the fact UIProcess does a lot of processing
1717 on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
1718 for scale. When we are getting updates from the WebProcess, we should ignore any small differences
1719 caused by the computations done with less precision.
1721 * UIProcess/API/Cocoa/WKWebView.mm:
1723 * UIProcess/ios/WKContentViewInteraction.h:
1724 (withinEpsilon): Deleted.
1726 2014-07-14 Bear Travis <betravis@adobe.com>
1728 [Feature Queries] Enable Feature Queries on Mac
1729 https://bugs.webkit.org/show_bug.cgi?id=134404
1731 Reviewed by Antti Koivisto.
1733 Enable Feature Queries on Mac and resume running the
1736 * Configurations/FeatureDefines.xcconfig: Turn on
1737 ENABLE_CSS3_CONDITIONAL_RULES.
1739 2014-07-14 Anders Carlsson <andersca@apple.com>
1741 Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
1742 https://bugs.webkit.org/show_bug.cgi?id=134889
1744 Reviewed by Beth Dakin.
1746 * UIProcess/API/C/WKPage.cpp:
1747 * UIProcess/API/C/WKPageLoaderClient.h:
1749 2014-07-14 Dan Bernstein <mitz@apple.com>
1751 REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
1752 https://bugs.webkit.org/show_bug.cgi?id=134887
1754 Reviewed by Tim Horton.
1756 * UIProcess/mac/PageClientImpl.mm:
1757 (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
1758 the client is using WKView directly.
1759 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
1760 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
1761 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
1763 2014-07-14 Eric Carlson <eric.carlson@apple.com>
1765 [Mac] don't enable low power audio mode on external output devices
1766 https://bugs.webkit.org/show_bug.cgi?id=134877
1768 Reviewed by Sam Weinig.
1770 * PluginProcess/PluginProcess.h: Add an empty implementation of
1771 AudioHardwareListener::audioOutputDeviceChanged.
1773 2014-07-14 Tim Horton <timothy_horton@apple.com>
1775 [iOS] Throttle painting using a UI-process-side CADisplayLink
1776 https://bugs.webkit.org/show_bug.cgi?id=134879
1777 <rdar://problem/17641699>
1779 Reviewed by Simon Fraser.
1781 Just waiting for CA to commit is insufficient to actually throttle to 60fps,
1782 because nothing will block the main runloop from spinning.
1784 Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
1785 the first time it fires after we commit. This is not a guarantee that
1786 our content is on the screen, but we don't have any way to make that guarantee yet.
1788 This will throttle painting, rAF, etc. to the display refresh rate.
1790 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1791 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1792 (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
1793 (-[OneShotDisplayLinkHandler dealloc]):
1794 (-[OneShotDisplayLinkHandler displayLinkFired:]):
1795 (-[OneShotDisplayLinkHandler invalidate]):
1796 (-[OneShotDisplayLinkHandler schedule]):
1797 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
1798 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
1799 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1800 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1801 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
1803 2014-07-14 Dan Bernstein <mitz@apple.com>
1805 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
1806 https://bugs.webkit.org/show_bug.cgi?id=134878
1808 Reviewed by Sam Weinig.
1810 Route CFNetwork’s calls to Security API through to the UI process.
1812 * NetworkProcess/ios/NetworkProcessIOS.mm:
1813 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
1815 * Shared/mac/SecItemShim.cpp:
1816 (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
1817 CFNetwork with alternate functions to call.
1819 * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
1820 * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
1822 * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
1824 2014-07-14 Dan Bernstein <mitz@apple.com>
1826 <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
1827 https://bugs.webkit.org/show_bug.cgi?id=134666
1829 Reviewed by Tim Horton.
1831 A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
1832 by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
1833 unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
1834 only decoding fails, in this case silently, simply not delivering the
1835 SecItemShim::secItemResponse message.
1837 The fix is to teach ArgumentCodersCF about SecAccessControlRef.
1839 * Shared/cf/ArgumentCodersCF.cpp:
1840 (IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
1841 (IPC::encode): Encode the SecAccessControl serialized into CFData.
1842 (IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
1843 * Shared/cf/ArgumentCodersCF.h:
1844 * config.h: Defined HAVE_SEC_ACCESS_CONTROL.
1846 2014-07-13 Dan Bernstein <mitz@apple.com>
1848 <rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
1849 https://bugs.webkit.org/show_bug.cgi?id=134872
1851 Reviewed by Sam Weinig.
1853 * Shared/InteractionInformationAtPosition.cpp:
1854 (WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
1855 (WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
1856 * Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
1858 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
1860 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
1861 (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
1862 parameter, which is stored in a new ivar.
1863 (-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
1864 into a cached Cocoa image and returns it.
1865 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
1866 initializer, removed _boundingRect property declaration from here.
1868 * UIProcess/ios/WKActionSheetAssistant.mm:
1869 (-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
1870 into the _WKActivatedElementInfo initializer.
1871 (-[WKActionSheetAssistant showLinkSheet]): Ditto.
1873 * WebProcess/WebPage/WebPage.cpp:
1874 (WebKit::WebPage::snapshotNode): Added.
1875 * WebProcess/WebPage/WebPage.h:
1877 * WebProcess/WebPage/ios/WebPageIOS.mm:
1878 (WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
1879 snapshot of it in the image member of the InteractionInformationAtPosition.
1881 2014-07-13 Dan Bernstein <mitz@apple.com>
1883 [Cocoa] Clean up session state API a little
1884 https://bugs.webkit.org/show_bug.cgi?id=134871
1886 Reviewed by Darin Adler.
1888 * UIProcess/API/Cocoa/WKWebView.mm:
1889 (-[WKWebView _sessionState]):
1890 (-[WKWebView _restoreFromSessionState:]): Deleted.
1891 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1893 2014-07-13 Javier Fernandez <jfernandez@igalia.com>
1895 REGRESSION(r171045) [GTK] Build broken.
1896 https://bugs.webkit.org/show_bug.cgi?id=134867
1898 Unreviewed GTK build fix after r171045.
1900 * UIProcess/API/gtk/PageClientImpl.cpp:
1901 (WebKit::PageClientImpl::willRecordNavigationSnapshot):
1902 * UIProcess/API/gtk/PageClientImpl.h:
1904 2014-07-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1906 Unreviewed, EFL build fix since r171045.
1908 * UIProcess/CoordinatedGraphics/WebView.h:
1910 2014-07-12 Dan Bernstein <mitz@apple.com>
1912 [Cocoa] Notify the client when a navigation snapshot is taken
1913 https://bugs.webkit.org/show_bug.cgi?id=134865
1915 Reviewed by Sam Weinig.
1917 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
1919 * UIProcess/Cocoa/NavigationState.h:
1920 * UIProcess/Cocoa/NavigationState.mm:
1921 (WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
1922 m_navigationDelegateMethods.
1923 (WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
1924 WKNavigationDelegate method.
1926 * UIProcess/PageClient.h: Declared new client function.
1928 * UIProcess/WebPageProxy.cpp:
1929 (WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
1930 * UIProcess/WebPageProxy.h:
1932 * UIProcess/ios/PageClientImplIOS.h:
1933 * UIProcess/ios/PageClientImplIOS.mm:
1934 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
1935 NavigationState::willRecordNavigationSnapshot.
1937 * UIProcess/mac/PageClientImpl.h:
1938 * UIProcess/mac/PageClientImpl.mm:
1939 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
1941 * UIProcess/mac/ViewSnapshotStore.mm:
1942 (WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
1943 WebPageProxy::willRecordNavigationSnapshot.
1945 2014-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1947 Unreviewed, fix EFL build break since r171034.
1949 * UIProcess/CoordinatedGraphics/WebView.h:
1950 * UIProcess/efl/WebContextEfl.cpp:
1951 (WebKit::WebContext::platformMediaCacheDirectory):
1953 2014-07-12 Darin Adler <darin@apple.com>
1955 Try to fix 32-bit Mac build.
1957 * UIProcess/mac/PageClientImpl.mm:
1958 (WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
1959 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
1960 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
1962 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
1964 REGRESSION(r171034) [GTK] Build broken.
1965 https://bugs.webkit.org/show_bug.cgi?id=134861
1967 Unreviewed GTK build fix.
1969 * UIProcess/API/gtk/PageClientImpl.cpp:
1970 (WebKit::PageClientImpl::navigationGestureDidBegin):
1971 (WebKit::PageClientImpl::navigationGestureWillEnd):
1972 (WebKit::PageClientImpl::navigationGestureDidEnd):
1973 * UIProcess/API/gtk/PageClientImpl.h:
1975 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
1977 REGRESSION(r171024) [GTK] Build broken.
1978 https://bugs.webkit.org/show_bug.cgi?id=134859
1980 Unreviewed GTK build fix.
1982 * UIProcess/gtk/WebContextGtk.cpp:
1983 (WebKit::WebContext::platformMediaCacheDirectory):
1985 2014-07-12 Dan Bernstein <mitz@apple.com>
1987 <rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
1988 https://bugs.webkit.org/show_bug.cgi?id=134853
1990 Reviewed by Sam Weinig.
1992 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
1995 * UIProcess/API/Cocoa/WKWebView.mm:
1996 (-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
1998 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
1999 _isShowingNavigationGestureSnapshot.
2001 * UIProcess/Cocoa/NavigationState.h:
2002 * UIProcess/Cocoa/NavigationState.mm:
2003 (WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
2004 m_navigationDelegateMethods.
2005 (WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
2006 WKNavigationDelegate method.
2007 (WebKit::NavigationState::navigationGestureWillEnd): Ditto.
2008 (WebKit::NavigationState::navigationGestureDidEnd): Ditto.
2010 * UIProcess/PageClient.h: Declared new client functions.
2012 * UIProcess/WebPageProxy.cpp:
2013 (WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
2014 (WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
2015 and call the new client function.
2016 (WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
2017 (WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
2018 (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
2019 m_isShowingNavigationGestureSnapshot.
2020 * UIProcess/WebPageProxy.h:
2021 (WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
2023 * UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
2024 * UIProcess/ios/PageClientImplIOS.mm:
2025 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2026 NavigationState function.
2027 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2028 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2030 * UIProcess/ios/ViewGestureControllerIOS.mm:
2031 (WebKit::ViewGestureController::beginSwipeGesture): Added calls to
2032 WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
2033 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2034 WebPageProxy::navigationGestureDidEnd.
2035 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2036 WebPageProxy::navigationGestureSnapshotWasRemoved.
2038 * UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
2039 * UIProcess/mac/PageClientImpl.mm:
2040 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2041 NavigationState function.
2042 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2043 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2045 * UIProcess/mac/ViewGestureControllerMac.mm:
2046 (WebKit::ViewGestureController::beginSwipeGesture): Added call to
2047 WebPageProxy::navigationGestureDidBegin.
2048 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2049 WebPageProxy::navigationGestureDidEnd.
2050 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2051 WebPageProxy::navigationGestureSnapshotWasRemoved.
2053 2014-07-12 Oliver Hunt <oliver@apple.com>
2055 Fix typo in prior patch
2056 https://bugs.webkit.org/show_bug.cgi?id=134858
2058 Reviewed by Sam Weinig.
2062 * UIProcess/mac/WebContextMac.mm:
2063 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2065 2014-07-12 Dan Bernstein <mitz@apple.com>
2067 [Cocoa] Client is not notified of same-document navigations
2068 https://bugs.webkit.org/show_bug.cgi?id=134855
2070 Reviewed by Sam Weinig.
2072 * UIProcess/API/APILoaderClient.h:
2073 (API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
2075 * UIProcess/API/C/WKPage.cpp:
2076 (WKPageSetPageLoaderClient): Ditto.
2078 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
2080 * UIProcess/Cocoa/NavigationState.h: Declare override of
2081 API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
2082 m_navigationDelegateMethods struct.
2083 * UIProcess/Cocoa/NavigationState.mm:
2084 (WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
2086 (WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
2088 (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
2089 the delegate method, if implemented.
2091 * UIProcess/WebPageProxy.cpp:
2092 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
2093 which is forwarded to the client.
2094 * UIProcess/WebPageProxy.h: Added navigationID parameter.
2095 * UIProcess/WebPageProxy.messages.in: Ditto.
2097 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2098 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
2099 (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
2100 (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
2101 (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
2103 2014-07-12 Oliver Hunt <oliver@apple.com>
2105 Extend WebContent sandbox to allow some extra access for frameworks
2106 https://bugs.webkit.org/show_bug.cgi?id=134844
2108 Reviewed by Sam Weinig.
2110 Open up the webcontent sandbox a bit so that some external frameworks
2113 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2114 * Shared/WebProcessCreationParameters.cpp:
2115 (WebKit::WebProcessCreationParameters::encode):
2116 (WebKit::WebProcessCreationParameters::decode):
2117 * Shared/WebProcessCreationParameters.h:
2118 * UIProcess/WebContext.cpp:
2119 (WebKit::WebContext::createNewWebProcess):
2120 (WebKit::WebContext::mediaCacheDirectory):
2121 * UIProcess/WebContext.h:
2122 * UIProcess/mac/WebContextMac.mm:
2123 (WebKit::WebContext::platformMediaCacheDirectory):
2124 * WebProcess/cocoa/WebProcessCocoa.mm:
2125 (WebKit::WebProcess::platformInitializeWebProcess):
2127 2014-07-12 Oliver Hunt <oliver@apple.com>
2129 Temporary work around for <rdar://<rdar://problem/17513375>
2130 https://bugs.webkit.org/show_bug.cgi?id=134848
2132 Reviewed by Sam Weinig.
2134 Temporarily work around <rdar://<rdar://problem/17513375> by
2135 dropping the explicit cookie storage if it points out of the
2138 * UIProcess/mac/WebContextMac.mm:
2139 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2141 2014-07-11 Enrica Casucci <enrica@apple.com>
2143 Implement textStylingAtPosition in WK2.
2144 https://bugs.webkit.org/show_bug.cgi?id=134843
2145 <rdar://problem/17614981>
2147 Reviewed by Benjamin Poulain.
2149 Adding information about typing attributes to EditorState so
2150 that we can implement textStylingAtPosition.
2152 * Shared/EditorState.cpp:
2153 (WebKit::EditorState::encode):
2154 (WebKit::EditorState::decode):
2155 * Shared/EditorState.h:
2156 (WebKit::EditorState::EditorState):
2157 * UIProcess/ios/WKContentViewInteraction.mm:
2158 (-[WKContentView textStylingAtPosition:inDirection:]):
2159 (-[WKContentView canPerformAction:withSender:]):
2160 (-[WKContentView toggleBoldface:]):
2161 (-[WKContentView toggleItalics:]):
2162 (-[WKContentView toggleUnderline:]):
2163 * WebProcess/WebPage/WebPage.cpp:
2164 (WebKit::WebPage::editorState):
2166 2014-07-11 Oliver Hunt <oliver@apple.com>
2168 Tighten WebContent sandbox
2169 https://bugs.webkit.org/show_bug.cgi?id=134834
2171 Reviewed by Sam Weinig.
2173 Define a much tighter sandbox profile for the WebContent process
2175 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2177 2014-07-11 Antti Koivisto <antti@apple.com>
2179 REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
2180 https://bugs.webkit.org/show_bug.cgi?id=134833
2181 <rdar://problem/17580021>
2183 Reviewed by Zalan Bujtas.
2185 Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
2187 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2188 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2190 2014-07-11 Zalan Bujtas <zalan@apple.com>
2192 Subpixel layout: return integral results for offset*, client*, scroll* by default.
2193 https://bugs.webkit.org/show_bug.cgi?id=134651
2195 Reviewed by Simon Fraser.
2197 Revert to returning integral values for Element.offset* client* scroll* by default.
2198 Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
2200 Since snapped dimension depends on both the original point and the width/height of the box,
2201 we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
2203 Covered by existing tests
2205 * Shared/WebPreferencesDefinitions.h:
2206 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2208 2014-07-10 Jinwoo Song <jinwoo7.song@samsung.com>
2210 Unreviewed EFL build fix after r170970.
2212 * UIProcess/efl/WebContextEfl.cpp:
2213 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
2215 2014-07-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
2217 REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
2218 https://bugs.webkit.org/show_bug.cgi?id=134825
2220 Unreviewed GTK build fix.
2222 * Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
2223 * Shared/WebBackForwardListItem.h: Idem.
2224 * UIProcess/gtk/WebContextGtk.cpp:
2225 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
2227 2014-07-10 Benjamin Poulain <bpoulain@apple.com>
2229 [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
2230 https://bugs.webkit.org/show_bug.cgi?id=134820
2232 Reviewed by Andreas Kling.
2234 If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
2237 The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
2238 to remove the observer if we are not already observing on that view.
2240 To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
2241 are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
2242 the view is already nil.
2244 * UIProcess/ios/WKContentViewInteraction.mm:
2245 (-[WKContentView setupInteraction]):
2246 (-[WKContentView cleanupInteraction]):
2248 2014-07-10 Simon Fraser <simon.fraser@apple.com>
2250 [iOS WK2] Move WKInspectorHighlightView to its own file
2251 https://bugs.webkit.org/show_bug.cgi?id=134819
2253 Reviewed by Joseph Pecoraro.
2255 WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
2256 so move it into its own file.
2258 * UIProcess/WKInspectorHighlightView.h: Added.
2259 * UIProcess/WKInspectorHighlightView.mm: Added.
2260 (-[WKInspectorHighlightView dealloc]):
2261 (-[WKInspectorHighlightView _removeAllLayers]):
2262 (-[WKInspectorHighlightView _createLayers:]):
2263 (findIntersectionOnLineBetweenPoints):
2265 (layerPathWithHole):
2267 (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
2268 (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
2269 (-[WKInspectorHighlightView update:]):
2270 * UIProcess/ios/WKContentView.mm:
2271 (-[WKInspectorHighlightView initWithFrame:]): Deleted.
2272 (-[WKInspectorHighlightView dealloc]): Deleted.
2273 (-[WKInspectorHighlightView _removeAllLayers]): Deleted.
2274 (-[WKInspectorHighlightView _createLayers:]): Deleted.
2275 (findIntersectionOnLineBetweenPoints): Deleted.
2276 (quadIntersection): Deleted.
2277 (layerPathWithHole): Deleted.
2278 (layerPath): Deleted.
2279 (-[WKInspectorHighlightView _layoutForNodeHighlight:]): Deleted.
2280 (-[WKInspectorHighlightView _layoutForRectsHighlight:]): Deleted.
2281 (-[WKInspectorHighlightView update:]): Deleted.
2282 * WebKit2.xcodeproj/project.pbxproj:
2284 2014-07-10 Tim Horton <timothy_horton@apple.com>
2286 REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
2287 https://bugs.webkit.org/show_bug.cgi?id=134818
2288 <rdar://problem/17632468>
2290 Reviewed by Anders Carlsson.
2292 * UIProcess/API/Cocoa/WKWebView.mm:
2293 (scrollViewBackgroundColor):
2294 r170935 made it so that we would initialize the scroll view background color to an
2295 invalid color until the first layer tree commit. We should go with white instead.
2297 2014-07-10 Enrica Casucci <enrica@apple.com>
2299 Add a mechanism to notify the UIProcess when an editing command is done executing.
2300 https://bugs.webkit.org/show_bug.cgi?id=134807
2302 Reviewed by Tim Horton.
2304 Some editing commands have an effect on some parts of the system that
2305 run inside the UIProcess. A good example are the cursor movement commands
2306 that require an update of the autocorrection/autosuggestion machinery.
2307 This patch adds a way to reliably know when the command has been executed
2308 in the WebProcess. A previous attempt at solving this problem was added in
2309 r170858 and was partially reverted in r170948.
2310 The change also removes the selectionWillChange notification added in r170858.
2312 * UIProcess/PageClient.h:
2313 * UIProcess/WebPageProxy.cpp:
2314 (WebKit::WebPageProxy::editorStateChanged):
2315 * UIProcess/WebPageProxy.h:
2316 * UIProcess/ios/PageClientImplIOS.h:
2317 * UIProcess/ios/PageClientImplIOS.mm:
2318 (WebKit::PageClientImpl::selectionWillChange): Deleted.
2319 * UIProcess/ios/WKContentViewInteraction.h:
2320 * UIProcess/ios/WKContentViewInteraction.mm:
2321 (-[WKContentView executeEditCommandWithCallback:]):
2322 (-[WKContentView _moveUp:withHistory:]):
2323 (-[WKContentView _moveDown:withHistory:]):
2324 (-[WKContentView _moveLeft:withHistory:]):
2325 (-[WKContentView _moveRight:withHistory:]):
2326 (-[WKContentView _moveToStartOfWord:withHistory:]):
2327 (-[WKContentView _moveToStartOfParagraph:withHistory:]):
2328 (-[WKContentView _moveToStartOfLine:withHistory:]):
2329 (-[WKContentView _moveToStartOfDocument:withHistory:]):
2330 (-[WKContentView _moveToEndOfWord:withHistory:]):
2331 (-[WKContentView _moveToEndOfParagraph:withHistory:]):
2332 (-[WKContentView _moveToEndOfLine:withHistory:]):
2333 (-[WKContentView _moveToEndOfDocument:withHistory:]):
2334 (-[WKContentView _selectionWillChange]): Deleted.
2335 * UIProcess/ios/WebPageProxyIOS.mm:
2336 (WebKit::WebPageProxy::executeEditCommand):
2337 (WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
2338 * WebProcess/WebPage/WebPage.h:
2339 * WebProcess/WebPage/WebPage.messages.in:
2340 * WebProcess/WebPage/ios/WebPageIOS.mm:
2341 (WebKit::WebPage::executeEditCommandWithCallback):
2343 2014-07-10 Joseph Pecoraro <pecoraro@apple.com>
2345 [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
2346 https://bugs.webkit.org/show_bug.cgi?id=134813
2348 Reviewed by Timothy Hatcher.
2350 * UIProcess/mac/WebInspectorProxyMac.mm:
2351 (WebKit::WebInspectorProxy::createInspectorWindow):
2352 Use a selector that will avoid the warning message.
2354 2014-07-10 Oliver Hunt <oliver@apple.com>
2356 Remove use of container relative restrictions in the network process sandbox
2357 https://bugs.webkit.org/show_bug.cgi?id=134816
2359 Reviewed by Anders Carlsson.
2361 As i'm tidying up the various sandboxes and that's meaning we
2362 need to reduce some file restrictions in the network process.
2364 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2366 2014-07-10 Pratik Solanki <psolanki@apple.com>
2368 Unreviewed iOS build fix after r170974. Define id if building a non ObjC file.
2370 * UIProcess/mac/ViewSnapshotStore.h:
2372 2014-07-10 Tim Horton <timothy_horton@apple.com>
2374 Store ViewSnapshots directly on the WebBackForwardListItem
2375 https://bugs.webkit.org/show_bug.cgi?id=134667
2376 <rdar://problem/17082639>
2378 Reviewed by Dan Bernstein.
2380 Make ViewSnapshot a refcounted class. Store it directly on the back-forward item
2381 instead of in a side map referenced by UUID. Switch to a very simple LRU eviction model for now.
2382 This fixes a ton of snapshot management bugs; for example, we would start throwing out snapshots
2383 in the page that was actively being interacted with *first* when evicting snapshots, instead of
2384 preferring older snapshots. Additionally, we would not throw away snapshots when back forward items
2387 There is definitely room for improvement of the eviction mechanism, but this is closer to a time-tested implementation.
2389 * Shared/SessionState.h:
2390 Keep a ViewSnapshot instead of a UUID on the BackForwardListItemState.
2392 * Shared/WebBackForwardListItem.h:
2393 Fix some indented namespace contents.
2395 (WebKit::WebBackForwardListItem::snapshot):
2396 (WebKit::WebBackForwardListItem::setSnapshot):
2397 (WebKit::WebBackForwardListItem::setSnapshotUUID): Deleted.
2398 (WebKit::WebBackForwardListItem::snapshotUUID): Deleted.
2399 Switch the snapshot getter/setter to operate on ViewSnapshots instead of UUIDs.
2401 * UIProcess/API/Cocoa/WKWebView.mm:
2402 (-[WKWebView _takeViewSnapshot]):
2403 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2404 * UIProcess/API/mac/WKView.mm:
2405 (-[WKView _takeViewSnapshot]):
2406 * UIProcess/API/mac/WKViewInternal.h:
2407 * UIProcess/PageClient.h:
2408 * UIProcess/WebPageProxy.cpp:
2409 (WebKit::WebPageProxy::takeViewSnapshot):
2410 * UIProcess/WebPageProxy.h:
2411 * UIProcess/ios/PageClientImplIOS.h:
2412 * UIProcess/ios/PageClientImplIOS.mm:
2413 (WebKit::PageClientImpl::takeViewSnapshot):
2414 * UIProcess/mac/PageClientImpl.h:
2415 * UIProcess/mac/PageClientImpl.mm:
2416 (WebKit::PageClientImpl::takeViewSnapshot):
2417 Adopt ViewSnapshot::create, return a PassRefPtr, and class-ify ViewSnapshot.
2419 * UIProcess/ios/ViewGestureControllerIOS.mm:
2420 (WebKit::ViewGestureController::beginSwipeGesture):
2421 (WebKit::ViewGestureController::endSwipeGesture):
2422 * UIProcess/mac/ViewGestureController.h:
2423 * UIProcess/mac/ViewGestureControllerMac.mm:
2424 (WebKit::ViewGestureController::shouldUseSnapshotForSize):
2425 (WebKit::ViewGestureController::beginSwipeGesture):
2426 (WebKit::ViewGestureController::endSwipeGesture):
2427 Grab the ViewSnapshot directly from the WebBackForwardListItem, and adopt the new functions.
2429 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2430 (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2431 Rename discardSnapshots to discardSnapshotImages, because we're really only discarding
2432 the images; the render tree size/background color "snapshot" remains and is useful.
2434 * UIProcess/mac/ViewSnapshotStore.h:
2435 (WebKit::ViewSnapshot::setRenderTreeSize):
2436 (WebKit::ViewSnapshot::renderTreeSize):
2437 (WebKit::ViewSnapshot::setBackgroundColor):
2438 (WebKit::ViewSnapshot::backgroundColor):
2439 (WebKit::ViewSnapshot::setDeviceScaleFactor):
2440 (WebKit::ViewSnapshot::deviceScaleFactor):
2441 (WebKit::ViewSnapshot::imageSizeInBytes):
2442 (WebKit::ViewSnapshot::surface):
2443 (WebKit::ViewSnapshot::size):
2444 (WebKit::ViewSnapshot::creationTime):
2445 Make ViewSnapshot a refcounted class.
2446 Add create functions which take an image (or slot ID), and relevant sizes.
2447 It is expected that a ViewSnapshot is created with an image, and it is only possible
2448 to remove that image, never to replace it. A new ViewSnapshot is required in that case.
2449 Add setters for things that ViewSnapshotStore sets on the snapshot after the PageClient
2450 retrieves it from the view. Add getters for things that the ViewGestureControllers need.
2452 Remove removeSnapshotImage, getSnapshot, and the snapshot map.
2454 * UIProcess/mac/ViewSnapshotStore.mm:
2455 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2456 (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
2457 (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
2458 Manage m_snapshotCacheSize and m_snapshotsWithImages via didAddImageToSnapshot and willRemoveImageFromSnapshot.
2459 willRemoveImageFromSnapshot will -always- be called before the ViewSnapshot is destroyed.
2461 (WebKit::ViewSnapshotStore::pruneSnapshots):
2462 Switch to a simple LRU eviction model. As previously mentioned, it's possible to do better, but
2463 this is much less broken than the previous implementation.
2465 (WebKit::ViewSnapshotStore::recordSnapshot):
2466 (WebKit::ViewSnapshotStore::discardSnapshotImages):
2467 (WebKit::ViewSnapshot::create):
2468 (WebKit::ViewSnapshot::ViewSnapshot):
2469 (WebKit::ViewSnapshot::~ViewSnapshot):
2470 (WebKit::ViewSnapshot::hasImage):
2471 (WebKit::ViewSnapshot::clearImage):
2472 (WebKit::ViewSnapshot::asLayerContents):
2473 If a surface is Empty when it comes back from being volatile, throw away the surface
2474 and notify the Store to remove it from m_snapshotCacheSize (via clearImage()).
2476 (WebKit::ViewSnapshotStore::removeSnapshotImage): Deleted.
2477 (WebKit::ViewSnapshotStore::getSnapshot): Deleted.
2478 (WebKit::ViewSnapshotStore::discardSnapshots): Deleted.
2480 2014-07-10 Beth Dakin <bdakin@apple.com>
2482 Need Setting/WKPreference that allows clients to prevent scrollbars from drawing
2483 on a secondary thread
2484 https://bugs.webkit.org/show_bug.cgi?id=134778
2486 <rdar://problem/17595333>
2488 Reviewed by Tim Horton.
2490 This is a requirement for some types of performance tests.
2493 * Shared/WebPreferencesDefinitions.h:
2495 PDFPlugin has to implement this new ScrollableArea virtual function to indicate
2496 the Setting’s value.
2497 * WebProcess/Plugins/PDF/PDFPlugin.h:
2498 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2499 (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
2502 * WebProcess/WebPage/WebPage.cpp:
2503 (WebKit::WebPage::updatePreferences):
2505 2014-07-10 Tim Horton <timothy_horton@apple.com>
2507 [iOS] Frequent assertion failures when swiping back
2509 Reviewed by Dan Bernstein.
2511 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2512 (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2513 Don't create an unused VoidCallback. It will assert when destroyed without being called.
2515 2014-07-10 Oliver Hunt <oliver@apple.com>
2517 Pass sandbox extension for GL cache over to webprocess
2518 https://bugs.webkit.org/show_bug.cgi?id=134806
2520 Reviewed by Anders Carlsson.
2522 Add additional WebProcess parameters to pass an extension
2523 that allows access to the opengl cache directory in the
2524 host application's container.
2526 * Shared/WebProcessCreationParameters.cpp:
2527 (WebKit::WebProcessCreationParameters::encode):
2528 (WebKit::WebProcessCreationParameters::decode):
2529 * Shared/WebProcessCreationParameters.h:
2530 * UIProcess/WebContext.cpp:
2531 (WebKit::WebContext::createNewWebProcess):
2532 (WebKit::WebContext::openGLCacheDirectory):
2533 * UIProcess/WebContext.h:
2534 * UIProcess/mac/WebContextMac.mm:
2535 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
2536 * WebProcess/cocoa/WebProcessCocoa.mm:
2537 (WebKit::WebProcess::platformInitializeWebProcess):
2539 2014-07-10 Dan Bernstein <mitz@apple.com>
2543 * WebProcess/WebPage/ServicesOverlayController.h:
2545 2014-07-09 Brady Eidson <beidson@apple.com>
2547 Phone number highlights should always be visible if the mouse hovers over.
2548 <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
2550 Reviewed by Tim Horton.
2552 This is a fairly extensive rewrite of ServicesOverlayController.
2553 It allows one selection highlight for the entire selection, and as many telephone number highlights as there are numbers.
2554 If a telephone number highlight is hovered over, it wins and is painted.
2555 If no telephone number highlight is hovered but the selection highlight is, then it is painted.
2557 The purposes of each method are self evident by their name, and the concepts are mostly the same as they used to be.
2559 The exception is establishHoveredTelephoneHighlight which gets a more detailed explanation below.
2561 * Platform/Logging.h: Add a Services logging channel.
2563 * WebProcess/WebPage/ServicesOverlayController.h:
2564 (WebKit::TelephoneNumberData::TelephoneNumberData):
2566 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2567 (WebKit::ServicesOverlayController::ServicesOverlayController):
2568 (WebKit::ServicesOverlayController::selectionRectsDidChange):
2569 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2570 (WebKit::ServicesOverlayController::clearHighlightState):
2571 (WebKit::ServicesOverlayController::drawRect):
2572 (WebKit::ServicesOverlayController::drawSelectionHighlight):
2573 (WebKit::ServicesOverlayController::maybeDrawTelephoneNumberHighlight):
2574 (WebKit::ServicesOverlayController::drawHighlight):
2575 (WebKit::ServicesOverlayController::clearSelectionHighlight):
2576 (WebKit::ServicesOverlayController::clearHoveredTelephoneNumberHighlight):
2577 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight): Starts walking the telephone number ranges and
2578 creating a highlight for each one that doesn’t already have a highlight. If that highlight is also being hovered by
2579 the mouse, then it is set as the hovered telephone number highlight and the method stops creating new highlights.
2580 (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
2581 (WebKit::ServicesOverlayController::mouseEvent):
2582 (WebKit::ServicesOverlayController::handleClick):
2583 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Deleted.
2584 (WebKit::ServicesOverlayController::drawCurrentHighlight): Deleted.
2586 2014-07-10 Timothy Horton <timothy_horton@apple.com>
2588 Assertions or crashes under _takeViewSnapshot when restoring windows
2589 https://bugs.webkit.org/show_bug.cgi?id=134792
2591 Reviewed by Simon Fraser.
2593 * UIProcess/API/mac/WKView.mm:
2594 (-[WKView _takeViewSnapshot]):
2595 Taking a window-server snapshot of a non-visible window tends to not succeed.
2597 2014-07-09 Pratik Solanki <psolanki@apple.com>
2599 Buffer CSS and JS resources in network process before sending over to web process
2600 https://bugs.webkit.org/show_bug.cgi?id=134560
2601 <rdar://problem/16737186>
2603 Reviewed by Antti Koivisto.
2605 For CSS and JS resources, ask the network process to buffer the entire resource instead of
2606 sending it to web process in chunks since the web process can't do anything with a partial
2609 * NetworkProcess/NetworkResourceLoader.cpp:
2610 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2611 * Shared/Network/NetworkResourceLoadParameters.cpp:
2612 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2613 (WebKit::NetworkResourceLoadParameters::encode):
2614 (WebKit::NetworkResourceLoadParameters::decode):
2615 * Shared/Network/NetworkResourceLoadParameters.h:
2616 * WebProcess/Network/WebResourceLoadScheduler.cpp:
2617 (WebKit::WebResourceLoadScheduler::scheduleLoad):
2619 2014-07-09 Benjamin Poulain <bpoulain@apple.com>
2621 [iOS][WK2] Disable text quantization while actively changing the page's scale factor
2622 https://bugs.webkit.org/show_bug.cgi?id=134781
2624 Reviewed by Tim Horton and Myles C. Maxfield.
2626 While zooming a page, text quantization causes glyphs to "move" in order to get to the closest
2627 boundary for the current scale factor.
2629 We do not want this to happen while dynamically changing the scale factor because the effect
2630 is visible. To avoid this, we disable text quantization if the page's scale factor changes
2631 in response to a non-stable contentRect update.
2633 * WebProcess/WebCoreSupport/WebChromeClient.h:
2634 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2635 (WebKit::WebChromeClient::hasStablePageScaleFactor):
2636 * WebProcess/WebPage/WebPage.cpp:
2637 (WebKit::WebPage::WebPage):
2638 * WebProcess/WebPage/WebPage.h:
2639 (WebKit::WebPage::hasStablePageScaleFactor):
2640 * WebProcess/WebPage/ios/WebPageIOS.mm:
2641 (WebKit::WebPage::updateVisibleContentRects):
2643 2014-07-09 Joseph Pecoraro <pecoraro@apple.com>
2645 [iOS] Use UIAlertController API in WKFileUploadPanel instead of SPI
2646 https://bugs.webkit.org/show_bug.cgi?id=134777
2648 Reviewed by Sam Weinig.
2650 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2651 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
2653 2014-07-09 Shivakumar JM <shiva.jm@samsung.com>
2655 [EFL][WK2] Add new Public API in ewk_download_job.h to get size of the data already downloaded.
2656 https://bugs.webkit.org/show_bug.cgi?id=134759
2658 Reviewed by Gyuyoung Kim.
2660 Add new API in ewk_download_job.h to get size of the data already downloaded.
2662 * UIProcess/API/efl/ewk_download_job.cpp:
2663 (ewk_download_job_received_data_length_get):
2664 (EwkDownloadJob::receivedData):
2665 * UIProcess/API/efl/ewk_download_job.h:
2666 * UIProcess/API/efl/ewk_download_job_private.h:
2667 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
2668 (EWK2DownloadJobTest::on_download_requested):
2669 (EWK2DownloadJobTest::on_download_finished):
2671 2014-07-09 Enrica Casucci <enrica@apple.com>
2673 REGRESSION(r170858): Safari freezes upon making a search on a website (yelp.com).
2674 https://bugs.webkit.org/show_bug.cgi?id=134791
2675 <rdar://problem/17616971>
2677 Reviewed by Benjamin Poulain.
2679 After r170858 we notify the keyboard too often about
2680 the changed selection. This patch removes the notification
2681 until we find a better way to do it that doesn't cause
2684 * UIProcess/ios/WKContentViewInteraction.mm:
2685 (-[WKContentView _selectionWillChange]):
2686 (-[WKContentView _selectionChanged]):
2688 2014-07-09 Anders Carlsson <andersca@apple.com>
2690 Safari showing blank pages
2691 https://bugs.webkit.org/show_bug.cgi?id=134790
2692 <rdar://problem/17617166>
2694 Reviewed by Simon Fraser.
2696 * UIProcess/API/Cocoa/WKWebView.mm:
2697 (-[WKWebView initWithFrame:configuration:]):
2698 Make sure to add the content view to the scroll view.
2700 2014-07-09 Anders Carlsson <andersca@apple.com>
2702 Closed web views should never create new web processes
2703 https://bugs.webkit.org/show_bug.cgi?id=134787
2704 <rdar://problem/16892526>
2706 Reviewed by Simon Fraser.
2708 * UIProcess/API/Cocoa/WKWebView.mm:
2709 (-[WKWebView loadHTMLString:baseURL:]):
2710 (-[WKWebView reload]):
2711 (-[WKWebView reloadFromOrigin]):
2712 Return nil if the returned navigation ID is 0.
2714 * UIProcess/WebPageProxy.cpp:
2715 (WebKit::WebPageProxy::reattachToWebProcess):
2716 Assert that the page is not closed.
2718 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2719 (WebKit::WebPageProxy::loadRequest):
2720 (WebKit::WebPageProxy::loadFile):
2721 (WebKit::WebPageProxy::loadData):
2722 (WebKit::WebPageProxy::loadHTMLString):
2723 (WebKit::WebPageProxy::loadAlternateHTMLString):
2724 (WebKit::WebPageProxy::loadPlainTextString):
2725 (WebKit::WebPageProxy::loadWebArchiveData):
2726 Add early returns if the page is closed.
2728 * UIProcess/WebPageProxy.h:
2730 2014-07-09 Anders Carlsson <andersca@apple.com>
2732 Support transparent WKWebViews
2733 https://bugs.webkit.org/show_bug.cgi?id=134779
2734 <rdar://problem/17351058>
2736 Reviewed by Tim Horton.
2738 * UIProcess/API/Cocoa/WKWebView.mm:
2739 (-[WKWebView initWithFrame:configuration:]):
2740 Call _updateScrollViewBackground instead of setting the background color.
2745 (scrollViewBackgroundColor):
2746 Helper function that returns the scroll view background color.
2747 If the web view isn't opaque, we want the scroll view to be transparent.
2749 (-[WKWebView _updateScrollViewBackground]):
2750 Call scrollViewBackgroundColor.
2752 (-[WKWebView setOpaque:]):
2753 Call WebPageProxy::setDrawsBackground and update the scroll view background.
2755 (-[WKWebView setBackgroundColor:]):
2756 Call setBackgroundColor on the content view.
2758 2014-07-09 Andy Estes <aestes@apple.com>
2760 [iOS] WebKit can crash under QuickLookDocumentData::encode() when viewing a QuickLook preview
2761 https://bugs.webkit.org/show_bug.cgi?id=134780
2763 Reviewed by Tim Horton.
2765 Don't use CFDataCreateWithBytesNoCopy() when we can't guarantee the lifetime of the copied-from DataReference
2766 will match or exceed that of the CFDataRef. Copy the data instead.
2768 * WebProcess/Network/WebResourceLoader.cpp:
2769 (WebKit::WebResourceLoader::didReceiveData):
2771 2014-07-09 Pratik Solanki <psolanki@apple.com>
2773 Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
2774 https://bugs.webkit.org/show_bug.cgi?id=134732
2776 Reviewed by Darin Adler.
2778 Buffer the resource in NetworkResourceLoader instead of SynchronousNetworkLoaderClient. This
2779 is in preparation for bug 134560 where we will be supporting JS and CSS resource buffering
2780 that uses AsynchronousNetworkLoaderClient.
2782 * NetworkProcess/NetworkResourceLoader.cpp:
2783 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2784 (WebKit::NetworkResourceLoader::didReceiveBuffer):
2785 (WebKit::NetworkResourceLoader::didFinishLoading):
2786 * NetworkProcess/NetworkResourceLoader.h:
2787 (WebKit::NetworkResourceLoader::bufferedData):
2788 * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
2789 (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
2790 (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
2791 (WebKit::SynchronousNetworkLoaderClient::didFail):
2792 (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
2793 * NetworkProcess/SynchronousNetworkLoaderClient.h:
2795 2014-07-09 Benjamin Poulain <bpoulain@apple.com>
2797 [iOS][WK2] subviews of the unscaled view drift out during CA animations
2798 https://bugs.webkit.org/show_bug.cgi?id=134751
2800 Reviewed by Enrica Casucci.
2802 It is not possible to animate the WKContentView and the inverse view in such a way
2803 that the combined matrix remain the identity for every frame of the animation.
2805 This patch solves the issue by moving the unscaled view as a sibling of WKContentView
2806 instead of a child so that we do not need to update two scales simultaneously.
2808 * UIProcess/API/Cocoa/WKWebView.mm:
2809 (-[WKWebView initWithFrame:configuration:]):
2810 (-[WKWebView _processDidExit]):
2811 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
2812 Set the z scale to 1 or no coordinate transform will work with this view.
2814 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2815 (-[WKWebView _endAnimatedResize]):
2816 * UIProcess/ios/WKContentView.mm:
2817 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
2818 * UIProcess/ios/WKContentViewInteraction.h:
2819 * UIProcess/ios/WKContentViewInteraction.mm:
2820 (-[WKContentView setupInteraction]):
2821 Since we need to observe changes inside the animation block, the code now use KVO to observe changes of scale.
2823 (-[WKContentView cleanupInteraction]):
2824 (-[WKContentView unscaledView]):
2825 (-[WKContentView inverseScale]):
2826 (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
2827 We update the utility views as usual. The extra bits here are to deal with views coming in during an animation.
2829 If a new utility view comes in during a scaling animation, we do not want to start a new animation with the same curve
2830 to end up at the right place. To avoid any issue, we just hide the view until the animation is finished.
2832 (-[WKContentView hitTest:withEvent:]):
2833 (-[WKContentView _showTapHighlight]):
2834 (-[WKContentView _updateUnscaledView]): Deleted.
2836 2014-07-09 Tim Horton <timothy_horton@apple.com>
2838 Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
2839 https://bugs.webkit.org/show_bug.cgi?id=134773
2841 Reviewed by Anders Carlsson.
2843 * UIProcess/API/mac/WKView.mm:
2844 (-[WKView _takeViewSnapshot]):
2845 * UIProcess/mac/ViewSnapshotStore.h:
2846 * UIProcess/mac/ViewSnapshotStore.mm:
2847 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2848 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2849 (WebKit::ViewSnapshotStore::recordSnapshot):
2850 (WebKit::ViewSnapshot::clearImage):
2851 (WebKit::ViewSnapshot::asLayerContents):
2852 (WebKit::createIOSurfaceFromImage): Deleted.
2853 (WebKit::compressImageAsJPEG): Deleted.
2854 (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost): Deleted.
2855 (WebKit::ViewSnapshotStore::didCompressSnapshot): Deleted.
2856 Remove all ViewSnapshot(Store) code related to JPEG-encoded snapshots.
2857 Remove the "image" member on ViewSnapshot; Mac will always start out with an IOSurface instead.
2858 Adopt WebCore::IOSurface::createFromImage to make that happen.
2859 Add a comment noting that if a snapshot comes back empty, we should throw it away completely.
2861 2014-07-09 Anders Carlsson <andersca@apple.com>
2863 RemoteLayerBackingStore::ensureBackingStore should ensure that the entire backing store gets redrawn
2864 https://bugs.webkit.org/show_bug.cgi?id=134772
2866 Reviewed by Tim Horton.
2868 * Shared/mac/RemoteLayerBackingStore.h:
2869 (WebKit::RemoteLayerBackingStore::Buffer::operator bool):
2870 * Shared/mac/RemoteLayerBackingStore.mm:
2871 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2873 2014-07-09 KwangHyuk Kim <hyuki.kim@samsung.com>
2875 [EFL] Fix crash caused by invalid cursor image.
2876 https://bugs.webkit.org/show_bug.cgi?id=134663
2878 Reviewed by Gyuyoung Kim.
2880 Remove calling of updateCursor since the custom cursor image is invalid once a mouse is out of the webview.
2882 * UIProcess/API/efl/EwkView.cpp:
2883 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2885 2014-07-08 Tim Horton <timothy_horton@apple.com>
2887 Remove WebBackForwardListItems when their owning page goes away
2888 https://bugs.webkit.org/show_bug.cgi?id=134709
2889 <rdar://problem/17584645>
2891 Reviewed by Dan Bernstein.
2893 * Shared/WebBackForwardListItem.cpp:
2894 (WebKit::WebBackForwardListItem::create):
2895 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
2896 * Shared/WebBackForwardListItem.h:
2897 (WebKit::WebBackForwardListItem::pageID):
2898 Add the associated PageID to the WebBackForwardListItem.
2900 * UIProcess/WebBackForwardList.cpp:
2901 (WebKit::WebBackForwardList::restoreFromState):
2902 Push the current PageID onto the WebBackForwardListItem.
2904 * UIProcess/WebProcessProxy.cpp:
2905 (WebKit::WebProcessProxy::removeWebPage):
2906 Remove all of the WebBackForwardListItems from m_backForwardListItemMap when
2907 the page they are associated with is removed.
2909 (WebKit::WebProcessProxy::addBackForwardItem):
2910 Push the PageID from the WebProcess onto the WebBackForwardListItem.
2912 * UIProcess/WebProcessProxy.h:
2913 * UIProcess/WebProcessProxy.messages.in:
2914 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2915 (WebKit::idToHistoryItemMap):
2916 (WebKit::historyItemToIDMap):
2917 (WebKit::updateBackForwardItem):
2918 (WebKit::WebBackForwardListProxy::addItemFromUIProcess):
2919 (WebKit::WK2NotifyHistoryItemChanged):
2920 (WebKit::WebBackForwardListProxy::idForItem):
2921 (WebKit::WebBackForwardListProxy::addItem):
2922 (WebKit::WebBackForwardListProxy::goToItem):
2923 (WebKit::WebBackForwardListProxy::close):
2924 * WebProcess/WebPage/WebBackForwardListProxy.h:
2925 * WebProcess/WebPage/WebPage.cpp:
2926 (WebKit::WebPage::restoreSession):
2927 Keep track of the PageID that back-forward items were created by.
2928 Pass the PageID along when registering WebBackForwardListItems.
2930 2014-07-08 Tim Horton <timothy_horton@apple.com>
2932 [WK2] Expose a few drawing/compositing settings on WKPreferences(Private)
2933 https://bugs.webkit.org/show_bug.cgi?id=134645
2935 Reviewed by Dan Bernstein.
2937 * UIProcess/API/Cocoa/WKPreferences.mm:
2938 (-[WKPreferences _compositingBordersVisible]):
2939 (-[WKPreferences _setCompositingBordersVisible:]):
2940 (-[WKPreferences _compositingRepaintCountersVisible]):
2941 (-[WKPreferences _setCompositingRepaintCountersVisible:]):
2942 (-[WKPreferences _tiledScrollingIndicatorVisible]):
2943 (-[WKPreferences _setTiledScrollingIndicatorVisible:]):
2944 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2945 Expose layer borders, repaint counters, and the tiled scrolling indicator on WKPreferences, as SPI.
2947 2014-07-08 Tim Horton <timothy_horton@apple.com>
2949 WKProcessPoolConfigurationPrivate's maximumProcessCount property has no effect
2950 https://bugs.webkit.org/show_bug.cgi?id=134711
2952 Reviewed by Dan Bernstein.
2954 * UIProcess/API/Cocoa/WKProcessPool.mm:
2955 (-[WKProcessPool _initWithConfiguration:]):
2956 Respect the maximumProcessCount.
2957 Currently the default limit is UINT_MAX; if maximumProcessCount = 0 (the default), we'll use that limit.
2959 2014-07-08 Adrian Perez de Castro <aperez@igalia.com>
2961 [GTK] Move user style sheet API out of WebKitWebViewGroup
2962 https://bugs.webkit.org/show_bug.cgi?id=134551
2964 Reviewed by Carlos Garcia Campos.
2966 * PlatformGTK.cmake: Include the new source files in the build.
2967 * UIProcess/API/C/gtk/WKView.cpp:
2969 Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
2970 * UIProcess/API/gtk/WebKitUserContent.cpp: Added.
2971 (toUserContentInjectedFrames):
2974 (_WebKitUserStyleSheet::_WebKitUserStyleSheet):
2975 (webkit_user_style_sheet_ref):
2976 (webkit_user_style_sheet_unref):
2977 (webkit_user_style_sheet_new):
2978 (webkitWebKitUserStyleSheetToUserStyleSheet):
2979 * UIProcess/API/gtk/WebKitUserContent.h: Added.
2980 * UIProcess/API/gtk/WebKitUserContentManager.cpp: Added.
2981 (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
2982 (webkit_user_content_manager_class_init):
2983 (webkit_user_content_manager_new):
2984 (webkit_user_content_manager_add_style_sheet):
2985 (webkit_user_content_manager_remove_all_style_sheets):
2986 (webkitUserContentManagerGetUserContentControllerProxy):
2987 * UIProcess/API/gtk/WebKitUserContentManager.h: Added.
2988 * UIProcess/API/gtk/WebKitUserContentManagerPrivate.h: Added.
2989 * UIProcess/API/gtk/WebKitUserContentPrivate.h: Added.
2990 * UIProcess/API/gtk/WebKitWebContext.cpp:
2991 (webkitWebContextCreatePageForWebView): Add a new parameter to allow
2992 passing the WebKitUserContentManager that the web view will use.
2993 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
2994 * UIProcess/API/gtk/WebKitWebView.cpp:
2995 (webkitWebViewConstructed): Added handling of the
2996 "user-content-manager" property on construction.
2997 (webkitWebViewSetProperty): Added support for the
2998 "user-content-manager" property.
2999 (webkitWebViewGetProperty): Added support for the
3000 "user-content-manager" property.
3001 (webkit_web_view_class_init): Added the "user-content-manager"
3002 property definition to the WebKitWebView class.
3003 (webkit_web_view_new_with_related_view): Made related views share
3004 the same WebKitUserContentManager used by the view they are
3006 (webkit_web_view_new_with_user_content_manager): Added.
3007 (webkit_web_view_get_user_content_manager): Added.
3008 * UIProcess/API/gtk/WebKitWebView.h: Add new API methods.
3009 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3010 (webkitWebViewBaseCreate): Added a parameter to pass the user
3012 (webkitWebViewBaseCreateWebPage): Added a parameter to pass the user
3014 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.
3015 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed the bits related
3016 to user style sheet support from WebKitWebViewGroup.
3017 (webkit_web_view_group_set_settings):
3018 (toAPIArray): Deleted.
3019 (webkit_web_view_group_add_user_style_sheet): Deleted.
3020 (webkit_web_view_group_remove_all_user_style_sheets): Deleted.
3021 * UIProcess/API/gtk/WebKitWebViewGroup.h: Deleted the API methods
3022 for user style sheet handling.
3023 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added the new API
3024 functions and types, and removed the methods which are no longer
3025 available in WebKitWebViewGroup.
3026 * UIProcess/API/gtk/webkit2.h: Add the new headers.
3027 * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added
3028 methods to add and remove user style sheets, alike those used for
3030 (WebKit::WebUserContentControllerProxy::addProcess):
3031 (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
3032 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
3033 * UIProcess/UserContent/WebUserContentControllerProxy.h: Ditto.
3034 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3035 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3036 Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
3037 * WebProcess/UserContent/WebUserContentController.cpp: Added methods
3038 to add and remove user style sheets, alike those used for user scripts.
3039 (WebKit::WebUserContentController::addUserStyleSheets):
3040 (WebKit::WebUserContentController::removeAllUserStyleSheets):
3041 * WebProcess/UserContent/WebUserContentController.h: Ditto.
3042 * WebProcess/UserContent/WebUserContentController.messages.in:
3045 2014-07-08 Zan Dobersek <zdobersek@igalia.com>
3047 [GTK] Guard uses of RedirectedXCompositeWindow in WebKitWebViewBase with PLATFORM(X11)
3048 https://bugs.webkit.org/show_bug.cgi?id=133871
3050 Reviewed by Martin Robinson.
3052 Guard uses of the RedirectedXCompositeWindow object in WebKitWebViewBase with the
3053 PLATFORM(X11) build guard. This is required to properly support building the GTK
3054 port only for the Wayland target.
3056 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3057 (webkitWebViewBaseConstructed):
3058 (webkitWebViewRenderAcceleratedCompositingResults):
3059 (resizeWebKitWebViewBaseFromAllocation):
3060 (webkitWebViewBaseUpdatePreferences):
3061 (webkitWebViewBaseCreateWebPage):
3063 2014-07-07 Tim Horton <timothy_horton@apple.com>
3065 Turn on accelerated drawing for WebKit2 by default
3066 https://bugs.webkit.org/show_bug.cgi?id=134708
3067 <rdar://problem/17584642>
3069 Reviewed by Simon Fraser.
3071 * Shared/WebPreferencesDefinitions.h:
3072 Make Mac match iOS, in that accelerated drawing is on by default.
3074 2014-07-07 Timothy Horton <timothy_horton@apple.com>
3076 Don't leak _WKRemoteObjectRegistry in WKBrowsingContextController
3077 https://bugs.webkit.org/show_bug.cgi?id=134703
3079 Reviewed by Simon Fraser.
3081 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3082 (-[WKBrowsingContextController _remoteObjectRegistry]):
3083 Adoption is important!!
3085 2014-07-07 Simon Fraser <simon.fraser@apple.com>
3087 [UI-side compositing] Support reflections on custom layers like video
3088 https://bugs.webkit.org/show_bug.cgi?id=134701
3090 Reviewed by Tim Horton.
3092 For video reflections, we have to support cloning of PlatformCALayerRemoteCustom
3093 in the web process. Do so by implementing PlatformCALayerRemoteCustom::clone(),
3094 which does the right gyrations to get AVPlayerLayers cloned, then makes a
3095 new PlatformCALayerRemoteCustom to wrap the new layer. This ends up getting
3096 its own context hosting ID, allowing the clone to show in the UI process.
3098 Attempt to do the same for WebGL, but turn it off because it breaks.
3100 * Shared/mac/RemoteLayerBackingStore.mm:
3101 (WebKit::RemoteLayerBackingStore::drawInContext):
3102 * Shared/mac/RemoteLayerTreeTransaction.mm:
3103 (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode): Unconditionally encode/decode
3104 the hostingContextID. It will be 0 for most layers.
3105 (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
3106 (WebKit::RemoteLayerTreeTransaction::description):
3107 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
3108 (WebKit::RemoteLayerTreeHost::createLayer):
3109 * UIProcess/mac/RemoteLayerTreeHost.mm:
3110 (WebKit::RemoteLayerTreeHost::createLayer):
3111 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3112 (WebKit::PlatformCALayerRemote::create): Creation with a custom PlatformLayer* always
3113 creates a PlatformCALayerRemoteCustom.
3114 (WebKit::PlatformCALayerRemote::clone): Factor some code.
3115 (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
3116 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3117 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3118 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
3119 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3120 (WebKit::PlatformCALayerRemoteCustom::create):
3121 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
3122 (WebKit::PlatformCALayerRemoteCustom::clone): Clone by making an instance of the
3123 correct type of platform layer when possible, then wrapping a PlatformCALayerRemoteCustom
3125 (WebKit::PlatformCALayerRemoteCustom::contents):
3126 (WebKit::PlatformCALayerRemoteCustom::setContents):
3127 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3128 (WebKit::RemoteLayerTreeContext::layerWasCreated):
3129 (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
3131 2014-07-07 Simon Fraser <simon.fraser@apple.com>
3133 [UI-side compositing] Crash when starting a filter transition on a reflected layer
3134 https://bugs.webkit.org/show_bug.cgi?id=134694
3136 Reviewed by Tim Horton.
3138 When cloned layers had animations, we would fire two animationDidStart callbacks,
3139 but the second would pass an empty animationKey string to the web process, resulting
3142 Fix by not blindly copying all layer properties when cloning PlatformCALayerRemotes,
3143 since the clone would include addedAnimations, and then get the same animations
3144 added on top by the caller.
3146 Also protect against an empty animation key in the animationDidStart callback.
3148 * UIProcess/mac/RemoteLayerTreeHost.mm:
3149 (WebKit::RemoteLayerTreeHost::animationDidStart):
3150 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3151 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
3152 (WebKit::PlatformCALayerRemote::clone): Don't copy all the properties; copy
3153 them manually as PlatformCALayerMac does. Only copy the big things if they don't
3154 have their default values.
3155 (WebKit::PlatformCALayerRemote::copyFiltersFrom): Need an implementation of this
3156 for clone() to call.
3158 2014-07-07 Tim Horton <timothy_horton@apple.com>
3160 Nearly everything in the UIProcess "leaks" when WKWebView is torn down
3161 https://bugs.webkit.org/show_bug.cgi?id=134699
3162 <rdar://problem/17581777>
3164 Reviewed by Simon Fraser.
3166 * UIProcess/API/Cocoa/WKWebView.mm:
3167 (-[WKWebView initWithFrame:configuration:]):
3168 Adoption is important!
3170 2014-07-07 Enrica Casucci <enrica@apple.com>
3172 REGRESSION(iOS WK2): arrow keys movements don't work.
3173 https://bugs.webkit.org/show_bug.cgi?id=134561
3174 <rdar://problem/16827629>
3176 Reviewed by Benjamin Poulain.
3178 This change add the implementations for cursor movement selectors.
3179 It also provides a mechanism to ensure that every selection
3180 change in WebKit is reflected in UIKit so that it can update the
3181 autocorrection data. This way we ensure that the autocorraction state
3182 is consistent even when selection changes are originated by JavaScript.
3183 WebPageProxy::editorStateChanged now notifies the page client when the
3184 selection is about to change as well as when it actually changed.
3186 * UIProcess/PageClient.h:
3187 * UIProcess/WebPageProxy.cpp:
3188 (WebKit::WebPageProxy::editorStateChanged):
3189 * UIProcess/WebPageProxy.h:
3190 * UIProcess/ios/PageClientImplIOS.h:
3191 * UIProcess/ios/PageClientImplIOS.mm:
3192 (WebKit::PageClientImpl::selectionWillChange):
3193 * UIProcess/ios/WKContentViewInteraction.h:
3194 * UIProcess/ios/WKContentViewInteraction.mm:
3195 (-[WKContentView cut:]): Removed incorrect calls to textWillChange and
3197 (-[WKContentView paste:]):
3198 (-[WKContentView _moveUp:withHistory:]):
3199 (-[WKContentView _moveDown:withHistory:]):
3200 (-[WKContentView _moveLeft:withHistory:]):
3201 (-[WKContentView _moveRight:withHistory:]):
3202 (-[WKContentView _moveToStartOfWord:withHistory:]):
3203 (-[WKContentView _moveToStartOfParagraph:withHistory:]):
3204 (-[WKContentView _moveToStartOfLine:withHistory:]):
3205 (-[WKContentView _moveToStartOfDocument:withHistory:]):
3206 (-[WKContentView _moveToEndOfWord:withHistory:]):
3207 (-[WKContentView _moveToEndOfParagraph:withHistory:]):
3208 (-[WKContentView _moveToEndOfLine:withHistory:]):
3209 (-[WKContentView _moveToEndOfDocument:withHistory:]):
3210 (-[WKContentView _selectionWillChange]):
3211 (-[WKContentView _selectionChanged]):
3212 * UIProcess/ios/WebPageProxyIOS.mm:
3213 (WebKit::WebPageProxy::notifySelectionWillChange):
3215 2014-07-07 Anders Carlsson <andersca@apple.com>
3217 Add SPI for saving and restoring a WKWebView's _WKSessionState
3218 https://bugs.webkit.org/show_bug.cgi?id=134693
3220 Reviewed by Dan Bernstein.
3222 * UIProcess/API/C/WKPage.cpp:
3223 (WKPageRestoreFromSessionState):
3224 * UIProcess/API/Cocoa/WKWebView.mm:
3225 (-[WKWebView _sessionState]):
3226 (-[WKWebView _restoreFromSessionStateData:]):
3227 (-[WKWebView _restoreFromSessionState:]):
3228 (-[WKWebView _restoreSessionState:andNavigate:]):
3229 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3230 * UIProcess/API/Cocoa/_WKSessionState.mm:
3231 (-[_WKSessionState _initWithSessionState:]):
3232 * UIProcess/API/Cocoa/_WKSessionStateInternal.h:
3233 * UIProcess/WebPageProxy.cpp:
3234 (WebKit::WebPageProxy::restoreFromSessionState):
3235 * UIProcess/WebPageProxy.h:
3237 2014-07-07 Anders Carlsson <andersca@apple.com>
3239 Add a stubbed out _WKSessionState class
3240 https://bugs.webkit.org/show_bug.cgi?id=134690
3242 Reviewed by Geoffrey Garen.
3244 * UIProcess/API/Cocoa/_WKSessionState.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
3245 * UIProcess/API/Cocoa/_WKSessionState.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
3246 (-[_WKSessionState initWithData:]):
3247 (-[_WKSessionState data]):
3248 * UIProcess/API/Cocoa/_WKSessionStateInternal.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
3249 * UIProcess/Cocoa/SessionStateCoding.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
3250 * UIProcess/Cocoa/SessionStateCoding.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
3251 (WebKit::encodeSessionState):
3252 (WebKit::decodeSessionState):
3253 * UIProcess/LegacySessionStateCoding.h:
3254 * WebKit2.xcodeproj/project.pbxproj:
3256 2014-07-07 Anders Carlsson <andersca@apple.com>
3258 Some of the WKPreferences (API) property getters read like questions
3259 https://bugs.webkit.org/show_bug.cgi?id=134678
3260 <rdar://problem/17576847>
3262 Reviewed by Dan Bernstein.
3264 * UIProcess/API/Cocoa/WKPreferences.h:
3265 * UIProcess/API/Cocoa/WKPreferences.mm:
3266 (-[WKPreferences javaScriptIsEnabled]):
3267 (-[WKPreferences javaIsEnabled]):
3268 (-[WKPreferences plugInsAreEnabled]):
3269 (-[WKPreferences isJavaScriptEnabled]): Deleted.
3270 (-[WKPreferences isJavaEnabled]): Deleted.
3271 (-[WKPreferences arePlugInsEnabled]): Deleted.
3273 2014-07-07 Brady Eidson <beidson@apple.com>
3275 ServicesOverlayController menus show up in the wrong place.
3276 <rdar://problem/17130576> and https://bugs.webkit.org/show_bug.cgi?id=134684
3278 Reviewed by Tim Horton.
3280 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3281 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Handle cases where
3282 the telephone number is in a subframe.
3283 (WebKit::ServicesOverlayController::handleClick): The click point is always in main frame document
3284 coordinates, so convert it to window coordinates using the main frame’s FrameView.
3286 2014-07-07 Dan Bernstein <mitz@apple.com>
3288 [Cocoa] Assertion failure in NavigationState::LoaderClient::didStartProvisionalLoadForFrame (navigationID) when navigating through the page cache
3289 https://bugs.webkit.org/show_bug.cgi?id=134682
3291 Reviewed by Tim Horton.
3293 * UIProcess/Cocoa/NavigationState.mm:
3294 (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Replaced the
3295 assertion with a FIXME.
3296 (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3298 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
3299 (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
3300 (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
3301 (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
3302 (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
3304 2014-07-07 KwangHyuk Kim <hyuki.kim@samsung.com>
3306 [EFL] Fix cursor artifacts on naver map site.
3307 https://bugs.webkit.org/show_bug.cgi?id=134649
3309 Reviewed by Gyuyoung Kim.
3311 Old evas cursor and ecore x cursor are reset before new cursor is applied.
3313 * UIProcess/API/efl/EwkView.cpp:
3314 (EwkView::updateCursor):
3316 2014-07-06 Benjamin Poulain <bpoulain@apple.com>
3318 [iOS][WK2] The tap highlight ID is not invalidated when a long press ends
3319 https://bugs.webkit.org/show_bug.cgi?id=134660
3321 Reviewed by Darin Adler.
3323 * UIProcess/ios/WKContentViewInteraction.mm:
3324 (-[WKContentView _cancelInteraction]):
3325 (-[WKContentView _finishInteraction]):
3326 (cancelPotentialTapIfNecessary):
3327 I messed that up in r170600. I only accounted for the web process being too fast.
3329 If the web process is too slow, _cancelInteraction or _finishInteraction happen before
3330 _didGetTapHighlightForRequest:, and we also need to nuke the tap highlight.
3332 2014-07-06 Tim Horton <timothy_horton@apple.com>
3334 [WK2] Don't support dynamically enabling the RemoteLayerTree debug indicator
3335 https://bugs.webkit.org/show_bug.cgi?id=134644
3337 Reviewed by Darin Adler.
3339 * UIProcess/DrawingAreaProxy.h:
3340 (WebKit::DrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
3341 * UIProcess/WebPageProxy.cpp:
3342 (WebKit::WebPageProxy::preferencesDidChange):
3343 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3344 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3345 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
3346 (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
3347 (WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
3348 The indicator depends on the live layer tree commits coming in, including layer creation,
3349 so it can't be turned on after the root layer is created. Even a refresh is insufficient
3350 to get it working; the debug indicator really needs to exist from the first commit.
3351 So, don't even attempt to dynamically enable the indicator; create it at
3352 RemoteLayerTreeDrawingAreaProxy construction time if the pref is enabled.
3354 2014-07-06 Yoav Weiss <yoav@yoav.ws>
3356 Turn on img@sizes compile flag
3357 https://bugs.webkit.org/show_bug.cgi?id=134634
3359 Reviewed by Benjamin Poulain.
3361 * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
3363 2014-07-06 Brady Eidson <beidson@apple.com>
3365 Speculative fix for: NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
3366 https://bugs.webkit.org/show_bug.cgi?id=134666
3368 Reviewed by Tim Horton.
3370 * Shared/mac/SecItemRequestData.cpp:
3371 (WebKit::SecItemRequestData::encode): Encode whether or not the query dictionary exists.
3372 (WebKit::SecItemRequestData::decode): Only fail when query dictionary fails to decode if we expect one.
3374 * UIProcess/mac/SecItemShimProxy.cpp:
3375 (WebKit::SecItemShimProxy::secItemRequest): If the request is of type Invalid, log an error message asking
3376 for a bug, and respond with an "invalid parameter" error.
3378 2014-07-06 Antti Koivisto <antti@apple.com>
3380 Don't throttle layer flushes when the main resource is a GIF
3381 https://bugs.webkit.org/show_bug.cgi?id=134650
3383 Reviewed by Simon Fraser.
3385 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3386 (WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):
3388 2014-07-04 Rohit Kumar <kumar.rohit@samsung.com>
3390 [EFL][WK2]Fix build break in EFL WK2
3391 https://bugs.webkit.org/show_bug.cgi?id=134629
3393 Unreviewed build fix.
3395 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
3396 (WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlushImmediately):
3397 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
3399 2014-07-04 Dan Bernstein <mitz@apple.com>
3401 [Cocoa] -[WKWebView _reload] is unused
3402 https://bugs.webkit.org/show_bug.cgi?id=134638
3404 Reviewed by Sam Weinig.
3406 * UIProcess/API/Cocoa/WKWebView.mm:
3407 (-[WKWebView _reload]): Deleted.
3408 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3410 2014-07-04 Tim Horton <timothy_horton@apple.com>
3412 [WK2] Take TopContentInset into account when sending dictionary lookup point to PluginView
3413 https://bugs.webkit.org/show_bug.cgi?id=134624
3414 <rdar://problem/17222041>
3416 Reviewed by Sam Weinig.
3418 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3419 (WebKit::PDFPlugin::performDictionaryLookupAtLocation):
3420 Perform the same coordinate conversion we use for mouse events, which happens
3421 to take the top content inset into account.
3423 2014-07-04 Philippe Normand <pnormand@igalia.com>
3425 Unreviewed, GTK WK2 build fix after r170787.
3427 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3428 (WebKit::DrawingAreaImpl::scheduleCompositingLayerFlushImmediately):
3429 * WebProcess/WebPage/DrawingAreaImpl.h:
3431 2014-07-04 Zan Dobersek <zdobersek@igalia.com>
3433 Unreviewed. Reverting the bad changes introduced in r170795.
3435 * Platform/IPC/ArgumentDecoder.cpp:
3436 (IPC::ArgumentDecoder::decode): Deleted.
3437 * Platform/IPC/ArgumentDecoder.h:
3438 * Platform/IPC/ArgumentEncoder.cpp:
3439 (IPC::ArgumentEncoder::encode): Deleted.
3440 * Platform/IPC/ArgumentEncoder.h:
3442 2014-07-04 Zan Dobersek <zdobersek@igalia.com>
3444 Unreviewed. Fixing the build for ports on 64-bit Linux.
3446 Add IPC encoding and decoding overloads for the long long type, needed
3447 after r170755 started encoding and decoding long long variables in
3450 * Platform/IPC/ArgumentDecoder.cpp:
3451 (IPC::ArgumentDecoder::decode):
3452 * Platform/IPC/ArgumentDecoder.h:
3453 * Platform/IPC/ArgumentEncoder.cpp:
3454 (IPC::ArgumentEncoder::encode):
3455 * Platform/IPC/ArgumentEncoder.h:
3457 2014-07-04 Timothy Horton <timothy_horton@apple.com>
3459 [iOS][WK2] Black web view after un-suspending process
3460 https://bugs.webkit.org/show_bug.cgi?id=134623
3461 <rdar://problem/17513223>
3463 Reviewed by Simon Fraser.
3465 * UIProcess/WebPageProxy.cpp:
3466 (WebKit::WebPageProxy::viewStateDidChange):
3467 Add an argument to viewStateDidChange that allows callers (-[WKContentView _applicationWillEnterForeground:])
3468 to force us to wait for a synchronous reply from the Web process after performing a view state change.
3470 (WebKit::WebPageProxy::dispatchViewStateChange):
3471 Move the has-been-in-window-and-now-is-newly-in-window check into dispatchViewStateChange.
3472 Adjust the logic surrounding going into/out of window by factoring out the IsInWindow-did-change check, for clarity.
3474 * UIProcess/WebPageProxy.h:
3475 * UIProcess/ios/WKContentView.mm:
3476 (-[WKContentView _applicationWillEnterForeground:]):
3477 As previously mentioned, wait for a reply when foregrounding.
3479 * WebProcess/WebPage/DrawingArea.h:
3480 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3481 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3482 (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
3483 (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
3484 (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
3485 Make sure to schedule a commit immediately if the UI process is waiting for a reply.
3486 Previously we assumed that a commit would be scheduled anyway because we would have to reparent the
3487 layer tree, but that doesn't happen in the suspension-without-unparenting case. Also, we want to skip
3488 all throttling in this case.
3490 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3491 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3492 (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately):
3494 2014-07-03 Gavin Barraclough <baraclough@apple.com>
3496 Should not take background task assertion for NetworkProcess
3497 https://bugs.webkit.org/show_bug.cgi?id=134622
3499 Reviewed by Tim Horton.
3501 When the WebContent wants to complete a task in the background we take a process assertion on the child process, and also need to prevent the UI process from suspending.
3502 However for the NetworkProcess we always just hold a process assertion, and don't want this to interfere with UIApp suspension.
3504 * Platform/IPC/mac/ConnectionMac.mm:
3505 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
3506 - ProcessAssertion -> ProcessAndUIAssertion
3507 * UIProcess/ProcessAssertion.cpp:
3508 (WebKit::ProcessAssertion::ProcessAssertion):
3509 - assignment -> initializer list.
3510 (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
3511 (WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
3512 (WebKit::ProcessAndUIAssertion::setState):
3513 - added no-op implementation.
3514 (WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
3515 * UIProcess/ProcessAssertion.h:
3516 - removed ~ProcessAssertion, added ProcessAndUIAssertion class.
3517 * UIProcess/ProcessThrottler.cpp:
3518 (WebKit::ProcessThrottler::didConnnectToProcess):
3519 - ProcessAssertion -> ProcessAndUIAssertion
3520 * UIProcess/ProcessThrottler.h:
3521 - ProcessAssertion -> ProcessAndUIAssertion
3522 * UIProcess/ios/ProcessAssertionIOS.mm:
3523 (WebKit::ProcessAssertion::ProcessAssertion):
3524 - assignment -> initializer list.
3525 - moved code to manage WKProcessAssertionBackgroundTaskManager
3526 (WebKit::ProcessAssertion::setState):
3527 - moved code to manage WKProcessAssertionBackgroundTaskManager
3528 (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
3529 (WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
3530 (WebKit::ProcessAndUIAssertion::setState):
3531 - moved code to manage WKProcessAssertionBackgroundTaskManager from ProcessAssertion.
3532 (WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
3533 - delete - moved code to manage WKProcessAssertionBackgroundTaskManager
3535 2014-07-03 Simon Fraser <simon.fraser@apple.com>
3537 Clean up Brady's mess on iOS.
3539 * Platform/mac/StringUtilities.h:
3540 * Platform/mac/StringUtilities.mm:
3542 2014-07-03 Simon Fraser <simon.fraser@apple.com>
3544 [iOS WK2] Compositing layers draw outside page bounds
3545 https://bugs.webkit.org/show_bug.cgi?id=134619
3546 <rdar://problem/16953222>
3548 Reviewed by Benjamin Poulain.
3550 With the new rubber-banding behavior, we no longer have the root content layer clipping all
3551 the web layers, but this resulted in web layers which were moved outside the viewport by CSS
3552 transforms not being clipped.
3554 Fix by adding a clipping layer inside the scroll view, above _rootContentView. This layer
3555 normally has the same bounds as the content, but when rubber-banding or pinching,
3556 it takes the union of the content bounds and the rect used for fixed positioning.
3557 To make scrolling work as expected in this scenario, when it has non-zero offset, it
3558 has to compensate by setting its bounds origin.
3560 The bounds of the clipping layer are updated on scrolling/zooming, and when the
3561 layer commit tells us that the content size changed.
3563 * UIProcess/API/Cocoa/WKWebView.mm:
3564 (-[WKWebView _updateScrollViewBackground]):
3565 * UIProcess/ios/WKContentView.mm:
3566 (-[WKContentView initWithFrame:context:configuration:webView:]):
3567 (-[WKContentView updateFixedClippingView:]):
3568 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
3569 (-[WKContentView _didCommitLayerTree:]):
3571 2014-07-03 Brady Eidson <beidson@apple.com>
3573 When showing the selection menu, include menu options for all selected phone numbers.
3574 <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
3576 Reviewed by Tim Horton.
3578 Move some telephone number menu logic from WebKitSystemInterface here.
3579 Also provide utility to get just the one menu item relevant to a telephone number.
3580 * Platform/mac/MenuUtilities.h:
3581 * Platform/mac/MenuUtilities.mm: Added.
3582 (WebKit::menuItemForTelephoneNumber):
3583 (WebKit::menuItemsForTelephoneNumber):
3585 * Platform/mac/StringUtilities.h:
3586 * Platform/mac/StringUtilities.mm:
3587 (WebKit::formattedPhoneNumberString): Return a localized formatted phone number.
3589 Add a member to track the selected phone numbers:
3590 * Shared/ContextMenuContextData.h:
3591 (WebKit::ContextMenuContextData::ContextMenuContextData):
3592 (WebKit::ContextMenuContextData::selectedTelephoneNumbers):
3594 * UIProcess/WebPageProxy.h:
3595 * UIProcess/WebPageProxy.messages.in:
3597 * UIProcess/mac/WebContextMenuProxyMac.mm:
3598 (WebKit::WebContextMenuProxyMac::setupServicesMenu): Also add menu items for each phone number that is
3601 Switch away from a WKSI method, and remove a lot of unneeded forward declarations and soft linking:
3602 * UIProcess/mac/WebPageProxyMac.mm:
3603 (WebKit::WebPageProxy::showTelephoneNumberMenu):
3604 (WebKit::WebPageProxy::showSelectionServiceMenu):
3606 * WebKit2.xcodeproj/project.pbxproj:
3608 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3609 (WebKit::ServicesOverlayController::drawSelectionHighlight):
3610 (WebKit::ServicesOverlayController::handleClick): Pass the phone numbers along.
3612 * WebProcess/WebPage/WebPage.h:
3613 * WebProcess/WebPage/mac/WebPageMac.mm:
3614 (WebKit::WebPage::handleSelectionServiceClick): Pass the phone numbers along.
3616 2014-07-03 Gavin Barraclough <baraclough@apple.com>
3618 WKProcessAssertionBackgroundTaskManager should clear member if task expires
3619 https://bugs.webkit.org/show_bug.cgi?id=134618
3621 Reviewed by Anders Carlson.
3623 Failure to do so results in a warning, and could result in us erroneously completing a background task too soon.
3625 * UIProcess/ios/ProcessAssertionIOS.mm:
3626 (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
3627 - remove local variable, _backgroundTask = UIBackgroundTaskInvalid;
3629 2014-07-03 Joseph Pecoraro <pecoraro@apple.com>
3631 Unreviewed iOS build fix for r170774.
3633 Remove some unnecessary WTF::moves on iOS:
3634 error: static_assert failed "T is not an lvalue reference; move() is unnecessary."
3636 * WebProcess/WebPage/EventDispatcher.cpp:
3637 (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
3638 (WebKit::EventDispatcher::touchEvent):
3640 2014-07-03 Anders Carlsson <andersca@apple.com>
3642 Try to fix the iOS build.
3644 Add WebPageProxyCocoa.mm for code shared between iOS and OS X. Put the recent searches save/restore code there.
3646 * UIProcess/Cocoa/WebPageProxyCocoa.mm: Added.
3647 (WebKit::autosaveKey):
3648 (WebKit::WebPageProxy::saveRecentSearches):
3649 (WebKit::WebPageProxy::loadRecentSearches):
3650 * UIProcess/mac/WebPageProxyMac.mm:
3651 * WebKit2.xcodeproj/project.pbxproj:
3653 2014-07-03 Dan Bernstein <mitz@apple.com>
3655 <rdar://problem/16337741> The UI process needs to track the number of HTTP subresource loads in progress (or at least whether there are any)
3656 https://bugs.webkit.org/show_bug.cgi?id=134615
3658 Reviewed by Anders Carlsson.
3660 Added a _networkRequestsInProgress boolean property to WKWebView.
3662 * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
3663 PageLoadStateObserver member functions.
3665 * UIProcess/API/Cocoa/WKWebView.mm:
3666 (-[WKWebView _networkRequestsInProgress]): New getter that gets this state from the
3668 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property.
3670 * UIProcess/Cocoa/NavigationState.h:
3671 * UIProcess/Cocoa/NavigationState.mm:
3672 (WebKit::NavigationState::willChangeNetworkRequestsInProgress):: Override this new
3673 PageLoadState::Observer member function by sending the appropriate KVO change message to the
3675 (WebKit::NavigationState::didChangeNetworkRequestsInProgress): Ditto.
3677 * UIProcess/PageLoadState.cpp:
3678 (WebKit::PageLoadState::commitChanges): Check for changes to networkRequestsInProgress
3679 and call the observers if needed.
3680 (WebKit::PageLoadState::reset): Reset networkRequestsInProgress in the uncommitted state.
3681 (WebKit::PageLoadState::setNetworkRequestsInProgress): Set networkRequestsInProgress in the
3683 * UIProcess/PageLoadState.h:
3684 (WebKit::PageLoadState::networkRequestsInProgress): Added this getter.
3685 (WebKit::PageLoadState::Data::Data): Initialize new networkRequestsInProgress member.
3687 * UIProcess/WebPageProxy.cpp:
3688 (WebKit::WebPageProxy::setNetworkRequestsInProgress): Added. Updates the PageLoadState.
3689 * UIProcess/WebPageProxy.h:
3690 * UIProcess/WebPageProxy.messages.in: Added SetNetworkRequestsInProgress message.
3692 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3693 (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Call
3694 WebPage::addResourceRequest.
3695 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): Call
3696 WebPage::removeResourceRequest.
3697 (WebKit::WebFrameLoaderClient::dispatchDidFailLoading): Ditto.
3699 * WebProcess/WebPage/WebPage.cpp:
3700 (WebKit::WebPage::addResourceRequest): Added. If the new request is for an HTTP-family URL,
3701 add its identifier to the set of network resourece request identifiers. If the set was
3702 previously empty, send the WebPageProxy a message.
3703 (WebKit::WebPage::removeResourceRequest): Added. Remove the identifier from the set. If it
3704 becomes empty, send the WebPageProxy a message.
3705 * WebProcess/WebPage/WebPage.h:
3707 2014-07-03 Anders Carlsson <andersca@apple.com>
3709 Remove two unused functions
3710 https://bugs.webkit.org/show_bug.cgi?id=134614
3712 Reviewed by Andreas Kling.
3714 * UIProcess/LegacySessionStateCoding.h:
3715 * UIProcess/mac/LegacySessionStateCoding.cpp:
3716 (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
3717 (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
3719 2014-07-03 Daniel Bates <dabates@apple.com>
3722 https://bugs.webkit.org/show_bug.cgi?id=134500
3724 Rubber-stamped by Anders Carlsson.
3726 Substitute WTF::move() for std::move().
3728 * DatabaseProcess/DatabaseProcess.cpp:
3729 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3730 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3731 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3732 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3733 * Platform/IPC/ArgumentCoders.h:
3734 * Platform/IPC/ArgumentDecoder.cpp:
3735 * Platform/IPC/Connection.cpp:
3736 * Platform/IPC/Connection.h:
3739 2014-07-03 Benjamin Poulain <bpoulain@apple.com>
3741 [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
3742 https://bugs.webkit.org/show_bug.cgi?id=134582
3744 Reviewed by Tim Horton.
3746 This patch fixes two small bugs that were causing "jumpiness" on animated resize:
3747 1) The new scale was less accurate than the target scale, making the WebProcess force a worse scale on the content.
3748 2) The code putting back the rects in view was ignoring the obscured insets, constraining the scroll position more
3751 The first problem was cause by a series of rounding issues accumulating to the fact that "scale != targetScale"
3752 was almost never true.
3754 The first issue is that the unobscured content size was stored in integer coordinates. Because of that, it was
3755 impossible to determine accurately how much content is in the view.
3756 The outcome was that visibleHorizontalFraction was very inaccurate compared to what the UIProcess computed.
3758 Another issue affecting the scale is that scaleAfterViewportWidthChange was computing the widthToKeepInView
3759 on floating point. Since ARM64 does all those computations on doubles in the UIProcess, the value would be quite
3760 different from the received targetScale.
3762 Finally, the code uses withinEpsilon() instead of a strict equality to reduce the effect of rounding errors.
3764 For the second issue, the problem was that I was bounding the exposed rect to the page bounds. It is completely
3765 valid to have an exposed rect outside the page bounds, that area is just under the obscured insets.
3767 On the other hand, the unobscured rect needs to be within the bounds as we do not want to rotate to a rubberbanding
3768 position. The fix is simply to put the right rect into bounds, and the horizontal/vertical adjustement applies on
3771 * WebProcess/WebPage/ios/WebPageIOS.mm:
3772 (WebKit::scaleAfterViewportWidthChange):
3773 (WebKit::WebPage::dynamicViewportSizeUpdate):
3774 (WebKit::WebPage::updateVisibleContentRects):
3776 2014-07-03 Anders Carlsson <andersca@apple.com>
3780 * UIProcess/mac/WebPageProxyMac.mm:
3782 2014-07-03 Anders Carlsson <andersca@apple.com>
3784 Get rid of WebPageProxyCF.cpp
3785 https://bugs.webkit.org/show_bug.cgi?id=134609
3787 Reviewed by Dan Bernstein.
3789 * UIProcess/cf/WebPageProxyCF.cpp: Removed.
3790 * UIProcess/mac/WebPageProxyMac.mm:
3791 (WebKit::autosaveKey):
3792 (WebKit::WebPageProxy::saveRecentSearches):
3793 (WebKit::WebPageProxy::loadRecentSearches):
3794 * WebKit2.xcodeproj/project.pbxproj:
3796 2014-07-03 Tim Horton <timothy_horton@apple.com>
3798 [WK2] Revise the flat find indicator secondary highlight shadows
3799 https://bugs.webkit.org/show_bug.cgi?id=134607
3800 <rdar://problem/17554828>
3802 Reviewed by Brady Eidson.
3804 * WebProcess/WebPage/FindController.cpp:
3805 (WebKit::FindController::drawRect):
3806 Bring back the secondary highlight shadow, with new constants.
3808 2014-07-03 Tim Horton <timothy_horton@apple.com>
3810 [iOS][WK2] Sometimes the swipe snapshot stays up too long
3811 https://bugs.webkit.org/show_bug.cgi?id=134506
3812 <rdar://problem/17496803>
3814 Reviewed by Simon Fraser.
3816 Implement a transaction callback mechanism.
3817 The UI process can register a callback at any point, generally immediately after sending a message to the Web process.
3818 It will then send another message (in-order) with the callback ID to the Web process, which will put it into the next transaction
3819 (scheduling a new one if needed). When the transaction comes back to the UI process, the callbacks are performed.
3820 This ensures that the callback fires alongside a commit that includes the results of whatever messages were sent before it was registered.
3821 For now, all callbacks are fired just before committing layer changes, but it's possible future patches will want post-commit callbacks.
3823 Make use of this to remove the ViewGestureControllerIOS snapshots at the right time.
3825 * Shared/mac/RemoteLayerTreeTransaction.h:
3826 (WebKit::RemoteLayerTreeTransaction::callbackIDs):
3827 (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
3828 * Shared/mac/RemoteLayerTreeTransaction.mm:
3829 (WebKit::RemoteLayerTreeTransaction::encode):
3830 (WebKit::RemoteLayerTreeTransaction::decode):
3831 Add a vector of callback IDs to the transaction; encode and decode as appropriate.
3833 * UIProcess/DrawingAreaProxy.h:
3834 (WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing):
3835 (WebKit::DrawingAreaProxy::lastVisibleTransactionID): Deleted.
3836 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3837 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3838 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
3839 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3840 (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3841 Add dispatchAfterEnsuringDrawing, which takes a function.
3842 When a callback is added, we send the callback ID to the Web process via the AddTransactionCallbackID message.
3843 Perform callbacks listed in the incoming transaction's vector of callback IDs.
3845 * WebProcess/WebPage/DrawingArea.h:
3846 (WebKit::DrawingArea::addTransactionCallbackID):
3847 * WebProcess/WebPage/DrawingArea.messages.in:
3848 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3849 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3850 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3851 (WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
3852 Keep track of the pending callback IDs on the drawing area, and move them into the transaction.
3853 We schedule a flush when installing a transaction callback on the premise that
3854 sometimes the action (goToBackForwardListItem in the swipe case) might have already occurred
3855 and been committed by the time the Web process receives AddTransactionCallbackID, so we need
3856 to cause another commit to send the callbacks across. If said commit is still pending, this is a no-op.
3858 * UIProcess/ios/ViewGestureControllerIOS.mm:
3859 (allViewGestureControllers):
3860 (WebKit::ViewGestureController::ViewGestureController):
3861 (WebKit::ViewGestureController::~ViewGestureController):
3862 (WebKit::ViewGestureController::endSwipeGesture):
3863 (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
3864 (WebKit::ViewGestureController::setRenderTreeSize):
3865 * UIProcess/mac/ViewGestureController.h:
3866 Keep a side-map of page IDs to ViewGestureControllers, so that we can safely get back to
3867 our ViewGestureController from the callback.
3869 When the callback fires, if it succeeded, set m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit,
3870 so that the commit (which is about to occur immediately after the callback returns) which calls
3871 setRenderTreeSize will (perhaps) remove the snapshot.
3873 If it failed, we remove the snapshot immediately, as this usually happens if the Web process crashed.
3875 2014-07-03 Brady Eidson <beidson@apple.com>
3877 Followup to "rects sent to ServicesOverlayController are wrong"
3878 https://bugs.webkit.org/show_bug.cgi?id=134568
3880 Rubberstamped by Tim Horton.
3882 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3883 (WebKit::ServicesOverlayController::drawSelectionHighlight): Don’t check to see if the
3884 proposed rect intersects the dirty rect. We always need to include all rects that form
3885 the selection when creating the DDHighlight.
3887 2014-07-03 Tim Horton <timothy_horton@apple.com>
3889 [WK2] RemoteLayerTreeDrawingAreaProxy re-checks a preference every commit for no reason
3890 https://bugs.webkit.org/show_bug.cgi?id=134586
3892 Reviewed by Benjamin Poulain.
3894 * UIProcess/DrawingAreaProxy.h:
3895 (WebKit::DrawingAreaProxy::setShouldShowDebugIndicator):
3896 (WebKit::DrawingAreaProxy::showDebugIndicator): Deleted.
3897 (WebKit::DrawingAreaProxy::isShowingDebugIndicator): Remove this, nobody is using it.
3898 * UIProcess/WebPageProxy.cpp:
3899 (WebKit::WebPageProxy::preferencesDidChange):
3900 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3901 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3902 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
3903 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3904 (WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator):
3905 (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator): Deleted.
3906 Check the debug indicator pref at construction time, and update the state when it changes.
3907 Checking it every commit was surprisingly expensive.
3909 2014-07-03 Antti Koivisto <antti@apple.com>
3911 Ensure frame creation messages get through to UI process
3912 https://bugs.webkit.org/show_bug.cgi?id=134591
3913 <rdar://problem/16918218>
3915 Reviewed by Anders Carlsson.
3917 If we are middle of handling a synchronous message from UI process a frame creation message back gets delayed.
3918 The subsequent synchronous DecidePolicyForNavigationAction message expects that the frame creation
3919 message has arrived first and fails.
3921 * WebProcess/WebPage/WebFrame.cpp:
3922 (WebKit::WebFrame::createWithCoreMainFrame):
3923 (WebKit::WebFrame::createSubframe):
3925 Send messages with DispatchMessageEvenWhenWaitingForSyncReply so they always go through in order.
3927 2014-07-03 Anders Carlsson <andersca@apple.com>
3929 Get rid of DecoderAdapter and EncoderAdapter
3930 https://bugs.webkit.org/show_bug.cgi?id=134598
3932 Reviewed by Andreas Kling.
3935 * WebKit2.xcodeproj/project.pbxproj:
3936 * WebProcess/WebPage/DecoderAdapter.cpp: Removed.
3937 * WebProcess/WebPage/DecoderAdapter.h: Removed.
3938 * WebProcess/WebPage/EncoderAdapter.cpp: Removed.
3939 * WebProcess/WebPage/EncoderAdapter.h: Removed.
3940 * WebProcess/WebPage/WebPage.cpp:
3942 2014-07-02 Anders Carlsson <andersca@apple.com>
3944 Stop using EncoderAdapter/DecoderAdapter for FormData
3945 https://bugs.webkit.org/show_bug.cgi?id=134571
3947 Reviewed by Andreas Kling.
3949 * Shared/Network/NetworkResourceLoadParameters.cpp:
3950 (WebKit::NetworkResourceLoadParameters::encode):
3951 (WebKit::NetworkResourceLoadParameters::decode):
3953 2014-07-03 Brady Eidson <beidson@apple.com>
3955 Selection rects sent to ServicesOverlayController are wrong.
3956 <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
3958 Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
3960 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3961 (WebKit::WebEditorClient::selectionRectsDidChange): Also pass the GapRects to the ServicesOverlayController.
3962 * WebProcess/WebCoreSupport/WebEditorClient.h:
3964 * WebProcess/WebPage/ServicesOverlayController.h:
3965 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3966 (WebKit::expandForGap):
3967 (WebKit::compactRectsWithGapRects): Combine 3+ rects down to exactly 3 rects, then expand them based on GapRects.
3968 (WebKit::ServicesOverlayController::selectionRectsDidChange): Call compactRectsWithGapRects, then reverse the list.
3969 (WebKit::ServicesOverlayController::drawSelectionHighlight): Tell data detectors to flip this.
3970 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Tell data detectors to flip this.
3971 (WebKit::ServicesOverlayController::drawCurrentHighlight): No need to flip this anymore.
3973 2014-07-03 Brady Eidson <beidson@apple.com>
3975 Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
3976 <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
3978 Reviewed by Eric Carlson.
3980 * UIProcess/WebContext.cpp:
3981 (WebKit::WebContext::~WebContext): Instead of directly deref’ing the WebIconDatabase, ask it to
3982 deref itself when appropriate.
3984 * UIProcess/WebIconDatabase.cpp:
3985 (WebKit::WebIconDatabase::WebIconDatabase):
3986 (WebKit::WebIconDatabase::didClose): If this WebIconDatabase is supposed to deref itself when
3987 appropriate, do so now.
3988 (WebKit::WebIconDatabase::derefWhenAppropriate): If the WebCore::IconDatabase is still open then
3990 * UIProcess/WebIconDatabase.h:
3992 2014-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
3994 REGRESSION(r170676): [GTK] UI process crashes when the Web Process crashes
3995 https://bugs.webkit.org/show_bug.cgi?id=134541
3997 Reviewed by Gyuyoung Kim.
3999 It happens when attaching a new web process, because it tries to
4000 encode a null SessionState.
4002 * UIProcess/LegacySessionStateCodingNone.cpp:
4003 (WebKit::encodeLegacySessionState): Return an empty API::Data
4004 object instead of nullptr.
4005 (WebKit::encodeLegacySessionHistoryEntryData): Ditto.
4007 2014-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
4009 REGRESSION(r170743): [GTK] [EFL] Build broken.
4010 https://bugs.webkit.org/show_bug.cgi?id=134585
4012 Reviewed by Philippe Normand.
4014 Add ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) guards where needed.
4016 * WebProcess/Plugins/PluginView.cpp:
4017 (WebKit::PluginView::initializePlugin):
4018 * WebProcess/WebPage/WebPage.cpp:
4019 (WebKit::WebPage::createPlugin):
4021 2014-07-02 Benjamin Poulain <benjamin@webkit.org>
4023 [iOS][WK2] Make is sa