1 2014-08-12 Tim Horton <timothy_horton@apple.com>
3 Add a fade transition to services highlights
4 https://bugs.webkit.org/show_bug.cgi?id=135829
5 <rdar://problem/17935736>
7 Reviewed by Enrica Casucci.
9 Add a smooth fade to highlight installation and uninstallation.
10 To do so, we make each highlight paint into its own small layer.
12 * WebProcess/WebPage/PageOverlay.cpp:
13 (WebKit::PageOverlay::layer):
14 * WebProcess/WebPage/PageOverlay.h:
15 * WebProcess/WebPage/PageOverlayController.cpp:
16 (WebKit::PageOverlayController::layerForOverlay):
17 * WebProcess/WebPage/PageOverlayController.h:
18 Expose the GraphicsLayer on PageOverlay.
20 * WebProcess/WebPage/ServicesOverlayController.h:
21 (WebKit::ServicesOverlayController::Highlight::layer):
22 (WebKit::ServicesOverlayController::activeHighlight):
23 (WebKit::ServicesOverlayController::webPage):
24 (WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
26 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
27 (WebKit::ServicesOverlayController::Highlight::createForSelection):
28 (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
29 (WebKit::ServicesOverlayController::Highlight::Highlight):
30 Highlights now own a GraphicsLayer, which are later installed
31 as sublayers of the ServicesOverlayController's PageOverlay layer.
32 These layers are sized and positioned according to the DDHighlight's bounds.
34 (WebKit::ServicesOverlayController::Highlight::~Highlight):
35 (WebKit::ServicesOverlayController::Highlight::invalidate):
36 ServicesOverlayController will invalidate any remaining highlights
37 when it is torn down, so they can clear their backpointers.
39 (WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
40 Forward flush notifications to the DrawingArea.
42 (WebKit::ServicesOverlayController::Highlight::paintContents):
43 Paint the DDHighlight into the layer. Translation is done by the layer position,
44 so we zero the bounds origin when painting.
46 (WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
47 Forward the deviceScaleFactor so that things are painted at the right scale.
49 (WebKit::ServicesOverlayController::Highlight::fadeIn):
50 (WebKit::ServicesOverlayController::Highlight::fadeOut):
51 Apply a fade animation to the layer.
53 (WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
54 When the fade completes, unparent the layer, unless it has become active again.
56 (WebKit::ServicesOverlayController::ServicesOverlayController):
57 (WebKit::ServicesOverlayController::~ServicesOverlayController):
58 Invalidate all highlights, so they can clear their backpointers.
60 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
61 Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
62 instead of always the active highlight.
64 (WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
66 (WebKit::ServicesOverlayController::drawRect):
67 drawRect is no longer called and will no longer do anything; all of the
68 painting is done in sublayers.
70 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
71 Ensure that phone number Highlights stay stable even while the selection
72 changes, by comparing the underlying Ranges and keeping around old Highlights
73 that match the new ones. This enables us to e.g. fade in while changing
74 the selection within a phone number.
76 (WebKit::ServicesOverlayController::buildSelectionHighlight):
77 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
78 (WebKit::ServicesOverlayController::createOverlayIfNeeded):
79 Don't call setNeedsDisplay; the overlay doesn't have backing store.
80 Instead, call determineActiveHighlight, which will install/uninstall
81 highlights as necessary.
83 (WebKit::ServicesOverlayController::determineActiveHighlight):
84 Apply fade in/fade out to the overlays.
85 Keep track of which highlight we're going to activate, until the hysteresis
86 delay is up, then actually make it active/parent it/fade it in.
87 We now will have no active highlight between the fade out of the previous one
88 and the fade in of the new one (during the hysteresis delay).
90 (WebKit::ServicesOverlayController::mouseEvent):
91 The overlay now will not become active until the delay is up, so we don't
92 need to check it again here.
94 (WebKit::ServicesOverlayController::handleClick):
95 (WebKit::ServicesOverlayController::didCreateHighlight):
96 (WebKit::ServicesOverlayController::willDestroyHighlight):
97 (WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
98 (WebKit::ServicesOverlayController::drawHighlight): Deleted.
100 2014-08-11 Andy Estes <aestes@apple.com>
102 [iOS] Get rid of iOS.xcconfig
103 https://bugs.webkit.org/show_bug.cgi?id=135809
105 Reviewed by Joseph Pecoraro.
107 All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
109 * Configurations/Base.xcconfig:
110 * Configurations/iOS.xcconfig: Removed.
111 * WebKit2.xcodeproj/project.pbxproj:
113 2014-08-12 Grzegorz Czajkowski <g.czajkowski@samsung.com>
115 [EFL] Rename ewk_private.h to EwkDebug.h
116 https://bugs.webkit.org/show_bug.cgi?id=135797
118 Reviewed by Gyuyoung Kim.
120 ewk_private.h contains only debug macros alllowing
123 * UIProcess/API/efl/EwkView.cpp:
124 * UIProcess/API/efl/ewk_main.cpp:
125 * UIProcess/efl/EwkDebug.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
126 * UIProcess/efl/ViewClientEfl.cpp:
128 2014-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
130 [GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist
131 https://bugs.webkit.org/show_bug.cgi?id=135834
133 Reviewed by Philippe Normand.
135 Make sure the user cache directory exists. If creating the
136 directory fails for whatever reason, do not try to save the cache
139 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
140 (WebKit::PluginInfoCache::PluginInfoCache):
141 (WebKit::PluginInfoCache::updatePluginInfo):
143 2014-08-12 Alexey Proskuryakov <ap@apple.com>
145 [Mac] Allow reading CoreGraphics debugging preferences
146 https://bugs.webkit.org/show_bug.cgi?id=135821
147 <rdar://problem/11219259>
149 Reviewed by Darin Adler.
151 * WebProcess/com.apple.WebProcess.sb.in:
153 2014-08-11 Grzegorz Czajkowski <g.czajkowski@samsung.com>
155 [EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
156 https://bugs.webkit.org/show_bug.cgi?id=135606
158 Reviewed by Gyuyoung Kim.
160 Similarly to EFL modules (eina, evas etc.), application using EWebKit
161 has to initialize it using ewk_init().
163 Do not allow the client to create ewk_view if ewk_init has not been called.
164 Add an appropriate logs warning the client about wrong APIs usage.
166 * UIProcess/API/efl/ewk_main.cpp: Add EwkMain class to control ewk lifetime.
167 (WebKit::EwkMain::EwkMain):
168 (WebKit::EwkMain::shared):
169 (WebKit::EwkMain::~EwkMain): Add logs when the client forgot to destroy EWebkit.
170 (WebKit::EwkMain::initialize):
171 (WebKit::EwkMain::finalize):
172 (WebKit::EwkMain::shutdownInitializedEFLModules):
175 * UIProcess/API/efl/ewk_main_private.h: Added.
176 (WebKit::EwkMain::isInitialized):
177 (WebKit::EwkMain::logDomainId):
178 * UIProcess/API/efl/ewk_private.h:
179 * UIProcess/API/efl/ewk_view.cpp:
181 Prevent the client from creating ewk_view when ewk_init() has not been called.
183 2014-08-11 Enrica Casucci <enrica@apple.com>
185 Improve look and feel of combined service menu..
186 https://bugs.webkit.org/show_bug.cgi?id=135824
187 <rdar://problem/17936880>
189 Reviewed by Tim Horton.
191 When showing the combined menu, list the phone numbers first,
192 grouped under a common header, followed by the entries relative
195 * Platform/mac/MenuUtilities.h:
196 * Platform/mac/MenuUtilities.mm:
197 (WebKit::menuItemTitleForTelephoneNumberGroup):
198 (WebKit::menuItemForTelephoneNumber):
199 * UIProcess/mac/WebContextMenuProxyMac.mm:
200 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
202 2014-08-11 Joseph Pecoraro <pecoraro@apple.com>
204 Add Private WKPreferences API for developer extras (show inspector)
205 https://bugs.webkit.org/show_bug.cgi?id=135811
207 Reviewed by Timothy Hatcher.
209 * UIProcess/API/Cocoa/WKPreferences.mm:
210 (-[WKPreferences _developerExtrasEnabled]):
211 (-[WKPreferences _setDeveloperExtrasEnabled:]):
212 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
214 2014-08-08 Enrica Casucci <enrica@apple.com>
216 [Services with UI] Action menu arrow hit testing is sometimes wrong.
217 https://bugs.webkit.org/show_bug.cgi?id=135776
218 <rdar://problem/17837670>
220 Reviewed by Brady Eidson.
222 There was a problem in the algorithm that stitches together the selection rectangles
223 to be given to Data Detectors API.
224 This change adds a new function that stiches together all the rects contributing to the
225 first line, all the rects contributing to the last line and all the ones in the middle.
226 This way we can have a maximum of 3 non overlapping rectangles.
228 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
229 (WebKit::stitchRects):
230 (WebKit::compactRectsWithGapRects):
232 2014-08-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
234 Unreviewed, EFL build fix since r172385.
238 2014-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
240 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.
242 * gtk/NEWS: Add release notes for 2.5.2.
244 2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
246 [GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
247 https://bugs.webkit.org/show_bug.cgi?id=135760
249 Reviewed by Philippe Normand.
251 The problem is that the threading initialization is failing
252 because there are two copies of WTF, one in libjavascriptcoregtk
253 and the other in libwebkit2gtk. When WebKit2 is initialized in the
254 UI process, JSC::initializeThreading() is called first and then
255 WTF::initializeMainThread(). The former is calling
256 ThreadIdentifierData::initializeOnce() initializing the
257 ThreadIdentifierData::m_key symbol in libjavascriptcoregtk, while
258 the latter is using the ThreadIdentifierData API from libwebkit2gtk
259 that hasn't been initialized.
261 * CMakeLists.txt: Do not add WTF to the list of WebKit2 libraries,
262 WebKit2 already depends on JavaScriptCore that already links to WTF.
264 2014-08-10 Tim Horton <timothy_horton@apple.com>
266 Yelp phone number highlights often disappear
267 https://bugs.webkit.org/show_bug.cgi?id=135789
268 <rdar://problem/17971057>
270 Reviewed by Brady Eidson.
272 Since selectedTelephoneNumberRangesChanged doesn't provide an associated
273 Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
274 would overwrite ServicesOverlayController's cached (and potentially active)
275 telephone number highlights.
277 This happens a lot on Yelp, because they have many subframes which are
278 doing layout on a regular basis.
280 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
281 (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
282 * WebProcess/WebCoreSupport/WebEditorClient.h:
283 Adjust to the new (lack of) arguments.
285 * WebProcess/WebPage/ServicesOverlayController.h:
286 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
287 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
288 Adjust logging; we can revisit it later.
290 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
291 When building phone number highlights, walk the Frame tree and retrieve
292 them from all of the Editors.
294 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
295 (WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
296 (WebKit::ServicesOverlayController::determineActiveHighlight):
297 (WebKit::ServicesOverlayController::handleClick):
298 Retrieve the detected telephone number ranges from the focused frame
299 when combining telephone numbers with selection services.
300 This ensures that we don't show combined phone number highlights from other frames.
302 2014-08-10 Tim Horton <timothy_horton@apple.com>
304 Refactor ServiceOverlayController in preparation for fading between highlights
305 https://bugs.webkit.org/show_bug.cgi?id=135787
306 <rdar://problem/17935736>
308 Reviewed by Brady Eidson.
310 Rework ServicesOverlayController so that we always keep a set of generic
311 "potential highlights", which are refcounted Highlight objects and
312 wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
313 Range (only used in the case of TelephoneNumber), and potentially more
314 things in the future (like, say, fade state!).
316 We eagerly update the list of potential highlights when the selection or set
317 of detected telephone numbers changes, and use this information to install
318 or uninstall the page overlay as needed.
320 When we need to recompute the "active" highlight from this set (for example,
321 we need to handle a mouse event or paint the highlight), we look through
322 the set of potential highlights and decide. This moves the "active" highlight
323 decision logic into one small and confined place.
325 * WebProcess/WebPage/ServicesOverlayController.h:
326 (WebKit::ServicesOverlayController::Highlight):
327 Add the new aforementioned refcounted Highlight class.
328 Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
329 Make m_webPage a reference.
330 The rest is just added/removed/adjusted functions for the refactoring.
332 (WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
333 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
334 (WebKit::ServicesOverlayController::Highlight::createForSelection):
335 (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
336 Create Highlights for the two different highlight types.
338 (WebKit::ServicesOverlayController::ServicesOverlayController):
339 (WebKit::ServicesOverlayController::willMoveToWebPage):
340 Our WebPage pointer is always valid because it owns us; don't clear it.
341 We need to keep it around so that we can uninstall the overlay and
342 install it again later, anyway.
344 (WebKit::ServicesOverlayController::selectionRectsDidChange):
345 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
346 When selection rects or detected telephone numbers change, rebuild potential highlights.
347 This will have the side-effect of installing the overlay if needed.
349 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
350 Make this function take a Highlight instead of a DDHighlightRef.
352 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
353 Make this function take a Highlight instead of a DDHighlightRef.
355 (WebKit::ServicesOverlayController::drawHighlight):
356 Make this function take a Highlight instead of a DDHighlightRef.
357 There's no reason to do the translation separately from the layer blit,
358 also allowing us to avoid the StateSaver.
360 (WebKit::ServicesOverlayController::drawRect):
361 drawRect now always paints the active highlight, instead of duplicating
362 logic about which highlight should be active.
363 Also, it will update the active highlight before painting.
364 We no longer need to re-determine whether the active highlight's phone
365 number range is still a valid phone number range, because we rebuild
366 the potential highlights whenever the set of phone number ranges changes.
368 (WebKit::ServicesOverlayController::clearActiveHighlight):
369 Mostly an adoption of new names.
371 (WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
372 Run through the list of potential highlights and remove any of the given type.
373 The two highlight building functions use this helper to clear the old ones before building.
375 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
376 (WebKit::ServicesOverlayController::buildSelectionHighlight):
377 Rebuild the list of potential highlights, replacing all highlights of
378 the given type with new ones.
380 (WebKit::ServicesOverlayController::hasRelevantSelectionServices):
381 Factor out the code that decides whether our current selection is
382 viable for servicing based on whether we have plain-text and/or rich-text services.
384 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
385 When rebuilding potential highlights, if we have no potential highlights at all,
386 uninstall the page overlay; we don't need mouse tracking and don't need to
387 paint anything. This improves memory use and compositing performance significantly,
388 where previously we were leaving the overlay up forever after creating it.
390 If we have either detected telephone numbers or relevant selection services,
391 create and install the overlay if it doesn't already exist.
393 (WebKit::ServicesOverlayController::createOverlayIfNeeded):
394 This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
395 It doesn't make sense to fade on install/uninstall (which happens even before hover)
396 but not on changing the active highlight; fading will be re-addressed in the next patch.
398 (WebKit::ServicesOverlayController::highlightsAreEquivalent):
399 Determine whether two highlights are equivalent. While we may have
400 created a new Highlight at rebuild time, if two telephone number
401 highlights have equivalent ranges, there's no need to 'transition' to the new one.
403 (WebKit::ServicesOverlayController::determineActiveHighlight):
404 Run through the list of services, and try to find one that is hovered.
405 We prefer telephone number highlights to selection highlights, and
406 we will never make a selection highlight active if it is both
407 not serviceable and there are no telephone numbers to show in the combined menu.
408 This is the centralized location for determination of which highlight
409 should be considered active. If the active highlight changed, update
410 the time since last change and cancel the mouse-down tracking.
412 (WebKit::ServicesOverlayController::mouseEvent):
413 Adjust some comments to be more explanatory.
414 A bunch of code moved out of here and into determineActiveHighlight.
416 (WebKit::ServicesOverlayController::handleClick):
417 Adjust to take a reference and use Highlight instead of DDHighlightRef.
419 2014-08-10 Timothy Hatcher <timothy@apple.com>
421 Web Inspector: new glyphs are visible on OS X 10.9 builds
422 https://bugs.webkit.org/show_bug.cgi?id=135743
424 Reviewed by Joseph Pecoraro.
426 * UIProcess/mac/WebInspectorProxyMac.mm:
427 (WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.
429 2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
431 [GTK] REGRESSION(r166239): The ld version script is not being used
432 https://bugs.webkit.org/show_bug.cgi?id=135694
434 Reviewed by Martin Robinson.
436 * CMakeLists.txt: Add VERSION_SCRIPT to WebKit2 link flags if present.
438 2014-08-09 Tim Horton <timothy_horton@apple.com>
440 REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
441 https://bugs.webkit.org/show_bug.cgi?id=135785
442 <rdar://problem/17969843>
444 Reviewed by Brady Eidson.
446 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
447 (WebKit::ServicesOverlayController::drawSelectionHighlight):
448 We can't early return in the rich-content-but-no-rich-services case
449 if we have telephone numbers in the selection, because we want to offer
450 them up in the combined menu.
452 * UIProcess/mac/WebContextMenuProxyMac.mm:
453 If we end up with no menu, because there were no services available,
454 make a fresh one that we can fill with combined telephone number items.
456 2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
458 [EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
459 https://bugs.webkit.org/show_bug.cgi?id=135700
461 Reviewed by Gyuyoung Kim.
464 Glib since 2.36 itself initializes g_type_init.
466 * WebProcess/efl/WebProcessMainEfl.cpp:
468 2014-08-08 Tim Horton <timothy_horton@apple.com>
470 Build fix for 32-bit.
472 * UIProcess/mac/ServicesController.mm:
473 (WebKit::ServicesController::ServicesController):
474 Don't dynamically refresh services in 32-bit apps. It's not possible
475 to write a 32-bit app with the Modern API, so this doesn't matter.
477 2014-08-08 Tim Horton <timothy_horton@apple.com>
479 [mac] Dynamically update serviceability when the set of services changes
480 https://bugs.webkit.org/show_bug.cgi?id=135738
481 <rdar://problem/17533459>
483 Reviewed by Brady Eidson.
485 * UIProcess/WebContext.cpp:
486 (WebKit::WebContext::createNewWebProcess):
487 Adopt the new universal refreshExistingServices.
489 (WebKit::WebContext::refreshExistingServices): Deleted.
490 * UIProcess/WebContext.h:
491 Remove WebContext::refreshExistingServices; there's no need for it.
493 * UIProcess/mac/ServicesController.h:
494 * UIProcess/mac/ServicesController.mm:
495 Fix the build with only public headers by including NSSharingService.h itself.
496 Place the NSSharingServicePicker (Details) category outside the #ifdef.
497 Forward-declare and possibly import NSExtension SPI.
499 (WebKit::ServicesController::ServicesController):
500 Register a callback to be notified whenever the set of services changes.
501 When this occurs, call refreshExistingServices. We let refreshExistingServices
502 coalesce updates because these notifications can come in small batches.
504 (WebKit::ServicesController::refreshExistingServices):
505 Dispatch changes in service availability to all processes in all contexts.
507 * UIProcess/mac/WebContextMenuProxyMac.mm:
508 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
509 Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
510 instead of the now-removed WebContext:: variant. We can't remove this
511 yet because our services state can still be stale because NSServiceSharingPicker
512 can still sometimes lie about the current service state immediately after a change occurs;
513 once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
515 2014-08-08 Timothy Horton <timothy_horton@apple.com>
517 Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
518 https://bugs.webkit.org/show_bug.cgi?id=135765
519 <rdar://problem/17962180>
521 Reviewed by Brady Eidson.
523 * UIProcess/mac/WebContextMenuProxyMac.mm:
524 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
525 The menu is cached between clients, but we make adjustments to it.
526 We should copy it before adjusting.
528 2014-08-08 Timothy Horton <timothy_horton@apple.com>
530 Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
531 https://bugs.webkit.org/show_bug.cgi?id=135755
532 <rdar://problem/17907752>
534 Reviewed by Brady Eidson.
536 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
537 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
538 (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
539 DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
540 location of the button based on the visible rect, trying to keep the button visible.
542 We're handing it the wrong visible rect, though, not taking scrolling into account.
544 This leads to pages that scroll horizontally showing the button on the left
545 even if there's space for it on the right, or sometimes not showing it at all.
547 Instead, provide the actual main FrameView visible rect; the same coordinate
548 space that the highlight rects are provided in.
550 2014-08-08 Timothy Horton <timothy_horton@apple.com>
552 Additional items added to selection services menus are misaligned
553 https://bugs.webkit.org/show_bug.cgi?id=135747
554 <rdar://problem/17933167>
556 Reviewed by Brady Eidson.
558 * UIProcess/mac/WebContextMenuProxyMac.mm:
559 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
560 Use NSSharingServicePickerStyleRollover for the rollover image services menu;
561 use NSSharingServicePickerStyleTextSelection for the selection services menu.
563 Set NSMenu's showsStateColumn to YES for selection services menus, so that
564 other items added to the menu line up correctly.
566 Remove an unncessary .get()
568 2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
570 [EFL] Remove unnecessary ewk_private.h includes
571 https://bugs.webkit.org/show_bug.cgi?id=135753
573 Reviewed by Gyuyoung Kim.
575 Neither the below file uses the functionality from ewk_private.h.
577 * UIProcess/API/efl/ewk_context.cpp:
578 * UIProcess/API/efl/ewk_context_menu_item.cpp:
579 * UIProcess/API/efl/ewk_cookie_manager.cpp:
580 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
581 * UIProcess/API/efl/ewk_popup_menu_item.cpp:
582 * UIProcess/API/efl/ewk_view.cpp:
584 2014-08-08 Carlos Garcia Campos <cgarcia@igalia.com>
586 [GTK] Do not use GtkWindow:resize-grip-visible with recent GTK+ versions
587 https://bugs.webkit.org/show_bug.cgi?id=135699
589 Reviewed by Philippe Normand.
591 Resize grips support have been removed from GTK+ since 3.13.4, the
592 API has been deprecated and does nothing.
594 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
595 (webkitWebViewBaseSetToplevelOnScreenWindow):
596 (resizeWebKitWebViewBaseFromAllocation):
598 2014-08-07 Tim Horton <timothy_horton@apple.com>
600 [Services with UI] Action menu does not appear if selection includes both text and an image
601 https://bugs.webkit.org/show_bug.cgi?id=135731
602 <rdar://problem/17837491>
604 Reviewed by Dean Jackson.
606 * UIProcess/WebContext.cpp:
607 (WebKit::WebContext::createNewWebProcess):
608 Initialize hasRichContentServices with the cached value.
610 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
612 Get rid of SCRIPTED_SPEECH
613 https://bugs.webkit.org/show_bug.cgi?id=135729
615 Reviewed by Brent Fulgham.
617 * Configurations/FeatureDefines.xcconfig:
619 2014-08-07 Timothy Horton <timothy_horton@apple.com>
621 setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
622 https://bugs.webkit.org/show_bug.cgi?id=135633
623 <rdar://problem/17926507>
625 Reviewed by Sam Weinig.
627 * UIProcess/PageClient.h:
628 * UIProcess/WebPageProxy.cpp:
629 (WebKit::WebPageProxy::didChangeBackForwardList):
630 * UIProcess/ios/PageClientImplIOS.h:
631 * UIProcess/ios/PageClientImplIOS.mm:
632 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
633 * UIProcess/mac/PageClientImpl.h:
634 * UIProcess/mac/PageClientImpl.mm:
635 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
636 WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
637 *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
638 didChangeBackForwardList, it won't be respected.
640 Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
641 views in WebKit and leave that totally up to the client.
643 2014-08-07 Enrica Casucci <enrica@apple.com>
645 [Services with UI] Action menu does not appear if selection includes both text and an image.
646 https://bugs.webkit.org/show_bug.cgi?id=135731
647 <rdar://problem/17837491>
649 Reviewed by Brady Eidson.
651 Adding a new setting to ServicesController to communicate to the WebProcess if
652 there are services installed that can handle a combination of text and images.
653 This way ServicesOverlayController can decide if it appropriate to show the hightlight
654 based on the type of selection (text only or non text only). This information is retrieved
655 when the selection rects are collected by SelectionGatherer and used by
656 SelectionGatherer::Notifier to communicate the selection change.
658 * Shared/WebProcessCreationParameters.cpp:
659 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
660 * Shared/WebProcessCreationParameters.h:
661 * UIProcess/mac/ServicesController.h:
662 (WebKit::ServicesController::hasRichContentServices):
663 * UIProcess/mac/ServicesController.mm:
664 (WebKit::ServicesController::ServicesController):
665 (WebKit::ServicesController::refreshExistingServices):
666 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
667 (WebKit::WebEditorClient::selectionRectsDidChange):
668 * WebProcess/WebCoreSupport/WebEditorClient.h:
669 * WebProcess/WebPage/ServicesOverlayController.h:
670 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
671 (WebKit::ServicesOverlayController::ServicesOverlayController):
672 (WebKit::ServicesOverlayController::selectionRectsDidChange):
673 (WebKit::ServicesOverlayController::drawSelectionHighlight):
674 * WebProcess/WebProcess.cpp:
675 (WebKit::WebProcess::WebProcess):
676 (WebKit::WebProcess::initializeWebProcess):
677 (WebKit::WebProcess::setEnabledServices):
678 * WebProcess/WebProcess.h:
679 (WebKit::WebProcess::hasRichContentServices):
680 * WebProcess/WebProcess.messages.in:
682 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
684 [EFL] Fix several warnings of doxygen
685 https://bugs.webkit.org/show_bug.cgi?id=135643
687 Reviewed by Gyuyoung Kim.
689 * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
690 * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
691 * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
692 * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
693 * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
694 * UIProcess/API/efl/ewk_text_checker.h: Ditto.
695 * UIProcess/API/efl/ewk_view.h:
696 - Used escape string for the tag.
697 - Used @code, @endcode for media query example.
699 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
701 Get rid of INPUT_SPEECH
702 https://bugs.webkit.org/show_bug.cgi?id=135672
704 Reviewed by Andreas Kling.
706 * Configurations/FeatureDefines.xcconfig:
709 2014-08-07 Timothy Hatcher <timothy@apple.com>
711 Web Inspector: Update glyphs to be more like Xcode 6
712 https://bugs.webkit.org/show_bug.cgi?id=135705
714 Reviewed by Joseph Pecoraro.
716 * Resources/DockBottom.pdf: Added.
717 * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
718 * Resources/DockRight.pdf: Added.
719 * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
720 * UIProcess/mac/WebInspectorProxyMac.mm:
721 (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
722 * WebKit2.xcodeproj/project.pbxproj: Added new images.
724 2014-08-07 Oliver Hunt <oliver@apple.com>
726 WebContent needs access to HSTS database due to some networking still being performed in process
727 https://bugs.webkit.org/show_bug.cgi?id=135711
730 Reviewed by Alexey Proskuryakov.
732 Simple patch in the same theme as the equivalent network process
733 extension. Provide an extension that covers the WebContent specific
734 HSTS file and consume it on launch.
736 * Shared/WebProcessCreationParameters.cpp:
737 (WebKit::WebProcessCreationParameters::encode):
738 (WebKit::WebProcessCreationParameters::decode):
739 * Shared/WebProcessCreationParameters.h:
740 * UIProcess/WebContext.cpp:
741 (WebKit::WebContext::createNewWebProcess):
742 * UIProcess/WebContext.h:
743 * UIProcess/mac/WebContextMac.mm:
744 (WebKit::WebContext::webContentHSTSDatabasePath):
745 * WebProcess/cocoa/WebProcessCocoa.mm:
746 (WebKit::WebProcess::platformInitializeWebProcess):
748 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
750 Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
751 https://bugs.webkit.org/show_bug.cgi?id=135634
752 <rdar://problem/17388461>
754 Reviewed by Brady Eidson.
756 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
757 (WebKit::WebBackForwardListProxy::removeItem):
758 Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
759 the back/forward list to ensure the page URL is released from IconDatabase.
761 2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
763 [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
764 https://bugs.webkit.org/show_bug.cgi?id=135695
766 Reviewed by Gustavo Noronha Silva.
768 WebKitNavigationAction was introduced to extend WebKitWebView::create signal
769 and its API is mostly duplicated in WebKitNavigationPolicyDecision.
770 Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
771 deprecated all the duplicated API in favor of a single property navigation-action.
773 * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
774 WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
775 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
776 (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
777 Free the WebKitNavigationAction.
778 (webkitNavigationPolicyDecisionGetProperty): Add getter for
779 navigation-action and use WebKitNavigationAction in all other getters.
780 (webkit_navigation_policy_decision_class_init): Add navigation-action
781 property and deprecated all others except frame-name.
782 (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
783 (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
784 (webkit_navigation_policy_decision_get_mouse_button): Ditto.
785 (webkit_navigation_policy_decision_get_modifiers): Ditto.
786 (webkit_navigation_policy_decision_get_request): Ditto.
787 (webkitNavigationPolicyDecisionCreate):
788 (webkitNewWindowPolicyDecisionCreate):
789 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
790 * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
791 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
792 PolicyClient class so that we receive a NavigationActionData in
794 (attachPolicyClientToView):
795 (toWebKitNavigationType): Deleted.
796 (decidePolicyForNavigationAction): Deleted.
797 (decidePolicyForNewWindowAction): Deleted.
798 (decidePolicyForResponse): Deleted.
799 * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
800 (webkitResponsePolicyDecisionCreate):
801 * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
802 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
804 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
806 2014-08-06 Antti Koivisto <antti@apple.com>
808 Move Soup specific code out of WebCoreArgumentCoders.cpp
809 https://bugs.webkit.org/show_bug.cgi?id=135665
811 Reviewed by Anders Carlsson.
813 * Shared/WebCoreArgumentCoders.cpp:
814 (IPC::ArgumentCoder<ResourceRequest>::encode):
815 (IPC::ArgumentCoder<ResourceRequest>::decode):
816 (IPC::ArgumentCoder<ResourceError>::encode):
817 (IPC::ArgumentCoder<ResourceError>::decode):
818 * Shared/WebCoreArgumentCoders.h:
820 Soup is the only client for this code. Move it to *Soup.cpp
822 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
823 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
824 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
825 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
826 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
828 2014-08-06 Tim Horton <timothy_horton@apple.com>
830 Services overlay flashes a lot; should have some hysteresis before showing overlay
831 https://bugs.webkit.org/show_bug.cgi?id=135683
832 <rdar://problem/16878039>
834 Reviewed by Simon Fraser.
836 Don't show the highlight until it's been 200ms since the last change
837 in selection or change in which highlight is hovered, whichever was more recent.
839 * WebProcess/WebPage/ServicesOverlayController.h:
840 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
841 (WebKit::ServicesOverlayController::ServicesOverlayController):
842 (WebKit::ServicesOverlayController::selectionRectsDidChange):
843 Keep track of when the selection last changed.
845 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
846 Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
848 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
849 Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
851 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
852 Return the amount of time until the highlight should be shown; this is
853 the maximum of (the difference between the last selection change and the timeout)
854 and (the difference between the last change in which highlight is hovered and the timeout).
856 Telephone number highlights are shown immediately, because they are already stable
857 by virtue of being expanded to include the entire telephone number.
859 (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
860 (WebKit::ServicesOverlayController::drawHighlight):
861 If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
862 schedule a timer to repaint us around when we will hit the timeouts.
864 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
865 (WebKit::ServicesOverlayController::mouseEvent):
866 Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
868 2014-08-06 Simon Fraser <simon.fraser@apple.com>
870 [iOS WK2] www.france24.com doesn't always load the page, sections stay white
871 https://bugs.webkit.org/show_bug.cgi?id=135684
872 <rdar://problem/17931712>
874 Reviewed by Tim Horton.
876 It's possible for a UIScrollView for overflow to move between one scrolling tree node
877 and another. When this happens, we need to avoid unconditionally clearing the delegate
878 on the node that's being destroyed, because the new node will already have set the
879 UIScrollView delegate to its own delegate.
881 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
882 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
884 2014-08-06 Dean Jackson <dino@apple.com>
886 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
887 https://bugs.webkit.org/show_bug.cgi?id=135675
889 Reviewed by Sam Weinig.
891 * Configurations/FeatureDefines.xcconfig:
893 2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
895 IDB transactions never reset if the Web Process ends before cleaning up
896 https://bugs.webkit.org/show_bug.cgi?id=135218
898 Reviewed by Darin Adler and David Kilzer.
900 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
901 (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
902 (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
903 (WebKit::DatabaseToWebProcessConnection::didClose):
904 * DatabaseProcess/DatabaseToWebProcessConnection.h:
906 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
907 (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
908 Wait until the reset is complete before sending the sync reply.
909 (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
911 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
912 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
914 Keep track of all in progress transactions and make sure they’re cleaned up
915 whenever a connection to a WebProcess is broken:
916 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
917 (WebKit::UniqueIDBDatabase::unregisterConnection):
918 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
919 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
920 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
921 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
922 (WebKit::UniqueIDBDatabase::didResetTransaction):
923 (WebKit::UniqueIDBDatabase::resetAllTransactions):
924 (WebKit::UniqueIDBDatabase::finalizeRollback):
925 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
927 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
928 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
930 Add sync versions of reset/rollback:
931 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
932 (WebKit::WebIDBServerConnection::resetTransactionSync):
933 (WebKit::WebIDBServerConnection::rollbackTransactionSync):
934 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
936 2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
938 Implement parsing for CSS scroll snap points
939 https://bugs.webkit.org/show_bug.cgi?id=134301
941 Reviewed by Dean Jackson.
943 * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
945 2014-08-06 Andy Estes <aestes@apple.com>
947 [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
948 https://bugs.webkit.org/show_bug.cgi?id=135676
950 Reviewed by David Kilzer.
952 QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
953 from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
954 loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
955 Instead, give ownership of the QuickLookHandle to DocumentLoader.
957 * WebProcess/Network/WebResourceLoader.cpp:
958 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
959 (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
960 (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
961 (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
962 (WebKit::WebResourceLoader::didReceiveResource): Ditto.
963 * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
965 2014-08-06 Filip Pizlo <fpizlo@apple.com>
967 Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
969 2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
971 Refactor our current implementation of for-in
972 https://bugs.webkit.org/show_bug.cgi?id=134142
974 Reviewed by Filip Pizlo.
976 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
977 (WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
979 2014-08-06 Alexey Proskuryakov <ap@apple.com>
981 REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
982 https://bugs.webkit.org/show_bug.cgi?id=135667
983 <rdar://problem/17862892>
985 Reviewed by Anders Carlsson.
987 * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
988 hardcode it to ISO-8859-1 hoping that someone else will correct it later.
990 * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
991 macro expansion to compile.
993 * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
996 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
997 We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
999 2014-08-06 Adrian Perez de Castro <aperez@igalia.com>
1001 [GTK] Add support for user scripts to WebKitUserContentManager
1002 https://bugs.webkit.org/show_bug.cgi?id=134738
1004 Reviewed by Carlos Garcia Campos.
1006 Add support for user scripts, to complement the user style sheet
1007 support already present in WebKitUserContentManager. Most of the
1008 moving parts are already present, so this just adds a boxed type
1009 for user scripts (WebKitUserScript) and the corresponding methods
1010 to add and remove scripts from the WebKitUserContentManager.
1012 * UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
1013 boxed type and its corresponding methods and enums.
1014 (toUserScriptInjectionTime): Needed to convert
1015 WebKitUserScriptInjectionTime values into its WebCore counterparts.
1016 (_WebKitUserScript::_WebKitUserScript): Added.
1017 (_WebKitUserScript::referenceCount): Ditto.
1018 (webkit_user_script_ref):
1019 (webkit_user_script_unref):
1020 (webkit_user_script_new):
1021 (webkitUserScriptGetUserScript): Internal method to obtain the
1022 boxed WebCore::UserScript value.
1023 * UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
1025 * UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
1026 methods for adding and removing user scripts.
1027 (webkit_user_content_manager_add_script):
1028 (webkit_user_content_manager_remove_all_scripts):
1029 * UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
1031 * UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
1032 for the new private function.
1033 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
1034 new public methods in the API documentation.
1036 2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
1038 [GTK] Be able to disable gtk2 dependency
1039 https://bugs.webkit.org/show_bug.cgi?id=135505
1041 Reviewed by Gustavo Noronha Silva.
1043 * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
1044 ENABLE_PLUGIN_PROCESS_GTK2 is ON.
1045 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1046 (WebKit::ProcessLauncher::launchProcess): Do not try to launch
1047 WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
1049 2014-08-05 Tim Horton <timothy_horton@apple.com>
1051 REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
1052 https://bugs.webkit.org/show_bug.cgi?id=135622
1053 <rdar://problem/17202556>
1055 Reviewed by Dan Bernstein.
1057 In some cases (when the page changed scroll offset while thumbnailed),
1058 when transitioning back to thumbnail scale = 1, we would get the math
1059 wrong and end up with a non-identity sublayerTransform on the DrawingArea.
1061 Luckily, none of this code is necessary anymore, as the only client
1062 of WKThumbnailView only uses its snapshotting mode.
1064 * Shared/ImageOptions.h:
1065 Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
1066 has a rootLayerTransform().
1068 * UIProcess/WebPageProxy.cpp:
1069 (WebKit::WebPageProxy::setThumbnailScale): Deleted.
1070 * UIProcess/WebPageProxy.h:
1071 * WebProcess/WebPage/WebPage.cpp:
1072 (WebKit::WebPage::WebPage):
1073 (WebKit::WebPage::scaledSnapshotWithOptions):
1074 (WebKit::WebPage::snapshotAtSize):
1076 (WebKit::WebPage::setThumbnailScale): Deleted.
1077 * WebProcess/WebPage/WebPage.h:
1078 * WebProcess/WebPage/WebPage.messages.in:
1079 Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
1081 * WebProcess/WebPage/WebPage.cpp:
1082 (WebKit::WebPage::didCommitLoad):
1083 Revert this to its state before r164337, as we no longer have "thumbnail scale".
1085 * UIProcess/API/Cocoa/_WKThumbnailView.h:
1086 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1087 (-[_WKThumbnailView initWithFrame:fromWKView:]):
1088 (-[_WKThumbnailView _viewWasUnparented]):
1089 (-[_WKThumbnailView _viewWasParented]):
1090 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1091 (-[_WKThumbnailView setScale:]):
1092 Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
1094 (-[_WKThumbnailView setUsesSnapshot:]):
1095 (-[_WKThumbnailView usesSnapshot]):
1096 Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
1097 Ignore setUsesSnapshot.
1099 * UIProcess/API/mac/WKView.mm:
1100 (-[WKView _setThumbnailView:]):
1101 (-[WKView _updateThumbnailViewLayer]):
1102 Stop checking usesSnapshot; it's always true.
1104 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1105 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1106 (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
1107 * WebProcess/WebPage/DrawingArea.cpp:
1108 (WebKit::DrawingArea::rootLayerTransform): Deleted.
1109 * WebProcess/WebPage/DrawingArea.h:
1110 (WebKit::DrawingArea::setRootLayerTransform): Deleted.
1111 Remove rootLayerTransform() and setRootLayerTransform().
1113 2014-08-05 Peyton Randolph <prandolph@apple.com>
1115 Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
1116 https://bugs.webkit.org/show_bug.cgi?id=135276
1118 Reviewed by Beth Dakin.
1120 * Configurations/FeatureDefines.xcconfig:
1122 2014-08-04 Andy Estes <aestes@apple.com>
1124 [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
1125 https://bugs.webkit.org/show_bug.cgi?id=135596
1127 Reviewed by David Kilzer.
1129 * WebProcess/Network/WebResourceLoader.cpp:
1130 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
1131 QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
1132 WebResourceLoaderQuickLookDelegate once converted data is received.
1134 2014-08-05 Alexey Proskuryakov <ap@apple.com>
1138 * UIProcess/WebContext.h:
1140 2014-08-05 Oliver Hunt <oliver@apple.com>
1142 SSO expects to be able to walk parent application's bundle
1143 https://bugs.webkit.org/show_bug.cgi?id=135581
1144 <rdar://problem/17864079>
1146 Reviewed by Alexey Proskuryakov.
1148 SSO expects to be able to walk the parent application's
1149 bundle looking for Info plists. To allow this to actually
1150 work we provide an extension from the ui process that
1151 covers the bundle directory, and then in the profile
1152 restrict access to the ability to read directories and
1153 files named Info.plist.
1155 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1156 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1157 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1158 * Shared/Network/NetworkProcessCreationParameters.cpp:
1159 (WebKit::NetworkProcessCreationParameters::encode):
1160 (WebKit::NetworkProcessCreationParameters::decode):
1161 * Shared/Network/NetworkProcessCreationParameters.h:
1162 * UIProcess/WebContext.cpp:
1163 (WebKit::WebContext::ensureNetworkProcess):
1164 (WebKit::WebContext::parentBundleDirectory):
1165 * UIProcess/WebContext.h:
1166 * UIProcess/mac/WebContextMac.mm:
1167 (WebKit::WebContext::parentBundleDirectory):
1169 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
1171 Add a flag for the CSS Selectors level 4 implementation
1172 https://bugs.webkit.org/show_bug.cgi?id=135535
1174 Reviewed by Andreas Kling.
1176 * Configurations/FeatureDefines.xcconfig:
1178 2014-08-04 Benjamin Poulain <bpoulain@apple.com>
1180 Check for null frame when processing geolocation authorization request
1181 https://bugs.webkit.org/show_bug.cgi?id=135577
1182 <rdar://problem/17896295>
1184 Reviewed by Geoffrey Garen.
1186 I could have put the null check in GeolocationController instead of the WebKit layer,
1187 but that would be a little weird as GeolocationController knows nothing about how
1188 the WebKit layer decides what to do with requests.
1190 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1191 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1193 2014-08-02 Jeremy Jones <jeremyj@apple.com>
1195 Support both window and view based video fullscreen.
1196 https://bugs.webkit.org/show_bug.cgi?id=135525
1198 Reviewed by Simon Fraser.
1200 Parenting in the view instead of the window gives the fullscreen implementation more latitude
1201 in how it implements the animation.
1203 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1204 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
1205 * WebProcess/ios/WebVideoFullscreenManager.mm:
1206 (WebKit::clientRectForNode): Use client rect instead of screen rect.
1207 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
1208 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
1209 (WebKit::screenRectForNode): Deleted.
1211 2014-08-01 Dan Bernstein <mitz@apple.com>
1213 <rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
1214 https://bugs.webkit.org/show_bug.cgi?id=135536
1216 Reviewed by Tim Horton.
1218 * Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
1219 from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
1221 2014-08-01 Joseph Pecoraro <pecoraro@apple.com>
1223 [iOS WK2] Add extension read permission to network sandbox profile
1224 <rdar://problem/17671574>
1226 Reviewed by Alexey Proskuryakov and Oliver Hunt.
1228 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1230 2014-08-01 Oliver Hunt <oliver@apple.com>
1232 Various frameworks may want to use the container temp directory, so our current restrictions are too tight
1233 https://bugs.webkit.org/show_bug.cgi?id=135518
1236 Reviewed by Anders Carlsson.
1238 We don't (and can't) have complete knowledge of what different frameworks
1239 will want to use the container temporary directory for, and so our
1240 current attempt to heavily restrict access is simply too tight.
1242 This patch recognises this by simply giving read-write access to the
1243 entire NSTemporary() directory (e.g. $container/tmp in the general case),
1244 rather than the single sub directory we wishfully thought that we would
1245 be able to get away with.
1247 * Shared/WebProcessCreationParameters.cpp:
1248 (WebKit::WebProcessCreationParameters::encode):
1249 (WebKit::WebProcessCreationParameters::decode):
1250 * Shared/WebProcessCreationParameters.h:
1251 * UIProcess/WebContext.cpp:
1252 (WebKit::WebContext::createNewWebProcess):
1253 (WebKit::WebContext::mediaCacheDirectory): Deleted.
1254 * UIProcess/WebContext.h:
1255 * UIProcess/efl/WebContextEfl.cpp:
1256 (WebKit::WebContext::containerTemporaryDirectory):
1257 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1258 * UIProcess/gtk/WebContextGtk.cpp:
1259 (WebKit::WebContext::containerTemporaryDirectory):
1260 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1261 * UIProcess/mac/WebContextMac.mm:
1262 (WebKit::WebContext::containerTemporaryDirectory):
1263 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1264 * WebProcess/cocoa/WebProcessCocoa.mm:
1265 (WebKit::WebProcess::platformInitializeWebProcess):
1267 2014-08-01 Dan Bernstein <mitz@apple.com>
1269 <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
1270 https://bugs.webkit.org/show_bug.cgi?id=135511
1272 Reviewed by Alexey Proskuryakov.
1274 Since the values map in the preferences store doesn’t include values that are equal to the
1275 defaults, we need to update it when a new default is registered.
1277 * UIProcess/WebPreferences.cpp:
1278 (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
1279 for registering defaults.
1280 (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
1281 in the store, and sets the user default, if there is one, on top of it.
1282 (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
1283 * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
1286 * UIProcess/efl/WebPreferencesEfl.cpp:
1287 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
1288 returns false, because the EFL port doesn’t support persistent user defaults.
1289 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
1290 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
1291 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
1293 * UIProcess/gtk/WebPreferencesGtk.cpp:
1294 (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
1295 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
1296 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
1297 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
1299 * UIProcess/mac/WebPreferencesMac.mm:
1300 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
1301 setStringValueIfInUserDefaults, on which it is based.
1302 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
1303 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
1304 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
1305 (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
1307 2014-08-01 Brent Fulgham <bfulgham@apple.com>
1309 [Mac] Fullscreen mode for some applications shows only a black screen.
1310 https://bugs.webkit.org/show_bug.cgi?id=135493
1311 <rdar://problem/17628212>
1313 Reviewed by Jer Noble.
1315 In some applications, the window hosting the WKView is an InProcess layer hosting mode.
1316 The fullscreen window created by the WKFullScreenWindowController defaults to an
1319 When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
1320 to send a message back to the WebProcess indicating that the layer hosting mode of the
1321 containing window is different, so that the WebProcess can adjust its logic accordingly.
1322 Unfortunately, the notification that this had happened was not getting sent to the
1323 WebProcess due to an optimization in window state change logic (see Bug 135509 for
1326 The fix is to check layer hosting mode state when a WKView is added to a window, and
1327 notify the WebProcess when it needs to change state to match.
1330 * UIProcess/API/mac/WKView.mm:
1331 (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
1332 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
1334 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
1336 [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
1337 https://bugs.webkit.org/show_bug.cgi?id=135501
1339 Reviewed by Gyuyoung Kim.
1341 Use PROJECT_VERSION_MICRO instead.
1343 * UIProcess/API/efl/EWebKit2.h.in:
1344 * UIProcess/API/gtk/WebKitVersion.h.in:
1346 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
1348 Unreviewed. Add missing sections to documentation.
1350 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
1351 WebKitUserContent and WebKitUserContentManager sections to the
1354 2014-08-01 Ryuan Choi <ryuan.choi@samsung.com>
1356 [EFL] Unable to do make install since r171901
1357 https://bugs.webkit.org/show_bug.cgi?id=135497
1359 Reviewed by Gyuyoung Kim.
1361 * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
1363 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
1365 [EFL][WK2] MiniBrower comes to crash when combo box is pressed
1366 https://bugs.webkit.org/show_bug.cgi?id=135378
1368 Reviewed by Gyuyoung Kim.
1370 Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
1372 * UIProcess/API/efl/ewk_view.h:
1374 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
1376 [EFL] remove ewk_defines.h
1377 https://bugs.webkit.org/show_bug.cgi?id=135456
1379 Reviewed by Gyuyoung Kim.
1381 * UIProcess/API/efl/ewk_context_menu.h:
1382 * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
1383 * UIProcess/API/efl/ewk_defines.h: Removed.
1385 2014-07-31 Brent Fulgham <bfulgham@apple.com>
1387 Unreviewed typo correction.
1388 https://bugs.webkit.org/show_bug.cgi?id=135482
1390 Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
1392 * UIProcess/API/Cocoa/WKPreferences.mm:
1393 (-[WKPreferences _fullScreenEnabled]): Added
1394 (-[WKPreferences _fullScreenIsEnabled]): Deleted.
1395 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1397 2014-07-31 Brent Fulgham <bfulgham@apple.com>
1399 MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
1400 https://bugs.webkit.org/show_bug.cgi?id=135482
1402 Reviewed by Simon Fraser.
1404 Add accessors for the missing Fullscreen API so that MiniBrowser
1407 * UIProcess/API/Cocoa/WKPreferences.mm:
1408 (-[WKPreferences _fullScreenIsEnabled]): Added.
1409 (-[WKPreferences _setFullScreenEnabled:]): Added.
1410 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
1413 2014-07-31 Beth Dakin <bdakin@apple.com>
1415 Hit-testing broken in WebKit 1 views with AppKit's contentInsets
1416 https://bugs.webkit.org/show_bug.cgi?id=135434
1418 <rdar://problem/17850323>
1420 Reviewed by Benjamin Poulain.
1423 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1424 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
1425 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
1427 2014-07-31 Oliver Hunt <oliver@apple.com>
1429 Various SSO services need the networking process to be able to spoof its bundle id
1430 https://bugs.webkit.org/show_bug.cgi?id=135468
1431 <rdar://problem/17864139>
1433 Reviewed by Alexey Proskuryakov.
1435 Just add the entitlement required to allow the sandbox to let this happen.
1437 * Configurations/Network-iOS.entitlements:
1439 2014-07-31 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
1441 Fix uninitialized scalar variable
1442 https://bugs.webkit.org/show_bug.cgi?id=135461
1444 Reviewed by Alexey Proskuryakov.
1446 If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
1448 * Shared/linux/WebMemorySamplerLinux.cpp:
1449 (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
1451 2014-07-31 Rohit Kumar <kumar.rohit@samsung.com>
1453 Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
1454 https://bugs.webkit.org/show_bug.cgi?id=135413
1456 Reviewed by Darin Adler.
1458 * WebProcess/OriginData/WebOriginDataManager.cpp:
1459 (WebKit::WebOriginDataManager::getOrigins):
1460 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1461 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1462 (WebKit::WebOriginDataManager::deleteAllEntries):
1464 2014-07-31 Chris Fleizach <cfleizach@apple.com>
1466 AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
1467 https://bugs.webkit.org/show_bug.cgi?id=134617
1469 Reviewed by Darin Adler.
1471 Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
1473 * WebProcess/WebPage/WebPage.cpp:
1474 (WebKit::WebPage::~WebPage):
1475 * WebProcess/WebPage/WebPage.h:
1476 * WebProcess/WebPage/efl/WebPageEfl.cpp:
1477 (WebKit::WebPage::platformDetach):
1478 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1479 (WebKit::WebPage::platformDetach):
1480 * WebProcess/WebPage/ios/WebPageIOS.mm:
1481 (WebKit::WebPage::platformDetach):
1482 * WebProcess/WebPage/mac/WebPageMac.mm:
1483 (WebKit::WebPage::platformDetach):
1485 2014-07-31 Dan Bernstein <mitz@apple.com>
1487 WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
1488 https://bugs.webkit.org/show_bug.cgi?id=135327
1490 Reviewed by Alexey Proskuryakov.
1492 * UIProcess/Cocoa/NavigationState.mm:
1493 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
1494 Return true for server trust protection spaces if the delegate implements
1495 -webView:didReceiveAuthenticationChallenge:completionHandler:.
1496 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
1497 an assertion that is no longer true due to the above.
1499 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1501 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
1503 * gtk/NEWS: Add release notes for 2.5.1.
1505 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1507 Unreviewed. Fix GTK+ make distcheck.
1509 * Shared/InteractionInformationAtPosition.h: Only include
1510 WebCore/SelectionRect.h for IOS.
1512 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1514 [GTK] Bump binary version for 2.6
1515 https://bugs.webkit.org/show_bug.cgi?id=133724
1517 Reviewed by Philippe Normand.
1519 * PlatformGTK.cmake: Fix JavaScriptCore dependency on
1520 instrospection commands and make them depend on GTK+-3.0.
1522 2014-07-30 Enrica Casucci <enrica@apple.com>
1524 REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
1525 https://bugs.webkit.org/show_bug.cgi?id=135449
1526 <rdar://problem/17824833>
1528 Reviewed by Benjamin Poulain.
1530 The WebProcess sends the notification that the gesture modified the phrase boundary,
1531 but the flag was not being converted properly, therefore we failed to notify
1532 the text input system that a change had occurred.
1534 * UIProcess/ios/WKContentViewInteraction.mm:
1535 (toUIWKSelectionFlags):
1537 2014-07-30 Andy Estes <aestes@apple.com>
1539 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
1540 https://bugs.webkit.org/show_bug.cgi?id=135439
1542 Reviewed by Tim Horton.
1544 We now support two different platform content filters, and will soon support a mock content filter (as part of
1545 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
1546 library. ENABLE() is the correct macro to use for such a feature.
1548 * Configurations/FeatureDefines.xcconfig:
1549 * Shared/WebCoreArgumentCoders.h:
1550 * UIProcess/WebFrameProxy.cpp:
1551 (WebKit::WebFrameProxy::didStartProvisionalLoad):
1552 * UIProcess/WebFrameProxy.h:
1553 * UIProcess/WebPageProxy.cpp:
1554 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1555 * UIProcess/WebPageProxy.h:
1556 * UIProcess/WebPageProxy.messages.in:
1557 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1558 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1560 2014-07-30 Andreas Kling <akling@apple.com>
1562 Static hash tables no longer need to be coupled with a VM.
1563 <https://webkit.org/b/135421>
1565 Reviewed by Geoffrey Garen.
1567 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1568 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1570 2014-07-30 Dan Bernstein <mitz@apple.com>
1572 Get rid of the WKNSURLProtectionSpace wrapper
1573 https://bugs.webkit.org/show_bug.cgi?id=135425
1575 Reviewed by Sam Weinig.
1577 * Shared/Cocoa/APIObject.mm:
1578 (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
1580 * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
1581 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
1583 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1584 (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
1585 WebCore::ProtectionSpace in the WebProtectionSpace.
1587 * UIProcess/Cocoa/NavigationState.mm:
1588 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
1590 * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
1592 2014-07-30 Dan Bernstein <mitz@apple.com>
1594 Updated for changes to the WebCore::Credential API.
1595 Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
1597 Reviewed by Alexey Proskuryakov.
1599 * Shared/Downloads/mac/DownloadMac.mm:
1600 (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
1602 * Shared/WebCoreArgumentCoders.cpp:
1603 (IPC::ArgumentCoder<Credential>::encode): If encoding the credential requires encoding the
1604 platform data, do that.
1605 (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
1606 * Shared/WebCoreArgumentCoders.h:
1608 * Shared/mac/WebCoreArgumentCodersMac.mm:
1609 (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
1610 (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
1612 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
1613 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
1614 Credential constructor that takes an NSURLCredential.
1616 * UIProcess/Cocoa/NavigationState.mm:
1617 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
1620 2014-07-30 Carlos Garcia Campos <cgarcia@igalia.com>
1622 [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
1623 https://bugs.webkit.org/show_bug.cgi?id=135412
1625 Reviewed by Philippe Normand.
1627 The problem is that WebPageProxy::setUIClient() calls
1628 setCanRunModal() with the value of m_uiClient->canRunModal() which
1629 is always true for us. We override that manually by calling
1630 setCanRunModal() depending on the WebKitSettings. In r171742,
1631 webkitWebViewUpdateSettings(), the method that overrides
1632 setCanRunModal(), was moved before attachUIClientToView(), so the
1633 value set by WebPageProxy::setUIClient() is the last one and takes
1634 precedence. We need to make sure webkitWebViewUpdateSettings() is
1635 always called after attachUIClientToView().
1637 * UIProcess/API/gtk/WebKitWebView.cpp:
1638 (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
1639 call after attachUIClientToView() and add a comment to not forget
1642 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1644 [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
1645 https://bugs.webkit.org/show_bug.cgi?id=134830
1647 Reviewed by Gustavo Noronha Silva.
1649 It was added to make the API more convenient but it has ended up
1650 making it more complicated. WebKitWebView::load-failed-with-tls-errors
1651 now receives a GTlsCertificate + GTlsCertificateFlags and
1652 webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
1653 since the errors are not actually needed. This makes the API more
1654 consistent with the existing method webkit_web_view_get_tls_info().
1656 * PlatformGTK.cmake: Remove files from compilation.
1657 * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
1658 * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
1659 * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
1660 * UIProcess/API/gtk/WebKitWebContext.cpp:
1661 (webkit_web_context_allow_tls_certificate_for_host):
1662 * UIProcess/API/gtk/WebKitWebContext.h:
1663 * UIProcess/API/gtk/WebKitWebView.cpp:
1664 (webkit_web_view_class_init):
1665 (webkitWebViewLoadFailedWithTLSErrors):
1666 * UIProcess/API/gtk/WebKitWebView.h:
1667 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1668 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1669 * UIProcess/API/gtk/webkit2.h:
1671 2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
1673 [EFL] Do not initialize g_type system explicitly in the ewk_init()
1674 https://bugs.webkit.org/show_bug.cgi?id=135407
1676 Reviewed by Gyuyoung Kim.
1678 EFL build requires glib version 2.38 but g_type_init() has been deprecated
1679 since version 2.36. As the type system is initialized automatically since
1680 version 2.36, we do not need to call g_type_init() in the ewk_init().
1682 https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
1684 * UIProcess/API/efl/ewk_main.cpp:
1687 2014-07-29 Enrica Casucci <enrica@apple.com>
1689 REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
1690 https://bugs.webkit.org/show_bug.cgi?id=135392
1691 <rdar://problem/17760073>
1693 Reviewed by Benjamin Poulain.
1695 Adding a shortcut to the user dictionary needs to be available in non editable content too.
1697 * UIProcess/ios/WKContentViewInteraction.mm:
1698 (-[WKContentView _addShortcut:]):
1700 2014-07-29 Tim Horton <timothy_horton@apple.com>
1702 WKPDFView paints rotated pages squished
1703 https://bugs.webkit.org/show_bug.cgi?id=135401
1704 <rdar://problem/17173916>
1706 Reviewed by Simon Fraser.
1708 * UIProcess/ios/WKPDFView.mm:
1709 (-[WKPDFView _computePageAndDocumentFrames]):
1710 [page size] returns the crop box's size, ignoring rotation.
1711 [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
1712 UIPDFPageView will respect rotation when painting, so we
1713 should make sure that it is given an aspect ratio that also
1714 respects rotation, so that the page isn't squished.
1716 2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
1718 URTBF for !ENABLE(DATABASE_PROCESS) platforms.
1720 * WebProcess/OriginData/WebOriginDataManager.cpp:
1721 (WebKit::WebOriginDataManager::getOrigins):
1722 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1723 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1724 (WebKit::WebOriginDataManager::deleteAllEntries):
1726 2014-07-29 Brady Eidson <beidson@apple.com>
1728 Make WKOriginDataManager actually operate on IndexedDatabases.
1729 https://bugs.webkit.org/show_bug.cgi?id=135346
1731 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
1733 * DatabaseProcess/DatabaseProcess.cpp:
1734 (WebKit::DatabaseProcess::DatabaseProcess):
1735 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1736 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
1737 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
1738 that have been modified between the given dates.
1739 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1740 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
1741 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
1742 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
1743 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
1744 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
1745 * DatabaseProcess/DatabaseProcess.h:
1747 * Shared/WebCrossThreadCopier.cpp:
1748 (WebCore::SecurityOriginData>::copy):
1749 * Shared/WebCrossThreadCopier.h:
1751 * UIProcess/WebOriginDataManagerProxy.cpp:
1752 (WebKit::WebOriginDataManagerProxy::getOrigins):
1753 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1754 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
1755 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
1756 (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
1758 * WebProcess/OriginData/WebOriginDataManager.cpp:
1759 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
1760 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
1761 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
1762 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
1764 2014-07-29 Commit Queue <commit-queue@webkit.org>
1766 Unreviewed, rolling out r171704.
1767 https://bugs.webkit.org/show_bug.cgi?id=135389
1769 Broke two IndexedDB tests (Requested by ap on #webkit).
1773 "IDB transactions never reset if the Web Process ends before
1775 https://bugs.webkit.org/show_bug.cgi?id=135218
1776 http://trac.webkit.org/changeset/171704
1778 2014-07-29 Daniel Bates <dabates@apple.com>
1780 Use WTF::move() instead of std::move() to help ensure move semantics
1781 https://bugs.webkit.org/show_bug.cgi?id=135351
1783 Reviewed by Alexey Proskuryakov.
1785 * UIProcess/API/Cocoa/_WKSessionState.mm:
1786 (-[_WKSessionState _initWithSessionState:]):
1787 * UIProcess/API/gtk/WebKitUserContent.cpp:
1788 (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
1789 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1790 (WebKit::ServicesOverlayController::mouseEvent):
1792 2014-07-28 Pratik Solanki <psolanki@apple.com>
1794 Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
1795 https://bugs.webkit.org/show_bug.cgi?id=131782
1797 Original patch by Tim Horton.
1798 Reviewed by Darin Adler.
1800 * NetworkProcess/NetworkResourceLoader.cpp:
1801 * WebProcess/Network/NetworkProcessConnection.cpp:
1802 Include SharedBuffer.h in implementation files.
1804 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1805 Un-indent namespace and remove SharedBuffer forward-declaration.
1807 2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
1809 [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
1810 https://bugs.webkit.org/show_bug.cgi?id=133729
1812 Reviewed by Carlos Garcia Campos.
1814 Removes WebKitWebViewGroup, effectively reverting the changes
1815 introduced by r149117. The motivation for WebKitWebViewGroup
1816 was using the user style sheet injection API, which has been
1817 moved into WebKitUserContentManager, rendering it unneeded.
1819 * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
1821 * UIProcess/API/C/gtk/WKView.cpp:
1822 (WKViewCreate): Accomodate for changes in the signature of
1823 webkitWebViewBaseCreate().
1824 * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
1825 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
1826 view group from WebKitWebContext.
1827 (webkitWebContextCreatePageForWebView): Allow passing a
1828 WebPreferences object at construction.
1829 (webkitWebContextGetDefaultWebViewGroup): Deleted.
1830 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
1831 * UIProcess/API/gtk/WebKitWebView.cpp:
1832 (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
1833 directly. Handle the case when webkit_web_view_set_settings()
1834 is called on construction by doing an early-return.
1835 (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
1836 after creating the internal WebPageProxy object.
1837 (webkitWebViewSetProperty): Removed "group" property, added
1838 "settings" property.
1839 (webkitWebViewGetProperty): Ditto.
1840 (webkitWebViewDispose): Do not disconnect signal handler for
1841 the (now unexistant) WebKitWebViewGroup.
1842 (webkit_web_view_class_init): Removed "group" property, added
1843 "settings" property.
1844 (webkitWebViewHandleAuthenticationChallenge): Access the
1845 WebKitWebSettings directly.
1846 (webkit_web_view_new_with_related_view): Make new views share
1847 settings with their related view.
1848 (webkit_web_view_new_with_settings): Added.
1849 (webkit_web_view_set_settings): Access the settings directly in
1851 (webkit_web_view_get_settings): Ditto.
1852 (webkit_web_view_set_zoom_level): Ditto.
1853 (webkit_web_view_get_zoom_level): Ditto.
1854 (webkitWebViewSettingsChanged): Deleted.
1855 (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
1856 (webkit_web_view_new_with_group): Deleted.
1857 (webkit_web_view_get_group): Deleted.
1858 * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
1859 to WebKitWebViewGroup.
1860 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1861 (webkitWebViewBaseCreate): Allow passing a WebPreferences object
1862 for constructing the WebPageProxy.
1863 (webkitWebViewBaseUpdatePreferences): Instead of going through
1864 the page group, use WebPageProxy::preferences() directly.
1865 (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
1866 object for constructing the WebPageProxy.
1867 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
1868 prototypes of the internal functions.
1869 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
1870 * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
1871 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
1872 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
1873 bits in the documentation.
1874 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1875 * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
1876 * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
1877 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1878 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1879 Accomodate for changes in the signature of
1880 webkitWebViewBaseCreate().
1882 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1884 Implement webkit_web_view_load_string() in WebKit2
1885 https://bugs.webkit.org/show_bug.cgi?id=134735
1887 Reviewed by Sergio Villar Senin.
1889 Add webkit_web_view_load_bytes() that receives a GBytes to load
1890 random data in the web view using the given MIME-Type, encoding
1893 * UIProcess/API/gtk/WebKitWebView.cpp:
1895 (webkit_web_view_load_bytes):
1896 * UIProcess/API/gtk/WebKitWebView.h:
1897 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1898 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1900 2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
1902 [EFL] Alpha value of ewk_view_bg_color_set is not working
1903 https://bugs.webkit.org/show_bug.cgi?id=135333
1905 Reviewed by Gyuyoung Kim.
1907 evas_object_image_alpha_set should be called for the transparent evas object.
1909 * UIProcess/API/efl/EwkView.cpp:
1910 (EwkView::handleEvasObjectColorSet):
1911 (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
1912 * UIProcess/API/efl/EwkView.h:
1913 * UIProcess/API/efl/ewk_view.cpp:
1914 (ewk_view_bg_color_set): Moved the logic to EwkView.
1916 2014-07-28 Mark Rowe <mrowe@apple.com>
1918 Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
1919 https://bugs.webkit.org/show_bug.cgi?id=135366
1921 Reviewed by Dan Bernstein.
1923 * Platform/IPC/mac/ConnectionMac.mm:
1924 (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
1925 normal development with debug builds.
1927 2014-07-28 Benjamin Poulain <bpoulain@apple.com>
1929 [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
1930 https://bugs.webkit.org/show_bug.cgi?id=135368
1931 <rdar://problem/16988887>
1933 Reviewed by Simon Fraser.
1935 We should never assume DrawingAreaProxy exists in the API invoked by the clients
1936 of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
1937 -In some path on initialization.
1940 * UIProcess/API/Cocoa/WKWebView.mm:
1941 (-[WKWebView _frameOrBoundsChanged]):
1942 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1943 We can safely null check and skip setting the size. If the call was skipped,
1944 the size is set on DrawingAreaProxy initialization by querying the current
1945 size through the page client.
1947 2014-07-28 Roger Fong <roger_fong@apple.com>
1949 Disable tagged strings for the plugin process.
1950 https://bugs.webkit.org/show_bug.cgi?id=135354
1951 <rdar://problem/17295639>.
1953 Patch by Alexey Proskuryakov and Roger Fong.
1955 Reviewed by Anders Carlsson.
1957 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1958 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1959 (WebKit::connectToReExecService):
1961 2014-07-25 Jeffrey Pfau <jpfau@apple.com>
1963 IDB transactions never reset if the Web Process ends before cleaning up
1964 https://bugs.webkit.org/show_bug.cgi?id=135218
1966 Reviewed by Darin Adler.
1968 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1969 (WebKit::DatabaseToWebProcessConnection::didClose):
1970 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1971 (WebKit::UniqueIDBDatabase::unregisterConnection):
1972 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1973 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1974 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1975 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
1976 (WebKit::UniqueIDBDatabase::didResetTransaction):
1977 (WebKit::UniqueIDBDatabase::resetAllTransactions):
1978 (WebKit::UniqueIDBDatabase::finalizeRollback):
1979 (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
1980 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1981 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1982 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1984 2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
1986 [GTK] Keep non-DATABASE_PROCESS build
1987 https://bugs.webkit.org/show_bug.cgi?id=135321
1989 Reviewed by Gyuyoung Kim.
1991 This is the patch for r171622 in non-DATABASE_PROCESS builds.
1992 Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
1995 * UIProcess/WebContext.h:
1996 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1998 2014-07-27 Gavin Barraclough <baraclough@apple.com>
2000 Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
2001 https://bugs.webkit.org/show_bug.cgi?id=135329
2002 rdar://problem/17818308
2004 Reviewed by Sam Weinig.
2006 API may not be stable.
2008 * UIProcess/ios/PageClientImplIOS.mm:
2009 (WebKit::PageClientImpl::isViewVisible):
2010 - changed to use -[WKContentView isBackground]
2011 * UIProcess/ios/ProcessAssertionIOS.mm:
2012 (-[WKProcessAssertionBackgroundTaskManager init]):
2013 - split notification handlers
2014 (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
2015 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
2016 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
2017 - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
2018 * UIProcess/ios/WKContentView.h:
2019 - added isBackground.
2020 * UIProcess/ios/WKContentView.mm:
2021 (-[WKContentView initWithFrame:context:configuration:webView:]):
2022 - check applicationState at init.
2023 (-[WKContentView isBackground]):
2025 (-[WKContentView _applicationDidEnterBackground:]):
2026 (-[WKContentView _applicationWillEnterForeground:]):
2027 - update isBackground
2029 2014-07-26 Enrica Casucci <enrica@apple.com>
2031 [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
2032 https://bugs.webkit.org/show_bug.cgi?id=135325
2033 <rdar://problem/17682120>
2035 Reviewed by Sam Weinig.
2037 WKContentView now implements moveByOffset to support the
2038 protocol for 3rd party keyboards.
2040 * UIProcess/WebPageProxy.h:
2041 * UIProcess/ios/WKContentViewInteraction.mm:
2042 (-[WKContentView moveByOffset:]):
2043 * UIProcess/ios/WebPageProxyIOS.mm:
2044 (WebKit::WebPageProxy::moveSelectionByOffset):
2045 * WebProcess/WebPage/WebPage.h:
2046 * WebProcess/WebPage/WebPage.messages.in:
2047 * WebProcess/WebPage/ios/WebPageIOS.mm:
2048 (WebKit::WebPage::moveSelectionByOffset):
2050 2014-07-26 Timothy Horton <timothy_horton@apple.com>
2052 Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
2053 https://bugs.webkit.org/show_bug.cgi?id=135319
2054 <rdar://problem/17315168>
2056 Reviewed by Darin Adler and Antti Koivisto.
2058 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2059 (WebKit::WebFrameLoaderClient::committedLoad):
2060 Allow data through to WebCore for frames with custom content providers;
2061 the only custom content provider currently implemented is main frame PDF
2062 on iOS, which will end up creating a PDFDocument in WebCore, which drops all
2063 data on the floor immediately, so this won't result in WebCore doing anything
2064 with the data, but makes sure that more of the normal document lifecycle is maintained.
2066 In the future, we might want to consider ensuring that all custom content providers
2067 end up creating a SinkDocument or something similarly generic to ensure that
2068 WebCore doesn't try to do anything with their data, but for now, the only client is covered.
2070 2014-07-25 Jeremy Jones <jeremyj@apple.com>
2072 Parent fullscreen from window instead of view
2073 https://bugs.webkit.org/show_bug.cgi?id=135310
2075 Reviewed by Jer Noble.
2077 Parenting in the view causes an incorrect animation to fullscreen, and can cause
2078 fullscreen to only expand to the size of the view instead of the whole window.
2080 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2081 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
2082 * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
2083 (WebKit::screenRectForNode): was clientRectForNode
2084 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
2085 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
2086 (WebKit::clientRectForNode): Deleted.
2088 2014-07-25 Oliver Hunt <oliver@apple.com>
2090 Creating incorrect sandbox extension for hsts plist due to missing /
2091 https://bugs.webkit.org/show_bug.cgi?id=135309
2093 Reviewed by Sam Weinig.
2095 So it turns out that you do actually need /'s in paths...
2096 Now we actually create the correct extension.
2098 * UIProcess/mac/WebContextMac.mm:
2099 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2101 2014-07-24 Anders Carlsson <andersca@apple.com>
2103 WKNavigation's properties are either always nil or don't behave as documented
2104 https://bugs.webkit.org/show_bug.cgi?id=135267
2105 <rdar://problem/17730536>
2107 Reviewed by Andreas Kling.
2109 Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
2111 * Shared/API/Cocoa/WebKitPrivate.h:
2112 * UIProcess/API/Cocoa/WKNavigation.h:
2113 * UIProcess/API/Cocoa/WKNavigation.mm:
2114 (-[WKNavigation _request]):
2115 (-[WKNavigation initialRequest]): Deleted.
2116 (-[WKNavigation request]): Deleted.
2117 (-[WKNavigation setRequest:]): Deleted.
2118 (-[WKNavigation response]): Deleted.
2119 (-[WKNavigation error]): Deleted.
2120 * UIProcess/API/Cocoa/WKNavigationInternal.h:
2121 * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
2122 * UIProcess/Cocoa/NavigationState.mm:
2123 (WebKit::NavigationState::createLoadRequestNavigation):
2124 * WebKit2.xcodeproj/project.pbxproj:
2126 2014-07-25 Brady Eidson <beidson@apple.com>
2128 Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
2129 https://bugs.webkit.org/show_bug.cgi?id=135035
2131 Reviewed by Sam Weinig.
2133 * DatabaseProcess/DatabaseProcess.cpp:
2134 (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
2135 (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
2136 * DatabaseProcess/DatabaseProcess.h:
2137 * DatabaseProcess/DatabaseProcess.messages.in:
2139 * UIProcess/API/C/WKOriginDataManager.cpp:
2140 (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
2141 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
2142 (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
2143 (WKOriginDataManagerStartObservingChanges): Deleted.
2144 (WKOriginDataManagerStopObservingChanges): Deleted.
2145 (WKOriginDataManagerSetChangeClient): Deleted.
2146 * UIProcess/API/C/WKOriginDataManager.h:
2148 * UIProcess/Databases/DatabaseProcessProxy.cpp:
2149 (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
2150 * UIProcess/Databases/DatabaseProcessProxy.h:
2151 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
2153 * UIProcess/WebContext.cpp:
2154 (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
2155 * UIProcess/WebContext.h:
2156 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
2158 * UIProcess/WebOriginDataManagerProxy.cpp:
2159 (WebKit::WebOriginDataManagerProxy::contextDestroyed):
2160 (WebKit::WebOriginDataManagerProxy::processDidClose):
2161 (WebKit::WebOriginDataManagerProxy::getOrigins):
2162 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
2163 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
2164 (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
2165 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
2166 (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
2167 (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
2168 (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
2169 (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
2170 (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
2171 * UIProcess/WebOriginDataManagerProxy.h:
2172 * UIProcess/WebOriginDataManagerProxy.messages.in:
2174 * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
2175 * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
2177 * WebKit2.xcodeproj/project.pbxproj:
2179 * WebProcess/OriginData/WebOriginDataManager.cpp:
2180 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
2181 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
2182 (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
2183 (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
2184 (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
2185 * WebProcess/OriginData/WebOriginDataManager.h:
2186 * WebProcess/OriginData/WebOriginDataManager.messages.in:
2188 2014-07-25 Gavin Barraclough <baraclough@apple.com>
2190 Yosemite version number is 101000
2191 https://bugs.webkit.org/show_bug.cgi?id=135301
2193 Reviewed by Sam Weinig.
2195 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2196 (WebKit::connectToService):
2197 * WebProcess/com.apple.WebProcess.sb.in:
2199 2014-07-24 Benjamin Poulain <bpoulain@apple.com>
2201 [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
2202 https://bugs.webkit.org/show_bug.cgi?id=135277
2203 <rdar://problem/17804891>
2205 Reviewed by Tim Horton.
2207 * WebProcess/WebPage/ios/WebPageIOS.mm:
2208 (WebKit::WebPage::dynamicViewportSizeUpdate):
2209 There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
2210 we should not attempt to use the layer without null checking it first.
2212 The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
2213 there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
2215 Skipping hit testing is safe because it is a completely optional part of this algorithm.
2216 When the hit test is not done, the new position is computed based on the relative position prior to
2219 2014-07-24 Dan Bernstein <mitz@apple.com>
2221 WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
2222 https://bugs.webkit.org/show_bug.cgi?id=135129
2224 Reviewed by Darin Adler.
2226 * Shared/WebBackForwardListItem.cpp:
2227 (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
2228 WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
2229 (WebKit::documentTreesAreEqual): New helper function based on
2230 WebCore::HistoryItem::hasSameDocumentTree.
2231 (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
2232 WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
2233 * Shared/WebBackForwardListItem.h:
2235 * UIProcess/WebPageProxy.cpp:
2236 (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
2237 navigation is a same-document navigation.
2238 (WebKit::WebPageProxy::goBack): Ditto.
2239 (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
2241 2014-07-24 Tim Horton <timothy_horton@apple.com>
2243 Sometimes WKWebView is blank after resuming the app, until you scroll
2244 https://bugs.webkit.org/show_bug.cgi?id=135275
2245 <rdar://problem/17803170>
2247 Reviewed by Benjamin Poulain.
2249 * UIProcess/WebPageProxy.cpp:
2250 (WebKit::WebPageProxy::dispatchViewStateChange):
2251 If the UI process is waiting for a didUpdateViewState, we need to *always*
2252 get a reply from the Web Process, so dispatchViewStateChange should *always*
2253 send SetViewState even if nothing changed (so that we get the reply).
2255 2014-07-24 Simon Fraser <simon.fraser@apple.com>
2257 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
2258 https://bugs.webkit.org/show_bug.cgi?id=135221
2259 <rdar://problem/17542454>
2261 Reviewed by Benjamin Poulain.
2263 The call to didCommitLayerTree() can cause one or two visible rect updates,
2264 via changes to the UIScrollView contentSize and contentOffset. As a result, we
2265 would notify the scrolling tree about a viewport change, but using the old
2266 scrolling tree rather than the new one, so we could move layers around for
2267 nodes which are about to be removed from the tree.
2269 However, we also have to ensure that programmatic scrolls are applied after
2270 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
2271 store data about programmatic scrolls and return them to the caller, which
2272 can apply them after didCommitLayerTree().
2274 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
2275 for the duration of the tree update, so that we can store requested scroll info in it.
2276 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
2277 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
2278 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
2279 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2280 * UIProcess/WebPageProxy.cpp:
2281 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
2282 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
2283 (WebKit::WebPageProxy::editorState):
2284 (WebKit::WebPageProxy::canDelete):
2285 (WebKit::WebPageProxy::hasSelectedRange):
2286 (WebKit::WebPageProxy::isContentEditable):
2287 (WebKit::WebPageProxy::maintainsInactiveSelection):
2288 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2289 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
2290 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
2291 by any programmatic scroll.
2293 2014-07-24 Peyton Randolph <prandolph@apple.com>
2295 Rename feature flag for long-press gesture on Mac.
2296 https://bugs.webkit.org/show_bug.cgi?id=135259
2298 Reviewed by Beth Dakin.
2300 * Configurations/FeatureDefines.xcconfig:
2301 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
2303 2014-07-24 Dan Bernstein <mitz@apple.com>
2305 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
2306 https://bugs.webkit.org/show_bug.cgi?id=135229
2308 Reviewed by Alexey Proskuryakov.
2310 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
2312 * Shared/WebCoreArgumentCoders.cpp:
2313 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
2314 platform data, do that.
2315 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
2316 * Shared/WebCoreArgumentCoders.h:
2318 * Shared/mac/WebCoreArgumentCodersMac.mm:
2319 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
2320 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
2322 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2323 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
2324 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
2326 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
2328 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
2329 https://bugs.webkit.org/show_bug.cgi?id=135227
2330 <rdar://problem/17279500>
2332 Reviewed by Simon Fraser.
2334 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
2335 instead of sticking the to real viewport in the UIProcess.
2337 The sequence of event is:
2338 1) A layer becomes fixed in some ScrollingTree transaction.
2339 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
2340 ScrollingTree update is made.
2341 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
2342 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
2343 and the position is not corrected.
2344 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
2346 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
2347 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
2349 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
2350 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
2351 is called to "fix" the position.
2353 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2354 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
2355 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2356 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2357 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
2358 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2359 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2360 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2361 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2363 2014-07-24 Oliver Hunt <oliver@apple.com>
2365 Need to explicitly support location services in webcontent profile
2366 https://bugs.webkit.org/show_bug.cgi?id=135251
2369 Reviewed by Dan Bernstein.
2371 Switching to uikit-app means that we remove the implicit support
2372 for location services. This makes us explicitly opt-in.
2374 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2376 2014-07-24 Tim Horton <timothy_horton@apple.com>
2378 Crash at [WKContentView _applicationWillEnterForeground:] + 28
2379 <rdar://problem/17797103>
2381 Reviewed by Sam Weinig.
2383 * UIProcess/ios/WKContentView.mm:
2384 (-[WKContentView _applicationWillEnterForeground:]):
2385 Drawing area can be null; null check it!
2386 It's ok if we don't hide the content in this case, because if the drawing area is null,
2387 it doesn't have any layers in the tree anyway.
2389 2014-07-23 Simon Fraser <simon.fraser@apple.com>
2391 [iOS WK2] Some help.apple.com pages not scrollable
2392 https://bugs.webkit.org/show_bug.cgi?id=135228
2393 <rdar://problem/17790792>
2395 Reviewed by Benjamin Poulain.
2397 On pages which size their document to the device size, the WKContentView size
2398 never changes after it's created. In this situation, we never set a bounds
2399 on the _rootContentView, so it remains zero-sized which breaks hit testing
2400 on all enclosed UIScrollViews for overflow:scroll.
2402 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
2403 so they are always the size of their parent view, and remove the explicit setting
2406 * UIProcess/ios/WKContentView.mm:
2407 (-[WKContentView initWithFrame:context:configuration:webView:]):
2408 (-[WKContentView setShowingInspectorIndication:]):
2409 (-[WKContentView _didCommitLayerTree:]):
2411 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
2413 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
2414 https://bugs.webkit.org/show_bug.cgi?id=135187
2416 Reviewed by Simon Fraser.
2418 Unfortunately, restricting the input into the document rect does not work.
2419 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
2420 the valid range should account for that.
2422 Instead of playing with the keyboard rect, we can limit the scroll position
2423 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
2424 range as needed to give access to the content. Using that range is a bit more permissive
2425 because the page could scroll to reveal content in the content inset defined by the client
2426 of the API (this could actually be quite useful for hybrid apps).
2428 There was already a function to change the content offset in the valid scrollview
2429 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
2430 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
2432 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
2433 system. The scroll position we get from the WebProcess is in document coordinates, while
2434 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
2435 To fix that, we scale the input position to get to the same scale as UIScrollView, then
2436 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
2438 * UIProcess/API/Cocoa/WKWebView.mm:
2439 (contentOffsetBoundedInValidRange):
2440 (changeContentOffsetBoundedInValidRange):
2441 (-[WKWebView _scrollToContentOffset:]):
2443 2014-07-23 Commit Queue <commit-queue@webkit.org>
2445 Unreviewed, rolling out r171498.
2446 https://bugs.webkit.org/show_bug.cgi?id=135223
2448 It will regress some scroll position restoration on navigation
2449 (r167916). (Requested by smfr on #webkit).
2453 "[iOS WK2] Header bar on nytimes articles lands in the wrong
2454 place after rubberbanding"
2455 https://bugs.webkit.org/show_bug.cgi?id=135221
2456 http://trac.webkit.org/changeset/171498
2458 2014-07-23 Simon Fraser <simon.fraser@apple.com>
2460 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
2461 https://bugs.webkit.org/show_bug.cgi?id=135221
2463 Reviewed by Tim Horton.
2465 The call to didCommitLayerTree() can cause one or two visible rect updates,
2466 via changes to the UIScrollView contentSize and contentOffset. As a result, we
2467 would notify the scrolling tree about a viewport change, but using the old
2468 scrolling tree rather than the new one, so we could move layers around for
2469 nodes which are about to be removed from the tree.
2471 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
2474 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2475 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2477 2014-07-23 Oliver Hunt <oliver@apple.com>
2479 Add a pseudo target to create sandbox override roots
2480 https://bugs.webkit.org/show_bug.cgi?id=135216
2483 Reviewed by Alexey Proskuryakov.
2485 Just a duplicate of the standard ios sandbox target, targetting
2486 the profile overrides directory. This means we can make roots
2489 * WebKit2.xcodeproj/project.pbxproj:
2491 2014-07-23 Oliver Hunt <oliver@apple.com>
2493 Incorrect commit for sandbox profile
2494 https://bugs.webkit.org/show_bug.cgi?id=135214
2497 Reviewed by Anders Carlsson.
2499 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2501 2014-07-23 Dan Bernstein <mitz@apple.com>
2503 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
2504 https://bugs.webkit.org/show_bug.cgi?id=135206
2506 Reviewed by Anders Carlsson.
2508 * Shared/cf/ArgumentCodersCF.cpp:
2509 (IPC::copyPersistentRef): Added this helper function. It differs from
2510 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
2511 ensures that we get a reference to the copy that is in the keychain access group that the
2512 Networking process can use.
2513 (IPC::encode): Use copyPersistentRef.
2515 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
2517 Remove CSS_EXCLUSIONS compile flag and leftover code
2518 https://bugs.webkit.org/show_bug.cgi?id=135175
2520 Reviewed by Zoltan Horvath.
2522 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
2523 stubs. This removes the flag and the useless code.
2525 * Configurations/FeatureDefines.xcconfig:
2527 2014-07-23 Timothy Horton <timothy_horton@apple.com>
2529 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2530 https://bugs.webkit.org/show_bug.cgi?id=135177
2531 <rdar://problem/17764847>
2533 Reviewed by Dan Bernstein.
2535 * UIProcess/WebPageProxy.cpp:
2536 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2537 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2538 * UIProcess/WebPageProxy.h:
2539 * UIProcess/WebPageProxy.messages.in:
2540 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2541 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2542 * WebProcess/WebPage/WebPage.cpp:
2543 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2544 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2545 * WebProcess/WebPage/WebPage.h:
2546 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2547 Only send it when the current history item for the main frame changes.
2549 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
2551 [EFL] EWebKit2.h should contain version information
2552 https://bugs.webkit.org/show_bug.cgi?id=135189
2554 Reviewed by Gyuyoung Kim.
2556 Generate EWebKit2.h to contain the version information.
2558 * PlatformEfl.cmake:
2559 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
2561 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
2563 [EFL] Do not generate forwarding header for ewk headers
2564 https://bugs.webkit.org/show_bug.cgi?id=135147
2566 Reviewed by Gyuyoung Kim.
2568 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
2569 This is unnecessary.
2571 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2572 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
2573 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
2574 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
2575 * UIProcess/efl/TextCheckerClientEfl.h:
2577 2014-07-22 Commit Queue <commit-queue@webkit.org>
2579 Unreviewed, rolling out r171366.
2580 https://bugs.webkit.org/show_bug.cgi?id=135190
2582 Broke three API tests (Requested by ap on #webkit).
2586 "REGRESSION (r171239): Much more time spent taking snapshots
2588 https://bugs.webkit.org/show_bug.cgi?id=135177
2589 http://trac.webkit.org/changeset/171366
2591 2014-07-22 Oliver Hunt <oliver@apple.com>
2593 Reduce the size of the root WebContent sandbox profile
2594 https://bugs.webkit.org/show_bug.cgi?id=135182
2595 <rdar://problem/17739108>
2597 Reviewed by Alexey Proskuryakov.
2599 Switch from apple-ui-app to uikit-app as the root of the webcontent
2602 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2604 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
2606 Unreviewed build fix on EFL port after r171356.
2608 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
2610 * UIProcess/efl/WebContextEfl.cpp:
2611 (WebKit::WebContext::platformMediaCacheDirectory):
2613 2014-07-22 Enrica Casucci <enrica@apple.com>
2615 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
2616 https://bugs.webkit.org/show_bug.cgi?id=135180
2617 <rdar://problem/16721055>
2619 Reviewed by Simon Fraser.
2621 Adds notifications to the WKContentView to know when scrolling starts and ends
2622 in an overflow scroll. When scrolling starts, we hide the selection and we restore
2623 it when scrolling ends, though not before the selection information in the editor
2624 state has been updated.
2625 It also adds a new method to the EditorClient class to force the
2626 selection update when scrolling is completed.
2628 * UIProcess/PageClient.h:
2629 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2630 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2631 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
2632 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
2633 * UIProcess/Scrolling/RemoteScrollingTree.h:
2634 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2635 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2636 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
2637 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
2638 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
2639 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
2640 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
2641 * UIProcess/WebPageProxy.h:
2642 * UIProcess/ios/PageClientImplIOS.h:
2643 * UIProcess/ios/PageClientImplIOS.mm:
2644 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
2645 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
2646 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2647 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
2648 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
2649 * UIProcess/ios/WKContentViewInteraction.h:
2650 * UIProcess/ios/WKContentViewInteraction.mm:
2651 (-[WKContentView _overflowScrollingWillBegin]):
2652 (-[WKContentView _overflowScrollingDidEnd]):
2653 (-[WKContentView _updateChangedSelection]):
2654 * UIProcess/ios/WebPageProxyIOS.mm:
2655 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
2656 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
2657 * WebProcess/WebCoreSupport/WebEditorClient.h:
2658 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2659 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2660 (WebKit::WebEditorClient::updateSelection):
2662 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2664 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
2665 https://bugs.webkit.org/show_bug.cgi?id=135169
2666 <rdar://problem/17740149>
2668 Reviewed by Tim Horton.
2670 * UIProcess/ios/WebPageProxyIOS.mm:
2671 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2672 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
2673 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
2675 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2676 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
2679 2014-07-22 Timothy Horton <timothy_horton@apple.com>
2681 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2682 https://bugs.webkit.org/show_bug.cgi?id=135177
2683 <rdar://problem/17764847>
2685 Reviewed by Dan Bernstein.
2687 * UIProcess/WebPageProxy.cpp:
2688 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2689 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2690 * UIProcess/WebPageProxy.h:
2691 * UIProcess/WebPageProxy.messages.in:
2692 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2693 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2694 * WebProcess/WebPage/WebPage.cpp:
2695 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2696 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2697 * WebProcess/WebPage/WebPage.h:
2698 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2699 Only send it when the current history item for the main frame changes.
2701 2014-07-22 Oliver Hunt <oliver@apple.com>
2703 Add accountsd access to network sandbox profile
2704 https://bugs.webkit.org/show_bug.cgi?id=135176
2707 Reviewed by Anders Carlsson.
2709 This is available to the webcontent process already, but is also
2710 needed for the networking process.
2712 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2714 2014-07-22 Oliver Hunt <oliver@apple.com>
2716 Remove unused com.apple.webkit.* rules from profiles
2717 https://bugs.webkit.org/show_bug.cgi?id=135174
2720 Reviewed by Anders Carlsson.
2722 We never send these rules so we should just remove use of them
2725 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2726 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2728 2014-07-22 Oliver Hunt <oliver@apple.com>
2730 Provide networking process with access to its HSTS db
2731 https://bugs.webkit.org/show_bug.cgi?id=135121
2734 Reviewed by Alexey Proskuryakov.
2736 Add an extension parameter to pass the hsts database file.
2737 This requires us to create the Caches/com.apple.WebKit.Networking
2738 directory in the UI process, as the network sandbox
2739 does not allow it to create the containing directory.
2741 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2742 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2743 * Shared/Network/NetworkProcessCreationParameters.cpp:
2744 (WebKit::NetworkProcessCreationParameters::encode):
2745 (WebKit::NetworkProcessCreationParameters::decode):
2746 * Shared/Network/NetworkProcessCreationParameters.h:
2747 * UIProcess/WebContext.cpp:
2748 (WebKit::WebContext::ensureNetworkProcess):
2749 (WebKit::WebContext::networkingHSTSDatabasePath):
2750 * UIProcess/WebContext.h:
2751 * UIProcess/mac/WebContextMac.mm:
2752 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2754 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2756 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
2757 https://bugs.webkit.org/show_bug.cgi?id=135140
2758 <rdar://problem/17754921>
2760 Reviewed by Tim Horton.
2762 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
2763 everything is set up on the LayerTransaction.
2765 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
2766 should be the actual min/max for the current page state.
2768 This patch split the two explicitely.
2769 For layer transactions, the values are taken from the viewport configuration directly.
2770 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
2771 have been updated to take into account allowsUserScaling.
2773 * WebProcess/WebPage/WebPage.cpp:
2774 (WebKit::WebPage::willCommitLayerTree):
2775 * WebProcess/WebPage/ios/WebPageIOS.mm:
2776 (WebKit::WebPage::minimumPageScaleFactor):
2777 (WebKit::WebPage::maximumPageScaleFactor):
2778 (WebKit::WebPage::getAssistedNodeInformation):
2780 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2782 Web Inspector: Fix unused parameter build warning
2783 https://bugs.webkit.org/show_bug.cgi?id=135151
2785 Reviewed by Joseph Pecoraro.
2787 Fix unused parameter build warning by removing the parameter name
2789 * WebProcess/WebPage/WebInspector.cpp:
2790 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2792 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2794 Fix unused parameter build warning in UIProcess module
2795 https://bugs.webkit.org/show_bug.cgi?id=135154
2797 Reviewed by Alexey Proskuryakov.
2799 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
2801 * UIProcess/WebPageProxy.cpp:
2802 (WebKit::WebPageProxy::viewStateDidChange):
2804 2014-07-22 Jeremy Jones <jeremyj@apple.com>
2806 Don't create new UIWindow for video fullscreen.
2807 https://bugs.webkit.org/show_bug.cgi?id=135038
2809 Reviewed by Darin Adler.
2811 Use root UIView to parent fullscreen interface.
2813 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2814 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
2815 * WebProcess/ios/WebVideoFullscreenManager.mm:
2816 (WebKit::screenRectForNode): Use client rect instead of screen rect.
2818 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
2820 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
2821 https://bugs.webkit.org/show_bug.cgi?id=135144
2823 Reviewed by Gyuyoung Kim.
2825 All public enums of ewebkit should start with Ewk prefix.
2826 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
2827 In addition, added missing description and default value for Ewk_Event_Modifier.
2829 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2830 (toEwkEventMouseButton):
2831 (toEwkEventModifiers):
2832 (EwkNavigationPolicyDecision::mouseButton):
2833 (EwkNavigationPolicyDecision::modifiers):
2834 (ewk_navigation_policy_mouse_button_get):
2835 (ewk_navigation_policy_modifiers_get):
2836 (toEventMouseButton): Deleted.
2837 (toEventModifierKeys): Deleted.
2838 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2839 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2841 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
2843 [iOS][WK2] Improve event throttling for Scroll Events
2844 https://bugs.webkit.org/show_bug.cgi?id=135082
2845 <rdar://problem/17445266>
2847 Reviewed by Simon Fraser.
2849 In the WebKit layer, we want a measure that is representative of the responsiveness.
2851 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
2852 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
2854 The value used for eventThrottlingDelay() is computed by averaging the new value with
2855 the old values with a 80/20 split, favoring the old data. Favoring historical data
2856 over the last timing avoid excessively throttling for a single slow frame.
2858 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
2859 a first cut keeping things simple.
2861 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
2862 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
2863 and nothing is throttled.
2865 If is it more than a frame, we throttle such that we can at least render two frames
2866 per event dispatch based on the historical data.
2868 The exact values will need some tweaking, but this set ensures well written pages get
2869 60 events per seconds, while slow pages do not waste too much time on events.
2871 * WebProcess/WebCoreSupport/WebChromeClient.h:
2872 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2873 (WebKit::WebChromeClient::eventThrottlingDelay):
2874 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2875 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2876 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2877 * WebProcess/WebPage/ViewUpdateDispatcher.h:
2878 * WebProcess/WebPage/WebPage.cpp:
2879 (WebKit::WebPage::WebPage):
2880 (WebKit::WebPage::didFlushLayerTreeAtTime):
2881 (WebKit::WebPage::didCommitLoad):
2882 * WebProcess/WebPage/WebPage.h:
2883 * WebProcess/WebPage/ios/WebPageIOS.mm:
2884 (WebKit::WebPage::eventThrottlingDelay):
2885 (WebKit::WebPage::updateVisibleContentRects):
2886 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2887 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2889 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2891 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
2892 https://bugs.webkit.org/show_bug.cgi?id=135141
2893 <rdar://problem/17627525>
2895 Reviewed by Benjamin Poulain.
2897 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
2898 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
2899 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
2902 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
2905 * UIProcess/API/Cocoa/WKWebView.mm:
2906 (-[WKWebView _computedContentInset]):
2907 (-[WKWebView _setObscuredInsets:]):
2909 2014-07-21 Oliver Hunt <oliver@apple.com>
2911 Remove global cookie workaround from sandbox profiles
2912 https://bugs.webkit.org/show_bug.cgi?id=135138
2915 Reviewed by Alexey Proskuryakov.
2917 Remove the workaround needed for global cookie access, and silencing
2918 of the associated sandbox violation.
2920 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2921 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2922 * UIProcess/mac/WebContextMac.mm:
2923 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2925 2014-07-21 Oliver Hunt <oliver@apple.com>
2927 Correct sandbox profiles to fix some excess privileges
2928 https://bugs.webkit.org/show_bug.cgi?id=135134
2929 <rdar://problem/17741886>
2930 <rdar://problem/17739080>
2932 Reviewed by Alexey Proskuryakov.
2934 This cleans up our sandbox profiles to fix a few issues - the profiles
2935 no longer allow us to issue file extension we have the ability to consume,
2936 and tightens some of the other file access rules.
2938 This means we have to addd some rules to allow us to access things
2939 that we previously had access to due to lax file system restrictions.
2941 Some of the features were fixable simply by using entitlements on the
2942 process rather than custom rules.
2944 * Configurations/WebContent-iOS.entitlements:
2945 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2946 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2947 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2949 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2951 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
2952 https://bugs.webkit.org/show_bug.cgi?id=132537
2954 Reviewed by Benjamin Poulain.
2956 Make interaction with form elements inside position:fixed less terrible by re-laying out
2957 fixed elements relative to the document while we have an assisted node. This ensures
2958 that all parts of a position:fixed are accessible (e.g. inputs on the right side
2959 of a fixed-width top bar).
2961 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
2962 and encode/decode it.
2963 (WebKit::AssistedNodeInformation::encode):
2964 (WebKit::AssistedNodeInformation::decode):
2965 * Shared/AssistedNodeInformation.h:
2966 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2967 * UIProcess/PageClient.h: Add isAssistingNode().
2968 * UIProcess/ios/PageClientImplIOS.h:
2969 * UIProcess/ios/PageClientImplIOS.mm:
2970 (WebKit::PageClientImpl::isAssistingNode):
2971 * UIProcess/ios/WebPageProxyIOS.mm:
2972 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
2973 node, just use the document rect as the custom fixed position rect.
2974 * WebProcess/WebPage/ios/WebPageIOS.mm:
2975 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
2976 since we have to fix it up for position:fixed. If the element is inside fixed
2977 position in the main frame, re-set the fixed position rect to the document rect
2978 (which forces a layout), re-fetch elementRect, then set it back. This ensures
2979 that the UI process gets an elementRect which it can zoom to correctly.
2981 2014-07-21 Timothy Horton <timothy_horton@apple.com>
2983 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
2984 https://bugs.webkit.org/show_bug.cgi?id=135132
2985 <rdar://problem/17719832>
2987 Reviewed by Simon Fraser.
2989 * UIProcess/ProcessThrottler.cpp:
2990 (WebKit::ProcessThrottler::ProcessThrottler):
2991 (WebKit::ProcessThrottler::suspendTimerFired):
2992 * UIProcess/ProcessThrottler.h:
2993 * UIProcess/ios/ViewGestureControllerIOS.mm:
2994 (WebKit::ViewGestureController::ViewGestureController):
2995 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2996 * UIProcess/mac/ViewGestureController.h:
2997 * UIProcess/mac/ViewGestureControllerMac.mm:
2998 (WebKit::ViewGestureController::ViewGestureController):
2999 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
3000 We can't use WebCore timers in the UI process because of coexistence concerns
3001 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
3003 2014-07-21 Andy Estes <aestes@apple.com>
3005 [iOS] Handle QuickLook ResourceLoaders in the web process
3006 https://bugs.webkit.org/show_bug.cgi?id=135113
3008 Reviewed by David Kilzer.
3010 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
3011 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
3012 generated the main resource.
3014 * WebProcess/Network/WebResourceLoadScheduler.cpp:
3015 (WebKit::WebResourceLoadScheduler::scheduleLoad):
3017 2014-07-21 Brady Eidson <beidson@apple.com>
3019 DatabaseProcess doesn't relaunch after crashing.
3020 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
3022 Reviewed by Alexey Proskuryakov.
3024 * UIProcess/Databases/DatabaseProcessProxy.cpp:
3025 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
3027 * UIProcess/WebContext.cpp:
3028 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
3029 * UIProcess/WebContext.h:
3031 * UIProcess/WebContextSupplement.h:
3032 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
3034 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
3036 Fix warnings caused by unused parameter.
3037 https://bugs.webkit.org/show_bug.cgi?id=134975
3039 Reviewed by Gyuyoung Kim.
3041 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
3043 * UIProcess/API/efl/EwkView.cpp:
3044 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
3045 * UIProcess/LegacySessionStateCodingNone.cpp:
3046 (WebKit::decodeLegacySessionState):
3048 2014-07-20 Jeremy Jones <jeremyj@apple.com>
3050 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
3051 https://bugs.webkit.org/show_bug.cgi?id=134894
3053 Reviewed by Darin Adler.
3055 Add setCanPlayFastReverse
3057 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
3058 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
3059 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
3060 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
3062 2014-07-20 Jeremy Jones <jeremyj@apple.com>
3064 Decrease flicker when enter and exit fullscreen.
3065 https://bugs.webkit.org/show_bug.cgi?id=134919
3067 Reviewed by Simon Fraser.
3069 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
3071 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
3072 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
3073 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
3074 * WebProcess/ios/WebVideoFullscreenManager.mm:
3075 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
3077 2014-07-20 Dan Bernstein <mitz@apple.com>
3079 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
3080 https://bugs.webkit.org/show_bug.cgi?id=135099
3082 Reviewed by David Kilzer.
3084 * WebProcess/WebPage/ios/WebPageIOS.mm:
3085 (WebKit::WebPage::getPositionInformation): Added a null check.
3087 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
3089 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
3090 https://bugs.webkit.org/show_bug.cgi?id=135047
3092 Reviewed by Darin Adler.
3094 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
3095 in WebProcess as well.
3097 * WebProcess/WebPage/WebPage.h:
3098 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
3099 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3100 (WebKit::WebPage::setAcceleratedCompositingWindowId):
3102 2014-07-18 Oliver Hunt <oliver@apple.com>
3104 We don't provide an extension to the temp file used for uploads
3105 https://bugs.webkit.org/show_bug.cgi?id=135079
3107 Reviewed by Sam Weinig.
3109 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
3110 extensions for the files passed to the content process.
3112 * UIProcess/WebPageProxy.cpp:
3113 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
3115 2014-07-18 Tim Horton <timothy_horton@apple.com>
3117 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
3118 https://bugs.webkit.org/show_bug.cgi?id=135080
3119 <rdar://problem/17734714>
3121 Reviewed by Sam Weinig.
3123 * UIProcess/ios/ViewGestureControllerIOS.mm:
3124 (WebKit::ViewGestureController::beginSwipeGesture):
3125 (WebKit::ViewGestureController::canSwipeInDirection):
3127 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
3129 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
3130 https://bugs.webkit.org/show_bug.cgi?id=135077
3132 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
3133 doesn't have title attribute.
3135 Reviewed by Dan Bernstein.
3137 * WebProcess/WebPage/ios/WebPageIOS.mm:
3138 (WebKit::WebPage::getPositionInformation):
3140 2014-07-18 Andy Estes <aestes@apple.com>
3142 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
3143 https://bugs.webkit.org/show_bug.cgi?id=135072
3144 <rdar://problem/17528188>
3146 Reviewed by David Kilzer.
3148 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
3149 * Shared/mac/WebCoreArgumentCodersMac.mm:
3150 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
3151 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
3152 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3153 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
3154 * UIProcess/WebFrameProxy.cpp:
3155 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
3156 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
3157 If the unblock is successful, reload the WebPageProxy.
3158 * UIProcess/WebFrameProxy.h:
3159 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
3160 * UIProcess/WebPageProxy.cpp:
3161 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
3162 request and ignore if so.
3163 * UIProcess/WebPageProxy.h:
3164 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
3165 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3166 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
3167 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3169 2014-07-18 Simon Fraser <simon.fraser@apple.com>
3171 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
3172 https://bugs.webkit.org/show_bug.cgi?id=135078
3173 <rdar://problem/17401823>
3175 Reviewed by Tim Horton.
3177 Fix the logging of requested scroll position and frame scale factor.
3179 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3180 (WebKit::RemoteScrollingTreeTextStream::dump):
3182 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
3184 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
3185 https://bugs.webkit.org/show_bug.cgi?id=135062
3187 Reviewed by Anders Carlsson.
3189 Switch to RetainPtr instead of manual memory management of ivars.
3191 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
3192 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3193 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
3194 (-[_WKRemoteObjectInterface identifier]):
3195 (-[_WKRemoteObjectInterface description]):
3196 (-[_WKRemoteObjectInterface dealloc]): Deleted.
3198 2014-07-18 Tim Horton <timothy_horton@apple.com>
3200 Take navigation snapshots whenever the current back-forward item is going to change
3201 https://bugs.webkit.org/show_bug.cgi?id=135058
3202 <rdar://problem/17464515>
3204 Reviewed by Dan Bernstein.
3206 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
3207 snapshot whenever the Web process says that the current back-forward item is going to change.
3208 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
3209 just two places instead of 5.
3211 * UIProcess/WebPageProxy.cpp:
3212 (WebKit::WebPageProxy::goForward):
3213 (WebKit::WebPageProxy::goBack):
3214 (WebKit::WebPageProxy::goToBackForwardItem):
3215 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3216 We no longer need to special-case taking navigation snapshots
3217 when the UI process changes the back forward item or upon
3218 didStartProvisionalLoadForFrame, because we'll always snapshot
3219 in willChangeCurrentHistoryItem in all of these cases.
3221 * UIProcess/WebPageProxy.cpp:
3222 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
3223 * UIProcess/WebPageProxy.h:
3224 * UIProcess/WebPageProxy.messages.in:
3225 Add willChangeCurrentHistoryItem message, which comes from the Web process.
3226 When it arrives, take a navigation snapshot.
3228 * UIProcess/ios/ViewGestureControllerIOS.mm:
3229 (WebKit::ViewGestureController::beginSwipeGesture):
3230 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
3231 so that it doesn't bail from taking the snapshot because we have a snapshot up.
3233 (WebKit::ViewGestureController::endSwipeGesture):
3234 We no longer need to explicitly disable snapshotting while navigating, because
3235 we will avoid taking the snapshot if there's a snapshot being displayed.
3237 * UIProcess/mac/ViewGestureControllerMac.mm:
3238 (WebKit::ViewGestureController::~ViewGestureController):
3239 Remove the snapshot if it's still up when ViewGestureController is destroyed.
3240 The Mac version of ViewGestureController is destroyed on Web process crashes
3241 because it is a message receiver, so it is not guaranteed to have the same
3242 lifetime as the WebPageProxy and friends.
3244 (WebKit::ViewGestureController::trackSwipeGesture):
3245 Make use of recordNavigationSnapshot.
3247 (WebKit::ViewGestureController::endSwipeGesture):
3248 Ditto from the Mac version.
3250 * UIProcess/mac/ViewSnapshotStore.h:
3251 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
3252 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
3253 * UIProcess/mac/ViewSnapshotStore.mm:
3254 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
3255 (WebKit::ViewSnapshotStore::recordSnapshot):
3256 Remove the snapshot disabling mechanism and bail from snapshotting if we're
3257 showing a snapshot, as mentioned above.
3259 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3260 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
3261 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3262 * WebProcess/WebPage/WebPage.cpp:
3263 (WebKit::WebPage::willChangeCurrentHistoryItem):
3264 * WebProcess/WebPage/WebPage.h:
3265 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
3267 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
3269 REGRESSION: Crash when typing into text field that clears itself on iOS
3271 <https://bugs.webkit.org/show_bug.cgi?id=135044>
3272 <rdar://problem/17640443>
3274 Reviewed by Darin Adler.
3276 * WebProcess/WebPage/ios/WebPageIOS.mm:
3277 (WebKit::WebPage::requestAutocorrectionData):
3278 wordRangeFromPosition() returns null in some cases; null check range
3279 before dereferencing it. Moved some variable declarations around to
3280 better match our style.
3282 2014-07-18 Tim Horton <timothy_horton@apple.com>
3284 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
3285 https://bugs.webkit.org/show_bug.cgi?id=134999
3286 <rdar://problem/17238025>
3288 Reviewed by Sam Weinig.
3290 In some cases, clients may need to throw a WKWebView with no back-forward list over
3291 another WKWebView, and want to participate in gesture swipe as if they were actually
3292 the page being overlaid.
3294 * UIProcess/API/Cocoa/WKWebView.mm:
3295 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3296 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3297 (-[WKWebViewConfiguration copyWithZone:]):
3298 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
3299 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
3300 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3301 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
3302 will use as the real source of back-forward items, and the destination of the swipe navigation.
3303 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
3304 and will be doing the navigation.
3306 * UIProcess/ios/ViewGestureControllerIOS.mm:
3307 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
3308 (WebKit::ViewGestureController::beginSwipeGesture):
3309 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
3310 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
3311 so that when swiping forward from the alternate view, it will have the "right" snapshot.
3312 Get the target back forward item from the alternate view.
3313 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
3315 (WebKit::ViewGestureController::canSwipeInDirection):
3316 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
3318 (WebKit::ViewGestureController::endSwipeGesture):
3319 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
3320 Perform the navigation on the alternate view if necessary.
3322 (WebKit::ViewGestureController::removeSwipeSnapshot):
3323 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
3325 * UIProcess/mac/ViewGestureController.h:
3327 2014-07-17 David Kilzer <ddkilzer@apple.com>
3329 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
3330 <http://webkit.org/b/135006>
3332 Reviewed by Darin Adler.
3334 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
3336 * Configurations/DebugRelease.xcconfig: Remove empty
3337 SECTORDER_FLAGS definition.
3338 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
3339 SECTORDER_FLAGS is only set on Production builds.
3341 2014-07-17 Alexey Proskuryakov <ap@apple.com>
3343 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
3344 https://bugs.webkit.org/show_bug.cgi?id=135032
3345 <rdar://problem/17716602>
3347 Reviewed by Dan Bernstein.
3349 * UIProcess/WebPageProxy.cpp:
3350 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
3351 transaction in resetStateAfterProcessExited() wouldn't be committed.
3352 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
3353 the most important fact that this is a stack object that can't be simply moved to
3354 a different function.
3356 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
3358 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
3359 https://bugs.webkit.org/show_bug.cgi?id=135036
3361 Reviewed by Dan Bernstein.
3363 * WebProcess/WebPage/ios/WebPageIOS.mm:
3364 (WebKit::WebPage::updateVisibleContentRects):
3365 I forgot to update one of the condition after changing from lastTransaction to next transaction
3368 2014-07-17 Enrica Casucci <enrica@apple.com>
3370 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
3371 https://bugs.webkit.org/show_bug.cgi?id=135023
3372 <rdar://problem/17617282>
3374 Reviewed by Benjamin Poulain and Ryosuke Niwa.
3376 WKContentView needs to implement hasContent to correctly show
3377 the appropriate menu bar content. The patch adds this information
3380 * Shared/EditorState.cpp:
3381 (WebKit::EditorState::encode):
3382 (WebKit::EditorState::decode):
3383 * Shared/EditorState.h:
3384 (WebKit::EditorState::EditorState):
3385 * UIProcess/ios/WKContentViewInteraction.mm:
3386 (-[WKContentView hasContent]):
3387 * WebProcess/WebPage/WebPage.cpp:
3388 (WebKit::WebPage::editorState):
3390 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
3392 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
3393 https://bugs.webkit.org/show_bug.cgi?id=135010
3395 Reviewed by Darin Adler.
3397 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
3398 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
3400 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
3401 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
3402 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
3404 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
3407 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
3408 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
3409 is initialized, and doing an animated resize would trash the WebProcess state.
3410 I wish I had a better solution, this is not great.
3412 * UIProcess/API/Cocoa/WKWebView.mm:
3413 (-[WKWebView _processDidExit]):
3414 (-[WKWebView _didCommitLoadForMainFrame]):
3415 (-[WKWebView _didCommitLayerTree:]):
3416 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
3417 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
3418 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
3421 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
3422 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
3424 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
3425 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
3426 everything we need and does not use any synchronous messages.
3428 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3429 (-[WKWebView _restorePageStateToExposedRect:scale:]):
3430 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
3431 (-[WKWebView _scrollToContentOffset:]):
3432 (-[WKWebView _frameOrBoundsChanged]):
3433 (-[WKWebView _updateVisibleContentRects]):
3434 (-[WKWebView _setMinimumLayoutSizeOverride:]):
3435 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):