Fix test failures on the bot.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-05-23  Anders Carlsson  <andersca@apple.com>
2
3         Fix test failures on the bot.
4
5         * UIProcess/API/Cocoa/WKProcessPool.mm:
6         (websiteDataDirectoryURL):
7         If we have no bundle identifier, use the process name.
8
9 2014-05-23  Enrica Casucci  <enrica@apple.com>
10
11         REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
12         https://bugs.webkit.org/show_bug.cgi?id=133237
13         <rdar://problem/16655776>
14
15         Reviewed by Ryosuke Niwa.
16
17         * UIProcess/ios/WKContentViewInteraction.mm:
18         (-[WKContentView beginSelectionChange]):
19         (-[WKContentView endSelectionChange]):
20
21         When the selection is changed with a gesture in an editable element,
22         we must notify the keyboard to make sure the autocorrection engine 
23         updates its typing context. WKContentView must implement
24         beginSelectionChange and endSelectionChange to call into
25         the keyboard layer.
26
27 2014-05-22  Brent Fulgham  <bfulgham@apple.com>
28
29         [iOS] WK2: Provide implementation for windowFrame
30         https://bugs.webkit.org/show_bug.cgi?id=133205
31         <rdar://problem/16894890>
32
33         Reviewed by Benjamin Poulain.
34
35         * UIProcess/Cocoa/UIDelegate.h:
36         * UIProcess/Cocoa/UIDelegate.mm:
37         (WebKit::UIDelegate::UIClient::windowFrame): Added.
38         * UIProcess/ios/PageClientImplIOS.mm:
39         (WebKit::PageClientImpl::convertToUserSpace): Added.
40
41 2014-05-20  Anders Carlsson  <andersca@apple.com>
42
43         Use a per app directory structure for website data
44         https://bugs.webkit.org/show_bug.cgi?id=133125
45         <rdar://problem/16830143>
46
47         Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
48
49         Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
50         We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
51
52         * UIProcess/API/Cocoa/WKProcessPool.mm:
53         (websiteDataDirectoryURL):
54         (-[WKProcessPool _initWithConfiguration:]):
55
56 2014-05-23  Dan Bernstein  <mitz@apple.com>
57
58         [Cocoa] WKNavigationResponsePrivate.h is internal
59         https://bugs.webkit.org/show_bug.cgi?id=133218
60
61         Reviewed by Dean Jackson.
62
63         * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
64
65 2014-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
66
67         [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
68         https://bugs.webkit.org/show_bug.cgi?id=131024
69
70         Reviewed by Gustavo Noronha Silva.
71
72         Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
73         files that are now shared by GTK and EFL ports. These files call a
74         main method that wraps a new method ChildProcessMain that contains
75         the common code and uses a helper class for the platform specific
76         code. GTK+ and EFL ports implement that helper class for every process type.
77
78         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
79         (main):
80         * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
81         (WebKit::NetworkProcessMainUnix):
82         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
83         (WebKit::NetworkProcessMainUnix):
84         * NetworkProcess/unix/NetworkProcessMainUnix.h:
85         * PlatformEfl.cmake:
86         * PlatformGTK.cmake:
87         * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
88         (main):
89         * PluginProcess/unix/PluginProcessMainUnix.cpp:
90         (WebKit::webkitXError):
91         (WebKit::PluginProcessMainUnix):
92         * PluginProcess/unix/PluginProcessMainUnix.h:
93         * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
94         (WebKit::ChildProcessMainBase::parseCommandLine):
95         * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
96         (WebKit::ChildProcessMainBase::platformInitialize):
97         (WebKit::ChildProcessMainBase::platformFinalize):
98         (WebKit::ChildProcessMainBase::initializationParameters):
99         (WebKit::ChildProcessMain):
100         * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
101         (main):
102         * WebProcess/efl/WebProcessMainEfl.cpp:
103         (WebKit::WebProcessMainUnix):
104         (dummyExtensionErrorHandler): Deleted.
105         * WebProcess/gtk/WebProcessMainGtk.cpp:
106         (WebKit::WebProcessMainUnix):
107         * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
108
109 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
110
111         Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
112         https://bugs.webkit.org/show_bug.cgi?id=133082
113
114         Reviewed by Andreas Kling.
115
116         * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
117         This enforces a move instead of a copy if the decoded element's type is move-constructible.
118
119 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
120
121         Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
122         https://bugs.webkit.org/show_bug.cgi?id=133080
123
124         Reviewed by Andreas Kling.
125
126         * Platform/IPC/MessageDecoder.cpp:
127         (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
128         Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
129         and produces a copy otherwise.
130
131 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
132
133         [iOS][WK2] Add support for minimal-ui viewports
134         https://bugs.webkit.org/show_bug.cgi?id=133162
135
136         Reviewed by Simon Fraser.
137
138         In the WebKit2 layers, we have two parts to minimal-ui.
139         -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
140          Another part is freezing the state on page load.
141         -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
142          the UI clients about minimal-ui changes.
143
144         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
145         * UIProcess/API/Cocoa/WKWebView.mm:
146         (-[WKWebView _setUsesMinimalUI:]):
147         (-[WKWebView _usesMinimalUI]):
148         (-[WKWebView _didCommitLayerTree:WebKit::]):
149         (-[WKWebView _frameOrBoundsChanged]):
150         (-[WKWebView _minimumLayoutSizeOverride]):
151         (-[WKWebView _setMinimumLayoutSizeOverride:]):
152         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
153         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
154         (-[WKWebView _largestUnobscuredSizeOverride]):
155         (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
156         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
157         (setViewportConfigurationMinimumLayoutSize): Deleted.
158         * UIProcess/API/Cocoa/WKWebViewInternal.h:
159         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
160         * UIProcess/PageClient.h:
161         * UIProcess/WebPageProxy.h:
162         * UIProcess/WebPageProxy.messages.in:
163         * UIProcess/ios/PageClientImplIOS.h:
164         * UIProcess/ios/PageClientImplIOS.mm:
165         (WebKit::PageClientImpl::setUsesMinimalUI):
166         * UIProcess/ios/WebPageProxyIOS.mm:
167         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
168         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
169         (WebKit::WebPageProxy::setMaximumUnobscuredSize):
170         (WebKit::WebPageProxy::setUsesMinimalUI):
171         (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
172         * WebProcess/WebPage/WebPage.cpp:
173         (WebKit::WebPage::WebPage):
174         (WebKit::WebPage::didCommitLoad):
175         * WebProcess/WebPage/WebPage.h:
176         * WebProcess/WebPage/WebPage.messages.in:
177         * WebProcess/WebPage/ios/WebPageIOS.mm:
178         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
179         (WebKit::WebPage::setMaximumUnobscuredSize):
180         (WebKit::WebPage::willFlushLayers):
181         (WebKit::WebPage::dynamicViewportSizeUpdate):
182         (WebKit::WebPage::viewportConfigurationChanged):
183         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
184         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
185         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
186         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
187
188 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
189
190         [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
191         https://bugs.webkit.org/show_bug.cgi?id=133165
192         <rdar://problem/16283914>
193
194         Reviewed by Andy Estes.
195
196         It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
197         and is reset after WKContentView was destructed.
198         This patch cleans up the target-action on destruction to avoid accessing a destructed object.
199
200         * UIProcess/ios/WKContentViewInteraction.mm:
201         (-[WKContentView cleanupInteraction]):
202
203 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
204
205         Do not force a layout when changing the FixedLayoutSize in WebPage
206         https://bugs.webkit.org/show_bug.cgi?id=133167
207
208         Reviewed by Andreas Kling.
209
210         WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
211         This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
212
213         FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
214
215         * WebProcess/WebPage/WebPage.cpp:
216         (WebKit::WebPage::setFixedLayoutSize):
217
218 2014-05-22  Andreas Kling  <akling@apple.com>
219
220         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
221         <https://webkit.org/b/133197>
222         <rdar://problem/17011561>
223
224         Try to free up as much memory as possible before going into background.
225
226         Reviewed by Gavin Barraclough.
227
228         * WebProcess/WebProcess.cpp:
229         (WebKit::WebProcess::processWillSuspend):
230
231 2014-05-22  Andreas Kling  <akling@apple.com>
232
233         Hook up a setting for showing detailed logging during memory pressure relief.
234         <https://webkit.org/b/133194>
235
236         Plumb through the same setting that we used for detailed logging in WK1.
237
238         Reviewed by Gavin Barraclough.
239
240         * Shared/WebProcessCreationParameters.cpp:
241         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
242         (WebKit::WebProcessCreationParameters::encode):
243         (WebKit::WebProcessCreationParameters::decode):
244         * Shared/WebProcessCreationParameters.h:
245         * UIProcess/mac/WebContextMac.mm:
246         (WebKit::WebContext::platformInitializeWebProcess):
247         * WebProcess/cocoa/WebProcessCocoa.mm:
248         (WebKit::WebProcess::platformInitializeWebProcess):
249
250 2014-05-22  Andy Estes  <aestes@apple.com>
251
252         [iOS] Send shareable resources to QuickLook if enabled
253         https://bugs.webkit.org/show_bug.cgi?id=133189
254         <rdar://problem/17003995>
255
256         Reviewed by Brady Eidson.
257
258         Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
259         handle exists.
260
261         * Shared/ShareableResource.cpp:
262         (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
263         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
264         * Shared/ShareableResource.h:
265         * WebProcess/Network/WebResourceLoader.cpp:
266         (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
267         it via a CFDataRef.
268
269 2014-05-22  Martin Hock  <mhock@apple.com>
270
271         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
272         https://bugs.webkit.org/show_bug.cgi?id=133186
273         <rdar://problem/16583782>
274
275         Reviewed by Enrica Casucci.
276
277         * UIProcess/API/Cocoa/WKWebView.mm:
278         (-[WKWebView initWithFrame:configuration:]):
279         (-[WKWebView _contentSizeCategoryDidChange:]):
280         (-[WKWebView _contentSizeCategory]):
281         * UIProcess/WebPageProxy.h:
282         * UIProcess/ios/WebPageProxyIOS.mm:
283         (WebKit::WebPageProxy::contentSizeCategoryDidChange):
284         * WebProcess/WebPage/WebPage.h:
285         * WebProcess/WebPage/WebPage.messages.in:
286         * WebProcess/WebPage/ios/WebPageIOS.mm:
287         (WebKit::WebPage::contentSizeCategoryDidChange):
288
289 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
290
291         [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
292         https://bugs.webkit.org/show_bug.cgi?id=133187
293         <rdar://problem/16561084>
294
295         Reviewed by Tim Horton.
296
297         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
298         We already had it in WebContentService.Development, just not here.
299
300 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
301
302         [iOS][WK2] Application cache is broken
303         https://bugs.webkit.org/show_bug.cgi?id=133172
304         <rdar://problem/16994593>
305
306         Reviewed by Andy Estes.
307
308         * UIProcess/mac/WebContextMac.mm:
309         (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
310         path for application cache database (same as WebKit1).
311
312 2014-05-22  Enrica Casucci  <enrica@apple.com>
313
314         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
315         https://bugs.webkit.org/show_bug.cgi?id=133183
316         <rdar://problem/17004207>
317
318         Reviewed by Geoff Garen.
319
320         The keyboard type should be search if the input type is search
321         or if it is text and it is inside a form with an action and either
322         name, id or title contain the word search. This matches the
323         heuristics we have in WK1 for iOS.
324
325         * WebProcess/WebPage/ios/WebPageIOS.mm:
326         (WebKit::WebPage::getAssistedNodeInformation):
327
328 2014-05-21  Oliver Hunt  <oliver@apple.com>
329
330         Only enable sandbox extensions on mac.
331
332         RS = Alexey.
333
334         * WebKit2Prefix.h:
335
336 2014-05-21  Oliver Hunt  <oliver@apple.com>
337
338         [iOS] Enable sandboxing for the database process
339         https://bugs.webkit.org/show_bug.cgi?id=132963
340
341         Reviewed by Alexey Proskuryakov.
342
343         Simply ensure that the database process is running in a tight
344         sandbox. As part of this i've separated out ChildProcessIOS
345         and ensures that the database process loads a custom sandbox.
346
347         * Configurations/WebKit.xcconfig:
348         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
349         (WebKit::DatabaseProcess::initializeSandbox):
350         * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
351         * Shared/ios/ChildProcessIOS.mm: Added.
352         Essentially cloned from the Mac version, only all the OSX
353         specific logic has been stripped.
354         (WebKit::ChildProcess::setApplicationIsDaemon):
355         (WebKit::ChildProcess::platformInitialize):
356         (WebKit::ChildProcess::initializeSandbox):
357         (WebKit::ChildProcess::setQOS):
358         * Shared/mac/ChildProcessMac.mm:
359         Remove all the IOS ifdefs.
360         (WebKit::ChildProcess::setApplicationIsDaemon):
361         (WebKit::ChildProcess::platformInitialize):
362         (WebKit::ChildProcess::initializeSandbox):
363         (WebKit::ChildProcess::setQOS):
364         * WebKit2.xcodeproj/project.pbxproj:
365
366 2014-05-21  Andy Estes  <aestes@apple.com>
367
368         [iOS] Create a UIPrintFormatter for WKWebView
369         https://bugs.webkit.org/show_bug.cgi?id=133005
370
371         Reviewed by Tim Horton.
372
373         Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
374         Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
375         of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
376         returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
377         overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
378         UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
379         returned the PDF data to us by the time we print the first page.
380
381         * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
382         * UIProcess/API/Cocoa/WKWebView.mm:
383         (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
384         (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
385         (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
386         If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
387         compute page rects for printing and then return the number of rects.
388         (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
389         (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
390         received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
391         since failing to receive the data results in printing some number of blank pages).
392         (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
393         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
394         * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
395         * UIProcess/WKWebViewPrintFormatter.h: Added.
396         * UIProcess/WKWebViewPrintFormatter.mm: Added.
397         (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
398         (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
399         (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
400         and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
401         (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
402         -_pageContentRect.
403         (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
404         document into the given rect and context provided to us.
405         * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
406         * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
407         so that additoinal work could be performed after sending the response.
408         * UIProcess/ios/PageClientImplIOS.h:
409         * UIProcess/ios/PageClientImplIOS.mm:
410         (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
411         web process and called -[WKWebView _setPrintedDocument:].
412         * UIProcess/ios/WKPDFView.h:
413         * UIProcess/ios/WKPDFView.mm:
414         (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
415         (-[WKPDFView documentData]): Deleted.
416         * UIProcess/ios/WebPageProxyIOS.mm:
417         (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
418         * WebKit2.xcodeproj/project.pbxproj:
419         * WebProcess/WebPage/WebPage.cpp:
420         (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
421         (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
422         could be called by computePagesForPrintingAndStartDrawingToPDF.
423         (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
424         (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
425         by computePagesForPrintingAndStartDrawingToPDF.
426         * WebProcess/WebPage/WebPage.h:
427         * WebProcess/WebPage/WebPage.messages.in:
428         * WebProcess/WebPage/ios/WebPageIOS.mm:
429         (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
430         synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
431         WebPageProxy::DidFinishDrawingPagesToPDF.
432
433 2014-05-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
434
435         [EFL] Turn on ENABLE_CSS_FILTERS
436         https://bugs.webkit.org/show_bug.cgi?id=133153
437
438         Reviewed by Gyuyoung Kim.
439
440         Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
441
442         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
443         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
444
445 2014-05-21  Brady Eidson  <beidson@apple.com>
446
447         Special handling of telephone number detection menu.
448         <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
449
450         Reviewed by Geoff Garen.
451
452         Add a bool to ContextMenuContextData to represent telephone number menus:
453         * Shared/ContextMenuContextData.cpp:
454         (WebKit::ContextMenuContextData::ContextMenuContextData):
455         (WebKit::ContextMenuContextData::operator=):
456         (WebKit::ContextMenuContextData::encode):
457         (WebKit::ContextMenuContextData::decode):
458         * Shared/ContextMenuContextData.h:
459         (WebKit::ContextMenuContextData::ContextMenuContextData):
460         (WebKit::ContextMenuContextData::isTelephoneNumberContext):
461
462         * UIProcess/mac/WebContextMenuProxyMac.mm:
463         (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
464           number menu then display it using a specific AppKit API.
465
466         * UIProcess/mac/WebPageProxyMac.mm:
467         (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
468           through a new WKSI call, and then show it using a telephone number context.
469
470 2014-05-21  Alexey Proskuryakov  <ap@apple.com>
471
472         [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
473         https://bugs.webkit.org/show_bug.cgi?id=133128
474         <rdar://problem/16890920>
475
476         Reviewed by Anders Carlsson.
477
478         * UIProcess/API/mac/WKView.mm:
479         (-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
480         plug-in input. Before async text input, we used to provide a nil input context due
481         to having _data->_interpretKeyEventsParameters while this function was executing,
482         and thus took a shortcut. The new behavior is different from pre-async in that
483         we don't collect commands at all, but I couldn't find any case where that mattered.
484         (-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
485         replacement for _interpretKeyEventsParameters one, because this variable is not
486         always set within -_interpretKeyEvent:completionHandler:.
487
488         * UIProcess/mac/WKTextInputWindowController.mm:
489         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
490         While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
491         keep prediction pop-up on screen after hiding the bottom input window.
492
493 2014-05-16  Martin Robinson  <mrobinson@igalia.com>
494
495         [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
496         https://bugs.webkit.org/show_bug.cgi?id=132819
497
498         Reviewed by Carlos Garcia Campos.
499
500         * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
501         * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
502         * efl/EWebKit2Config.cmake.in: Ditto.
503         * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
504         * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
505         the common CMake ones.
506         * webkit2gtk.pc.in: Ditto.
507
508 2014-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
509
510         REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
511         https://bugs.webkit.org/show_bug.cgi?id=133118
512
513         Reviewed by Philippe Normand.
514
515         Call WebContext::applyPlatformSpecificConfigurationDefaults() to
516         initialize the WebContextConfiguration before creating the default WebContext.
517
518         * UIProcess/API/gtk/WebKitWebContext.cpp:
519         (createDefaultWebContext):
520
521 2014-05-21  Shivakumar JM  <shiva.jm@samsung.com>
522
523         [WebKit2] Cleanup the build from unused variable in WebProcess module
524         https://bugs.webkit.org/show_bug.cgi?id=133062
525
526         Reviewed by Csaba Osztrogonác.
527
528         Fix unused parameter by using UNUSED_PARAM macro
529
530         * WebProcess/UserContent/WebUserContentController.cpp:
531         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
532         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
533
534 2014-05-20  Enrica Casucci  <enrica@apple.com>
535
536         REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
537         https://bugs.webkit.org/show_bug.cgi?id=133140
538         <rdar://problem/16980898>
539
540         Reviewed by Benjamin Poulain.
541
542         When a page focuses a field on load, we receive the call to startAssistingNode
543         but we don't create a text interaction assistant if the focus is not originated
544         by a user action. Upon receiving the selection change notification we don't
545         call the text interaction assistant, since we don't have one, but we do call
546         the web selection assistant. We don't have any valid rects for web selection
547         and we clear the selection on the page, causing the caret not to appear and
548         the typing to have no effect.
549
550         * UIProcess/ios/WKContentViewInteraction.mm:
551         (-[WKContentView _updateChangedSelection]):
552
553 2014-05-20  Dean Jackson  <dino@apple.com>
554
555         [Mac] Allow popup menus to override default appearance
556         https://bugs.webkit.org/show_bug.cgi?id=133129
557
558         Reviewed by Tim Horton.
559
560         Add an extra "hideArrows" flag to PlatformPopupMenuData
561         and replace the call to WKPopupMenuWithSize with WKPopupMenu.
562
563         * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
564         (WebKit::PlatformPopupMenuData::encode):
565         (WebKit::PlatformPopupMenuData::decode):
566         * Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
567         * UIProcess/mac/WebPopupMenuProxyMac.mm:
568         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
569         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
570         (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
571         true if we don't have the default appearance.
572
573 2014-05-20  Eric Carlson  <eric.carlson@apple.com>
574
575         [Mac] do not deactivate an audio session that has running I/O
576         https://bugs.webkit.org/show_bug.cgi?id=133127
577
578         Reviewed by Jer Noble.
579
580         * WebProcess/WebPage/WebPage.cpp:
581         (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to 
582             setShouldManageAudioSessionCategory, deal with it.
583
584 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
585
586         REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
587         https://bugs.webkit.org/show_bug.cgi?id=133106
588         <rdar://problem/16967648>
589
590         Reviewed by Sam Weinig.
591
592         Fix regression from r169063. That commit removed scrolledContentsLayers from 
593         frame scrolling nodes, but they do actually use them.
594         
595         So put them back; not in the base class, because they have a somewhat different
596         meaning for overflow scrolling and frame scrolling.
597
598         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
599         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
600         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
601         (WebKit::RemoteScrollingTreeTextStream::dump):
602         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
603         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
604
605 2014-05-20  Alexey Proskuryakov  <ap@apple.com>
606
607         [Mac] WebProcess doesn't follow localization of UI process when run as a service
608         https://bugs.webkit.org/show_bug.cgi?id=133126
609         <rdar://problem/13396515>
610         <rdar://problem/16561084>
611
612         Reviewed by Sam Weinig and Tim Horton.
613
614         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
615         (WebKit::handleXPCBootstrap):
616         (main):
617         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
618         (WebKit::handleXPCBootstrap):
619         (main):
620         Set localization very early in process lifetime (in development builds, that's
621         even before WebKit framework is loaded).
622
623         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
624         Pass UI process localization to the service, computing it in the same way we do
625         for child processes.
626
627 2014-05-20  Anders Carlsson  <andersca@apple.com>
628
629         Fix a header comment
630         https://bugs.webkit.org/show_bug.cgi?id=133123
631         <rdar://problem/16973783>
632
633         Reviewed by Geoffrey Garen.
634
635         * UIProcess/API/Cocoa/WKUserContentController.h:
636
637 2014-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
638
639         [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
640         https://bugs.webkit.org/show_bug.cgi?id=133119
641
642         Reviewed by Sergio Villar Senin.
643
644         The problem is that we were checking whether the passed in
645         WKURLResponseRef is NULL or not, but it's always a valid object
646         that can contain a NULL WebCore::ResourceResponse.
647
648         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
649         (willSendRequestForFrame): Pass NULL as redirect-response
650         parameter of WebKitWebPage::send-request signal when the
651         WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
652
653 2014-05-20  Antti Koivisto  <antti@apple.com>
654
655         Double-tap zoom does not take obscuring insets into account
656         https://bugs.webkit.org/show_bug.cgi?id=133116
657         <rdar://problem/16765604>
658
659         Reviewed by Anders Carlsson.
660
661         * UIProcess/API/Cocoa/WKWebView.mm:
662         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
663         
664             Compute the zoom target taking insets into account.
665
666 2014-05-19  Gavin Barraclough  <baraclough@apple.com>
667
668         WebKit2/iOS: parented view should be considered hidden if app is backgrounded
669         https://bugs.webkit.org/show_bug.cgi?id=133099
670         radar://16942183
671
672         Reviewed by Simon Fraser.
673
674         * UIProcess/ios/PageClientImplIOS.mm:
675         (WebKit::PageClientImpl::isViewWindowActive):
676             - implemented in terms of isViewVisible.
677             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
678         (WebKit::PageClientImpl::isViewFocused):
679             - implemented in terms of isViewWindowActive.
680             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
681         (WebKit::PageClientImpl::isViewVisible):
682             - take UIApplication applicationState into account in determining visibility.
683         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
684             - implemented in terms of isViewVisible.
685         (WebKit::PageClientImpl::isVisuallyIdle):
686             - implemented in terms of isViewVisible.
687         * UIProcess/ios/WKContentView.mm:
688         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
689             - register for UIApplicationDidEnterBackgroundNotification.
690         (-[WKContentView _applicationDidEnterBackground:]):
691         (-[WKContentView _applicationWillEnterForeground:]):
692             - when the application state changes all flags except IsInWindow may be affected.
693
694 2014-05-19  Enrica Casucci  <enrica@apple.com>
695
696         WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
697         https://bugs.webkit.org/show_bug.cgi?id=133100
698         <rdar://problem/16808673>
699
700         Reviewed by Benjamin Poulain.
701
702         The call to focusNextAssistedNode is the result of a user action, since
703         it is called when the user pressed the form navigation buttons.
704         Therefore we must set m_userIsInteracting to true before changing the focus
705         to make sure the focus change is honored.
706
707         * WebProcess/WebPage/ios/WebPageIOS.mm:
708         (WebKit::WebPage::focusNextAssistedNode):
709
710 2014-05-19  Beth Dakin  <bdakin@apple.com>
711
712         TelephoneNumberOverlayController should use a modern loop for text quad bounding 
713         boxes
714         https://bugs.webkit.org/show_bug.cgi?id=133096
715
716         Reviewed by Anders Carlsson.
717
718         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
719         (WebKit::textQuadsToBoundingRectForRange):
720
721 2014-05-19  Jeremy Jones  <jeremyj@apple.com>
722
723         PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
724         https://bugs.webkit.org/show_bug.cgi?id=133025
725
726         Reviewed by Simon Fraser.
727
728         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
729         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
730         Initialize PlatformCALayerRemote properties from the PlatformLayer.
731
732 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
733
734         [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
735         https://bugs.webkit.org/show_bug.cgi?id=133026
736         <rdar://problem/16833971>
737
738         Reviewed by Simon Fraser.
739
740         When a page does not relayout, we keep the same width in view.
741         When a page relayout, we should keep the same relative width in view.
742
743         * WebProcess/WebPage/ios/WebPageIOS.mm:
744         (WebKit::isResponsiveDesignWithContentLargerThanLayout):
745         (WebKit::WebPage::dynamicViewportSizeUpdate):
746
747 2014-05-19  Benjamin Poulain  <benjamin@webkit.org>
748
749         [WK2] Add some missing state reset on crash
750         https://bugs.webkit.org/show_bug.cgi?id=133036
751
752         Reviewed by Sam Weinig.
753
754         * UIProcess/WebPageProxy.cpp:
755         (WebKit::WebPageProxy::resetState):
756         The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
757         touch events when it shouldn't. That would only be for an active touch sequence.
758
759         The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
760         to the new page on reload, that is very bad.
761
762         Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
763         the callbacks for dictation.
764
765 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
766
767         [iOS][WK2] Move scale noise filtering to the WebProcess
768         https://bugs.webkit.org/show_bug.cgi?id=133021
769
770         Reviewed by Darin Adler.
771
772         Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
773
774         The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
775         is already supported. It is a better place to have the filtering.
776
777         * UIProcess/ios/WKContentView.mm:
778         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
779         * WebProcess/WebPage/ios/WebPageIOS.mm:
780         (WebKit::WebPage::updateVisibleContentRects):
781
782 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
783
784         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
785         https://bugs.webkit.org/show_bug.cgi?id=133022
786
787         Reviewed by Sam Weinig.
788         
789         In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
790         into FrameScrolling and OverflowScrolling nodes.
791         
792         Move what was the "viewportSize" property onto the base class for the scrolling
793         nodes, calling it "scrollableAreaSize".
794         
795         Make minimum/maximumScrollPosition() virtual so we can share more code (and there
796         is more code sharing to be done in future).
797
798         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
799         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
800         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
801         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
802         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
803         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
804         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
805         (WebKit::encodeNodeAndDescendants):
806         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
807         (WebKit::RemoteScrollingTreeTextStream::dump):
808         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
809         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
810         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
811         (WebKit::RemoteScrollingTree::createNode):
812         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
813         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
814         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
815         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
816         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
817         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
818         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
819         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
820         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
821         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
822         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
823
824 2014-05-19  Alexey Proskuryakov  <ap@apple.com>
825
826         [Mac] Fix a typo in plug-in sandbox
827         https://bugs.webkit.org/show_bug.cgi?id=133074
828
829         Reviewed by Anders Carlsson.
830
831         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
832
833 2014-05-16  Andy Estes  <aestes@apple.com>
834
835         [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
836         https://bugs.webkit.org/show_bug.cgi?id=133010
837
838         Reviewed by Geoffrey Garen.
839
840         If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
841
842         * Platform/IPC/Connection.cpp:
843         (IPC::Connection::Connection):
844         (IPC::Connection::waitForMessage):
845         (IPC::Connection::connectionDidClose):
846         * Platform/IPC/Connection.h:
847
848 2014-05-19  Mark Rowe  <mrowe@apple.com>
849
850         Build fix after r169023.
851
852         * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
853         I hope for weinig's sake that no-one was relying on them.
854
855 2014-05-18  Anders Carlsson  <andersca@apple.com>
856
857         Relax an assertion when creating document loaders
858         https://bugs.webkit.org/show_bug.cgi?id=133058
859
860         Reviewed by Sam Weinig.
861
862         When navigating back/forward items recursively, createDocumentLoader will be called
863         for subframes before main frames so only associate the navigation with main frames.
864
865         * WebProcess/WebPage/WebPage.cpp:
866         (WebKit::WebPage::createDocumentLoader):
867
868 2014-05-18  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
869
870         CMake Buildfix after r169023.
871
872         Reviewed by Csaba Osztrogonác.
873
874         * CMakeLists.txt: Add new files after r168994.
875
876 2014-05-18  Sam Weinig  <sam@webkit.org>
877
878         [WebKit2] Implement ScriptMessageHandlers
879         https://bugs.webkit.org/show_bug.cgi?id=133053
880
881         Reviewed by Anders Carlsson.
882
883         * DerivedSources.make:
884         * Scripts/webkit2/messages.py:
885         (struct_or_class):
886         (argument_coder_headers_for_type):
887         (headers_for_type):
888         * UIProcess/API/Cocoa/WKScriptMessage.mm:
889         (-[WKScriptMessage _initWithBody:webView:name:]):
890         (-[WKScriptMessage body]):
891         (-[WKScriptMessage webView]):
892         (-[WKScriptMessage name]):
893         (-[WKScriptMessage _scriptWorld]): Deleted.
894         * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
895         * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
896         * UIProcess/API/Cocoa/WKUserContentController.mm:
897         (-[WKUserContentController addScriptMessageHandler:name:]):
898         (-[WKUserContentController removeScriptMessageHandlerForName:]):
899         (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
900         (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
901         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
902         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
903         * UIProcess/API/Cocoa/WKWebView.mm:
904         (pageToViewMap):
905         (fromWebPageProxy):
906         (-[WKWebView initWithFrame:configuration:]):
907         (-[WKWebView dealloc]):
908         * UIProcess/API/Cocoa/WKWebViewInternal.h:
909         * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
910         (WebKit::WebScriptMessageHandlerHandle::encode):
911         (WebKit::WebScriptMessageHandlerHandle::decode):
912         (WebKit::generateIdentifier):
913         (WebKit::WebScriptMessageHandler::create):
914         (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
915         (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
916         * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
917         (WebKit::WebScriptMessageHandler::Client::~Client):
918         (WebKit::WebScriptMessageHandler::handle):
919         (WebKit::WebScriptMessageHandler::identifier):
920         (WebKit::WebScriptMessageHandler::name):
921         (WebKit::WebScriptMessageHandler::client):
922         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
923         (WebKit::WebUserContentControllerProxy::addProcess):
924         (WebKit::WebUserContentControllerProxy::removeProcess):
925         (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
926         (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
927         (WebKit::WebUserContentControllerProxy::didPostMessage):
928         * UIProcess/UserContent/WebUserContentControllerProxy.h:
929         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
930         * WebKit2.xcodeproj/project.pbxproj:
931         * WebProcess/UserContent/WebUserContentController.cpp:
932         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
933         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
934         (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
935         (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
936         (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
937         (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
938         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
939         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
940         * WebProcess/UserContent/WebUserContentController.h:
941         * WebProcess/UserContent/WebUserContentController.messages.in:
942
943 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
944
945         support for navigator.hardwareConcurrency
946         https://bugs.webkit.org/show_bug.cgi?id=132588
947
948         Reviewed by Filip Pizlo.
949
950         * Configurations/FeatureDefines.xcconfig:
951
952 2014-05-18  Anders Carlsson  <andersca@apple.com>
953
954         Implement Navigations for all methods declared returning one
955         https://bugs.webkit.org/show_bug.cgi?id=133048
956         <rdar://problem/16830064>
957
958         Reviewed by Sam Weinig.
959
960         * UIProcess/API/Cocoa/WKWebView.mm:
961         (-[WKWebView goToBackForwardListItem:]):
962         (-[WKWebView goBack]):
963         (-[WKWebView goForward]):
964         (-[WKWebView reload]):
965         (-[WKWebView reloadFromOrigin]):
966         Create and return navigations.
967
968         (-[WKWebView _reload]):
969         Call -[WKWebView reload].
970
971         * UIProcess/Cocoa/NavigationState.h:
972         * UIProcess/Cocoa/NavigationState.mm:
973         (WebKit::NavigationState::createBackForwardNavigation):
974         Create a back/forward navigation.
975
976         (WebKit::NavigationState::createReloadNavigation):
977         Create a reload navigation.
978
979         * UIProcess/WebPageProxy.cpp:
980         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
981         Generate a navigation ID and send it with the GoToBackForwardItem message.
982
983         (WebKit::WebPageProxy::reload):
984         Return a navigation ID.
985
986         (WebKit::WebPageProxy::goForward):
987         Generate a navigation ID and send it with the GoForward message.
988         
989         (WebKit::WebPageProxy::goBack):
990         Generate a navigation ID and send it with the GoBack message.
991
992         (WebKit::WebPageProxy::goToBackForwardItem):
993         Generate a navigation ID and send it with the GoToBackForwardItem message.
994
995         * UIProcess/WebPageProxy.h:
996         Return navigation IDs where appropriate.
997
998         * UIProcess/cf/WebPageProxyCF.cpp:
999         (WebKit::WebPageProxy::restoreFromSessionStateData):
1000         Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
1001         
1002         * WebProcess/WebPage/WebPage.cpp:
1003         (WebKit::WebPage::goForward):
1004         (WebKit::WebPage::goBack):
1005         (WebKit::WebPage::goToBackForwardItem):
1006         Set up the pending navigation ID.
1007
1008         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
1009         Call goToBackForwardItem with a navigation ID.
1010
1011         * WebProcess/WebPage/WebPage.h:
1012         Add navigation IDs.
1013
1014         * WebProcess/WebPage/WebPage.messages.in:
1015         Add navigation IDs.
1016
1017 2014-05-18  Commit Queue  <commit-queue@webkit.org>
1018
1019         Unreviewed, rolling out r169001.
1020         https://bugs.webkit.org/show_bug.cgi?id=133050
1021
1022         We can't expose the C SPI from WKWebView (Requested by
1023         andersca on #webkit).
1024
1025         Reverted changeset:
1026
1027         "Need a way to get a WKPageRef from a WKWebView"
1028         https://bugs.webkit.org/show_bug.cgi?id=133015
1029         http://trac.webkit.org/changeset/169001
1030
1031 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1032
1033         [WK2][GTK] Buildfix after r168999.
1034
1035         Reviewed by Csaba Osztrogonác.
1036
1037         * UIProcess/gtk/WebContextGtk.cpp:
1038         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1039         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1040
1041 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1042
1043         [WK2][EFL] Buildfix after r168999.
1044
1045         Reviewed by Csaba Osztrogonác.
1046
1047         * UIProcess/efl/WebContextEfl.cpp:
1048         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1049         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1050
1051 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1052
1053         [WK2][cmake] Buildfix after r168994.
1054
1055         Reviewed by Csaba Osztrogonác.
1056
1057         * CMakeLists.txt: Added new files to the build system introduced in r168994.
1058
1059 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
1060
1061         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
1062         https://bugs.webkit.org/show_bug.cgi?id=133007
1063         <rdar://problem/13702706>
1064
1065         appcache tests often fail on the Mac WebKit2 bot
1066         https://bugs.webkit.org/show_bug.cgi?id=82061
1067
1068         Reviewed by Maciej Stachowiak.
1069
1070         * WebProcess/Network/WebResourceLoader.cpp:
1071         (WebKit::WebResourceLoader::willSendRequest):
1072         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
1073         (WebKit::WebResourceLoader::didFailResourceLoad):
1074         Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
1075         does. We should eventually come up with a way to share the code. Perhaps add a class that
1076         isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
1077         to be the class that isolates DocumentLoader from networking details. So, unsure.
1078
1079 2014-05-17  Jae Hyun Park  <jaepark@webkit.org>
1080
1081         [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
1082         https://bugs.webkit.org/show_bug.cgi?id=132774
1083
1084         Reviewed by Anders Carlsson.
1085
1086         m_contentPosition is not used anywhere. So, this patch removes
1087         m_contentPosition and reduces one unnecessary assignment in
1088         setViewportPosition. Also, it renames contentsPoint to contentsPosition.
1089
1090         * UIProcess/PageViewportControllerClient.h:
1091         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1092         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
1093         * UIProcess/efl/PageViewportControllerClientEfl.h:
1094
1095 2014-05-17  David Kilzer  <ddkilzer@apple.com>
1096
1097         Need a way to get a WKPageRef from a WKWebView
1098         <http://webkit.org/b/133015>
1099
1100         Reviewed by Benjamin Poulain.
1101
1102         * UIProcess/API/Cocoa/WKWebView.mm:
1103         (-[WKWebView _pageRef]): Added.
1104         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1105         (-[WKWebView _pageRef]): Added declaration.
1106
1107 2014-05-17  Anders Carlsson  <andersca@apple.com>
1108
1109         Give user scripts custom URLs
1110         https://bugs.webkit.org/show_bug.cgi?id=133035
1111
1112         Reviewed by Beth Dakin.
1113
1114         * UIProcess/API/Cocoa/WKUserContentController.mm:
1115         (-[WKUserContentController addUserScript:]):
1116         Create a user-script:<number> URL for user scripts.
1117
1118         * UIProcess/API/Cocoa/WKUserScript.h:
1119         Move the init method after the properties.
1120
1121 2014-05-17  Anders Carlsson  <andersca@apple.com>
1122
1123         Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
1124         https://bugs.webkit.org/show_bug.cgi?id=133033
1125         <rdar://problem/16830143>
1126
1127         Reviewed by Sam Weinig.
1128
1129         * Shared/WebProcessCreationParameters.cpp:
1130         (WebKit::WebProcessCreationParameters::encode):
1131         (WebKit::WebProcessCreationParameters::decode):
1132         * Shared/WebProcessCreationParameters.h:
1133         Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
1134
1135         * UIProcess/API/C/WKContext.cpp:
1136         (WKContextSetDatabaseDirectory): Deleted.
1137         This is no longer needed.
1138
1139         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1140         (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
1141         (WKContextConfigurationSetIndexedDBDatabaseDirectory):
1142         (WKContextConfigurationCopyWebSQLDatabaseDirectory):
1143         (WKContextConfigurationSetWebSQLDatabaseDirectory):
1144         * UIProcess/API/C/WKContextConfigurationRef.h:
1145         Add setters and getters.
1146
1147         * UIProcess/API/C/WKContextPrivate.h:
1148         Remove WKContextSetDatabaseDirectory.
1149
1150         * UIProcess/APIContextConfiguration.cpp:
1151         (API::ContextConfiguration::webContextConfiguration):
1152         Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
1153
1154         * UIProcess/APIContextConfiguration.h:
1155         (API::ContextConfiguration::indexedDBDatabaseDirectory):
1156         (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
1157         (API::ContextConfiguration::webSQLDatabaseDirectory):
1158         (API::ContextConfiguration::setWebSQLDatabaseDirectory):
1159         Add getters and setters to the C++ part of WKContextConfigurationRef.
1160
1161         * UIProcess/WebContext.cpp:
1162         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1163         Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
1164
1165         (WebKit::WebContext::WebContext):
1166         Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
1167
1168         (WebKit::WebContext::ensureDatabaseProcess):
1169         Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
1170
1171         (WebKit::WebContext::createNewWebProcess):
1172         Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
1173
1174         * UIProcess/mac/WebContextMac.mm:
1175         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
1176         Rename this to indicate that it's about WebSQL databases.
1177
1178         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
1179         Add this.
1180
1181         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1182         (WebKit::WebDatabaseManager::initialize):
1183         Update for WebProcessCreationParameters rename.
1184
1185         * WebProcess/cocoa/WebProcessCocoa.mm:
1186         (WebKit::WebProcess::platformInitializeWebProcess):
1187         Update for WebProcessCreationParameters rename.
1188
1189 2014-05-17  Brent Fulgham  <bfulgham@apple.com>
1190
1191         [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
1192         https://bugs.webkit.org/show_bug.cgi?id=133024
1193
1194         Reviewed by Sam Weinig.
1195
1196         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1197         (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
1198         time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
1199         phone numbers to interact with.
1200
1201 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
1202
1203         NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
1204         https://bugs.webkit.org/show_bug.cgi?id=133032
1205         <rdar://problem/16951630>
1206
1207         Reviewed by Geoffrey Garen.
1208
1209         Replaced assertions with runtime checks. This can happen if NetworkProcess previously
1210         crashed for any unrelated reason.
1211
1212         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1213         (WebKit::NetworkBlobRegistry::registerBlobURL):
1214         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1215         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1216
1217 2014-05-17  Anders Carlsson  <andersca@apple.com>
1218
1219         -[WKWebView dealloc] should close the page
1220         https://bugs.webkit.org/show_bug.cgi?id=133031
1221         <rdar://problem/16929815>
1222
1223         Reviewed by Simon Fraser.
1224
1225         * UIProcess/API/Cocoa/WKWebView.mm:
1226         (-[WKWebView dealloc]):
1227
1228 2014-05-16  Anders Carlsson  <andersca@apple.com>
1229
1230         Expose WKUserScript as API
1231         https://bugs.webkit.org/show_bug.cgi?id=133017
1232         <rdar://problem/16948059>
1233
1234         Reviewed by Sam Weinig.
1235
1236         * DerivedSources.make:
1237         Add WebUserContentController.
1238
1239         * Shared/API/Cocoa/WebKit.h:
1240         Add WKUserScript.h
1241
1242         * Shared/API/c/WKSharedAPICast.h:
1243         (WebKit::toUserScriptInjectionTime):
1244         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1245
1246         * Shared/API/c/WKUserScriptInjectionTime.h:
1247         Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
1248
1249         * Shared/WebPageCreationParameters.cpp:
1250         (WebKit::WebPageCreationParameters::encode):
1251         Encode the user content controller ID.
1252
1253         (WebKit::WebPageCreationParameters::decode):
1254         Decode the user content controller ID.
1255
1256         * Shared/WebPageCreationParameters.h:
1257         Add userContentControllerID.
1258
1259         * UIProcess/API/C/WKPageGroup.cpp:
1260         (WKPageGroupAddUserScript):
1261         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1262
1263         * UIProcess/API/C/WKPageGroup.h:
1264         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1265
1266         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1267         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1268
1269         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1270         (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
1271         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1272
1273         * UIProcess/API/Cocoa/WKUserContentController.h:
1274         Add new methods.
1275
1276         * UIProcess/API/Cocoa/WKUserContentController.mm:
1277         (-[WKUserContentController init]):
1278         Create the WebUserContentControllerProxy object and user scripts array.
1279
1280         (-[WKUserContentController userScripts]):
1281         Return the user scripts array.
1282
1283         (toWebCoreUserScriptInjectionTime):
1284         Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
1285
1286         (-[WKUserContentController addUserScript:]):
1287         Call through to the _userContentControllerProxy object.
1288
1289         (-[WKUserContentController removeAllUserScripts]):
1290         Call through to the _userContentControllerProxy object.
1291         
1292         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
1293         Add WebUserContentControllerProxy ivar.
1294
1295         * UIProcess/API/Cocoa/WKUserScript.h: Added.
1296         Add new header.
1297
1298         * UIProcess/API/Cocoa/WKUserScript.mm:
1299         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
1300         Initialize the WKUserScript object.
1301
1302         (-[WKUserScript source]):
1303         (-[WKUserScript injectionTime]):
1304         (-[WKUserScript isForMainFrameOnly]):
1305         Add getters.
1306
1307         (-[WKUserScript copyWithZone:]):
1308         Since WKUserScript is immutable, just return a retained object.
1309
1310         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
1311         Add ivars.
1312
1313         * UIProcess/API/Cocoa/WKWebView.mm:
1314         (-[WKWebView initWithFrame:configuration:]):
1315         Set the user content controller from the configuration.
1316
1317         * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
1318         (WebKit::generateIdentifier):
1319         Return a unique identifier.
1320
1321         (WebKit::WebUserContentControllerProxy::create):
1322         Return a new WebUserContentControllerProxy object.
1323
1324         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1325         Initialize m_identifier.
1326
1327         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
1328         Add destructor.
1329
1330         (WebKit::WebUserContentControllerProxy::addProcess):
1331         Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
1332
1333         (WebKit::WebUserContentControllerProxy::removeProcess):
1334         Remove the process from m_processes.
1335
1336         (WebKit::WebUserContentControllerProxy::addUserScript):
1337         Add the user script and let all the web processes know that it was added.
1338
1339         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1340         Remove all user scripts and tell all the web processes about it.
1341         
1342         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1343         Add new class.
1344
1345         * UIProcess/WebPageProxy.cpp:
1346         (WebKit::WebPageProxy::WebPageProxy):
1347         If the process is already running, add it to the user content controller.
1348
1349         (WebKit::WebPageProxy::close):
1350         If the process is running, remove it from the user content controller.
1351
1352         (WebKit::WebPageProxy::connectionWillOpen):
1353         Add the process to the user content controller.
1354
1355         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1356         Remove the process from the user content controller.
1357
1358         (WebKit::WebPageProxy::creationParameters):
1359         Pass along the user content controller ID when creating the web page.
1360
1361         * UIProcess/WebPageProxy.h:
1362         Add a WebUserContentControllerProxy object to the web page configuration.
1363
1364         * WebKit2.xcodeproj/project.pbxproj:
1365         Add new files.
1366
1367         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1368         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1369         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1370         
1371         * WebProcess/UserContent/WebUserContentController.cpp: Added.
1372         New class that manages a WebCore::UserContentController object.
1373
1374         (WebKit::WebUserContentController::getOrCreate):
1375         Look up (or create) a WebUserContentController object given its identifier.
1376
1377         (WebKit::WebUserContentController::WebUserContentController):
1378         Add ourselves as a message receiver.
1379
1380         (WebKit::WebUserContentController::~WebUserContentController):
1381         Remove ourselves as a message receiver.
1382
1383         (WebKit::WebUserContentController::addUserScripts):
1384         Add all passed in user scripts to the WebCore user content controller object.
1385
1386         (WebKit::WebUserContentController::removeAllUserScripts):
1387         Remove all user scripts from the WebCore user content controller object.
1388
1389         * WebProcess/UserContent/WebUserContentController.messages.in: Added.
1390         Add new messages file.
1391
1392         * WebProcess/WebPage/WebPage.cpp:
1393         (WebKit::WebPage::WebPage):
1394         Get a WebUserContentController object and pass it along to WebCore.
1395
1396         * WebProcess/WebPage/WebPage.h:
1397         Add WebUserContentController member.
1398
1399 2014-05-16  Piotr Grad  <p.grad@samsung.com>
1400
1401         [GTK] Build break after 168978.
1402         https://bugs.webkit.org/show_bug.cgi?id=133012.
1403
1404         Reviewed by Simon Fraser.
1405
1406         * UIProcess/API/gtk/WebKitSettings.cpp:
1407         (webKitSettingsConstructed):
1408
1409 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
1410
1411         Put back a symbol removed in r168978 that Safari needs, but deprecate it.
1412
1413         Reviewed by Anders Carlsson.
1414
1415         * Shared/API/c/WKDeprecatedFunctions.cpp:
1416         (WKPreferencesSetRegionBasedColumnsEnabled):
1417         (WKPreferencesGetRegionBasedColumnsEnabled):
1418
1419 2014-05-16  Oliver Hunt  <oliver@apple.com>
1420
1421         Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
1422         https://bugs.webkit.org/show_bug.cgi?id=133016
1423
1424         Reviewed by Alexey Proskuryakov.
1425
1426         Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
1427         and switch over to it in the places that extensions are used.
1428
1429         * Shared/SandboxExtension.h:
1430         * Shared/mac/SandboxExtensionMac.mm:
1431         * UIProcess/WebPageProxy.cpp:
1432         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1433         * WebKit2Prefix.h:
1434         * WebProcess/WebPage/WebPage.cpp:
1435         * WebProcess/WebPage/WebPage.h:
1436         * WebProcess/WebPage/WebPage.messages.in:
1437         * WebProcess/cocoa/WebProcessCocoa.mm:
1438         (WebKit::WebProcess::platformInitializeWebProcess):
1439
1440 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
1441
1442         [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
1443         https://bugs.webkit.org/show_bug.cgi?id=132937
1444         <rdar://problem/16710097>
1445
1446         Reviewed by Simon Fraser.
1447
1448         When responsive websites have the content size lay out larger than the minimal layout size,
1449         we should not keep the relative horizontal position into view,
1450         many of those websites have all the content on the left.
1451
1452         * WebProcess/WebPage/ios/WebPageIOS.mm:
1453         (WebKit::WebPage::dynamicViewportSizeUpdate):
1454
1455 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
1456
1457         [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
1458         https://bugs.webkit.org/show_bug.cgi?id=132972
1459
1460         Reviewed by Simon Fraser.
1461
1462         When we set the content offset, UIScrollView limits the value to the current valid range for
1463         content size. Since the content size was only updated after the animation, when the first frame
1464         comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
1465
1466         To fix this, set the expected future content size before changing the offset.
1467
1468         During the animation, the content size could have changed arbitrarily. At the end of the animation,
1469         we take the actual frame and set the definite content size.
1470         Any update after that will be regular updates through didCommitLayer. 
1471
1472         * UIProcess/API/Cocoa/WKWebView.mm:
1473         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1474         (-[WKWebView _endAnimatedResize]):
1475
1476 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
1477
1478         Remove "region-based columns" prefs
1479         https://bugs.webkit.org/show_bug.cgi?id=133006
1480         <rdar://problem/16945824>
1481
1482         Reviewed by Dave Hyatt.
1483
1484         Remove "region-based columns" prefs and related code, since this is only
1485         way to render columns now.
1486
1487         * Shared/WebPreferencesStore.h:
1488         * UIProcess/API/C/WKPreferences.cpp:
1489         (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
1490         (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
1491         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1492         * WebProcess/WebPage/WebPage.cpp:
1493         (WebKit::WebPage::updatePreferences):
1494
1495 2014-05-16  Brent Fulgham  <bfulgham@apple.com>
1496
1497         Work around bug in Silverlight
1498         https://bugs.webkit.org/show_bug.cgi?id=133004
1499
1500         Reviewed by Anders Carlsson.
1501
1502         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1503         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
1504         to user defaults prior to NSApplication invocation. This code was moved from
1505         PluginProcess::platformInitializeProcess.
1506         * PluginProcess/mac/PluginProcessMac.mm:
1507         (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
1508         setting to PluginProcessMainDelegate.
1509
1510 2014-05-16  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1511
1512         [WK2] Change the remaining framework includes from WebKit2 to WebKit
1513         https://bugs.webkit.org/show_bug.cgi?id=132956
1514
1515         Reviewed by Sam Weinig.
1516
1517         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1518         * NetworkProcess/unix/NetworkProcessMainUnix.h:
1519         * PluginProcess/unix/PluginProcessMainUnix.h:
1520         * Shared/API/c/cairo/WKImageCairo.h:
1521         * Shared/API/c/cf/WKURLRequestCF.h:
1522         * Shared/API/c/cf/WKURLResponseCF.h:
1523         * Shared/API/c/efl/WKArrayEfl.cpp:
1524         * Shared/API/c/efl/WKArrayEfl.h:
1525         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1526         * UIProcess/API/C/WKBatteryManager.h:
1527         * UIProcess/API/C/WKBatteryStatus.h:
1528         * UIProcess/API/C/WKGrammarDetail.h:
1529         * UIProcess/API/C/WKTextChecker.h:
1530         * UIProcess/API/C/WKVibration.h:
1531         * UIProcess/API/C/WKViewportAttributes.h:
1532         * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
1533         * UIProcess/API/C/efl/WKAPICastEfl.h:
1534         * UIProcess/API/C/efl/WKColorPickerResultListener.h:
1535         * UIProcess/API/C/efl/WKEventEfl.h:
1536         * UIProcess/API/C/efl/WKPageEfl.h:
1537         * UIProcess/API/C/efl/WKPopupItem.h:
1538         * UIProcess/API/C/efl/WKPopupMenuListener.h:
1539         * UIProcess/API/C/efl/WKViewEfl.cpp:
1540         * UIProcess/API/C/efl/WKViewEfl.h:
1541         * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
1542         * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
1543         * UIProcess/API/C/gtk/WKView.h:
1544         * UIProcess/API/C/gtk/WKViewPrivate.h:
1545         * UIProcess/API/C/soup/WKContextSoup.h:
1546         * UIProcess/API/C/soup/WKCookieManagerSoup.h:
1547         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
1548         * UIProcess/API/C/soup/WKSoupRequestManager.h:
1549         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
1550         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
1551         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
1552         * UIProcess/API/cpp/efl/WKEinaSharedString.h:
1553         * UIProcess/API/efl/EwkView.cpp:
1554         * UIProcess/API/efl/EwkView.h:
1555         * UIProcess/API/efl/EwkViewCallbacks.h:
1556         * UIProcess/API/efl/GestureRecognizer.h:
1557         * UIProcess/API/efl/ewk_application_cache_manager_private.h:
1558         * UIProcess/API/efl/ewk_auth_request_private.h:
1559         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
1560         * UIProcess/API/efl/ewk_back_forward_list_private.h:
1561         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1562         * UIProcess/API/efl/ewk_context_private.h:
1563         * UIProcess/API/efl/ewk_cookie_manager_private.h:
1564         * UIProcess/API/efl/ewk_database_manager_private.h:
1565         * UIProcess/API/efl/ewk_error_private.h:
1566         * UIProcess/API/efl/ewk_favicon_database_private.h:
1567         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
1568         * UIProcess/API/efl/ewk_page_group_private.h:
1569         * UIProcess/API/efl/ewk_popup_menu_item_private.h:
1570         * UIProcess/API/efl/ewk_popup_menu_private.h:
1571         * UIProcess/API/efl/ewk_security_origin_private.h:
1572         * UIProcess/API/efl/ewk_settings_private.h:
1573         * UIProcess/API/efl/ewk_storage_manager_private.h:
1574         * UIProcess/API/efl/ewk_view.cpp:
1575         * UIProcess/API/efl/ewk_view_private.h:
1576         * UIProcess/API/efl/ewk_window_features_private.h:
1577         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
1578         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
1579         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1580         * UIProcess/API/gtk/WebKitPrivate.h:
1581         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1582         * UIProcess/efl/BatteryProvider.h:
1583         * UIProcess/efl/ContextHistoryClientEfl.h:
1584         * UIProcess/efl/DownloadManagerEfl.h:
1585         * UIProcess/efl/FindClientEfl.h:
1586         * UIProcess/efl/FormClientEfl.h:
1587         * UIProcess/efl/PageLoadClientEfl.h:
1588         * UIProcess/efl/PagePolicyClientEfl.h:
1589         * UIProcess/efl/PageUIClientEfl.h:
1590         * UIProcess/efl/RequestManagerClientEfl.h:
1591         * UIProcess/efl/TextCheckerClientEfl.h:
1592         * UIProcess/efl/VibrationClientEfl.h:
1593         * UIProcess/efl/ViewClientEfl.cpp:
1594         * UIProcess/efl/ViewClientEfl.h:
1595         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1596         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1597         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1598         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
1599         * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
1600         * WebProcess/efl/WebProcessMainEfl.cpp:
1601         * WebProcess/efl/WebProcessMainEfl.h:
1602         * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
1603         * WebProcess/gtk/WebProcessMainGtk.cpp:
1604         * WebProcess/gtk/WebProcessMainGtk.h:
1605         * mac/WKPreferences.h:
1606
1607 2014-05-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1608
1609         [EFL][WK2] Skip failing unit tests
1610         https://bugs.webkit.org/show_bug.cgi?id=132979
1611
1612         Reviewed by Daniel Bates.
1613
1614         * PlatformEfl.cmake: Skip failing unit tests for now.
1615
1616 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
1617
1618         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
1619         https://bugs.webkit.org/show_bug.cgi?id=132978
1620         <rdar://problem/16894428>
1621
1622         Reviewed by Benjamin Poulain.
1623         
1624         Move the static function fixedPositionRectFromExposedRect() to a member function on
1625         WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
1626         rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
1627         move fixed elements outside the document.
1628         
1629         * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
1630         * UIProcess/WebPageProxy.h:
1631         * UIProcess/ios/PageClientImplIOS.h:
1632         * UIProcess/ios/PageClientImplIOS.mm:
1633         (WebKit::PageClientImpl::minimumZoomScale):
1634         (WebKit::PageClientImpl::contentsSize):
1635         * UIProcess/ios/WKContentView.mm:
1636         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1637         Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
1638         for the ScrollingCoordinator update.
1639         (adjustedUnexposedEdge): Deleted.
1640         (adjustedUnexposedMaxEdge): Deleted.
1641         (fixedPositionRectFromExposedRect): Deleted.
1642         * UIProcess/ios/WebPageProxyIOS.mm:
1643         (WebKit::adjustedUnexposedEdge):
1644         (WebKit::adjustedUnexposedMaxEdge):
1645         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
1646         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1647         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
1648         was being updated while scrolling; we now pass the correct rect.
1649
1650 2014-05-15  Mark Rowe  <mrowe@apple.com>
1651
1652         <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
1653
1654         Discovery of sharing services can require disk access and IPC. Since the interface to
1655         ServicesController is already asynchronous, we can easily perform the discovery on a
1656         background queue. This can eliminate tens to hundreds of milliseconds worth of work
1657         from the main thread when creating the first web process.
1658
1659         Reviewed by Brady Eidson.
1660
1661         * UIProcess/mac/ServicesController.h:
1662         * UIProcess/mac/ServicesController.mm:
1663         (WebKit::ServicesController::ServicesController):
1664         (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
1665         in the process of refreshing the services. Kick the discovery over to a background queue,
1666         with it hopping back to the main queue to update the actual state and notify any contexts
1667         that were interested.
1668
1669 2014-05-15  Dan Bernstein  <mitz@apple.com>
1670
1671         Fixed a typo in a comment and updated previous change log entry.
1672
1673         * WebProcess/WebPage/ios/WebPageIOS.mm:
1674         (WebKit::WebPage::elementDidFocus):
1675
1676 2014-05-15  Dan Bernstein  <mitz@apple.com>
1677
1678         <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
1679         https://bugs.webkit.org/show_bug.cgi?id=132974
1680
1681         Reviewed by Enrica Casucci.
1682
1683         * WebProcess/WebPage/ios/WebPageIOS.mm:
1684         (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
1685         focus isn’t user-initiated, because in that case the UI process will bail out of
1686         -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
1687         calling the -_webView:didStartInputSession:.
1688
1689 2014-05-15  Benjamin Poulain  <bpoulain@apple.com>
1690
1691         [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
1692         https://bugs.webkit.org/show_bug.cgi?id=132941
1693         <rdar://problem/16921557>
1694
1695         Reviewed by Tim Horton.
1696
1697         Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
1698         we end up with invalid contentOffsets.
1699
1700         To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
1701         happens.
1702
1703         * UIProcess/API/Cocoa/WKWebView.mm:
1704         (-[WKWebView _endAnimatedResize]):
1705
1706 2014-05-15  Tim Horton  <timothy_horton@apple.com>
1707
1708         WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
1709         https://bugs.webkit.org/show_bug.cgi?id=132944
1710         <rdar://problem/15769454>
1711
1712         Reviewed by Simon Fraser.
1713
1714         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1715         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1716         If a layer flush occurs and we have an active transient zoom,
1717         re-apply the transient zoom to the relevant platform layers, because
1718         WebCore might have overwritten the relevant layer properties.
1719
1720         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1721         Reset m_transientZoomScale before flushLayers() so that we don't
1722         re-apply the transient zoom when we're actually trying to commit it.
1723
1724 2014-05-15  Alex Christensen  <achristensen@webkit.org>
1725
1726         Add pointer lock to features without enabling it.
1727         https://bugs.webkit.org/show_bug.cgi?id=132961
1728
1729         Reviewed by Sam Weinig.
1730
1731         * Configurations/FeatureDefines.xcconfig:
1732         Added ENABLE_POINTER_LOCK to list of features.
1733
1734 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
1735
1736         [UI-side compositing] Fix copying animations between layers, and pausing them
1737         https://bugs.webkit.org/show_bug.cgi?id=132943
1738         <rdar://problem/16906369&16906541>
1739
1740         Reviewed by Tim Horton.
1741         
1742         Fix PlatformCAAnimationRemote to support animation copying, and to record
1743         the beginTime for implicitly started animations. This fixes animation pausing,
1744         and copying of animations between layers when they go between tiled and non-tiled.
1745         
1746         This requires sending the animation key back through animationDidStart() so that
1747         we can record this beginTime on the PlatformCAAnimationRemote in the web process.
1748         This path doesn't set the "hasExplicitBeginTime" flag.
1749         
1750         PlatformCAAnimationRemote also now stores a hash of active animations, so that
1751         it can implement animationForKey(), and record the beginTime.
1752
1753         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1754         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1755         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
1756         * UIProcess/mac/RemoteLayerTreeHost.h:
1757         * UIProcess/mac/RemoteLayerTreeHost.mm:
1758         (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
1759         animation; sadly CA doesn't give us an easier way.
1760         * WebProcess/WebPage/DrawingArea.h:
1761         (WebKit::DrawingArea::acceleratedAnimationDidStart):
1762         * WebProcess/WebPage/DrawingArea.messages.in:
1763         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1764         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1765         (-[WKAnimationDelegate animationDidStart:]):
1766         (WebKit::PlatformCAAnimationRemote::copy):
1767         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
1768         (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
1769         (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
1770         (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
1771         (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
1772         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
1773         (WebKit::addAnimationToLayer):
1774         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1775         (WebKit::PlatformCALayerRemote::addAnimationForKey):
1776         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
1777         (WebKit::PlatformCALayerRemote::animationForKey):
1778         (WebKit::PlatformCALayerRemote::animationStarted):
1779         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1780         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1781         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1782         (WebKit::RemoteLayerTreeContext::animationDidStart):
1783         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1784         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1785         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
1786
1787 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
1788
1789         Clean up "has non-zero begin time" terminology in animations
1790         https://bugs.webkit.org/show_bug.cgi?id=132942
1791
1792         Reviewed by Tim Horton.
1793
1794         Change the "non-zero beginTime" terminology in the platform CA animations
1795         code to "explicit beginTime": this flag really means that we explicitly set
1796         the beginTime of the animation, rather than let CA set the beginTime when
1797         committing the animation. This flag is used for animations with negative
1798         delay, and when pausing.
1799
1800         * Shared/mac/RemoteLayerTreeTransaction.mm:
1801         (WebKit::RemoteLayerTreeTextStream::operator<<):
1802         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1803         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1804         (-[WKAnimationDelegate animationDidStart:]):
1805         (WebKit::PlatformCAAnimationRemote::Properties::encode):
1806         (WebKit::PlatformCAAnimationRemote::Properties::decode):
1807         (WebKit::PlatformCAAnimationRemote::setBeginTime):
1808         (WebKit::addAnimationToLayer):
1809
1810 2014-05-15  Tim Horton  <timothy_horton@apple.com>
1811
1812         [iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
1813         https://bugs.webkit.org/show_bug.cgi?id=132934
1814
1815         Reviewed by Simon Fraser.
1816
1817         * UIProcess/API/Cocoa/WKWebView.mm:
1818         (-[WKWebView _updateVisibleContentRects]):
1819         If we're in a scroll-to-top programmatic scroll, the update is not stable.
1820         The last event comes in with _isScrollingToTop false, so we do our stable update.
1821
1822 2014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1823
1824         [GTK] Compile all installed resources as GResources
1825         https://bugs.webkit.org/show_bug.cgi?id=131099
1826
1827         Reviewed by Philippe Normand.
1828
1829         It avoids conflicts with old WebKit versions, and resources are
1830         always found even without installing or using environment variables.
1831
1832         * PlatformGTK.cmake: Add rules to write the xml file with the
1833         resources depending on the configure options and to generate and
1834         build the GResources file.
1835
1836 2014-05-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1837
1838         [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
1839         https://bugs.webkit.org/show_bug.cgi?id=132902
1840
1841         Reviewed by Anders Carlsson.
1842
1843         This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs 
1844         to check if registered callback function works well.
1845
1846         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1847         (EWK2ContextTest::schemeRequestCallback):
1848         (TEST_F):
1849
1850 2014-05-14  Ryuan Choi  <ryuan.choi@samsung.com>
1851
1852         [EFL][WK2] Use default context for ewk_view_add
1853         https://bugs.webkit.org/show_bug.cgi?id=132936
1854
1855         Reviewed by Gyuyoung Kim.
1856
1857         Since r146265, ewk_view_add created new context and it's regression.
1858         This patch restores the behavior of ewk_view_add to original one.
1859
1860         * UIProcess/API/efl/ewk_view.cpp:
1861         (ewk_view_add):
1862         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1863         (TEST_F):
1864
1865 2014-05-14  Maciej Stachowiak  <mjs@apple.com>
1866
1867         Database Process crashes after loading html5test.com
1868         https://bugs.webkit.org/show_bug.cgi?id=132938
1869         <rdar://problem/16241419>
1870
1871         Reviewed by Ryosuke Niwa.
1872
1873         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1874         (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
1875         about the null check.
1876         (WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
1877         to pick up its null check and to avoid duplicating code.
1878
1879 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
1880
1881         [iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
1882         https://bugs.webkit.org/show_bug.cgi?id=132931
1883
1884         Reviewed by Sam Weinig.
1885
1886         The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
1887         Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
1888
1889         For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
1890         a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
1891         Rotate back to landscape: the position is restored  correct, but it is then overriden by
1892         the stick-to-edges branch.
1893
1894         When we restore the position from history, we should only put it back in the valid bounds, skipping
1895         stick-to-edges entirely.
1896
1897         * WebProcess/WebPage/ios/WebPageIOS.mm:
1898         (WebKit::WebPage::dynamicViewportSizeUpdate):
1899
1900 2014-05-14  Tim Horton  <timothy_horton@apple.com>
1901
1902         Enable IOSurface view snapshots for 10.9+
1903         https://bugs.webkit.org/show_bug.cgi?id=132932
1904         <rdar://problem/16900619>
1905
1906         Reviewed by Dean Jackson.
1907
1908         * UIProcess/mac/ViewSnapshotStore.h:
1909         r166005 unintentionally worked around <rdar://problem/16734031>.
1910         r168689 fixed another bug that caused sometimes randomly white snapshots.
1911         It's safe to turn on IOSurface view snapshots where purgeability is supported.
1912
1913 2014-05-14  Alexey Proskuryakov  <ap@apple.com>
1914
1915         Use the correct client in WebPageProxy::unwrapCryptoKey
1916         https://bugs.webkit.org/show_bug.cgi?id=132924
1917
1918         Reviewed by Darin Adler.
1919
1920         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
1921         we now do in wrapCryptoKey().
1922
1923 2014-05-14  Zalan Bujtas  <zalan@apple.com>
1924
1925         Subpixel layout: Change Element.offset* client* scroll* return type to double.
1926         https://bugs.webkit.org/show_bug.cgi?id=132895
1927
1928         Reviewed by Simon Fraser.
1929
1930         This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
1931         type from long to double to match the latest CSSOM View Module spec[1].
1932         Element.offset* and Element.client* do return subpixel values from now on.
1933         Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
1934
1935         subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
1936         from WK2 preferences. It toggles the return value from subpixel to floored integral.
1937         It does not change layout/rendering behavior.
1938
1939         Reference list of what other browsers do:
1940         IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
1941         Blink: http://www.chromestatus.com/features/5497402177880064
1942         Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
1943
1944         [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
1945
1946         * Shared/WebPreferencesStore.h:
1947         * UIProcess/API/C/WKPreferences.cpp:
1948         (WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
1949         (WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
1950         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1951         * WebProcess/WebPage/WebPage.cpp:
1952         (WebKit::WebPage::updatePreferences):
1953
1954 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
1955
1956         [iOS][WK2] Expose the viewport meta tag width on the UIProcess
1957         https://bugs.webkit.org/show_bug.cgi?id=132926
1958         <rdar://problem/16892115>
1959
1960         Reviewed by Sam Weinig.
1961
1962         Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
1963         over to the UIProcess when it changes.
1964
1965         * UIProcess/API/Cocoa/WKWebView.mm:
1966         (-[WKWebView initWithFrame:configuration:]):
1967         (-[WKWebView _setViewportMetaTagWidth:]):
1968         (-[WKWebView _viewportMetaTagWidth]):
1969         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1970         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1971         * UIProcess/PageClient.h:
1972         * UIProcess/WebPageProxy.h:
1973         * UIProcess/WebPageProxy.messages.in:
1974         * UIProcess/ios/PageClientImplIOS.h:
1975         * UIProcess/ios/PageClientImplIOS.mm:
1976         (WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
1977         * UIProcess/ios/WebPageProxyIOS.mm:
1978         (WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
1979         * WebProcess/WebPage/ios/WebPageIOS.mm:
1980         (WebKit::WebPage::viewportPropertiesDidChange):
1981
1982 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
1983
1984         [iOS WK2] Make view debugging easier
1985         https://bugs.webkit.org/show_bug.cgi?id=132892
1986
1987         Reviewed by Tim Horton.
1988         
1989         Enhance -[WKCompositingView description] to show WebKit-related information
1990         which is useful when dumping a window's UIView hierarchy.
1991         
1992         Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
1993         and thereby get the hitTest:withEvent: override for free, as well as better dumping.
1994
1995         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1996         (-[WKCompositingView description]):
1997         (-[WKTransformView hitTest:withEvent:]): Deleted.
1998         (-[WKRemoteView hitTest:withEvent:]): Deleted.
1999
2000 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
2001
2002         [iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
2003         https://bugs.webkit.org/show_bug.cgi?id=132920
2004         <rdar://problem/16836866>
2005
2006         Reviewed by Simon Fraser.
2007
2008         During the dynamic resize operation, we do not update the fixed position elements because
2009         it is a very hard problem on the UI Process side.
2010
2011         When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
2012         to the WebProcess.
2013
2014         The problem is sending the rect after the animation is too late, the content can observe the fixed
2015         elements layout through JavaScript and would get the old size.
2016
2017         This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
2018         notifying the content of the resize.
2019         First, we layout the content to the new fixed layout size to get the new content size.
2020         Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
2021         this use the real content size and our estimated unobscured content rect.
2022
2023         * WebProcess/WebPage/ios/WebPageIOS.mm:
2024         (WebKit::WebPage::dynamicViewportSizeUpdate):
2025
2026 2014-05-14  Enrica Casucci  <enrica@apple.com>
2027
2028         REGRESSION(WK2): Many pages have very wrong text size after rotating.
2029         https://bugs.webkit.org/show_bug.cgi?id=132893
2030         <rdar://problem/16806958>
2031
2032         Reviewed by Benjamin Poulain.
2033
2034         Whenever our viewport width changes we must reset text autosizing
2035         on the renderer.
2036
2037         * WebProcess/WebPage/WebPage.h:
2038         * WebProcess/WebPage/ios/WebPageIOS.mm:
2039         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
2040         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
2041         (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
2042         (WebKit::WebPage::dynamicViewportSizeUpdate):
2043
2044 2014-05-14  Alex Christensen  <achristensen@webkit.org>
2045
2046         Use references instead of pointers with ResourceLoadTiming.
2047         https://bugs.webkit.org/show_bug.cgi?id=132846
2048
2049         Reviewed by Alexey Proskuryakov.
2050
2051         * Shared/WebCoreArgumentCoders.cpp:
2052         (IPC::ArgumentCoder<ResourceResponse>::encode):
2053         (IPC::ArgumentCoder<ResourceResponse>::decode):
2054         Use references instead of pointers and null checks.
2055
2056 2014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2057
2058         Remove CSS_STICKY_POSITION guards
2059         https://bugs.webkit.org/show_bug.cgi?id=132676
2060
2061         Reviewed by Simon Fraser.
2062
2063         * Configurations/FeatureDefines.xcconfig:
2064
2065 2014-05-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2066
2067         [EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
2068         https://bugs.webkit.org/show_bug.cgi?id=132811
2069
2070         Reviewed by Christophe Dumez.
2071
2072         Some EFL applications need to set size of fixed layout when enabling fixed layout.
2073         This APIs can pass ownership regarding the size of fixed layout to application side.
2074
2075         * UIProcess/API/efl/ewk_view.cpp:
2076         (ewk_view_layout_fixed_size_set):
2077         (ewk_view_layout_fixed_size_get):
2078         * UIProcess/API/efl/ewk_view.h:
2079         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2080         (TEST_F):
2081
2082 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2083
2084         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
2085         https://bugs.webkit.org/show_bug.cgi?id=132899
2086
2087         Reviewed by Beth Dakin.
2088         
2089         The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
2090         need to be correctly encoded/decoded for UI-side compositing, and dumped
2091         correctly.
2092
2093         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2094         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2095         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2096         (WebKit::RemoteScrollingTreeTextStream::dump):
2097         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2098         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2099
2100 2014-05-13  Anders Carlsson  <andersca@apple.com>
2101
2102         Another build fix.
2103
2104         Reviewed by Dan Bernstein.
2105
2106         * Shared/API/Cocoa/WKFoundation.h:
2107         Make sure to include Availability.h
2108
2109 2014-05-13  Beth Dakin  <bdakin@apple.com>
2110
2111         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
2112         scrolling in News Feed
2113         https://bugs.webkit.org/show_bug.cgi?id=132889
2114         -and corresponding-
2115         <rdar://problem/16715716>
2116
2117         Reviewed by Simon Fraser.
2118
2119         Re-name scrollOffsetRelativeToDocument() to 
2120         documentScrollPositionRelativeToViewOrigin().
2121         * WebProcess/WebPage/FindController.cpp:
2122         (WebKit::FindController::rectsForTextMatches):
2123         * WebProcess/WebPage/WebPage.cpp:
2124         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2125
2126 2014-05-13  Dean Jackson  <dino@apple.com>
2127
2128         [iOS] Page scale update messages for media controls should only fire at the end of zooming
2129         https://bugs.webkit.org/show_bug.cgi?id=132857
2130         <rdar://problem/16631009>
2131
2132         Reviewed by Simon Fraser.
2133
2134         As the user was zooming, the media controls that responded
2135         to the page scale (and resized themselves) would do so
2136         slightly out of sync with the screen refreshes, and it looked
2137         terrible.
2138
2139         We already know if a pageScale change is happening inside
2140         a gesture using the inStableState property of the visibleContentRectUpdateInfo.
2141         Simply pass this along to WebCore::Page.
2142
2143         * WebProcess/WebPage/ios/WebPageIOS.mm:
2144         (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
2145         WebCore::Page. Note that we have to send this message even if the
2146         scale has not changed, since the last changing update might not have
2147         been stable.
2148
2149 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
2150
2151         [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
2152         https://bugs.webkit.org/show_bug.cgi?id=132849
2153         <rdar://problem/16863716>
2154
2155         Reviewed by Anders Carlsson.
2156
2157         When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
2158         state forwarded to the UIProcess.
2159
2160         For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
2161         delegate callbacks.
2162         After that update, Safari would modify the insets, thus updating the state again.
2163         The first state changed by WKWebView is incomplete, and should never have been set.
2164
2165         This patch works around the issue by delaying visible update rect in those cases.
2166
2167         When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes 
2168         [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
2169         [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
2170
2171         Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
2172
2173         * UIProcess/API/Cocoa/WKWebView.mm:
2174         (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
2175         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2176         (-[WKWebView _updateVisibleContentRects]):
2177         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2178         * UIProcess/API/ios/WKViewIOS.mm:
2179         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2180         * UIProcess/ios/WKScrollView.h:
2181         * UIProcess/ios/WKScrollView.mm:
2182         (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
2183         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
2184         (-[WKScrollView setInternalDelegate:]):
2185
2186 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
2187
2188         [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
2189         https://bugs.webkit.org/show_bug.cgi?id=132848
2190         <rdar://problem/16875093>
2191
2192         Reviewed by Darin Adler.
2193
2194         The SPI is no longer needed by Safari.
2195
2196         * UIProcess/API/Cocoa/WKWebView.mm:
2197         (-[WKWebView initWithFrame:configuration:]):
2198         (-[WKWebView _updateScrollViewBackground]):
2199         (-[WKWebView _frameOrBoundsChanged]):
2200         (-[WKWebView _setObscuredInsets:]):
2201         (-[WKWebView _endAnimatedResize]):
2202         (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
2203         (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
2204         (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
2205         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2206
2207 2014-05-13  Samuel White  <samuel_white@apple.com>
2208
2209         AX: Hit testing not accounting for top content inset.
2210         https://bugs.webkit.org/show_bug.cgi?id=132876
2211
2212         Reviewed by Chris Fleizach.
2213
2214         Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
2215
2216         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2217         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2218
2219 2014-05-13  Enrica Casucci  <enrica@apple.com>
2220
2221         REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
2222         https://bugs.webkit.org/show_bug.cgi?id=132879
2223         <rdar://problem/16318049>
2224
2225         Reviewed by Benjamin Poulain.
2226
2227         Adds the heuristics to zoom and scroll to ensure the element being focused
2228         is fully visible and its text readable.
2229
2230         * Shared/AssistedNodeInformation.cpp:
2231         (WebKit::AssistedNodeInformation::encode):
2232         (WebKit::AssistedNodeInformation::decode):
2233         * Shared/AssistedNodeInformation.h:
2234         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2235         * UIProcess/API/Cocoa/WKWebView.mm:
2236         (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2237         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2238         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2239         * UIProcess/ios/WKContentView.h:
2240         * UIProcess/ios/WKContentView.mm:
2241         (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2242         * UIProcess/ios/WKContentViewInteraction.mm:
2243         (-[WKContentView _displayFormNodeInputView]):
2244         (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
2245         * WebProcess/WebPage/ios/WebPageIOS.mm:
2246         (WebKit::WebPage::getAssistedNodeInformation):
2247
2248 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2249
2250         Fix the iOS Simulator build.
2251
2252         * UIProcess/mac/ViewSnapshotStore.h:
2253
2254 2014-05-13  Tim Horton  <timothy_horton@apple.com>
2255
2256         Speculative build fix for iOS.
2257
2258         * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
2259         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
2260         (WebKit::WebMemoryPressureHandler::shared):
2261         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2262         * WebKit2.xcodeproj/project.pbxproj:
2263         Make WebMemoryPressureHandlerIOS Obj-C.
2264
2265 2014-05-13  Anders Carlsson  <andersca@apple.com>
2266
2267         Another follow-up build fix.
2268
2269         * Shared/API/Cocoa/WKFoundation.h:
2270
2271 2014-05-13  Anders Carlsson  <andersca@apple.com>
2272
2273         Another follow-up build fix.
2274
2275         * Shared/API/Cocoa/WKFoundation.h:
2276
2277 2014-05-13  Anders Carlsson  <andersca@apple.com>
2278
2279         Follow-up fix.
2280
2281         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2282         (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
2283         (-[WKNavigationAction _isUserInitiated]):
2284
2285 2014-05-13  Anders Carlsson  <andersca@apple.com>
2286
2287         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2288         https://bugs.webkit.org/show_bug.cgi?id=132880
2289         <rdar://problem/16901354>
2290
2291         Reviewed by Dan Bernstein.
2292
2293         * Shared/API/Cocoa/WKFoundation.h:
2294         Add typedef for older systems.
2295
2296         * UIProcess/API/Cocoa/WKNavigationAction.h:
2297         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2298
2299         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2300         (toWKNavigationType):
2301         This can be static now.
2302
2303         (toNSEventModifierFlags):
2304         Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
2305
2306         (toNSButtonNumber):
2307         Helper to convert WebMouseEvent::Button to an AppKit button number.
2308
2309         (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
2310         New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
2311
2312         (-[WKNavigationAction _isUserInitiated]):
2313         Return the new ivar.
2314
2315         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2316         Remove readwrite overrides.
2317
2318         * UIProcess/Cocoa/NavigationState.mm:
2319         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2320         Use initWithNavigationActionData:
2321
2322         * UIProcess/Cocoa/UIDelegate.mm:
2323         (WebKit::UIDelegate::UIClient::createNewPage):
2324         Use initWithNavigationActionData:
2325
2326 2014-05-13  Tim Horton  <timothy_horton@apple.com>
2327
2328         WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
2329         https://bugs.webkit.org/show_bug.cgi?id=127788
2330         <rdar://problem/15928241>
2331
2332         Reviewed by Anders Carlsson.
2333
2334         Allow JPEG snapshots. Compression is done asynchronously.
2335         Enable JPEG snapshots (for now) on all PLATFORM(MAC).
2336         We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
2337
2338         * UIProcess/API/Cocoa/WKWebView.mm:
2339         * UIProcess/API/mac/WKView.mm:
2340         (-[WKView _takeViewSnapshot]):
2341         Store the image size on the ViewSnapshot.
2342         Move IOSurface-related code to ViewSnapshotStore.
2343
2344         * UIProcess/ios/ViewGestureControllerIOS.mm:
2345         (WebKit::ViewGestureController::beginSwipeGesture):
2346         Adopt asLayerContents().
2347
2348         * UIProcess/mac/ViewGestureController.h:
2349         * UIProcess/mac/ViewGestureControllerMac.mm:
2350         (WebKit::ViewGestureController::retrieveSnapshotForItem):
2351         (WebKit::ViewGestureController::beginSwipeGesture):
2352         (WebKit::ViewGestureController::removeSwipeSnapshot):
2353         Adopt asLayerContents().
2354         Put the snapshot on the right layer (the parent of the snapshot image layer);
2355         if it's on the snapshot image layer itself, if there is no image, the shadow
2356         is displayed on top of the white placeholder.
2357         Only reset snapshot purgeability if we're using IOSurface snapshots.
2358
2359         * UIProcess/mac/ViewSnapshotStore.h:
2360         Add a bunch of macros to allow us to switch the snapshot backing store implementation.
2361
2362         * UIProcess/mac/ViewSnapshotStore.mm:
2363         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2364         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2365         (WebKit::ViewSnapshotStore::recordSnapshot):
2366         If takeViewSnapshot() fails, don't remove the existing snapshot.
2367
2368         (WebKit::createIOSurfaceFromImage):
2369         (WebKit::compressImageAsJPEG):
2370         (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
2371         (WebKit::ViewSnapshotStore::didCompressSnapshot):
2372         (WebKit::ViewSnapshot::clearImage):
2373         (WebKit::ViewSnapshot::asLayerContents):
2374         Asynchronously compress snapshots - if we're using JPEG snapshots - for a
2375         very large memory win (~20-30x).
2376
2377 2014-05-12  Darin Adler  <darin@apple.com>
2378
2379         Make a few icon database improvements
2380         https://bugs.webkit.org/show_bug.cgi?id=132812
2381
2382         Reviewed by Brady Eidson.
2383
2384         * UIProcess/API/C/WKIconDatabase.cpp:
2385         (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
2386         out of the bindings into the WebIconDatabase class.
2387
2388         * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
2389
2390         * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
2391         (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
2392         (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
2393         (WebKit::WebIconDatabase::invalidate): Use nullptr.
2394         (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
2395         (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
2396         (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
2397         (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
2398         (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
2399         (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
2400         WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
2401         another copy of the data for each icon.
2402
2403         * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
2404         IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
2405         function. Use a reference for the constructor argument. Use override for
2406         virtual functions. Use unique_ptr instead of OwnPtr.
2407
2408 2014-05-12  Mark Lam  <mark.lam@apple.com>
2409
2410         WebKit2 on iOS needs to capture the main thread's floating point environment.
2411         <https://webkit.org/b/132755>
2412
2413         Reviewed by Geoffrey Garen.
2414
2415         * Shared/mac/ChildProcessMac.mm:
2416         (WebKit::ChildProcess::platformInitialize):
2417         - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
2418           the ARMv7 FP env to support denormalized numbers.
2419         - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
2420           fp env.
2421
2422 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2423
2424         [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest 
2425         https://bugs.webkit.org/show_bug.cgi?id=132817
2426
2427         Reviewed by Dirk Schulze.
2428
2429         To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
2430         Besides this patch adds test html page for ewk_view_navigation unit test.
2431
2432         * UIProcess/API/efl/tests/resources/Page1.html: Added.
2433         * UIProcess/API/efl/tests/resources/Page2.html: Added.
2434         * UIProcess/API/efl/tests/resources/Page3.html: Added.
2435         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2436         (TEST_F):
2437
2438 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2439
2440         Unreviewed, EFL build fix since r168625.
2441
2442         * UIProcess/efl/WebContextEfl.cpp:
2443         (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
2444
2445 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2446
2447         [iOS WK2] Fuzzy tiles on some sites on loading
2448         https://bugs.webkit.org/show_bug.cgi?id=132847
2449         <rdar://problem/16816178>
2450
2451         Reviewed by Benjamin Poulain.
2452         
2453         PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
2454         causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
2455         scale wrong. Fix by overriding contentsScale() also.
2456
2457         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2458         (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
2459         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2460
2461 2014-05-12  Tim Horton  <timothy_horton@apple.com>
2462
2463         Triple-buffer RemoteLayerBackingStore
2464         https://bugs.webkit.org/show_bug.cgi?id=132786
2465         <rdar://problem/16877498>
2466
2467         Reviewed by Simon Fraser.
2468
2469         We need three buffers because we're currently unable to synchronize
2470         with the render server to swap when they're not in use, so we were
2471         throwing surfaces away far too frequently.
2472
2473         This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
2474
2475         * Shared/mac/RemoteLayerBackingStore.h:
2476         (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
2477         (WebKit::RemoteLayerBackingStore::volatility): Deleted.
2478         * Shared/mac/RemoteLayerBackingStore.mm:
2479         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
2480         (WebKit::RemoteLayerBackingStore::clearBackingStore):
2481         (WebKit::RemoteLayerBackingStore::encode):
2482         (WebKit::RemoteLayerBackingStore::decode):
2483         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2484         (WebKit::RemoteLayerBackingStore::display):
2485         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
2486         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
2487         (WebKit::RemoteLayerBackingStore::Buffer::discard):
2488         (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
2489         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2490         (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
2491         Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
2492         Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
2493         We keep a volatility bit because querying IOSurface purgeability is expensive,
2494         and we have a guarantee that any changes will happen in the Web process
2495         and go through this class (the lack of this guarantee in most cases is why I'm not
2496         putting this bit in WebCore::IOSurface itself).
2497
2498         Make it so that each buffer's volatility can be adjusted individually
2499         by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
2500
2501         Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
2502         before swapping front and back if the back buffer (soon to be the front buffer)
2503         is still in use by the render server. This means that we will almost never
2504         have to throw away a surface because it's in use (and conversely never need
2505         to make a new surface).
2506
2507         Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
2508         more aggressively than others.
2509
2510 2014-05-12  Alexey Proskuryakov  <ap@apple.com>
2511
2512         REGRESSION (r165972): Can't type into text fields in Flash
2513         https://bugs.webkit.org/show_bug.cgi?id=132840
2514         <rdar://problem/16671969>
2515
2516         Reviewed by Anders Carlsson.
2517
2518         * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
2519         got accidentally lost when adding async text input code.
2520
2521 2014-05-12  Chris Fleizach  <cfleizach@apple.com>
2522
2523         AX: .js dialogs shown in unload while AX is running crash WebKit.
2524         https://bugs.webkit.org/show_bug.cgi?id=123828
2525
2526         Reviewed by Anders Carlsson.
2527
2528         Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
2529         This allows us to avoid having special behavior for accessibility when the WebProcess needs
2530         to wait on a reply.
2531
2532         * Platform/IPC/Connection.cpp:
2533         (IPC::Connection::waitForSyncReply):
2534         * Platform/IPC/Connection.h:
2535         * Platform/IPC/mac/ConnectionMac.cpp:
2536         (IPC::Connection::willSendSyncMessage):
2537         (IPC::Connection::didReceiveSyncReply):
2538         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2539         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2540         (WebKit::WebChromeClient::runJavaScriptAlert):
2541         (WebKit::WebChromeClient::runJavaScriptConfirm):
2542         (WebKit::WebChromeClient::runJavaScriptPrompt):
2543         (WebKit::WebChromeClient::print):
2544         (WebKit::WebChromeClient::exceededDatabaseQuota):
2545         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2546         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2547
2548 2014-05-12  Alex Christensen  <achristensen@webkit.org>
2549
2550         Progress on web timing.
2551         https://bugs.webkit.org/show_bug.cgi?id=132574
2552
2553         Reviewed by Alexey Proskuryakov.
2554
2555         * Shared/WebCoreArgumentCoders.cpp:
2556         (IPC::ArgumentCoder<ResourceResponse>::encode):
2557         (IPC::ArgumentCoder<ResourceResponse>::decode):
2558         Transfer ResourceLoadTiming values if they exist.
2559
2560 2014-05-12  Dan Bernstein  <mitz@apple.com>
2561
2562         [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
2563         https://bugs.webkit.org/show_bug.cgi?id=132836
2564
2565         Reviewed by Anders Carlsson.
2566
2567         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2568         (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
2569         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2570
2571 2014-05-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2572
2573         REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
2574         https://bugs.webkit.org/show_bug.cgi?id=132831
2575
2576         Unreviewed GTK build fix.
2577
2578         * UIProcess/gtk/WebContextGtk.cpp:
2579         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2580         This is now a static member function.
2581
2582 2014-05-12  Anders Carlsson  <andersca@apple.com>
2583
2584         WKWebViewConfiguration should fill in the blanks
2585         https://bugs.webkit.org/show_bug.cgi?id=132832
2586         <rdar://problem/16886408>
2587
2588         Reviewed by Dan Bernstein.
2589
2590         * UIProcess/API/Cocoa/WKWebView.mm:
2591         (-[WKWebView initWithFrame:configuration:]):
2592         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2593         (-[WKWebViewConfiguration init]):
2594         (-[WKWebViewConfiguration _validate]):
2595         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2596
2597 2014-05-12  Anders Carlsson  <andersca@apple.com>
2598
2599         WKWebView should default to _backgroundExtendsBeyondPage = YES
2600         https://bugs.webkit.org/show_bug.cgi?id=132829
2601         <rdar://problem/16886364>
2602
2603         Reviewed by Beth Dakin.
2604
2605         * UIProcess/API/Cocoa/WKWebView.mm:
2606         (-[WKWebView initWithFrame:configuration:]):
2607
2608 2014-05-12  Anders Carlsson  <andersca@apple.com>
2609
2610         Pass local storage directory to StorageManager::create
2611         https://bugs.webkit.org/show_bug.cgi?id=132827
2612
2613         Reviewed by Tim Horton.
2614
2615         Since we know the local storage directory at creation time and we know it never changes,
2616         we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
2617
2618         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2619         (WebKit::LocalStorageDatabaseTracker::create):
2620         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2621         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2622         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
2623         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
2624         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2625         * UIProcess/Storage/StorageManager.cpp:
2626         (WebKit::StorageManager::create):
2627         (WebKit::StorageManager::StorageManager):
2628         (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
2629         * UIProcess/Storage/StorageManager.h:
2630         * UIProcess/WebContext.cpp:
2631         (WebKit::WebContext::WebContext):
2632
2633 2014-05-11  Anders Carlsson  <andersca@apple.com>
2634
2635         Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
2636         https://bugs.webkit.org/show_bug.cgi?id=132809
2637
2638         Reviewed by Dan Bernstein.
2639
2640         * UIProcess/API/C/WKContext.cpp:
2641         (WKContextSetLocalStorageDirectory): Deleted.
2642
2643         * UIProcess/API/C/WKContextConfigurationRef.cpp:
2644         (WKContextConfigurationCopyLocalStorageDirectory):
2645         (WKContextConfigurationSetLocalStorageDirectory):
2646         * UIProcess/API/C/WKContextConfigurationRef.h:
2647         Add getters and setters for the local storage directory.
2648
2649         * UIProcess/API/C/WKContextPrivate.h:
2650         Remove WKContextSetLocalStorageDirectory.
2651
2652         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2653         (-[WKProcessGroup initWithInjectedBundleURL:]):
2654         Call WebContext::applyPlatformSpecificConfigurationDefaults.
2655
2656         * UIProcess/API/Cocoa/WKProcessPool.mm:
2657         (-[WKProcessPool _initWithConfiguration:]):
2658         Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
2659
2660         * UIProcess/APIContextConfiguration.cpp:
2661         (API::ContextConfiguration::webContextConfiguration):
2662         Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
2663
2664         * UIProcess/APIContextConfiguration.h:
2665         (API::ContextConfiguration::injectedBundlePath):
2666         This should be const.
2667
2668         (API::ContextConfiguration::localStorageDirectory):
2669         (API::ContextConfiguration::setLocalStorageDirectory):
2670         Add getter and setter.
2671
2672         * UIProcess/Storage/StorageManager.cpp:
2673         (WebKit::StorageManager::setLocalStorageDirectory):
2674         ASSERT that the path isn't null.
2675
2676         * UIProcess/WebContext.cpp:
2677         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2678         New helper function that will fill in platform specific defaults for empty parameters.
2679
2680         (WebKit::WebContext::WebContext):
2681         Get the local storage directory from the configuration.
2682
2683         (WebKit::WebContext::setLocalStorageDirectory): Deleted.
2684         (WebKit::WebContext::localStorageDirectory): Deleted.
2685         These are no longer needed.
2686
2687         * UIProcess/mac/WebContextMac.mm:
2688         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2689         This should be a static member function.
2690
2691 2014-05-12  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
2692
2693         Typo fix in generate-forwarding-headers
2694         https://bugs.webkit.org/show_bug.cgi?id=132820
2695
2696         Reviewed by Anders Carlsson.
2697
2698         * Scripts/generate-forwarding-headers.pl:
2699         (collectFrameworkHeaderPaths):
2700         
2701 2014-05-12  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2702
2703         [EFL] TLSErrors do not cause page load to fail when not ignored
2704         https://bugs.webkit.org/show_bug.cgi?id=131104
2705
2706         Reviewed by Gyuyoung Kim.
2707
2708         Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
2709
2710         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
2711
2712 2014-05-11  Gordon Sheridan  <gordon_sheridan@apple.com>
2713
2714         Expose a function to copy favicon data without image conversion.
2715         https://bugs.webkit.org/show_bug.cgi?id=132805
2716
2717         Reviewed by Darin Adler.
2718
2719         * UIProcess/API/C/WKIconDatabase.cpp:
2720         (WKIconDatabaseCopyIconDataForPageURL):
2721         Add a function to copy the data from the image of a favicon for an associated page url.
2722
2723         * UIProcess/API/C/WKIconDatabase.h:
2724         Declare WKIconDatabaseCopyIconDataForPageURL.
2725
2726 2014-05-11  Seongjun Kim  <isAir@company100.com>
2727
2728         REGRESSION(r168603): [GTK] Build broken.
2729         https://bugs.webkit.org/show_bug.cgi?id=132810
2730
2731         Reviewed by Carlos Garcia Campos.
2732
2733         * UIProcess/API/gtk/WebKitWebContext.cpp:
2734         (createDefaultWebContext):
2735         Construct a WebContextConfiguration object and pass it to WebContext::create.
2736
2737 2014-05-11  Anders Carlsson  <andersca@apple.com>
2738
2739         Remove local storage directory and sandbox extension from WebProcessCreationParameters
2740         https://bugs.webkit.org/show_bug.cgi?id=132808
2741
2742         Reviewed by Beth Dakin.
2743
2744         * Shared/WebProcessCreationParameters.cpp:
2745         (WebKit::WebProcessCreationParameters::encode):
2746         (WebKit::WebProcessCreationParameters::decode):
2747         * Shared/WebProcessCreationParameters.h:
2748         * UIProcess/WebContext.cpp:
2749         (WebKit::WebContext::createNewWebProcess):
2750         * WebProcess/cocoa/WebProcessCocoa.mm:
2751         (WebKit::WebProcess::platformInitializeWebProcess):
2752
2753 2014-05-11  Jaehun Lim  <ljaehun.lim@samsung.com>
2754
2755         Unreviewed, CMake build fix after r168603
2756
2757         Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
2758
2759         * CMakeLists.txt:
2760
2761 2014-05-11  Anders Carlsson  <andersca@apple.com>
2762
2763         Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
2764         https://bugs.webkit.org/show_bug.cgi?id=132806
2765         <rdar://problem/16830143>
2766
2767         Reviewed by Beth Dakin.
2768
2769         Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
2770         configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
2771         as a configuration property. More setters will follow.
2772
2773         * Shared/API/c/WKBase.h:
2774         Add WKContextConfigurationRef.
2775
2776         * Shared/APIObject.h:
2777         Add ContextConfiguration enum declaration.
2778
2779         * UIProcess/API/C/WKAPICast.h:
2780         Handle WKContextConfigurationRef.
2781
2782         * UIProcess/API/C/WKContext.cpp:
2783         (WKContextCreate):
2784         Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
2785
2786         (WKContextCreateWithInjectedBundlePath):
2787         Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
2788
2789         (WKContextCreateWithConfiguration):
2790         Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
2791
2792         * UIProcess/API/C/WKContext.h:
2793         Add WKContextCreateWithConfiguration.
2794
2795         * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
2796         (WKContextConfigurationCreate):
2797         Create an API::ContextConfiguration object.
2798
2799         (WKContextConfigurationCopyInjectedBundlePath):
2800         Return the injected bundle path.
2801
2802         (WKContextConfigurationSetInjectedBundlePath):
2803         Set the injected bundle path.
2804
2805         * UIProcess/API/C/WKContextConfigurationRef.h: Added.
2806         New C SPI header.
2807         
2808         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2809         (-[WKProcessGroup initWithInjectedBundleURL:]):
2810         Construct a WebContextConfiguration object and pass it to WebContext::Create.
2811     
2812         * UIProcess/API/Cocoa/WKProcessPool.mm:
2813         (-[WKProcessPool _initWithConfiguration:]):
2814         Construct a WebContextConfiguration object and pass it to WebContext::Create.
2815
2816         * UIProcess/APIContextConfiguration.cpp: Added.
2817         New API::ContextConfiguration object.
2818
2819         (API::ContextConfiguration::webContextConfiguration):
2820         Construct a WebContextConfiguration struct from our current configuration.
2821
2822         * UIProcess/APIContextConfiguration.h: Added.
2823         
2824         * UIProcess/WebContext.cpp:
2825         (WebKit::WebContext::create):
2826         Pass the WebContextConfiguration to the constructor.
2827
2828         (WebKit::WebContext::WebContext):
2829         Set the injected bundle path from the WebContextConfiguration object.
2830
2831         * UIProcess/WebContext.h:
2832         Change the WebContext constructor and create function to take a WebContextConfiguration object.
2833
2834         * WebKit2.xcodeproj/project.pbxproj:
2835         Add new files.
2836
2837 2014-05-10  Csaba Osztrogonác  <ossy@webkit.org>
2838
2839         [WK2] URTBF after r168585.
2840
2841         * Platform/IPC/Connection.h:
2842         * Shared/ChildProcessProxy.cpp:
2843         (WebKit::ChildProcessProxy::terminate):
2844
2845 2014-05-10  Tim Horton  <timothy_horton@apple.com>
2846
2847         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
2848         https://bugs.webkit.org/show_bug.cgi?id=132793
2849         <rdar://problem/16877870>
2850
2851         Reviewed by Dan Bernstein.
2852
2853         * UIProcess/API/Cocoa/WKWebView.mm:
2854         (-[WKWebView _updateScrollViewBackground]):
2855         Don't bypass the cache and make a copy of the CGColor just to set its alpha.
2856         Cache the last color and don't bother creating a UIColor nor updating the
2857         color on our views if it hasn't changed.
2858
2859 2014-05-10  Tim Horton  <timothy_horton@apple.com>
2860
2861         Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
2862         https://bugs.webkit.org/show_bug.cgi?id=132790
2863         <rdar://problem/16877802>
2864
2865         Reviewed by Dan Bernstein.
2866
2867         * UIProcess/ios/WKScrollView.mm:
2868         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
2869         If only one of the delegates will respond to a selector,
2870         we can return it from forwardingTargetForSelector: to avoid
2871         NSInvocation overhead.
2872
2873 2014-05-10  Dan Bernstein  <mitz@apple.com>
2874
2875         [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
2876         https://bugs.webkit.org/show_bug.cgi?id=132776
2877
2878         Reviewed by Darin Adler.
2879
2880         * WebKit2.xcodeproj/project.pbxproj:
2881
2882 2014-05-10  Ryuan Choi  <ryuan.choi@samsung.com>
2883
2884         [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
2885         https://bugs.webkit.org/show_bug.cgi?id=132771
2886
2887         Reviewed by Gyuyoung Kim.
2888
2889         Moved ownership of EwkSettings from EwkView to EwkPageGroup.
2890
2891         * UIProcess/API/efl/EwkView.cpp:
2892         (EwkView::EwkView):
2893         * UIProcess/API/efl/EwkView.h:
2894         (EwkView::settings): Deleted.
2895         * UIProcess/API/efl/ewk_page_group.cpp:
2896         (EwkPageGroup::EwkPageGroup):
2897         * UIProcess/API/efl/ewk_page_group_private.h:
2898         (EwkPageGroup::settings):
2899         * UIProcess/API/efl/ewk_settings_private.h:
2900         * UIProcess/API/efl/ewk_view.cpp:
2901         (ewk_view_settings_get):
2902
2903 2014-05-10  Tim Horton  <timothy_horton@apple.com>
2904
2905         [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
2906         https://bugs.webkit.org/show_bug.cgi?id=132783
2907         <rdar://problem/16877326>
2908
2909         Reviewed by Anders Carlsson.
2910
2911         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2912         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
2913         There's a race window between the BackingStoreFlusher sending the new
2914         layer tree to the UI process and updating m_hasFlushed where we can
2915         get a reply back in (on the Web process main thread) from the UI process
2916         that we committed the new layer tree (didUpdate).
2917         This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
2918         Since the RELEASE_ASSERT is there only to avoid painting garbage, move
2919         our code to set m_hasFlushed=true to after we finish calling CGContextFlush
2920         on all of the contexts, instead of after we send the layer tree commit message,
2921         which will remove the race entirely.
2922
2923 2014-05-10  Anders Carlsson  <andersca@apple.com>
2924
2925         ASSERTION FAILED: !m_connection under RunJavaScriptAlert
2926         https://bugs.webkit.org/show_bug.cgi?id=132792
2927         <rdar://problem/16691138>
2928
2929         Reviewed by Dan Bernstein.
2930
2931         Detect if someone implementing a UI delegate method with a completion handler never calls the completion
2932         handler and raise an exception instead of asserting.
2933
2934         * UIProcess/Cocoa/UIDelegate.mm:
2935         (WebKit::CompletionHandlerCallChecker::create):
2936         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
2937         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
2938         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
2939         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
2940         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
2941         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
2942         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2943
2944 2014-05-10  Anders Carlsson  <andersca@apple.com>
2945
2946         Use xpc_connection_kill for killing child processes where appropriate
2947         https://bugs.webkit.org/show_bug.cgi?id=132788
2948         <rdar://problem/16664185>
2949
2950         Reviewed by Sam Weinig.
2951
2952         * Platform/IPC/Connection.h:
2953         * Platform/IPC/mac/ConnectionMac.mm:
2954         (IPC::Connection::kill):
2955         * Platform/IPC/mac/XPCPtr.h:
2956         (IPC::XPCPtr::operator bool):
2957         * Shared/ChildProcessProxy.cpp:
2958         (WebKit::ChildProcessProxy::terminate):
2959
2960 2014-05-10  Anders Carlsson  <andersca@apple.com>
2961
2962         WebKit2 is leaking an xpc_connection per web process it creates
2963         https://bugs.webkit.org/show_bug.cgi?id=132785
2964         <rdar://problem/14912160>
2965
2966         Reviewed by Sam Weinig.
2967
2968         Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
2969
2970         Make sure we always adopt any connections that are created.
2971
2972         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
2973         (DatabaseServiceInitializer):
2974         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2975         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
2976         (NetworkServiceInitializer):
2977         * Platform/IPC/Connection.h:
2978         (IPC::Connection::Identifier::Identifier):
2979         (IPC::Connection::xpcConnection):
2980         * Platform/IPC/mac/ConnectionMac.mm:
2981         (IPC::Connection::platformInvalidate):
2982         (IPC::Connection::platformInitialize):
2983         (IPC::Connection::getAuditToken):
2984         * Platform/IPC/mac/XPCPtr.h: Added.
2985         (IPC::XPCPtr::XPCPtr):
2986         (IPC::XPCPtr::~XPCPtr):
2987         (IPC::XPCPtr::get):
2988         (IPC::XPCPtr::operator!):
2989         (IPC::XPCPtr::operator=):
2990         (IPC::adoptXPC):
2991         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
2992         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
2993         (PluginServiceInitializer):
2994         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
2995         (WebKit::BootstrapMain):
2996         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2997         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
2998         (WebKit::XPCServiceInitializer):
2999         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3000         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
3001         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
3002         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3003         (WebKit::XPCServiceEventHandler):
3004         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
3005         (WebKit::XPCServiceEventHandler):
3006         * UIProcess/Launcher/ProcessLauncher.cpp:
3007         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3008         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3009         (WebKit::connectToService):
3010         * WebKit2.xcodeproj/project.pbxproj:
3011         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3012         (WebContentServiceInitializer):
3013
3014 2014-05-10  Anders Carlsson  <andersca@apple.com>
3015
3016         Simplify createDataAvailableSource
3017         https://bugs.webkit.org/show_bug.cgi?id=132782
3018         <rdar://problem/16815202>
3019
3020         Reviewed by Sam Weinig.
3021
3022         * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
3023         Rename to make this Objective-C++ so we get the lambda-to-block conversion.
3024
3025         (IPC::createDataAvailableSource):
3026         Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
3027
3028         (IPC::Connection::open):
3029         Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
3030
3031         * WebKit2.xcodeproj/project.pbxproj:
3032         Update for ConnectionMac.cpp to ConnectionMac.mm rename.
3033
3034 2014-05-10  Anders Carlsson  <andersca@apple.com>
3035
3036         Follow-up fix.
3037
3038         Reviewed by Darin Adler.
3039
3040         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3041         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3042         (-[WKNavigationResponse isForMainFrame]):
3043         Use a slightly better name.
3044
3045 2014-05-10  Anders Carlsson  <andersca@apple.com>
3046
3047         Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
3048         https://bugs.webkit.org/show_bug.cgi?id=132781
3049         <rdar://problem/16868319>
3050
3051         Reviewed by Darin Adler.
3052
3053         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3054         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3055         (-[WKNavigationResponse description]):
3056         (-[WKNavigationResponse isMainFrameNavigation]):
3057         (-[WKNavigationResponse _frame]):
3058         (-[WKNavigationResponse frame]): Deleted.
3059         (-[WKNavigationResponse setFrame:]): Deleted.
3060         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
3061         * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
3062         * UIProcess/Cocoa/NavigationState.mm:
3063         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3064         * WebKit2.xcodeproj/project.pbxproj:
3065
3066 2014-05-09  Dan Bernstein  <mitz@apple.com>
3067
3068         [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
3069         https://bugs.webkit.org/show_bug.cgi?id=132769
3070
3071         Reviewed by Sam Weinig.
3072
3073         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3074         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3075
3076 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3077
3078         [iOS][WK2] Fix bugs exposed by r168556
3079         https://bugs.webkit.org/show_bug.cgi?id=132768
3080
3081         Reviewed by Ryosuke Niwa.
3082
3083         Fix two bugs exposed by r168556.
3084         1) We were only changing the page scale factor when the scale was not adjusted by live
3085            resize. The idea was that the scale would either be the same (responsive content)
3086            or that it would be defined by the next viewContentRectUpdate.
3087
3088            Now that we also send resize and scroll events, we must always update the scale since
3089            it affects some APIs observable from JavaScript (like scrolling bounds).
3090
3091         2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
3092            were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
3093            of target.
3094
3095         * WebProcess/WebPage/ios/WebPageIOS.mm:
3096         (WebKit::withinEpsilon):
3097         (WebKit::WebPage::dynamicViewportSizeUpdate):
3098
3099 2014-05-09  Ryuan Choi  <ryuan.choi@samsung.com>
3100
3101         [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
3102         https://bugs.webkit.org/show_bug.cgi?id=132767
3103
3104         Reviewed by Gyuyoung Kim.
3105
3106         IconDatabase should be closed explicitly.
3107
3108         * UIProcess/API/efl/ewk_favicon_database.cpp:
3109         (EwkFaviconDatabase::~EwkFaviconDatabase):
3110
3111 2014-05-09  Anders Carlsson  <andersca@apple.com>
3112
3113         Another build fix.
3114
3115         * mac/MigrateHeadersToWebKit2.make:
3116         Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
3117
3118 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
3119
3120         [iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
3121         https://bugs.webkit.org/show_bug.cgi?id=132765
3122
3123         Reviewed by Tim Horton.
3124
3125         Since WebCore does not update our scroll view on load, we need to do that ourself.
3126
3127         In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
3128         will always invoke the scrolling after didCommitLayerTree() (since r167916).
3129         Consequently, it is now safe again to reset the scroll position ourself on the first frame.
3130
3131         * UIProcess/API/Cocoa/WKWebView.mm:
3132         (-[WKWebView _didCommitLoadForMainFrame]):
3133         (-[WKWebView _didCommitLayerTree:WebKit::]):
3134         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3135         * UIProcess/ios/WKContentView.mm:
3136         (-[WKContentView _didCommitLoadForMainFrame]):
3137
3138 2014-05-09  Anders Carlsson  <andersca@apple.com>
3139
3140         Update availability macros
3141         https://bugs.webkit.org/show_bug.cgi?id=132763
3142         <rdar://problem/15311800>
3143
3144         Reviewed by Dan Bernstein.
3145
3146         * Configurations/WebKit.xcconfig:
3147         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
3148         * Shared/API/Cocoa/WKFoundation.h:
3149         * Shared/API/Cocoa/_WKFrameHandle.h:
3150         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
3151         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
3152         * UIProcess/API/Cocoa/WKBackForwardList.h:
3153         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
3154         * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
3155         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
3156         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
3157         * UIProcess/API/Cocoa/WKConnection.h:
3158         * UIProcess/API/Cocoa/WKFrameInfo.h:
3159         * UIProcess/API/Cocoa/WKNavigation.h:
3160         * UIProcess/API/Cocoa/WKNavigationAction.h:
3161         (NS_ENUM):
3162         * UIProcess/API/Cocoa/WKNavigationData.h:
3163         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3164         (NS_ENUM):
3165         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3166         * UIProcess/API/Cocoa/WKPreferences.h:
3167         * UIProcess/API/Cocoa/WKProcessGroup.h:
3168         * UIProcess/API/Cocoa/WKProcessPool.h:
3169         * UIProcess/API/Cocoa/WKScriptMessage.h:
3170         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
3171         * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
3172         * UIProcess/API/Cocoa/WKUIDelegate.h:
3173         * UIProcess/API/Cocoa/WKUserContentController.h:
3174         * UIProcess/API/Cocoa/WKWebView.h:
3175         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3176         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3177         (NS_OPTIONS):
3178         (NS_ENUM):
3179         * UIProcess/API/Cocoa/WKWindowFeatures.h:
3180         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
3181         (NS_ENUM):
3182         * UIProcess/API/Cocoa/_WKDownload.h:
3183         * UIProcess/API/Cocoa/_WKElementAction.h:
3184         (NS_ENUM):
3185         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3186         * UIProcess/API/Cocoa/_WKScriptWorld.h:
3187         * UIProcess/API/Cocoa/_WKThumbnailView.h:
3188         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
3189         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3190         * WebKit2.xcodeproj/project.pbxproj:
3191         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
3192         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
3193         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
3194         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
3195         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
3196         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
3197         * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
3198         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
3199         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
3200         * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
3201         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
3202         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
3203         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
3204         * mac/rewrite-availability-macros.sh: Added.
3205
3206 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
3207
3208         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
3209         https://bugs.webkit.org/show_bug.cgi?id=132409
3210
3211         Reviewed by Timothy Hatcher.
3212
3213         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3214         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3215         (WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
3216         pid per debuggable is no longer needed.
3217
3218         * WebProcess/WebProcess.cpp:
3219         (WebKit::WebProcess::initializeWebProcess):
3220         Immediately pass the parent process pid and audit_token on
3221         to the RemoteInspector singleton when the process is created
3222         so that it can be sent to webinspectord.
3223
3224 2014-05-09  Enrica Casucci  <enrica@apple.com>
3225
3226         REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
3227         https://bugs.webkit.org/show_bug.cgi?id=132761
3228         <rdar://problem/16857491>
3229
3230         Reviewed by Benjamin Poulain.
3231
3232         The interactionAssistant accessor should never create an instance of
3233         UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
3234         The text interaction assistant should only be created when needed so that the rest of
3235         the code could reliably check if we are interacting with text or not.
3236
3237         * UIProcess/ios/WKContentViewInteraction.mm:
3238         (-[WKContentView interactionAssistant]):
3239
3240 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
3241
3242         Fix some issues with scrolling tree logging
3243         https://bugs.webkit.org/show_bug.cgi?id=132762
3244
3245         Reviewed by Tim Horton.
3246         
3247         Only dump viewport constraints when they change, and dump the primary layer on
3248         scrolling nodes.
3249         
3250         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3251         (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
3252
3253 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
3254
3255         [iOS WK2] Fixed elements can go outside the document on pinching
3256         https://bugs.webkit.org/show_bug.cgi?id=132759
3257         <rdar://problem/16870835>
3258
3259         Reviewed by Benjamin Poulain.
3260         
3261         Constrain the rect used to position fixed position objects when pinching (when
3262         the scale goes below the minimumScale). Do so in such a way that there's a smooth
3263         transition between rubber-banding and pinching.
3264
3265         * UIProcess/API/Cocoa/WKWebView.mm:
3266         (-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
3267         (-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
3268         * UIProcess/API/ios/WKViewIOS.mm:
3269         (-[WKView _updateVisibleContentRects]): Ditto.
3270         * UIProcess/ios/WKContentView.h:
3271         * UIProcess/ios/WKContentView.mm:
3272         (adjustedUnexposedEdge): Helper to adjust the left/top.
3273         (adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
3274         (fixedPositionRectFromExposedRect):
3275         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
3276         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
3277
3278 2014-05-09  Zalan Bujtas  <zalan@apple.com>
3279
3280         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
3281         https://bugs.webkit.org/show_bug.cgi?id=132750
3282         <rdar://problem/16803281>
3283
3284         Reviewed by Simon Fraser.
3285
3286         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
3287         
3288         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
3289         different from the backingstore when the passed value is fractional.
3290         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
3291         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
3292
3293         Currently not testable.
3294
3295         * Shared/mac/RemoteLayerBackingStore.h:
3296         (WebKit::RemoteLayerBackingStore::size):
3297         * Shared/mac/RemoteLayerBackingStore.mm:
3298         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
3299         (WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
3300         (WebKit::RemoteLayerBackingStore::display):
3301         (WebKit::RemoteLayerBackingStore::drawInContext):
3302         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3303         (WebKit::PlatformCALayerRemote::updateBackingStore):
3304
3305 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3306
3307         [iOS][WK2] Set up the resize events
3308         https://bugs.webkit.org/show_bug.cgi?id=132726
3309
3310         Reviewed by Darin Adler and Simon Fraser.
3311
3312         Wire the UI Process updates to FrameView to send the resize events appropriately.
3313
3314         * Shared/VisibleContentRectUpdateInfo.cpp:
3315         (WebKit::VisibleContentRectUpdateInfo::encode):
3316         (WebKit::VisibleContentRectUpdateInfo::decode):
3317         * Shared/VisibleContentRectUpdateInfo.h:
3318         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3319         (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
3320         * UIProcess/API/Cocoa/WKWebView.mm:
3321         (-[WKWebView _updateVisibleContentRects]):
3322         * UIProcess/ios/WKContentView.h:
3323         * UIProcess/ios/WKContentView.mm:
3324         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
3325         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
3326         Pass down the status of the content insets with the view update to main frame's FrameView
3327         when needed.
3328
3329         * WebProcess/WebPage/ios/WebPageIOS.mm:
3330         (WebKit::WebPage::dynamicViewportSizeUpdate):
3331         On live resize, send the resize event, then the scroll events (if needed).
3332
3333         Since JavaScript now gets two chances to change the content (resize event + scroll event),
3334         we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
3335
3336         (WebKit::WebPage::viewportConfigurationChanged):
3337         Define the custom size on load before the app gets a chance to send different rects.
3338         If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
3339
3340         (WebKit::WebPage::updateVisibleContentRects):
3341         Send the resize event when the insets are stable.
3342         Also move the scroll event after the resize event for consistency with live resize.
3343
3344 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
3345
3346         [iOS] Switch geolocation to an explicit authorization query model
3347         https://bugs.webkit.org/show_bug.cgi?id=132717
3348
3349         Reviewed by Sam Weinig.
3350
3351         Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
3352
3353         On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
3354
3355         Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
3356         the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
3357
3358         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3359         (-[WKGeolocationProviderIOS _stopUpdating]):
3360         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
3361         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
3362         (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
3363         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
3364         (-[WKWebAllowDenyPolicyListener deny]):
3365         (-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
3366         (-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
3367         (-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
3368         (-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
3369         (-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
3370
3371 2014-05-09  Gordon Sheridan  <gordon_sheridan@apple.com>
3372
3373         Expose functions necessary for copying favicon between IconDatabases.
3374         https://bugs.webkit.org/show_bug.cgi?id=132709
3375
3376         Reviewed by Brady Eidson.
3377
3378         * UIProcess/API/C/WKIconDatabase.cpp:
3379         (WKIconDatabaseSetIconURLForPageURL):
3380         Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
3381
3382         (WKIconDatabaseCopyIconURLForPageURL):
3383         Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
3384
3385         * UIProcess/API/C/WKIconDatabase.h:
3386         Added declarations for wrapper functions above.
3387
3388 2014-05-09  Tim Horton  <timothy_horton@apple.com>
3389
3390         Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
3391
3392         * UIProcess/API/Cocoa/WKPreferences.h:
3393
3394 2014-05-09  Brent Fulgham  <bfulgham@apple.com>
3395
3396         {TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
3397         https://bugs.webkit.org/show_bug.cgi?id=132746
3398         <rdar://problem/16789588>
3399
3400         Reviewed by Tim Horton.
3401
3402         Don't try to draw the detector UI if no part of the selection bounds are inside
3403         the current tile. Don't limit the detector UI to the bounds of this tile, or else
3404         it will attempt to squeeze itself into the possibly small space available. Let it
3405         draw as if it had the whole screen, and rely on the context clip region to
3406         avoid overdrawing.
3407
3408         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3409         (WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
3410         * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
3411         (WebKit::SelectionOverlayController::drawRect): Ditto.
3412
3413 2014-05-09  Anders Carlsson  <andersca@apple.com>
3414
3415         Production build fix.
3416
3417         Reviewed by Dan Bernstein.
3418
3419         * Configurations/BaseTarget.xcconfig:
3420         Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
3421
3422 2014-05-09  Tim Horton  <timothy_horton@apple.com>
3423
3424         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3425         https://bugs.webkit.org/show_bug.cgi?id=132667
3426         <rdar://problem/15349483>
3427
3428         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3429         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
3430         Address a missed review comment about a missing std::move.
3431
3432 2014-05-09  Anders Carlsson  <andersca@apple.com>
3433
3434         Rename WebKit2.framework to WebKit.framework
3435         https://bugs.webkit.org/show_bug.cgi?id=132743
3436         <rdar://problem/15920046>
3437
3438         Reviewed by Dan Bernstein.
3439
3440         * Configurations/BaseLegacyProcess.xcconfig:
3441         Change INSTALL_PATH to WebKit.framework.
3442
3443         * Configurations/BaseTarget.xcconfig:
3444         Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
3445
3446         * Configurations/BaseXPCService.xcconfig:
3447         Change WebKit2.framework to WebKit.framework.
3448
3449         * Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
3450         New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
3451
3452         * Configurations/WebKit2.xcconfig:
3453         New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
3454
3455         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3456         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
3457
3458         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3459         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
3460         
3461         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
3462         * Shared/API/Cocoa/WKRenderingProgressEvents.h:
3463         Update header imports.
3464
3465         * Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
3466         New umbrella header. Imports the modern WebKit API as well as the legacy API.
3467
3468         * Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
3469         Export install name symbols on iOS.
3470
3471         * Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
3472         New umbrella SPI header. Imports the modern WebKit SPI.
3473
3474         * Many headers:
3475         Change WebKit2 includes to WebKit includes.
3476
3477         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3478         (WebKit::XPCServiceEventHandler):
3479         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.