Remove unnecessary condition for hiding keypad
[framework/web/webkit-efl.git] / Source / WebKit2 / ChangeLog
1 2012-09-10  Byungwoo Lee  <bw80.lee@samsung.com>
2
3         [EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp.
4         https://bugs.webkit.org/show_bug.cgi?id=95990
5
6         Reviewed by Gyuyoung Kim.
7
8         Fix build warning about extended initializer lists only available with
9         -std=c++0x or -std=gnu++0x.
10
11         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
12         (EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass):
13         (EWK2UnitTest):
14         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
15
16 2012-11-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
17
18         [EFL] Add a method to the TextCheckerEnchant class to check whether any dictionary is loaded
19         https://bugs.webkit.org/show_bug.cgi?id=101570
20
21         Reviewed by Gustavo Noronha Silva.
22
23         To do not get the vector of loaded languages, WebKit2-EFL calls
24         TextCheckerEnchant::hasDictionary() method to check whether the
25         dictionaries vector is empty.
26
27         * UIProcess/API/efl/ewk_settings.cpp:
28         (ewk_settings_continuous_spell_checking_enabled_set):
29         * UIProcess/API/efl/ewk_text_checker.cpp:
30         (Ewk_Text_Checker::hasDictionary):
31         (Ewk_Text_Checker):
32         * UIProcess/API/efl/ewk_text_checker_private.h:
33         (Ewk_Text_Checker):
34
35 2012-11-07  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
36
37         WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
38         https://bugs.webkit.org/show_bug.cgi?id=93611
39
40         Reviewed by Gyuyoung Kim.
41
42         When WebKitTestRunner turns on the spelling feature with the resetStateToConsistentValues() method,
43         it happens that the WebProcess is still not launched (although it is already created).
44         In this case, isValid() method returns false.
45
46         This fix sends a message to the WebProcess messages queue, and the message
47         will be handled once the WebProcess is ready.
48
49         * Target.pri:
50         Adds missing files to compile spellcheking feature for WebKit2-Qt
51         to use WebKit C API from WKTextChecker.h.
52
53         * UIProcess/WebProcessProxy.cpp:
54         (WebKit::WebProcessProxy::updateTextCheckerState):
55         Uses canSendMessage() method instead of isValid() to check whether the message to
56         the WebProcess can be sent.
57
58         * UIProcess/efl/TextCheckerEfl.cpp:
59         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
60         Calls TextChecker::setContinuousSpellCheckingEnabled which additionaly invokes the client's method.
61         WK2-EFL settings for text checker (ewk_settings.cpp) set the default language (if it wasn't set earlier) to
62         perform the spelling. It allows to pass the tests from editing/spelling directory.
63
64 2012-11-02  Byungwoo Lee  <bw80.lee@samsung.com>
65
66         [EFL][WK2] Change the scope of locking in WorkQueueEfl.cpp.
67         https://bugs.webkit.org/show_bug.cgi?id=98978
68
69         Reviewed by Kenneth Rohde Christiansen.
70
71         Release the m_workItemQueueLock and m_timerWorkItemsLock mutexes
72         immediately after the protected resource is no longer modified to
73         prevent a possible source of a deadlock.
74
75         And additional mutex locker for the m_writeToPipeDescriptor is added
76         to ensure thread-safety of the sendMessageToThread() function.
77
78         * Platform/WorkQueue.h:
79         (WorkQueue):
80         * Platform/efl/WorkQueueEfl.cpp:
81         (WorkQueue::insertTimerWorkItem):
82         (WorkQueue::performTimerWork):
83         (WorkQueue::sendMessageToThread):
84         (WorkQueue::dispatch):
85         (WorkQueue::dispatchAfterDelay):
86
87 2012-11-02  Byungwoo Lee  <bw80.lee@samsung.com>
88
89         [EFL][WK2] Use MutexLocker instead of lock()/unlock().
90         https://bugs.webkit.org/show_bug.cgi?id=101015
91
92         Reviewed by Kenneth Rohde Christiansen.
93
94         Instead of lock()/unlock(), use MutexLocker in WorkQueue::performWork()
95         and WorkQueue::performTimerWork().
96
97         The locking scope will be more clear and simple with using MutexLocker.
98
99         * Platform/efl/WorkQueueEfl.cpp:
100         (WorkQueue::performWork):
101         (WorkQueue::insertTimerWorkItem):
102         (WorkQueue::performTimerWork):
103         (WorkQueue::dispatchAfterDelay):
104
105 2012-10-31  Byungwoo Lee  <bw80.lee@samsung.com>
106
107         [WK2] Change the scope of locking in CoreIPC::Connection class.
108         https://bugs.webkit.org/show_bug.cgi?id=98998
109
110         Reviewed by Laszlo Gombos.
111
112         Release the m_incomingMessagesLock and m_outgoingMessagesLock mutexes
113         immediately after the protected resource is no longer modified to
114         prevent a possible source of a deadlock.
115
116         The change allows the EFL port to prevent an actual dead-lock
117         situation with some upcoming changes.
118
119         * Platform/CoreIPC/Connection.cpp:
120         (CoreIPC::Connection::sendMessage):
121         (CoreIPC::Connection::enqueueIncomingMessage):
122
123 2012-10-26  Christophe Dumez  <christophe.dumez@intel.com>
124
125         [EFL][WK2] Get rid of C'ism in text checker API
126         https://bugs.webkit.org/show_bug.cgi?id=100513
127
128         Reviewed by Kenneth Rohde Christiansen.
129
130         Make Ewk_Text_Checker a C++ class and move the
131         WebKitTextChecker code to this new class. This
132         gets rid of the C'ism in the text checker code
133         and make it consistent with other Ewk classes.
134
135         * PlatformEfl.cmake:
136         * UIProcess/API/efl/ewk_context.cpp:
137         (Ewk_Context::Ewk_Context):
138         * UIProcess/API/efl/ewk_settings.cpp:
139         (spellCheckingLanguagesSetUpdate):
140         (ewk_settings_continuous_spell_checking_enabled_set):
141         (ewk_settings_spell_checking_available_languages_get):
142         (ewk_settings_spell_checking_languages_get):
143         * UIProcess/API/efl/ewk_text_checker.cpp:
144         (ClientCallbacks):
145         (textCheckerEnchant):
146         (clientCallbacks):
147         (isContinuousSpellCheckingEnabled):
148         (setContinuousSpellCheckingEnabled):
149         (uniqueSpellDocumentTag):
150         (closeSpellDocumentWithTag):
151         (checkSpellingOfString):
152         (guessesForWord):
153         (learnWord):
154         (ignoreWord):
155         (Ewk_Text_Checker):
156         (Ewk_Text_Checker::availableSpellCheckingLanguages):
157         (Ewk_Text_Checker::updateSpellCheckingLanguages):
158         (Ewk_Text_Checker::loadedSpellCheckingLanguages):
159         (Ewk_Text_Checker::initialize):
160         * UIProcess/API/efl/ewk_text_checker_private.h:
161         (Ewk_Text_Checker):
162         * UIProcess/efl/WebKitTextChecker.cpp: Removed.
163         * UIProcess/efl/WebKitTextChecker.h: Removed.
164
165 2012-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@samsung.com>
166
167         Implementation of spellchecking feature.
168         https://bugs.webkit.org/show_bug.cgi?id=91854
169
170         Reviewed by Gyuyoung Kim.
171
172         Add spelling implementation for WebKit2-EFL that is based on Enchant library.
173
174         Additionally the patch provides API to overwrite the default WebKit
175         spellchecker implementation as Enchant library doesn't ensure grammar checking.
176         Application is able to overwrite it by defining its own implementation and
177         setting appropriate callback functions.
178
179         * PlatformEfl.cmake:
180         Add enchant-related compiler flags: header paths and the library flag.
181
182         * UIProcess/API/efl/EWebKit2.h:
183         Add ewk_text_checker.h to the main WebKit2-EFL's header to be available for applications.
184
185         * UIProcess/API/efl/WebKitTextChecker.cpp: Added.
186         Implement the callbacks functions of WKTextChecker.
187
188         (WebKit):
189         (WebKit::isContinuousSpellCheckingEnabled):
190         (WebKit::setContinuousSpellCheckingEnabled):
191         (WebKit::uniqueSpellDocumentTag):
192         (WebKit::closeSpellDocumentWithTag):
193         (WebKit::checkSpellingOfString):
194         (WebKit::guessesForWord):
195         (WebKit::learnWord):
196         (WebKit::ignoreWord):
197         Those functions are directly given as callback functions for WKTextChecker's client.
198         They choose between WebKit's spelling implementation and client's ones.
199
200         (WebKit::availableSpellCheckingLanguages):
201         (WebKit::updateSpellCheckingLanguages):
202         (WebKit::loadedSpellCheckingLanguages):
203         They are used by ewk_settings.cpp file and allow to do not
204         expose 'textCheckerEnchant'.
205
206         * UIProcess/API/efl/WebKitTextChecker.h: Added.
207         Define the functions which choose between WebKit's spelling implementation and
208         the client's ones.
209
210         (WebKit):
211         * UIProcess/API/efl/ewk_context.cpp:
212         (_Ewk_Context::_Ewk_Context):
213         Attach the spellchecker feature for the context.
214
215         * UIProcess/API/efl/ewk_text_checker.cpp: Added.
216         (ewk_text_checker_callbacks_get):
217         An internal function to get the client's callback functions.
218
219         * UIProcess/API/efl/ewk_text_checker.h: Added.
220         Define API to set the client's own spelling implementation.
221
222         * UIProcess/API/efl/ewk_text_checker_private.h: Added.
223         (_Ewk_Text_Checker):
224         Define the struct with the client's callbacks responisble for spelling.
225
226         * UIProcess/API/efl/ewk_settings.cpp:
227         (onContinuousSpellCheckingIdler):
228         The application is notified about the spelling setting change on idler
229         to do not block WebKit.
230         The the continuous spell checking may be changed through the context menu option.
231
232         (spellCheckingLanguagesSetUpdate):
233         The dictionaries are requested on 'idler' to do not block WebKit.
234
235         (spellCheckingLanguagesSet):
236         Set the languages.
237
238         (ewk_settings_continuous_spell_checking_change_cb_set):
239         Set the callback function used to notify the client when the spelling
240         setting was changed by WebKit.
241
242         (ewk_settings_continuous_spell_checking_enabled_get):
243         (ewk_settings_continuous_spell_checking_enabled_set):
244         API to set/get the continuous spell checking.
245
246         (ewk_settings_spell_checking_available_languages_get):
247         (ewk_settings_spell_checking_languages_set):
248         (ewk_settings_spell_checking_languages_get):
249         API to get/set languages to use by WebKit implementation based on Enchant library.
250
251         * UIProcess/efl/TextCheckerEfl.cpp:
252         (WebKit::TextChecker::state):
253         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
254         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
255         (WebKit::TextChecker::setGrammarCheckingEnabled):
256         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
257         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
258         (WebKit::TextChecker::uniqueSpellDocumentTag):
259         (WebKit::TextChecker::closeSpellDocumentWithTag):
260         (WebKit::TextChecker::checkSpellingOfString):
261         (WebKit::TextChecker::checkGrammarOfString): Remove WebCore namaspace as it's already defined for the whole file.
262         (WebKit::TextChecker::spellingUIIsShowing):
263         (WebKit::TextChecker::toggleSpellingUIIsShowing):
264         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
265         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
266         (WebKit::TextChecker::getGuessesForWord):
267         (WebKit::TextChecker::learnWord):
268         (WebKit::TextChecker::ignoreWord):
269         Those call WKTextChecker client's methods.
270
271 2012-09-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
272
273         Add method to get the list of all available dictionaries
274         https://bugs.webkit.org/show_bug.cgi?id=96518
275
276         Reviewed by Carlos Garcia Campos.
277
278         * UIProcess/API/gtk/WebKitTextChecker.cpp:
279         (WebKitTextChecker::getSpellCheckingLanguages):
280         Update the method name that is called inside getSpellCheckingLanguages.
281         This replace doesn't affect any on API changes.
282
283 2012-09-12  Byungwoo Lee  <bw80.lee@samsung.com>
284
285         [EFL][WK2] WorkQueue::dispatchAfterDelay() doesn't work properly.
286         https://bugs.webkit.org/show_bug.cgi?id=91179
287
288         Reviewed by Gyuyoung Kim.
289
290         When UI Process is crashed and WebProcess's ecore main loop is very
291         busy or lockup also, watchdocCallback() function in the
292         ChildProcess.cpp doesn't triggered. And this is because of that
293         WorkQueue::dispatchAfterDelay() function uses ecore timer for getting
294         timer event.
295
296         For removing the dependency between the dispatchAfterDelay() and ecore
297         main loop, new timer event mechanism is added to WorkQueue main loop.
298
299         * Platform/WorkQueue.h:
300         (TimerWorkItem):
301         (WorkQueue::TimerWorkItem::dispatch):
302         (WorkQueue::TimerWorkItem::expireTime):
303         (WorkQueue::TimerWorkItem::expired):
304         (WorkQueue):
305         * Platform/efl/WorkQueueEfl.cpp:
306         (WorkQueue::TimerWorkItem::create):
307         (WorkQueue::TimerWorkItem::TimerWorkItem):
308         (WorkQueue::performFileDescriptorWork):
309         (WorkQueue::getCurrentTime):
310         (WorkQueue::getNextTimeOut):
311         (WorkQueue::performTimerWork):
312         (WorkQueue::workQueueThread):
313         (WorkQueue::dispatchAfterDelay):
314
315 2012-08-06  Mario Sanchez Prada  <msanchez@igalia.com>
316
317         [WK2][GTK] Improvements for the new spell-checking API
318         https://bugs.webkit.org/show_bug.cgi?id=93262
319
320         Reviewed by Carlos Garcia Campos.
321
322         Improve the way the new spell-checking API is implemented, by
323         using better internal representations for data, documenting better
324         the new functions and using better unit tests.
325
326         * UIProcess/API/gtk/WebKitTextChecker.cpp:
327         (WebKitTextChecker::getSpellCheckingLanguages): Just return the
328         value previously cached when calling to the setter function.
329         (WebKitTextChecker::setSpellCheckingLanguages): Update the text
330         checker in WebCore and cache the value returned from it.
331         * UIProcess/API/gtk/WebKitTextChecker.h:
332         (WebKitTextChecker): Use a CString instead of an String to cache
333         the list of spell checking languages. Update getter and setter.
334         * UIProcess/API/gtk/WebKitWebContext.cpp:
335         (_WebKitWebContextPrivate): No need to cache the spell checking
336         languages here anymore.
337         (webkit_web_context_get_spell_checking_languages): Improve
338         both implementation and documentation to be more consistent.
339         (webkit_web_context_set_spell_checking_languages): Make
340         'languages' a mandatory (non-NULL) parameter. Update documentation.
341         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
342         (testWebContextSpellChecker): Test even more situations.
343
344 2012-08-22  Carlos Garcia Campos  <cgarcia@igalia.com>
345
346         [GTK] Preferred languages and spellchecker APIs are not consistent in WebKit2
347         https://bugs.webkit.org/show_bug.cgi?id=94683
348
349         Reviewed by Alejandro G. Castro.
350
351         Change spell-checker and preferred languages API to use a GStrv
352         instead of a comma-separated string and GList. This makes the API
353         more consistent and convenient to use.
354
355         * UIProcess/API/gtk/WebKitTextChecker.cpp:
356         (WebKitTextChecker::getSpellCheckingLanguages): Return a
357         Vector<String> instead of a String.
358         (WebKitTextChecker::setSpellCheckingLanguages): Receive a
359         Vector<String> instead of a String.
360         * UIProcess/API/gtk/WebKitTextChecker.h:
361         (WebKitTextChecker): Use a GPtrArray to cache languages.
362         * UIProcess/API/gtk/WebKitWebContext.cpp:
363         (webkit_web_context_get_spell_checking_languages):
364         (webkit_web_context_set_spell_checking_languages):
365         (webkit_web_context_set_preferred_languages):
366         * UIProcess/API/gtk/WebKitWebContext.h:
367         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
368         (testWebContextSpellChecker):
369         (testWebContextLanguages):
370
371 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
372
373         Add replaceWithLiteral() method to WTF::String
374         https://bugs.webkit.org/show_bug.cgi?id=101257
375
376         Reviewed by Benjamin Poulain.
377
378         Substitute String::replace() calls by String::replaceWithLiteral() where
379         adequate, for efficiency.
380
381         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
382         (WebKit::makeURLString):
383
384 2012-10-23  Alexander Shalamov  <alexander.shalamov@intel.com>
385
386         [EFL][WK2] ecore_x should be initialised in WebProcess to avoid re-initialization by PlatformScreenEfl utilities and systemBeep() function
387         https://bugs.webkit.org/show_bug.cgi?id=100110
388
389         Reviewed by Kenneth Rohde Christiansen.
390
391         PlatformScreenEfl functions and systemBeep() depend on ecore_x functionality, therefore,
392         ecore_x should be initialized when web process starts to avoid re-initialization.
393
394         * WebProcess/efl/WebProcessMainEfl.cpp:
395         (WebKit::WebProcessMainEfl): Initialized ecore_x module.
396
397 2012-10-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
398
399         [WK2/EFL] Make sure all our events are transformed correctly
400         https://bugs.webkit.org/show_bug.cgi?id=100836
401
402         Reviewed by Alexis Menard.
403
404         When moving to using the tiled backing store, we need to
405         transform our events before sending them to the web process.
406
407         We needed to do that before as well, as the webkit view
408         doesn't have to be positioned at (0,0), but it was done in
409         a hacking way in the WebEvent creating.
410
411         Now we generate two transforms, one for transforming points
412         to the web content, and one for transforming them into the
413         device screen coordinate system.
414
415         This fixes the global position which was wrong before.
416
417         * Shared/NativeWebMouseEvent.h:
418         (NativeWebMouseEvent):
419         * Shared/NativeWebTouchEvent.h:
420         (NativeWebTouchEvent):
421         * Shared/NativeWebWheelEvent.h:
422         (NativeWebWheelEvent):
423         * Shared/efl/NativeWebMouseEventEfl.cpp:
424         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
425         * Shared/efl/NativeWebTouchEventEfl.cpp:
426         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
427         * Shared/efl/NativeWebWheelEventEfl.cpp:
428         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
429         * Shared/efl/WebEventFactory.cpp:
430         (WebKit::WebEventFactory::createWebMouseEvent):
431         (WebKit::WebEventFactory::createWebWheelEvent):
432         (WebKit::WebEventFactory::createWebTouchEvent):
433         * Shared/efl/WebEventFactory.h:
434         (WebEventFactory):
435         * UIProcess/API/efl/ewk_view.cpp:
436         (toDeviceScreenTransform):
437         (toWebContentTransform):
438         (_ewk_view_smart_mouse_wheel):
439         (_ewk_view_smart_mouse_down):
440         (_ewk_view_smart_mouse_up):
441         (_ewk_view_smart_mouse_move):
442         (ewk_view_feed_touch_event):
443
444 2012-10-23  Eunmi Lee  <eunmi15.lee@samsung.com>
445
446         [EFL][WK2] Convert WebEvent's timestamp from millisecond to second.
447         https://bugs.webkit.org/show_bug.cgi?id=100101
448
449         Reviewed by Kenneth Rohde Christiansen.
450
451         Convert timestamp to second to create WebEvent from Evas event because
452         the unit of timestamp from Evas Event is millisecond, but the unit of
453         timestamp for WebEvent is second.
454
455         * Shared/efl/WebEventFactory.cpp:
456         (WebKit::convertMillisecondToSecond):
457         (WebKit):
458         (WebKit::WebEventFactory::createWebMouseEvent):
459         (WebKit::WebEventFactory::createWebWheelEvent):
460         (WebKit::WebEventFactory::createWebKeyboardEvent):
461
462 2012-07-29  Patrick Gansterer  <paroga@webkit.org>
463
464         [CMake] Use WEBKIT_CREATE_FORWARDING_HEADERS to generate WK2 forwarding headers
465         https://bugs.webkit.org/show_bug.cgi?id=83579
466
467         Reviewed by Daniel Bates.
468
469         Using a list of directories in combination with the WEBKIT_CREATE_FORWARDING_HEADERS
470         macro allows us to share the common generation of forwarding headers across ports.
471
472         * CMakeLists.txt:
473         * PlatformEfl.cmake:
474
475 2012-07-28  Sam Weinig  <sam@webkit.org>
476
477         Stop copying unnecessary files in WebKit2 build
478         https://bugs.webkit.org/show_bug.cgi?id=92587
479
480         Reviewed by Dan Bernstein.
481
482         * WebKit2.xcodeproj/project.pbxproj:
483         We were accidentally copying ColorSpaceData.h and EventDispatcher.messages.in into the
484         build products. Stop this.
485
486 2012-07-28  Ryuan Choi  <ryuan.choi@samsung.com>
487
488         [WK2][EFL] Add ewk_view_scale_{get|set} to EwkView.
489         https://bugs.webkit.org/show_bug.cgi?id=92446
490
491         Reviewed by Kenneth Rohde Christiansen.
492
493         Add methods to Ewk_View to get or set the scale factor of page.
494
495         * UIProcess/API/efl/ewk_view.cpp:
496         (ewk_view_scale_set):
497         (ewk_view_scale_get):
498         * UIProcess/API/efl/ewk_view.h:
499
500 2012-07-28  Mario Sanchez Prada  <msanchez@igalia.com>
501
502         [WK2][GTK] Implement a new spell checker API for WebKit2GTK+
503         https://bugs.webkit.org/show_bug.cgi?id=90268
504
505         Reviewed by Martin Robinson.
506
507         Add a simple spell checking API to WK2, allowing to enable/disable
508         this feature and to define a list of languages associated to it.
509
510         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
511         * GNUmakefile.list.am: Added new files
512
513         Added new internal class that will act both as the implementation
514         of TextCheckerClient and as the object WebKitWebContext will
515         depend on to implement the newly added API.
516
517         * UIProcess/API/gtk/WebKitTextChecker.cpp: Added.
518         (toTextChecker):
519         (continuousSpellCheckingEnabledCallback):
520         (setContinuousSpellCheckingEnabledCallback):
521         (checkSpellingOfStringCallback):
522         (guessesForWordCallback):
523         (learnWordCallback):
524         (ignoreWordCallback):
525         (WebKitTextChecker::~WebKitTextChecker):
526         (WebKitTextChecker::create):
527         (WebKitTextChecker::WebKitTextChecker):
528         (WebKitTextChecker::checkSpellingOfString):
529         (WebKitTextChecker::getGuessesForWord):
530         (WebKitTextChecker::learnWord):
531         (WebKitTextChecker::ignoreWord):
532         (WebKitTextChecker::setSpellCheckingEnabled):
533         (WebKitTextChecker::setSpellCheckingLanguages):
534         * UIProcess/API/gtk/WebKitTextChecker.h: Added.
535         (WebKitTextChecker):
536         (WebKitTextChecker::isSpellCheckingEnabled):
537         (WebKitTextChecker::getSpellCheckingLanguages):
538
539         Added WKTextChecker to WebKitPrivate.h, needed in WebKitTextChecker.
540
541         * UIProcess/API/gtk/WebKitPrivate.h:
542
543         Add new API to WebKitWebContext to allow enabling/disabling this
544         spell checking feature, and to set/get the list of languages used
545         to decide which dictionaries will be consulted.
546
547         * UIProcess/API/gtk/WebKitWebContext.cpp:
548         (_WebKitWebContextPrivate):
549         (createDefaultWebContext):
550         (webkit_web_context_get_spell_checking_enabled): New API.
551         (webkit_web_context_set_spell_checking_enabled): Ditto.
552         (webkit_web_context_get_spell_checking_languages): Ditto.
553         (webkit_web_context_set_spell_checking_languages): Ditto.
554         * UIProcess/API/gtk/WebKitWebContext.h:
555
556         New tests for checking the new API added to WebKitWebContext.
557
558         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
559         (testWebContextSpellChecker):
560         (beforeAll):
561
562         Update documentation with new sections and symbols.
563
564         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
565         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
566
567 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
568
569         [EFL][WK2] Assertion hit in ewk_cookie_manager.cpp
570         https://bugs.webkit.org/show_bug.cgi?id=92544
571
572         Reviewed by Kenneth Rohde Christiansen.
573
574         Removed wrong assertion in ewk_cookie_manager.cpp
575         and replace it by an if check. The assertion was
576         sometimes hit by our unit tests.
577
578         * UIProcess/API/efl/ewk_cookie_manager.cpp:
579         (cookiesDidChange):
580
581 2012-07-27  Anders Carlsson  <andersca@apple.com>
582
583         Don't use an NSUserDefault for disabling the web process sandbox
584         https://bugs.webkit.org/show_bug.cgi?id=92542
585         <rdar://problem/11976060>
586
587         Reviewed by Mark Rowe.
588
589         The user default was really helpful during WebKit2 bringup, but we no longer need to pay the IPC cost of initializing NSUserDefaults at startup,
590         so get rid of the preference and use a good old #ifdef instead.
591
592         * WebProcess/mac/WebProcessMac.mm:
593         (WebKit::initializeSandbox):
594
595 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
596
597         [WK2][WTR] LayoutTestController.deliverWebIntent() needs to be implemented
598         https://bugs.webkit.org/show_bug.cgi?id=92228
599
600         Reviewed by Anders Carlsson.
601
602         Add C API to create a WKIntentData and to deliver
603         it to a frame. This is needed by WebKitTestRunner
604         to implement LayoutTestController.deliverWebIntent().
605
606         * UIProcess/API/C/WKIntentData.cpp:
607         (WKIntentDataCreate):
608         * UIProcess/API/C/WKIntentData.h:
609         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
610         (WKBundlePageDeliverIntentToFrame):
611         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
612         * WebProcess/WebPage/WebPage.h:
613         (WebPage): Make deliverIntentToFrame() public so that it can
614         be used by WKBundlePage.
615
616 2012-07-27  Anders Carlsson  <andersca@apple.com>
617
618         Show the unavailable plug-in indicator for Java applets as well
619         https://bugs.webkit.org/show_bug.cgi?id=92521
620
621         Reviewed by Sam Weinig.
622
623         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
624         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
625         This can now be called on applet elements as well.
626
627         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
628         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
629         Get the MIME type from the applet element.
630
631 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
632
633         [WK2] Fix build warning in WebEventConversion.cpp
634         https://bugs.webkit.org/show_bug.cgi?id=92517
635
636         Reviewed by Darin Adler.
637
638         There is a build warning related to comparison between signed and unsigned integer expressions.
639
640         * Shared/WebEventConversion.cpp:
641         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
642
643 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
644
645         [WK2] Fix build warning in WebEventConversion.cpp
646         https://bugs.webkit.org/show_bug.cgi?id=92517
647
648         Reviewed by Darin Adler.
649
650         There is a build warning related to comparison between signed and unsigned integer expressions.
651
652         * Shared/WebEventConversion.cpp:
653         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
654
655 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
656
657         [EFL][WK2] Add download client for Ewk_Context
658         https://bugs.webkit.org/show_bug.cgi?id=91345
659
660         Reviewed by Kenneth Rohde Christiansen.
661
662         Add download client for Ewk_Context so that
663         information about downloads can be reported
664         to the client application via Ewk_View signals.
665
666         The client application needs to listen for
667         "download,request" signal on the view and set
668         the download path for the download in the
669         callback in order to accept it. If the signal
670         is ignored or if the download path is not set
671         the download will fail.
672
673         A new Ewk_Download_Job type is introduced to provide
674         information relative to a download to the client
675         and to allow the client to interact with it (e.g.
676         set its download path, cancel it, ...).
677
678         * PlatformEfl.cmake:
679         * UIProcess/API/efl/EWebKit2.h:
680         * UIProcess/API/efl/PageClientImpl.cpp:
681         (WebKit::PageClientImpl::handleDownloadRequest):
682         (WebKit):
683         * UIProcess/API/efl/PageClientImpl.h:
684         (PageClientImpl):
685         * UIProcess/API/efl/ewk_context.cpp:
686         (_Ewk_Context):
687         (_Ewk_Context::_Ewk_Context):
688         (_Ewk_Context::~_Ewk_Context):
689         (ewk_context_download_job_add):
690         (ewk_context_download_job_get):
691         (ewk_context_download_job_remove):
692         * UIProcess/API/efl/ewk_context_download_client.cpp: Added.
693         (toEwkContext):
694         (decideDestinationWithSuggestedFilename):
695         (didReceiveResponse):
696         (didCreateDestination):
697         (didReceiveData):
698         (didFail):
699         (didCancel):
700         (didFinish):
701         (ewk_context_download_client_attach):
702         * UIProcess/API/efl/ewk_context_download_client_private.h: Added.
703         * UIProcess/API/efl/ewk_context_private.h:
704         * UIProcess/API/efl/ewk_download_job.cpp: Added.
705         (_Ewk_Download_Job):
706         (_Ewk_Download_Job::_Ewk_Download_Job):
707         (_Ewk_Download_Job::~_Ewk_Download_Job):
708         (ewk_download_job_ref):
709         (ewk_download_job_unref):
710         (ewk_download_job_id_get):
711         (ewk_download_job_view_get):
712         (ewk_download_job_state_get):
713         (ewk_download_job_request_get):
714         (ewk_download_job_response_get):
715         (ewk_download_job_destination_get):
716         (ewk_download_job_destination_set):
717         (ewk_download_job_suggested_filename_get):
718         (ewk_download_job_cancel):
719         (ewk_download_job_estimated_progress_get):
720         (ewk_download_job_elapsed_time_get):
721         (ewk_download_job_response_set):
722         (ewk_download_job_suggested_filename_set):
723         (ewk_download_job_received_data):
724         (ewk_download_job_state_set):
725         (ewk_download_job_new):
726         * UIProcess/API/efl/ewk_download_job.h: Added.
727         * UIProcess/API/efl/ewk_download_job_private.h: Added.
728         (WebKit):
729         * UIProcess/API/efl/ewk_url_response.cpp:
730         (ewk_url_response_content_length_get): Add a function to
731         retrieve the content length of a URL response.
732         * UIProcess/API/efl/ewk_url_response.h:
733         * UIProcess/API/efl/ewk_view.cpp:
734         (ewk_view_download_job_cancelled):
735         (ewk_view_download_job_requested):
736         (ewk_view_download_job_failed):
737         (ewk_view_download_job_finished):
738         * UIProcess/API/efl/ewk_view.h:
739         * UIProcess/API/efl/ewk_view_private.h:
740         * UIProcess/API/efl/tests/resources/test.pdf: Added.
741         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Added. This tests
742         the download functionality.
743         (DownloadTestData):
744         (fileExists):
745         (serverCallback):
746         (on_download_requested):
747         (on_download_cancelled):
748         (on_download_failed):
749         (on_download_finished):
750         (TEST_F):
751         * UIProcess/PageClient.h:
752         (PageClient):
753         * UIProcess/WebPageProxy.cpp:
754         (WebKit::WebPageProxy::receivedPolicyDecision):
755         (WebKit):
756         (WebKit::WebPageProxy::handleDownloadRequest):
757         * UIProcess/WebPageProxy.h:
758         (WebPageProxy):
759
760 2012-07-27  YoungTaeck Song  <youngtaeck.song@samsung.com>
761
762         [WK2][EFL] Add an ACCELERATED_COMPOSITING implementation for Efl WebKit2
763         https://bugs.webkit.org/show_bug.cgi?id=91581
764
765         Reviewed by Noam Rosenthal.
766
767         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
768         When enter accelerated compositing mode, create evas_gl, evas_gl_context, and evas_gl_surface.
769
770         * PlatformEfl.cmake:
771         * Shared/LayerTreeContext.h:
772         (LayerTreeContext):
773         * UIProcess/API/efl/PageClientImpl.cpp:
774         (WebKit::PageClientImpl::viewSize):
775         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
776         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
777         * UIProcess/API/efl/ewk_view.cpp:
778         (_Ewk_View_Private_Data):
779         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
780         (ewk_view_size_get):
781         (ewk_view_create_gl_surface):
782         (ewk_view_enter_accelerated_compositing_mode):
783         (ewk_view_exit_accelerated_compositing_mode):
784         (_ewk_view_smart_calculate):
785         * UIProcess/API/efl/ewk_view_private.h:
786
787 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
788
789         [EFL][WK2] Add API to Ewk_Cookie_Manager to watch for cookie changes
790         https://bugs.webkit.org/show_bug.cgi?id=92484
791
792         Reviewed by Kenneth Rohde Christiansen.
793
794         Add API tp Ewk_Cookie_Manager so that the client can watch
795         for cookie changes.
796
797         * UIProcess/API/efl/ewk_cookie_manager.cpp:
798         * UIProcess/API/efl/ewk_cookie_manager.h:
799         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Add unit tests
800         for cookie changes watching.
801
802 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
803
804         [EFL][WK2] Stop using C API to interact with the page in Ewk_View
805         https://bugs.webkit.org/show_bug.cgi?id=92463
806
807         Reviewed by Simon Hausmann.
808
809         Stop using C API to interact with the PageProxy in Ewk_View
810         and use the PageProxy object directly. This avoids useless
811         converting to WK type using toAPI() all the time.
812
813         * UIProcess/API/efl/ewk_view.cpp:
814         (ewk_view_base_add):
815         (ewk_view_uri_update):
816         (ewk_view_uri_set):
817         (ewk_view_reload):
818         (ewk_view_reload_bypass_cache):
819         (ewk_view_stop):
820         (ewk_view_load_progress_get):
821         (ewk_view_device_pixel_ratio_set):
822         (ewk_view_theme_get):
823         (ewk_view_cursor_set):
824         (ewk_view_back):
825         (ewk_view_forward):
826         (ewk_view_intent_deliver):
827         (ewk_view_back_possible):
828         (ewk_view_forward_possible):
829         (ewk_view_setting_encoding_custom_get):
830         (ewk_view_setting_encoding_custom_set):
831
832 2012-07-27  Dominik Röttsches  <dominik.rottsches@intel.com>
833
834         [Cairo] Add complex font drawing using HarfbuzzNG
835         https://bugs.webkit.org/show_bug.cgi?id=91864
836
837         Reviewed by Simon Hausmann and Martin Robinson.
838
839         Adding includes for harfbuzz folders.
840
841         * CMakeLists.txt:
842
843 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
844
845         [EFL][WK2] Add more Ewk_View unit tests
846         https://bugs.webkit.org/show_bug.cgi?id=92407
847
848         Reviewed by Kenneth Rohde Christiansen.
849
850         Add more unit tests for WebKit2 Ewk_View API.
851         In particular, navigation, HTML loading and
852         device pixel ratio functions are now tested.
853
854         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
855         (EWK2UnitTest::EWK2UnitTestBase::SetUp): Call ewk_init() instead
856         of duplicating initialization code.
857         (EWK2UnitTest::EWK2UnitTestBase::TearDown): call ewk_shutdown().
858         (TitleChangedData):
859         (EWK2UnitTest):
860         (EWK2UnitTest::onTitleChanged):
861         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo): Add convenience
862         method to wait until the view main frame title changes to a given value.
863         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
864         (EWK2UnitTestBase):
865         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
866         (TEST_F):
867         (serverCallbackNavigation):
868
869 2012-07-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
870
871         [EFL][WK2] Keyboard events miss key location data.
872         https://bugs.webkit.org/show_bug.cgi?id=92235
873
874         Reviewed by Simon Hausmann.
875
876         EFL WK2 did not initialize WebKeyboardEvent::m_isKeypad field.
877         This caused failure of fast/events/keydown-numpad-keys.html test.
878
879         * Shared/efl/WebEventFactory.cpp: WebKeyboardEvent::m_isKeypad is initialized.
880         (WebKit::WebEventFactory::createWebKeyboardEvent):
881
882 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
883
884         [EFL] Fix wrong return value in EWK_VIEW_XXX macro.
885         https://bugs.webkit.org/show_bug.cgi?id=92466
886
887         Reviewed by Simon Hausmann.
888
889         There are wrong return values in EWK_VIEW_XXX macros. The wrong return values
890         should be fixed. In addition, API description is also modified according to returned
891         value change.
892
893         * UIProcess/API/efl/ewk_view.cpp:
894         (ewk_view_uri_set):
895         (ewk_view_load_progress_get):
896         (ewk_view_device_pixel_ratio_get):
897         * UIProcess/API/efl/ewk_view.h:
898
899 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
900
901         [EFL][WK2] Add unit tests for Ewk_View form client
902         https://bugs.webkit.org/show_bug.cgi?id=92468
903
904         Reviewed by Simon Hausmann.
905
906         Add unit test for form client functionality in
907         Ewk_View.
908
909         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
910         (onFormAboutToBeSubmitted):
911         (TEST_F):
912
913 2012-07-26  Zeno Albisser  <zeno@webkit.org>
914
915         Unreviewed Qt buildfix after r123786.
916
917         Qt-minimal builds with ENABLE_REQUEST_ANIMATION_FRAME=0.
918         Therefore adding #ifdefs to allow for that configuration.
919
920         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
921         (WebKit):
922         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
923         (LayerTreeCoordinator):
924
925 2012-07-26  Zeno Albisser  <zeno@webkit.org>
926
927         [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
928         https://bugs.webkit.org/show_bug.cgi?id=88638
929
930         Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
931         the servicing of scripted animations to layer syncing for WK2.
932         For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
933
934         Reviewed by Jocelyn Turcotte.
935
936         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
937         (WebKit):
938         (WebKit::WebChromeClient::scheduleAnimation):
939         * WebProcess/WebCoreSupport/WebChromeClient.h:
940         (WebChromeClient):
941         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
942         (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
943         (WebKit::LayerTreeCoordinator::scheduleAnimation):
944         (WebKit):
945         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
946         (LayerTreeCoordinator):
947         * WebProcess/WebPage/LayerTreeHost.h:
948         (LayerTreeHost):
949
950 2012-07-26  Jer Noble  <jer.noble@apple.com>
951
952         Add a ChromeClient method to send diagnostic logging messages from WebCore to the client.
953         https://bugs.webkit.org/show_bug.cgi?id=92340
954
955         Reviewed by Anders Carlsson.
956
957         Pipe the ChromeClient logDiagnosticMessage() function through WebKit2 to a new bundle class
958         InjectedBundlePageDiagnosticLoggingClient, to be implemented by the client.
959
960         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
961         (WKBundlePageSetDiagnosticLoggingClient): Added.
962         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
963         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
964         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
965         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
966         (InjectedBundlePageDiagnosticLoggingClient):
967         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
968         (WebKit::WebChromeClient::logDiagnosticMessage):
969         * WebProcess/WebCoreSupport/WebChromeClient.h:
970         * WebProcess/WebPage/WebPage.cpp:
971         (WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient):
972         * WebProcess/WebPage/WebPage.h:
973         (WebKit::WebPage::injectedBundleDiagnosticLoggingClient):
974
975         Add a convenience class to retrieve the diagnostic message keys:
976         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
977         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
978         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
979         (InjectedBundlePageDiagnosticLoggingClient):
980
981         Add the InjectedBundlePageDiagnosticLoggingClient.cpp,h files.
982         * CMakeLists.txt:
983         * GNUmakefile.list.am:
984         * Target.pri:
985         * win/WebKit2.vcproj:
986         * WebKit2.xcodeproj/project.pbxproj: 
987
988 2012-07-25  Jer Noble  <jer.noble@apple.com>
989
990         Add setting to enable and disable diagnostic logging.
991         https://bugs.webkit.org/show_bug.cgi?id=92337
992
993         Reviewed by Anders Carlsson.
994
995         Add a WebKit2 WKPreferences API to set set the WebCore diagnosticLoggingEnabled setting.
996
997         * Shared/WebPreferencesStore.h:
998         * UIProcess/API/C/WKPreferences.cpp:
999         (WKPreferencesSetDiagnosticLoggingEnabled):
1000         (WKPreferencesGetDiagnosticLoggingEnabled):
1001         * UIProcess/API/C/WKPreferencesPrivate.h:
1002         * WebProcess/WebPage/WebPage.cpp:
1003         (WebKit::WebPage::updatePreferences): Ensure this preference is propagated to Settings
1004             whenever the preferences change.
1005
1006 2012-07-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1007
1008         [EFL][WK2] Regression(r123731): Linking errors due to efreet functions
1009         https://bugs.webkit.org/show_bug.cgi?id=92378
1010
1011         Unreviewed build fix.
1012
1013         The library list created by PlatformEfl.cmake was being erased by a
1014         SET called after including the platform specific file. Luckily the
1015         dependencies were fulfilled by other targets until efreet was add.
1016
1017         * CMakeLists.txt:
1018
1019 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1020
1021         [EFL][WK2] Compilation warning in EWK2UnitTestServer.cpp
1022         https://bugs.webkit.org/show_bug.cgi?id=92387
1023
1024         Reviewed by Kenneth Rohde Christiansen.
1025
1026         Fix compilation warning in EWK2UnitTestServer.cpp.
1027
1028         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
1029         (EWK2UnitTestServer::EWK2UnitTestServer):
1030
1031 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1032
1033         [EFL][WK2] Implement Network Information provider
1034         https://bugs.webkit.org/show_bug.cgi?id=92343
1035
1036         Reviewed by Kenneth Rohde Christiansen.
1037
1038         Add Network Information provider for WebKit2 EFL
1039         by using NetworkInfoProviderEfl class from
1040         WebCore.
1041
1042         * CMakeLists.txt:
1043         * PlatformEfl.cmake:
1044         * UIProcess/API/efl/NetworkInfoProvider.cpp: Added.
1045         (toNetworkInfoProvider):
1046         (startUpdatingCallback):
1047         (stopUpdatingCallback):
1048         (getBandwidthCallback):
1049         (isMeteredCallback):
1050         (NetworkInfoProvider::create):
1051         (NetworkInfoProvider::NetworkInfoProvider):
1052         (NetworkInfoProvider::~NetworkInfoProvider):
1053         (NetworkInfoProvider::bandwidth):
1054         (NetworkInfoProvider::metered):
1055         (NetworkInfoProvider::startUpdating):
1056         (NetworkInfoProvider::stopUpdating):
1057         * UIProcess/API/efl/NetworkInfoProvider.h: Added.
1058         (NetworkInfoProvider):
1059
1060 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1061
1062         [EFL][WK2] Compilation warning in EWK2UnitTestServer.cpp
1063         https://bugs.webkit.org/show_bug.cgi?id=92387
1064
1065         Reviewed by Kenneth Rohde Christiansen.
1066
1067         Fix compilation warning in EWK2UnitTestServer.cpp.
1068
1069         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
1070         (EWK2UnitTestServer::EWK2UnitTestServer):
1071
1072 2012-07-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1073
1074         [EFL][WK2] Regression(r123731): Linking errors due to efreet functions
1075         https://bugs.webkit.org/show_bug.cgi?id=92378
1076
1077         Unreviewed build fix.
1078
1079         The library list created by PlatformEfl.cmake was being erased by a
1080         SET called after including the platform specific file. Luckily the
1081         dependencies were fulfilled by other targets until efreet was add.
1082
1083         * CMakeLists.txt:
1084
1085 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1086
1087         [EFL][WK2] Compilation warning in EWK2UnitTestServer.cpp
1088         https://bugs.webkit.org/show_bug.cgi?id=92387
1089
1090         Reviewed by Kenneth Rohde Christiansen.
1091
1092         Fix compilation warning in EWK2UnitTestServer.cpp.
1093
1094         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
1095         (EWK2UnitTestServer::EWK2UnitTestServer):
1096
1097 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1098
1099         [EFL][WK2] Implement Network Information provider
1100         https://bugs.webkit.org/show_bug.cgi?id=92343
1101
1102         Reviewed by Kenneth Rohde Christiansen.
1103
1104         Add Network Information provider for WebKit2 EFL
1105         by using NetworkInfoProviderEfl class from
1106         WebCore.
1107
1108         * CMakeLists.txt:
1109         * PlatformEfl.cmake:
1110         * UIProcess/API/efl/NetworkInfoProvider.cpp: Added.
1111         (toNetworkInfoProvider):
1112         (startUpdatingCallback):
1113         (stopUpdatingCallback):
1114         (getBandwidthCallback):
1115         (isMeteredCallback):
1116         (NetworkInfoProvider::create):
1117         (NetworkInfoProvider::NetworkInfoProvider):
1118         (NetworkInfoProvider::~NetworkInfoProvider):
1119         (NetworkInfoProvider::bandwidth):
1120         (NetworkInfoProvider::metered):
1121         (NetworkInfoProvider::startUpdating):
1122         (NetworkInfoProvider::stopUpdating):
1123         * UIProcess/API/efl/NetworkInfoProvider.h: Added.
1124         (NetworkInfoProvider):
1125
1126 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1127
1128         [EFL][WK2] Compilation warning in EWK2UnitTestServer.cpp
1129         https://bugs.webkit.org/show_bug.cgi?id=92387
1130
1131         Reviewed by Kenneth Rohde Christiansen.
1132
1133         Fix compilation warning in EWK2UnitTestServer.cpp.
1134
1135         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
1136         (EWK2UnitTestServer::EWK2UnitTestServer):
1137
1138 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1139
1140         [EFL][WK2] Add unit tests for Ewk_Context
1141         https://bugs.webkit.org/show_bug.cgi?id=92005
1142
1143         Reviewed by Antonio Gomes.
1144
1145         Add unit tests for WebKit2 Ewk_Context.
1146
1147         * PlatformEfl.cmake:
1148         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1149         (ewk_url_scheme_request_finish):
1150         * UIProcess/API/efl/ewk_url_scheme_request.h: Mark content_data
1151         argument as const.
1152         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Added.
1153         (TEST_F):
1154         (schemeRequestCallback):
1155
1156 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1157
1158         [EFL][WK2] Add form client for Ewk_View
1159         https://bugs.webkit.org/show_bug.cgi?id=92358
1160
1161         Reviewed by Kenneth Rohde Christiansen.
1162
1163         Implement a form client for EFL port in order to
1164         send a "form,request,new" signal on the Ewk_View
1165         whenever a form will be submitted.
1166
1167         The Ewk_Form_Submission_Request type is
1168         introduced to provide the client with information
1169         about the form (e.g. text fields contained in the
1170         form) and to submit it.
1171
1172         This is typically used to store login information
1173         that can be used later to pre-fill the form.
1174
1175         * PlatformEfl.cmake:
1176         * UIProcess/API/efl/EWebKit2.h:
1177         * UIProcess/API/efl/ewk_form_submission_request.cpp: Added.
1178         (_Ewk_Form_Submission_Request):
1179         (_Ewk_Form_Submission_Request::_Ewk_Form_Submission_Request):
1180         (_Ewk_Form_Submission_Request::~_Ewk_Form_Submission_Request):
1181         (ewk_form_submission_request_ref):
1182         (ewk_form_submission_request_unref):
1183         (ewk_form_submission_request_field_names_get):
1184         (ewk_form_submission_request_field_value_get):
1185         (ewk_form_submission_request_submit):
1186         (ewk_form_submission_request_new):
1187         * UIProcess/API/efl/ewk_form_submission_request.h: Added.
1188         * UIProcess/API/efl/ewk_form_submission_request_private.h: Added.
1189         * UIProcess/API/efl/ewk_view.cpp:
1190         (ewk_view_base_add):
1191         (ewk_view_form_submission_request_new):
1192         * UIProcess/API/efl/ewk_view.h:
1193         * UIProcess/API/efl/ewk_view_form_client.cpp: Added.
1194         (willSubmitForm):
1195         (ewk_view_form_client_attach):
1196         * UIProcess/API/efl/ewk_view_form_client_private.h: Added.
1197         * UIProcess/API/efl/ewk_view_private.h:
1198
1199 2012-07-26  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1200
1201         [WK2] WebPage::handleEditingKeyboardEvent does not check whether the node allows editing.
1202         https://bugs.webkit.org/show_bug.cgi?id=92364
1203
1204         Reviewed by Kenneth Rohde Christiansen.
1205
1206         Added a check whether the input node allows editing. If editing is not allowed
1207         text input event will not be emitted.
1208
1209         * WebProcess/WebPage/WebPage.cpp:
1210         (WebKit::WebPage::handleEditingKeyboardEvent):
1211
1212 2012-07-26  Zoltan Nyul  <zoltan.nyul@intel.com>
1213
1214         [EFL] EFL port should use XDG paths
1215         https://bugs.webkit.org/show_bug.cgi?id=91719
1216
1217         Reviewed by Kenneth Rohde Christiansen.
1218
1219         Setting xdg paths for application cache, web-database and local-storage.
1220
1221         * PlatformEfl.cmake:
1222         * UIProcess/efl/WebContextEfl.cpp:
1223         (WebKit::WebContext::applicationCacheDirectory):
1224         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1225         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1226
1227 2012-07-26  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1228
1229         [EFL] [WK2] Memory leak in ewk_view_resource_load_client.cpp
1230         https://bugs.webkit.org/show_bug.cgi?id=92099
1231
1232         Reviewed by Kentaro Hara.
1233
1234         Fix a memory leak by clearing the loadingResources HashMap on exit.
1235
1236         * UIProcess/API/efl/ewk_view.cpp:
1237         (_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
1238         (_ewk_view_priv_loading_resources_clear):
1239         (ewk_view_load_provisional_started):
1240
1241 2012-07-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1242
1243         [DRT] LTC:: pageNumberForElementById() could be moved to Internals
1244         https://bugs.webkit.org/show_bug.cgi?id=92091
1245
1246         Reviewed by Kentaro Hara.
1247
1248         Missing a symbol filter for Mac win port.
1249
1250         * win/WebKit2.def:
1251         * win/WebKit2CFLite.def:
1252
1253 2012-07-25  Seokju Kwon  <seokju.kwon@samsung.com>
1254
1255         [EFL][WK2] Implement the inspector for WebKitTestRunner
1256         https://bugs.webkit.org/show_bug.cgi?id=92213
1257
1258         Reviewed by Ryosuke Niwa.
1259
1260         Partial Implementation of WebInspectorProxyEfl for WebkitTestRunner.
1261         And Web Inspector resources installation.
1262
1263         * PlatformEfl.cmake:
1264         * UIProcess/WebInspectorProxy.cpp:
1265         (WebKit::WebInspectorProxy::WebInspectorProxy):
1266         * UIProcess/WebInspectorProxy.h:
1267         (WebInspectorProxy):
1268         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1269         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1270         (WebKit::WebInspectorProxy::platformDidClose):
1271         (WebKit::WebInspectorProxy::inspectorPageURL):
1272         (WebKit::WebInspectorProxy::inspectorBaseURL):
1273
1274 2012-07-25  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1275
1276         Create a specialized struct for use in HashMap iterators
1277         https://bugs.webkit.org/show_bug.cgi?id=92137
1278
1279         Reviewed by Ryosuke Niwa.
1280
1281         * Platform/CoreIPC/ArgumentCoders.h: Add encode/decode for KeyValuePair.
1282
1283 2012-07-25  Anders Carlsson  <andersca@apple.com>
1284
1285         Crash when calling PluginView::pluginFocusOrWindowFocusChanged when the web page is null
1286         https://bugs.webkit.org/show_bug.cgi?id=92289
1287         <rdar://problem/11785352>
1288
1289         Reviewed by Andreas Kling.
1290
1291         Plug-in views that outlive their containing web page for various reasons (such as being protected from
1292         destruction) need to null check the web page.
1293
1294         * WebProcess/Plugins/PluginView.cpp:
1295         (WebKit::PluginView::pluginFocusOrWindowFocusChanged):
1296         (WebKit::PluginView::setComplexTextInputState):
1297
1298 2012-07-25  Christophe Dumez  <christophe.dumez@intel.com>
1299
1300         [WK2][WTR] LayoutTestController.sendWebIntentResponse() needs to be implemented
1301         https://bugs.webkit.org/show_bug.cgi?id=92227
1302
1303         Reviewed by Kenneth Rohde Christiansen.
1304
1305         Add new InjectedBundleIntentRequest class to wrap WebCore's
1306         IntentRequest and use it in InjectedBundle's
1307         didReceiveIntentForFrame callback. The WebKitTestRunner needs
1308         to be able to reply to a Web intent request in order to
1309         implement LayoutTestController.sendWebIntentResponse(). As
1310         a consequence, passing a WebIntentData type in not enough.
1311
1312         * CMakeLists.txt:
1313         * GNUmakefile.list.am:
1314         * Shared/API/c/WKBase.h:
1315         * Shared/APIObject.h:
1316         * Shared/IntentData.cpp:
1317         (WebKit::IntentData::IntentData):
1318         (WebKit):
1319         * Shared/IntentData.h:
1320         (WebCore):
1321         (WebKit::IntentData::IntentData):
1322         (IntentData):
1323         * Target.pri:
1324         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1325         (WebKit):
1326         * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.cpp: Copied from Source/WebKit2/Shared/IntentData.cpp.
1327         (WKBundleIntentRequestGetTypeID):
1328         (WKBundleIntentRequestCopyIntent):
1329         (WKBundleIntentRequestPostResult):
1330         (WKBundleIntentRequestPostFailure):
1331         * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.h: Copied from Source/WebKit2/Shared/IntentData.h.
1332         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1333         * WebProcess/InjectedBundle/InjectedBundleIntentRequest.cpp: Copied from Source/WebKit2/Shared/IntentData.cpp.
1334         (WebKit):
1335         (WebKit::InjectedBundleIntentRequest::create):
1336         (WebKit::InjectedBundleIntentRequest::InjectedBundleIntentRequest):
1337         (WebKit::InjectedBundleIntentRequest::postResult):
1338         (WebKit::InjectedBundleIntentRequest::postFailure):
1339         (WebKit::InjectedBundleIntentRequest::intent):
1340         * WebProcess/InjectedBundle/InjectedBundleIntentRequest.h: Copied from Source/WebKit2/Shared/IntentData.h.
1341         (WebCore):
1342         (WebKit):
1343         (InjectedBundleIntentRequest):
1344         (WebKit::InjectedBundleIntentRequest::type):
1345         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1346         (WebKit::InjectedBundlePageLoaderClient::didReceiveIntentForFrame):
1347         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1348         (WebKit):
1349         (InjectedBundlePageLoaderClient):
1350         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1351         (WebKit::WebFrameLoaderClient::dispatchIntent):
1352
1353 2012-07-25  Anders Carlsson  <andersca@apple.com>
1354
1355         Crash when a web page is closed with outstanding scrolling thread barriers
1356         https://bugs.webkit.org/show_bug.cgi?id=92280
1357         <rdar://problem/11630200>
1358
1359         Reviewed by Andreas Kling.
1360
1361         There was a check in forceRepaintAsync to handle the drawing area going away before the block had
1362         been invoked,  but this check needs to be done earlier (as the FIXME suggested).
1363         Move this check to dispatchAfterEnsuringUpdatedScrollPosition instead.
1364
1365         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1366         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
1367         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1368
1369 2012-07-25  Alexey Proskuryakov  <ap@apple.com>
1370
1371         Chinese IM receives incorrect/duplicated key events in text fields in webpages in Safari.
1372         https://bugs.webkit.org/show_bug.cgi?id=89048
1373         <rdar://problem/11786384>
1374
1375         Reviewed by Andreas Kling.
1376
1377         Cannot test text input from UI process side.
1378
1379         Stop relying on IPC to handle key events in order. There are too many complications
1380         where out of order delivery is performed. Instead, queue the events at UI process
1381         side.
1382
1383         * UIProcess/WebPageProxy.cpp:
1384         (WebKit::WebPageProxy::handleKeyboardEvent):
1385         (WebKit::WebPageProxy::didReceiveEvent):
1386
1387 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1388
1389         [EFL] Use eina_stringshare_add instead of strdup.
1390         https://bugs.webkit.org/show_bug.cgi?id=92072
1391
1392         Reviewed by Kentaro Hara.
1393
1394         Eina of EFL libraries supports a string functionality that replaces strdup. So, EFL port needs
1395         to replace strdup with eina_stringshare_add function.
1396
1397         * UIProcess/API/efl/ewk_intent.cpp:
1398         (ewk_intent_suggestions_get):
1399         (ewk_intent_extra_get):
1400         * UIProcess/API/efl/ewk_intent.h:
1401
1402 2012-07-25  Ryuan Choi  <ryuan.choi@samsung.com>
1403
1404         [EFL][WK2] Add ewk_view_cursor_set to change cursor.
1405         https://bugs.webkit.org/show_bug.cgi?id=89140
1406
1407         Reviewed by Hajime Morita.
1408
1409         Implement ewk_view_cursor_set to support cursor changes.
1410
1411         * UIProcess/API/efl/PageClientImpl.cpp:
1412         (WebKit::PageClientImpl::setCursor): Called ewk_view_cursor_set.
1413         * UIProcess/API/efl/ewk_view.cpp:
1414         (_Ewk_View_Private_Data):
1415         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
1416         (_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
1417         (_ewk_view_priv_new): Check whether ecore_x can be used.
1418         (_ewk_view_smart_add):
1419         Change order of initialization to use base structure in _ewk_view_priv_new.
1420         (ewk_view_cursor_set): Added to set cursor.
1421         * UIProcess/API/efl/ewk_view_private.h:
1422
1423 2012-07-25  Ryuan Choi  <ryuan.choi@samsung.com>
1424
1425         [EFL][WK2] Update uri when the active URI is changed while loading.
1426         https://bugs.webkit.org/show_bug.cgi?id=92001
1427
1428         Reviewed by Hajime Morita.
1429
1430         For now, ewk_view_uri_get just return the last uri of setter.
1431         This patch updates the uri of ewk_view when it is changed while loading.
1432
1433         * UIProcess/API/efl/ewk_view.cpp:
1434         (ewk_view_uri_update):
1435         Added to check whether current active URI has changed and send uri,changed
1436         signal if it has changed.
1437         (ewk_view_uri_set):
1438         Called ewk_view_uri_update to make sure the active uri is updated when the
1439         load operation is started.
1440         (ewk_view_reload): Ditto.
1441         (ewk_view_reload_bypass_cache): Ditto.
1442         (ewk_view_load_finished): Ditto.
1443         (ewk_view_load_provisional_redirect): Ditto.
1444         (ewk_view_load_provisional_started): Ditto.
1445         (ewk_view_html_string_load): Ditto.
1446         * UIProcess/API/efl/ewk_view.h: Updated comment for uri,changed signal.
1447         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: 
1448         (EWK2UnitTest::EWK2UnitTestEnvironment::urlForResource):
1449         Added to get url of custom resource for test.
1450         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
1451         * UIProcess/API/efl/tests/resources/redirect_uri_to_default.html:
1452         Added to test ewk_view_uri_get when the page is redirected.
1453         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Ditto.
1454         (onLoadFinishedForRedirection):
1455         (TEST_F): Added new test case whether ewk_view_uri_get returns correct uri when
1456         the page is redirected.
1457
1458 2012-07-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1459
1460         [EFL][WK2] Add ewk_main.{cpp,h} to EFL WK2
1461         https://bugs.webkit.org/show_bug.cgi?id=92101
1462
1463         Reviewed by Kenneth Rohde Christiansen.
1464
1465         Added a centralized place for general initialization in UI process for EFL WK2.
1466
1467         * PlatformEfl.cmake:
1468         * UIProcess/API/efl/EWebKit2.h:
1469         * UIProcess/API/efl/ewk_main.cpp: Added.
1470         (ewk_init): General initialization.
1471         (ewk_shutdown): General freeing. 
1472         (_ewk_init_body): An aux function.
1473         * UIProcess/API/efl/ewk_main.h: Added.
1474
1475 2012-07-24  Jae Hyun Park  <jae.park@company100.net>
1476
1477         WKContextGetGlobalStatistics() assigns wrong value to wkFrameCount in WKContextStatistics
1478         https://bugs.webkit.org/show_bug.cgi?id=92173
1479
1480         Reviewed by John Sullivan.
1481
1482         In WKContextGetGlobalStatistics(), wkViewCount in WebContext::Statistics
1483         is assigned to wkFrameCount in WKContextStatistics.
1484         wkFrameCount in WebContext:Statistics should be assigned to wkFrameCount in WKContextStatistics.
1485
1486         * UIProcess/API/C/WKContext.cpp:
1487         (WKContextGetGlobalStatistics):
1488
1489 2012-07-24  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1490
1491         [EFL][WK2] Add unit tests for custom text encoding setting
1492         https://bugs.webkit.org/show_bug.cgi?id=91983
1493
1494         Reviewed by Dirk Pranke.
1495
1496         Add unit tests for get and set custom text encoding methods. Also, fix
1497         a style nit for r123177.
1498
1499         * UIProcess/API/efl/ewk_view.cpp:
1500         (ewk_view_setting_encoding_custom_set): Fix a style nit - add newline
1501         before return.
1502         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1503         (TEST_F):
1504
1505 2012-07-24  Ryosuke Niwa  <rniwa@webkit.org>
1506
1507         WinCairo build fix attempt.
1508
1509         * win/WebKit2CFLite.def:
1510
1511 2012-07-24  Ryosuke Niwa  <rniwa@webkit.org>
1512
1513         Windows build fix attempt.
1514
1515         * win/WebKit2.def:
1516
1517 2012-07-24  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1518
1519         [Qt] Make sure that an AC sync is triggered when the canvas contents is updated.
1520         https://bugs.webkit.org/show_bug.cgi?id=92128
1521
1522         Reviewed by Kenneth Rohde Christiansen.
1523
1524         This would cause missed frames when animating an accelerated 2D canvas without
1525         touching the document.
1526
1527         * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp:
1528         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
1529
1530 2012-07-24  Alexey Proskuryakov  <ap@apple.com>
1531
1532         [Mac WK2] Improve text input logging
1533         https://bugs.webkit.org/show_bug.cgi?id=92147
1534
1535         Reviewed by Andreas Kling.
1536
1537         * UIProcess/API/mac/WKView.mm:
1538         (-[WKView insertText:replacementRange:]):
1539         (-[WKView keyUp:]):
1540         (-[WKView keyDown:]):
1541         (-[WKView flagsChanged:]):
1542         (-[WKView _executeSavedKeypressCommands]):
1543         (-[WKView _notifyInputContextAboutDiscardedComposition]):
1544         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]):
1545         (-[WKView _updateSecureInputState]):
1546
1547 2012-07-24  Christophe Dumez  <christophe.dumez@intel.com>
1548
1549         [EFL][WK2] Provide more useful output when an injected bundle cannot be loaded
1550         https://bugs.webkit.org/show_bug.cgi?id=92136
1551
1552         Reviewed by Kenneth Rohde Christiansen.
1553
1554         Call eina_error_get() in case an injected bundle cannot be
1555         loaded in order to print more information about the error.
1556
1557         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
1558         (WebKit::InjectedBundle::load):
1559
1560 2012-07-24  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1561
1562         [EFL][WK2] Add vibration client
1563         https://bugs.webkit.org/show_bug.cgi?id=91371
1564
1565         Reviewed by Antonio Gomes.
1566
1567         Implement Vibration provider for WebKit2 EFL and add an API to set
1568         vibration client callbacks by application to handle the tactile
1569         feedback in the application when the page content ask for vibration.
1570
1571         * CMakeLists.txt: Add WebCore/Modules/vibration to include path.
1572         * PlatformEfl.cmake: Add VibrationProvider.cpp file to the build
1573         system.
1574         * UIProcess/API/efl/VibrationProvider.cpp: Added.
1575         (_Ewk_Vibration_Client): Structure contains the vibration client
1576         callbacks.
1577         (_Ewk_Vibration_Client::_Ewk_Vibration_Client):
1578         (toVibrationProvider): Helper function to cast the clientinfo to
1579         VibrationProvider.
1580         (vibrateCallback):
1581         (cancelVibrationCallback):
1582         (VibrationProvider::create):
1583         (VibrationProvider::VibrationProvider):
1584         (VibrationProvider::~VibrationProvider):
1585         (VibrationProvider::vibrate):
1586         (VibrationProvider::cancelVibration):
1587         (VibrationProvider::setVibrationClientCallbacks):
1588         * UIProcess/API/efl/VibrationProvider.h: Added.
1589         (VibrationProvider):
1590         * UIProcess/API/efl/ewk_context.cpp:
1591         (_Ewk_Context):
1592         (createDefaultEwkContext):
1593         (ewk_context_vibration_client_callbacks_set): API to set vibration
1594         client callbacks.
1595         * UIProcess/API/efl/ewk_context.h:
1596
1597 2012-07-24  Simon Hausmann  <simon.hausmann@nokia.com>
1598
1599         [Qt] Fix compilation after QtQuick API changes
1600         https://bugs.webkit.org/show_bug.cgi?id=91822
1601
1602         Reviewed by Kenneth Rohde Christiansen.
1603
1604         QQuickCanvas is now QQuickWindow, QQuickItem::canvas() is window() and rootItem()
1605         is contentItem(). Also QQuickWindow::grabFrameBuffer() is now grabWindow().
1606
1607         * UIProcess/API/qt/qquickwebpage.cpp:
1608         * UIProcess/API/qt/qquickwebview.cpp:
1609         (QQuickWebViewPrivate::updateIcon):
1610         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1611         (tst_QQuickWebView::multipleWebViews):
1612         (tst_QQuickWebView::basicRenderingSanity):
1613         (tst_QQuickWebView::transparentWebViews):
1614         * UIProcess/API/qt/tests/testwindow.h:
1615         (TestWindow::TestWindow):
1616         * UIProcess/qt/QtPageClient.cpp:
1617         (WebKit::QtPageClient::isViewVisible):
1618         * UIProcess/qt/QtWebPageEventHandler.cpp:
1619         (WebKit::QtWebPageEventHandler::startDrag):
1620
1621 2012-07-24  Balazs Kelemen  <kbalazs@webkit.org>
1622
1623         [Qt] Add quirks for running the web process in a profiler shell, like valgrind
1624         https://bugs.webkit.org/show_bug.cgi?id=87672
1625
1626         Reviewed by Jocelyn Turcotte.
1627
1628         If environment variables QT_WEBKIT_WEB_PROCESS_COMMAND_PREFIX
1629         and/or QT_WEBKIT_PLUGIN_PROCESS_COMMAND_PREFIX are set, use their
1630         values as the prefix of the command when launching the child process.
1631         Example usage:
1632             export QT_WEB_PROCESS_COMMAND_PREFIX="valgrind --smc-check=all"
1633             ./MiniBrowser http://somepage.html
1634             ./WebKitTestRunner --no-timeout-at-all some_layouttest.html
1635
1636         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1637         (WebKit::ProcessLauncher::launchProcess):
1638
1639 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
1640
1641         [Qt] Fix compilation against namespaced Qt
1642
1643         Reviewed by Simon Hausmann.
1644
1645         * Platform/CoreIPC/Connection.h:
1646         * Platform/PlatformProcessIdentifier.h:
1647         * Platform/WorkQueue.h:
1648         * Shared/qt/QtNetworkRequestData.h:
1649         * Shared/qt/WebEventFactoryQt.h:
1650         * UIProcess/API/C/qt/WKNativeEvent.h:
1651         * UIProcess/API/qt/qquickwebview_p.h:
1652         * UIProcess/API/qt/qwebnavigationhistory_p.h:
1653         * UIProcess/API/qt/raw/qrawwebview_p.h:
1654         * UIProcess/DrawingAreaProxy.h:
1655         * UIProcess/Launcher/ThreadLauncher.h:
1656         * UIProcess/LayerTreeCoordinatorProxy.h:
1657         * UIProcess/qt/QtViewportHandler.h:
1658         * UIProcess/qt/QtWebPageSGNode.h:
1659         * UIProcess/qt/WebColorChooserProxyQt.h:
1660         * UIProcess/qt/WebGeolocationProviderQt.h:
1661         * UIProcess/qt/WebPopupMenuProxyQt.h:
1662         * WebProcess/WebProcess.h:
1663
1664 2012-07-24  Christophe Dumez  <christophe.dumez@intel.com>
1665
1666         [EFL][WK2] Remove unneeded WebURLRequestEfl and WebURLResponseEfl
1667         https://bugs.webkit.org/show_bug.cgi?id=92087
1668
1669         Reviewed by Kenneth Rohde Christiansen.
1670
1671         Remove WebURLRequestEfl and WebURLResponseEfl classes
1672         and their corresponding C APIs since we don't need / use
1673         them.
1674
1675         * Shared/API/c/efl/WKURLRequestEfl.cpp: Removed.
1676         * Shared/API/c/efl/WKURLRequestEfl.h: Removed.
1677         * Shared/API/c/efl/WKURLResponseEfl.cpp: Removed.
1678         * Shared/API/c/efl/WKURLResponseEfl.h: Removed.
1679         * Shared/efl/WebURLRequestEfl.cpp: Removed.
1680         * Shared/efl/WebURLRequestEfl.h: Removed.
1681         * Shared/efl/WebURLResponseEfl.cpp: Removed.
1682         * Shared/efl/WebURLResponseEfl.h: Removed.
1683         * UIProcess/API/efl/ewk_url_request.cpp:
1684
1685 2012-07-24  Pierre Rossi  <pierre.rossi@gmail.com>
1686
1687         [Qt] Enable touch slider when touch events are enabled
1688         https://bugs.webkit.org/show_bug.cgi?id=91013
1689
1690         Reviewed by Kenneth Rohde Christiansen.
1691
1692         TOUCH_SLIDER guards are used in WebCore, so we should really
1693         be setting the corresponding ENABLE define in features.prf.
1694
1695         * Target.pri:
1696
1697 2012-07-24  Christophe Dumez  <christophe.dumez@intel.com>
1698
1699         [EFL][WK2] Fix possible crash in didSendRequestForResource
1700         https://bugs.webkit.org/show_bug.cgi?id=92077
1701
1702         Reviewed by Kenneth Rohde Christiansen.
1703
1704         Add NULL check for wkRedirectResponse in
1705         didSendRequestForResource() before using it. The
1706         argument may be NULL if there was no redirection.
1707
1708         * UIProcess/API/efl/ewk_view.h:
1709         * UIProcess/API/efl/ewk_view_resource_load_client.cpp:
1710         (didSendRequestForResource):
1711
1712 2012-07-24  Christophe Dumez  <christophe.dumez@intel.com>
1713
1714         [WK2][EFL][GTK] Share WebCoreArgumentCoders for soup-related types
1715         https://bugs.webkit.org/show_bug.cgi?id=92073
1716
1717         Reviewed by Kenneth Rohde Christiansen.
1718
1719         Move WebCoreArgumentCoders for soup-related types such as
1720         ResourceRequest, ResourceResponse and ResourceError from
1721         port specific file to Shared/soup/WebCoreArgumentCodersSoup.cpp.
1722         This way, the different ports using libsoup can share
1723         code and avoid duplication.
1724
1725         * GNUmakefile.list.am:
1726         * PlatformEfl.cmake:
1727         * Shared/efl/WebCoreArgumentCodersEfl.cpp: Removed.
1728         * Shared/soup/WebCoreArgumentCodersSoup.cpp: Renamed from Source/WebKit2/Shared/gtk/WebCoreArgumentCodersGtk.cpp.
1729         (CoreIPC):
1730         (CoreIPC::::encode):
1731         (CoreIPC::::decode):
1732
1733 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1734
1735         Unreviewed, rolling out r123184, r123195, and r123197.
1736         http://trac.webkit.org/changeset/123184
1737         http://trac.webkit.org/changeset/123195
1738         http://trac.webkit.org/changeset/123197
1739         https://bugs.webkit.org/show_bug.cgi?id=92049
1740
1741         pagecycler regression (Requested by morrita on #webkit).
1742
1743         * win/WebKit2.def:
1744         * win/WebKit2CFLite.def:
1745
1746 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
1747
1748         Part 2 of: Implement sticky positioning
1749         https://bugs.webkit.org/show_bug.cgi?id=90046
1750
1751         Reviewed by Ojan Vafai.
1752
1753         Turn on ENABLE_CSS_STICKY_POSITION.
1754
1755         * Configurations/FeatureDefines.xcconfig:
1756
1757 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1758
1759         [WK2] WebKitTestRunner needs to print information about Web intents
1760         https://bugs.webkit.org/show_bug.cgi?id=90873
1761
1762         Reviewed by Anders Carlsson.
1763
1764         Add Bundle API for Web Intents. This is needed by the WebKitTestRunner
1765         to print information about the new intent requests and the intent
1766         service registrations.
1767
1768         * CMakeLists.txt: Move WebIntentData and WebIntentServiceInfo from
1769         UIProcess/ to Shared/.
1770         * GNUmakefile.list.am: Move WebIntentData and WebIntentServiceInfo from
1771         UIProcess/ to Shared/.
1772         * Shared/APIClientTraits.h:
1773         * Shared/WebIntentData.cpp: Renamed from Source/WebKit2/UIProcess/WebIntentData.cpp.
1774         (WebKit):
1775         (WebKit::WebIntentData::WebIntentData):
1776         (WebKit::WebIntentData::data):
1777         (WebKit::WebIntentData::suggestions):
1778         (WebKit::WebIntentData::extra):
1779         (WebKit::WebIntentData::extras):
1780         * Shared/WebIntentData.h: Renamed from Source/WebKit2/UIProcess/WebIntentData.h.
1781         (WebKit):
1782         (WebIntentData):
1783         (WebKit::WebIntentData::create):
1784         (WebKit::WebIntentData::~WebIntentData):
1785         (WebKit::WebIntentData::action):
1786         (WebKit::WebIntentData::payloadType):
1787         (WebKit::WebIntentData::service):
1788         (WebKit::WebIntentData::store):
1789         (WebKit::WebIntentData::type):
1790         * Shared/WebIntentServiceInfo.cpp: Renamed from Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp.
1791         (WebKit):
1792         (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
1793         * Shared/WebIntentServiceInfo.h: Renamed from Source/WebKit2/UIProcess/WebIntentServiceInfo.h.
1794         (WebKit):
1795         (WebIntentServiceInfo):
1796         (WebKit::WebIntentServiceInfo::create):
1797         (WebKit::WebIntentServiceInfo::~WebIntentServiceInfo):
1798         (WebKit::WebIntentServiceInfo::action):
1799         (WebKit::WebIntentServiceInfo::payloadType):
1800         (WebKit::WebIntentServiceInfo::href):
1801         (WebKit::WebIntentServiceInfo::title):
1802         (WebKit::WebIntentServiceInfo::disposition):
1803         (WebKit::WebIntentServiceInfo::type):
1804         * Target.pri: Move WebIntentData and WebIntentServiceInfo from
1805         UIProcess/ to Shared/.
1806         * UIProcess/API/C/WKPage.h:
1807         * UIProcess/API/efl/ewk_view_loader_client.cpp:
1808         (didReceiveIntentForFrame):
1809         (registerIntentServiceForFrame):
1810         * UIProcess/WebLoaderClient.cpp:
1811         (WebKit::WebLoaderClient::didReceiveIntentForFrame):
1812         (WebKit::WebLoaderClient::registerIntentServiceForFrame):
1813         * UIProcess/WebLoaderClient.h:
1814         (WebLoaderClient):
1815         * UIProcess/WebPageProxy.cpp:
1816         (WebKit::WebPageProxy::registerIntentServiceForFrame):
1817         (WebKit::WebPageProxy::didReceiveIntentForFrame):
1818         * UIProcess/WebPageProxy.h:
1819         (WebPageProxy):
1820         * UIProcess/WebPageProxy.messages.in:
1821         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1822         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1823         (WebKit):
1824         (WebKit::InjectedBundlePageLoaderClient::didReceiveIntentForFrame):
1825         (WebKit::InjectedBundlePageLoaderClient::registerIntentServiceForFrame):
1826         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1827         (WebKit):
1828         (InjectedBundlePageLoaderClient):
1829         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1830         (WebKit::WebFrameLoaderClient::dispatchIntent):
1831         (WebKit::WebFrameLoaderClient::registerIntentService):
1832         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1833         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1834
1835 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1836
1837         [EFL][WK2] Add unit tests for Ewk_Cookie_Manager
1838         https://bugs.webkit.org/show_bug.cgi?id=91639
1839
1840         Reviewed by Antonio Gomes.
1841
1842         Add unit tests for Ewk_Cookie_Manager.
1843
1844         * PlatformEfl.cmake:
1845         * UIProcess/API/efl/ewk_cookie_manager.h: Fix "accept policy" documentation
1846         to indicate that only cookies set by the main document are accepted by default.
1847         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Added.
1848         (EWK2UnitTestServer::EWK2UnitTestServer): Add HTTP server similar to the one
1849         used by GTK port unit tests.
1850         (EWK2UnitTestServer::~EWK2UnitTestServer):
1851         (EWK2UnitTestServer::run):
1852         (EWK2UnitTestServer::getURIForPath):
1853         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Added.
1854         (EWK2UnitTestServer):
1855         (EWK2UnitTestServer::baseURI):
1856         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Added.
1857         (serverCallback):
1858         (getAcceptPolicyCallback):
1859         (getAcceptPolicy):
1860         (getHostnamesWithCookiesCallback):
1861         (getHostnamesWithCookies):
1862         (freeHostNames):
1863         (countHostnamesWithCookies):
1864         (TEST_F):
1865         (cleanUpCookieFiles):
1866
1867 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
1868
1869         [Qt] Enable touch slider when touch events are enabled
1870         https://bugs.webkit.org/show_bug.cgi?id=91013
1871
1872         Reviewed by Antonio Gomes.
1873
1874         Take advantage of the logic introduced in r122286.
1875
1876         * Target.pri:
1877
1878 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
1879
1880         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
1881         https://bugs.webkit.org/show_bug.cgi?id=91006
1882
1883         Reviewed by Ryosuke Niwa.
1884
1885         Remove numTouchEventHandlersChanged stub.
1886
1887         * WebProcess/WebCoreSupport/WebChromeClient.h:
1888         (WebChromeClient):
1889
1890 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
1891
1892         Part 1 of: Implement sticky positioning
1893         https://bugs.webkit.org/show_bug.cgi?id=90046
1894
1895         Reviewed by Ojan Vafai.
1896
1897         Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
1898         
1899         Sort the ENABLE_CSS lines in the file. Make sure all the flags
1900         are in FEATURE_DEFINES.
1901
1902         * Configurations/FeatureDefines.xcconfig:
1903
1904 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1905
1906         [EFL][WK2] Add request manager client
1907         https://bugs.webkit.org/show_bug.cgi?id=91193
1908
1909         Reviewed by Kenneth Rohde Christiansen.
1910
1911         Add a URL request manager client and attach it
1912         to the Ewk_Context.
1913
1914         The client application can now register a URL scheme
1915         via the Ewk_Context API and provide a callback handler
1916         that will get called whenever a URL request with this
1917         scheme is made.
1918
1919         A new Ewk_Url_Scheme_Request type is introduced to
1920         provide information about the request to the client
1921         and to allow the client to finish it by setting its
1922         contents.
1923
1924         * PlatformEfl.cmake:
1925         * UIProcess/API/efl/EWebKit2.h:
1926         * UIProcess/API/efl/ewk_context.cpp:
1927         (_Ewk_Url_Scheme_Handler):
1928         (_Ewk_Url_Scheme_Handler::_Ewk_Url_Scheme_Handler):
1929         (_Ewk_Context):
1930         (_Ewk_Context::_Ewk_Context):
1931         (ewk_context_request_manager_get):
1932         (ewk_context_url_scheme_request_received):
1933         (createDefaultEwkContext):
1934         (ewk_context_uri_scheme_register):
1935         * UIProcess/API/efl/ewk_context.h:
1936         * UIProcess/API/efl/ewk_context_private.h:
1937         * UIProcess/API/efl/ewk_context_request_manager_client.cpp: Added.
1938         (toEwkContext):
1939         (didReceiveURIRequest):
1940         (ewk_context_request_manager_client_attach):
1941         * UIProcess/API/efl/ewk_context_request_manager_client_private.h: Added.
1942         * UIProcess/API/efl/ewk_url_scheme_request.cpp: Added.
1943         (_Ewk_Url_Scheme_Request):
1944         (_Ewk_Url_Scheme_Request::_Ewk_Url_Scheme_Request):
1945         (_Ewk_Url_Scheme_Request::~_Ewk_Url_Scheme_Request):
1946         (ewk_url_scheme_request_ref):
1947         (ewk_url_scheme_request_unref):
1948         (ewk_url_scheme_request_scheme_get):
1949         (ewk_url_scheme_request_url_get):
1950         (ewk_url_scheme_request_path_get):
1951         (ewk_url_scheme_request_id_get):
1952         (ewk_url_scheme_request_finish):
1953         (ewk_url_scheme_request_new):
1954         * UIProcess/API/efl/ewk_url_scheme_request.h: Added.
1955         * UIProcess/API/efl/ewk_url_scheme_request_private.h: Added.
1956
1957 2012-07-23  KwangYong Choi  <ky0.choi@samsung.com>
1958
1959         [EFL][WK2] ProcessExecutablePath is required
1960         https://bugs.webkit.org/show_bug.cgi?id=89719
1961
1962         Reviewed by Kenneth Rohde Christiansen.
1963
1964         Added executablePathOfWebProcess and executablePathOfPluginProcess.
1965         It's used for getting the location of WebProcess and PluginProcess.
1966
1967         * PlatformEfl.cmake: Added LIBEXECDIR definition
1968         * Shared/efl/ProcessExecutablePathEfl.cpp: Added.
1969         (WebKit):
1970         (WebKit::findWebKitProcess):
1971         (WebKit::executablePathOfWebProcess): Get the absolute path of WebProcess
1972         (WebKit::executablePathOfPluginProcess): Get the absolute path of PluginProcess
1973         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1974         (WebKit::ProcessLauncher::launchProcess): Modified to use above routines
1975
1976 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1977
1978         WebKit2 needs layoutTestController.setAlwaysAcceptCookies
1979         https://bugs.webkit.org/show_bug.cgi?id=42778
1980
1981         Reviewed by Kenneth Rohde Christiansen.
1982
1983         Add setAlwaysAcceptCookies() method to InjectedBundle
1984         so that we can use it in LayoutTestController.
1985         The method uses WebCookieManager::setHTTPCookieAcceptPolicy()
1986         internally.
1987
1988         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1989         (WKBundleSetAlwaysAcceptCookies):
1990         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1991         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1992         (WebKit::InjectedBundle::setAlwaysAcceptCookies):
1993         (WebKit):
1994         * WebProcess/InjectedBundle/InjectedBundle.h:
1995         (InjectedBundle):
1996
1997 2012-07-23  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1998
1999         [WK2] SQL Database cannot be disabled at build time
2000         https://bugs.webkit.org/show_bug.cgi?id=91837
2001
2002         Reviewed by Kenneth Rohde Christiansen.
2003
2004         WebKit2 had no #ifdefs for SQL Database. This patch adds these
2005         statments and it can now be disabled at build time.
2006
2007         * Shared/OriginAndDatabases.cpp:
2008         * Shared/OriginAndDatabases.h:
2009         * Shared/WebCoreArgumentCoders.cpp:
2010         (CoreIPC):
2011         * UIProcess/API/C/WKContext.cpp:
2012         (WKContextGetDatabaseManager):
2013         * UIProcess/API/C/WKDatabaseManager.cpp:
2014         (WKDatabaseManagerGetTypeID):
2015         (WKDatabaseManagerGetOriginKey):
2016         (WKDatabaseManagerGetOriginQuotaKey):
2017         (WKDatabaseManagerGetOriginUsageKey):
2018         (WKDatabaseManagerGetDatabaseDetailsKey):
2019         (WKDatabaseManagerGetDatabaseDetailsNameKey):
2020         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
2021         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
2022         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
2023         (WKDatabaseManagerSetClient):
2024         (WKDatabaseManagerGetDatabasesByOrigin):
2025         (callGetDatabasesByOriginBlockAndDispose):
2026         (WKDatabaseManagerGetDatabasesByOrigin_b):
2027         (WKDatabaseManagerGetDatabaseOrigins):
2028         (callGetDatabaseOriginsBlockBlockAndDispose):
2029         (WKDatabaseManagerGetDatabaseOrigins_b):
2030         (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
2031         (WKDatabaseManagerDeleteDatabasesForOrigin):
2032         (WKDatabaseManagerDeleteAllDatabases):
2033         (WKDatabaseManagerSetQuotaForOrigin):
2034         * UIProcess/WebContext.cpp:
2035         (WebKit::WebContext::WebContext):
2036         (WebKit::WebContext::~WebContext):
2037         (WebKit::WebContext::shouldTerminate):
2038         (WebKit::WebContext::disconnectProcess):
2039         (WebKit::WebContext::didReceiveMessage):
2040         * UIProcess/WebContext.h:
2041         (WebContext):
2042         * UIProcess/WebDatabaseManagerProxy.cpp:
2043         * UIProcess/WebDatabaseManagerProxy.h:
2044         * UIProcess/WebDatabaseManagerProxy.messages.in:
2045         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2046         (WebKit::InjectedBundle::clearAllDatabases):
2047         (WebKit::InjectedBundle::setDatabaseQuota):
2048         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2049         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2050         * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
2051         * WebProcess/WebProcess.cpp:
2052         (WebKit::WebProcess::didReceiveMessage):
2053
2054 2012-07-23  Kent Tamura  <tkent@chromium.org>
2055
2056         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
2057         https://bugs.webkit.org/show_bug.cgi?id=91941
2058
2059         Reviewed by Kentaro Hara.
2060
2061         A flag name for an elmement should be ENABLE_*_ELEMENT.
2062
2063         * Configurations/FeatureDefines.xcconfig:
2064
2065 2012-07-22  Kent Tamura  <tkent@chromium.org>
2066
2067         Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT
2068         https://bugs.webkit.org/show_bug.cgi?id=91928
2069
2070         Reviewed by Kentaro Hara.
2071
2072         A flag name for an elmement should be ENABLE_*_ELEMENT.
2073
2074         * Configurations/FeatureDefines.xcconfig:
2075
2076 2012-07-20  Kent Tamura  <tkent@chromium.org>
2077
2078         Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT
2079         https://bugs.webkit.org/show_bug.cgi?id=91846
2080
2081         Reviewed by Kentaro Hara.
2082
2083         A flag name for an elmement should be ENABLE_*_ELEMENT.
2084
2085         * Configurations/FeatureDefines.xcconfig:
2086
2087 2012-07-20  Rafael Brandao  <rafael.lobo@openbossa.org>
2088
2089         QtNetworkAccessManager should not rely on signal sslErrors when QT_NO_SSL is defined
2090         https://bugs.webkit.org/show_bug.cgi?id=91866
2091
2092         Reviewed by Noam Rosenthal.
2093
2094         * WebProcess/qt/QtNetworkAccessManager.cpp:
2095         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager): QNAM's signal is only defined when
2096         that flag is undefined. Removed the connection when we have the flag set.
2097         (WebKit::QtNetworkAccessManager::onSslErrors): When the flag is set, this slot becomes unused.
2098
2099 2012-07-20  Christophe Dumez  <christophe.dumez@intel.com>
2100
2101         [EFL] Proxy configuration should honor the no_proxy environment variable
2102         https://bugs.webkit.org/show_bug.cgi?id=91747
2103
2104         Reviewed by Kenneth Rohde Christiansen.
2105
2106         Use the new custom proxy resolver from WebCore in
2107         WebKit2-EFL so that it is possible for the client
2108         to set proxy exceptions via the "no_proxy"
2109         environment variable.
2110
2111         By default, the proxy set in the "http_proxy"
2112         environment variable will not be used for requests
2113         to localhost or 127.0.0.1.
2114
2115         * WebProcess/efl/WebProcessMainEfl.cpp:
2116         (WebKit::WebProcessMainEfl):
2117
2118 2012-06-01  Dinu Jacob  <dinu.jacob@nokia.com>
2119
2120         [Qt][WK2] Add support for multi-select list
2121         https://bugs.webkit.org/show_bug.cgi?id=85527
2122
2123         Reviewed by Kenneth Rohde Christiansen.
2124
2125         Added support for multi-select list:
2126         - Added multi-selection flag to PlatformPopupMenuData to indicate whether to accept multiple selections or not.
2127         - Added selected state to WebPopupItem.
2128         - Modified WebPopupMenuQt to support multiple selections.
2129
2130         * Shared/PlatformPopupMenuData.cpp:
2131         (WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
2132         (WebKit::PlatformPopupMenuData::encode):
2133         (WebKit::PlatformPopupMenuData::decode):
2134         * Shared/PlatformPopupMenuData.h:
2135         (PlatformPopupMenuData):
2136         * Shared/WebPopupItem.cpp:
2137         (WebKit::WebPopupItem::WebPopupItem):
2138         (WebKit::WebPopupItem::encode):
2139         (WebKit::WebPopupItem::decode):
2140         * Shared/WebPopupItem.h:
2141         * UIProcess/API/qt/tests/qmltests/WebView/tst_multiSelect.qml: Added.
2142         * UIProcess/API/qt/tests/qmltests/common/multiselect.html: Added.
2143         * UIProcess/WebPageProxy.h:
2144         (WebPageProxy):
2145         * UIProcess/WebPopupMenuProxy.h:
2146         (Client):
2147         * UIProcess/qt/WebPageProxyQt.cpp:
2148         (WebKit::WebPageProxy::changeSelectedIndex):
2149         (WebKit):
2150         (WebKit::WebPageProxy::closePopupMenu):
2151         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2152         (WebKit::PopupMenuItemModel::multiple):
2153         (PopupMenuItemModel):
2154         (WebKit::PopupMenuItemModel::Item::Item):
2155         (ItemSelectorContextObject):
2156         (WebKit::ItemSelectorContextObject::allowMultiSelect):
2157         (WebKit::ItemSelectorContextObject::reject):
2158         (WebKit::ItemSelectorContextObject::dismiss):
2159         (WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
2160         (WebKit):
2161         (WebKit::ItemSelectorContextObject::onIndexUpdate):
2162         (WebKit::ItemSelectorContextObject::accept):
2163         (WebKit::PopupMenuItemModel::PopupMenuItemModel):
2164         (WebKit::PopupMenuItemModel::select):
2165         (WebKit::PopupMenuItemModel::toggleItem):
2166         (WebKit::PopupMenuItemModel::buildItems):
2167         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2168         (WebKit::WebPopupMenuProxyQt::hidePopupMenu):
2169         (WebKit::WebPopupMenuProxyQt::selectIndex):
2170         (WebKit::WebPopupMenuProxyQt::createItem):
2171         * UIProcess/qt/WebPopupMenuProxyQt.h:
2172         (WebPopupMenuProxyQt):
2173         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2174         (WebKit::WebPopupMenu::didChangeSelectedIndex):
2175         (WebKit::WebPopupMenu::populateItems):
2176         * WebProcess/WebCoreSupport/WebPopupMenu.h:
2177         (WebPopupMenu):
2178         * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
2179         (WebKit::WebPopupMenu::setUpPlatformData):
2180         * WebProcess/WebPage/WebPage.cpp:
2181         (WebKit::WebPage::didChangeSelectedIndexForActivePopupMenu):
2182         (WebKit):
2183         (WebKit::WebPage::changeSelectedIndex):
2184         * WebProcess/WebPage/WebPage.h:
2185         (WebPage):
2186         * WebProcess/WebPage/WebPage.messages.in:
2187         * WebProcess/WebPage/qt/WebPageQt.cpp:
2188         (WebKit::WebPage::selectedIndex):
2189         (WebKit):
2190         (WebKit::WebPage::hidePopupMenu):
2191
2192 2012-07-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2193
2194         Unreviewed, rolling out r123085.
2195         http://trac.webkit.org/changeset/123085
2196         https://bugs.webkit.org/show_bug.cgi?id=91719
2197
2198         r123085 causes crashes on EFL layout test bot.
2199
2200         * UIProcess/efl/WebContextEfl.cpp:
2201         (WebKit::WebContext::applicationCacheDirectory):
2202
2203 2012-07-20  Christophe Dumez  <christophe.dumez@intel.com>
2204
2205         [EFL][WK2] Use "load,finished" signal in EWK2UnitTestBase::loadUrlSync() instead of "load,progress"
2206         https://bugs.webkit.org/show_bug.cgi?id=91721
2207
2208         Reviewed by Kenneth Rohde Christiansen.
2209
2210         The purpose of EWK2UnitTestBase::loadUrlSync() is to load
2211         a URL in the view and wait synchronously for the load to finish.
2212         The current implementation uses the "load,progress" signal to
2213         detect when the load is finished, which is inefficient because
2214         it gets emitted several times.
2215
2216         It is better to wait for the "load,finished" signal which gets
2217         emitted only once when the load is complete.
2218
2219         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2220         (EWK2UnitTest::onLoadFinished):
2221         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
2222         (EWK2UnitTest::EWK2UnitTestBase::loadUrlSync):
2223         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2224         (EWK2UnitTestBase):
2225
2226 2012-07-19  MORITA Hajime  <morrita@google.com>
2227
2228         [Refactoring] Replace Node's Document pointer with a TreeScope pointer
2229         https://bugs.webkit.org/show_bug.cgi?id=59816
2230
2231         Reviewed by Ryosuke Niwa.
2232
2233         * win/WebKit2.def: Added newly exported symbols.
2234         * win/WebKit2CFLite.def: Ditto.
2235
2236 2012-07-19  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2237
2238         [EFL] [WK2] Add methods to get/set a custom text encoding
2239         https://bugs.webkit.org/show_bug.cgi?id=90604
2240
2241         Reviewed by Kenneth Rohde Christiansen.
2242
2243         Add methods to get/set custom character encoding.
2244
2245         * UIProcess/API/efl/ewk_view.cpp:
2246         (_Ewk_View_Private_Data):
2247         (_ewk_view_priv_del):
2248         (ewk_view_setting_encoding_custom_get):
2249         (ewk_view_setting_encoding_custom_set):
2250         * UIProcess/API/efl/ewk_view.h:
2251
2252 2012-07-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2253
2254         Unreviewed. Fix build break because of changing parameter type of
2255         vibration virtual function on EFL port.
2256
2257         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
2258         (WebKit::WebVibrationClient::vibrate):
2259         * WebProcess/WebCoreSupport/WebVibrationClient.h:
2260         (WebVibrationClient):
2261
2262 2012-07-19  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2263
2264         [WK2] Add Vibration API integration to WebContext and WebPage
2265         https://bugs.webkit.org/show_bug.cgi?id=91081
2266
2267         Reviewed by Anders Carlsson.
2268
2269         Integrate Vibration API to WebPage, WebContext and properly route
2270         messages to the WebVibrationProxy.
2271
2272         * UIProcess/API/C/WKContext.cpp:
2273         (WKContextGetVibration):
2274         * UIProcess/API/C/WKContext.h:
2275         * UIProcess/WebContext.cpp:
2276         (WebKit::WebContext::WebContext):
2277         (WebKit::WebContext::~WebContext):
2278         (WebKit::WebContext::disconnectProcess):
2279         (WebKit::WebContext::didReceiveMessage):
2280         * UIProcess/WebContext.h:
2281         (WebKit):
2282         (WebContext):
2283         (WebKit::WebContext::vibrationProxy):
2284         * UIProcess/WebProcessProxy.cpp:
2285         (WebKit::WebProcessProxy::didReceiveMessage):
2286         * WebProcess/WebPage/WebPage.cpp:
2287         (WebKit::WebPage::WebPage):
2288
2289 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2290
2291         [Qt] Enable CSS shaders in Qt (software mode)
2292         https://bugs.webkit.org/show_bug.cgi?id=85140
2293
2294         Reviewed by Simon Hausmann.
2295
2296         Add CSSCustomFilterEnabled to QWebPreferences. It's disabled by default.
2297
2298         * UIProcess/API/qt/qwebpreferences.cpp:
2299         (QWebPreferencesPrivate::testAttribute):
2300         (QWebPreferencesPrivate::setAttribute):
2301         * UIProcess/API/qt/qwebpreferences_p_p.h:
2302
2303 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2304
2305         [Qt] Enable CSS shaders in Qt (software mode)
2306         https://bugs.webkit.org/show_bug.cgi?id=85140
2307
2308         Reviewed by Simon Hausmann.
2309
2310         Add CSSCustomFilterEnabled to QWebPreferences. It's disabled by default.
2311
2312         * UIProcess/API/qt/qwebpreferences.cpp:
2313         (QWebPreferencesPrivate::testAttribute):
2314         (QWebPreferencesPrivate::setAttribute):
2315         * UIProcess/API/qt/qwebpreferences_p_p.h:
2316
2317 2012-07-19  Pierre Rossi  <pierre.rossi@gmail.com>
2318
2319         [Qt][WK2] Map the elementRect exposed in QML to the view for popup menu
2320         https://bugs.webkit.org/show_bug.cgi?id=91645
2321
2322         Reviewed by Simon Hausmann.
2323
2324         This way the geometry of the QML item is still sensible even if we panned
2325         and zoomed.
2326
2327         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2328         (ItemSelectorContextObject):
2329         (WebKit::ItemSelectorContextObject::elementRect):
2330         (WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
2331         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2332
2333 2012-07-19  Zoltan Nyul  <zoltan.nyul@intel.com>
2334
2335         [EFL][WK2] Using different cache directory for each WTR process
2336         https://bugs.webkit.org/show_bug.cgi?id=91719
2337
2338         Reviewed by Kenneth Rohde Christiansen.
2339
2340         Make sure we return a valid application cache directory in
2341         WebContextEfl.
2342
2343         * UIProcess/efl/WebContextEfl.cpp:
2344         (WebKit::WebContext::applicationCacheDirectory):
2345
2346 2012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
2347
2348         [EFL][WK2] EFL should use DownloadSoup instead of defining DownloadEfl
2349         https://bugs.webkit.org/show_bug.cgi?id=91602
2350
2351         Reviewed by Kenneth Rohde Christiansen.
2352
2353         Reuse WebProcess/Downloads/soup/DownloadSoup.cpp in EFL port
2354         instead of redefining our own DownloadEfl.cpp. The EFL port
2355         is also using libsoup so it is best to avoid code duplication.
2356
2357         * GNUmakefile.am:
2358         * GNUmakefile.list.am:
2359         * PlatformEfl.cmake:
2360         * WebProcess/Downloads/Download.h:
2361         (WebKit):
2362         (Download):
2363         * WebProcess/Downloads/efl/DownloadEfl.cpp: Removed.
2364         * WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Added.
2365         (WebKit):
2366         (WebKit::platformDownloadNetworkError):
2367         (WebKit::platformDownloadDestinationError):
2368         * WebProcess/Downloads/efl/FileDownloaderEfl.cpp: Removed.
2369         * WebProcess/Downloads/efl/FileDownloaderEfl.h: Removed.
2370         * WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp: Added.
2371         (WebKit):
2372         (WebKit::platformDownloadNetworkError):
2373         (WebKit::platformDownloadDestinationError):
2374         * WebProcess/Downloads/soup/DownloadSoup.cpp: Make the code
2375         compile for other ports than GTK.
2376         (WebKit::DownloadClient::didReceiveResponse):
2377         (WebKit::DownloadClient::didReceiveData):
2378         (WebKit::DownloadClient::didFail):
2379         (WebKit::Download::continueWithoutCredential):
2380         (WebKit):
2381         (WebKit::Download::useCredential):
2382         (WebKit::Download::cancelAuthenticationChallenge):
2383         * WebProcess/Downloads/soup/DownloadSoupErrors.h: Added.
2384         (WebKit):
2385
2386 2012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
2387
2388         [WK2] Add C API for Network Information API
2389         https://bugs.webkit.org/show_bug.cgi?id=90762
2390
2391         Reviewed by Kenneth Rohde Christiansen.
2392
2393         Add C API for WKNetworkInfo and WKNetworkInfoManager
2394         so that they can be used by the client.
2395
2396         * CMakeLists.txt:
2397         * GNUmakefile.list.am:
2398         * Target.pri:
2399         * UIProcess/API/C/WKContext.cpp:
2400         (WKContextGetNetworkInfoManager):
2401         * UIProcess/API/C/WKContext.h:
2402         * UIProcess/API/C/WKNetworkInfo.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKNetworkInfoManager.cpp.
2403         (WKNetworkInfoGetTypeID):
2404         (WKNetworkInfoCreate):
2405         * UIProcess/API/C/WKNetworkInfo.h: Copied from Source/WebKit2/UIProcess/API/C/WKNetworkInfoManager.cpp.
2406         * UIProcess/API/C/WKNetworkInfoManager.cpp:
2407         (WKNetworkInfoManagerSetProvider):
2408         (WKNetworkInfoManagerProviderDidChangeNetworkInformation):
2409         * UIProcess/API/C/WKNetworkInfoManager.h:
2410
2411 2012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
2412
2413         [EFL][WK2] ewk_cookie_manager_persistent_storage_set is not exported
2414         https://bugs.webkit.org/show_bug.cgi?id=91647
2415
2416         Reviewed by Gustavo Noronha Silva.
2417
2418         Properly export ewk_cookie_manager_persistent_storage_set in
2419         ewk_cookie_manager.h by using EAPI.
2420
2421         * UIProcess/API/efl/ewk_cookie_manager.h:
2422
2423 2012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
2424
2425         [EFL] Add central error management to EFL port
2426         https://bugs.webkit.org/show_bug.cgi?id=91598
2427
2428         Reviewed by Kenneth Rohde Christiansen.
2429
2430         Make use of ErrorsEfl header from WebCore in
2431         WebKit2, for Ewk_Web_Error and WebErrorsEfl.
2432
2433         * UIProcess/API/efl/ewk_web_error.cpp:
2434         (ewk_web_error_type_get):
2435         * UIProcess/API/efl/ewk_web_error.h:
2436         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2437         (WebKit::cancelledError):
2438         (WebKit::blockedError):
2439         (WebKit::cannotShowURLError):
2440         (WebKit::interruptedForPolicyChangeError):
2441         (WebKit::cannotShowMIMETypeError):
2442         (WebKit::fileDoesNotExistError):
2443         (WebKit::pluginWillHandleLoadError):
2444
2445 2012-07-18  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2446
2447         [EFL] Set a theme for EFL WebKit2 unit test fixture
2448         https://bugs.webkit.org/show_bug.cgi?id=91618
2449
2450         Reviewed by Kenneth Rohde Christiansen.
2451
2452         The test fixture should load the theme generated by the build
2453         instead of trying to load the system theme.
2454
2455         * PlatformEfl.cmake:
2456         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2457         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
2458         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
2459         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
2460         (EWK2UnitTest):
2461         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
2462         (EWK2UnitTestEnvironment):
2463
2464 2012-07-18  Pierre Rossi  <pierre.rossi@gmail.com>
2465
2466         [Qt] QQuickWebView shouldn't recieve mouse events while dialogs are active
2467         https://bugs.webkit.org/show_bug.cgi?id=91634
2468
2469         Reviewed by Alexis Menard.
2470
2471         One side-effect of reimplementing childMouseEventFilter() in r122438 is that it can end up
2472         bypassing the mouseArea mechanism used in QML dialogs and still forward some mouse events
2473         over to the web process. We can rely on the same m_dialogActive mechanism already used for
2474         touch events in there as well.
2475
2476         * UIProcess/API/qt/qquickwebview.cpp:
2477         (QQuickWebView::childMouseEventFilter): ignore events and return early if a dialog is active.
2478
2479 2012-07-18  Pierre Rossi  <pierre.rossi@gmail.com>
2480
2481         [Qt] Build fix for ENABLE_TOUCH_EVENTS=0
2482
2483         Rubber-stamped by No'am Rosenthal.
2484
2485         Add the appropriate ENABLE(TOUCH_EVENTS) where they're needed.
2486
2487         * UIProcess/API/qt/raw/qrawwebview.cpp:
2488         * UIProcess/API/qt/raw/qrawwebview_p.h: include Platform.h so we can use the ENABLE macro.
2489         * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: Also add the missing QFile include.
2490         * UIProcess/qt/QtWebPageEventHandler.cpp:
2491         (WebKit::QtWebPageEventHandler::deactivateTapHighlight):
2492
2493 2012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
2494
2495         [EFL][WK2] Add Ewk class for cookie manager
2496         https://bugs.webkit.org/show_bug.cgi?id=91053
2497
2498         Reviewed by Gustavo Noronha Silva.
2499
2500         Add new Ewk_Cookie_Manager class to allow the client
2501         to set/get the cookie acceptance policy, support
2502         persistent cookie storage and clear cookies.
2503
2504         The Ewk_Cookie_Manager instance can be retrieved
2505         from the Ewk_Context API.
2506
2507         * PlatformEfl.cmake:
2508         * UIProcess/API/efl/EWebKit2.h:
2509         * UIProcess/API/efl/ewk_context.cpp:
2510         (_Ewk_Context):
2511         (_Ewk_Context::_Ewk_Context):
2512         (_Ewk_Context::~_Ewk_Context):
2513         (ewk_context_cookie_manager_get):
2514         * UIProcess/API/efl/ewk_context.h:
2515         * UIProcess/API/efl/ewk_cookie_manager.cpp: Added.
2516         (_Ewk_Cookie_Manager):
2517         (_Ewk_Cookie_Manager::_Ewk_Cookie_Manager):
2518         (ewk_cookie_manager_persistent_storage_set):
2519         (ewk_cookie_manager_accept_policy_set):
2520         (Get_Policy_Async_Data):
2521         (getAcceptPolicyCallback):
2522         (ewk_cookie_manager_async_accept_policy_get):
2523         (Get_Hostnames_Async_Data):
2524         (getHostnamesWithCookiesCallback):
2525         (ewk_cookie_manager_async_hostnames_with_cookies_get):
2526         (ewk_cookie_manager_hostname_cookies_clear):
2527         (ewk_cookie_manager_cookies_clear):
2528         (ewk_cookie_manager_free):
2529         (ewk_cookie_manager_new):
2530         * UIProcess/API/efl/ewk_cookie_manager.h: Added.
2531         * UIProcess/API/efl/ewk_cookie_manager_private.h: Added.
2532
2533 2012-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2534
2535         [GTK] Add WebKitWebView::submit-form signal to WebKit2 GTK+ API
2536         https://bugs.webkit.org/show_bug.cgi?id=91605
2537
2538         Reviewed by Gustavo Noronha Silva.
2539
2540         The signal is emitted when a form is about to submitted, with a
2541         form submission request that can be used to get the text fields
2542         and to continue the form submission wheh done.
2543
2544         * GNUmakefile.list.am: Add new files to compilation.
2545         * UIProcess/API/gtk/WebKitFormClient.cpp: Added.
2546         (willSubmitForm): Create a WebKitFormSubmissionRequest and call
2547         webkitWebViewSubmitFormRequest() with the request.
2548         (attachFormClientToView): Add impementation for willSubmitForm
2549         callback.
2550         * UIProcess/API/gtk/WebKitFormClient.h: Added.
2551         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp: Added.
2552         (webkit_form_submission_request_init):
2553         (webkitFormSubmissionRequestFinalize):
2554         (webkit_form_submission_request_class_init):
2555         (webkitFormSubmissionRequestCreate): Create a new
2556         WebKitFormSubmissionRequest for the given values dictionary and
2557         submission listener.
2558         (webkit_form_submission_request_get_text_fields): Create a
2559         GHashTable with the text fields values and return it.
2560         (webkit_form_submission_request_submit): Continue the form
2561         submission.
2562         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h: Added.
2563         * UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h: Added.
2564         * UIProcess/API/gtk/WebKitWebView.cpp:
2565         (webkitWebViewConstructed): Attach web view to form client.
2566         (webkit_web_view_class_init): Add WebKitWebView::submit-form
2567         signal.
2568         (webkitWebViewSubmitFormRequest): Emit WebKitWebView::submit-form
2569         signal.
2570         * UIProcess/API/gtk/WebKitWebView.h:
2571         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2572         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
2573         WebKitFormSubmissionRequest.
2574         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2575         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2576         (testWebViewSubmitForm):
2577         (beforeAll):
2578         * UIProcess/API/gtk/webkit2.h: Include
2579         WebKitFormSubmissionRequest.h.
2580
2581 2012-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2582
2583         [GTK] No main resource in WebView when page has been loaded from history cache
2584         https://bugs.webkit.org/show_bug.cgi?id=91478
2585
2586         Reviewed by Gustavo Noronha Silva.
2587
2588         We are assuming that a resource loaded for the main frame that is
2589         provisionally loading is the main resource of the web view. However
2590         that's not true for pages loaded from history cache, so when you
2591         go back/forward webkit_web_view_get_main_resource() always returns
2592         NULL. We can assume that the first resource loaded for the main
2593         frame is the main resource of the web view when
2594         pageIsProvisionallyLoading is false.
2595
2596         * UIProcess/API/gtk/WebKitWebView.cpp:
2597         (webkitWebViewResourceLoadStarted): Make sure we always have a
2598         main resource for the web view.
2599         * UIProcess/API/gtk/tests/TestResources.cpp:
2600         (testWebViewResourcesHistoryCache): Test we always have a main
2601         resource even after going back/forward.
2602         (beforeAll): Add new test case.
2603
2604 2012-07-18  Seokju Kwon  <seokju.kwon@samsung.com>
2605
2606         [EFL] Rename WebInspectorEfl.cpp as WebInspectorProxyEfl.cpp
2607         https://bugs.webkit.org/show_bug.cgi?id=91585
2608
2609         Reviewed by Andreas Kling.
2610
2611         Rename WebInspectorEfl.cpp as WebInspectorProxyEfl.cpp
2612         since it implements the platform specific methods of WebInspectorProxy.
2613
2614         * PlatformEfl.cmake:
2615         * UIProcess/efl/WebInspectorProxyEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebInspectorEfl.cpp.
2616         (WebKit):
2617         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2618         (WebKit::WebInspectorProxy::platformOpen):
2619         (WebKit::WebInspectorProxy::platformDidClose):
2620         (WebKit::WebInspectorProxy::platformBringToFront):
2621         (WebKit::WebInspectorProxy::platformIsFront):
2622         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
2623         (WebKit::WebInspectorProxy::inspectorPageURL):
2624         (WebKit::WebInspectorProxy::inspectorBaseURL):
2625         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2626         (WebKit::WebInspectorProxy::platformAttach):
2627         (WebKit::WebInspectorProxy::platformDetach):
2628         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
2629
2630 2012-07-18  Zoltan Horvath  <zoltan@webkit.org>
2631
2632         [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt
2633         https://bugs.webkit.org/show_bug.cgi?id=91600
2634
2635         Reviewed by Andreas Kling.
2636
2637         Use NativeImageQt::defaultFormatForAlphaEnabledImages() and NativeImageQt::defaultFormatForOpaqueImages()
2638         instead of the direct imagetypes at the appropriate places.
2639
2640         * Shared/qt/ShareableBitmapQt.cpp:
2641         (WebKit::ShareableBitmap::createQImage):
2642
2643 2012-07-18  Zeno Albisser  <zeno@webkit.org>
2644
2645         [Qt][WK2] Caching of ShareableSurfaces breaks tiling.
2646         https://bugs.webkit.org/show_bug.cgi?id=91609
2647
2648         A ShareableSurface should only be cached,
2649         when it is GraphicsSurface based.
2650
2651         Reviewed by Kenneth Rohde Christiansen.
2652
2653         * UIProcess/LayerTreeCoordinatorProxy.cpp:
2654         (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
2655         * UIProcess/LayerTreeCoordinatorProxy.h:
2656         (LayerTreeCoordinatorProxy):
2657
2658 2012-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2659
2660         [GTK] Fix a crash due to an invalid assert
2661         https://bugs.webkit.org/show_bug.cgi?id=91614
2662
2663         Reviewed by Xan Lopez.
2664
2665         In webkitWebViewBaseContainerAdd() there's
2666         ASSERT(priv->inspectorView); that should be the opposite, since we
2667         shoulnd't have an inspector view when the inspector view is added.
2668
2669         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2670         (webkitWebViewBaseContainerAdd):
2671
2672 2012-07-18  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2673
2674         [CMake] Make gtest a shared library
2675         https://bugs.webkit.org/show_bug.cgi?id=90973
2676
2677         Reviewed by Daniel Bates.
2678
2679         No need to link with gtest dependencies now since it is a shared library.
2680
2681         * PlatformEfl.cmake:
2682
2683 2012-07-18  YoungTaeck Song  <youngtaeck.song@samsung.com>
2684
2685         [WK2][EFL] Add a common code using Color instead of QColor
2686         https://bugs.webkit.org/show_bug.cgi?id=91580
2687
2688         Reviewed by Simon Hausmann.
2689
2690         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
2691         drawBorder's argument is QColor. So add a common code using Color to be used by Efl.
2692
2693         * UIProcess/texmap/LayerBackingStore.cpp:
2694         (WebKit::LayerBackingStore::paintToTextureMapper):
2695
2696 2012-07-17  Christophe Dumez  <christophe.dumez@intel.com>
2697
2698         [EFL] Replace 0 by NULL in public headers documentation
2699         https://bugs.webkit.org/show_bug.cgi?id=91470
2700
2701         Reviewed by Dirk Pranke.
2702
2703         Use NULL instead of 0 for pointer types in public
2704         C headers.
2705
2706         * UIProcess/API/efl/ewk_intent.h:
2707         * UIProcess/API/efl/ewk_intent_service.h:
2708         * UIProcess/API/efl/ewk_url_request.h:
2709         * UIProcess/API/efl/ewk_url_response.h:
2710         * UIProcess/API/efl/ewk_view.h:
2711         * UIProcess/API/efl/ewk_web_resource.h:
2712
2713 2012-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2714
2715         [GTK] Don't use deprecated soup API in WebKit2APITests/TestResources
2716         https://bugs.webkit.org/show_bug.cgi?id=91496
2717
2718         Reviewed by Martin Robinson.
2719
2720         soup_message_headers_get() is deprecated, use
2721         soup_message_headers_get_one() instead.
2722
2723         * UIProcess/API/gtk/tests/TestResources.cpp:
2724         (serverCallback):
2725
2726 2012-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2727
2728         [GTK] Fix a typo in WebKit2APITests/TestResources
2729         https://bugs.webkit.org/show_bug.cgi?id=91495
2730
2731         Reviewed by Xan Lopez.
2732
2733         * UIProcess/API/gtk/tests/TestResources.cpp:
2734         (testWebResourceLoading):
2735         (testWebResourceResponse):
2736         (testWebResourceMimeType):
2737         (testWebResourceActiveURI):
2738
2739 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
2740
2741         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
2742         https://bugs.webkit.org/show_bug.cgi?id=91196
2743
2744         Reviewed by Pavel Feldman.
2745
2746         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
2747         now returning the InspectorFrontendChannel.
2748
2749         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2750         (WebKit::WebInspectorClient::openInspectorFrontend):
2751         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2752         (WebInspectorClient):
2753
2754 2012-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2755
2756         [GTK] Paste primary selection when middle clicking in X11 WebKit2
2757         https://bugs.webkit.org/show_bug.cgi?id=91411
2758
2759         Reviewed by Xan Lopez.
2760
2761         Handle middle click events to paste primary selection as expected
2762         in any X11 application.
2763
2764         * WebProcess/WebPage/WebPage.cpp:
2765         (WebKit::handleMouseEvent): Call handleMousePressedEvent() for GTK+
2766         platform.
2767         * WebProcess/WebPage/WebPage.h:
2768         (WebPage): Add handleMousePressedEvent() for GTK+ platform.
2769         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2770         (WebKit::WebPage::handleMousePressedEvent): Handle middle click
2771         events to paste primary selection like we do in WebKit1.
2772
2773 2012-07-17  Ryuan Choi  <ryuan.choi@samsung.com>
2774
2775         [EFL] Move codes related to theme setting from Widget to RenderTheme
2776         https://bugs.webkit.org/show_bug.cgi?id=89842
2777
2778         Reviewed by Kenneth Rohde Christiansen.
2779
2780         * CMakeLists.txt: Added html/shadow to WebKit_INCLUDE_DIRECTORIES.
2781         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2782         (WebKit::WebPage::setThemePath): Called RenderThemeEfl::setThemePath instead of setting theme in FrameView.
2783
2784 2012-07-17  David Barr  <davidbarr@chromium.org>
2785
2786         Introduce ENABLE_CSS_IMAGE_ORIENTATION compile flag
2787         https://bugs.webkit.org/show_bug.cgi?id=89055
2788
2789         Reviewed by Kent Tamura.
2790
2791         The css3-images module is at candidate recommendation.
2792         http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
2793
2794         Add a configuration option for CSS image-orientation support, disabling it by default.
2795
2796         * Configurations/FeatureDefines.xcconfig:
2797
2798 2012-07-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2799
2800         Add RegisterProtocolHandlerClient to the Modules/protocolhandler
2801         https://bugs.webkit.org/show_bug.cgi?id=90940
2802
2803         Reviewed by Hajime Morita.
2804
2805         As a step to let protocol handler be moved to the modules, RegisterProtocolHandlerClient needs
2806         to be added to the Modules/protocolhandler. Because ChromeClient has some virtual functions for
2807         protocol handlers, virtual functions should be moved to RegisterProtocolHandlerClient.
2808
2809         In order to support this, WebRegisterProtocolHandlerClient class is added. However, this is not implemented yet.
2810         In addition, existing virtual functions in WebChromeClient are moved to WebRegisterProtocolHandlerClient.
2811
2812         * WebProcess/WebCoreSupport/WebChromeClient.h:
2813         * WebProcess/WebCoreSupport/WebRegisterProtocolHandlerClient.h: Added.
2814         (WebKit):
2815         (WebRegisterProtoclHandlerClient):
2816         (WebKit::WebRegisterProtoclHandlerClient::isProtocolHandlerRegistered):
2817         (WebKit::WebRegisterProtoclHandlerClient::unregisterProtocolHandler):
2818
2819 2012-07-16  Pete Williamson  <petewil@google.com>
2820
2821         Export the iconURL list to make it available to the Internals class for testing
2822         https://bugs.webkit.org/show_bug.cgi?id=88665
2823
2824         Reviewed by Kent Tamura.
2825
2826         * win/WebKit2.def: export the DocumentL::iconURLs function
2827
2828 2012-07-16  Hajime Morrita  <morrita@chromium.org>
2829
2830         WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
2831         https://bugs.webkit.org/show_bug.cgi?id=90764
2832
2833         Reviewed by Adam Barth.
2834
2835         Removed symbols which are now covered by WEBCORE_TESTING.
2836
2837         * win/WebKit2.def:
2838         * win/WebKit2CFLite.def:
2839
2840 2012-07-16  Christophe Dumez  <christophe.dumez@intel.com>
2841
2842         [EFL][WK2] Implement decidePolicyForResponse in policy client
2843         https://bugs.webkit.org/show_bug.cgi?id=91401
2844
2845         Reviewed by Kenneth Rohde Christiansen.
2846
2847         Provide implementation for decidePolicyForResponse callback
2848         in WebKit2 EFL's policy client.
2849
2850         * UIProcess/API/efl/ewk_view_policy_client.cpp:
2851         (decidePolicyForResponseCallback):
2852         (ewk_view_policy_client_attach):
2853
2854 2012-07-16  Ryuan Choi  <ryuan.choi@samsung.com>
2855
2856         [EFL][WK2] Add APIs to support theme.
2857         https://bugs.webkit.org/show_bug.cgi?id=90107
2858
2859         Reviewed by Hajime Morita.
2860
2861         RenderThemeEfl uses edj file to render native theme of form elements.
2862         This patch provides default theme and a way to change edj theme file for
2863         WebKit2/Efl.
2864
2865         * PlatformEfl.cmake:
2866         * UIProcess/API/efl/ewk_view.cpp:
2867         (_Ewk_View_Private_Data):
2868         (ewk_view_base_add):
2869         (ewk_view_theme_set):
2870         (ewk_view_theme_get):
2871         * UIProcess/API/efl/ewk_view.h:
2872         * UIProcess/WebPageProxy.h:
2873         (WebPageProxy):
2874         * UIProcess/efl/WebPageProxyEfl.cpp:
2875         (WebKit::WebPageProxy::setThemePath):
2876         * WebProcess/WebPage/WebPage.h:
2877         * WebProcess/WebPage/WebPage.messages.in:
2878         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2879         (WebKit::WebPage::setThemePath):
2880
2881 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
2882
2883         Remove setController from BatteryClient
2884         https://bugs.webkit.org/show_bug.cgi?id=90944
2885
2886         Reviewed by Adam Barth.
2887
2888         Remove WebBatteryClient::setController function.
2889
2890         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
2891         * WebProcess/WebCoreSupport/WebBatteryClient.h:
2892         (WebBatteryClient):
2893
2894 2012-07-16  Christophe Dumez  <christophe.dumez@intel.com>
2895
2896         [EFL][WK2] Make Ewk_Navigation_Policy_Decision ref counted
2897         https://bugs.webkit.org/show_bug.cgi?id=91343
2898
2899         Reviewed by Antonio Gomes.
2900
2901         Make Ewk_Navigation_Policy_Decision ref counted so that the
2902         client can make navigation policy decisions asynchronously
2903         by ref'ing the Ewk_Navigation_Policy_Decision object passed
2904         with the "policy,*" signals.
2905
2906         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2907         (_Ewk_Navigation_Policy_Decision):
2908         (_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
2909         (_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
2910         (ewk_navigation_policy_decision_ref):
2911         (ewk_navigation_policy_decision_unref):
2912         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2913         * UIProcess/API/efl/ewk_view.h:
2914         * UIProcess/API/efl/ewk_view_policy_client.cpp:
2915         (decidePolicyForNavigationAction):
2916         (decidePolicyForNewWindowAction):
2917
2918 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
2919
2920         [Qt] Change NativeImagePtr from QPixmap* to QImage*
2921         https://bugs.webkit.org/show_bug.cgi?id=88785
2922
2923         Reviewed by Simon Hausmann.
2924
2925         Since we use raster engine there is no difference between QPixmap and QImage, so we are going
2926         to use QImage everywhere where it is possible. This refactoring contains the change of the
2927         NativeImagePtr typedef from QPixmap* to QImage* and covers the related modifications.
2928
2929         Part of the change is similar to Viatcheslav Ostapenko's internal work.
2930
2931         Covered by existing tests.
2932
2933         * Shared/qt/ShareableBitmapQt.cpp:
2934         (WebKit::ShareableBitmap::createImage):
2935         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
2936         (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
2937         * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
2938         (WebKit::convertQImageToShareableBitmap):
2939         (WebKit::WebDragClient::startDrag):
2940         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
2941         (WebKit::LayerTreeCoordinator::adoptImageBackingStore):
2942
2943 2012-07-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2944
2945         Unreviewed. Fix make distcheck.
2946
2947         * UIProcess/API/gtk/tests/GNUmakefile.am: Add test resources to
2948         EXTRA_DIST.
2949
2950 2012-07-15  Christophe Dumez  <christophe.dumez@intel.com>
2951
2952         [EFL][WK2] Define destructors for Ewk structures
2953         https://bugs.webkit.org/show_bug.cgi?id=91338
2954
2955         Reviewed by Kentaro Hara.
2956
2957         Add destructors to Ewk structures and move
2958         memory freeing code from *_free() or *_unref()
2959         functions to the destructors.
2960
2961         * UIProcess/API/efl/ewk_intent.cpp:
2962         (_Ewk_Intent::_Ewk_Intent):
2963         (_Ewk_Intent):
2964         (_Ewk_Intent::~_Ewk_Intent):
2965         (ewk_intent_unref):
2966         * UIProcess/API/efl/ewk_intent_service.cpp:
2967         (_Ewk_Intent_Service):
2968         (_Ewk_Intent_Service::~_Ewk_Intent_Service):
2969         (ewk_intent_service_unref):
2970         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2971         (_Ewk_Navigation_Policy_Decision):
2972         (_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
2973         (ewk_navigation_policy_decision_free):
2974         * UIProcess/API/efl/ewk_url_request.cpp:
2975         (_Ewk_Url_Request):
2976         (_Ewk_Url_Request::~_Ewk_Url_Request):
2977         (ewk_url_request_unref):
2978         * UIProcess/API/efl/ewk_url_response.cpp:
2979         (_Ewk_Url_Response):
2980         (_Ewk_Url_Response::~_Ewk_Url_Response):
2981         (ewk_url_response_unref):
2982         * UIProcess/API/efl/ewk_view.cpp:
2983         (_Ewk_View_Private_Data):
2984         (_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
2985         (_ewk_view_priv_del):
2986         * UIProcess/API/efl/ewk_web_error.cpp:
2987         (_Ewk_Web_Error):
2988         (_Ewk_Web_Error::~_Ewk_Web_Error):
2989         (ewk_web_error_free):
2990         * UIProcess/API/efl/ewk_web_resource.cpp:
2991         (_Ewk_Web_Resource):
2992         (_Ewk_Web_Resource::~_Ewk_Web_Resource):
2993         (ewk_web_resource_unref):
2994
2995 2012-07-14  Eric Carlson  <eric.carlson@apple.com>
2996
2997         Enable AVCF hardware video decoding
2998         https://bugs.webkit.org/show_bug.cgi?id=90015
2999         <rdar://problem/10770317>
3000
3001         Reviewed by Anders Carlsson.
3002
3003         * DerivedSources.make: Define HAVE_AVCF if necessary.
3004
3005         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3006         (WebKit):
3007         (WebKit::WebChromeClient::graphicsDeviceAdapter): New, return the layer tree host's
3008             graphics adapter.
3009         * WebProcess/WebCoreSupport/WebChromeClient.h:
3010         (WebChromeClient):
3011         * WebProcess/WebPage/LayerTreeHost.h:
3012         (WebCore):
3013         (LayerTreeHost):
3014         (WebKit::LayerTreeHost::graphicsDeviceAdapter): New, default implementation.
3015
3016         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
3017         (LayerTreeHostCAWin):
3018
3019 2012-07-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3020
3021         [CMake] Proper handling of ENABLE_API_TESTS build option
3022         https://bugs.webkit.org/show_bug.cgi?id=91221
3023
3024         Reviewed by Rob Buis.
3025
3026         Build unit tests only if ENABLE_API_TESTS is set.
3027
3028         * PlatformEfl.cmake:
3029
3030 2012-07-13  Christophe Dumez  <christophe.dumez@intel.com>
3031
3032         [EFL][WK2] Make new public Ewk headers as installable
3033         https://bugs.webkit.org/show_bug.cgi?id=91232
3034
3035         Reviewed by Antonio Gomes.
3036
3037         Make new public Ewk headers installable.
3038
3039         * PlatformEfl.cmake:
3040
3041 2012-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3042
3043         [GTK] Implement disk cache in WebKit2
3044         https://bugs.webkit.org/show_bug.cgi?id=90797
3045
3046         Reviewed by Xan Lopez.
3047
3048         * WebProcess/gtk/WebProcessGtk.cpp:
3049         (WebKit::getCacheDiskFreeSize): Use an ASSERT instead of an early
3050         return since the cache feature is now always added to the session.
3051         (WebKit::WebProcess::platformSetCacheModel): Get the cache from
3052         the session and set the maximum cache size as computed by
3053         calculateCacheSizes().
3054         (WebKit::WebProcess::platformClearResourceCaches): Call
3055         soup_cache_clear().
3056         (WebKit::WebProcess::platformTerminate): Make sure all pending
3057         data is saved to the disk before the web process finishes.
3058         * WebProcess/gtk/WebProcessMainGtk.cpp:
3059         (WebKit::WebProcessMainGtk): Create a SoupCache feature and add it
3060         to the default SoupSession.
3061
3062 2012-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3063
3064         [GTK] Fix disk cache size computation in WebKit2
3065         https://bugs.webkit.org/show_bug.cgi?id=91226
3066
3067         Reviewed by Xan Lopez.
3068
3069         We are passing the free disk space value in bytes to
3070         calculateCacheSizes() which expects values in MB.
3071
3072         * WebProcess/gtk/WebProcessGtk.cpp:
3073         (WebKit::WebProcess::platformSetCacheModel):
3074
3075 2012-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3076
3077         [GTK] WebKit2 crash when going back/forward
3078         https://bugs.webkit.org/show_bug.cgi?id=91220
3079
3080         Reviewed by Xan Lopez.
3081
3082         For some reason when a page is loaded from the backforward list,
3083         when the didCommitLoadForFrame callback is called for the main
3084         frame, the callback didInitiateLoadForResource hasn't been called
3085         yet, so we don't even have a main resource at that point. We were
3086         assuming we always had a main resource with a response. For now we
3087         just check whether we have a resource before trying to set the
3088         certificate to fix the crash, but we need to figue out why this is
3089         happening an how to properly fix it.
3090
3091         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
3092         (didCommitLoadForFrame): Check whether we have a main resource
3093         before setting the certificate.
3094
3095 2012-07-13  Christophe Dumez  <christophe.dumez@intel.com>
3096
3097         [EFL][WK2] Use eina stringsharing for Ewk_Web_Resource's url
3098         https://bugs.webkit.org/show_bug.cgi?id=91200
3099
3100         Reviewed by Kenneth Rohde Christiansen.
3101
3102         Use eina stringsharing for Ewk_Web_Resource's url
3103         for consistency.
3104
3105         * UIProcess/API/efl/ewk_web_resource.cpp:
3106         (_Ewk_Web_Resource):
3107         (_Ewk_Web_Resource::_Ewk_Web_Resource):
3108         (ewk_web_resource_unref):
3109         (ewk_web_resource_url_get):
3110         * UIProcess/API/efl/ewk_web_resource.h:
3111
3112 2012-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3113
3114         [GTK] WebKitWebView::mouse-target-changed is not emitted when moved to/from edtiable content
3115         https://bugs.webkit.org/show_bug.cgi?id=91216
3116
3117         Reviewed by Xan Lopez.
3118
3119         The problem is that the function to check whether two hit test
3120         results are equal doesn't check the editable flag.
3121
3122         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
3123         (webkitHitTestResultCompare): Check also the editable flag.
3124
3125 2012-07-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3126
3127         [EFL] Add *explicit* keyword to constructor which has a parameter
3128         https://bugs.webkit.org/show_bug.cgi?id=91207
3129
3130         Reviewed by Zoltan Herczeg.
3131
3132         Add *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion.
3133
3134         * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
3135         (WebFrameNetworkingContext::WebFrameNetworkingContext):
3136
3137 2012-07-13  Zeno Albisser  <zeno@webkit.org>
3138
3139         [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
3140         https://bugs.webkit.org/show_bug.cgi?id=90881
3141
3142         Add a GLX based GraphicsSurface implementation for Linux.
3143
3144         Reviewed by Noam Rosenthal.
3145
3146         * Shared/ShareableSurface.cpp:
3147         (WebKit::ShareableSurface::create):
3148             Only create a GraphicsSurface from a ShareableSurface::Handle
3149             in case the Handle contains a valid GraphicsSurface token.
3150             Otherwise fall back to creating a ShareableBitmap.
3151         * UIProcess/LayerTreeCoordinatorProxy.cpp:
3152         (WebKit::createLayerTileUniqueKey):
3153             Create a unique key for a surface based on tileID and layerID.
3154         (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
3155             Even when GraphicsSurface is enabled, not all ShareableSurfaces
3156             will necessarily be backed by a GraphicsSurface. In case of
3157             a ShareableSurface being backed by a ShareableBitmap instead,
3158             the GraphicsSurface token will always be null.
3159             So instead of using the GraphicsSurface token as a key for
3160             storing surfaces in a map, we create a unique key from
3161             layerID and tileID.
3162         * UIProcess/LayerTreeCoordinatorProxy.h:
3163         (LayerTreeCoordinatorProxy):
3164
3165 2012-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3166
3167         [GTK] Add API to get HTTPS status to WebKit2 GTK+
3168         https://bugs.webkit.org/show_bug.cgi?id=91100
3169
3170         Reviewed by Martin Robinson.
3171
3172         Add webkit_uri_response_get_https_status() to return
3173         GTlsCertificate and GTlsCertificateFlags with information about
3174         the SSL certificate and the possible errors with the certificate.
3175
3176         * GNUmakefile.list.am: Add new files to compilation.
3177         * PlatformEfl.cmake: Ditto.
3178         * Shared/efl/PlatformCertificateInfo.h: Removed.
3179         * Shared/soup/PlatformCertificateInfo.cpp: Added.
3180         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
3181         (WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
3182         (WebKit::PlatformCertificateInfo::encode): Encode the
3183         GTlsCertificate and GTlsCertificateFlags.
3184         (WebKit::PlatformCertificateInfo::decode): Decode
3185         PlatformCertificateInfo into a GTlsCertificate and GTlsCertificateFlags.
3186         * Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebKit2/Shared/gtk/PlatformCertificateInfo.h.
3187         (WebKit::PlatformCertificateInfo::certificate): Return the certificate.
3188         (WebKit::PlatformCertificateInfo::tlsErrors): Return the TLS errors
3189         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
3190         (didCommitLoadForFrame): Set the certificate of the current frame
3191         to the response of the main resource.
3192         * UIProcess/API/gtk/WebKitURIResponse.cpp:
3193         (webkit_uri_response_get_https_status): Return GTlsCertificate and
3194         GTlsCertificateFlags.
3195         (webkitURIResponseSetCertificateInfo): Update the internal
3196         ResourceResponse with the GTlsCertificate and GTlsCertificateFlags
3197         of the given PlatformCertificateInfo.
3198         * UIProcess/API/gtk/WebKitURIResponse.h:
3199         * UIProcess/API/gtk/WebKitURIResponsePrivate.h:
3200         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
3201         * UIProcess/API/gtk/tests/GNUmakefile.am:
3202         * UIProcess/API/gtk/tests/TestMain.h:
3203         (Test::getResourcesDir): Helper function to get the resources
3204         directory of the WebKit2 API tests.
3205         * UIProcess/API/gtk/tests/TestSSL.cpp: Added.
3206         (testSSL):
3207         (serverCallback):
3208         (beforeAll):
3209         (afterAll):
3210         * UIProcess/API/gtk/tests/WebKitTestServer.cpp:
3211         (WebKitTestServer::WebKitTestServer): Add support por SSL test
3212         servers.
3213         * UIProcess/API/gtk/tests/WebKitTestServer.h:
3214         (WebKitTestServer): Add ssl parameter to create a HTTPS server.
3215         * UIProcess/API/gtk/tests/resources/test-cert.pem: Added.
3216         * UIProcess/API/gtk/tests/resources/test-key.pem: Added.
3217
3218 2012-07-12  Christophe Dumez  <christophe.dumez@intel.com>
3219
3220         [WK2][EFL] Facilitate debugging of the Web Process
3221         https://bugs.webkit.org/show_bug.cgi?id=90768
3222
3223         Reviewed by Kenneth Rohde Christiansen.
3224
3225         The EFL port now checks if the WEB_PROCESS_CMD_PREFIX
3226         environment variable is set and uses it as prefix
3227         when spawning the Web process if it is. This is used
3228         for debugging purposes with prefixes such as:
3229         "xterm -title renderer -e gdb --args".
3230
3231         * UIProcess/Launcher/ProcessLauncher.h:
3232         (LaunchOptions):
3233         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3234         (WebKit::ProcessLauncher::launchProcess):
3235         * UIProcess/WebProcessProxy.cpp:
3236         (WebKit::WebProcessProxy::connect):
3237
3238 2012-07-12  Timothy Hatcher  <timothy@apple.com>
3239
3240         Make the "Inspect Element" context menu item appear in nightly builds again.
3241
3242         https://webkit.org/b/89323
3243
3244         Reviewed by Anders Carlsson.
3245
3246         * Shared/API/c/WKContextMenuItem.cpp:
3247         (compatibleContextMenuItemTag): Added. Checks for the specific version of Safari 6 that needs the
3248         tag fixed up to match values it expects.
3249         (WKContextMenuItemGetTag): On Mac platforms call compatibleContextMenuItemTag to fix up the tag
3250         before returning it.
3251         * Shared/API/c/WKContextMenuItemTypes.h: Fix the order of the WKContextMenuItemTag enum
3252         to be binary compatible with older versions of WebKit2.
3253
3254 2012-07-12  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3255
3256         [EFL] Port the test framework to WebKit 2
3257         https://bugs.webkit.org/show_bug.cgi?id=90606
3258
3259         Reviewed by Kenneth Rohde Christiansen.
3260
3261         This port of EFL's WebKit 1 test framework uses a more gtest-ish
3262         way of writing tests and it is based on a test fixture that loads a
3263         page synchronously as convenience (if needed). This base fixture can be
3264         easily extended by just inheriting from it.
3265
3266         * PlatformEfl.cmake:
3267         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added.
3268         (EWK2UnitTest):
3269         (EWK2UnitTest::onLoadProgress):
3270         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
3271         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
3272         (EWK2UnitTest::EWK2UnitTestBase::TearDown):
3273         (EWK2UnitTest::EWK2UnitTestBase::loadUrlSync):
3274         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Added.
3275         (EWK2UnitTest):
3276         (EWK2UnitTestBase):
3277         (EWK2UnitTest::EWK2UnitTestBase::setLoadProgress):
3278         (EWK2UnitTest::EWK2UnitTestBase::webView):
3279         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Added.
3280         (EWK2UnitTest):
3281         (EWK2UnitTest::EWK2UnitTestEnvironment::EWK2UnitTestEnvironment):
3282         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTestPageUrl):
3283         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Added.
3284         (EWK2UnitTest):
3285         (EWK2UnitTestEnvironment):
3286         (EWK2UnitTest::EWK2UnitTestEnvironment::useX11Window):
3287         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultWidth):
3288         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultHeight):
3289         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Added.
3290         (parseArguments):
3291         (main):
3292         * UIProcess/API/efl/tests/resources/default_test_page.html: Added.
3293         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added.
3294         (TEST_F):
3295
3296 2012-07-12  Christophe Dumez  <christophe.dumez@intel.com>
3297
3298         [WK2] Add missing Network Information API integration to WebContext and WebPage
3299         https://bugs.webkit.org/show_bug.cgi?id=90781
3300
3301         Reviewed by Anders Carlsson.
3302
3303         Integrate Network Information API to WebPage, WebContext and
3304         properly route messages to the WebNetworkInfoManagerProxy.
3305         Without this, the Network Information tests are crashing for
3306         WebKit2.
3307
3308         * UIProcess/WebContext.cpp:
3309         (WebKit::WebContext::WebContext):
3310         (WebKit::WebContext::~WebContext):
3311         (WebKit::WebContext::disconnectProcess):
3312         (WebKit::WebContext::didReceiveMessage):
3313         (WebKit::WebContext::didReceiveSyncMessage):
3314         * UIProcess/WebContext.h:
3315         (WebKit):
3316         (WebContext):
3317         (WebKit::WebContext::networkInfoManagerProxy):
3318         * UIProcess/WebNetworkInfoManagerProxy.cpp:
3319         (WebKit::WebNetworkInfoManagerProxy::didReceiveSyncMessage):
3320         (WebKit):
3321         * UIProcess/WebNetworkInfoManagerProxy.h:
3322         (WebNetworkInfoManagerProxy):
3323         * UIProcess/WebProcessProxy.cpp:
3324         (WebKit::WebProcessProxy::didReceiveMessage):
3325         (WebKit::WebProcessProxy::didReceiveSyncMessage):
3326         * WebProcess/WebPage/WebPage.cpp:
3327         (WebKit::WebPage::WebPage):
3328
3329 2012-07-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
3330
3331         Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
3332         https://bugs.webkit.org/show_bug.cgi?id=91111
3333
3334         Reviewed by Kenneth Rohde Christiansen.
3335
3336         Include the new filenames.
3337
3338         * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h:
3339         (WebGraphicsLayer):
3340
3341 2012-07-12  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3342
3343         [Qt][WK2] Implement web notifications support
3344         https://bugs.webkit.org/show_bug.cgi?id=80702
3345
3346         Reviewed by Noam Rosenthal.
3347
3348         Adding a new type of permission request for Desktop Notifications (plus required code
3349         to register the handle for this requests).
3350
3351         * UIProcess/API/qt/qwebpermissionrequest.cpp:
3352         (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate):
3353         (QWebPermissionRequestPrivate):
3354         (QWebPermissionRequest::create):
3355         (QWebPermissionRequest::QWebPermissionRequest):
3356         (QWebPermissionRequest::setAllow):
3357         * UIProcess/API/qt/qwebpermissionrequest_p.h:
3358         * UIProcess/API/qt/tests/qmltests/WebView/tst_notification.qml: Added.
3359         * UIProcess/API/qt/tests/qmltests/common/notification.html: Added.
3360         * UIProcess/qt/QtWebPageUIClient.cpp:
3361         (WebKit::QtWebPageUIClient::QtWebPageUIClient):
3362         (WebKit::QtWebPageUIClient::policyForNotificationPermissionRequest):
3363         (WebKit):
3364         * UIProcess/qt/QtWebPageUIClient.h:
3365
3366 2012-07-12  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
3367
3368         [EFL][WK2] Browser crashes running BatteryStatus tests.
3369         https://bugs.webkit.org/show_bug.cgi?id=91065
3370
3371         Reviewed by Kentaro Hara.
3372
3373         clientInfo was incorrectly casted to BatteryProviderEfl in helper
3374         function. This patch fixes the issue.
3375
3376         * UIProcess/API/efl/BatteryProvider.cpp:
3377         (toBatteryProvider):
3378
3379 2012-07-12  Christophe Dumez  <christophe.dumez@intel.com>
3380
3381         [EFL] [WK2] regression(r122411) Crashes in Ewk_View
3382         https://bugs.webkit.org/show_bug.cgi?id=91068
3383
3384         Reviewed by Kentaro Hara.
3385
3386         Avoid using calloc() to allocate memory for structures
3387         and use new operator instead. calloc() causes unwanted
3388         behavior when allocing a structure which contains
3389         non-pointer types (e.g. a HashMap) and leads to
3390         crashes.
3391
3392         * UIProcess/API/efl/ewk_context.cpp:
3393         (_Ewk_Context::_Ewk_Context):
3394         * UIProcess/API/efl/ewk_intent.cpp:
3395         (_Ewk_Intent):
3396         (_Ewk_Intent::_Ewk_Intent):
3397         (ewk_intent_unref):
3398         (ewk_intent_new):
3399         * UIProcess/API/efl/ewk_intent_service.cpp:
3400         (_Ewk_Intent_Service):
3401         (_Ewk_Intent_Service::_Ewk_Intent_Service):
3402         (ewk_intent_service_unref):
3403         (ewk_intent_service_new):
3404         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
3405         (_Ewk_Navigation_Policy_Decision):
3406         (_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
3407         (ewk_navigation_policy_decision_free):
3408         (ewk_navigation_policy_decision_new):
3409         * UIProcess/API/efl/ewk_url_request.cpp:
3410         (_Ewk_Url_Request):
3411         (_Ewk_Url_Request::_Ewk_Url_Request):
3412         (ewk_url_request_unref):
3413         (ewk_url_request_new):
3414         * UIProcess/API/efl/ewk_url_response.cpp:
3415         (_Ewk_Url_Response):
3416         (_Ewk_Url_Response::_Ewk_Url_Response):
3417         (ewk_url_response_unref):
3418         (ewk_url_response_new):
3419         * UIProcess/API/efl/ewk_view.cpp:
3420         (_Ewk_View_Private_Data):
3421         (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
3422         (_ewk_view_priv_new):
3423         (_ewk_view_priv_del):
3424         * UIProcess/API/efl/ewk_web_error.cpp:
3425         (_Ewk_Web_Error):
3426         (_Ewk_Web_Error::_Ewk_Web_Error):
3427         (ewk_web_error_free):
3428         (ewk_web_error_new):
3429         * UIProcess/API/efl/ewk_web_resource.cpp:
3430         (_Ewk_Web_Resource):
3431         (_Ewk_Web_Resource::_Ewk_Web_Resource):
3432         (ewk_web_resource_unref):
3433         (ewk_web_resource_new):
3434
3435 2012-07-11  Andras Becsi  <andras.becsi@nokia.com>
3436
3437         [Qt][WK2] ASSERT: "!m_viewportItem->isMoving()" in QtViewportHandler::flickMoveEnded()
3438         https://bugs.webkit.org/show_bug.cgi?id=90875
3439
3440         Reviewed by Kenneth Rohde Christiansen.
3441
3442         Since MultiPointTouchArea and PinchArea use the childMouseEventFilter
3443         method to filter touch events and because Flickable filters child mouse
3444         events the canvas calls this function before propagating the touch event
3445         to the WebView. Since Flickable does not accept touch events the canvas
3446         tries to propagate a synthesized mouse event through the base class
3447         childMouseEventFilter function which is accepted by Flickable and
3448         interferes with the input events we send to Flicakble hence messes up
3449         the internal state of the WebView.
3450         This patch reimplements the virtual childMouseEventFilter method so that all
3451         the mouse and touch events can be processed by WebKit before they arrive to
3452         Flickable.
3453
3454         * UIProcess/API/qt/qquickwebview.cpp:
3455         (QQuickWebView::childMouseEventFilter):
3456         * UIProcess/API/qt/qquickwebview_p.h:
3457
3458 2012-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3459
3460         Unreviewed. Fix GTK+ debug build after r122425.
3461
3462         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp:
3463         (webkitSoupCookieJarSqliteNew):
3464
3465 2012-07-12  Sergio Villar Senin  <svillar@igalia.com>
3466
3467         [WK2] Performance issue in FindController::findString
3468         https://bugs.webkit.org/show_bug.cgi?id=78132
3469
3470         Reviewed by Anders Carlsson.
3471
3472         FindController should not unmark all text matches by default. It
3473         will be done only if the string is not found or if
3474         markAllTextMatches() is called. This will allow clients to look
3475         for the next/previous without having to unmark() + mark() all the
3476         text matches for every single search operation.
3477
3478         * UIProcess/API/gtk/WebKitFindController.cpp:
3479         (webKitFindControllerPerform):
3480         (webkit_find_controller_search_next):
3481         (webkit_find_controller_search_previous):
3482         * WebProcess/WebPage/FindController.cpp:
3483         (WebKit::FindController::updateFindUIAfterPageScroll):
3484         (WebKit::FindController::findString):
3485
3486 2012-07-12  Christophe Dumez  <christophe.dumez@intel.com>
3487
3488         [WK2][EFL] Add policy client to Ewk_View
3489         https://bugs.webkit.org/show_bug.cgi?id=90953
3490
3491         Reviewed by Kenneth Rohde Christiansen.
3492
3493         Emit new "policy,decision,navigation" and "policy,decision,new,window"
3494         on the Ewk_View when policy decisions should be taken by the client.
3495
3496         A new Ewk_Navigation_Policy_Decision type is introduced to provide
3497         information about the navigation request and make a decision.
3498         By default, the navigation request is accepted.
3499
3500         * PlatformEfl.cmake:
3501         * UIProcess/API/efl/EWebKit2.h:
3502         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Added.
3503         (_Ewk_Navigation_Policy_Decision):
3504         (ewk_navigation_policy_decision_free):
3505         (ewk_navigation_policy_navigation_type_get):
3506         (ewk_navigation_policy_mouse_button_get):
3507         (ewk_navigation_policy_modifiers_get):
3508         (ewk_navigation_policy_frame_name_get):
3509         (ewk_navigation_policy_request_get):
3510         (ewk_navigation_policy_decision_accept):
3511         (ewk_navigation_policy_decision_reject):
3512         (ewk_navigation_policy_decision_download):
3513         (ewk_navigation_policy_decision_new):
3514         * UIProcess/API/efl/ewk_navigation_policy_decision.h: Added.
3515         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Added.
3516         * UIProcess/API/efl/ewk_private.h: Added.
3517         * UIProcess/API/efl/ewk_view.cpp:
3518         (ewk_view_base_add):
3519         (ewk_view_navigation_policy_decision):
3520         (ewk_view_new_window_policy_decision):
3521         * UIProcess/API/efl/ewk_view.h:
3522         * UIProcess/API/efl/ewk_view_policy_client.cpp: Added.
3523         (toEwkView):
3524         (decidePolicyForNavigationAction):
3525         (decidePolicyForNewWindowAction):
3526         (ewk_view_policy_client_attach):
3527         * UIProcess/API/efl/ewk_view_policy_client_private.h: Added.
3528         * UIProcess/API/efl/ewk_view_private.h:
3529
3530 2012-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3531
3532         [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
3533         https://bugs.webkit.org/show_bug.cgi?id=83016
3534
3535         Reviewed by Martin Robinson.
3536
3537         Add a custom implementation of SoupCookieJarSqlite based on
3538         libsoup code but using WebCore SQLite classes. SoupCookieJarSqlite
3539         is part of libsoup-gnome, it's not a lot of code and it doesn't
3540         change often, so it's better to simply have our own implementation
3541         instead of making this important feature depend on an optional
3542         dependency. There are plans to move the implementation to libsoup,
3543         if that eventually happens we will remove our code to use libsoup
3544         directly.
3545
3546         * GNUmakefile.am: Add new dirs to include path.
3547         * GNUmakefile.list.am: Add new files to compilation.
3548         * PlatformEfl.cmake: Ditto.
3549         * Shared/soup/SoupCookiePersistentStorageType.h: Added.
3550         * UIProcess/API/gtk/WebKitCookieManager.cpp:
3551         (webkit_cookie_manager_set_persistent_storage): Set a persistent
3552         storage for cookies.
3553         * UIProcess/API/gtk/WebKitCookieManager.h:
3554         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols
3555         * UIProcess/API/gtk/tests/TestCookieManager.cpp:
3556         (testCookieManagerPersistentStorage):
3557         (serverCallback):
3558         (beforeAll):
3559         (afterAll):
3560         * UIProcess/WebCookieManagerProxy.h:
3561         (WebCookieManagerProxy): Add setCookiePersistentStorage() method
3562         when using soup.
3563         * UIProcess/soup/WebCookieManagerProxySoup.cpp: Added.
3564         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Send
3565         SetCookiePersistentStorage message to the web process.
3566         * WebProcess/Cookies/WebCookieManager.h:
3567         (WebCookieManager): Add setCookiePersistentStorage() method when
3568         using soup.
3569         * WebProcess/Cookies/WebCookieManager.messages.in: Add
3570         SetCookiePersistentStorage message when using soup.
3571         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
3572         (WebKit::WebCookieManager::setCookiePersistentStorage): Create a
3573         new cookie jar for the given filename and storage type and add it
3574         to the soup session.
3575         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp: Added.
3576         (webkitSoupCookieJarSqliteOpenDatabase): Open SQLite database.
3577         (webkitSoupCookieJarSqliteCreateTable): Create moz_cookies if it
3578         doesn't exist.
3579         (webkitSoupCookieJarSqliteLoad): Load the initial set of cookies
3580         from the database.
3581         (webkitSoupCookieJarSqliteInsertCookie): Insert a new cookie into
3582         the database.
3583         (webkitSoupCookieJarSqliteDeleteCookie): Delete an exising cookie
3584         from the database.
3585         (webkitSoupCookieJarSqliteChanged): Insert/delete cookies
3586         depending on the change.
3587         (webkitSoupCookieJarSqliteFinalize):
3588         (webkit_soup_cookie_jar_sqlite_init):
3589         (webkit_soup_cookie_jar_sqlite_class_init):
3590         (webkitSoupCookieJarSqliteNew):
3591         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h: Added.
3592
3593 2012-07-11  Christophe Dumez  <christophe.dumez@intel.com>
3594
3595         [WK2][EFL] Ewk_View should provide more resource loading notifications
3596         https://bugs.webkit.org/show_bug.cgi?id=90601
3597
3598         Reviewed by Antonio Gomes.
3599
3600         Add new "resource,request,sent", "resource,request,response",
3601         "resource,request,failed" and "resource,request,finished" to
3602         Ewk_View in order to notify the clients of the main resource
3603         load state changes.
3604
3605         Introduce new Ewk_Url_Response type that is used to provide
3606         information to the clients regarding the resource load
3607         responses that are received.
3608
3609         * PlatformEfl.cmake:
3610         * UIProcess/API/efl/EWebKit2.h:
3611         * UIProcess/API/efl/ewk_url_response.cpp: Added.
3612         (_Ewk_Url_Response):
3613         (ewk_url_response_ref):
3614         (ewk_url_response_unref):
3615         (ewk_url_response_url_get):
3616         (ewk_url_response_status_code_get):
3617         (ewk_url_response_mime_type_get):
3618         (ewk_url_response_new):
3619         * UIProcess/API/efl/ewk_url_response.h: Added.
3620         * UIProcess/API/efl/ewk_url_response_private.h: Added.
3621         * UIProcess/API/efl/ewk_view.cpp:
3622         (_Ewk_View_Private_Data):
3623         (ewk_view_resource_load_initiated):
3624         (ewk_view_resource_load_response):
3625         (ewk_view_resource_load_failed):
3626         (ewk_view_resource_load_finished):
3627         (ewk_view_resource_request_sent):
3628         (ewk_view_load_provisional_started):
3629         * UIProcess/API/efl/ewk_view.h:
3630         * UIProcess/API/efl/ewk_view_private.h:
3631         * UIProcess/API/efl/ewk_view_resource_load_client.cpp:
3632         (toEwkView):
3633         (didInitiateLoadForResource):
3634         (didSendRequestForResource):
3635         (didReceiveResponseForResource):
3636         (didFinishLoadForResource):
3637         (didFailLoadForResource):
3638         (ewk_view_resource_load_client_attach):
3639
3640 2012-07-11  Mark Rowe  <mrowe@apple.com>
3641
3642         Fix a logic error in the #if so that the correct code is compiled on Snow Leopard.
3643
3644         I introduced this in r122403 when I inverted the sense of the #if.
3645
3646         * UIProcess/mac/WKFullScreenWindowController.mm:
3647
3648 2012-07-11  Mark Rowe  <mrowe@apple.com>
3649
3650         <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
3651
3652         Reviewed by Dan Bernstein.
3653
3654         The deployment target is already set to the version that we're targeting, and it's that setting
3655         which determines which functionality from the SDK is available to us.
3656
3657         * Configurations/Base.xcconfig:
3658
3659 2012-07-11  Mark Rowe  <mrowe@apple.com>
3660
3661         <http://webkit.org/b/91022> WebFullScreenController and WKFullScreenWindowController shouldn't add unprefixed methods to AppKit classes
3662
3663         Reviewed by Dan Bernstein.
3664
3665         * UIProcess/mac/WKFullScreenWindowController.mm:
3666         (convertRectToScreen): Add a static helper method that calls through to -[NSWindow convertRectToScreen:] on OS versions where it exists
3667         but otherwise provides a compatibility implementation of it.
3668         (-[WKFullScreenWindowController enterFullScreen:]): Call our new helper.
3669
3670 2012-07-11  Mark Rowe  <mrowe@apple.com>
3671
3672         <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3673
3674         This removal was handled by a script that translates the relevant macros in to the equivalent checks
3675         using the system availability macros.
3676
3677         Reviewed by Filip Pizlo.
3678
3679         * Shared/DictionaryPopupInfo.cpp:
3680         * Shared/DictionaryPopupInfo.h:
3681         * Shared/mac/PasteboardTypes.mm:
3682         * Shared/mac/WebEventFactory.mm:
3683         * UIProcess/API/mac/PDFViewController.mm:
3684         * UIProcess/API/mac/PageClientImpl.mm:
3685         * UIProcess/API/mac/WKView.mm:
3686         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
3687         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
3688         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
3689         * UIProcess/Launcher/mac/EnvironmentVariables.h:
3690         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3691         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3692         * UIProcess/WebPageProxy.cpp:
3693         * UIProcess/WebPageProxy.h:
3694         * UIProcess/WebPageProxy.messages.in:
3695         * UIProcess/mac/TextCheckerMac.mm:
3696         * UIProcess/mac/WKFullScreenWindowController.mm:
3697         * UIProcess/mac/WebContextMac.mm:
3698         * UIProcess/mac/WebPageProxyMac.mm:
3699         * WebKit2Prefix.h:
3700         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3701         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
3702         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3703         * WebProcess/WebCoreSupport/WebEditorClient.h:
3704         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3705         * WebProcess/WebPage/WebPage.cpp:
3706         * WebProcess/WebPage/WebPage.h:
3707         * WebProcess/WebPage/WebPage.messages.in:
3708         * WebProcess/WebPage/mac/WebPageMac.mm:
3709         * WebProcess/com.apple.WebProcess.sb.in:
3710         * WebProcess/mac/KeychainItemShimMethods.mm:
3711         * WebProcess/mac/SecItemShimMethods.mm:
3712         * WebProcess/mac/WebProcessMac.mm:
3713         * WebProcess/mac/WebProcessMainMac.mm:
3714         * WebProcess/mac/WebProcessShim.mm:
3715
3716 2012-07-11  Simon Fraser  <simon.fraser@apple.com>
3717
3718         pagesPerView param is misnamed for WKPageSetPageLength()
3719         https://bugs.webkit.org/show_bug.cgi?id=91033
3720
3721         Rubber-stamped by Dan Bernstein.
3722
3723         The name of the second parameter to WKPageSetPageLength(),
3724         'pagesPerView', was confusing; it's a page size (normally width)
3725         in pixels.
3726
3727         * UIProcess/API/C/WKPagePrivate.h:
3728
3729 2012-07-11  Anders Carlsson  <andersca@apple.com>
3730
3731         Add -Wtautological-compare and -Wsign-compare warning flags
3732         https://bugs.webkit.org/show_bug.cgi?id=90994
3733
3734         Reviewed by Mark Rowe.
3735
3736         * Configurations/Base.xcconfig:
3737
3738 2012-07-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3739
3740         [Qt][WK2] Test actual rendering results in API tests
3741         https://bugs.webkit.org/show_bug.cgi?id=80609
3742
3743         Reviewed by Alexis Menard.
3744
3745         Added a very basic test to tst_QQuickWebView to make sure rendering actually occurs.
3746
3747         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3748         (tst_QQuickWebView):
3749         (tst_QQuickWebView::basicRenderingSanity):
3750
3751 2012-07-11  Mark Rowe  <mrowe@apple.com>
3752
3753         Add a Mountain Lion version of libWebKitSystemInterface.a.
3754
3755         Reviewed by John Sullivan.
3756
3757         * Configurations/DebugRelease.xcconfig: Look for the library under its expected name.
3758
3759 2012-07-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3760
3761         [Qt] QRawWebView should notify when rendering is done, so that pixel results can be grabbed at the appropriate moment.
3762         https://bugs.webkit.org/show_bug.cgi?id=90641
3763
3764         Reviewed by Jocelyn Turcotte.
3765
3766         Implement LayerTreeCoordinator::forceRepaint with logic equivalent to the one in
3767         LayerTreeHostCA. If we flush the layers synchronously when forceRepaint is called,when
3768         WKPageForceRepaint returns we are guaranteed to have an up-to-date image, as the visible
3769         tiles are also synchronously updated.
3770
3771         * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
3772         (WebView::WebView):
3773         (WebView::viewNeedsDisplay):
3774         (WebView::frameLoaded):
3775         (WebView):
3776         (WebView::onRepaintDone):
3777         (WebView::finishForceRepaint):
3778         (WebView::finishFirstLayoutForFrame):
3779         (tst_qrawwebview::doNoBackground1):
3780         (tst_qrawwebview::doNoBackground2):
3781         (tst_qrawwebview::doNoBackground3):
3782         (tst_qrawwebview::run):
3783             The test for QRawWebView has been updated to use the WebKit2 ForcePaint API prior to
3784             generating the pixel results. This has exposed a timing bug in the test - setting the
3785             transparentBackground property of a page has to be done before it's created. This has
3786             been fixed in the test.
3787
3788         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
3789         (WebKit::LayerTreeCoordinator::forceRepaint):
3790         (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
3791         (WebKit):
3792
3793 2012-07-11  MORITA Hajime  <morrita@google.com>
3794
3795         WebCoreSupport needs objects each of which follows major WebCore objects
3796         https://bugs.webkit.org/show_bug.cgi?id=88499
3797
3798         Reviewed by Alexey Proskuryakov.
3799
3800         Added exporting symbols.
3801
3802         * win/WebKit2.def:
3803         * win/WebKit2CFLite.def:
3804
3805 2012-07-11  Sheriff Bot  <webkit.review.bot@gmail.com>
3806
3807         Unreviewed, rolling out r122318.
3808         http://trac.webkit.org/changeset/122318
3809         https://bugs.webkit.org/show_bug.cgi?id=90961
3810
3811         It made 11 fast/events/touch fail (Requested by bbandix on
3812         #webkit).
3813
3814         * UIProcess/API/qt/qquickwebview.cpp:
3815         * UIProcess/API/qt/qquickwebview_p.h:
3816
3817 2012-07-11  Keunsoon Lee  <keunsoon.lee@samsung.com>
3818
3819         [EFL][Wk2] WebErrorsEfl.cpp needs to return non-empty errors
3820         https://bugs.webkit.org/show_bug.cgi?id=90688
3821
3822         Reviewed by Hajime Morita.
3823
3824         Return meaningful error for each case.
3825
3826         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
3827         (WebKit::cancelledError): create ResourceError for "request canceled".
3828         (WebKit::blockedError): create ResourceError for "request blocked".
3829         (WebKit::cannotShowURLError): create ResourceError for "cannot show url".
3830         (WebKit::interruptedForPolicyChangeError): create ResourceError for "Frame load interrupted by policy change".
3831         (WebKit::cannotShowMIMETypeError): create ResourceError for "Cannot show mimetype".
3832         (WebKit::fileDoesNotExistError): create ResourceError for "File does not exist".
3833         (WebKit::pluginWillHandleLoadError): create ResourceError for "Plugin will handle load".
3834
3835 2012-07-11  Andras Becsi  <andras.becsi@nokia.com>
3836
3837         [Qt][WK2] Fix wheel scrolling for simple pages
3838         https://bugs.webkit.org/show_bug.cgi?id=90793
3839
3840         Reviewed by Kenneth Rohde Christiansen.
3841
3842         Call WebPage::setFixedLayoutSize in setResizesToContentsUsingLayoutSize
3843         instead of setting the view size manually and scheduling a relayout.
3844         Since setFixedLayoutSize forces a relayout it also updates the scrollbars
3845         after the visible rect is available.
3846         This fixes scrolling with wheel events for a QML WebView loading a simple
3847         local page which previously ended up in a state where scrolling was disabled
3848         because the scrollbar update happened before the correct visible rect size was
3849         available.
3850
3851         Add a QML test and infrastructure to QWebKitTest to cover this case.
3852
3853         * UIProcess/API/qt/qwebkittest.cpp:
3854         (QWebKitTest::wheelEvent):
3855         * UIProcess/API/qt/qwebkittest_p.h:
3856         * UIProcess/API/qt/tests/qmltests/WebView/tst_wheelEventHandling.qml: Added.
3857         * UIProcess/API/qt/tests/qmltests/common/test4.html: Added.
3858         * WebProcess/WebPage/WebPage.cpp:
3859         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
3860
3861 2012-07-11  Andras Becsi  <andras.becsi@nokia.com>
3862
3863         [Qt][WK2] ASSERT: "!m_viewportItem->isMoving()" in QtViewportHandler::flickMoveEnded()
3864         https://bugs.webkit.org/show_bug.cgi?id=90875
3865
3866         Reviewed by Kenneth Rohde Christiansen.
3867
3868         Since MultiPointTouchArea and PinchArea use the childMouseEventFilter
3869         method to filter touch events too, and because Flickable filters child
3870         mouse events the canvas calls this function before propagating the touch
3871         event to the WebView. Since Flickable does not accept touch events the
3872         canvas tries to propagate a synthesized mouse event through the base
3873         class childMouseEventFilter function which is accepted by Flickable and
3874         interferes with the input events we send to Flicakble hence messes up
3875         the internal state of the WebView.
3876         This patch reimplements the virtual childMouseEventFilter method so that all
3877         the mouse and touch events can be processed by WebKit before they arrive to
3878         Flickable.
3879
3880         * UIProcess/API/qt/qquickwebview.cpp:
3881         (QQuickWebView::childMouseEventFilter):
3882         * UIProcess/API/qt/qquickwebview_p.h:
3883
3884 2012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
3885
3886         [WK2][EFL] Add Battery Status Provider
3887         https://bugs.webkit.org/show_bug.cgi?id=90543
3888
3889         Reviewed by Kenneth Rohde Christiansen.
3890
3891         Define a battery status provider for WebKit2 EFL which
3892         relies on WebCore::BatteryProviderEfl.
3893
3894         * CMakeLists.txt: Add WebCore/Modules/battery to include
3895         paths.
3896         * PlatformEfl.cmake: Add BatteryProvider class to CMake.
3897         * UIProcess/API/efl/BatteryProvider.cpp: Added.
3898         (toBatteryProvider):
3899         (startUpdatingCallback):
3900         (stopUpdatingCallback):
3901         (BatteryProvider::~BatteryProvider):
3902         (BatteryProvider::create):
3903         (BatteryProvider::BatteryProvider):
3904         (BatteryProvider::startUpdating):
3905         (BatteryProvider::stopUpdating):
3906         (BatteryProvider::didChangeBatteryStatus):
3907         * UIProcess/API/efl/BatteryProvider.h: Added.
3908         (BatteryProvider):
3909         * UIProcess/API/efl/ewk_context.cpp:
3910         (_Ewk_Context): Add BatteryProvider to Ewk_Context.
3911         (createDefaultEwkContext):
3912         (ewk_context_default_get):
3913
3914 2012-07-10  No'am Rosenthal  <noam.rosenthal@nokia.com>
3915
3916         [Qt] Enable antialiasing for TextureMapper
3917         https://bugs.webkit.org/show_bug.cgi?id=90915
3918
3919         Reviewed by Martin Robinson.
3920
3921         Enable the new antialiasing functionality for WebLayerTreeRendering.
3922         This will make one-tile layers antialiased when using UI_SIDE_COMPOSITING.
3923
3924         * UIProcess/WebLayerTreeRenderer.cpp:
3925         (WebKit::WebLayerTreeRenderer::ensureRootLayer):
3926
3927 2012-07-10  Adam Barth  <abarth@webkit.org>
3928
3929         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
3930         https://bugs.webkit.org/show_bug.cgi?id=90910
3931
3932         Reviewed by Eric Seidel.
3933
3934         * Shared/WebPreferencesStore.h:
3935         (WebKit):
3936         * UIProcess/API/C/WKPreferences.cpp:
3937         (WKPreferencesSetHixie76WebSocketProtocolEnabled):
3938         (WKPreferencesGetHixie76WebSocketProtocolEnabled):
3939         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3940         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3941         * WebProcess/WebPage/WebPage.cpp:
3942         (WebKit::WebPage::updatePreferences):
3943
3944 2012-07-10  Helder Correia  <helder.correia@nokia.com>
3945
3946         [Qt] Repaint counter for accelerated compositing
3947         https://bugs.webkit.org/show_bug.cgi?id=90116
3948
3949         Reviewed by Noam Rosenthal.
3950
3951         No new tests, just introducing a debug feature.
3952
3953         For this feature to be enabled, the environment variable
3954         QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
3955         both repaint counters and tile borders will be painted.
3956
3957         Important notes:
3958         - Only WebKit2 is targetted for now.
3959         - There is no integration with Preferences. That aproach was
3960         taken initially but revealed complex and overkill for such a
3961         debugging-only functionality. Thus, to disable it simply restart with
3962         the environment variable unset or set to some other value.
3963
3964         A Qt-specific drawRepaintCounter() function was added to
3965         TextureMapperGL. A QImage is used as scratch buffer to paint borders and
3966         counters. It is then uploaded to a BitmapTexture acquired from the pool
3967         and finally draw by TextureMapper. The actual compositing happens inside
3968         LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile
3969         now has a repaint counter which gets incremented in
3970         LayerBackingStore::updateTile().
3971
3972         * UIProcess/texmap/LayerBackingStore.cpp:
3973         (WebKit::LayerBackingStore::updateTile):
3974         (WebKit):
3975         (WebKit::shouldShowTileDebugVisuals):
3976         (WebKit::LayerBackingStore::paintToTextureMapper):
3977         * UIProcess/texmap/LayerBackingStore.h:
3978         (WebKit::LayerBackingStoreTile::LayerBackingStoreTile):
3979         (LayerBackingStoreTile):
3980         (WebKit::LayerBackingStoreTile::incrementRepaintCount):
3981         (WebKit::LayerBackingStoreTile::repaintCount):
3982
3983 2012-07-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
3984
3985         [WK2] Add Vibration API support for WebKit2
3986         https://bugs.webkit.org/show_bug.cgi?id=90058
3987
3988         Reviewed by Anders Carlsson.
3989
3990         Add support for Vibration API to WebKit2.
3991
3992         * CMakeLists.txt:
3993         * DerivedSources.pri:
3994         * GNUmakefile.list.am:
3995         * Platform/CoreIPC/MessageID.h:
3996         * Shared/API/c/WKBase.h:
3997         * Shared/APIObject.h:
3998         * Target.pri:
3999         * UIProcess/API/C/WKAPICast.h:
4000         (WebKit):
4001         * UIProcess/API/C/WKVibration.cpp: Added.
4002         (WKVibrationGetTypeID):
4003         (WKVibrationSetProvider):
4004         * UIProcess/API/C/WKVibration.h: Added.
4005         * UIProcess/WebVibrationProvider.cpp: Added.
4006         (WebKit):
4007         (WebKit::WebVibrationProvider::vibrate):
4008         (WebKit::WebVibrationProvider::cancelVibration):
4009         * UIProcess/WebVibrationProvider.h: Added.
4010         (WebKit):
4011         (WebVibrationProvider):
4012         * UIProcess/WebVibrationProxy.cpp: Added.
4013         (WebKit):
4014         (WebKit::WebVibrationProxy::create):
4015         (WebKit::WebVibrationProxy::WebVibrationProxy):
4016         (WebKit::WebVibrationProxy::~WebVibrationProxy):
4017         (WebKit::WebVibrationProxy::invalidate):
4018         (WebKit::WebVibrationProxy::initializeProvider):
4019         (WebKit::WebVibrationProxy::didReceiveMessage):
4020         (WebKit::WebVibrationProxy::vibrate):
4021         (WebKit::WebVibrationProxy::cancelVibration):
4022         * UIProcess/WebVibrationProxy.h: Added.
4023         (CoreIPC):
4024         (WebKit):
4025         (WebVibrationProxy):
4026         (WebKit::WebVibrationProxy::clearContext):
4027         (WebKit::WebVibrationProxy::type):
4028         * UIProcess/WebVibrationProxy.messages.in: Added.
4029         * WebProcess/WebCoreSupport/WebVibrationClient.cpp: Added.
4030         (WebKit):
4031         (WebKit::WebVibrationClient::vibrate):
4032         (WebKit::WebVibrationClient::cancelVibration):
4033         (WebKit::WebVibrationClient::vibrationDestroyed):
4034         * WebProcess/WebCoreSupport/WebVibrationClient.h: Added.
4035         (WebKit):
4036         (WebVibrationClient):
4037         (WebKit::WebVibrationClient::WebVibrationClient):
4038         (WebKit::WebVibrationClient::~WebVibrationClient):
4039
4040 2012-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
4041
4042         [GTK] Add API to clear the cache to WebKit2 GTK+
4043         https://bugs.webkit.org/show_bug.cgi?id=90856
4044
4045         Reviewed by Martin Robinson.
4046
4047         * UIProcess/API/gtk/WebKitWebContext.cpp:
4048         (webkit_web_context_clear_cache): Call
4049         WKResourceCacheManagerClearCacheForAllOrigins() to clear all
4050         resources currently cached.
4051         * UIProcess/API/gtk/WebKitWebContext.h:
4052         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
4053
4054 2012-07-10  Sheriff Bot  <webkit.review.bot@gmail.com>
4055
4056         Unreviewed, rolling out r122178.
4057         http://trac.webkit.org/changeset/122178
4058         https://bugs.webkit.org/show_bug.cgi?id=90857
4059
4060         browser tests, PrerenderBrowserTest.PrerenderFavicon and other
4061         tests, started to fail (Requested by hayato on #webkit).
4062
4063         * win/WebKit2.def:
4064
4065 2012-07-09  Matt Falkenhagen  <falken@chromium.org>
4066
4067         Add ENABLE_DIALOG_ELEMENT and skeleton files
4068         https://bugs.webkit.org/show_bug.cgi?id=90521
4069
4070         Reviewed by Kent Tamura.
4071
4072         * Configurations/FeatureDefines.xcconfig:
4073
4074 2012-07-09  Pete Williamson  <petewil@google.com>
4075
4076         Export the iconURL list to make it available to the Internals class for testing
4077         https://bugs.webkit.org/show_bug.cgi?id=88665
4078
4079         Reviewed by Kent Tamura.
4080
4081         * win/WebKit2.def: export the DocumentL::iconURLs function
4082
4083 2012-07-09  Christophe Dumez  <christophe.dumez@intel.com>
4084
4085         [WK2] Add missing Battery Status API integration to WebContext and WebPage
4086         https://bugs.webkit.org/show_bug.cgi?id=90784
4087
4088         Reviewed by Anders Carlsson.
4089
4090         Integrate Battery Status API to WebPage, WebContext and
4091         properly route messages to the WebBatteryManagerProxy.
4092         Without this, the Battery Status tests are crashing for
4093         WebKit2.
4094
4095         * UIProcess/API/C/WKContext.cpp:
4096         (WKContextGetBatteryManager):
4097         * UIProcess/API/C/WKContext.h:
4098         * UIProcess/WebContext.cpp:
4099         (WebKit::WebContext::WebContext):
4100         (WebKit::WebContext::~WebContext):
4101         (WebKit::WebContext::disconnectProcess):
4102         (WebKit::WebContext::didReceiveMessage):
4103         * UIProcess/WebContext.h:
4104         (WebKit):
4105         (WebContext):
4106         (WebKit::WebContext::batteryManagerProxy):
4107         * UIProcess/WebProcessProxy.cpp:
4108         (WebKit::WebProcessProxy::didReceiveMessage):
4109         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
4110         (WebKit::WebBatteryClient::setController):
4111         (WebKit):
4112         * WebProcess/WebCoreSupport/WebBatteryClient.h:
4113         (WebBatteryClient):
4114         * WebProcess/WebPage/WebPage.cpp:
4115         (WebKit::WebPage::WebPage):
4116
4117 2012-07-09  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
4118
4119         [EFL] [WK2] ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
4120         https://bugs.webkit.org/show_bug.cgi?id=90464
4121
4122         Reviewed by Daniel Bates.
4123
4124         HashMap has the property that 0 is the empty value for integer
4125         keys, so do not use 0 as a key in the HashMap.
4126
4127         * Platform/efl/WorkQueueEfl.cpp:
4128         (WorkQueue::dispatchAfterDelay):
4129
4130 2012-07-09  Carlos Garcia Campos  <cgarcia@igalia.com>
4131
4132         [GTK] Add a setting to enable/disable page cache to WebKit2 GTK+ API
4133         https://bugs.webkit.org/show_bug.cgi?id=90773
4134
4135         Reviewed by Martin Robinson.
4136
4137         * UIProcess/API/gtk/WebKitSettings.cpp:
4138         (webKitSettingsSetProperty):
4139         (webKitSettingsGetProperty):
4140         (webkit_settings_class_init):
4141         (webkit_settings_get_enable_page_cache):
4142         (webkit_settings_set_enable_page_cache):
4143         * UIProcess/API/gtk/WebKitSettings.h:
4144         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
4145         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
4146         (testWebKitSettings):
4147
4148 2012-07-09  Sheriff Bot  <webkit.review.bot@gmail.com>
4149
4150         Unreviewed, rolling out r122107.
4151         http://trac.webkit.org/changeset/122107
4152         https://bugs.webkit.org/show_bug.cgi?id=90794
4153
4154         Build failure on Mac debug bots (Requested by falken_ on
4155         #webkit).
4156
4157         * Configurations/FeatureDefines.xcconfig:
4158
4159 2012-07-09  Carlos Garcia Campos  <cgarcia@igalia.com>
4160
4161         [GTK] Fix inspector detach when inspector was attached by the client
4162         https://bugs.webkit.org/show_bug.cgi?id=90763
4163
4164         Reviewed by Martin Robinson.
4165
4166         When the inspector is detached, we are unconditionally removing it
4167         from the inspected view, but if the inspector was attached by the
4168         client, the parent might be another widget.
4169
4170         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
4171         (WebKit::WebInspectorProxy::platformDetach): Remove the inspector
4172         view from its parent widget.
4173
4174 2012-07-09  Matt Falkenhagen  <falken@chromium.org>
4175
4176         Add ENABLE_DIALOG_ELEMENT and skeleton files
4177         https://bugs.webkit.org/show_bug.cgi?id=90521
4178
4179         Reviewed by Kent Tamura.
4180
4181         * Configurations/FeatureDefines.xcconfig:
4182
4183 2012-07-09  Dan Bernstein  <mitz@apple.com>
4184
4185         Fix the Mac build when codesign_allocate is not installed at /usr/bin.
4186
4187         * PluginProcess/mac/add-entitlements.sh: Let codesign(1) know where the codesign_allocate
4188         tool is by setting the CODESIGN_ALLOCATE environment variable to its path as obtained with
4189         xcrun.
4190
4191 2012-07-06  Christophe Dumez  <christophe.dumez@intel.com>
4192
4193         [WK2] Add support for Network Information API
4194         https://bugs.webkit.org/show_bug.cgi?id=89870
4195
4196         Reviewed by Anders Carlsson.
4197
4198         Add Network Information API support for WebKit2.
4199
4200         * CMakeLists.txt:
4201         * DerivedSources.pri:
4202         * GNUmakefile.am:
4203         * GNUmakefile.list.am:
4204         * Platform/CoreIPC/MessageID.h:
4205         * Shared/API/c/WKBase.h:
4206         * Shared/APIObject.h:
4207         * Shared/WebNetworkInfo.cpp: Added.
4208         (WebKit):
4209         (WebKit::WebNetworkInfo::WebNetworkInfo):
4210         (WebKit::WebNetworkInfo::~WebNetworkInfo):
4211         (WebKit::WebNetworkInfo::Data::encode):
4212         (WebKit::WebNetworkInfo::Data::decode):
4213         * Shared/WebNetworkInfo.h: Added.
4214         (WebKit):
4215         (WebNetworkInfo):
4216         (Data):
4217         (WebKit::WebNetworkInfo::create):
4218         (WebKit::WebNetworkInfo::bandwidth):
4219         (WebKit::WebNetworkInfo::metered):
4220         (WebKit::WebNetworkInfo::data):
4221         (WebKit::WebNetworkInfo::type):
4222         * Target.pri:
4223         * UIProcess/API/C/WKAPICast.h:
4224         (WebKit):
4225         * UIProcess/API/C/WKNetworkInfoManager.cpp: Added.
4226         (WKNetworkInfoManagerGetTypeID):
4227         * UIProcess/API/C/WKNetworkInfoManager.h: Added.
4228         * UIProcess/WebNetworkInfoManagerProxy.cpp: Added.
4229         (WebKit):
4230         (WebKit::WebNetworkInfoManagerProxy::create):
4231         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy):
4232         (WebKit::WebNetworkInfoManagerProxy::~WebNetworkInfoManagerProxy):
4233         (WebKit::WebNetworkInfoManagerProxy::invalidate):
4234         (WebKit::WebNetworkInfoManagerProxy::initializeProvider):
4235         (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation):
4236         (WebKit::WebNetworkInfoManagerProxy::didReceiveMessage):
4237         (WebKit::WebNetworkInfoManagerProxy::startUpdating):
4238         (WebKit::WebNetworkInfoManagerProxy::stopUpdating):
4239         (WebKit::WebNetworkInfoManagerProxy::getBandwidth):
4240         (WebKit::WebNetworkInfoManagerProxy::isMetered):
4241         * UIProcess/WebNetworkInfoManagerProxy.h: Added.
4242         (CoreIPC):
4243         (WebKit):
4244         (WebNetworkInfoManagerProxy):
4245         (WebKit::WebNetworkInfoManagerProxy::clearContext):
4246         (WebKit::WebNetworkInfoManagerProxy::type):
4247         * UIProcess/WebNetworkInfoManagerProxy.messages.in: Added.
4248         * UIProcess/WebNetworkInfoProvider.cpp: Added.
4249         (WebKit):
4250         (WebKit::WebNetworkInfoProvider::startUpdating):
4251         (WebKit::WebNetworkInfoProvider::stopUpdating):
4252         (WebKit::WebNetworkInfoProvider::bandwidth):
4253         (WebKit::WebNetworkInfoProvider::metered):
4254         * UIProcess/WebNetworkInfoProvider.h: Added.
4255         (WebKit):
4256         (WebNetworkInfoProvider):
4257         * WebKit2.pri:
4258         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Added.
4259         (WebKit):
4260         (WebKit::WebNetworkInfoManager::WebNetworkInfoManager):
4261         (WebKit::WebNetworkInfoManager::~WebNetworkInfoManager):
4262         (WebKit::WebNetworkInfoManager::didReceiveMessage):
4263         (WebKit::WebNetworkInfoManager::registerWebPage):
4264         (WebKit::WebNetworkInfoManager::unregisterWebPage):
4265         (WebKit::WebNetworkInfoManager::bandwidth):
4266         (WebKit::WebNetworkInfoManager::metered):
4267         (WebKit::WebNetworkInfoManager::didChangeNetworkInformation):
4268         * WebProcess/NetworkInfo/WebNetworkInfoManager.h: Added.
4269         (CoreIPC):
4270         (WebKit):
4271         (WebNetworkInfoManager):
4272         * WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Added.
4273         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Added.
4274         (WebKit):
4275         (WebKit::WebNetworkInfoClient::~WebNetworkInfoClient):
4276         (WebKit::WebNetworkInfoClient::bandwidth):
4277         (WebKit::WebNetworkInfoClient::metered):
4278         (WebKit::WebNetworkInfoClient::startUpdating):
4279         (WebKit::WebNetworkInfoClient::stopUpdating):
4280         * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Added.
4281         (WebKit):
4282         (WebNetworkInfoClient):
4283         (WebKit::WebNetworkInfoClient::WebNetworkInfoClient):
4284         * WebProcess/WebProcess.cpp:
4285         (WebKit::WebProcess::WebProcess):
4286         (WebKit::WebProcess::didReceiveMessage):
4287         * WebProcess/WebProcess.h:
4288         (WebProcess):
4289         (WebKit::WebProcess::networkInfoManager):
4290
4291 2012-07-06  Jessie Berlin  <jberlin@apple.com>
4292
4293         WKContext should ask for its injected bundle initialization user data when it needs it so the
4294         client doesn't have to keep it up to date.
4295         https://bugs.webkit.org/show_bug.cgi?id=90627
4296
4297         Reviewed by Anders Carlsson.
4298
4299         Add a getInjectedBundleInitializationUserData callback to WKContextInjectedBundleClient.
4300
4301         * Shared/APIClientTraits.cpp:
4302         Allow the WKContextInjectedBundleClient API to be versioned.
4303         * Shared/APIClientTraits.h:
4304
4305         * UIProcess/API/C/WKContext.h:
4306         Add the callback and bump the version of WKContextInjectedBundleClient.
4307
4308         * UIProcess/WebContext.cpp:
4309         (WebKit::WebContext::ensureWebProcess):
4310         Prefer any user data returned when the callback is invoked over that set with
4311         WKContextSetInitializationUserDataForInjectedBundle.
4312
4313         * UIProcess/WebContextInjectedBundleClient.cpp:
4314         (WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
4315         Invoke the callback if the client has registered for it.
4316         * UIProcess/WebContextInjectedBundleClient.h:
4317
4318 2012-07-06  Jessie Berlin  <jberlin@apple.com>
4319
4320         WebContext::injectedBundleInitializationUserData() is unused, should be removed
4321         https://bugs.webkit.org/show_bug.cgi?id=90486
4322
4323         Reviewed by Anders Carlsson.
4324
4325         * UIProcess/WebContext.h:
4326         Remove it.
4327
4328 2012-07-06  Carlos Garcia Campos  <cgarcia@igalia.com>
4329
4330         [GTK] Add site specific quirks setting to WebKit2 GTK+ API
4331         https://bugs.webkit.org/show_bug.cgi?id=90663
4332
4333         Reviewed by Martin Robinson.
4334
4335         * UIProcess/API/gtk/WebKitSettings.cpp:
4336         (webKitSettingsSetProperty):
4337         (webKitSettingsGetProperty):
4338         (webkit_settings_class_init):
4339         (webkit_settings_get_enable_site_specific_quirks):
4340         (webkit_settings_set_enable_site_specific_quirks):
4341         * UIProcess/API/gtk/WebKitSettings.h:
4342         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
4343         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
4344         (testWebKitSettings):
4345
4346 2012-07-06  Dominik Röttsches  <dominik.rottsches@intel.com>
4347
4348         ProcessLauncher's WorkQueue's name is too long on Windows
4349         https://bugs.webkit.org/show_bug.cgi?id=44041
4350
4351         Reviewed by Andreas Kling.
4352
4353         Shorten thread name for process launcher so that we can silence the warning
4354         for thread names getting truncated under VisualStudio -
4355         see createThread() in  Threading.cpp.
4356
4357         * UIProcess/Launcher/ProcessLauncher.cpp:
4358         (WebKit::processLauncherWorkQueue):
4359
4360 2012-07-06  Christophe Dumez  <christophe.dumez@intel.com>
4361
4362         [EFL] WebKit-EFL headers do not build with gcc < 4.6
4363         https://bugs.webkit.org/show_bug.cgi?id=90681
4364
4365         Unreviewed EFL build fix.
4366
4367         Remove several forward declarations from ewk_view
4368         header to avoid typedef redefinitions which are
4369         illegal in C.
4370
4371         * UIProcess/API/efl/ewk_view.h:
4372
4373 2012-07-06  Csaba Osztrogonác  <ossy@webkit.org>
4374
4375         [Qt] Buildfix for newer Qt5
4376         https://bugs.webkit.org/show_bug.cgi?id=90519
4377
4378         Reviewed by Tor Arne Vestbø.
4379
4380         * UIProcess/API/qt/qwebkittest.cpp: Include qpa/qwindowsysteminterface.h instead of deprecated qwindowsysteminterface_qpa.h.
4381
4382 2012-07-06  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
4383
4384         [Qt] Adjust to changed generation of master include file
4385
4386         The responsiblity for creating the master include was moved out of syncqt.
4387         @ignore_for_master_contents still stays, as syncqt (ab-)uses this for
4388         determining whether a header is private.
4389
4390         https://bugs.webkit.org/show_bug.cgi?id=90461
4391
4392         Reviewed by Tor Arne Vestbø.
4393
4394         * UIProcess/API/qt/tests/bytearraytestdata.h:
4395         * UIProcess/API/qt/tests/testwindow.h:
4396
4397 2012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
4398
4399         [WK2][EFL] Ewk_View needs to report load status changes
4400         https://bugs.webkit.org/show_bug.cgi?id=90566
4401
4402         Reviewed by Kenneth Rohde Christiansen.
4403
4404         Add new "load,finished", "load,provisional,failed",
4405         "load,provisional,redirect" and "load,provisional,started"
4406         signals on the Ewk_View to notify the client of different
4407         load state changes.
4408
4409         * UIProcess/API/efl/ewk_view.cpp:
4410         (ewk_view_load_finished):
4411         (ewk_view_load_provisional_failed):
4412         (ewk_view_load_provisional_redirect):
4413         (ewk_view_load_provisional_started):
4414         * UIProcess/API/efl/ewk_view.h:
4415         * UIProcess/API/efl/ewk_view_loader_client.cpp:
4416         (didFinishLoadForFrame):
4417         (didFailLoadWithErrorForFrame):
4418         (didStartProvisionalLoadForFrame):
4419         (didReceiveServerRedirectForProvisionalLoadForFrame):
4420         (didFailProvisionalLoadWithErrorForFrame):
4421         (ewk_view_loader_client_attach):
4422         * UIProcess/API/efl/ewk_view_private.h:
4423
4424 2012-07-05  Luiz Agostini  <luiz.agostini@nokia.com>
4425
4426         [Qt] Transform should be applied to the clip rect in QRawWebView::paint
4427         https://bugs.webkit.org/show_bug.cgi?id=90652
4428
4429         Reviewed by Kenneth Rohde Christiansen.
4430
4431         Applying the transformation matrix to the clip rect in QRawWebView::paint.
4432
4433         * UIProcess/API/qt/raw/qrawwebview.cpp:
4434         (QRawWebView::paint):
4435
4436 2012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
4437
4438         [WK2][EFL] Ewk_View should provide API to set/get device pixel ratio
4439         https://bugs.webkit.org/show_bug.cgi?id=90590
4440
4441         Reviewed by Kenneth Rohde Christiansen.
4442
4443         Add API to Ewk_View so retrieve and set the device
4444         pixel ratio.
4445
4446         * UIProcess/API/efl/ewk_view.cpp:
4447         (ewk_view_device_pixel_ratio_set):
4448         (ewk_view_device_pixel_ratio_get):
4449         * UIProcess/API/efl/ewk_view.h:
4450
4451 2012-07-05  Anders Carlsson  <andersca@apple.com>
4452
4453         Type-ahead doesn't work in options inside optgroups
4454         https://bugs.webkit.org/show_bug.cgi?id=90647
4455         <rdar://problem/5604894>
4456
4457         Reviewed by Dan Bernstein.
4458
4459         Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace.
4460
4461         * UIProcess/mac/WebPopupMenuProxyMac.mm:
4462         (WebKit::WebPopupMenuProxyMac::populate):
4463
4464 2012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
4465
4466         [WK2] Add C API for Battery Status API
4467         https://bugs.webkit.org/show_bug.cgi?id=90545
4468
4469         Reviewed by Anders Carlsson.
4470
4471         Add C API for WKBatteryManager and WKBatteryStatus
4472         so that clients can support the Battery Status API
4473         in WebKit2.
4474
4475         * CMakeLists.txt:
4476         * GNUmakefile.list.am:
4477         * Target.pri:
4478         * UIProcess/API/C/WKBatteryManager.cpp:
4479         (WKBatteryManagerProviderDidChangeBatteryStatus):
4480         (WKBatteryManagerProviderUpdateBatteryStatus):
4481         * UIProcess/API/C/WKBatteryStatus.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKBatteryManager.cpp.
4482         (WKBatteryStatusGetTypeID):
4483         (WKBatteryStatusCreate):
4484         * UIProcess/API/C/WKBatteryStatus.h: Copied from Source/WebKit2/UIProcess/API/C/WKBatteryManager.cpp.
4485
4486 2012-07-05  Sheriff Bot  <webkit.review.bot@gmail.com>
4487
4488         Unreviewed, rolling out r121899.
4489         http://trac.webkit.org/changeset/121899
4490         https://bugs.webkit.org/show_bug.cgi?id=90623
4491
4492         Unauthorized WK2 API breakage (Requested by andersca on
4493         #webkit).
4494
4495         * Shared/API/c/WKSharedAPICast.h:
4496         (WebKit::toCopiedURLAPI):
4497
4498 2012-07-05  Balazs Kelemen  <kbalazs@webkit.org>
4499
4500         [Qt] WTR crashes if a URL is passed as a parameter
4501         https://bugs.webkit.org/show_bug.cgi?id=88093
4502
4503         Reviewed by Zoltan Herczeg.
4504
4505         * Shared/API/c/WKSharedAPICast.h:
4506         (WebKit::toCopiedURLAPI):
4507         Don't special case null string. It's handled
4508         fine by WebURL and passing 0 is not suitable
4509         to the API.
4510
4511 2012-07-05  Dongwoo Im  <dw.im@samsung.com>
4512
4513         [EFL] Enable the CUSTOM_SCHEME_HANDLER feature as default.
4514         https://bugs.webkit.org/show_bug.cgi?id=88608
4515
4516         Reviewed by Hajime Morita.
4517
4518         * WebProcess/WebCoreSupport/WebChromeClient.h:
4519         (WebKit::WebChromeClient::isProtocolHandlerRegistered): Add a stub function.
4520         (WebKit::WebChromeClient::unregisterProtocolHandler): Add a stub function.
4521         (WebChromeClient):
4522
4523 2012-07-05  Ryuan Choi  <ryuan.choi@samsung.com>
4524
4525         [Wk2][EFL] EFL needs a WebKitTestRunner
4526         https://bugs.webkit.org/show_bug.cgi?id=87659
4527
4528         Reviewed by Kenneth Rohde Christiansen.
4529
4530         * PlatformEfl.cmake: Added WKImageCairo.cpp in source list.
4531
4532 2012-07-05  Hyerim Bae  <hyerim.bae@samsung.com>
4533
4534         [EFL][WK2] Add ewk_view_reload_bypass_cache API.
4535         https://bugs.webkit.org/show_bug.cgi?id=89413
4536
4537         Reviewed by Kenneth Rohde Christiansen.
4538
4539         Add API, which is for reloading documents without cache.
4540
4541         * UIProcess/API/efl/ewk_view.cpp:
4542         (ewk_view_reload_bypass_cache):
4543         * UIProcess/API/efl/ewk_view.h:
4544
4545 2012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
4546
4547         [WK2][EFL] Ewk_View needs API to load HTML data
4548         https://bugs.webkit.org/show_bug.cgi?id=90540
4549
4550         Reviewed by Kenneth Rohde Christiansen.
4551
4552         Add method to Ewk_View to load provided HTML data.
4553         This is used for e.g. when an URL cannot be reached
4554         and we need to display an error page.
4555
4556         * UIProcess/API/efl/ewk_view.cpp:
4557         (ewk_view_html_load):
4558         * UIProcess/API/efl/ewk_view.h:
4559
4560 2012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
4561
4562         [WK2][EFL] Ewk_View needs to report new resource requests
4563         https://bugs.webkit.org/show_bug.cgi?id=90577
4564
4565         Reviewed by Kenneth Rohde Christiansen.
4566
4567         Add new "resource,request,new" signal to Ewk_View to
4568         notify clients of the resource requests being initiated.
4569         New Ewk_Url_Request and Ewk_Web_Resource types are
4570         introduced in order to provide the clients with the
4571         needed information regarding the resource requests.
4572
4573         * PlatformEfl.cmake:
4574         * UIProcess/API/efl/EWebKit2.h:
4575         * UIProcess/API/efl/ewk_url_request.cpp: Added.
4576         (_Ewk_Url_Request):
4577         (ewk_url_request_ref):
4578         (ewk_url_request_unref):
4579         (ewk_url_request_url_get):
4580         (ewk_request_first_party_get):
4581         (ewk_url_request_http_method_get):
4582         (ewk_url_request_new):
4583         * UIProcess/API/efl/ewk_url_request.h: Added.
4584         * UIProcess/API/efl/ewk_url_request_private.h: Added.
4585         * UIProcess/API/efl/ewk_view.cpp:
4586         (ewk_view_base_add):
4587         (ewk_view_resource_load_initiated):
4588         * UIProcess/API/efl/ewk_view.h:
4589         * UIProcess/API/efl/ewk_view_private.h:
4590         * UIProcess/API/efl/ewk_view_resource_load_client.cpp: Added.
4591         (didInitiateLoadForResource):
4592         (ewk_view_resource_load_client_attach):
4593         * UIProcess/API/efl/ewk_view_resource_load_client_private.h: Added.
4594         * UIProcess/API/efl/ewk_web_resource.cpp: Added.
4595         (_Ewk_Web_Resource):
4596         (ewk_web_resource_ref):
4597         (ewk_web_resource_unref):
4598         (ewk_web_resource_uri_get):
4599         (ewk_web_resource_new):
4600         (ewk_web_resource_main_get):
4601         * UIProcess/API/efl/ewk_web_resource.h: Added.
4602         * UIProcess/API/efl/ewk_web_resource_private.h: Added.
4603
4604 2012-07-04  John Mellor  <johnme@chromium.org>
4605
4606         Text Autosizing: Add compile flag and runtime setting
4607         https://bugs.webkit.org/show_bug.cgi?id=87394
4608
4609         This patch renames Font Boosting to Text Autosizing.
4610
4611         Reviewed by Adam Barth.
4612
4613         * Configurations/FeatureDefines.xcconfig:
4614
4615 2012-07-04  Christophe Dumez  <christophe.dumez@intel.com>
4616
4617         [EFL][WK2] Ewk_View should report load errors
4618         https://bugs.webkit.org/show_bug.cgi?id=90479
4619
4620         Reviewed by Kenneth Rohde Christiansen.
4621
4622         The Ewk_View now emits a "load,error" signal when the
4623         main frame fails loading. Information about the error
4624         is provided via the new Ewk_Web_Error type.
4625
4626         * PlatformEfl.cmake:
4627         * UIProcess/API/efl/EWebKit2.h:
4628         * UIProcess/API/efl/ewk_view.cpp:
4629         (ewk_view_load_error):
4630         * UIProcess/API/efl/ewk_view.h:
4631         * UIProcess/API/efl/ewk_view_loader_client.cpp:
4632         (didFailLoadWithErrorForFrame):
4633         (ewk_view_loader_client_attach):
4634         * UIProcess/API/efl/ewk_view_private.h:
4635         * UIProcess/API/efl/ewk_web_error.cpp: Added.
4636         (_Ewk_Web_Error):
4637         (ewk_web_error_free):
4638         (ewk_web_error_domain_get):
4639         (ewk_web_error_url_get):
4640         (ewk_web_error_code_get):
4641         (ewk_web_error_description_get):
4642         (ewk_web_error_cancellation_get):
4643         (ewk_web_error_new):
4644         * UIProcess/API/efl/ewk_web_error.h: Added.
4645         * UIProcess/API/efl/ewk_web_error_private.h: Added.
4646
4647 2012-07-03  Christophe Dumez  <christophe.dumez@intel.com>
4648
4649         [WK2][EFL] Ewk_View should report the load progress
4650         https://bugs.webkit.org/show_bug.cgi?id=90457
4651
4652         Reviewed by Kenneth Rohde Christiansen.
4653
4654         The Ewk_View now reports the estimated load progress
4655         of the page via the new "load,progress".
4656         A method is also added to Ewk_View in order to
4657         retrieve the current load progress.
4658
4659         * UIProcess/API/efl/ewk_view.cpp:
4660         (ewk_view_load_progress_get):
4661         (ewk_view_load_progress_changed):
4662         * UIProcess/API/efl/ewk_view.h:
4663         * UIProcess/API/efl/ewk_view_loader_client.cpp:
4664         (didChangeProgress):
4665         (ewk_view_loader_client_attach):
4666         * UIProcess/API/efl/ewk_view_private.h:
4667
4668 2012-07-03  Christophe Dumez  <christophe.dumez@intel.com>
4669
4670         [WK2] Add support for Battery Status API
4671         https://bugs.webkit.org/show_bug.cgi?id=89558
4672
4673         Reviewed by Anders Carlsson.
4674
4675         Add support for Battery Status API to WebKit2.
4676
4677         * CMakeLists.txt:
4678         * DerivedSources.pri:
4679         * GNUmakefile.am:
4680         * GNUmakefile.list.am:
4681         * Platform/CoreIPC/MessageID.h:
4682         * Shared/API/c/WKBase.h:
4683         * Shared/APIObject.h:
4684         * Shared/WebBatteryStatus.cpp: Added.
4685         (WebKit):
4686         (WebKit::WebBatteryStatus::WebBatteryStatus):
4687         (WebKit::WebBatteryStatus::~WebBatteryStatus):
4688         (WebKit::WebBatteryStatus::Data::encode):
4689         (WebKit::WebBatteryStatus::Data::decode):
4690         * Shared/WebBatteryStatus.h: Added.
4691         (WebKit):
4692         (WebBatteryStatus):
4693         (Data):
4694         (WebKit::WebBatteryStatus::create):
4695         (WebKit::WebBatteryStatus::isCharging):
4696         (WebKit::WebBatteryStatus::chargingTime):
4697         (WebKit::WebBatteryStatus::dischargingTime):
4698         (WebKit::WebBatteryStatus::level):
4699         (WebKit::WebBatteryStatus::data):
4700         (WebKit::WebBatteryStatus::type):
4701         * Target.pri:
4702         * UIProcess/API/C/WKAPICast.h:
4703         (WebKit):
4704         * UIProcess/API/C/WKBatteryManager.cpp: Added.
4705         (WKBatteryManagerGetTypeID):
4706         * UIProcess/API/C/WKBatteryManager.h: Added.
4707         * UIProcess/WebBatteryManagerProxy.cpp: Added.
4708         (WebKit):
4709         (WebKit::WebBatteryManagerProxy::create):
4710         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
4711         (WebKit::WebBatteryManagerProxy::~WebBatteryManagerProxy):
4712         (WebKit::WebBatteryManagerProxy::invalidate):
4713         (WebKit::WebBatteryManagerProxy::initializeProvider):
4714         (WebKit::WebBatteryManagerProxy::didReceiveMessage):
4715         (WebKit::WebBatteryManagerProxy::startUpdating):
4716         (WebKit::WebBatteryManagerProxy::stopUpdating):
4717         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus):
4718         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus):
4719         * UIProcess/WebBatteryManagerProxy.h: Added.
4720         (CoreIPC):
4721         (WebKit):
4722         (WebBatteryManagerProxy):
4723         (WebKit::WebBatteryManagerProxy::clearContext):
4724         (WebKit::WebBatteryManagerProxy::type):
4725         * UIProcess/WebBatteryManagerProxy.messages.in: Added.
4726         * UIProcess/WebBatteryProvider.cpp: Added.
4727         (WebKit):
4728         (WebKit::WebBatteryProvider::startUpdating):
4729         (WebKit::WebBatteryProvider::stopUpdating):
4730         * UIProcess/WebBatteryProvider.h: Added.
4731         (WebKit):
4732         (WebBatteryProvider):
4733         * WebKit2.pri:
4734         * WebProcess/Battery/WebBatteryManager.cpp: Added.
4735         (WebKit):
4736         (WebKit::WebBatteryManager::WebBatteryManager):
4737         (WebKit::WebBatteryManager::~WebBatteryManager):
4738         (WebKit::WebBatteryManager::didReceiveMessage):
4739         (WebKit::WebBatteryManager::registerWebPage):
4740         (WebKit::WebBatteryManager::unregisterWebPage):
4741         (WebKit::WebBatteryManager::didChangeBatteryStatus):
4742         (WebKit::WebBatteryManager::updateBatteryStatus):
4743         * WebProcess/Battery/WebBatteryManager.h: Added.
4744         (CoreIPC):
4745         (WebKit):
4746         (WebBatteryManager):
4747         * WebProcess/Battery/WebBatteryManager.messages.in: Added.
4748         * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Added.
4749         (WebKit):
4750         (WebKit::WebBatteryClient::startUpdating):
4751         (WebKit::WebBatteryClient::stopUpdating):
4752         (WebKit::WebBatteryClient::batteryControllerDestroyed):
4753         * WebProcess/WebCoreSupport/WebBatteryClient.h: Added.
4754         (WebKit):
4755         (WebBatteryClient):
4756         (WebKit::WebBatteryClient::WebBatteryClient):
4757         (WebKit::WebBatteryClient::~WebBatteryClient):
4758         * WebProcess/WebProcess.cpp:
4759         (WebKit::WebProcess::WebProcess):
4760         (WebKit::WebProcess::didReceiveMessage):
4761         * WebProcess/WebProcess.h:
4762         (WebProcess):
4763         (WebKit::WebProcess::batteryManager):
4764
4765 2012-07-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
4766
4767         [Qt] Make use of .qmake.cache for caching features
4768
4769         Instead of loading() features from the files that need them (and re-running
4770         a bunch of checks), we now run feature detection as part of configure.pro,
4771         and have build-webkit write the computed feature-defines and CONFIG to
4772         .qmake.cache, which is then loaded by qmake _before_ even defaults_pre
4773         when building WebKit.pro.
4774
4775         At some point we'll be able to selectivly prevent running of config tests
4776         in configure.pro, which means we don't need a separate code-path for
4777         the build-webkit --help case.
4778
4779         We should also move the code in build-webkit that now uses .webkit.config
4780         to detect clean builds, to use .qmake.cache, since we now store the same
4781         thing there.
4782
4783         Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
4784
4785         Reviewed by Tor Arne Vestbø.
4786
4787         * DerivedSources.pri:
4788         * Target.pri:
4789
4790 2012-07-03  Sheriff Bot  <webkit.review.bot@gmail.com>
4791
4792         Unreviewed, rolling out r121766.
4793         http://trac.webkit.org/changeset/121766
4794         https://bugs.webkit.org/show_bug.cgi?id=90465
4795
4796         It caused flakey build errors on the bots (Requested by Ossy
4797         on #webkit).
4798
4799         * DerivedSources.pri:
4800         * Target.pri:
4801
4802 2012-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4803
4804         [GTK] Add WebKitWebView::context-menu-dismissed signal to WebKit2 GTK+ API
4805         https://bugs.webkit.org/show_bug.cgi?id=90386
4806
4807         Reviewed by Martin Robinson.
4808
4809         * UIProcess/API/gtk/WebKitWebView.cpp:
4810         (webkit_web_view_class_init): Add context-menu-dismissed signal.
4811         (contextMenuDismissed): Emit context-menu-dismissed signal.
4812         (webkitWebViewPopulateContextMenu): Connect to deactivate signal
4813         of the GtkMenu and emit WebKitWebView::context-menu-dismissed when
4814         the gtk menu is deactivated.
4815         * UIProcess/API/gtk/WebKitWebView.h:
4816         (_WebKitWebViewClass): Add virtual methos for
4817         context-menu-dismissed signal.
4818         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
4819         (testContextMenuDismissed):
4820         (beforeAll):
4821         * UIProcess/gtk/WebContextMenuProxyGtk.h:
4822         (WebKit::WebContextMenuProxyGtk::gtkMenu): Get the GtkMenu built
4823         for the context menu proxy.
4824
4825 2012-07-03  Piotr Roguski  <p.roguski@samsung.com>
4826
4827         [EFL][WK2] Added missing WebPageProxy::ViewIsFocused flag to WebPageProxy::viewStateDidChange()
4828         call in _ewk_view_smart_focus_out() function.
4829         https://bugs.webkit.org/show_bug.cgi?id=89877
4830
4831         Reviewed by Andreas Kling.
4832
4833         Although name of the flag suggest it should be used only on focus in,
4834         omitting it in case of focus out will prevent WebPageProxy::viewStateDidChange()
4835         from sending Messages::WebPage::SetFocused(false).
4836
4837         * UIProcess/API/efl/ewk_view.cpp:
4838         (_ewk_view_smart_focus_out):
4839
4840 2012-07-03  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
4841
4842         [Qt][WK2] API tests randomly asserts in QQuickWebPage::setContentsScale(qreal)
4843         https://bugs.webkit.org/show_bug.cgi?id=88679
4844
4845         Reviewed by Csaba Osztrogonác.
4846
4847         Viewport parameters cannot be calculated while viewport is not visible and 
4848         viewport size is 0, so let's delay calculation of viewport parameters until view 
4849         becomes visible.
4850
4851         * UIProcess/qt/QtViewportHandler.cpp:
4852         (WebKit::QtViewportHandler::pageContentsSizeChanged):
4853
4854 2012-07-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
4855
4856         [Qt] Make use of .qmake.cache for caching features
4857
4858         Instead of loading() features from the files that need them (and re-running
4859         a bunch of checks), we now run feature detection as part of configure.pro,
4860         and have build-webkit write the computed feature-defines and CONFIG to
4861         .qmake.cache, which is then loaded by qmake _before_ even defaults_pre
4862         when building WebKit.pro.
4863
4864         At some point we'll be able to selectivly prevent running of config tests
4865         in configure.pro, which means we don't need a separate code-path for
4866         the build-webkit --help case.
4867
4868         We should also move the code in build-webkit that now uses .webkit.config
4869         to detect clean builds, to use .qmake.cache, since we now store the same
4870         thing there.
4871
4872         Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
4873
4874         Reviewed by Tor Arne Vestbø.
4875
4876         * DerivedSources.pri:
4877         * Target.pri:
4878
4879 2012-07-03  Alexis Menard  <alexis.menard@openbossa.org>
4880
4881         [Qt] When calling accept() on the FilePickerContextObject with an empty list, early return and call reject().
4882         https://bugs.webkit.org/show_bug.cgi?id=89755
4883
4884         Reviewed by Simon Hausmann.
4885
4886         When calling accept with an empty list of files we can just bailout
4887         and call reject(). Any other processing is pointless.
4888
4889        * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml:
4890        * UIProcess/qt/QtDialogRunner.cpp:
4891         (WebKit::FilePickerContextObject::accept):
4892
4893 2012-07-03  Balazs Kelemen  <kbalazs@webkit.org>
4894
4895         [Qt][WK2] fast/viewport/viewport-91.html still fails after r121555 and r121661
4896         https://bugs.webkit.org/show_bug.cgi?id=90376
4897
4898         Reviewed by Csaba Osztrogonác.
4899
4900         layoutTestController.dumpConfigurationForViewport still need
4901         to use the constant target DPI of 160.
4902         * WebProcess/WebPage/WebPage.cpp:
4903         (WebKit::WebPage::viewportConfigurationAsText):
4904
4905 2012-07-03  Christophe Dumez  <christophe.dumez@intel.com>
4906
4907         [EFL][WK2] Add API to deliver a Web Intent to a frame
4908         https://bugs.webkit.org/show_bug.cgi?id=90067
4909
4910         Reviewed by Kenneth Rohde Christiansen.
4911
4912         Add ewk_view_intent_deliver() method on the Ewk_View
4913         to deliver a Web Intent to the view's main frame.
4914
4915         * UIProcess/API/efl/ewk_view.cpp:
4916         (ewk_view_intent_deliver):
4917         * UIProcess/API/efl/ewk_view.h:
4918
4919 2012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
4920
4921         [EFL][WK2] Add API to inspect a Web Intent service
4922         https://bugs.webkit.org/show_bug.cgi?id=90066
4923
4924         Reviewed by Kenneth Rohde Christiansen.
4925
4926         Add EFL API to inspect a Web Intent Service and emit
4927         a signal on the view when a new intent service
4928         registers.
4929
4930         * PlatformEfl.cmake:
4931         * UIProcess/API/efl/EWebKit2.h:
4932         * UIProcess/API/efl/ewk_intent_service.cpp: Added.
4933         (_Ewk_Intent_Service):
4934         (ewk_intent_service_ref):
4935         (ewk_intent_service_unref):
4936         (ewk_intent_service_action_get):
4937         (ewk_intent_service_type_get):
4938         (ewk_intent_service_href_get):
4939         (ewk_intent_service_title_get):
4940         (ewk_intent_service_disposition_get):
4941         (ewk_intent_service_new):
4942         * UIProcess/API/efl/ewk_intent_service.h: Added.
4943         * UIProcess/API/efl/ewk_intent_service_private.h: Copied from Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp.
4944         * UIProcess/API/efl/ewk_view.cpp:
4945         (ewk_view_intent_service_register):
4946         * UIProcess/API/efl/ewk_view.h:
4947         * UIProcess/API/efl/ewk_view_loader_client.cpp:
4948         (registerIntentServiceForFrame):
4949         (ewk_view_loader_client_attach):
4950         * UIProcess/API/efl/ewk_view_private.h:
4951
4952 2012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
4953
4954         [WK2][EFL] Free Ewk_Intent calloc'd memory with free() instead of delete
4955         https://bugs.webkit.org/show_bug.cgi?id=90433
4956
4957         Reviewed by Kenneth Rohde Christiansen.
4958
4959         Free calloc'd memory with free() instead of delete in Ewk_Intent.
4960         Add blank lines before return statements for consistency.
4961
4962         * UIProcess/API/efl/ewk_intent.cpp:
4963         (ewk_intent_unref):
4964         (ewk_intent_action_get):
4965         (ewk_intent_type_get):
4966         (ewk_intent_service_get):
4967         (ewk_intent_suggestions_get):
4968         (ewk_intent_extra_get):
4969         (ewk_intent_extra_names_get):
4970         (ewk_intent_new):
4971
4972 2012-07-02  Martin Robinson  <mrobinson@igalia.com>
4973
4974         [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing
4975         https://bugs.webkit.org/show_bug.cgi?id=90308
4976
4977         Reviewed by Noam Rosenthal.
4978
4979         * UIProcess/texmap/LayerBackingStore.cpp:
4980         (WebKit::LayerBackingStore::paintToTextureMapper): Update the method to call paint with
4981         the new argument.
4982
4983 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
4984
4985         Do not do any logging initialization when logging is disabled
4986         https://bugs.webkit.org/show_bug.cgi?id=90228
4987
4988         Reviewed by Simon Fraser.
4989
4990         * Platform/Logging.cpp:
4991         * Platform/Logging.h:
4992         * UIProcess/WebContext.cpp:
4993         (WebKit::WebContext::WebContext):
4994         * WebProcess/WebProcess.cpp:
4995         (WebKit::WebProcess::WebProcess):
4996
4997 2012-07-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
4998
4999         [Qt][WK2] New API tests introduced in r121620 fail
5000         https://bugs.webkit.org/show_bug.cgi?id=90372
5001
5002         Reviewed by Luiz Agostini.
5003
5004         Updated the pixel comparison to produce more predictable results.
5005
5006         * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
5007         (compareImages):
5008
5009 2012-07-02  Alexis Menard  <alexis.menard@openbossa.org>
5010
5011         [Qt] Fix WebProcess crash on Mac when accessing a site with video tag.
5012         https://bugs.webkit.org/show_bug.cgi?id=90384
5013
5014         Reviewed by Jocelyn Turcotte.
5015
5016         We need to initialize the private symbols used by MediaPlayerPrivateQTKit
5017         otherwise they will be null and it will lead to a crash. We copy WebSystemInterface
5018         files for WK2 just like the Mac port as WK2 may have different needs than WK1 layer (we
5019         may add or remove symbols in here). It doesn't fix the video rendering yet but it's
5020         first step.
5021
5022         * Target.pri:
5023         * WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Added.
5024         * WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Added.
5025         (InitWebCoreSystemInterfaceForWK2):
5026         * WebProcess/qt/WebProcessMainQt.cpp:
5027         (WebKit::WebProcessMainQt):
5028
5029 2012-07-02  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
5030
5031         [EFL] [WK2] Remove content sniffer and decoder initialization from WebProcess
5032         https://bugs.webkit.org/show_bug.cgi?id=90275
5033
5034         Reviewed by Martin Robinson.
5035
5036         Do not initialize content sniffer and decoder in the WebProcess
5037         because the initialization is now done in WebCore.
5038
5039         * WebProcess/efl/WebProcessMainEfl.cpp:
5040         (WebKit::WebProcessMainEfl):
5041
5042 2012-07-02  Sheriff Bot  <webkit.review.bot@gmail.com>
5043
5044         Unreviewed, rolling out r120329, r121113, and r121138.
5045         http://trac.webkit.org/changeset/120329
5046         http://trac.webkit.org/changeset/121113
5047         http://trac.webkit.org/changeset/121138
5048         https://bugs.webkit.org/show_bug.cgi?id=90368
5049
5050         Introduced noticeable keyboard-related spins due to
5051         synchronous IPC. (Requested by kling on #webkit).
5052
5053         * UIProcess/WebPageProxy.cpp:
5054         (WebKit::WebPageProxy::handleKeyboardEvent):
5055         (WebKit::WebPageProxy::didReceiveEvent):
5056         * UIProcess/WebPageProxy.h:
5057         (WebPageProxy):
5058         * UIProcess/WebPageProxy.messages.in:
5059         * WebProcess/WebPage/WebPage.cpp:
5060         (WebKit::WebPage::keyEvent):
5061
5062 2012-07-01  Christophe Dumez  <christophe.dumez@intel.com>
5063
5064         [EFL][WK2] Add API to inspect a Web Intent
5065         https://bugs.webkit.org/show_bug.cgi?id=89749
5066
5067         Reviewed by Kenneth Rohde Christiansen.
5068
5069         Add EFL API to inspect a Web Intent and emit a signal
5070         on the view when a new intent request is made.
5071
5072         * PlatformEfl.cmake:
5073         * UIProcess/API/efl/EWebKit2.h:
5074         * UIProcess/API/efl/ewk_intent.cpp: Added.
5075         (_Ewk_Intent):
5076         (ewk_intent_ref):
5077         (ewk_intent_unref):
5078         (ewk_intent_action_get):
5079         (ewk_intent_type_get):
5080         (ewk_intent_service_get):
5081         (ewk_intent_suggestions_get):
5082         (ewk_intent_extra_get):
5083         (ewk_intent_extra_names_get):
5084         (ewk_intent_new):
5085         * UIProcess/API/efl/ewk_intent.h: Added.
5086         * UIProcess/API/efl/ewk_intent_private.h: Copied from Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp.
5087         * UIProcess/API/efl/ewk_view.cpp:
5088         (ewk_view_intent_request_new):
5089         * UIProcess/API/efl/ewk_view.h:
5090         * UIProcess/API/efl/ewk_view_loader_client.cpp:
5091         (didReceiveIntentForFrame):
5092         (ewk_view_loader_client_attach):
5093         * UIProcess/API/efl/ewk_view_private.h:
5094
5095 2012-06-29  Luiz Agostini  <luiz.agostini@nokia.com>
5096
5097         [Qt][WK2] Private non-QtQuick API
5098         https://bugs.webkit.org/show_bug.cgi?id=84532
5099
5100         Reviewed by Noam Rosenthal.
5101
5102         Adding new private non-QtQuick API. This new C++ API makes it possible
5103         to have control over the lower levels of WebKit without going via QML.
5104
5105         This is a first version of the API, enough to show pages on the screen.
5106         Many features are not implemented.
5107
5108         * Target.pri:
5109         * UIProcess/API/qt/raw/qrawwebview.cpp: Added.
5110         * UIProcess/API/qt/raw/qrawwebview_p.h: Added.
5111         * UIProcess/API/qt/raw/qrawwebview_p_p.h: Added.
5112
5113         The tests for the new API are pixel tests. They use QRawWebView to load
5114         html files and generate images, and them compare those images to the ones
5115         in UIProcess/API/qt/tests/html/resources.
5116
5117         * UIProcess/API/qt/tests/html/bluesquare.html: Added.
5118         * UIProcess/API/qt/tests/html/redsquare.html: Added.
5119         * UIProcess/API/qt/tests/html/resources/qwkview_noBackground1.png: Added.
5120         * UIProcess/API/qt/tests/html/resources/qwkview_noBackground3.png: Added.
5121         * UIProcess/API/qt/tests/html/resources/qwkview_paint.png: Added.
5122         * UIProcess/API/qt/tests/qrawwebview/qrawwebview.pro: Added.
5123         * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: Added.
5124
5125 2012-06-29  Christophe Dumez  <christophe.dumez@intel.com>
5126
5127         [WK2] Move intent delivery code from the frame to the page
5128         https://bugs.webkit.org/show_bug.cgi?id=89974
5129
5130         Reviewed by Anders Carlsson.
5131
5132         Move the intent delivery code from the frame to the page
5133         and add the corresponding C API for WKPage.
5134
5135         * UIProcess/API/C/WKPage.cpp:
5136         (WKPageDeliverIntentToFrame):
5137         * UIProcess/API/C/WKPage.h:
5138         * UIProcess/WebFrameProxy.cpp:
5139         (WebKit::WebFrameProxy::stopLoading):
5140         * UIProcess/WebFrameProxy.h:
5141         (WebKit):
5142         * UIProcess/WebPageProxy.cpp:
5143         (WebKit):
5144         (WebKit::WebPageProxy::deliverIntentToFrame):
5145         * UIProcess/WebPageProxy.h:
5146         (WebPageProxy):
5147
5148 2012-06-29  Dan Bernstein  <mitz@apple.com>
5149
5150         Can’t get basic element info from a WKRenderObject
5151         https://bugs.webkit.org/show_bug.cgi?id=90301
5152
5153         Reviewed by Anders Carlsson.
5154
5155         Moved the element info (tag name, id and class names) from WebRenderLayer to WebRenderObject,
5156         and gave WebRenderLayer a reference to a (shallow) WebRenderObject. Added WKRenderObject API
5157         for getting element info, while leaving the WKRenderLayer API in place for now for Safari.
5158
5159         * Shared/API/c/WKRenderLayer.cpp:
5160         (WKRenderLayerGetRenderer): Added this wrapper.
5161         (WKRenderLayerCopyRendererName): Changed to get the name from the renderer.
5162         (WKRenderLayerCopyElementTagName): Changed to go through the renderer.
5163         (WKRenderLayerCopyElementID): Ditto.
5164         (WKRenderLayerGetElementClassNames): Ditto.
5165         * Shared/API/c/WKRenderLayer.h: Added declaration of WKRenderLayerGetRenderer() and comments
5166         about removing older API.
5167         * Shared/API/c/WKRenderObject.cpp:
5168         (WKRenderObjectCopyElementTagName): Added this wrapper.
5169         (WKRenderObjectCopyElementID): Ditto.
5170         (WKRenderObjectGetElementClassNames): Ditto.
5171         * Shared/API/c/WKRenderObject.h:
5172         * Shared/UserMessageCoders.h:
5173         (WebKit::UserMessageEncoder::baseEncode): Removed the element info from the encoding of
5174         WebRenderLayer, and added the renderer. Added the element info to the encoding of
5175         WebRenderObject.
5176         (WebKit::UserMessageDecoder::baseDecode): Updated to match the encoding changes.
5177         * Shared/WebRenderLayer.cpp:
5178         (WebKit::WebRenderLayer::WebRenderLayer): Changed to initialize the m_renderer member
5179         variable with a WebRenderObject for the layer’s renderer, and removed the initialization of
5180         the element-related member variables that were removed.
5181         * Shared/WebRenderLayer.h:
5182         (WebKit::WebRenderLayer::create): Changed to take a renderer instead of renderer and element
5183         info.
5184         (WebKit::WebRenderLayer::renderer): Added this getter.
5185         (WebKit::WebRenderLayer::WebRenderLayer): Changed to take a renderer instead of renderer and
5186         element info.
5187         * Shared/WebRenderObject.cpp:
5188         (WebKit::WebRenderObject::create): Changed to pass true for the shouldIncludeDescendants
5189         parameter.
5190         (WebKit::WebRenderObject::WebRenderObject): Added a shouldIncludeDescdendants boolean
5191         parameter. When it is false, the m_children array remains null. Added initialization of
5192         member variables with the element’s tag name, id and class list.
5193         * Shared/WebRenderObject.h:
5194         (WebKit::WebRenderObject::create): Added an overload that takes a RenderObject and creates
5195         a shallow WebRenderObject.
5196         (WebRenderObject): Changed to take element tag name, id and class list.
5197         (WebKit::WebRenderObject::elementTagName): Added this getter.
5198         (WebKit::WebRenderObject::elementID): Ditto.
5199         (WebKit::WebRenderObject::elementClassNames): Ditto.
5200         (WebKit::WebRenderObject::WebRenderObject): 
5201
5202 2012-06-29  Tony Chang  <tony@chromium.org>
5203
5204         Unreviewed, rolling out r121572.
5205         http://trac.webkit.org/changeset/121572
5206         https://bugs.webkit.org/show_bug.cgi?id=90249
5207
5208         Breaks Mac build since it depends on r121547, which was rolled
5209         out
5210
5211         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
5212         (WebKit::NPN_GetValue):
5213         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
5214         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
5215         * WebProcess/WebCoreSupport/WebEditorClient.h:
5216
5217 2012-06-29  Eric Seidel  <eric@webkit.org>
5218
5219         Remove BUILDING_ON_LEOPARD now that no ports build on Leopard
5220         https://bugs.webkit.org/show_bug.cgi?id=90249
5221
5222         Reviewed by Ryosuke Niwa.
5223
5224         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
5225         (WebKit::NPN_GetValue):
5226         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
5227         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
5228         * WebProcess/WebCoreSupport/WebEditorClient.h:
5229
5230 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
5231
5232         Don't hardcode target dpi of 160 (it should be 96 on desktop)
5233         https://bugs.webkit.org/show_bug.cgi?id=88114
5234
5235         Reviewed by Adam Barth.
5236
5237         Updated the call to computeViewportAttributes.
5238
5239         * WebProcess/WebPage/WebPage.cpp:
5240         (WebKit::WebPage::sendViewportAttributesChanged):
5241         (WebKit::WebPage::viewportConfigurationAsText):
5242
5243 2012-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
5244
5245         Unreviewed, rolling out r121529.
5246         http://trac.webkit.org/changeset/121529
5247         https://bugs.webkit.org/show_bug.cgi?id=90260
5248
5249         Failed to compile on Chromium WebKitMacBuilder (Requested by
5250         keishi on #webkit).
5251
5252         * UIProcess/mac/WKFullScreenWindowController.mm:
5253         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
5254         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]):
5255         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
5256         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
5257         (InitWebCoreSystemInterface):
5258
5259 2012-06-29  Eric Seidel  <eric@webkit.org>
5260
5261         Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard
5262         https://bugs.webkit.org/show_bug.cgi?id=90252
5263
5264         Reviewed by Ryosuke Niwa.
5265
5266         * UIProcess/mac/WKFullScreenWindowController.mm:
5267         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
5268         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]):
5269         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
5270         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
5271         (InitWebCoreSystemInterface):
5272
5273 2012-06-28  MORITA Hajime  <morrita@google.com>
5274
5275         [Refactoring] NodeRenderingContext ctor could be built on top of the ComposedShadowTreeWalker
5276         https://bugs.webkit.org/show_bug.cgi?id=89732
5277
5278         Reviewed by Dimitri Glazkov.
5279
5280         * win/WebKit2.def:
5281         * win/WebKit2CFLite.def:
5282
5283 2012-06-28  John Sullivan  <sullivan@apple.com>
5284
5285         <https://bugs.webkit.org/show_bug.cgi?id=90216>
5286         <rdar://problem/11766518>
5287         Undo handling in WebKit2 is not robust against some page-closing code paths
5288
5289         Reviewed by Enrica Casucci.
5290
5291         * UIProcess/API/mac/PageClientImpl.h:
5292         Declared public function viewWillMoveToAnotherWindow().
5293         
5294         * UIProcess/API/mac/PageClientImpl.mm:
5295         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
5296         New function, calls clearAllEditCommands() to remove any Undo actions from the stack.
5297         This guarantees that no Undo actions will be abandoned when the PageClientImpl is dealloc'ed.
5298
5299         * UIProcess/API/mac/WKView.mm:
5300         (-[WKView viewWillMoveToWindow:]):
5301         Now informs PageClientImpl via new function PageClientImpl::viewWillMoveToAnotherWindow().
5302
5303 2012-06-28  Christophe Dumez  <christophe.dumez@intel.com>
5304
5305         [WK2] Add C API to inspect a Web Intent service
5306         https://bugs.webkit.org/show_bug.cgi?id=89276
5307
5308         Reviewed by Anders Carlsson.
5309
5310         Add C API for Web intent service so that it can be queried
5311         on client side.
5312
5313         * CMakeLists.txt:
5314         * GNUmakefile.list.am:
5315         * Target.pri:
5316         * UIProcess/API/C/WKIntentServiceInfo.cpp: Added.
5317         (WKIntentServiceInfoGetTypeID):
5318         (WKIntentServiceInfoCopyAction):
5319         (WKIntentServiceInfoCopyType):
5320         (WKIntentServiceInfoCopyHref):
5321         (WKIntentServiceInfoCopyTitle):
5322         (WKIntentServiceInfoCopyDisposition):
5323         * UIProcess/API/C/WKIntentServiceInfo.h: Added.
5324
5325 2012-06-28  Balazs Kelemen  <kbalazs@webkit.org>
5326
5327         [Qt] KURL assert at fast/loader/opaque-base-url.html
5328         https://bugs.webkit.org/show_bug.cgi?id=89468
5329
5330         Reviewed by Simon Hausmann.
5331
5332         Don't use the KURL(ParsedURLStringTag, const String&) constructor.
5333         We cannot be sure that the url in encode was valid and even if it
5334         was the message could have been corrupted.
5335         * Shared/qt/WebCoreArgumentCodersQt.cpp:
5336         (CoreIPC::::encode):
5337         (CoreIPC::::decode):
5338
5339 2012-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
5340
5341         Unreviewed. Fix the build without TEXTURE_MAPPER_GL.
5342
5343         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
5344         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
5345         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
5346         (WebKit::WebPage::platformInitialize):
5347
5348 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
5349
5350         JSLock should be per-JSGlobalData
5351         https://bugs.webkit.org/show_bug.cgi?id=89123
5352
5353         Reviewed by Geoffrey Garen.
5354
5355         Changed all sites that used JSLock to instead use the new JSLockHolder
5356         and pass in the correct JS context that the code is about to interact with that 
5357         needs protection. Also added a couple JSLocks to places that didn't already 
5358         have it that needed it.
5359
5360         * Shared/mac/WebMemorySampler.mac.mm:
5361         (WebKit::WebMemorySampler::sampleWebKit):
5362         * WebProcess/InjectedBundle/InjectedBundle.cpp:
5363         (WebKit::InjectedBundle::javaScriptObjectsCount):
5364         (WebKit::InjectedBundle::reportException):
5365         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
5366         (WebKit::JSNPObject::callMethod):
5367         (WebKit::JSNPObject::callObject):
5368         (WebKit::JSNPObject::callConstructor):
5369         (WebKit::JSNPObject::put):
5370         (WebKit::JSNPObject::deleteProperty):
5371         (WebKit::JSNPObject::getOwnPropertyNames):
5372         (WebKit::JSNPObject::propertyGetter):
5373         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
5374         (WebKit::NPJSObject::hasMethod):
5375         (WebKit::NPJSObject::invoke):
5376         (WebKit::NPJSObject::invokeDefault):
5377         (WebKit::NPJSObject::hasProperty):
5378         (WebKit::NPJSObject::getProperty):
5379         (WebKit::NPJSObject::setProperty):
5380         (WebKit::NPJSObject::removeProperty):
5381         (WebKit::NPJSObject::enumerate):
5382         (WebKit::NPJSObject::construct):
5383         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
5384         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
5385         (WebKit::NPRuntimeObjectMap::evaluate):
5386         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
5387         * WebProcess/WebPage/WebFrame.cpp:
5388         (WebKit::WebFrame::jsWrapperForWorld):
5389         (WebKit::WebFrame::computedStyleIncludingVisitedInfo):
5390         * WebProcess/WebPage/WebPage.cpp:
5391         (WebKit::WebPage::runJavaScriptInMainFrame):
5392         * WebProcess/WebProcess.cpp:
5393         (WebKit::WebProcess::getWebCoreStatistics):
5394
5395 2012-06-27  Thiago Marcos P. Santos  <thiago.santos@intel.com>
5396
5397         REGRESSION(r121135): It made qmltests::WebViewColorChooser::test_accept() fail
5398         https://bugs.webkit.org/show_bug.cgi?id=89871
5399
5400         Reviewed by Simon Hausmann.
5401
5402         Added proper event synchronization to the test case.
5403
5404         * UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml:
5405
5406 2012-06-27  Brady Eidson  <beidson@apple.com>
5407
5408         https://bugs.webkit.org/show_bug.cgi?id=87513
5409         WebBackForwardList needs an overhaul to consistently and clearly handle error conditions.
5410
5411         Reviewed by Darin Adler.
5412
5413         - We think a null entry might somehow be getting in the list so we now try to prevent that.
5414         - We think a null entry might somehow be in the list so we now null check when indexing into m_entries.
5415         - A lot of index math - especially tracking "no current index" - was implicit or wrong.
5416         - Operating on a WebBackForwardList whose page has been closed is now an explicit no-op.
5417         - The session state data reading and writing code was fragile and needed an overhaul.
5418         - This includes adding a new V1 format of the session data that is easier to validate when reading back in.
5419
5420         * UIProcess/WebBackForwardList.cpp:
5421         (WebKit::WebBackForwardList::~WebBackForwardList):
5422         (WebKit::WebBackForwardList::pageClosed):
5423         (WebKit::WebBackForwardList::addItem):
5424         (WebKit::WebBackForwardList::goToItem):
5425         (WebKit::WebBackForwardList::backListCount):
5426         (WebKit::WebBackForwardList::forwardListCount):
5427         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
5428         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
5429         (WebKit::WebBackForwardList::clear):
5430
5431         * UIProcess/WebBackForwardList.h:
5432         (WebBackForwardList):
5433
5434         * UIProcess/cf/WebBackForwardListCF.cpp:
5435         (WebKit::createEmptySessionHistoryDictionary):
5436         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
5437         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
5438         (WebKit::WebBackForwardList::restoreFromV0CFDictionaryRepresentation):
5439         (WebKit::WebBackForwardList::restoreFromV1CFDictionaryRepresentation):
5440         (WebKit::extractBackForwardListEntriesFromArray):
5441
5442 2012-06-27  Zan Dobersek  <zandobersek@gmail.com>
5443
5444         [Gtk] Add support for the Gamepad API
5445         https://bugs.webkit.org/show_bug.cgi?id=87503
5446
5447         Reviewed by Carlos Garcia Campos.
5448
5449         Add the Gamepad feature dependencies libraries to the LIBADD
5450         list for the libwebkitgtk2 library.
5451
5452         * GNUmakefile.am:
5453
5454 2012-06-26  Simon Hausmann  <simon.hausmann@nokia.com>
5455
5456         [Qt] Avoid use of deprecated Qt API
5457
5458         Reviewed by Tor Arne Vestbø.
5459
5460         QGuiApplication::inputPanel() has been deprecated in favour of
5461         inputMethod().
5462
5463         * UIProcess/qt/QtWebPageEventHandler.cpp:
5464         (WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
5465         (WebKit::QtWebPageEventHandler::~QtWebPageEventHandler):
5466         (WebKit::setInputPanelVisible):
5467         (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
5468         (WebKit::QtWebPageEventHandler::updateTextInputState):
5469
5470 2012-06-26  Christophe Dumez  <christophe.dumez@intel.com>
5471
5472         [WK2][GTK] Uninitialized variable in TextCheckerGtk.cpp
5473         https://bugs.webkit.org/show_bug.cgi?id=89948
5474
5475         Reviewed by Martin Robinson.
5476
5477         Properly initialize didInitializeState in
5478         TextChecker::state().
5479
5480         * UIProcess/gtk/TextCheckerGtk.cpp:
5481         (WebKit::TextChecker::state):
5482
5483 2012-06-25  Simon Hausmann  <simon.hausmann@nokia.com>
5484
5485         [Qt] Make it possible to build WebKit without QtWidgets
5486         https://bugs.webkit.org/show_bug.cgi?id=78109
5487
5488         Reviewed by Tor Arne Vestbø.
5489
5490         * WebKit2.pri: Add missing WK2 specific dependencies.
5491         * qt/MainQt.cpp: Do the QStyle initialization hook only if we are
5492         compiling with QtWidgets support.
5493         (WebKit):
5494         (main):
5495
5496 2012-06-25  Raphael Kubo da Costa  <rakuco@webkit.org>
5497
5498         [EFL][WK2] Include unistd.h in PlatformProcessIdentifier.h.
5499         https://bugs.webkit.org/show_bug.cgi?id=89804
5500
5501         Reviewed by Hajime Morita.
5502
5503         The pid_t typedef ends up coming from stdlib.h (indirectly via WTF
5504         includes) on Mac and Linux, even though that is not mandated by
5505         POSIX and breaks other platforms (such as FreeBSD). Fix that by
5506         explicitly including unistd.h, which is where the typedef is
5507         supposed to come from.
5508
5509         * Platform/PlatformProcessIdentifier.h:
5510
5511 2012-06-25  YoungTaeck Song  <youngtaeck.song@samsung.com>
5512
5513         [WK2][Qt][EFL] Extract common code from LayerTreeHostQt
5514         https://bugs.webkit.org/show_bug.cgi?id=89837
5515
5516         Reviewed by Noam Rosenthal.
5517
5518         Extract common code from LayerTreeHostQt to be used by both Qt and Efl.
5519         I renamed LayerTreeHost to LayerTreeCoordinator, and these are moved under WebProcess/WebPage/LayerTreeCoordinator.
5520         I Modified LayerTreeHostProxy to LayerTreeCoordinatorProxy too, Because LayerTreeHostProxy and LayerTreeHost were pair.
5521         Also WebGraphicsLayer moved under that directory.
5522
5523         * CMakeLists.txt:
5524         * DerivedSources.pri:
5525         * GNUmakefile.list.am:
5526         * Platform/CoreIPC/MessageID.h:
5527         * Target.pri:
5528         * UIProcess/API/qt/qquickwebpage.cpp:
5529         (QQuickWebPagePrivate::paint):
5530         (QQuickWebPage::updatePaintNode):
5531         (QQuickWebPagePrivate::updateSize):
5532         * UIProcess/DrawingAreaProxy.cpp:
5533         (WebKit::DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage):
5534         * UIProcess/DrawingAreaProxy.h:
5535         (WebKit):
5536         (WebKit::DrawingAreaProxy::layerTreeCoordinatorProxy):
5537         (DrawingAreaProxy):
5538         * UIProcess/DrawingAreaProxyImpl.cpp:
5539         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
5540         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
5541         (WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeCoordinatorProxyMessage):
5542         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
5543         * UIProcess/DrawingAreaProxyImpl.h:
5544         (WebKit):
5545         (DrawingAreaProxyImpl):
5546         * UIProcess/LayerTreeCoordinatorProxy.cpp: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp.
5547         (WebKit):
5548         (WebKit::LayerTreeCoordinatorProxy::LayerTreeCoordinatorProxy):
5549         (WebKit::LayerTreeCoordinatorProxy::~LayerTreeCoordinatorProxy):
5550         (WebKit::LayerTreeCoordinatorProxy::updateViewport):
5551         (WebKit::LayerTreeCoordinatorProxy::dispatchUpdate):
5552         (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
5553         (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
5554         (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
5555         (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
5556         (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
5557         (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState):
5558         (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren):
5559         (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters):
5560         (WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
5561         (WebKit::LayerTreeCoordinatorProxy::createDirectlyCompositedImage):
5562         (WebKit::LayerTreeCoordinatorProxy::destroyDirectlyCompositedImage):
5563         (WebKit::LayerTreeCoordinatorProxy::setContentsSize):
5564         (WebKit::LayerTreeCoordinatorProxy::setVisibleContentsRect):
5565         (WebKit::LayerTreeCoordinatorProxy::renderNextFrame):
5566         (WebKit::LayerTreeCoordinatorProxy::didChangeScrollPosition):
5567         (WebKit::LayerTreeCoordinatorProxy::syncCanvas):
5568         (WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
5569         * UIProcess/LayerTreeCoordinatorProxy.h: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
5570         (WebKit):
5571         (LayerTreeCoordinatorProxy):
5572         (WebKit::LayerTreeCoordinatorProxy::layerTreeRenderer):
5573         * UIProcess/LayerTreeCoordinatorProxy.messages.in: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.messages.in.
5574         * UIProcess/WebLayerTreeRenderer.cpp:
5575         (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
5576         (WebKit::WebLayerTreeRenderer::updateViewport):
5577         (WebKit::WebLayerTreeRenderer::renderNextFrame):
5578         (WebKit::WebLayerTreeRenderer::purgeBackingStores):
5579         (WebKit::WebLayerTreeRenderer::detach):
5580         * UIProcess/WebLayerTreeRenderer.h:
5581         (WebKit):
5582         (WebLayerTreeRenderer):
5583         * UIProcess/WebPageProxy.cpp:
5584         (WebKit::WebPageProxy::didReceiveMessage):
5585         * WebKit2.pri:
5586         * WebProcess/WebPage/DrawingArea.h:
5587         (DrawingArea):
5588         * WebProcess/WebPage/DrawingAreaImpl.cpp:
5589         (WebKit::DrawingAreaImpl::didReceiveLayerTreeCoordinatorMessage):
5590         * WebProcess/WebPage/DrawingAreaImpl.h:
5591         (DrawingAreaImpl):
5592         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp.
5593         (WebKit):
5594         (WebKit::LayerTreeCoordinator::create):
5595         (WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
5596         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
5597         (WebKit::LayerTreeCoordinator::setLayerFlushSchedulingEnabled):
5598         (WebKit::LayerTreeCoordinator::scheduleLayerFlush):
5599         (WebKit::LayerTreeCoordinator::cancelPendingLayerFlush):
5600         (WebKit::LayerTreeCoordinator::setShouldNotifyAfterNextScheduledLayerFlush):
5601         (WebKit::LayerTreeCoordinator::setRootCompositingLayer):
5602         (WebKit::LayerTreeCoordinator::invalidate):
5603         (WebKit::LayerTreeCoordinator::setNonCompositedContentsNeedDisplay):
5604         (WebKit::LayerTreeCoordinator::scrollNonCompositedContents):
5605         (WebKit::LayerTreeCoordinator::forceRepaint):
5606         (WebKit::LayerTreeCoordinator::sizeDidChange):
5607         (WebKit::LayerTreeCoordinator::didInstallPageOverlay):
5608         (WebKit::LayerTreeCoordinator::didUninstallPageOverlay):
5609         (WebKit::LayerTreeCoordinator::setPageOverlayNeedsDisplay):
5610         (WebKit::LayerTreeCoordinator::setPageOverlayOpacity):
5611         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
5612         (WebKit::LayerTreeCoordinator::syncLayerState):
5613         (WebKit::LayerTreeCoordinator::syncLayerChildren):
5614         (WebKit::LayerTreeCoordinator::syncCanvas):
5615         (WebKit::LayerTreeCoordinator::syncLayerFilters):
5616         (WebKit::LayerTreeCoordinator::attachLayer):
5617         (WebKit::LayerTreeCoordinator::detachLayer):
5618         (WebKit::updateOffsetFromViewportForSelf):
5619         (WebKit::updateOffsetFromViewportForLayer):
5620         (WebKit::LayerTreeCoordinator::syncFixedLayers):
5621         (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
5622         (WebKit::LayerTreeCoordinator::layerFlushTimerFired):
5623         (WebKit::LayerTreeCoordinator::createPageOverlayLayer):
5624         (WebKit::LayerTreeCoordinator::destroyPageOverlayLayer):
5625         (WebKit::LayerTreeCoordinator::adoptImageBackingStore):
5626         (WebKit::LayerTreeCoordinator::releaseImageBackingStore):
5627         (WebKit::LayerTreeCoordinator::notifyAnimationStarted):
5628         (WebKit::LayerTreeCoordinator::notifySyncRequired):
5629         (WebKit::LayerTreeCoordinator::paintContents):
5630         (WebKit::LayerTreeCoordinator::showDebugBorders):
5631         (WebKit::LayerTreeCoordinator::showRepaintCounter):
5632         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
5633         (WebKit::LayerTreeCoordinator::createTile):
5634         (WebKit::LayerTreeCoordinator::updateTile):
5635         (WebKit::LayerTreeCoordinator::removeTile):
5636         (WebKit::LayerTreeCoordinator::visibleContentsRect):
5637         (WebKit::LayerTreeCoordinator::setVisibleContentsRect):
5638         (WebKit::LayerTreeCoordinator::renderNextFrame):
5639         (WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
5640         (WebKit::LayerTreeCoordinator::purgeBackingStores):
5641         (WebKit::LayerTreeCoordinator::beginContentUpdate):
5642         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h.
5643         (WebKit):
5644         (LayerTreeCoordinator):
5645         (WebKit::LayerTreeCoordinator::layerTreeContext):
5646         (WebKit::LayerTreeCoordinator::pageOverlayShouldApplyFadeWhenPainting):
5647         (WebKit::LayerTreeCoordinator::pauseRendering):
5648         (WebKit::LayerTreeCoordinator::resumeRendering):
5649         (WebKit::LayerTreeCoordinator::deviceScaleFactorDidChange):
5650         * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.messages.in: Renamed from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in.
5651         * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp.
5652         (WebCore):
5653         (WebCore::layerByIDMap):
5654         (WebCore::WebGraphicsLayer::layerByID):
5655         (WebCore::toWebLayerID):
5656         (WebCore::WebGraphicsLayer::didChangeLayerState):
5657         (WebCore::WebGraphicsLayer::didChangeChildren):
5658         (WebCore::WebGraphicsLayer::didChangeFilters):
5659         (WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect):
5660         (WebCore::WebGraphicsLayer::didChangeGeometry):
5661         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
5662         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
5663         (WebCore::WebGraphicsLayer::willBeDestroyed):
5664         (WebCore::WebGraphicsLayer::setChildren):
5665         (WebCore::WebGraphicsLayer::addChild):
5666         (WebCore::WebGraphicsLayer::addChildAtIndex):
5667         (WebCore::WebGraphicsLayer::addChildAbove):
5668         (WebCore::WebGraphicsLayer::addChildBelow):
5669         (WebCore::WebGraphicsLayer::replaceChild):
5670         (WebCore::WebGraphicsLayer::removeFromParent):
5671         (WebCore::WebGraphicsLayer::setPosition):
5672         (WebCore::WebGraphicsLayer::setAnchorPoint):
5673         (WebCore::WebGraphicsLayer::setSize):
5674         (WebCore::WebGraphicsLayer::setTransform):
5675         (WebCore::WebGraphicsLayer::setChildrenTransform):
5676         (WebCore::WebGraphicsLayer::setPreserves3D):
5677         (WebCore::WebGraphicsLayer::setMasksToBounds):
5678         (WebCore::WebGraphicsLayer::setDrawsContent):
5679         (WebCore::WebGraphicsLayer::setContentsOpaque):
5680         (WebCore::WebGraphicsLayer::setBackfaceVisibility):
5681         (WebCore::WebGraphicsLayer::setOpacity):
5682         (WebCore::WebGraphicsLayer::setContentsRect):
5683         (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
5684         (WebCore::WebGraphicsLayer::setContentsToCanvas):
5685         (WebCore::WebGraphicsLayer::setFilters):
5686         (WebCore::WebGraphicsLayer::setContentsToImage):
5687         (WebCore::WebGraphicsLayer::setMaskLayer):
5688         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
5689         (WebCore::WebGraphicsLayer::setNeedsDisplay):
5690         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
5691         (WebCore::WebGraphicsLayer::id):
5692         (WebCore::WebGraphicsLayer::syncCompositingState):
5693         (WebCore::toWebGraphicsLayer):
5694         (WebCore::WebGraphicsLayer::syncChildren):
5695         (WebCore::WebGraphicsLayer::syncFilters):
5696         (WebCore::WebGraphicsLayer::syncLayerState):
5697         (WebCore::WebGraphicsLayer::syncCanvas):
5698         (WebCore::WebGraphicsLayer::ensureImageBackingStore):
5699         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
5700         (WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
5701         (WebCore::WebGraphicsLayer::setRootLayer):
5702         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
5703         (WebCore::WebGraphicsLayer::setContentsScale):
5704         (WebCore::WebGraphicsLayer::effectiveContentsScale):
5705         (WebCore::WebGraphicsLayer::adjustContentsScale):
5706         (WebCore::WebGraphicsLayer::createBackingStore):
5707         (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
5708         (WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
5709         (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
5710         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
5711         (WebCore::WebGraphicsLayer::shouldUseTiledBackingStore):
5712         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
5713         (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
5714         (WebCore::WebGraphicsLayer::beginContentUpdate):
5715         (WebCore::WebGraphicsLayer::createTile):
5716         (WebCore::WebGraphicsLayer::updateTile):
5717         (WebCore::WebGraphicsLayer::removeTile):
5718         (WebCore::WebGraphicsLayer::updateContentBuffers):
5719         (WebCore::WebGraphicsLayer::purgeBackingStores):
5720         (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
5721         (WebCore::WebGraphicsLayer::adjustVisibleRect):
5722         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
5723         (WebCore::createWebGraphicsLayer):
5724         (WebCore::WebGraphicsLayer::initFactory):
5725         (WebCore::WebGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
5726         * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h.
5727         (WebCore):
5728         (WebKit):
5729         (WebGraphicsLayerClient):
5730         (WebGraphicsLayer):
5731         (WebCore::WebGraphicsLayer::image):
5732         (WebCore::WebGraphicsLayer::fixedToViewport):
5733         (WebCore::WebGraphicsLayer::setFixedToViewport):
5734         (WebCore::WebGraphicsLayer::maskTarget):
5735         (WebCore::WebGraphicsLayer::setMaskTarget):
5736         * WebProcess/WebPage/LayerTreeHost.cpp:
5737         (WebKit::LayerTreeHost::create):
5738         * WebProcess/WebPage/LayerTreeHost.h:
5739         (LayerTreeHost):
5740         * WebProcess/WebPage/WebPage.cpp:
5741         (WebKit::WebPage::didReceiveMessage):
5742
5743 2012-06-25  Anders Carlsson  <andersca@apple.com>
5744
5745         [Lion WK2] fast/loader/reload-zero-byte-plugin.html hits assert
5746         https://bugs.webkit.org/show_bug.cgi?id=89611
5747         <rdar://problem/11714023>
5748
5749         Reviewed by Sam Weinig.
5750
5751         Make sure to send the response along to the plug-in in the case where the stream was empty.
5752
5753         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
5754         (WebKit::WebFrameLoaderClient::finishedLoading):
5755
5756 2012-06-25  YoungTaeck Song  <youngtaeck.song@samsung.com>
5757
5758         [WK2][Qt][EFL] Move LayerBackingStore into common directory
5759         https://bugs.webkit.org/show_bug.cgi?id=89838
5760
5761         Reviewed by Noam Rosenthal.
5762
5763         Move LayerBackingStore into 'Source/WebKit2/UIProcess/texmap' to be used by both Qt and Efl.
5764
5765         * Target.pri:
5766         * UIProcess/texmap/LayerBackingStore.cpp: Renamed from Source/WebKit2/UIProcess/qt/LayerBackingStore.cpp.
5767         (WebKit):
5768         (WebKit::LayerBackingStoreTile::swapBuffers):
5769         (WebKit::LayerBackingStoreTile::setBackBuffer):
5770         (WebKit::LayerBackingStore::createTile):
5771         (WebKit::LayerBackingStore::removeTile):
5772         (WebKit::LayerBackingStore::updateTile):
5773         (WebKit::LayerBackingStore::texture):
5774         (WebKit::LayerBackingStore::paintToTextureMapper):
5775         (WebKit::LayerBackingStore::commitTileOperations):
5776         * UIProcess/texmap/LayerBackingStore.h: Renamed from Source/WebKit2/UIProcess/qt/LayerBackingStore.h.
5777         (WebKit):
5778         (LayerBackingStoreTile):
5779         (WebKit::LayerBackingStoreTile::LayerBackingStoreTile):
5780         (WebKit::LayerBackingStoreTile::scale):
5781         (LayerBackingStore):
5782         (WebKit::LayerBackingStore::create):
5783         (WebKit::LayerBackingStore::LayerBackingStore):
5784
5785 2012-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
5786
5787         [GTK] Test /webkit2/WebKitWebView/permission-requests fails due to a runtime warning
5788         https://bugs.webkit.org/show_bug.cgi?id=89858
5789
5790         Reviewed by Xan Lopez.
5791
5792         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
5793         (testWebViewPermissionRequests): Make runtime warnings non-fatal
5794         for test /webkit2/WebKitWebView/permission-requests.
5795
5796 2012-06-25  Huang Dongsung  <luxtella@company100.net>
5797
5798         [GTK] Remove unused code in LayerTreeHostGtk.
5799         https://bugs.webkit.org/show_bug.cgi?id=89854
5800
5801         LayerTreeHostGtk::deviceScaleFactor() is unused and LayerTreeHost does not have
5802         virtual float deviceScaleFactor() const;
5803
5804         Reviewed by Martin Robinson.
5805
5806         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
5807         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
5808         (LayerTreeHostGtk):
5809
5810 2012-06-24  Andreas Kling  <kling@webkit.org>
5811
5812         REGRESSION(r120329): Intermittent WebProcess shutdowns due to out-of-line DidReceiveEvent messages.
5813         <rdar://problem/11686974>
5814         <http://webkit.org/b/89659>
5815
5816         Unreviewed tests assertion fix, handleKeyboardEvent() should call didReceiveKeyEvent()
5817         rather than didReceiveEvent().
5818
5819         * UIProcess/WebPageProxy.cpp:
5820         (WebKit::WebPageProxy::handleKeyboardEvent):
5821         (WebKit::WebPageProxy::didReceiveKeyEvent):
5822
5823 2012-06-24  YoungTaeck Song  <youngtaeck.song@samsung.com>
5824
5825         [WK2][Qt][EFL] Modify Qt specific code to common code
5826         https://bugs.webkit.org/show_bug.cgi?id=89839
5827
5828         Reviewed by Noam Rosenthal.
5829
5830         Modify paintToGraphicsContext’s first argument QPainter to PlatformGraphicsContext to be used by both Qt and Efl.
5831
5832         * UIProcess/WebLayerTreeRenderer.cpp:
5833         (WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
5834
5835 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
5836
5837         Rename isPositioned to isOutOfFlowPositioned for clarity
5838         https://bugs.webkit.org/show_bug.cgi?id=89836
5839
5840         Reviewed by Antti Koivisto.
5841         
5842         RenderObject and RenderStyle had an isPositioned() method that was
5843         confusing, because it excluded relative positioning. Rename to 
5844         isOutOfFlowPositioned(), which makes it clearer that it only applies
5845         to absolute and fixed positioning.
5846
5847         Simple rename; no behavior change.
5848
5849         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
5850         (WebKit::updateOffsetFromViewportForSelf):
5851
5852 2012-06-24  Andreas Kling  <kling@webkit.org>
5853
5854         REGRESSION(r120329): Intermittent WebProcess shutdowns due to out-of-line DidReceiveEvent messages.
5855         <rdar://problem/11686974>
5856         <http://webkit.org/b/89659>
5857
5858         Reviewed by Sam Weinig.
5859
5860         Instead of sending DidReceiveEvent for key events as DispatchMessageEvenWhenWaitingForSyncReply,
5861         use proper synchronous messages. This makes the WebProcess block while the UIProcess handles
5862         the event but prevents a weird race condition where DidReceiveEvent gets dispatched just before
5863         a synchronous DecidePolicyForNavigationAction and something happens below DidReceiveEvent that
5864         invalidates the frame ID passed to DecidePolicyForNavigationAction.
5865
5866         This is a speculative fire-fighting fix.
5867
5868         * UIProcess/WebPageProxy.cpp:
5869         (WebKit::WebPageProxy::didReceiveKeyEvent):
5870         (WebKit::WebPageProxy::didReceiveEvent):
5871         * UIProcess/WebPageProxy.h:
5872         * UIProcess/WebPageProxy.messages.in:
5873         * WebProcess/WebPage/WebPage.cpp:
5874         (WebKit::WebPage::keyEvent):
5875
5876 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
5877
5878         Unreviewed, rolling out r121058.
5879         http://trac.webkit.org/changeset/121058
5880         https://bugs.webkit.org/show_bug.cgi?id=89809
5881
5882         Patch causes plugins tests to crash in GTK debug builds
5883         (Requested by zdobersek on #webkit).
5884
5885         * Shared/mac/WebMemorySampler.mac.mm:
5886         (WebKit::WebMemorySampler::sampleWebKit):
5887         * WebProcess/InjectedBundle/InjectedBundle.cpp:
5888         (WebKit::InjectedBundle::javaScriptObjectsCount):
5889         (WebKit::InjectedBundle::reportException):
5890         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
5891         (WebKit::JSNPObject::callMethod):
5892         (WebKit::JSNPObject::callObject):
5893         (WebKit::JSNPObject::callConstructor):
5894         (WebKit::JSNPObject::put):
5895         (WebKit::JSNPObject::deleteProperty):
5896         (WebKit::JSNPObject::getOwnPropertyNames):
5897         (WebKit::JSNPObject::propertyGetter):
5898         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
5899         (WebKit::NPJSObject::hasMethod):
5900         (WebKit::NPJSObject::invoke):
5901         (WebKit::NPJSObject::invokeDefault):
5902         (WebKit::NPJSObject::hasProperty):
5903         (WebKit::NPJSObject::getProperty):
5904         (WebKit::NPJSObject::setProperty):
5905         (WebKit::NPJSObject::removeProperty):
5906         (WebKit::NPJSObject::enumerate):
5907         (WebKit::NPJSObject::construct):
5908         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
5909         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
5910         (WebKit::NPRuntimeObjectMap::evaluate):
5911         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
5912         * WebProcess/WebPage/WebFrame.cpp:
5913         (WebKit::WebFrame::jsWrapperForWorld):
5914         (WebKit::WebFrame::computedStyleIncludingVisitedInfo):
5915         * WebProcess/WebPage/WebPage.cpp:
5916         (WebKit::WebPage::runJavaScriptInMainFrame):
5917         * WebProcess/WebProcess.cpp:
5918         (WebKit::WebProcess::getWebCoreStatistics):
5919
5920 2012-06-23  Zan Dobersek  <zandobersek@gmail.com>
5921
5922         Unreviewed build fix for GTK's WebKit2 build after r121093.
5923
5924         * UIProcess/API/gtk/WebKitWebView.cpp:
5925         (webkitWebViewPopulateContextMenu):
5926
5927 2012-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
5928
5929         Unreviewed. Fix several GTK+ unit tests.
5930
5931         GTK+ unit tests using WebViewTest::wait() started to fail due to a
5932         bug introduced in r121093.
5933
5934         * UIProcess/API/gtk/tests/WebViewTest.cpp:
5935         (WebViewTest::wait): Use this instead of m_mainLoop as user data
5936         for the idle callback.
5937
5938 2012-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
5939
5940         [GTK] Add ContextMenu API to WebKit2 GTK+ API
5941         https://bugs.webkit.org/show_bug.cgi?id=81011
5942
5943         Reviewed by Martin Robinson.
5944
5945         Add WebKitWebView::context-menu signal and WebKitContextMenu and
5946         WebKitContextMenuItem objects to customize the default menu or
5947         buils new menus.
5948
5949         * GNUmakefile.list.am: Add new files to destination.
5950         * UIProcess/API/gtk/WebKitContextMenu.cpp: Added.
5951         (webkitContextMenuFinalize):
5952         (webkit_context_menu_init):
5953         (webkit_context_menu_class_init):
5954         (webkitContextMenuPopulate): Populate the given vector of
5955         ContextMenuItems with the WebKitContextMenu items releasing the
5956         items added to the vector.
5957         (webkitContextMenuCreate): Create a new WebKitContextMenu for the
5958         given WKArrayRef of WKContextMenuItemRef.
5959         (webkitContextMenuSetParentItem): Set the parent menu item of the
5960         menu. Used when a menu is added as a submenu of a menu item.
5961         (webkitContextMenuGetParentItem): Return the parent menu item of
5962         the menu.
5963         (webkit_context_menu_new): Create a new WebKitContextMenu.
5964         (webkit_context_menu_new_with_items): Create a new
5965         WebKitContextMenu using the given list of WebKitContextMenuItem.
5966         (webkit_context_menu_prepend): Add item at the beginning.
5967         (webkit_context_menu_append): Add item at the end.
5968         (webkit_context_menu_insert): Insert item at a random position.
5969         (webkit_context_menu_move_item): Move an existing item to a new
5970         position.
5971         (webkit_context_menu_get_items): Get the list of items.
5972         (webkit_context_menu_get_n_items): Get the number of items.
5973         (webkit_context_menu_first): Get the first item.
5974         (webkit_context_menu_last): Get the last item.
5975         (webkit_context_menu_get_item_at_position): Get the item at the
5976         given position.
5977         (webkit_context_menu_remove): Remove the given item.
5978         (webkit_context_menu_remove_all): Remove all items.
5979         * UIProcess/API/gtk/WebKitContextMenu.h: Added.
5980         * UIProcess/API/gtk/WebKitContextMenuActions.cpp: Added.
5981         (webkitContextMenuActionIsCheckable): Check if the given stock
5982         action is a toggle action.
5983         (webkitContextMenuActionGetActionTag): Get the WebCore
5984         ContextMenuAction corresponding to the given stock action.
5985         (webkitContextMenuActionGetForContextMenuItem): Get the stock
5986         action corresponding to the given WebCore ContextMenuAction.
5987         (webkitContextMenuActionGetLabel): Get the label string of the
5988         given stock action.
5989         * UIProcess/API/gtk/WebKitContextMenuActions.h: Added.
5990         * UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h: Added.
5991         * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Added.
5992         (webkitContextMenuItemFinalize):
5993         (webkit_context_menu_item_init):
5994         (webkit_context_menu_item_class_init):
5995         (checkAndWarnIfMenuHasParentItem): Check whether the given menu
5996         is already inside another menu showing a warning in such case.
5997         (webkitContextMenuItemSetSubMenu): Set the submenu of a menu item,
5998         checking that the menu is not part of another menu and setting the
5999         item as the parent of the submenu.
6000         (webkitContextMenuItemCreate): Create a new WebKitContextMenuItem
6001         for the given WKContextMenuItemRef.
6002         (webkitContextMenuItemCreateForGtkItem): Create a new
6003         WebKitContextMenuItem using the given GtkMenuItem.
6004         (webkitContextMenuItemSetSubMenuFromGtkMenu): Set the given
6005         GtkMenu as submenu of the item. This is used only to add Input
6006         Methods submenu that is created by GTK.
6007         (webkitContextMenuItemRelease): Release the WebCore
6008         ContextMenuItem associated to the item.
6009         (webkit_context_menu_item_new): Create a new WebKitContextMenuItem
6010         for the given GtkAction.
6011         (webkit_context_menu_item_new_from_stock_action): Create a new
6012         WebKitContextMenuItem for a stock action.
6013         (webkit_context_menu_item_new_from_stock_action_with_label):
6014         Create a new WebKitContextMenuItem for a stock action using a
6015         custom label.
6016         (webkit_context_menu_item_new_with_submenu): Create a new
6017         WebKitContextMenuItem with a submenu.
6018         (webkit_context_menu_item_new_separator): Create a new separator
6019         menu item.
6020         (webkit_context_menu_item_get_action): Get the GtkAction of the item.
6021         (webkit_context_menu_item_get_stock_action): Get the stock action
6022         of the item.
6023         (webkit_context_menu_item_is_separator): Whether item is a separator.
6024         (webkit_context_menu_item_set_submenu): Set or replace the
6025         submenu of the item.
6026         (webkit_context_menu_item_get_submenu): Get the submenu of the item.
6027         * UIProcess/API/gtk/WebKitContextMenuItem.h: Added.
6028         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h: Added.
6029         * UIProcess/API/gtk/WebKitContextMenuPrivate.h: Added.
6030         * UIProcess/API/gtk/WebKitDefines.h:
6031         * UIProcess/API/gtk/WebKitWebView.cpp:
6032         (webkit_web_view_class_init): Add WebKitWebView::context-menu signal.
6033         (getUnicodeMenuItemPosition): Helper function that returns the
6034         position of the unicode menu item in the proposed context menu.
6035         (webkitWebViewCreateAndAppendInputMethodsMenuItem): Use
6036         WebKitContextMenu API to add the input methods submenu to the
6037         default context menu.
6038         (webkitWebViewPopulateContextMenu): Create a WebKitContextMenu for
6039         the default context menu and emit WebKitWebView::context-menu
6040         signal. Then populate the context menu proxy with the resulting
6041         WebKitContextMenu.
6042         * UIProcess/API/gtk/WebKitWebView.h:
6043         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6044         (webkitWebViewBaseButtonPressEvent): In case of right click save
6045         the event to be used by context menu signal.
6046         (webkitWebViewBaseTakeContextMenuEvent): Return and release the
6047         saved button event.
6048         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
6049         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add sections for
6050         WebKitContextMenu and WebKitContextMenuItem.
6051         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
6052         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
6053         webkit_context_menu_get_type and webkit_context_menu_item_get_type.
6054         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for context menu.
6055         * UIProcess/API/gtk/tests/TestContextMenu.cpp: Added.
6056         (testContextMenuDefaultMenu):
6057         (testContextMenuPopulateMenu):
6058         (testContextMenuCustomMenu):
6059         (testContextMenuDisableMenu):
6060         (testContextMenuSubMenu):
6061         (beforeAll):
6062         (afterAll):
6063         * UIProcess/API/gtk/tests/TestMain.h:
6064         (Test::addLogFatalFlag): Add a log level flag to the mask of flags
6065         causing the program to abort.
6066         (Test::removeLogFatalFlag): Remove a log level flag to the mask of
6067         flags causing the program to abort.
6068         * UIProcess/API/gtk/tests/WebViewTest.cpp:
6069         (WebViewTest::quitMainLoop): Finish the main loop.
6070         (WebViewTest::quitMainLoopAfterProcessingPendingEvents): Finish
6071         the main loop when all pending events have been processed.
6072         (quitMainLoopIdleCallback):
6073         (WebViewTest::wait):
6074         * UIProcess/API/gtk/tests/WebViewTest.h:
6075         * UIProcess/API/gtk/webkit2.h: Include WebKitContextMenu.h,
6076         WebKitContextMenuItem.h and WebKitContextMenuActions.h.
6077         * UIProcess/API/gtk/webkit2marshal.list:
6078         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
6079         (WebKit::WebContextMenuProxyGtk::showContextMenu): Attach the
6080         popup menu to the view widget before showing it.
6081
6082 2012-06-22  Alexandru Chiculita  <achicu@adobe.com>
6083
6084         [CSS Shaders] Re-enable the CSS Shaders compile time flag on Safari Mac
6085         https://bugs.webkit.org/show_bug.cgi?id=89781
6086
6087         Reviewed by Dean Jackson.
6088
6089         Added ENABLE_CSS_SHADERS flag as enabled by default on Safari for Mac.
6090
6091         * Configurations/FeatureDefines.xcconfig:
6092
6093 2012-06-22  Ryuan Choi  <ryuan.choi@samsung.com>
6094
6095         [EFL][WK2] Support keyboard event
6096         https://bugs.webkit.org/show_bug.cgi?id=89268
6097
6098         Reviewed by Chang Shu.
6099
6100         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
6101         (WebKit::WebEditorClient::handleKeyboardEvent): Implemented default behavior.
6102         * WebProcess/WebPage/efl/WebPageEfl.cpp:
6103         (WebKit::WebPage::interpretKeyEvent): Implemented like WebKit1/Efl did.
6104
6105 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
6106
6107         JSLock should be per-JSGlobalData
6108         https://bugs.webkit.org/show_bug.cgi?id=89123
6109
6110         Reviewed by Gavin Barraclough.
6111
6112         Changed all sites that used JSLock to instead use the new JSLockHolder
6113         and pass in the correct JS context that the code is about to interact with that 
6114         needs protection.
6115
6116         * Shared/mac/WebMemorySampler.mac.mm:
6117         (WebKit::WebMemorySampler::sampleWebKit):
6118         * WebProcess/InjectedBundle/InjectedBundle.cpp:
6119         (WebKit::InjectedBundle::javaScriptObjectsCount):
6120         (WebKit::InjectedBundle::reportException):
6121         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
6122         (WebKit::JSNPObject::callMethod):
6123         (WebKit::JSNPObject::callObject):
6124         (WebKit::JSNPObject::callConstructor):
6125         (WebKit::JSNPObject::put):
6126         (WebKit::JSNPObject::deleteProperty):
6127         (WebKit::JSNPObject::getOwnPropertyNames):
6128         (WebKit::JSNPObject::propertyGetter):
6129         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
6130         (WebKit::NPJSObject::hasMethod):
6131         (WebKit::NPJSObject::invoke):
6132         (WebKit::NPJSObject::invokeDefault):
6133         (WebKit::NPJSObject::hasProperty):
6134         (WebKit::NPJSObject::getProperty):
6135         (WebKit::NPJSObject::setProperty):
6136         (WebKit::NPJSObject::removeProperty):
6137         (WebKit::NPJSObject::enumerate):
6138         (WebKit::NPJSObject::construct):
6139         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
6140         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
6141         (WebKit::NPRuntimeObjectMap::evaluate):
6142         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
6143         * WebProcess/WebPage/WebFrame.cpp:
6144         (WebKit::WebFrame::jsWrapperForWorld):
6145         (WebKit::WebFrame::computedStyleIncludingVisitedInfo):
6146         * WebProcess/WebPage/WebPage.cpp:
6147         (WebKit::WebPage::runJavaScriptInMainFrame):
6148         * WebProcess/WebProcess.cpp:
6149         (WebKit::WebProcess::getWebCoreStatistics):
6150
6151 2012-06-22  Jocelyn Turcotte  <turcotte.j@gmail.com>
6152
6153         [Qt] Fix the remote inspector loading problems on Mac
6154         https://bugs.webkit.org/show_bug.cgi?id=89747
6155
6156         Reviewed by Simon Hausmann.
6157
6158         Reverse the creation order of the inter-dependent WebSocketServerConnection
6159         and SocketStreamHandle to make sure that the later has a client properly
6160         set on construction.
6161
6162         This is to work around the assert on m_state in SocketStreamHandle::setClient.
6163
6164         * UIProcess/InspectorServer/WebSocketServer.cpp:
6165         (WebKit::WebSocketServer::didAcceptConnection):
6166         * UIProcess/InspectorServer/WebSocketServer.h:
6167         (WebKit::WebSocketServer::client):
6168         (WebSocketServer):
6169         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
6170         (WebKit::WebSocketServerConnection::WebSocketServerConnection):
6171         (WebKit::WebSocketServerConnection::setSocketHandle):
6172         (WebKit):
6173         * UIProcess/InspectorServer/WebSocketServerConnection.h:
6174         (WebSocketServerConnection):
6175         * UIProcess/InspectorServer/qt/WebSocketServerQt.cpp:
6176         (WebKit::QtTcpServerHandler::handleNewConnection):
6177
6178 2012-06-22  Sergio Villar Senin  <svillar@igalia.com>
6179
6180         [WK2] FindController::hideFindUI should unmark highlighted text matches
6181         https://bugs.webkit.org/show_bug.cgi?id=77747
6182
6183         Reviewed by Carlos Garcia Campos.
6184
6185         Unmark all text matches whenever FindController::hideFindUI is
6186         called to allow callers using the ShowHighlight find option to
6187         remove highlighting.
6188
6189         This patch enables a unit test for the WebKitFindController
6190         previously guarded by a #if(0) after r109222.
6191
6192         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
6193         (testFindControllerHide):
6194         * WebProcess/WebPage/FindController.cpp:
6195         (WebKit::FindController::hideFindUI):
6196
6197 2012-06-21  Christophe Dumez  <christophe.dumez@intel.com>
6198
6199         [WK2] Add C API to inspect a Web Intent
6200         https://bugs.webkit.org/show_bug.cgi?id=89275
6201
6202         Reviewed by Anders Carlsson.
6203
6204         Add C API for Web Intent so that it can be queried
6205         on client side.
6206
6207         * CMakeLists.txt:
6208         * GNUmakefile.list.am:
6209         * Target.pri:
6210         * UIProcess/API/C/WKIntentData.cpp: Copied from Source/WebKit2/UIProcess/WebIntentData.cpp.
6211         (WKIntentDataGetTypeID):
6212         (WKIntentDataCopyAction):
6213         (WKIntentDataCopyType):
6214         (WKIntentDataCopyService):
6215         (WKIntentDataCopySuggestions):
6216         (WKIntentDataCopyExtra):
6217         (WKIntentDataCopyExtras):
6218         * UIProcess/API/C/WKIntentData.h: Copied from Source/WebKit2/UIProcess/WebIntentData.cpp.
6219         * UIProcess/WebIntentData.cpp:
6220         (WebKit::WebIntentData::suggestions):
6221         (WebKit):
6222         (WebKit::WebIntentData::extra):
6223         (WebKit::WebIntentData::extras):
6224         * UIProcess/WebIntentData.h:
6225         (WebIntentData):
6226
6227 2012-06-21  Christophe Dumez  <christophe.dumez@intel.com>
6228
6229         [WK2] Properly encode/decode service in IntentData
6230         https://bugs.webkit.org/show_bug.cgi?id=89460
6231
6232         Reviewed by Gustavo Noronha Silva.
6233
6234         Update IntentData::encode() and IntentData::decode()
6235         so that the "service" member is properly encoded
6236         and decoded.
6237
6238         * Shared/IntentData.cpp:
6239         (WebKit::IntentData::encode):
6240         (WebKit::IntentData::decode):
6241
6242 2012-06-21  Ryuan Choi  <ryuan.choi@gmail.com>
6243
6244         [EFL][WK2] Make WebKit2/Efl headers and resources installable.
6245         https://bugs.webkit.org/show_bug.cgi?id=88207
6246
6247         Reviewed by Chang Shu.
6248
6249         * CMakeLists.txt: Install WebProcess.
6250         * PlatformEfl.cmake: Generate ewebkit2.pc and install it.
6251         * efl/ewebkit2.pc.in: Added.
6252
6253 2012-06-21  Ryuan Choi  <ryuan.choi@samsung.com>
6254
6255         [EFL[WK2] Add WKViewEfl and WebKit2 API Object to represent Evas_Object.
6256         https://bugs.webkit.org/show_bug.cgi?id=88935
6257
6258         Reviewed by Chang Shu.
6259
6260         Add WKViewEfl to support WTR/Efl.
6261
6262         * PlatformEfl.cmake:
6263         * Shared/API/c/WKBase.h:
6264         * Shared/API/c/efl/WKBaseEfl.h: Added.
6265         * UIProcess/API/C/WKAPICast.h:
6266         * UIProcess/API/C/efl/WKAPICastEfl.h: Added.
6267         (WebKit):
6268         * UIProcess/API/C/efl/WKView.cpp: Added.
6269         (WKViewCreate):
6270         (WKViewGetPage):
6271         * UIProcess/API/C/efl/WKView.h: Added.
6272         * UIProcess/API/efl/ewk_view.cpp:
6273         (ewk_view_page_get):
6274         * UIProcess/API/efl/ewk_view_private.h:
6275
6276 2012-06-21  Thiago Marcos P. Santos  <thiago.santos@intel.com>
6277
6278         [Qt] API tests for ColorChooser
6279         https://bugs.webkit.org/show_bug.cgi?id=88101
6280
6281         Reviewed by Kenneth Rohde Christiansen.
6282
6283         The test uses the value sanitization to detect if the feature is
6284         enabled or disabled and will just pass when disabled.
6285
6286         * UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml: Added.
6287         * UIProcess/API/qt/tests/qmltests/common/colorChooser.html: Added.
6288
6289 2012-06-21  Thiago Marcos P. Santos  <thiago.santos@intel.com>
6290
6291         [WK2][Qt] Color chooser API missing
6292         https://bugs.webkit.org/show_bug.cgi?id=87749
6293
6294         Reviewed by Kenneth Rohde Christiansen.
6295
6296         Added public experimental API for ColorChooser. This will
6297         allow the browser to define a custom dialog for selecting
6298         color when a input field of type "color" get focus.
6299
6300         The current implementation gives a model to the QML Component
6301         that has methods for canceling a request, selecting a color
6302         and fetching what is the current value of the HTML input.
6303
6304         * Target.pri:
6305         * UIProcess/API/qt/qquickwebview.cpp:
6306         (QQuickWebViewPrivate::QQuickWebViewPrivate):
6307         (QQuickWebViewExperimental::colorChooser):
6308         (QQuickWebViewExperimental::setColorChooser):
6309         * UIProcess/API/qt/qquickwebview_p.h:
6310         * UIProcess/API/qt/qquickwebview_p_p.h:
6311         (QQuickWebViewPrivate):
6312         * UIProcess/qt/QtPageClient.cpp:
6313         (WebKit::QtPageClient::createColorChooserProxy):
6314         * UIProcess/qt/WebColorChooserProxyQt.cpp: Added.
6315         (WebKit):
6316         (ColorChooserContextObject):
6317         (WebKit::ColorChooserContextObject::ColorChooserContextObject):
6318         (WebKit::ColorChooserContextObject::currentColor):
6319         (WebKit::ColorChooserContextObject::accept):
6320         (WebKit::ColorChooserContextObject::reject):
6321         (WebKit::WebColorChooserProxyQt::WebColorChooserProxyQt):
6322         (WebKit::WebColorChooserProxyQt::~WebColorChooserProxyQt):
6323         (WebKit::WebColorChooserProxyQt::createItem):
6324         (WebKit::WebColorChooserProxyQt::createContext):
6325         (WebKit::WebColorChooserProxyQt::setSelectedColor):
6326         (WebKit::WebColorChooserProxyQt::notifyColorSelected):
6327         (WebKit::WebColorChooserProxyQt::endChooser):
6328         * UIProcess/qt/WebColorChooserProxyQt.h: Added.
6329         (WebCore):
6330         (WebKit):
6331         (WebColorChooserProxyQt):
6332         (WebKit::WebColorChooserProxyQt::create):
6333
6334 2012-06-21  Mario Sanchez Prada  <msanchez@igalia.com>
6335
6336         [GTK] Add support for window.showModalDialog in WebKit2GTK+
6337         https://bugs.webkit.org/show_bug.cgi?id=79500
6338
6339         Reviewed by Carlos Garcia Campos.
6340
6341         Implement runModal in WebKitUIClient to make the WebKitWebView
6342         emit a 'run-as-modal' signal when requested, creating a new
6343         mainloop there to block user interaction with the original window
6344         while the modal dialog is showing.
6345
6346         * UIProcess/API/gtk/WebKitUIClient.cpp:
6347         (runModal): Call to the new webkitWebViewRunAsModalPage function.
6348         (attachUIClientToView): Add runModal.
6349         * UIProcess/API/gtk/WebKitWebView.cpp:
6350         (_WebKitWebViewPrivate): Add an atribute for a new main loop.
6351         (webkitWebViewFinalize): Make sure the main loop for main dialogs,
6352         if any, is stopped if it was still running.
6353         (webkit_web_view_class_init): Declare new signal 'run-as-modal'.
6354         (webkitWebViewRunAsModal): Emit the 'run-as-modal' signal and, if
6355         handled, create and run a new main loop.
6356         * UIProcess/API/gtk/WebKitWebView.h:
6357         (_WebKitWebViewClass): New handler for the 'run-as-modal' signal.
6358         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add webkitWebViewRunAsModalPage.
6359
6360         Allow setting and getting the value of WebPage's canRunModal
6361         attribute in the WebProcess from the UIProcess after the creation
6362         of a WebPage, to allow using it from WebKitWebView to allow the
6363         client application to decide whether to allow create modal
6364         dialogs, which would result in launching an additional nested
6365         event loop in the web process, after creating the dialog.
6366
6367         * UIProcess/WebPageProxy.cpp:
6368         (WebKit::WebPageProxy::WebPageProxy): Initialize the new
6369         m_canRunModal attribute, to cache the current status of the
6370         WebPage in the WebProcess.
6371         (WebKit::WebPageProxy::initializeUIClient): Call the new function
6372         setCanRunModal, instead of manually sending the SetCanRunModal message.
6373         (WebKit::WebPageProxy::creationParameters): Use m_canRunModal
6374         instead of m_uiClient.canRunModal when preparing the parameters.
6375         (WebKit::WebPageProxy::setCanRunModal): New public function, it
6376         sets the value of m_canRunModal and sends a message to the Web
6377         process for updating the WebPage, whenever possible.
6378         (WebKit::WebPageProxy::canRunModal): New public function, returns
6379         the value of the m_canRunModal attribute.
6380         * UIProcess/WebPageProxy.h:
6381         (WebPageProxy): Added new public functions and private attribute.
6382
6383         New property in WebKitSettings to be able to decide whether it is
6384         allowed to create and run new child webviews as modal dialogs.
6385
6386         * UIProcess/API/gtk/WebKitSettings.cpp:
6387         (_WebKitSettingsPrivate): New attribute allowModalDialogs.
6388         (webKitSettingsSetProperty): Handle the new property.
6389         (webKitSettingsGetProperty): Ditto.
6390         (webkit_settings_class_init): Install the new property.
6391         (webkitSettingsAttachSettingsToPage): Make sure the WebPage is
6392         initialized with the value of the new property.
6393         (webkit_settings_set_allow_modal_dialogs): New setter.
6394         (webkit_settings_get_allow_modal_dialogs): New getter.
6395         * UIProcess/API/gtk/WebKitSettings.h:
6396         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new accessors.
6397
6398         Connect to the 'notify::allow-modal-dialogs' signal from
6399         WebKitSettings to ensure that canRunModal property of the WebPage
6400         is kept up to date. Ensure that signal handlers for monitoring
6401         settings are disconnected when the webview is finalized.
6402
6403         * UIProcess/API/gtk/WebKitWebView.cpp:
6404         (webkitWebViewSetSettings): Connect to the new signal
6405         'notify::allow-modal-dialogs', from WebKitSettings.
6406         (allowModalDialogsChanged): Callback to update WebPage's
6407         canRunModal property when updated through WebKitSettings.
6408         (webkitWebViewDisconnectSettingsSignalHandlers): Disconnect signal
6409         handlers for monitoring WebKitSettings properties.
6410         (webkitWebViewFinalize): Ensure signal handlers are disconnected.
6411         (webkit_web_view_set_settings): Ditto.
6412         * UIProcess/API/gtk/WebKitWebView.h:
6413
6414         Add new unit tests to check the 'run-as-modal' signal is emitted
6415         only when the new property in WebKitSettings is set to TRUE.
6416
6417         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
6418         (testWebViewAllowModalDialogs): New unit test to check that modal
6419         dialogs are properly created from JavaScript when allowed.
6420         (testWebViewDisallowModalDialogs): New unit test to check that
6421         it's not possible to create modal dialogs when not allowed.
6422         (beforeAll): Add the new unit test.
6423
6424 2012-06-20  Thiago Marcos P. Santos  <thiago.santos@intel.com>
6425
6426         [WK2] Color chooser API missing
6427         https://bugs.webkit.org/show_bug.cgi?id=87495
6428
6429         Reviewed by Andreas Kling.
6430
6431         Added ColorChooser API to WebKit2. This API allows the
6432         embedder to define a custom color picker for <input type="color">.
6433
6434         Only one ColorChooser can be active for a page at a time. Although
6435         the implementation doesn't not assume a modal dialog, no other
6436         color chooser will be created until the active one is closed.
6437
6438         Also added stubs for all platforms, so it wont break the build when
6439         enabling color chooser, even though they don't have the backend
6440         implemented yet.
6441
6442         * CMakeLists.txt:
6443         * GNUmakefile.list.am:
6444         * Target.pri:
6445         * UIProcess/API/efl/PageClientImpl.cpp:
6446         (WebKit):
6447         (WebKit::PageClientImpl::createColorChooserProxy):
6448         * UIProcess/API/efl/PageClientImpl.h:
6449         (PageClientImpl):
6450         * UIProcess/API/gtk/PageClientImpl.cpp:
6451         (WebKit):
6452         (WebKit::PageClientImpl::createColorChooserProxy):
6453         * UIProcess/API/gtk/PageClientImpl.h:
6454         (PageClientImpl):
6455         * UIProcess/API/mac/PageClientImpl.h:
6456         (PageClientImpl):
6457         * UIProcess/API/mac/PageClientImpl.mm:
6458         (WebKit):
6459         (WebKit::PageClientImpl::createColorChooserProxy):
6460         * UIProcess/PageClient.h:
6461         (WebKit):
6462         (PageClient):
6463         * UIProcess/WebColorChooserProxy.h: Added.
6464         (WebCore):
6465         (WebKit):
6466         (WebColorChooserProxy):
6467         (Client):
6468         (WebKit::WebColorChooserProxy::Client::~Client):
6469         (WebKit::WebColorChooserProxy::~WebColorChooserProxy):
6470         (WebKit::WebColorChooserProxy::invalidate):
6471         (WebKit::WebColorChooserProxy::WebColorChooserProxy):
6472         * UIProcess/WebPageProxy.cpp:
6473         (WebKit::WebPageProxy::close):
6474         (WebKit):
6475         (WebKit::WebPageProxy::showColorChooser):
6476         (WebKit::WebPageProxy::setColorChooserColor):
6477         (WebKit::WebPageProxy::endColorChooser):
6478         (WebKit::WebPageProxy::didChooseColor):
6479         (WebKit::WebPageProxy::didEndColorChooser):
6480         (WebKit::WebPageProxy::processDidCrash):
6481         * UIProcess/WebPageProxy.h:
6482         (WebPageProxy):
6483         * UIProcess/WebPageProxy.messages.in:
6484         * UIProcess/qt/QtPageClient.cpp:
6485         (WebKit):
6486         (WebKit::QtPageClient::createColorChooserProxy):
6487         * UIProcess/qt/QtPageClient.h:
6488         (QtPageClient):
6489         * UIProcess/win/WebView.cpp:
6490         (WebKit):
6491         (WebKit::WebView::createColorChooserProxy):
6492         * UIProcess/win/WebView.h:
6493         (WebView):
6494         * WebKit2.xcodeproj/project.pbxproj:
6495         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
6496         (WebKit::WebChromeClient::createColorChooser):
6497         * WebProcess/WebCoreSupport/WebColorChooser.cpp: Added.
6498         (WebKit):
6499         (WebKit::WebColorChooser::WebColorChooser):
6500         (WebKit::WebColorChooser::~WebColorChooser):
6501         (WebKit::WebColorChooser::didChooseColor):
6502         (WebKit::WebColorChooser::didEndChooser):
6503         (WebKit::WebColorChooser::disconnectFromPage):
6504         (WebKit::WebColorChooser::setSelectedColor):
6505         (WebKit::WebColorChooser::endChooser):
6506         * WebProcess/WebCoreSupport/WebColorChooser.h: Added.
6507         (WebCore):
6508         (WebKit):
6509         (WebColorChooser):
6510         * WebProcess/WebPage/WebPage.cpp:
6511         (WebKit::WebPage::WebPage):
6512         (WebKit::WebPage::close):
6513         (WebKit):
6514         (WebKit::WebPage::setActiveColorChooser):
6515         (WebKit::WebPage::didEndColorChooser):
6516         (WebKit::WebPage::didChooseColor):
6517         * WebProcess/WebPage/WebPage.h:
6518         (WebKit):
6519         (WebPage):
6520         (WebKit::WebPage::activeColorChooser):
6521         * WebProcess/WebPage/WebPage.messages.in:
6522         * win/WebKit2.vcproj:
6523
6524 2012-06-20  Brady Eidson  <beidson@apple.com>
6525
6526         <rdar://problem/11653784> and https://bugs.webkit.org/show_bug.cgi?id=89590
6527         showModalDialog message handling is flaky in WebKit2
6528
6529         Because RunLoop::performWork() swaps the function queue to a temporary Vector before calling
6530         the functions an inner run-loop - such as we see with running a modal dialog - does not have
6531         a change to handle any of the functions that were queued after the WebPageProxy::RunModal message.
6532
6533         By servicing the functions in the queue one at a time we can give the RunLoop a chance to pick up
6534         where it left off if RunLoop::performWork is re-entered.
6535
6536         To guarantee RunLoop::performWork is re-entered to handle those functions we also need to signal
6537         its source before entering the modal run loop so our RunLoop is woken up.
6538
6539         Reviewed by Darin Adler.
6540
6541         * Platform/CoreIPC/Connection.cpp:
6542         (CoreIPC::Connection::wakeUpRunLoop): Added so the WebPageProxy can signal the runloop to be woken up
6543           before it enters the modal dialog run loop.
6544         * Platform/CoreIPC/Connection.h:
6545
6546         * UIProcess/WebPageProxy.cpp:
6547         (WebKit::WebPageProxy::runModal): Call wakeUpRunLoop() before entering the modal dialog run loop.
6548
6549 2012-06-20  Julien Chaffraix  <jchaffraix@webkit.org>
6550
6551         Use IntSize in RenderLayer to represent scroll offsets
6552         https://bugs.webkit.org/show_bug.cgi?id=89154
6553
6554         Reviewed by Eric Seidel.
6555
6556         * WebProcess/WebPage/win/WebPageWin.cpp:
6557         (WebKit::WebPage::gestureDidScroll):
6558         Updated to pass an IntSize to scrollByRecursively.
6559
6560 2012-06-20  Christophe Dumez  <christophe.dumez@intel.com>
6561
6562         [WK2] Implement Web Intent delivery
6563         https://bugs.webkit.org/show_bug.cgi?id=88989
6564
6565         Reviewed by Anders Carlsson.
6566
6567         Add a deliverIntent() method to the WebFrame so that
6568         Web intents can be delivered once matched to a
6569         specific service.
6570
6571         * UIProcess/WebFrameProxy.cpp:
6572         (WebKit):
6573         (WebKit::WebFrameProxy::deliverIntent):
6574         * UIProcess/WebFrameProxy.h:
6575         (WebKit):
6576         (WebFrameProxy):
6577         * UIProcess/WebIntentData.h:
6578         (WebKit::WebIntentData::store):
6579         * WebProcess/WebPage/WebFrame.cpp:
6580         (WebKit):
6581         (WebKit::WebFrame::deliverIntent):
6582         * WebProcess/WebPage/WebFrame.h:
6583         (WebKit):
6584         (WebFrame):
6585         * WebProcess/WebPage/WebPage.cpp:
6586         (WebKit):
6587         (WebKit::WebPage::deliverIntentToFrame):
6588         * WebProcess/WebPage/WebPage.h:
6589         (WebKit):
6590         (WebPage):
6591         * WebProcess/WebPage/WebPage.messages.in:
6592
6593 2012-06-20  Alexis Menard  <alexis.menard@openbossa.org>
6594
6595         REGRESSION (120705) : LayerTreeHostQt asserts in debug.
6596         https://bugs.webkit.org/show_bug.cgi?id=89487
6597
6598         Reviewed by Noam Rosenthal.
6599
6600         We try to call createHandle twice on the same handle when the
6601         first matching atlas is full. This patch solved the problem by
6602         moving the createHandle call inside UpdateAtlas and call createHandle
6603         only when the atlas is not full. We can also remove the surface()
6604         getter as it is not used anymore.
6605
6606         * WebProcess/WebPage/UpdateAtlas.cpp:
6607         (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
6608         * WebProcess/WebPage/UpdateAtlas.h:
6609         (UpdateAtlas):
6610         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
6611         (WebKit::LayerTreeHostQt::beginContentUpdate):
6612
6613 2012-06-19  Ryuan Choi  <ryuan.choi@samsung.com>
6614
6615         [EFL][Regression] Build break after r120786
6616         https://bugs.webkit.org/show_bug.cgi?id=89549
6617
6618         Unreviewed build fix for Efl port.
6619
6620         * CMakeLists.txt: Added disassembler in includes.
6621
6622 2012-06-19  Dan Bernstein  <mitz@apple.com>
6623
6624         WebKit2 part of: Paginated display API doesn’t allow setting the page progression direction
6625         https://bugs.webkit.org/show_bug.cgi?id=89394
6626
6627         Reviewed by Darin Adler.
6628
6629         * UIProcess/API/C/WKPage.cpp:
6630         (WKPageSetPaginationMode): Changed to map new WKPaginationMode values to new
6631         Pagination::Mode values.
6632         (WKPageGetPaginationMode): Similarly, in the opposite direction.
6633         * UIProcess/API/C/WKPagePrivate.h: Replaced WKPaginationMode values with ones that specify
6634         an axis and a direction along that axis.
6635         * UIProcess/API/mac/WKBrowsingContextController.mm:
6636         (-[WKBrowsingContextController setPaginationMode:]): Changed to handle new values.
6637         (-[WKBrowsingContextController paginationMode]): Ditto.
6638         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Replaced
6639         WKBrowsingContextPaginationMode values with ones that specify an axis and a direction along
6640         that axis.
6641
6642 2012-06-19  Alexis Menard  <alexis.menard@openbossa.org>
6643
6644         [Qt] Create an extra atlas when there is no available buffer space.
6645         https://bugs.webkit.org/show_bug.cgi?id=89012
6646
6647         Reviewed by Noam Rosenthal.
6648
6649         In case of the desktop mode when we scroll the view all the tiles
6650         are updated. It can happen that there no available buffer space for
6651         the currently used atlas(especially when scrolling fast). In that case 
6652         we can create a new one. One future improvement could be to make a timer and 
6653         delete this extra atlas when it is not used.
6654
6655         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
6656         (WebKit::beginContentUpdateInAtlas):
6657         (WebKit::LayerTreeHostQt::beginContentUpdate):
6658         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
6659         (LayerTreeHostQt):
6660
6661 2012-06-19  Csaba Osztrogonác  <ossy@webkit.org>
6662
6663         [Qt] Buildfix for newer Qt5, use QPointer instead of the deprecated QWeakPointer.
6664         https://bugs.webkit.org/show_bug.cgi?id=89449
6665
6666         Reviewed by Simon Hausmann.
6667
6668         * UIProcess/API/qt/qquicknetworkreply_p.h:
6669
6670 2012-06-19  Mike West  <mkwst@chromium.org>
6671
6672         Introduce ENABLE_CSP_NEXT configuration flag.
6673         https://bugs.webkit.org/show_bug.cgi?id=89300
6674
6675         Reviewed by Adam Barth.
6676
6677         The 1.0 draft of the Content Security Policy spec is just about to
6678         move to Last Call. We'll hide work on the upcoming 1.1 spec behind
6679         this ENABLE flag, disabled by default.
6680
6681         Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html
6682
6683         * Configurations/FeatureDefines.xcconfig:
6684
6685 2012-06-19  Mike West  <mkwst@chromium.org>
6686
6687         Add a scheme registry for bypassing Content Security Policy.
6688         https://bugs.webkit.org/show_bug.cgi?id=89373
6689
6690         Reviewed by Adam Barth.
6691
6692         * win/WebKit2.def:
6693         * win/WebKit2CFLite.def:
6694
6695 2012-06-16  Adam Barth  <abarth@webkit.org>
6696
6697         Settings::devicePixelRatio doesn't do anything and is confusing
6698         https://bugs.webkit.org/show_bug.cgi?id=89272
6699
6700         Reviewed by James Robinson.
6701
6702         * Shared/WebPreferencesStore.h:
6703         (WebKit):
6704             - Remove boilerplate code for the setting.
6705         * UIProcess/API/qt/qquickwebview.cpp:
6706         (QQuickWebViewExperimental::devicePixelRatio):
6707         (QQuickWebViewExperimental::setDevicePixelRatio):
6708             - Change these functions to get and set the real device scale factor.
6709         * WebProcess/WebPage/WebPage.cpp:
6710         (WebKit::WebPage::sendViewportAttributesChanged):
6711             - Use the real device scale factor for the viewport calculation.
6712         (WebKit::WebPage::updatePreferences):
6713             - Remove boilerplate code for the setting.
6714
6715 2012-06-15  Christophe Dumez  <christophe.dumez@intel.com>
6716
6717         [WK2] Add support for explicit intents
6718         https://bugs.webkit.org/show_bug.cgi?id=89206
6719
6720         Reviewed by Kenneth Rohde Christiansen.
6721
6722         Expose the service URL of a Web Intent. This URL
6723         is set for explicit intents.
6724
6725         * Shared/IntentData.h:
6726         (IntentData):
6727         * UIProcess/WebIntentData.h:
6728         (WebKit::WebIntentData::service):
6729         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
6730         (WebKit::WebFrameLoaderClient::dispatchIntent):
6731
6732 2012-06-15  Christophe Dumez  <christophe.dumez@intel.com>
6733
6734         [EFL][WK2] Add title support to Ewk_View
6735         https://bugs.webkit.org/show_bug.cgi?id=89095
6736
6737         Reviewed by Kenneth Rohde Christiansen.
6738
6739         Add a method to get the title of the main frame in
6740         an Ewk_View. A "title,changed" signal is now emitted
6741         on the view to notify clients that the main frame
6742         title was changed.
6743
6744         * PlatformEfl.cmake:
6745         * UIProcess/API/efl/ewk_view.cpp:
6746         (_Ewk_View_Private_Data):
6747         (_ewk_view_priv_del):
6748         (ewk_view_base_add):
6749         (ewk_view_title_get):
6750         (ewk_view_title_changed):
6751         * UIProcess/API/efl/ewk_view.h:
6752         * UIProcess/API/efl/ewk_view_loader_client.cpp: Added.
6753         (didReceiveTitleForFrame):
6754         (ewk_view_loader_client_attach):
6755         * UIProcess/API/efl/ewk_view_loader_client_private.h: Added.
6756         * UIProcess/API/efl/ewk_view_private.h:
6757
6758 2012-06-15  Christophe Dumez  <christophe.dumez@intel.com>
6759
6760         [WK2][EFL] Implement navigation back/forward in Ewk_View
6761         https://bugs.webkit.org/show_bug.cgi?id=89173
6762
6763         Reviewed by Kenneth Rohde Christiansen.
6764
6765         Add API for Ewk_View to ask the main frame to navigate backwards
6766         or forwards in history. Also add API to query if such navigation
6767         is possible.
6768
6769         * UIProcess/API/efl/ewk_view.cpp:
6770         (ewk_view_back):
6771         (ewk_view_forward):
6772         (ewk_view_back_possible):
6773         (ewk_view_forward_possible):
6774         * UIProcess/API/efl/ewk_view.h:
6775
6776 2012-06-15  Christophe Dumez  <christophe.dumez@intel.com>
6777
6778         [EFL][WK2] Implement reload / stop in Ewk_View
6779         https://bugs.webkit.org/show_bug.cgi?id=89168
6780
6781         Reviewed by Kenneth Rohde Christiansen.
6782
6783         Add API on the Ewk_View to reload the main frame
6784         and to stop the current load.
6785
6786         * UIProcess/API/efl/ewk_view.cpp:
6787         (ewk_view_reload):
6788         (ewk_view_stop):
6789         * UIProcess/API/efl/ewk_view.h:
6790
6791 2012-06-14  Kent Tamura  <tkent@chromium.org>
6792
6793         Validate form state strings in FormController::setStateForNewFormElements()
6794         https://bugs.webkit.org/show_bug.cgi?id=88768
6795
6796         Reviewed by Hajime Morita.
6797
6798         * win/WebKit2.def: Expose some symbols used by Internals.cpp.
6799         * win/WebKit2CFLite.def: ditto.
6800
6801 2012-06-14  Tim Horton  <timothy_horton@apple.com>
6802
6803         DrawingArea: Painting is being resumed while the view is not visible
6804         https://bugs.webkit.org/show_bug.cgi?id=88940
6805         <rdar://problem/11652545>
6806
6807         Reviewed by Dean Jackson.
6808
6809         Using requestAnimationFrame and the fullscreen API on a DrawingArea-backed window would cause
6810         rAF to permanently suspend animations after entering full-screen mode, because of the following:
6811
6812         0. JavaScript causes fullscreen transition to start.
6813         1. Painting (and rAF) are suspended.
6814         2. The page changes size.
6815             a. DrawingAreaProxyImpl::sizeDidChange() calls DrawingAreaImpl::updateBackingStoreState, which calls DrawingAreaImpl::resumePainting.
6816             b. DrawingAreaImpl::resumePainting resumes painting, but does *not* resume rAF, because windowIsVisible is (legitimately) false.
6817         3. The view becomes visible, windowIsVisible is updated to true.
6818         4. visibilityDidChange() calls resumePainting again, but this time it early exits because painting is not suspended.
6819
6820         Notice that because of the early exit in 4, rAF is never resumed.
6821
6822         To solve this and prevent any further bugs caused by these unnecessary calls to resume/suspendPainting,
6823         temporarily stop sending SuspendPainting/ResumePainting messages from DrawingAreaProxyImpl::visibilityDidChange
6824         during the window animations that occur while entering and exiting full-screen.
6825
6826         * UIProcess/API/mac/WKViewInternal.h:
6827         * UIProcess/API/mac/WKView.mm:
6828         (-[WKView setAutomaticallySuspendAndResumePainting:]):
6829         (-[WKView automaticallySuspendAndResumePainting]):
6830         * UIProcess/DrawingAreaProxyImpl.cpp:
6831         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
6832         * UIProcess/WebPageProxy.h:
6833         (WebKit::WebPageProxy::setShouldSuspendAndResumePainting):
6834         (WebKit::WebPageProxy::shouldSuspendAndResumePainting):
6835         * UIProcess/mac/WKFullScreenWindowController.mm:
6836         (-[WKFullScreenWindowController enterFullScreen:]):
6837         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
6838
6839 2012-06-14  Jia Pu  <jpu@apple.com>
6840
6841         Mark text with text alternative with blue underline.
6842         https://bugs.webkit.org/show_bug.cgi?id=83047
6843
6844         Reviewed by Enrica Casucci.
6845
6846         Changes in WebKit2 include implementation of new functions declared in AlternativeTextClient,
6847         and logic for calling Editor::insertDictatedText() instead of Editor::insertText() when there's
6848         alternatives attached to the input string.
6849
6850         * Shared/API/c/WKContextMenuItemTypes.h:
6851         * Shared/API/c/WKSharedAPICast.h:
6852         * Shared/WebCoreArgumentCoders.cpp:
6853         * Shared/WebCoreArgumentCoders.h:
6854         * UIProcess/API/mac/PageClientImpl.h:
6855         * UIProcess/API/mac/PageClientImpl.mm:
6856         (WebKit::PageClientImpl::PageClientImpl):
6857         (WebKit::PageClientImpl::pageClosed):
6858         (WebKit::PageClientImpl::addDictationAlternatives):
6859         (WebKit::PageClientImpl::removeDictationAlternatives):
6860         (WebKit::PageClientImpl::showDictationAlternativeUI):
6861         (WebKit::PageClientImpl::dictationAlternatives):
6862         (WebKit::PageClientImpl::dismissDictationAlternativeUI):
6863         * UIProcess/API/mac/WKView.mm:
6864         (-[WKView insertText:replacementRange:]):
6865         (-[WKView validAttributesForMarkedText]):
6866         (-[WKView handleAcceptedAlternativeText:]):
6867         * UIProcess/API/mac/WKViewInternal.h:
6868         * UIProcess/PageClient.h:
6869         * UIProcess/WebPageProxy.cpp:
6870         (WebKit::WebPageProxy::showDictationAlternativeUI):
6871         (WebKit::WebPageProxy::dismissDictationAlternativeUI):
6872         (WebKit::WebPageProxy::removeDictationAlternatives):
6873         (WebKit::WebPageProxy::dictationAlternatives):
6874         * UIProcess/WebPageProxy.h:
6875         * UIProcess/WebPageProxy.messages.in:
6876         * UIProcess/mac/CorrectionPanel.mm:
6877         (correctionIndicatorType):
6878         (WebKit::CorrectionPanel::handleAcceptedReplacement):
6879         * UIProcess/mac/WebPageProxyMac.mm:
6880         (WebKit::WebPageProxy::insertDictatedText):
6881         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
6882         (WebAlternativeTextClient):
6883         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
6884         (WebKit::WebAlternativeTextClient::showCorrectionAlternative):
6885         (WebKit::WebAlternativeTextClient::dismissAlternative):
6886         (WebKit::WebAlternativeTextClient::dismissAlternativeSoon):
6887         (WebKit::WebAlternativeTextClient::recordAutocorrectionResponse):
6888         (WebKit::WebAlternativeTextClient::removeDictationAlternatives):
6889         (WebKit::WebAlternativeTextClient::showDictationAlternativeUI):
6890         (WebKit::WebAlternativeTextClient::dismissDictationAlternativeUI):
6891         (WebKit::WebAlternativeTextClient::dictationAlternatives):
6892         * WebProcess/WebPage/WebPage.h:
6893         * WebProcess/WebPage/WebPage.messages.in:
6894         * WebProcess/WebPage/mac/WebPageMac.mm:
6895         (WebKit::WebPage::insertDictatedText):
6896
6897 2012-06-13  Andreas Kling  <kling@webkit.org>
6898
6899         Chinese IM receives incorrect/duplicated key events in text fields in webpages in Safari.
6900         <http://webkit.org/b/89048>
6901         <rdar://problem/11449702>
6902
6903         Reviewed by Darin Adler.
6904
6905         Send the DidReceiveEvent message with the DispatchMessageEvenWhenWaitingForSyncReply flag
6906         for keyboard events. This ensures that it always arrives before the corresponding synchronous
6907         InterpretQueuedKeyEvent message.
6908
6909         The problem was that we relied on DidReceiveEvent / InterpretQueuedKeyEvent always arriving in
6910         the same order they were sent. This was not always true, since DidReceiveEvent (async) would
6911         get deferred during an unrelated waitForSyncReply() whereas InterpretQueuedKeyEvent (sync)
6912         gets dispatched right away.
6913
6914         * WebProcess/WebPage/WebPage.cpp:
6915         (WebKit::WebPage::keyEvent):
6916
6917 2012-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
6918
6919         [GTK] Add input methods submenu item to the default context menu for editable content
6920         https://bugs.webkit.org/show_bug.cgi?id=80600
6921
6922         Reviewed by Martin Robinson.
6923
6924         * GNUmakefile.am: Add new files to compilation.
6925         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Added.
6926         (getContextMenuFromProposedMenu): Call webkitWebViewContextMenu().
6927         (attachContextMenuClientToView): Add implementation for
6928         getContextMenuFromProposedMenu callback.
6929         * UIProcess/API/gtk/WebKitContextMenuClient.h: Added.
6930         * UIProcess/API/gtk/WebKitWebView.cpp:
6931         (webkitWebViewConstructed): Attach context menu client to view.
6932         (webkitWebViewCreateAndAppendDefaultMenuItems): Helper function to
6933         add default context menu items to the new context menu items vector.
6934         (webkitWebViewShouldShowInputMethodsMenu): Helper function to
6935         check whether to show the input methods submenu according to the
6936         gtk-show-input-method-menu GTK+ setting.
6937         (webkitWebViewCreateAndAppendInputMethodsMenuItem): Helper
6938         function to add input methods submenu to the new context menu
6939         items vector.
6940         (webkitWebViewContextMenu): Create a new context menu items vector
6941         containing default items and input methods submenu in case of
6942         editable content. The active content menu is populated using that
6943         new vector.
6944         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6945         (webkitWebViewBaseSetActiveContextMenu): Set the active context menu.
6946         (webkitWebViewBaseGetActiveContextMenu): Get the active context menu.
6947         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
6948         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
6949         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
6950         (WebKit::WebContextMenuProxyGtk::append): Helper method to add a
6951         new item to the context menu.
6952         (WebKit::WebContextMenuProxyGtk::populate): Add items to the
6953         context menu.
6954         (WebKit::WebContextMenuProxyGtk::showContextMenu): Populate the
6955         menu with the given items and popup the menu if it's not empty.
6956         (WebKit::WebContextMenuProxyGtk::hideContextMenu): Get the GtkMenu
6957         from the WebCore ContextMenu to popdown it.
6958         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Call
6959         webkitWebViewBaseSetActiveContextMenu() to set the menu as the current
6960         active one for the view.
6961         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Call
6962         webkitWebViewBaseSetActiveContextMenu() with NULL to reset the
6963         current active context of the view. GtkMenu is destroyed by
6964         WebCore ContextMenu in its destructor.
6965         * UIProcess/gtk/WebContextMenuProxyGtk.h:
6966
6967 2012-06-14  Christophe Dumez  <christophe.dumez@intel.com>
6968
6969         [WK2] Add implementation for registerIntentService in WebFrameLoaderClient
6970         https://bugs.webkit.org/show_bug.cgi?id=88399
6971
6972         Reviewed by Kenneth Rohde Christiansen.
6973
6974         Add implementation for registerIntentService() in
6975         WebFrameLoaderClient.
6976
6977         * CMakeLists.txt:
6978         * GNUmakefile.list.am:
6979         * Shared/API/c/WKBase.h:
6980         * Shared/APIClientTraits.h:
6981         * Shared/APIObject.h:
6982         * Shared/IntentServiceInfo.cpp: Added.
6983         (WebKit):
6984         (WebKit::IntentServiceInfo::encode):
6985         (WebKit::IntentServiceInfo::decode):
6986         * Shared/IntentServiceInfo.h: Added.
6987         (CoreIPC):
6988         (WebKit):
6989         (IntentServiceInfo):
6990         * Target.pri:
6991         * UIProcess/API/C/WKAPICast.h:
6992         (WebKit):
6993         * UIProcess/API/C/WKPage.h:
6994         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
6995         (attachLoaderClientToView):
6996         * UIProcess/WebIntentServiceInfo.cpp: Added.
6997         (WebKit):
6998         (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
6999         * UIProcess/WebIntentServiceInfo.h: Added.
7000         (WebKit):
7001         (WebIntentServiceInfo):
7002         (WebKit::WebIntentServiceInfo::create):
7003         (WebKit::WebIntentServiceInfo::~WebIntentServiceInfo):
7004         (WebKit::WebIntentServiceInfo::action):
7005         (WebKit::WebIntentServiceInfo::payloadType):
7006         (WebKit::WebIntentServiceInfo::href):
7007         (WebKit::WebIntentServiceInfo::title):
7008         (WebKit::WebIntentServiceInfo::disposition):
7009         (WebKit::WebIntentServiceInfo::type):
7010         * UIProcess/WebLoaderClient.cpp:
7011         (WebKit):
7012         (WebKit::WebLoaderClient::registerIntentServiceForFrame):
7013         * UIProcess/WebLoaderClient.h:
7014         (WebKit):
7015         (WebLoaderClient):
7016         * UIProcess/WebPageProxy.cpp:
7017         (WebKit):
7018         (WebKit::WebPageProxy::registerIntentServiceForFrame):
7019         * UIProcess/WebPageProxy.h:
7020         (WebKit):
7021         (WebPageProxy):
7022         * UIProcess/WebPageProxy.messages.in:
7023         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7024         (WebKit):
7025         (WebKit::WebFrameLoaderClient::registerIntentService):
7026         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
7027         (WebFrameLoaderClient):
7028
7029 2012-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
7030
7031         [WK2] Add WKHitTestResultIsContentEditable()
7032         https://bugs.webkit.org/show_bug.cgi?id=80597
7033
7034         Reviewed by Martin Robinson.
7035
7036         * Shared/WebHitTestResult.cpp:
7037         (WebKit::WebHitTestResult::Data::encode): Encode isContentEditable.
7038         (WebKit::WebHitTestResult::Data::decode): Decode isContentEditable.
7039         * Shared/WebHitTestResult.h:
7040         (Data): Add isContentEditable.
7041         (WebKit::WebHitTestResult::Data::Data): Initialize
7042         isContentEditable.
7043         (WebKit::WebHitTestResult::isContentEditable): Returns whether
7044         hit test result target is editable content.
7045         * UIProcess/API/C/WKHitTestResult.cpp:
7046         (WKHitTestResultIsContentEditable): C API to get whether hit test
7047         result target is editable content.
7048         * UIProcess/API/C/WKHitTestResult.h:
7049         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
7050         (webkitHitTestResultCreate): Add
7051         WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flags to the context if
7052         hit test result target is editable content.
7053         (webkit_hit_test_result_context_is_editable): Returns TRUE if
7054         WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flags is present in
7055         context.
7056         * UIProcess/API/gtk/WebKitHitTestResult.h:
7057         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
7058         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
7059         (testWebViewMouseTarget): Add tests for
7060         WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE.
7061
7062 2012-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
7063
7064         [WK2] Fix client interface size for WKPageLoaderClient.
7065         https://bugs.webkit.org/show_bug.cgi?id=88764
7066
7067         Reviewed by Anders Carlsson.
7068
7069         Fixes offset of WKPageLoaderClient for version 0 by adding didDetectXSSForFrame.
7070         The offset should be off the first new callback that was added in the new version.
7071
7072         * Shared/APIClientTraits.cpp:
7073         (WebKit):
7074
7075 2012-06-13  Christophe Dumez  <christophe.dumez@intel.com>
7076
7077         [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient
7078         https://bugs.webkit.org/show_bug.cgi?id=88340
7079
7080         Reviewed by Kenneth Rohde Christiansen.
7081
7082         Add implementation for dispatchIntent() in WebFrameLoaderClient.
7083
7084         * CMakeLists.txt:
7085         * GNUmakefile.list.am:
7086         * Shared/API/c/WKBase.h:
7087         * Shared/APIClientTraits.h:
7088         * Shared/APIObject.h:
7089         * Shared/IntentData.cpp: Added.
7090         (WebKit):
7091         (WebKit::IntentData::encode):
7092         (WebKit::IntentData::decode):
7093         * Shared/IntentData.h: Added.
7094         (CoreIPC):
7095         (WebKit):
7096         (IntentData):
7097         * Target.pri:
7098         * UIProcess/API/C/WKAPICast.h:
7099         (WebKit):
7100         * UIProcess/API/C/WKPage.h:
7101         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
7102         (attachLoaderClientToView):
7103         * UIProcess/WebIntentData.cpp: Added.
7104         (WebKit):
7105         (WebKit::WebIntentData::WebIntentData):
7106         (WebKit::WebIntentData::data):
7107         * UIProcess/WebIntentData.h: Added.
7108         (WebKit):
7109         (WebIntentData):
7110         (WebKit::WebIntentData::create):
7111         (WebKit::WebIntentData::~WebIntentData):
7112         (WebKit::WebIntentData::action):
7113         (WebKit::WebIntentData::payloadType):
7114         (WebKit::WebIntentData::extras):
7115         (WebKit::WebIntentData::suggestions):
7116         (WebKit::WebIntentData::type):
7117         * UIProcess/WebLoaderClient.cpp:
7118         (WebKit):
7119         (WebKit::WebLoaderClient::didReceiveIntentForFrame):
7120         * UIProcess/WebLoaderClient.h:
7121         (WebKit):
7122         (WebLoaderClient):
7123         * UIProcess/WebPageProxy.cpp:
7124         (WebKit):
7125         (WebKit::WebPageProxy::didReceiveIntentForFrame):
7126         * UIProcess/WebPageProxy.h:
7127         (WebKit):
7128         (WebPageProxy):
7129         * UIProcess/WebPageProxy.messages.in:
7130         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7131         (WebKit::WebFrameLoaderClient::dispatchIntent):
7132
7133 2012-06-13  Tim Horton  <timothy_horton@apple.com>
7134
7135         Rename _swapView:with: to _replaceView:with:
7136         https://bugs.webkit.org/show_bug.cgi?id=89037
7137
7138         Reviewed by Darin Adler.
7139         
7140         _swapView:with: is a misnomer - after calling it, the first view is no longer
7141         contained within the view hierarchy. "Replace" is a more accurate term.
7142
7143         * UIProcess/mac/WKFullScreenWindowController.mm:
7144         (-[WKFullScreenWindowController enterFullScreen:]):
7145         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
7146         (-[WKFullScreenWindowController _replaceView:with:]):
7147
7148 2012-06-13  Martin Robinson  <mrobinson@igalia.com>
7149
7150         [GTK] Add an accelerated compositing implementation for WebKit2
7151         https://bugs.webkit.org/show_bug.cgi?id=86037
7152
7153         Reviewed by Alejandro G. Castro.
7154
7155         Add an implementation of LayerTreeHost for GTK+ that uses TextureMapperGL.
7156         Later this implementation will fall back to using the ImageBuffer TextureMapper.
7157
7158         * GNUmakefile.am: Add new files to the compilation.
7159         * Shared/LayerTreeContext.h:
7160         (LayerTreeContext): The GTK+ version of the LayerTreeContext just holds window handle.
7161         * Shared/gtk/LayerTreeContextGtk.cpp: Copied from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp.
7162         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Added.
7163         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Added.
7164         Add this LayerTreeHost implementation that just creates a GL context from the widget X11 window ID.
7165         Later implementations might find a more cross-platform solution.
7166         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
7167         (WebKit::WebPage::platformInitialize): Initialize the native window handle to be zero.
7168         (WebKit::WebPage::widgetMapped): When mapping the widget, try to get the native window
7169         handle and send it to the WebProcess.
7170
7171 2012-06-13  Andras Becsi  <andras.becsi@nokia.com>
7172
7173         [Qt][WK2] ASSERT(m_rawAttributes.initialScale > 0) in QtViewportHandler::initialRect()
7174         https://bugs.webkit.org/show_bug.cgi?id=89026
7175
7176         Reviewed by Csaba Osztrogonác.
7177
7178         Only act on viewport attribute changes if the layout size is valid.
7179
7180         * UIProcess/qt/QtViewportHandler.cpp:
7181         (WebKit::QtViewportHandler::setInitialScaleIfNeeded):
7182         (WebKit::QtViewportHandler::viewportAttributesChanged):
7183
7184 2012-06-13  Brent Fulgham  <bfulgham@webkit.org>
7185
7186         [WinCairo] Build fix after Windows export definition file change.
7187
7188         * win/WebKit2CFLite.def: Add missing symbol exports.
7189
7190 2012-06-13  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
7191
7192         [Qt] Fixed visible content rect lost during page-load
7193         https://bugs.webkit.org/show_bug.cgi?id=88991
7194
7195         Reviewed by Kenneth Rohde Christiansen.
7196
7197         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7198         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
7199
7200 2012-06-13  Sheriff Bot  <webkit.review.bot@gmail.com>
7201
7202         Unreviewed, rolling out r120209.
7203         http://trac.webkit.org/changeset/120209
7204         https://bugs.webkit.org/show_bug.cgi?id=89007
7205
7206         Broke the WebKit2 mac build. (Requested by andersca on
7207         #webkit).
7208
7209         * CMakeLists.txt:
7210         * GNUmakefile.list.am:
7211         * Shared/API/c/WKBase.h:
7212         * Shared/APIClientTraits.h:
7213         * Shared/APIObject.h:
7214         * Shared/IntentData.cpp: Removed.
7215         * Shared/IntentData.h: Removed.
7216         * Target.pri:
7217         * UIProcess/API/C/WKAPICast.h:
7218         (WebKit):
7219         * UIProcess/API/C/WKPage.h:
7220         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
7221         (attachLoaderClientToView):
7222         * UIProcess/WebIntentData.cpp: Removed.
7223         * UIProcess/WebIntentData.h: Removed.
7224         * UIProcess/WebLoaderClient.cpp:
7225         * UIProcess/WebLoaderClient.h:
7226         (WebKit):
7227         (WebLoaderClient):
7228         * UIProcess/WebPageProxy.cpp:
7229         * UIProcess/WebPageProxy.h:
7230         (WebKit):
7231         (WebPageProxy):
7232         * UIProcess/WebPageProxy.messages.in:
7233         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7234         (WebKit::WebFrameLoaderClient::dispatchIntent):
7235
7236 2012-06-13  Alexis Menard  <alexis.menard@openbossa.org>
7237
7238         Web Inspector: add a way to get the remote inspector url for a given page.
7239         https://bugs.webkit.org/show_bug.cgi?id=88902
7240
7241         Reviewed by Jocelyn Turcotte.
7242
7243         Expose the remote inspector url for a given page in the API. If you want
7244         to create a web view and load directly the inspector for the page you want to inspect,
7245         it helps to get the url as it is impossible to figure it out from the API layer.
7246
7247         * UIProcess/API/qt/qquickwebview.cpp:
7248         (QQuickWebViewExperimental::remoteInspectorUrl):
7249         * UIProcess/API/qt/qquickwebview_p.h:
7250         * UIProcess/InspectorServer/WebInspectorServer.cpp:
7251         (WebKit):
7252         (WebKit::WebInspectorServer::inspectorUrlForPageID):
7253         * UIProcess/InspectorServer/WebInspectorServer.h:
7254         (WebInspectorServer):
7255         * UIProcess/InspectorServer/WebSocketServer.cpp:
7256         (WebKit::WebSocketServer::WebSocketServer):
7257         (WebKit::WebSocketServer::listen):
7258         (WebKit::WebSocketServer::close):
7259         * UIProcess/InspectorServer/WebSocketServer.h:
7260         (WebKit::WebSocketServer::bindAddress):
7261         (WebKit::WebSocketServer::port):
7262         (WebKit::WebSocketServer::serverState):
7263         (WebSocketServer):
7264         * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
7265         (WebKit::remoteInspectorPagePath):
7266         (WebKit):
7267         (WebKit::WebInspectorServer::inspectorUrlForPageID):
7268         (WebKit::WebInspectorServer::buildPageList):
7269         * UIProcess/WebInspectorProxy.h:
7270         (WebKit::WebInspectorProxy::remoteInspectionPageID):
7271
7272 2012-06-13  Christophe Dumez  <christophe.dumez@intel.com>
7273
7274         [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient
7275         https://bugs.webkit.org/show_bug.cgi?id=88340
7276
7277         Reviewed by Kenneth Rohde Christiansen.
7278
7279         Add implementation for dispatchIntent() in WebFrameLoaderClient.
7280
7281         * CMakeLists.txt:
7282         * GNUmakefile.list.am:
7283         * Shared/API/c/WKBase.h:
7284         * Shared/APIClientTraits.h:
7285         * Shared/APIObject.h:
7286         * Shared/IntentData.cpp: Added.
7287         (WebKit):
7288         (WebKit::IntentData::encode):
7289         (WebKit::IntentData::decode):
7290         * Shared/IntentData.h: Added.
7291         (CoreIPC):
7292         (WebKit):
7293         (IntentData):
7294         * Target.pri:
7295         * UIProcess/API/C/WKAPICast.h:
7296         (WebKit):
7297         * UIProcess/API/C/WKPage.h:
7298         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
7299         (attachLoaderClientToView):
7300         * UIProcess/WebIntentData.cpp: Added.
7301         (WebKit):
7302         (WebKit::WebIntentData::WebIntentData):
7303         (WebKit::WebIntentData::data):
7304         * UIProcess/WebIntentData.h: Added.
7305         (WebKit):
7306         (WebIntentData):
7307         (WebKit::WebIntentData::create):
7308         (WebKit::WebIntentData::~WebIntentData):
7309         (WebKit::WebIntentData::action):
7310         (WebKit::WebIntentData::payloadType):
7311         (WebKit::WebIntentData::extras):
7312         (WebKit::WebIntentData::suggestions):
7313         (WebKit::WebIntentData::type):
7314         * UIProcess/WebLoaderClient.cpp:
7315         (WebKit):
7316         (WebKit::WebLoaderClient::didReceiveIntentForFrame):
7317         * UIProcess/WebLoaderClient.h:
7318         (WebKit):
7319         (WebLoaderClient):
7320         * UIProcess/WebPageProxy.cpp:
7321         (WebKit):
7322         (WebKit::WebPageProxy::didReceiveIntentForFrame):
7323         * UIProcess/WebPageProxy.h:
7324         (WebKit):
7325         (WebPageProxy):
7326         * UIProcess/WebPageProxy.messages.in:
7327         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7328         (WebKit::WebFrameLoaderClient::dispatchIntent):
7329
7330 2012-06-13  Balazs Kelemen  <kbalazs@webkit.org>
7331
7332         [Qt][WK2] Scanning plugins blocks the UI for a long time
7333         https://bugs.webkit.org/show_bug.cgi?id=88535
7334
7335         Reviewed by Simon Hausmann.
7336
7337         Implement a persistent cache for the meta data of plugins.
7338         This way the UI process will not block for too long when
7339         it's time to scan the plugins (except the first time).
7340         The cache is a json file stored in a standard hidden cache
7341         directory.
7342
7343         * Shared/qt/QtDefaultDataLocation.cpp: Added.
7344         (WebKit):
7345         (WebKit::defaultDataLocation):
7346         * Shared/qt/QtDefaultDataLocation.h: Added.
7347         (WebKit):
7348         Added a common helper for the path we use to
7349         put stuff into.
7350
7351         * Target.pri:
7352         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
7353         (WebKit::cacheFile):
7354         (WebKit):
7355         (WebKit::readMetaDataFromCacheFile):
7356         (WebKit::writeToCacheFile):
7357         (WebKit::appendToCacheFile):
7358         (WebKit::tryReadPluginMetaDataFromCacheFile):
7359         (WebKit::PluginProcessProxy::scanPlugin):
7360         * UIProcess/qt/WebContextQt.cpp:
7361
7362 2012-06-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
7363
7364         [Qt] Do not set contents pos to the current position
7365         https://bugs.webkit.org/show_bug.cgi?id=88990
7366
7367         Reviewed by Laszlo Gombos.
7368
7369         This is basically an optimization but it also solves flickering
7370         in some cases.
7371
7372         * UIProcess/API/qt/qquickwebview.cpp:
7373         (QQuickWebView::setContentPos):
7374
7375 2012-06-12  MORITA Hajime  <morrita@google.com>
7376
7377         Shadow Pseudo ID should be able to nest to point nested shadow DOM.
7378         https://bugs.webkit.org/show_bug.cgi?id=62218
7379
7380         Reviewed by Dimitri Glazkov.
7381
7382         * win/WebKit2.def:
7383         * win/WebKit2CFLite.def:
7384
7385 2012-06-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
7386
7387         Unreviewed build fix.
7388
7389         * UIProcess/qt/QtViewportHandler.cpp:
7390         (WebKit::QtViewportHandler::initialRect):
7391
7392 2012-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
7393
7394         Using extrernal ICU library on case unsensitive drives will not work
7395         https://bugs.webkit.org/show_bug.cgi?id=70913
7396
7397         Reviewed by Csaba Osztrogonác.
7398
7399         * WebProcess/WebPage/UpdateAtlas.cpp:
7400
7401 2012-06-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
7402
7403         [Qt] Do not move/scale content while the user is interacting with it
7404         https://bugs.webkit.org/show_bug.cgi?id=88872
7405
7406         Reviewed by Simon Hausmann.
7407
7408         Don't try moving content into valid bounds when the content
7409         size changes and the user is interacting with the content.
7410
7411         Only apply the viewport initial scale after user interaction
7412         has ended.
7413
7414         * UIProcess/qt/QtViewportHandler.cpp:
7415         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
7416         (WebKit::QtViewportHandler::setInitialScaleIfNeeded):
7417         (WebKit::QtViewportHandler::viewportAttributesChanged):
7418         (WebKit::QtViewportHandler::pageContentsSizeChanged):
7419         (WebKit::QtViewportHandler::initialRect):
7420         (WebKit):
7421         * UIProcess/qt/QtViewportHandler.h:
7422         (QtViewportHandler):
7423
7424 2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
7425
7426         [DRT] LTC:: counterValueForElementById() could be moved to Internals.
7427         https://bugs.webkit.org/show_bug.cgi?id=84406
7428
7429         Reviewed by Hajime Morita.
7430
7431         Exporting Internals::counterValueForElement symbols for the win build.
7432
7433         * win/WebKit2.def:
7434
7435 2012-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
7436
7437         [CMAKE][WK2] Make WebProcess target name more clear.
7438         https://bugs.webkit.org/show_bug.cgi?id=88767
7439
7440         Reviewed by Ryosuke Niwa.
7441
7442         * CMakeLists.txt: Change WebProcess_NAME to WebProcess_EXECUTABLE_NAME.
7443
7444 2012-06-11  Alexis Menard  <alexis.menard@openbossa.org>
7445
7446         [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
7447         https://bugs.webkit.org/show_bug.cgi?id=88804
7448
7449         Reviewed by Tony Chang.
7450
7451         Protect box-decoration-break behind a feature flag enabled by default.
7452
7453         * Configurations/FeatureDefines.xcconfig:
7454
7455 2012-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
7456
7457         [CMAKE][EFL] Remove duplicated executable output path
7458         https://bugs.webkit.org/show_bug.cgi?id=88765
7459
7460         Reviewed by Daniel Bates.
7461
7462         CMake files for EFL port have redefined executable output path. However, EFL port doesn't
7463         need to define again because it is already defined in top-level CMake file.
7464
7465         * CMakeLists.txt:
7466
7467 2012-06-11  Anders Carlsson  <andersca@apple.com>
7468
7469         Pass the right color space over to the web process so we can set it on our CA context
7470         https://bugs.webkit.org/show_bug.cgi?id=88819
7471         <rdar://problem/11629050>
7472
7473         Reviewed by John Sullivan.
7474
7475         * Platform/mac/LayerHostingContext.h:
7476         (LayerHostingContext):
7477         * Platform/mac/LayerHostingContext.mm:
7478         (WebKit::LayerHostingContext::createForPort):
7479         (WebKit::LayerHostingContext::createForWindowServer):
7480         Use a single constructor and explicitly set up the parameters of the constructed object.
7481
7482         (WebKit::LayerHostingContext::setColorSpace):
7483         (WebKit::LayerHostingContext::colorSpace):
7484         Add getter and setter.
7485
7486         * Scripts/webkit2/messages.py:
7487         (struct_or_class):
7488         WebKit::ColorSpaceData is a struct.
7489
7490         * Shared/WebPageCreationParameters.cpp:
7491         Encode and decode the color space parameter.
7492
7493         * Shared/WebPageCreationParameters.h:
7494         Add the color space.
7495
7496         * Shared/mac/ColorSpaceData.h: Added.
7497         * Shared/mac/ColorSpaceData.mm: Added.
7498         Add a new class that represents a color space that can be sent over the wire.
7499
7500         * UIProcess/API/mac/PageClientImpl.h:
7501         * UIProcess/API/mac/PageClientImpl.mm:
7502         (WebKit::PageClientImpl::colorSpace):
7503         Call through to the WKView.
7504
7505         * UIProcess/API/mac/WKView.mm:
7506         (-[WKView _windowDidChangeBackingProperties:]):
7507         Fix whitespace.
7508
7509         (-[WKView viewDidChangeBackingProperties]):
7510         Check if our new color space is different from the current one and null the current one out if that is the case,
7511         it will be reinitialized by the next call to -[WKView _colorSpace].
7512         
7513         (-[WKView _colorSpace:]):
7514         Compute the color space. If we're not in a window we'll get the main screen's color space.
7515
7516         * UIProcess/DrawingAreaProxy.h:
7517         (WebKit::DrawingAreaProxy::colorSpaceDidChange):
7518         Add empty stub.
7519
7520         * UIProcess/PageClient.h:
7521         Add colorSpace getter.
7522
7523         * UIProcess/WebPageProxy.cpp:
7524         (WebKit::WebPageProxy::creationParameters):
7525         Initialize the color space.
7526
7527         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
7528         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
7529         (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
7530         Send the new color space over to the web process.
7531
7532         * UIProcess/mac/WebPageProxyMac.mm:
7533         (WebKit::WebPageProxy::colorSpace):
7534         Call through to the page client.
7535
7536         * WebKit2.xcodeproj/project.pbxproj:
7537         Add ColorSpaceData.h and ColorSpaceData.mm.
7538
7539         * WebProcess/WebPage/DrawingArea.h:
7540         * WebProcess/WebPage/DrawingArea.messages.in:
7541         Add SetColorSpace message.
7542
7543         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
7544         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
7545         Set the color space from the creation parameters.
7546
7547         (WebKit::TiledCoreAnimationDrawingArea::setColorSpace):
7548         Set the color space on the layer hosting context.
7549
7550         (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
7551         Make sure we apply the color space from the previous layer hosting context if one exists.
7552
7553 2012-06-11  Anders Carlsson  <andersca@apple.com>
7554
7555         Crash when a plug-in tries to use the NPRuntime API with JavaScript disabled
7556         https://bugs.webkit.org/show_bug.cgi?id=88797
7557         <rdar://problem/11574844>
7558
7559         Reviewed by Brady Eidson.
7560
7561         * PluginProcess/PluginControllerProxy.cpp:
7562         (WebKit::PluginControllerProxy::initialize):
7563         Handle the windowNPObjectID being 0.
7564
7565         (WebKit::PluginControllerProxy::windowScriptNPObject):
7566         Handle m_windownPObject being null.
7567
7568         * WebProcess/Plugins/PluginView.cpp:
7569         (WebKit::PluginView::windowScriptNPObject):
7570         Return null if JavaScript is disabled.
7571
7572         (WebKit::PluginView::pluginElementNPObject):
7573         Ditto.
7574
7575 2012-06-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
7576
7577         Add QML api for setting device width and height
7578         https://bugs.webkit.org/show_bug.cgi?id=88777
7579
7580         Reviewed by Simon Hausmann.
7581
7582         Add the new API and set the default values to 0 (unset). The
7583         current values were introduced by Qt and only Qt depends on them.
7584
7585         * Shared/WebPreferencesStore.h:
7586         (WebKit):
7587         * UIProcess/API/qt/qquickwebview.cpp:
7588         (QQuickWebViewExperimental::deviceWidth):
7589         (QQuickWebViewExperimental::setDeviceWidth):
7590         (QQuickWebViewExperimental::deviceHeight):
7591         (QQuickWebViewExperimental::setDeviceHeight):
7592         * UIProcess/API/qt/qquickwebview_p.h:
7593         * UIProcess/qt/QtViewportHandler.cpp:
7594         (WebKit::QtViewportHandler::viewportItemSizeChanged):
7595         * WebProcess/WebPage/WebPage.cpp:
7596         (WebKit::WebPage::sendViewportAttributesChanged):
7597
7598 2012-06-11  Michael BrĂĽning  <michael.bruning@nokia.com>
7599
7600         [Qt][WK2] Compute and set cache capacities using the current CacheModel
7601         https://bugs.webkit.org/show_bug.cgi?id=73918
7602
7603         Reviewed by Kenneth Rohde Christiansen.
7604
7605         Added implementation of cache model for Qt WK 2 port including supporting
7606         functionality such as WebProcess creation parameters and default values
7607         for disk cache directories.
7608
7609         * Shared/WebProcessCreationParameters.cpp:
7610         (WebKit::WebProcessCreationParameters::encode):
7611         (WebKit::WebProcessCreationParameters::decode):
7612         * Shared/WebProcessCreationParameters.h:
7613         (WebProcessCreationParameters):
7614         * UIProcess/qt/WebContextQt.cpp:
7615         (WebKit::defaultDiskCacheDirectory):
7616         (WebKit):
7617         (WebKit::WebContext::platformInitializeWebProcess):
7618         * WebProcess/qt/WebProcessQt.cpp:
7619         (WebKit::physicalMemorySizeInBytes):
7620         (WebKit::WebProcess::platformSetCacheModel):
7621         (WebKit::WebProcess::platformInitializeWebProcess):
7622
7623 2012-06-10  Darin Adler  <darin@apple.com>
7624
7625         Remove unneeded callRemovedLastRef function from TreeShared refactoring
7626         https://bugs.webkit.org/show_bug.cgi?id=88653
7627
7628         Reviewed by Sam Weinig.
7629
7630         * win/WebKit2.def: Export removedLastRef instead of callRemovedLastRef.
7631         * win/WebKit2CFLite.def: Ditto.
7632
7633 2012-06-10  Ryuan Choi  <ryuan.choi@samsung.com>
7634
7635         [EFL][WK2] Add and refactor ewk API in order to support MiniBrowser without WK API.
7636         https://bugs.webkit.org/show_bug.cgi?id=84124
7637
7638         Reviewed by Chang Shu.
7639
7640         Modify ewk_view and add ewk_context to provide a platform-depedent WebKit2
7641         API.
7642         This patch provides the minimum to support MiniBrowser.
7643
7644         * PlatformEfl.cmake: add ewk_context.cpp.
7645         * UIProcess/API/efl/EWebKit2.h: Added.
7646         * UIProcess/API/efl/ewk_context.cpp: Added.
7647         (_Ewk_Context):
7648         (createDefaultWebContext):
7649         (ewk_context_WKContext_get):
7650         (ewk_context_default_get):
7651         * UIProcess/API/efl/ewk_context.h: Added.
7652         * UIProcess/API/efl/ewk_context_private.h: Added.
7653         * UIProcess/API/efl/ewk_view.cpp:
7654         (_Ewk_View_Private_Data):
7655         (_ewk_view_priv_del):
7656         (ewk_view_base_add):
7657         (ewk_view_add_with_context):
7658         (ewk_view_add):
7659         (ewk_view_uri_set):
7660         (ewk_view_uri_get):
7661         * UIProcess/API/efl/ewk_view.h:
7662         * UIProcess/API/efl/ewk_view_private.h:
7663
7664 2012-06-09  Sukolsak Sakshuwong  <sukolsak@google.com>
7665
7666         Add UNDO_MANAGER flag
7667         https://bugs.webkit.org/show_bug.cgi?id=87908
7668
7669         Reviewed by Tony Chang.
7670
7671         * Configurations/FeatureDefines.xcconfig:
7672
7673 2012-06-08  Brent Fulgham  <bfulgham@webkit.org>
7674         [WinCairo] Build fix after Windows export definition file change.
7675
7676         * win/WebKit2CFLite.def: This file needs to be kept in sync with
7677         WebKit2.def (aside from the WebKitInterface exports.)
7678
7679 2012-06-08  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
7680
7681         [Qt] [WK2] API tests randomly assert in WebLayerTreeRenderer::assignImageToLayer
7682         https://bugs.webkit.org/show_bug.cgi?id=88667
7683
7684         Reviewed by Noam Rosenthal.
7685
7686         Move deactivation of WebLayerTreeRenderer from LayerTreeHostProxy::purgeBackingStores 
7687         to WebLayerTreeRenderer::purgeGLResources. LayerTreeHostProxy::purgeBackingStores is 
7688         invoked on main thread after going through call gate and it is too late to deactivate
7689         renderer here, because some update messages are able to go through. 
7690         WebLayerTreeRenderer::purgeGLResources is called directly from render node deallocation
7691         and it is right place to deactivate renderer.
7692
7693         * UIProcess/LayerTreeHostProxy.cpp:
7694         (WebKit::LayerTreeHostProxy::purgeBackingStores):
7695         * UIProcess/WebLayerTreeRenderer.cpp:
7696         (WebKit::WebLayerTreeRenderer::purgeGLResources):
7697
7698 2012-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
7699
7700         [GTK] Add API to get the library version to WebKit2 GTK+
7701         https://bugs.webkit.org/show_bug.cgi?id=88426
7702
7703         Reviewed by Martin Robinson.
7704
7705         * GNUmakefile.am:
7706         * GNUmakefile.list.am:
7707         * UIProcess/API/gtk/WebKitVersion.cpp: Added.
7708         (webkit_get_major_version):
7709         (webkit_get_minor_version):
7710         (webkit_get_micro_version):
7711         * UIProcess/API/gtk/WebKitVersion.h.in: Added.
7712         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new symbols.
7713         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new section
7714         for WebKitVersion.
7715         * UIProcess/API/gtk/tests/GNUmakefile.am:
7716         * UIProcess/API/gtk/tests/TestWebKitVersion.cpp: Added.
7717         (testWebKitVersion):
7718         (testWebKitCheckVersion):
7719         (beforeAll):
7720         (afterAll):
7721         * UIProcess/API/gtk/webkit2.h: Include WebKitVersion.h.
7722
7723 2012-06-08  Dan Bernstein  <mitz@apple.com>
7724
7725         Tried to fix the Snow Leopard build after r119806.
7726
7727         * WebKit2Prefix.h:
7728
7729 2012-06-08  Andy Estes  <aestes@apple.com>
7730
7731         [WebKit2] Move Mac-specific bits from config.h to WebKit2Prefix.h
7732         https://bugs.webkit.org/show_bug.cgi?id=88625
7733
7734         Reviewed by Dan Bernstein.
7735
7736         Since the Mac supports prefix headers, there is no point in having
7737         Mac-specific code in WebKit2's config.h. Move it to WebKit2Prefix.h.
7738
7739         * WebKit2Prefix.h:
7740         * config.h:
7741
7742 2012-06-07  Kentaro Hara  <haraken@chromium.org>
7743
7744         Reduce Node object size from 72 byte to 64 byte
7745         https://bugs.webkit.org/show_bug.cgi?id=88528
7746
7747         Reviewed by Ryosuke Niwa.
7748
7749         Added a symbol for callRemovedLastRef().
7750
7751         * mac/WebKit2.order:
7752         * win/WebKit2.def:
7753         * win/WebKit2CFLite.def:
7754
7755 2012-06-07  Andy Estes  <aestes@apple.com>
7756
7757         [WebKit2] Explicitly include CoreFoundation.h in config.h
7758         https://bugs.webkit.org/show_bug.cgi?id=88619
7759
7760         Reviewed by Dan Bernstein.
7761
7762         WebKit2 relies (probably unintentionally) on CoreFoundation.h being
7763         included by CoreGraphics.h (via CGSession.h), but some versions of
7764         CoreGraphics headers don't include CoreFoundation.h. WebKit2 should
7765         include it explicitly in config.h.
7766
7767         * config.h: Import CoreFoundation.h.
7768
7769 2012-06-07  Andy Estes  <aestes@apple.com>
7770
7771         [WebKit2] Only include Cocoa.h on platforms that use AppKit
7772         https://bugs.webkit.org/show_bug.cgi?id=88517
7773
7774         Reviewed by Sam Weinig.
7775
7776         * WebKit2Prefix.h: Include Platform.h to get USE() macros. GTK needs to
7777         include autotoolsconfig.h before including Platform.h, so do that first
7778         if building on GTK. Then, if compiling an Objective-C file, it's safe
7779         to include Foundation.h, but not necessarily Cocoa.h; only include the
7780         latter if USE(APPKIT) is true.
7781         * config.h: There's no need to import Cocoa.h since this is already
7782         imported in the prefix header.
7783
7784 2012-06-07  Anders Carlsson  <andersca@apple.com>
7785
7786         Search highlight does not scroll with the content of the page, and find overlay doesn't work, on large-enough window
7787         https://bugs.webkit.org/show_bug.cgi?id=88577
7788         <rdar://problem/11430118>
7789
7790         Reviewed by John Sullivan.
7791
7792         Prevent the page overlay layer from falling into tiled mode.
7793
7794         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
7795         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
7796
7797 2012-06-07  Alexander Færøy  <ahf@0x90.dk>
7798
7799         Add QML API tests for Device Pixel Ratio
7800         https://bugs.webkit.org/show_bug.cgi?id=88531
7801
7802         Reviewed by Kenneth Rohde Christiansen.
7803
7804         This patch adds an initial test case for the QML device pixel ratio
7805         API. The test currently fails and is therefore marked as being
7806         expected to fail. This will be fixed in a separated patch.
7807
7808         * UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml: Added.
7809
7810 2012-06-07  Christophe Dumez  <christophe.dumez@intel.com>
7811
7812         [EFL][WK2] WebKit2-EFL does not link in debug mode
7813         https://bugs.webkit.org/show_bug.cgi?id=88518
7814
7815         Unreviewed. Fix WebKit2-EFL linking error in debug mode.
7816
7817         * CMakeLists.txt:
7818
7819 2012-06-07  Simon Pena  <spena@igalia.com>
7820
7821         [GTK] Fix broken build due to missing <SECTION> in GTK-DOC
7822         https://bugs.webkit.org/show_bug.cgi?id=88525
7823
7824         Unreviewed gardening. Added missing <SECTION> tag.
7825
7826         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
7827
7828 2012-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
7829
7830         [GTK] Add API to register custom URI schemes to WebKit2 GTK+ API
7831         https://bugs.webkit.org/show_bug.cgi?id=84133
7832
7833         Reviewed by Martin Robinson.
7834
7835         * GNUmakefile.list.am: Add new files to compilation.
7836         * UIProcess/API/gtk/WebKitPrivate.h:
7837         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Added.
7838         (didReceiveURIRequest): Callback emitted by the C API when a
7839         request for a custom URI scheme has been received. Call
7840         webkitWebContextReceivedURIRequest() to handle the request.
7841         (didFailToLoadURIRequest): Callback emitted by the C API when a
7842         request for a custom URI scheme failed to load. Call
7843         webkitWebContextDidFailToLoadURIRequest() to noitfy the web
7844         context.
7845         (attachRequestManagerClientToContext): Initialize the
7846         WKSoupRequestManagerClient.
7847         * UIProcess/API/gtk/WebKitRequestManagerClient.h: Added.
7848         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Added.
7849         (webkit_uri_scheme_request_init):
7850         (webkitURISchemeRequestFinalize):
7851         (webkit_uri_scheme_request_class_init):
7852         (webkitURISchemeRequestCreate): Create a new
7853         WebKitURISchemeRequest for the given URI and request identifier.
7854         (webkitURISchemeRequestGetID): Return the request identifier.
7855         (webkitURISchemeRequestCancel): Cancel the request operation.
7856         (webkit_uri_scheme_request_get_scheme): Return the scheme of the
7857         request.
7858         (webkit_uri_scheme_request_get_uri): Return the full URI of the
7859         request.
7860         (webkit_uri_scheme_request_get_path): Return the path of the URI.
7861         (webkitURISchemeRequestReadCallback): Read callback emitted when
7862         reading the contents of the input stream.
7863         (webkit_uri_scheme_request_finish): Finish the request by reading
7864         the contents of the input stream and sending the data to the
7865         WebProcess.
7866         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Added.
7867         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h: Added.
7868         * UIProcess/API/gtk/WebKitWebContext.cpp:
7869         (WebKitURISchemeHandler::WebKitURISchemeHandler): Helper struct to
7870         save callback and user data of registered URI schemes.
7871         (createDefaultWebContext): Initialize the SoupRequestManager.
7872         (webkit_web_context_register_uri_scheme): Public API to register a
7873         custom URI scheme providing a callback that will be called to
7874         handle requests for that URI scheme.
7875         (webkitWebContextGetRequestManager): Helper private method to
7876         return the SoupRequestManager.
7877         (webkitWebContextReceivedURIRequest): Get the
7878         WebKitURISchemeHandler for the given request identifier and call
7879         the callback. Save the request in the request map.
7880         (webkitWebContextDidFailToLoadURIRequest): Cancel the ongoing
7881         request.
7882         (webkitWebContextDidFinishURIRequest): Remove the request from the
7883         map.
7884         * UIProcess/API/gtk/WebKitWebContext.h:
7885         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
7886         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
7887         WebKitURISchemeRequest section.
7888         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
7889         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
7890         webkit_uri_scheme_request_get_type.
7891         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
7892         (testWebContextURIScheme):
7893         (beforeAll):
7894         * UIProcess/API/gtk/webkit2.h: Include WebKitURISchemeRequest.h.
7895
7896 2012-06-07  Andras Becsi  <andras.becsi@nokia.com>
7897
7898         [Qt][WK2] setPageItemRectVisible() is not guarded by ViewportUpdateDeferrer at scaleAnimationValueChanged()
7899         https://bugs.webkit.org/show_bug.cgi?id=87954
7900
7901         Reviewed by Kenneth Rohde Christiansen.
7902
7903         Resetting the end value, the easing curve or the duration of the scale animation triggers
7904         a recalculation of the animation interval. This might change the current value of the
7905         animated property.
7906         Since guarding of setPageItemRectVisible() relies on animation state change we have to
7907         make sure we only act on animation value changes if the animation is in active state.
7908
7909         * UIProcess/qt/QtViewportHandler.cpp:
7910         (WebKit::QtViewportHandler::QtViewportHandler):
7911         (WebKit::QtViewportHandler::animatePageItemRectVisible):
7912         (WebKit::QtViewportHandler::scaleAnimationValueChanged):
7913
7914 2012-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
7915
7916         [SOUP] WebSoupRequestManager should handle loading errors and zero-length replies
7917         https://bugs.webkit.org/show_bug.cgi?id=88087
7918
7919         Reviewed by Martin Robinson.
7920
7921         * UIProcess/API/C/soup/WKSoupRequestManager.h:
7922         * UIProcess/soup/WebSoupRequestManagerClient.cpp:
7923         (WebKit::WebSoupRequestManagerClient::didFailToLoadURIRequest):
7924         Call didFailToLoadURIRequest in the client if present.
7925         * UIProcess/soup/WebSoupRequestManagerClient.h:
7926         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
7927         (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
7928         Initialize m_loadFailed.
7929         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData):
7930         Don't send more data to the web process if the resource failed to
7931         load.
7932         (WebKit::WebSoupRequestManagerProxy::didFailToLoadURIRequest): Set
7933         m_loadFailed and notifiy the client calling didFailToLoadURIRequest.
7934         * UIProcess/soup/WebSoupRequestManagerProxy.h:
7935         * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Add
7936         DidFailToLoadURIRequest message.
7937         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
7938         (webkitSoupRequestGenericSendAsync): Pass the cancellable to the
7939         WebSoupRequestManager.
7940         * WebProcess/soup/WebSoupRequestManager.cpp:
7941         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData): Helper
7942         struct to save requests.
7943         (WebSoupRequestAsyncData): Add a weak pointer to invalidate the
7944         request when it's destroyed before the operation has finished.
7945         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
7946         Remove the weak pointer.
7947         (WebKit::WebSoupRequestAsyncData::requestFailed): Return whther
7948         the request failed.
7949         (WebKit::WebSoupRequestAsyncData::releaseResult): Return the
7950         result and clear the pointer.
7951         (WebKit::WebSoupRequestManager::didHandleURIRequest): Create and
7952         empty memory stream for zero-length replies instead of creating an
7953         error.
7954         (WebKit::WebSoupRequestManager::didReceiveURIRequestData): If the
7955         request failed and more data expected from the UI process, send a
7956         message to the UI process to notify that the resource load failed.
7957         (WebKit::WebSoupRequestManager::send): Save request information in
7958         the request map.
7959         * WebProcess/soup/WebSoupRequestManager.h:
7960
7961 2012-06-06  Andy Estes  <aestes@apple.com>
7962
7963         Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
7964         https://bugs.webkit.org/show_bug.cgi?id=88504
7965
7966         Reviewed by Dan Bernstein.
7967
7968         uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
7969         by NSResponder that subclasses are expected to implement. WebKit should
7970         only support these implementations on platforms that use AppKit.
7971
7972         * UIProcess/WebPageProxy.h:
7973         * WebProcess/WebCoreSupport/WebEditorClient.h:
7974         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
7975         * WebProcess/WebPage/WebPage.cpp:
7976         * WebProcess/WebPage/WebPage.h:
7977         * WebProcess/WebPage/WebPage.messages.in:
7978
7979 2012-06-06  chandra Shekar Vallala  <chandra.vallala@motorola.com>
7980
7981         [WK2-Gtk]Compilation errors with flag CONTEXT_MENUS=0
7982         https://bugs.webkit.org/show_bug.cgi?id=87842
7983
7984         Reviewed by Martin Robinson.
7985
7986         Fix for compilation errors while building webkit2-gtk with CONTEXT_MENUS=0
7987
7988         * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Added code under CONTEXT_MENUS CC
7989         * UIProcess/gtk/WebContextMenuProxyGtk.h: Ditto
7990         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Ditto
7991
7992 2012-06-06  Michael BrĂĽning  <michael.bruning@nokia.com>
7993
7994         [Qt][WK2] Add preferredMinimumContentsWidth to the viewport info in MiniBrowser.
7995         https://bugs.webkit.org/show_bug.cgi?id=88327
7996
7997         Reviewed by Kenneth Rohde Christiansen.
7998
7999         * UIProcess/API/qt/qquickwebview.cpp:
8000         (QQuickWebViewExperimental::setPreferredMinimumContentsWidth):
8001         * UIProcess/API/qt/qquickwebview_p.h:
8002
8003 2012-06-06  Tim Horton  <timothy_horton@apple.com>
8004
8005         WebPage::windowIsVisible is incorrect during resumePainting
8006         https://bugs.webkit.org/show_bug.cgi?id=88374
8007         <rdar://problem/11587039>
8008
8009         Reviewed by Simon Fraser.
8010
8011         Currently, when changing window visibility, WKView calls viewStateDidChange(ViewIsVisible)
8012         and then _updateWindowVisibility. This means that during viewStateDidChange, the WebPage's
8013         windowIsVisible state is incorrect.
8014
8015         viewStateDidChange(ViewIsVisible) can end up in (one of the DrawingArea implementations)::resumePainting(),
8016         which uses windowIsVisible to determine whether or not to unpause requestAnimationFrame.
8017
8018         This results in a state where, with some configurations, doing the following:
8019
8020             1. requestAnimationFrame()
8021             2. requestFullScreen()
8022             3. requestAnimationFrame()
8023             4. cancelFullScreen()
8024             5. requestAnimationFrame()
8025
8026         Will cause the second and third rAF calls to have no effect. Even after cancelFullScreen() is called,
8027         the fact that we have had unpaired suspend/resumeScriptedAnimations will cause the suspend count
8028         on the ScriptedAnimationController to never return to zero, which will cause us to never
8029         recover rAF functionality.
8030
8031         The fix is very simple: we should _updateWindowVisibility *before* viewStateDidChange, so that it is
8032         always correct for any code called underneath that method.
8033
8034         * UIProcess/API/mac/WKView.mm:
8035         (-[WKView viewDidMoveToWindow]):
8036         (-[WKView _windowDidOrderOffScreen:]):
8037         (-[WKView _windowDidOrderOnScreen:]):
8038
8039 2012-06-05  Dinu Jacob  <dinu.jacob@nokia.com>
8040
8041         [Qt][WK2] Use Component.onCompleted in API tests for single and multi file upload tests.
8042         https://bugs.webkit.org/show_bug.cgi?id=88247
8043
8044         Reviewed by Kenneth Rohde Christiansen.
8045
8046         With r116936, Component.onCompleted can be used for callback instead of the
8047         1s timer in single and multi file upload tests.
8048
8049         * UIProcess/API/qt/tests/qmltests/WebView/tst_multiFileUpload.qml:
8050         * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml:
8051
8052 2012-06-04  Stephanie Lewis  <slewis@apple.com>
8053
8054         https://bugs.webkit.org/show_bug.cgi?id=88370
8055         Memory sampler should trigger low memory signal
8056
8057         Reviewed by Geoff Garen.
8058
8059         Send low memory signal when running the memory sampler.  We'd
8060         like to test memory that cannot be freed.
8061
8062         * Shared/WebMemorySampler.cpp:
8063         (WebKit::WebMemorySampler::sampleTimerFired):
8064         * Shared/WebMemorySampler.h:
8065         (WebMemorySampler):
8066         * Shared/mac/WebMemorySampler.mac.mm:
8067         (WebKit):
8068         (WebKit::WebMemorySampler::sendMemoryPressureEvent):
8069
8070 2012-06-05  Brady Eidson  <beidson@apple.com>
8071
8072         <rdar://problem/11575898> and https://bugs.webkit.org/show_bug.cgi?id=88372
8073         REGRESSION(110494): Can no longer drag-and-drop links into FileMaker Pro 12
8074
8075         - Before r110494 we used to write the NSStringPboardType to the pasteboard.
8076           After r110494 we write NSURLPboardType instead.
8077           That's basically a no-op, but the NSStringPboardType needs to be restored.
8078         - Before r110494 we wrote the link destination URL to the pasteboard.
8079           After r110494 we write the image src URL if the link is an image.
8080           We need to revert to writing the link URL.
8081
8082         Fortunately these changes can be accomplished with a 2-line fix.
8083
8084         Reviewed by Enrica Casucci.
8085
8086         * UIProcess/API/mac/WKView.mm:
8087         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
8088         n
8089
8090 2012-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
8091
8092         [Qt] Implement log channel initialization for WebKit2
8093
8094         Reviewed by Alexis Menard.
8095
8096         * Platform/Logging.cpp:
8097         (WebKit):
8098         * Platform/Logging.h:
8099         (WebKit):
8100         * Platform/qt/LoggingQt.cpp: Copied from Source/WebKit2/Platform/gtk/LoggingGtk.cpp
8101         (WebKit):
8102         (WebKit::initializeLogChannel):
8103         * Target.pri:
8104
8105 2012-06-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
8106
8107         WebLayerTreeRenderer behaves wrongly when no contentsScale is set.
8108         https://bugs.webkit.org/show_bug.cgi?id=88357
8109
8110         Reviewed by Alexis Menard.
8111
8112         The contentsScale needs to get a default value in case no
8113         value is explicitely set yet.
8114         This fixes the blank-until-resize problem when running MiniBrowser
8115         in --desktop mode.
8116
8117         * UIProcess/WebLayerTreeRenderer.cpp:
8118         (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
8119
8120 2012-06-05  Alexis Menard  <alexis.menard@openbossa.org>
8121
8122         [Qt] Don't propagate viewport size changes if the viewport is empty.
8123         https://bugs.webkit.org/show_bug.cgi?id=88336
8124
8125         Reviewed by Tor Arne Vestbø.
8126
8127         Qt Quick sequentially set the x, y, width, height of the view. We really want to
8128         start propagating further when the size of the viewport becomes valid, i.e. both
8129         height and width are defined. In any case lower level classes are discarding an empty
8130         size such as WebPage::sendViewportAttributesChanged() so it was pointless to send the size
8131         through the IPC bus for nothing.
8132
8133         * UIProcess/API/qt/qquickwebview.cpp:
8134         (QQuickWebViewLegacyPrivate::updateViewportSize):
8135
8136 2012-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
8137
8138         [GTK] Add webkit_download_get_received_data_length to WebKit2 GTK+ API
8139         https://bugs.webkit.org/show_bug.cgi?id=88323
8140
8141         Reviewed by Martin Robinson.
8142
8143         * UIProcess/API/gtk/WebKitDownload.cpp:
8144         (webkit_download_get_received_data_length):
8145         * UIProcess/API/gtk/WebKitDownload.h:
8146         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
8147         * UIProcess/API/gtk/tests/TestDownloads.cpp:
8148
8149 2012-06-05  Dongwoo Im  <dw.im@samsung.com>
8150
8151         Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
8152         https://bugs.webkit.org/show_bug.cgi?id=73176
8153
8154         Reviewed by Adam Barth.
8155
8156         Two more APIs are added in Custom Scheme Handler specification.
8157         http://dev.w3.org/html5/spec/Overview.html#custom-handlers
8158         One is 'isProtocolHandlerRegistered' to query whether the specific URL
8159         is registered or not.
8160         The other is 'unregisterProtocolHandler' to remove the registered URL.
8161
8162         * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
8163
8164 2012-06-05  Christophe Dumez  <christophe.dumez@intel.com>
8165
8166         [EFL][WK2] WebKit2-EFL does not link with gold linker
8167         https://bugs.webkit.org/show_bug.cgi?id=88295
8168
8169         Unreviewed. Fix linking when using gold linker.
8170
8171         * PlatformEfl.cmake:
8172
8173 2012-06-05  Mario Sanchez Prada  <msanchez@igalia.com>
8174
8175         [GTK][WK2] Implement API for Geolocation permission requests in the GTK port
8176         https://bugs.webkit.org/show_bug.cgi?id=83879
8177
8178         Reviewed by Carlos Garcia Campos.
8179
8180         Added a new kind of permission request for supporting the
8181         Geolocation API in WebKit2GTK+.
8182
8183         New WebKitGeolocationPermissionRequest class, implementing the
8184         WebKitPermissionRequest interface, to enabling client applications
8185         to allow or deny geolocation permission requests.
8186
8187         * GNUmakefile.list.am: Added new files.
8188         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp: Added.
8189         (_WebKitGeolocationPermissionRequestPrivate):
8190         (webkitGeolocationPermissionRequestAllow):
8191         (webkitGeolocationPermissionRequestDeny):
8192         (webkit_permission_request_interface_init):
8193         (webkit_geolocation_permission_request_init):
8194         (webkitGeolocationPermissionRequestFinalize):
8195         (webkit_geolocation_permission_request_class_init):
8196         (webkitGeolocationPermissionRequestCreate):
8197         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h: Added.
8198         (_WebKitGeolocationPermissionRequest):
8199         (_WebKitGeolocationPermissionRequestClass):
8200         * UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h: Added.
8201
8202         Include WKGeolocationPermissionRequest.h in WebKitPrivate.h, so we
8203         can use it from the new WebKitGeolocationPermissionRequest class.
8204
8205         * UIProcess/API/gtk/WebKitPrivate.h: Added new include.
8206
8207         Implement geolocation permission requests in the UI client.
8208
8209         * UIProcess/API/gtk/WebKitUIClient.cpp:
8210         (decidePolicyForGeolocationPermissionRequest): Create a new
8211         instance of the WebKitGeolocationPermissionRequest class and call
8212         to webkitWebViewMakePermissionRequest().
8213         (attachUIClientToView): Provide an implementation function for
8214         decidePolicyForGeolocationPermissionRequest.
8215         * UIProcess/API/gtk/WebKitWebView.h: Add new element to
8216         WebKitPermissionRequestType enumeration for geolocation requests.
8217         * UIProcess/API/gtk/webkit2.h: Added header file for
8218         WebKitGeolocationPermissionRequest
8219
8220         New unit tests to test allowing and denying permission requests.
8221
8222         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
8223         (testWebViewPermissionRequests): New test that loads a simple HTML
8224         with JavaScript code requesting the current location.
8225         (beforeAll): Added new test.
8226
8227         Updated documentation files.
8228
8229         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
8230         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
8231
8232 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
8233
8234         [chromium] Fix software rendering for device-scale-factor > 1
8235         https://bugs.webkit.org/show_bug.cgi?id=88136
8236
8237         Reviewed by Darin Fisher.
8238
8239         Export WebCore::Page::setDeviceScaleFactor and WebCore::Settings::setDefaultDeviceScaleFactor.
8240
8241         * win/WebKit2.def:
8242         * win/WebKit2CFLite.def:
8243
8244 2012-06-04  Andy Estes  <aestes@apple.com>
8245
8246         Use ENABLE() and USE() macros in a few more places
8247         https://bugs.webkit.org/show_bug.cgi?id=88245
8248
8249         Reviewed by Anders Carlsson.
8250
8251         * UIProcess/API/C/WKPluginSiteDataManager.cpp: Only include npapi.h if
8252         Netscape plug-in API is enabled.
8253         * UIProcess/mac/CorrectionPanel.h: Wrap with USE(AUTOCORRECTION_PANEL)
8254         * WebProcess/Authentication/AuthenticationManager.cpp: Use the stub
8255         version of tryUsePlatformCertificateInfoForChallenge if
8256         Security.framework isn't available.
8257         * WebProcess/WebProcess.messages.in: Only generate two messages if
8258         Security.framework is available.
8259         * WebProcess/mac/KeychainItemShimMethods.mm: Wrap with
8260         USE(SECURITY_FRAMEWORK).
8261
8262 2012-06-04  Andy Estes  <aestes@apple.com>
8263
8264         Add stub WebKit2 implementations of PLUGIN_PROXY_FOR_VIDEO methods declared in FrameLoaderClient
8265         https://bugs.webkit.org/show_bug.cgi?id=88244
8266
8267         Reviewed by Anders Carlsson.
8268
8269         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
8270         (WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Add a stub implementation.
8271         (WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Ditto.
8272         (WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Ditto.
8273         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
8274
8275 2012-06-04  Mario Sanchez Prada  <msanchez@igalia.com>
8276
8277         [GTK][WK2] Implement geolocation provider for the GTK port
8278         https://bugs.webkit.org/show_bug.cgi?id=83877
8279
8280         Reviewed by Carlos Garcia Campos.
8281
8282         Add a new client-based geolocation provider for WebKit2GTK+, relying the
8283         new Geoclue-based geolocation provider available in WebCore.
8284
8285         * GNUmakefile.am:
8286         * GNUmakefile.list.am:
8287         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Added.
8288         (toGeolocationProvider):
8289         (startUpdatingCallback):
8290         (stopUpdatingCallback):
8291         (WebKitGeolocationProvider::~WebKitGeolocationProvider):
8292         (WebKitGeolocationProvider::create):
8293         (WebKitGeolocationProvider::WebKitGeolocationProvider):
8294         (WebKitGeolocationProvider::startUpdating):
8295         (WebKitGeolocationProvider::stopUpdating):
8296         (WebKitGeolocationProvider::notifyPositionChanged):
8297         (WebKitGeolocationProvider::notifyErrorOccurred):
8298         * UIProcess/API/gtk/WebKitGeolocationProvider.h: Added.
8299         * UIProcess/API/gtk/WebKitPrivate.h:
8300         * UIProcess/API/gtk/WebKitWebContext.cpp:
8301         (_WebKitWebContextPrivate):
8302         (createDefaultWebContext):
8303
8304 2012-06-04  Zalan Bujtas  <zbujtas@gmail.com>
8305
8306         [Qt][WK2] Rename QtViewportInteractionEngine to QtViewportHandler.
8307         https://bugs.webkit.org/show_bug.cgi?id=88226
8308
8309         Reviewed by Kenneth Rohde Christiansen.
8310
8311         * Target.pri:
8312         * UIProcess/API/qt/qquickwebpage_p_p.h:
8313         (WebKit):
8314         * UIProcess/API/qt/qquickwebview.cpp:
8315         (QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate):
8316         (QQuickWebViewFlickablePrivate::onComponentComplete):
8317         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
8318         (QQuickWebViewFlickablePrivate::updateViewportSize):
8319         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
8320         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
8321         * UIProcess/API/qt/qquickwebview_p.h:
8322         (WebKit):
8323         * UIProcess/API/qt/qquickwebview_p_p.h:
8324         (WebKit):
8325         (QQuickWebViewPrivate::viewportHandler):
8326         (QQuickWebViewFlickablePrivate::viewportHandler):
8327         (QQuickWebViewFlickablePrivate):
8328         * UIProcess/API/qt/qwebkittest.cpp:
8329         (QWebKitTest::contentsScale):
8330         (QWebKitTest::devicePixelRatio):
8331         (QWebKitTest::initialScale):
8332         (QWebKitTest::minimumScale):
8333         (QWebKitTest::maximumScale):
8334         (QWebKitTest::isScalable):
8335         (QWebKitTest::layoutSize):
8336         * UIProcess/qt/QtGestureRecognizer.cpp:
8337         (WebKit::QtGestureRecognizer::viewportHandler):
8338         * UIProcess/qt/QtGestureRecognizer.h:
8339         (WebKit):
8340         * UIProcess/qt/QtPanGestureRecognizer.cpp:
8341         (WebKit::QtPanGestureRecognizer::update):
8342         (WebKit::QtPanGestureRecognizer::finish):
8343         (WebKit::QtPanGestureRecognizer::cancel):
8344         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
8345         (WebKit::QtPinchGestureRecognizer::update):
8346         (WebKit::QtPinchGestureRecognizer::finish):
8347         (WebKit::QtPinchGestureRecognizer::cancel):
8348         * UIProcess/qt/QtViewportHandler.cpp: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp.
8349         (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
8350         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
8351         (ViewportUpdateDeferrer):
8352         (WebKit::QtViewportHandler::suspendPageContent):
8353         (WebKit::QtViewportHandler::resumePageContent):
8354         (WebKit::QtViewportHandler::cssScaleFromItem):
8355         (WebKit::QtViewportHandler::itemScaleFromCSS):
8356         (WebKit::QtViewportHandler::itemCoordFromCSS):
8357         (WebKit::QtViewportHandler::itemRectFromCSS):
8358         (WebKit::QtViewportHandler::QtViewportHandler):
8359         (WebKit::QtViewportHandler::~QtViewportHandler):
8360         (WebKit::QtViewportHandler::innerBoundedCSSScale):
8361         (WebKit::QtViewportHandler::outerBoundedCSSScale):
8362         (WebKit::QtViewportHandler::viewportAttributesChanged):
8363         (WebKit::QtViewportHandler::pageContentsSizeChanged):
8364         (WebKit::QtViewportHandler::setPageItemRectVisible):
8365         (WebKit::QtViewportHandler::animatePageItemRectVisible):
8366         (WebKit::QtViewportHandler::flickMoveStarted):
8367         (WebKit::QtViewportHandler::flickMoveEnded):
8368         (WebKit::QtViewportHandler::pageItemPositionChanged):
8369         (WebKit::QtViewportHandler::pageContentPositionRequested):
8370         (WebKit::QtViewportHandler::scaleAnimationStateChanged):
8371         (WebKit::QtViewportHandler::scaleAnimationValueChanged):
8372         (WebKit::QtViewportHandler::touchBegin):
8373         (WebKit::QtViewportHandler::touchEnd):
8374         (WebKit::QtViewportHandler::computePosRangeForPageItemAtScale):
8375         (WebKit::QtViewportHandler::focusEditableArea):
8376         (WebKit::QtViewportHandler::zoomToAreaGestureEnded):
8377         (WebKit::QtViewportHandler::nearestValidBounds):
8378         (WebKit::QtViewportHandler::setCSSScale):
8379         (WebKit::QtViewportHandler::currentCSSScale):
8380         (WebKit::QtViewportHandler::scrollAnimationActive):
8381         (WebKit::QtViewportHandler::panGestureActive):
8382         (WebKit::QtViewportHandler::panGestureStarted):
8383         (WebKit::QtViewportHandler::panGestureRequestUpdate):
8384         (WebKit::QtViewportHandler::panGestureEnded):
8385         (WebKit::QtViewportHandler::panGestureCancelled):
8386         (WebKit::QtViewportHandler::scaleAnimationActive):
8387         (WebKit::QtViewportHandler::cancelScrollAnimation):
8388         (WebKit::QtViewportHandler::interruptScaleAnimation):
8389         (WebKit::QtViewportHandler::pinchGestureActive):
8390         (WebKit::QtViewportHandler::pinchGestureStarted):
8391         (WebKit::QtViewportHandler::pinchGestureRequestUpdate):
8392         (WebKit::QtViewportHandler::pinchGestureEnded):
8393         (WebKit::QtViewportHandler::pinchGestureCancelled):
8394         (WebKit::QtViewportHandler::visibleContentsRect):
8395         (WebKit::QtViewportHandler::informVisibleContentChange):
8396         (WebKit::QtViewportHandler::viewportItemSizeChanged):
8397         (WebKit::QtViewportHandler::scaleContent):
8398         * UIProcess/qt/QtViewportHandler.h: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.h.
8399         (QtViewportHandler):
8400         * UIProcess/qt/QtViewportInteractionEngine.cpp: Removed.
8401         * UIProcess/qt/QtViewportInteractionEngine.h: Removed.
8402         * UIProcess/qt/QtWebPageEventHandler.cpp:
8403         (WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
8404         (WebKit::QtWebPageEventHandler::setViewportHandler):
8405         (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
8406         (WebKit::QtWebPageEventHandler::doneWithTouchEvent):
8407         (WebKit::QtWebPageEventHandler::didFindZoomableArea):
8408         * UIProcess/qt/QtWebPageEventHandler.h:
8409         (WebKit):
8410         (QtWebPageEventHandler):
8411         (WebKit::QtWebPageEventHandler::viewportHandler):
8412
8413 2012-06-04  David Kilzer  <ddkilzer@apple.com>
8414
8415         BUILD FIX: FeatureDefines.xcconfig should match across projects
8416
8417         * Configurations/FeatureDefines.xcconfig:
8418         - Add missing ENABLE_LEGACY_CSS_VENDOR_PREFIXES.
8419
8420 2012-06-04  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
8421
8422         [Qt] Tap-to-zoom overshoot animation.
8423         https://bugs.webkit.org/show_bug.cgi?id=87108
8424
8425         Reviewed by Tor Arne Vestbø.
8426
8427         Reverts the change in animation, so the default is more "neutral".
8428         This should be made configurable later.
8429
8430         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8431         (WebKit::QtViewportInteractionEngine::animatePageItemRectVisible):
8432
8433 2012-06-04  Andras Becsi  <andras.becsi@nokia.com>
8434
8435         [Qt][WK2] Refactor the tap gesture recognizer
8436         https://bugs.webkit.org/show_bug.cgi?id=88096
8437
8438         Reviewed by Simon Hausmann.
8439
8440         Refactor the tap gesture recognizer so that its internal state machine is
8441         self contained and independent of input event types.
8442         Also change the internal API for tap highlighting to make the code easier
8443         to understand on the caller side.
8444
8445         This patch makes the tap gesture recognizer more robust, consistent with
8446         other gesture recognizers and fixes some issues related to highlighting
8447         and link activation with respect to native touch events.
8448
8449         * UIProcess/qt/QtTapGestureRecognizer.cpp:
8450         (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
8451         (WebKit::QtTapGestureRecognizer::withinDistance):
8452         (WebKit::QtTapGestureRecognizer::update):
8453         (WebKit::QtTapGestureRecognizer::finish):
8454         (WebKit::QtTapGestureRecognizer::cancel):
8455         (WebKit::QtTapGestureRecognizer::highlightTimeout):
8456         (WebKit::QtTapGestureRecognizer::singleTapTimeout):
8457         (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
8458         (WebKit::QtTapGestureRecognizer::reset):
8459         * UIProcess/qt/QtTapGestureRecognizer.h:
8460         (QtTapGestureRecognizer):
8461         * UIProcess/qt/QtWebPageEventHandler.cpp:
8462         (WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
8463         (WebKit::QtWebPageEventHandler::activateTapHighlight):
8464         (WebKit::QtWebPageEventHandler::deactivateTapHighlight):
8465         (WebKit):
8466         (WebKit::QtWebPageEventHandler::handleSingleTapEvent):
8467         (WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
8468         (WebKit::QtWebPageEventHandler::doneWithTouchEvent):
8469         * UIProcess/qt/QtWebPageEventHandler.h:
8470         (QtWebPageEventHandler):
8471
8472 2012-06-02  Geoffrey Garen  <ggaren@apple.com>
8473
8474         Try to fix the Windows build.
8475
8476         * win/WebKit2.def:
8477         * win/WebKit2CFLite.def:
8478
8479 2012-06-02  Andy Estes  <aestes@apple.com>
8480
8481         [WebKit2] Use USE(), ENABLE(), and HAVE() macros in more places
8482         https://bugs.webkit.org/show_bug.cgi?id=88182
8483
8484         Reviewed by Sam Weinig.
8485
8486         Use USE(APPKIT):
8487         * Shared/mac/NativeWebKeyboardEventMac.mm:
8488         * Shared/mac/NativeWebMouseEventMac.mm:
8489         * Shared/mac/NativeWebWheelEventMac.mm:
8490         * Shared/mac/WebEventFactory.h:
8491         * UIProcess/API/mac/WKTextInputWindowController.h:
8492         * UIProcess/API/mac/WKTextInputWindowController.mm:
8493         * UIProcess/PageClient.h:
8494         * UIProcess/WebPageProxy.h:
8495
8496         Use ENABLE(NETSCAPE_PLUGIN_API):
8497         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
8498         (WKPluginSiteDataManagerClearSiteData):
8499         (WKPluginSiteDataManagerClearAllSiteData):
8500
8501         Use USE(AUTOCORRECTION_PANEL):
8502         * UIProcess/API/mac/PageClientImpl.h:
8503         * UIProcess/API/mac/PageClientImpl.mm:
8504         (WebKit::PageClientImpl::showCorrectionPanel):
8505         (WebKit::PageClientImpl::dismissCorrectionPanel):
8506         (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
8507         * UIProcess/mac/CorrectionPanel.mm:
8508
8509         Use HAVE(HOSTED_CORE_ANIMATION):
8510         * UIProcess/mac/WebContextMac.mm:
8511
8512         Put ENABLE(FULLSCREEN_API) in the right place:
8513         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
8514
8515         Remove unnecessary use of USE(APPKIT):
8516         * UIProcess/mac/WebPageProxyMac.mm:
8517
8518         Use USE(SECURITY_FRAMEWORK):
8519         * WebProcess/Authentication/mac/AuthenticationManager.mac.mm:
8520
8521         Use ENABLE(CONTEXT_MENUS):
8522         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
8523
8524         Use USE(SECURITY_FRAMEWORK):
8525         * WebProcess/WebProcess.h:
8526
8527         Remove unnecessary use of USE(SECURITY_FRAMEWORK):
8528         * WebProcess/mac/WebProcessMac.mm:
8529
8530 2012-06-02  Andy Estes  <aestes@apple.com>
8531
8532         Remove a duplicate INIT() from WebSystemInterface.mm
8533         https://bugs.webkit.org/show_bug.cgi?id=88181
8534
8535         Reviewed by Anders Carlsson.
8536
8537         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
8538         (InitWebCoreSystemInterface):
8539
8540 2012-06-02  Andy Estes  <aestes@apple.com>
8541
8542         Remove unnecessary import of <Cocoa/Cocoa.h>
8543         https://bugs.webkit.org/show_bug.cgi?id=88180
8544
8545         Reviewed by Sam Weinig.
8546
8547         * UIProcess/mac/WKFullKeyboardAccessWatcher.h:
8548
8549 2012-06-02  Andy Estes  <aestes@apple.com>
8550
8551         Ensure cpu_type_t is defined by including <mach/machine.h>
8552         https://bugs.webkit.org/show_bug.cgi?id=88178
8553
8554         Reviewed by Anders Carlsson.
8555
8556         * Shared/Plugins/PluginModuleInfo.h:
8557
8558 2012-06-02  Sam Weinig  <sam@webkit.org>
8559
8560         InjectedBundles' sandbox extensions don't do what we think they do
8561         https://bugs.webkit.org/show_bug.cgi?id=88177
8562
8563         Reviewed by Anders Carlsson.
8564
8565         This cannot be tested with our current infrastructure (or any modifications of the
8566         infrastructure I can think of) since it relies on the bundle being put outside
8567         the build directory where WebKit is put.
8568
8569         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
8570         (WebKit::InjectedBundle::load):
8571         Use SandboxExtension::consumePermanently() rather than consume(), otherwise,
8572         nulling out the SandboxExtension a few lines later invalidates the extension
8573         we just consumed.
8574
8575 2012-06-02  Dan Bernstein  <mitz@apple.com>
8576
8577         Reverted the last change.
8578
8579         * WebKit2.xcodeproj/project.pbxproj:
8580
8581 2012-06-02  Dan Bernstein  <mitz@apple.com>
8582
8583         Stop treating two Python scripts as private headers.
8584
8585         * WebKit2.xcodeproj/project.pbxproj: Removed model.py and parser.py from the Copy Headers
8586         build phase.
8587
8588 2012-06-02  Zeno Albisser  <zeno@webkit.org>
8589
8590         Fix and enable WebGL for WebKit2 on Qt.
8591         https://bugs.webkit.org/show_bug.cgi?id=86214
8592
8593         Added glue code to make use of GraphicsSurface
8594         as a backend for the webgl-canvas in case of WK2.
8595
8596         Reviewed by Noam Rosenthal.
8597
8598         * UIProcess/API/qt/qwebpreferences.cpp:
8599         (QWebPreferencesPrivate::testAttribute):
8600         (QWebPreferencesPrivate::setAttribute):
8601         (QWebPreferences::webGLEnabled):
8602         (QWebPreferences::setWebGLEnabled):
8603         * UIProcess/API/qt/qwebpreferences_p.h:
8604         * UIProcess/API/qt/qwebpreferences_p_p.h:
8605         Added WebGLEnabled enum to allow enabling/disabling of
8606         WebGL using QWebPreferences.
8607
8608         * UIProcess/LayerTreeHostProxy.cpp:
8609         (WebKit::LayerTreeHostProxy::syncCanvas):
8610         Dispatch syncCanvas calls to the apropriate
8611         WebLayerTreeRenderer.
8612
8613         * UIProcess/LayerTreeHostProxy.h:
8614         (LayerTreeHostProxy):
8615         * UIProcess/LayerTreeHostProxy.messages.in:
8616         * UIProcess/WebLayerTreeRenderer.h:
8617         (WebLayerTreeRenderer):
8618         * UIProcess/WebLayerTreeRenderer.cpp:
8619         (WebKit::WebLayerTreeRenderer::syncCanvas):
8620         (WebKit::WebLayerTreeRenderer::deleteLayer):
8621         (WebKit::WebLayerTreeRenderer::purgeGLResources):
8622         Create a TextureMapperSurfaceBackingStore for the canvas
8623         if necessary and pass or update the graphicsSurfaceToken
8624         for to be used with the backing store.
8625
8626         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
8627         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
8628         (WebCore):
8629         (WebCore::WebGraphicsLayer::setContentsToCanvas):
8630         (WebCore::WebGraphicsLayer::syncCanvas):
8631         Copy the multisample framebuffer contents onto the GraphicsSurface.
8632         Notify the UIProcess of the availability of a new texture.
8633         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
8634         Sync the canvas as well.
8635
8636         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
8637         Added a pure virtual function syncCanvas.
8638         This is guarded by PLATFORM(QT).
8639         (WebGraphicsLayerClient):
8640         (WebGraphicsLayer):
8641
8642         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
8643         (WebKit::LayerTreeHostQt::syncLayerChildren):
8644         (WebKit):
8645         (WebKit::LayerTreeHostQt::syncCanvas):
8646         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
8647         (LayerTreeHostQt):
8648
8649 2012-06-01  Brady Eidson  <beidson@apple.com>
8650
8651         <rdar://problem/11335622> and https://bugs.webkit.org/show_bug.cgi?id=88119
8652         REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call
8653         
8654         Followup to r119260
8655
8656         Rubber-stamped by Anders Carlsson. 
8657
8658         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
8659         (WebKit::NetscapePlugin::callSetWindow): Set the m_hasCalledSetWindow here...
8660         (WebKit::NetscapePlugin::geometryDidChange): ...instead of here.
8661
8662 2012-06-01  Brady Eidson  <beidson@apple.com>
8663
8664         <rdar://problem/11335622> and https://bugs.webkit.org/show_bug.cgi?id=88119
8665         REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call
8666
8667         Reviewed by Oliver Hunt.
8668
8669         Add a flag to NetscapePlugin to track whether or not NPP_SetWindow has ever been called.
8670         Check this flag in geometryDidChange to make sure every plug-in gets the call at least once.
8671
8672         "Everybody gets one.  Tell him, Peter."
8673         "Apparently everybody gets one."
8674         "Bingo."
8675
8676         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
8677         (WebKit::NetscapePlugin::NetscapePlugin):
8678         (WebKit::NetscapePlugin::geometryDidChange):
8679         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
8680         (NetscapePlugin):
8681
8682 2012-06-01  Dinu Jacob  <dinu.jacob@nokia.com>
8683
8684         [WK2] WebLayerTreeRenderer::setContentsSize called synchronously
8685         https://bugs.webkit.org/show_bug.cgi?id=88091
8686
8687         Reviewed by Noam Rosenthal.
8688
8689         Do not call WebLayerTreeRenderer::setContentsSize synchronously
8690         from LayerTreeHostProxy.
8691  
8692         * UIProcess/LayerTreeHostProxy.cpp:
8693         (WebKit::LayerTreeHostProxy::setContentsSize):
8694
8695 2012-06-01  Dinu Jacob  <dinu.jacob@nokia.com>
8696
8697         [Qt][WK2] Set QWebKitTest::isScalable default as false
8698         https://bugs.webkit.org/show_bug.cgi?id=88095
8699
8700         Reviewed by Tor Arne Vestbø.
8701
8702         Set QWebKitTest::isScalable default as false
8703
8704         * UIProcess/API/qt/qwebkittest.cpp:
8705         (QWebKitTest::isScalable):
8706
8707 2012-06-01  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
8708
8709         [Qt] Remove QtViewportInteractionEngine::pageItemSizeChanged.
8710         https://bugs.webkit.org/show_bug.cgi?id=88082
8711
8712         Reviewed by Kenneth Rohde Christiansen.
8713
8714         The function was causing flickering, and after testing it was verified
8715         that it was no longer needed either.
8716
8717         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8718         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
8719         * UIProcess/qt/QtViewportInteractionEngine.h:
8720         (QtViewportInteractionEngine):
8721
8722 2012-06-01  Dinu Jacob  <dinu.jacob@nokia.com>
8723
8724         [Qt][WK2] Contents not rendered in MiniBrowser for some pages
8725         https://bugs.webkit.org/show_bug.cgi?id=87922
8726
8727         Reviewed by Kenneth Rohde Christiansen.
8728
8729         Set drawing area visible contents rect if new visible contents rect is different from
8730         the previous one.
8731
8732         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8733         (WebKit::QtViewportInteractionEngine::informVisibleContentChange):
8734         * UIProcess/qt/QtViewportInteractionEngine.h:
8735         (QtViewportInteractionEngine):
8736
8737 2012-06-01  Kenneth Rohde Christiansen  <kenneth@webkit.org>
8738
8739         [Qt] Move suspension to QtViewportInteractionEngine
8740         https://bugs.webkit.org/show_bug.cgi?id=88078
8741
8742         Reviewed by Simon Hausmann.
8743
8744         Next step is to take care of visibility changes.
8745
8746         * UIProcess/API/qt/qquickwebview.cpp:
8747         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
8748         (QQuickWebViewFlickablePrivate::onComponentComplete):
8749         * UIProcess/API/qt/qquickwebview_p.h:
8750         * UIProcess/API/qt/qquickwebview_p_p.h:
8751         (QQuickWebViewPrivate):
8752         (QQuickWebViewFlickablePrivate):
8753         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8754         (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
8755         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
8756         (WebKit::QtViewportInteractionEngine::suspendPageContent):
8757         (WebKit):
8758         (WebKit::QtViewportInteractionEngine::resumePageContent):
8759         * UIProcess/qt/QtViewportInteractionEngine.h:
8760         (QtViewportInteractionEngine):
8761
8762 2012-06-01  Dinu Jacob  <dinu.jacob@nokia.com>
8763
8764         [Qt][W2] Qml Error in ViewportInfoItem.qml in MiniBrowser
8765         https://bugs.webkit.org/show_bug.cgi?id=87999
8766
8767         Reviewed by Kenneth Rohde Christiansen.
8768
8769         Return default viewport attributes rather than invalid QVariant.
8770
8771         * UIProcess/API/qt/qwebkittest.cpp:
8772         (QWebKitTest::contentsScale):
8773         (QWebKitTest::devicePixelRatio):
8774         (QWebKitTest::initialScale):
8775         (QWebKitTest::minimumScale):
8776         (QWebKitTest::maximumScale):
8777         (QWebKitTest::isScalable):
8778         (QWebKitTest::layoutSize):
8779
8780 2012-05-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
8781
8782         [Qt] Clean up our viewport handling mess
8783         https://bugs.webkit.org/show_bug.cgi?id=87977
8784
8785         Reviewed by Simon Hausmann.
8786
8787         Consolidated functionality from QQuickWebViewPrivate* into
8788         ViewportInteractionEngine that belongs there, in preparation for
8789         renaming ViewportInteractionEngine in the future.
8790
8791         Remove unneeded methods and move others to private.
8792
8793         * UIProcess/API/qt/qquickwebview.cpp:
8794         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
8795         (QQuickWebViewFlickablePrivate::onComponentComplete):
8796         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
8797         (QQuickWebViewFlickablePrivate::updateViewportSize):
8798         (QQuickWebViewFlickablePrivate::_q_resume):
8799         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
8800         * UIProcess/API/qt/qquickwebview_p.h:
8801         * UIProcess/API/qt/qquickwebview_p_p.h:
8802         (QQuickWebViewPrivate):
8803         (QQuickWebViewFlickablePrivate):
8804         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8805         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
8806         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
8807         (WebKit::QtViewportInteractionEngine::viewportAttributesChanged):
8808         (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged):
8809         (WebKit::QtViewportInteractionEngine::pageItemPositionChanged):
8810         (WebKit::QtViewportInteractionEngine::pageContentPositionRequested):
8811         (WebKit::QtViewportInteractionEngine::visibleContentsRect):
8812         (WebKit):
8813         (WebKit::QtViewportInteractionEngine::informVisibleContentChange):
8814         (WebKit::QtViewportInteractionEngine::viewportItemSizeChanged):
8815         * UIProcess/qt/QtViewportInteractionEngine.h:
8816         (WebKit):
8817         (QtViewportInteractionEngine):
8818
8819 2012-05-31  Hajime Morrita  <morrita@chromium.org>
8820
8821         REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac
8822         https://bugs.webkit.org/show_bug.cgi?id=86859
8823
8824         Reviewed by Ryosuke Niwa.
8825
8826         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
8827         (WebKit::WebEditorClient::requestCheckingOfString):
8828         * WebProcess/WebCoreSupport/WebEditorClient.h:
8829
8830 2012-05-31  Andy Estes  <aestes@apple.com>
8831
8832         [WebKit2] Remove nested #if conditions from messages.in files
8833         https://bugs.webkit.org/show_bug.cgi?id=88039
8834
8835         Reviewed by Filip Pizlo.
8836
8837         The code generator that processes messages.in files can't handle nested
8838         #if conditions. Sadly I added said conditions in r117700 but failed to
8839         verify the generated result. Un-nest the conditions I added.
8840
8841         * UIProcess/WebPageProxy.messages.in:
8842         * WebProcess/WebPage/WebPage.messages.in:
8843
8844 2012-05-31  Andy Estes  <aestes@apple.com>
8845
8846         Disentangle code that relies on USE(AUTOMATIC_TEXT_REPLACEMENT) from that which merely relies on PLATFORM(MAC)
8847         https://bugs.webkit.org/show_bug.cgi?id=87933
8848
8849         Reviewed by Dan Bernstein.
8850
8851         * WebProcess/WebCoreSupport/WebEditorClient.h:
8852         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
8853
8854 2012-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
8855
8856         [GTK] Add webkit_download_get_request to WebKit2 GTK+ API
8857         https://bugs.webkit.org/show_bug.cgi?id=87957
8858
8859         Reviewed by Martin Robinson.
8860
8861         * UIProcess/API/gtk/WebKitDownload.cpp:
8862         (webkit_download_get_request): Return the WebKitURIRequest
8863         representing the request that originated the download.
8864         * UIProcess/API/gtk/WebKitDownload.h:
8865         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
8866         * UIProcess/API/gtk/tests/TestDownloads.cpp:
8867         (testDownloadLocalFile):
8868         (testDownloadRemoteFile):
8869
8870 2012-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
8871
8872         [SOUP] WebProcess crashes when a download is started from an existing ResourceHandle
8873         https://bugs.webkit.org/show_bug.cgi?id=87953
8874
8875         Reviewed by Martin Robinson.
8876
8877         The output stream to write the downloaded data is created in the
8878         didReceiveResponse callback of the download client. When a
8879         download is created for an existing ResourceHandle (this happens
8880         for example when policy decision is download), the response has
8881         already been received. In this case we should make sure that the
8882         download client is notified about the response, so that when data
8883         actually arrives the output stream has already been created.
8884
8885         * WebProcess/Downloads/soup/DownloadSoup.cpp:
8886         (WebKit::Download::startWithHandle):
8887
8888 2012-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
8889
8890         [GTK] Fix webkit_web_view_can_execute_editing_command() API doc
8891         https://bugs.webkit.org/show_bug.cgi?id=87930
8892
8893         Reviewed by Martin Robinson.
8894
8895         * UIProcess/API/gtk/WebKitWebView.cpp:
8896
8897 2012-05-31  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
8898
8899         [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
8900         https://bugs.webkit.org/show_bug.cgi?id=87955
8901
8902         Reviewed by Simon Hausmann.
8903
8904         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
8905
8906 2012-05-31  Zalan Bujtas  <zbujtas@gmail.com>
8907
8908         [Qt][WK2] Add missing ViewportUpdateDeferrer guarding to setPageItemRectVisible() calls.
8909         https://bugs.webkit.org/show_bug.cgi?id=87936
8910
8911         Reviewed by Kenneth Rohde Christiansen.
8912
8913         * UIProcess/qt/QtViewportInteractionEngine.cpp:
8914         (WebKit::QtViewportInteractionEngine::viewportAttributesChanged):
8915         (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged):
8916
8917 2012-05-31  Keunsoon Lee  <keunsoon.lee@samsung.com>
8918
8919         [EFL][WK2] Add WKURLRequestEfl and WKURLResponseEfl
8920         https://bugs.webkit.org/show_bug.cgi?id=70231
8921
8922         Reviewed by Chang Shu.
8923
8924         These codes can be used for WKPageDecidePolicyForResponseCallback on page policy callbacks.
8925         The callback conveys WKURLResponseRef and WKURLRequestRef as parameter.
8926
8927         By the way, EFL browser needs content type from response to decide correct policy.
8928         Another information, cookie, is necessary with similar reason.
8929         But, there is no way to obtain such information on WebKit2 main stream, except for WKURLRequestCopyURL().
8930
8931         So, EFL port created those files to extract necessary information from WKURLResponseRef and WKURLRequestRef,
8932         and not to desturb WebKit2 main stream. 
8933
8934         * Shared/API/c/efl/WKURLRequestEfl.cpp: Added.
8935         (WKURLRequestEflCopyCookies): extracting cookie information from WKURLRequestRef.
8936         * Shared/API/c/efl/WKURLRequestEfl.h: Added.
8937         * Shared/API/c/efl/WKURLResponseEfl.cpp: Added.
8938         (WKURLResponseEflCopyContentType): extracting content type (i.e. MIME type) from WKURLResponseRef.
8939         * Shared/API/c/efl/WKURLResponseEfl.h: Added.
8940         * Shared/efl/WebCoreArgumentCodersEfl.cpp: Added.
8941         (CoreIPC):
8942         (CoreIPC::::encode):
8943         (CoreIPC::::decode):
8944         * Shared/efl/WebURLRequestEfl.cpp: Added.
8945         (WebKit):
8946         (WebKit::WebURLRequestEfl::WebURLRequestEfl):
8947         (WebKit::WebURLRequestEfl::cookies): obtaining cookie information from ResourceRequest.
8948         * Shared/efl/WebURLRequestEfl.h: Added.
8949         (WebKit):
8950         (WebURLRequestEfl):
8951         (WebKit::WebURLRequestEfl::create):
8952         * Shared/efl/WebURLResponseEfl.cpp: Added.
8953         (WebKit):
8954         (WebKit::WebURLResponseEfl::WebURLResponseEfl):
8955         (WebKit::WebURLResponseEfl::contentType): obtaining content type (i.e. MIME type) from ResourceResponse.
8956         * Shared/efl/WebURLResponseEfl.h: Added.
8957         (WebKit):
8958         (WebURLResponseEfl):
8959         (WebKit::WebURLResponseEfl::create):
8960
8961 2012-05-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
8962
8963         [EFL][WK2] Rename ewk_private.h to ewk_view_private.h
8964         https://bugs.webkit.org/show_bug.cgi?id=87923
8965
8966         Reviewed by Kenneth Rohde Christiansen.
8967
8968         EFL WK1 decided to divide up ewk_private.h into each file's XXX_private.h file in order to maintain
8969         internal functions more easily. EFL WK2 needs to adjust this as well.
8970
8971         * UIProcess/API/efl/PageClientImpl.cpp:
8972         * UIProcess/API/efl/ewk_view_private.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
8973         (WebCore):
8974         * UIProcess/cairo/BackingStoreCairo.cpp:
8975
8976 2012-05-31  Andy Estes  <aestes@apple.com>
8977
8978         Move the specification of framework and library linking out of WebKit2.xcodeproj and into WebKit2.xcconfig
8979         https://bugs.webkit.org/show_bug.cgi?id=87932
8980
8981         Reviewed by Dan Bernstein.
8982
8983         Doing this makes it easier to vary linking based on SDK or other factors.
8984
8985         * Configurations/WebKit2.xcconfig: Create FRAMEWORK_AND_LIBRARY_LDFLAGS,
8986         which specifies the same list of frameworks and libraries that were
8987         previously in WebKit2's 'Link Binary With Libraries' build phase, and
8988         append it to $(OTHER_LDFLAGS).
8989         * WebKit2.xcodeproj/project.pbxproj: Remove all frameworks and
8990         libraries from the 'Link Binary With Libraries' build phase.
8991
8992 2012-05-30  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
8993
8994         [GTK] [WK2] Memory leak in webkitWebViewBaseStartDrag
8995         https://bugs.webkit.org/show_bug.cgi?id=87756
8996
8997         Reviewed by Carlos Garcia Campos.
8998
8999         Fixed memory leaks in drag and drop by using adoptRef instead
9000         of just getting new references.
9001
9002         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
9003         (webkitWebViewBaseStartDrag):
9004
9005 2012-05-30  Luiz Agostini  <luiz.agostini@nokia.com>
9006
9007         [Qt] handled touchmove events should not cancel tap gesture recognition
9008         https://bugs.webkit.org/show_bug.cgi?id=87808
9009
9010         Reviewed by Kenneth Rohde Christiansen.
9011
9012         Tap gesture recognition should not be canceled if a touchmove event is handled
9013         by the web process.
9014
9015         * UIProcess/qt/QtWebPageEventHandler.cpp:
9016         (WebKit::QtWebPageEventHandler::doneWithTouchEvent):
9017
9018 2012-05-30  Mario Sanchez Prada  <msanchez@igalia.com>
9019
9020         [GTK][WK2] Errors in documentation about  webkit_web_view_run_javascript()
9021         https://bugs.webkit.org/show_bug.cgi?id=87866
9022
9023         Reviewed by Martin Robinson.
9024
9025         * UIProcess/API/gtk/WebKitWebView.cpp: Fix errors.
9026
9027 2012-05-30  Andy Estes  <aestes@apple.com>
9028
9029         WebProcessMainMac.mm doesn't need to import WKView.h.
9030
9031         Rubber-stamped by Anders Carlsson. 
9032
9033         * WebProcess/mac/WebProcessMainMac.mm:
9034
9035 2012-05-30  Marcelo Lira  <marcelo.lira@openbossa.org>
9036
9037         WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
9038         https://bugs.webkit.org/show_bug.cgi?id=58593
9039
9040         Adds the ability to change the pluginsEnabled flag in WebCore::Settings
9041         to WebKitTestRunner's LayoutTestController. The flag is modified via the
9042         public C API of the WebProcess.
9043
9044         Reviewed by Darin Adler.
9045
9046         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
9047         (WKBundleSetPluginsEnabled):
9048         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
9049         * WebProcess/InjectedBundle/InjectedBundle.cpp:
9050         (WebKit::InjectedBundle::setPluginsEnabled): Calls the setPluginsEnabled
9051         method for the WebCore::Settings of each WebCore::Page in the current
9052         page group.
9053         (WebKit):
9054         * WebProcess/InjectedBundle/InjectedBundle.h:
9055         (InjectedBundle):
9056
9057 2012-05-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
9058
9059         HashTable.h has using directives for std::pair and std::make_pair
9060         https://bugs.webkit.org/show_bug.cgi?id=29919
9061
9062         Reviewed by Darin Adler.
9063
9064         Change code to use std::pair and std::make_pair.
9065
9066         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
9067         (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable):
9068         * UIProcess/WebContext.cpp:
9069         (WebKit::WebContext::postMessageToInjectedBundle):
9070
9071 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9072
9073         Unreviewed: Fix wrongly typed Qt slot.
9074
9075         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9076         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
9077
9078 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9079
9080         [Qt] Move ViewportAttribute related methods to the interaction engine.
9081         https://bugs.webkit.org/show_bug.cgi?id=87855
9082
9083         Reviewed by Simon Hausmann.
9084
9085         Move the logic of didChange{ViewportProperties|ContentsSize} to the
9086         interaction engine and update our testing object.
9087
9088         * UIProcess/API/qt/qquickwebview.cpp:
9089         (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
9090         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
9091         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
9092         * UIProcess/API/qt/qquickwebview_p_p.h:
9093         (QQuickWebViewPrivate):
9094         * UIProcess/API/qt/qwebkittest.cpp:
9095         (QWebKitTest::contentsScale):
9096         (QWebKitTest::devicePixelRatio):
9097         (QWebKitTest::initialScale):
9098         (QWebKitTest::minimumScale):
9099         (QWebKitTest::maximumScale):
9100         (QWebKitTest::isScalable):
9101         (QWebKitTest::layoutSize):
9102         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9103         (WebKit::QtViewportInteractionEngine::viewportAttributesChanged):
9104         (WebKit):
9105         (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged):
9106         * UIProcess/qt/QtViewportInteractionEngine.h:
9107         (QtViewportInteractionEngine):
9108
9109 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9110
9111         [Qt] Do renames in ViewportInteractionEngine as agreed upon
9112         https://bugs.webkit.org/show_bug.cgi?id=87845
9113
9114         Reviewed by Simon Hausmann.
9115
9116         Mostly moving methods around and renaming them to be more
9117         consistent and avoid terminology clashes.
9118
9119         * UIProcess/API/qt/qquickwebview.cpp:
9120         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
9121         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
9122         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
9123         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9124         (WebKit::boundPosition):
9125         (WebKit):
9126         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
9127         (WebKit::QtViewportInteractionEngine::setPageItemRectVisible):
9128         (WebKit::QtViewportInteractionEngine::animatePageItemRectVisible):
9129         (WebKit::QtViewportInteractionEngine::flickMoveStarted):
9130         (WebKit::QtViewportInteractionEngine::flickMoveEnded):
9131         (WebKit::QtViewportInteractionEngine::pageItemPositionChanged):
9132         (WebKit::QtViewportInteractionEngine::pageContentPositionRequest):
9133         (WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged):
9134         (WebKit::QtViewportInteractionEngine::computePosRangeForPageItemAtScale):
9135         (WebKit::QtViewportInteractionEngine::focusEditableArea):
9136         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
9137         (WebKit::QtViewportInteractionEngine::nearestValidBounds):
9138         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
9139         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
9140         (WebKit::QtViewportInteractionEngine::pageItemSizeChanged):
9141         * UIProcess/qt/QtViewportInteractionEngine.h:
9142         (WebKit::QtViewportInteractionEngine::setDevicePixelRatio):
9143         (QtViewportInteractionEngine):
9144
9145 2012-05-30  Mariusz Grzegorczyk  <mariusz.g@samsung.com>, Ryuan Choi  <ryuan.choi@samsung.com>
9146
9147         [EFL][WK2] Fix WebKit2-EFL build
9148         https://bugs.webkit.org/show_bug.cgi?id=83693
9149
9150         Reviewed by Carlos Garcia Campos.
9151
9152         * CMakeLists.txt: Move IDL generator codes to generate port specific *.messages.in.
9153         * PlatformEfl.cmake: Add soup related files after r115411 and includes to fix build break.
9154         * UIProcess/API/efl/PageClientImpl.cpp: Fix build break with ENABLE_TOUCH_EVENTS.
9155         (WebKit):
9156         (WebKit::PageClientImpl::doneWithTouchEvent):
9157         * UIProcess/API/efl/PageClientImpl.h:
9158         (PageClientImpl):
9159         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Fix build break with ENABLE_INPUT_TYPE_COLOR and ENABLE_REGISTER_PROTOCOL_HANDLER.
9160         (WebKit):
9161         (WebKit::WebChromeClient::createColorChooser):
9162         * WebProcess/WebCoreSupport/WebChromeClient.h:
9163         (WebChromeClient):
9164         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Fix build break with ENABLE_WEB_INTENTS
9165         (WebKit):
9166         (WebKit::WebFrameLoaderClient::dispatchIntent):
9167         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
9168         (WebCore):
9169         (WebFrameLoaderClient):
9170         * WebProcess/WebProcess.cpp: Guard PLATFORM_STRATEGIES codes.
9171         (WebKit::WebProcess::didGetPlugins):
9172         * WebProcess/soup/WebSoupRequestManager.cpp: Try to share with EFL port.
9173         (WebKit::WebSoupRequestManager::didHandleURIRequest):
9174
9175 2012-05-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9176
9177         [Qt] Variable renaming as preparation of further refactoring.
9178
9179         Rubberstamped by Simon Hausmann.
9180
9181         Change m_viewport to m_viewportItem and m_content to m_pageItem.
9182
9183         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9184         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
9185         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
9186         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
9187         (WebKit::QtViewportInteractionEngine::flickableMoveStarted):
9188         (WebKit::QtViewportInteractionEngine::flickableMoveEnded):
9189         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
9190         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
9191         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
9192         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
9193         (WebKit::QtViewportInteractionEngine::focusEditableArea):
9194         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
9195         (WebKit::QtViewportInteractionEngine::nearestValidBounds):
9196         (WebKit::QtViewportInteractionEngine::reset):
9197         (WebKit::QtViewportInteractionEngine::setCSSScale):
9198         (WebKit::QtViewportInteractionEngine::currentCSSScale):
9199         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
9200         (WebKit::QtViewportInteractionEngine::panGestureActive):
9201         (WebKit::QtViewportInteractionEngine::panGestureStarted):
9202         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
9203         (WebKit::QtViewportInteractionEngine::panGestureEnded):
9204         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
9205         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
9206         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
9207         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
9208         (WebKit::QtViewportInteractionEngine::scaleContent):
9209         * UIProcess/qt/QtViewportInteractionEngine.h:
9210         (QtViewportInteractionEngine):
9211
9212 2012-05-30  Zalan Bujtas  <zbujtas@gmail.com>
9213
9214         [Qt][WK2] Do not use anonymous variables for ViewportUpdateDeferrer.
9215         https://bugs.webkit.org/show_bug.cgi?id=87831
9216
9217         Reviewed by Kenneth Rohde Christiansen.
9218
9219         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9220         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
9221         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
9222         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
9223
9224 2012-05-30  Carlos Garcia Campos  <cgarcia@igalia.com>
9225
9226         Unreviewed. Fix WebKit2GTK+ API tests in the bots.
9227
9228         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
9229         (testWebViewCanShowMIMEType): Remove the check for multimedia and
9230         plugins MIME types since they depend on the configuration and they
9231         are not available in the bots.
9232
9233 2012-05-29  Jer Noble  <jer.noble@apple.com>
9234
9235         Noticeable delay taking an HTML5 trailer fullscreen.
9236         https://bugs.webkit.org/show_bug.cgi?id=87794
9237
9238         Reviewed by Darin Adler.
9239
9240         Work around a not-entirely understood delay when using the results of a CGWindowListCreateImage()
9241         call as the contents of a placeholder view.  The backing of the resulting CGImageRef resides on
9242         the WindowServer, and drawing that image requires synchronous calls to the WindowServer process.
9243         By copying the image data, up front, into our own process, we can avoid those synchronous calls
9244         later and avoid the delay-causing drawing behavior.
9245
9246         * UIProcess/mac/WKFullScreenWindowController.mm:
9247         (CGImageDeepCopy): Added a helper function which copies the image data into a new CGImage.
9248         (-[WKFullScreenWindowController enterFullScreen:]): Use the above.
9249
9250 2012-05-29  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
9251
9252         [GTK] [WK2] Reproducible crash in performDragControllerAction
9253         https://bugs.webkit.org/show_bug.cgi?id=87744
9254
9255         Reviewed by Martin Robinson.
9256
9257         Fix a crash by using deref() instead of delete to dereference and
9258         release the platformData of DragData.
9259
9260         * WebProcess/WebPage/WebPage.cpp:
9261         (WebKit::WebPage::performDragControllerAction):
9262
9263 2012-05-29  Simon Pena  <spena@igalia.com>
9264
9265         [GTK] Missing field initializers for WKPageLoaderClient and WKPageUIClient
9266         https://bugs.webkit.org/show_bug.cgi?id=87745
9267
9268         Reviewed by Carlos Garcia Campos.
9269
9270         Add missing initializers for WKPageLoaderClient and
9271         WKPageUIClient, for callbacks WKPagePluginDidFailCallback and
9272         WKPageUnavailablePluginButtonClickedCallback, introduced in
9273         revision r116716.
9274
9275         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
9276         (attachLoaderClientToView): Initialize WKPagePluginDidFailCallback
9277         * UIProcess/API/gtk/WebKitUIClient.cpp:
9278         (attachUIClientToView): Initialize callback
9279         WKPageUnavailablePluginButtonClickedCallback
9280
9281 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
9282
9283         [GTK] Policy decision headers are not included in the main webkit2.h header
9284         https://bugs.webkit.org/show_bug.cgi?id=87753
9285
9286         Reviewed by Martin Robinson.
9287
9288         * UIProcess/API/gtk/webkit2.h: Include
9289         WebKitNavigationPolicyDecision.h and WebKitResponsePolicyDecision.h.
9290
9291 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
9292
9293         [GTK] Add webkit_web_view_can_show_mime_type() to WebKit2 GTK+ API
9294         https://bugs.webkit.org/show_bug.cgi?id=85998
9295
9296         Reviewed by Martin Robinson.
9297
9298         And use it in the default handler of WebKitWebView::decide-policy
9299         signal to decide whether to use or ignore a response policy
9300         decision depending on whether the mime type of the response can be
9301         displayed in the WebView or not.
9302
9303         * UIProcess/API/gtk/WebKitURIResponse.cpp:
9304         (webkitURIResponseGetProperty): Add getter for mime-type property.
9305         (webkit_uri_response_class_init): Add mime-type property.
9306         (webkit_uri_response_get_mime_type): Return the mime type of the
9307         response.
9308         * UIProcess/API/gtk/WebKitURIResponse.h:
9309         * UIProcess/API/gtk/WebKitWebView.cpp:
9310         (webkitWebViewDecidePolicy): In case of response policy decisions,
9311         use the URI response to decide what to do: download if the
9312         response is an attachment, use if the mime type is supported by
9313         the web view or ignore otherwise.
9314         (webkit_web_view_can_show_mime_type): Returns whether the given
9315         mime type can be displayed in the WebView or not.
9316         * UIProcess/API/gtk/WebKitWebView.h:
9317         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
9318         * UIProcess/API/gtk/tests/TestResources.cpp:
9319         (testWebResourceResponse):
9320         (testWebResourceMimeType):
9321         (serverCallback):
9322         (beforeAll):
9323         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
9324         (testWebViewCanShowMIMEType):
9325         (beforeAll):
9326
9327 2012-05-29  David Barr  <davidbarr@chromium.org>
9328
9329         Introduce ENABLE_CSS_IMAGE_RESOLUTION compile flag
9330         https://bugs.webkit.org/show_bug.cgi?id=87685
9331
9332         Reviewed by Eric Seidel.
9333
9334         Add a configuration option for CSS image-resolution support, disabling it by default.
9335
9336         * Configurations/FeatureDefines.xcconfig:
9337
9338 2012-05-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9339
9340         [Qt] Move tests from DesktopBehavior which can be made to work
9341         https://bugs.webkit.org/show_bug.cgi?id=87736
9342
9343         Rubberstamped by Simon Hausmann.
9344
9345         Move and modify the following tests to WebView/ and make them
9346         use touch events.
9347
9348         * UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml.
9349         * UIProcess/API/qt/tests/qmltests/WebView/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml.
9350         * UIProcess/API/qt/tests/qmltests/WebView/tst_multiFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml.
9351         * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml.
9352
9353 2012-05-29  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
9354
9355         [Qt] Sync up favicon-implementation with WebView url changes in r118158
9356
9357         https://bugs.webkit.org/show_bug.cgi?id=87133
9358
9359         We now base64-encode the page url in the image-provider url, so that any
9360         normalization done by QUrl will not mess up the page-url. The logic of
9361         creating and parsing the provider-url has been moved into the image
9362         provider, to keep it in one place.
9363
9364         We were also releasing icons (even ones we hadn't retained), which we can't
9365         do since we don't know when the icon url is no longer in use.
9366
9367         Reviewed-by Simon Hausmann.
9368
9369         * UIProcess/API/qt/qquickwebview.cpp:
9370         (QQuickWebViewPrivate::initialize):
9371         (QQuickWebViewPrivate::loadProgressDidChange):
9372         (QQuickWebViewPrivate::_q_onUrlChanged):
9373         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
9374         (QQuickWebViewPrivate::updateIcon):
9375         (QQuickWebView::icon):
9376         * UIProcess/API/qt/qquickwebview_p.h:
9377         * UIProcess/API/qt/qquickwebview_p_p.h:
9378         (QQuickWebViewPrivate):
9379         * UIProcess/API/qt/qwebiconimageprovider.cpp:
9380         (QWebIconImageProvider::iconURLForPageURLInContext):
9381         (QWebIconImageProvider::requestImage):
9382         * UIProcess/API/qt/qwebiconimageprovider_p.h:
9383         (WebKit):
9384         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
9385         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
9386         (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL):
9387         (WebKit::QtWebIconDatabaseClient::iconForPageURL):
9388         (WebKit):
9389         (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
9390         * UIProcess/qt/QtWebIconDatabaseClient.h:
9391         (QtWebIconDatabaseClient):
9392
9393 2012-05-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
9394
9395         [Qt][WK2] Fix failing qmltests::FitToView::test_basic()
9396         https://bugs.webkit.org/show_bug.cgi?id=87236
9397
9398         Reviewed by Simon Hausmann.
9399
9400         The fix is a combination of things. First of all some events
9401         were emitted at the wrong times or when nothing had changed.
9402
9403         We also initialized the view saying it was suspended which is
9404         not correct.
9405
9406         Another bug was that the touch tap, didn't result in marking
9407         the view as having user interaction. This was recently fixed
9408         in r118493.
9409
9410         * UIProcess/API/qt/qquickwebpage.cpp:
9411         (QQuickWebPage::setContentsScale):
9412         * UIProcess/API/qt/qquickwebview.cpp:
9413         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
9414
9415             Make sure pageIsSuspended is initialized to false.
9416
9417         (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange):
9418
9419             Early bail out if there is no change.
9420
9421             Inform contentScaleCommitted if the scale changed since last time.
9422
9423         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
9424
9425             Make sure to commit the right signals, ie. *Changed and not *Committed.
9426
9427         * UIProcess/API/qt/qquickwebview_p.h:
9428         * UIProcess/API/qt/qwebkittest.cpp:
9429         (touchPoint):
9430         (QWebKitTest::sendTouchEvent):
9431         (QWebKitTest::touchTap):
9432         (QWebKitTest::touchDoubleTap):
9433
9434             Add proper touch emulation for the testing system. Call directly
9435             to our WebKit API (avoid Qt event loop) to ensure all events gets
9436             delivered.
9437
9438         * UIProcess/API/qt/qwebkittest_p.h:
9439         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9440         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
9441
9442             Assert that a ViewportUpdateDeferrer is always used when calling
9443             this method.
9444
9445         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
9446
9447             Remove work around now we have the proper fix in place.
9448
9449         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
9450
9451             Do not send the informVisibleContentChange manually, use the
9452             ViewportUpdateDeferrer instead.
9453
9454         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
9455
9456             Add missing ViewportUpdateDeferrer.
9457
9458         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
9459
9460             No reason to emit informVisibleContentChange before pinch
9461             start, as it is always done on end (due to the ViewportUpdateDeferrer).
9462
9463         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
9464
9465             Add missing ViewportUpdateDeferrer.
9466
9467 2012-05-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
9468
9469         [Qt] [WK2] Allow user to inject JS scripts when the page loads
9470         https://bugs.webkit.org/show_bug.cgi?id=85827
9471
9472         Reviewed by Simon Hausmann.
9473
9474         Create a new experimental property to list URLs of JS scripts that should be
9475         loaded when a page is loaded. These scripts will run in the normal JS environment
9476         of the page.
9477
9478         The supported URL schemes are file:/// and qrc:///. The scripts are read from the
9479         UI process and transfered to the Web process.
9480
9481         Together with the experimental messaging API this provides a way for the
9482         application to manipulate the DOM (by injecting a script that does the
9483         manipulation and communicating with it via postMessage). This covers some of the
9484         use cases of QWebElement in our WK1 API.
9485
9486         * UIProcess/API/qt/qquickwebview.cpp:
9487         (QQuickWebViewPrivate::didRelaunchProcess):
9488         (readUserScript):
9489         (QQuickWebViewPrivate::updateUserScripts):
9490         (QQuickWebViewExperimental::userScripts):
9491         (QQuickWebViewExperimental::setUserScripts):
9492         * UIProcess/API/qt/qquickwebview_p.h:
9493         * UIProcess/API/qt/qquickwebview_p_p.h:
9494         (QQuickWebViewPrivate):
9495         * UIProcess/API/qt/tests/qmltests/WebView.pro:
9496         * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added.
9497         * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added.
9498         * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added.
9499         * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added.
9500         * UIProcess/API/qt/tests/qmltests/resources.qrc: Added.
9501         * UIProcess/WebPageProxy.h:
9502         (WebPageProxy):
9503         * UIProcess/qt/WebPageProxyQt.cpp:
9504         (WebKit::WebPageProxy::setUserScripts):
9505         (WebKit):
9506         * WebProcess/WebPage/WebPage.h:
9507         (WebPage):
9508         * WebProcess/WebPage/WebPage.messages.in:
9509         * WebProcess/WebPage/qt/WebPageQt.cpp:
9510         (WebKit::WebPage::setUserScripts):
9511         (WebKit):
9512
9513 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
9514
9515         Unreviewed, rolling out r118752.
9516         http://trac.webkit.org/changeset/118752
9517         https://bugs.webkit.org/show_bug.cgi?id=87731
9518
9519         incomplete patch (Requested by cmarcelo on #webkit).
9520
9521         * UIProcess/API/qt/qquickwebview.cpp:
9522         (QQuickWebViewPrivate::didRelaunchProcess):
9523         * UIProcess/API/qt/qquickwebview_p.h:
9524         * UIProcess/API/qt/qquickwebview_p_p.h:
9525         (QQuickWebViewPrivate):
9526         * UIProcess/API/qt/tests/qmltests/WebView.pro:
9527         * UIProcess/WebPageProxy.h:
9528         (WebPageProxy):
9529         * UIProcess/qt/WebPageProxyQt.cpp:
9530         * WebProcess/WebPage/WebPage.h:
9531         (WebPage):
9532         * WebProcess/WebPage/WebPage.messages.in:
9533         * WebProcess/WebPage/qt/WebPageQt.cpp:
9534
9535 2012-05-21  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
9536
9537         [Qt] [WK2] Allow user to inject JS scripts when the page loads
9538         https://bugs.webkit.org/show_bug.cgi?id=85827
9539
9540         Reviewed by Simon Hausmann.
9541
9542         Create a new experimental property to list URLs of JS scripts that should be
9543         loaded when a page is loaded. These scripts will run in the normal JS environment
9544         of the page.
9545
9546         The supported URL schemes are file:/// and qrc:///. The scripts are read from the
9547         UI process and transfered to the Web process.
9548
9549         Together with the experimental messaging API this provides a way for the
9550         application to manipulate the DOM (by injecting a script that does the
9551         manipulation and communicating with it via postMessage). This covers some of the
9552         use cases of QWebElement in our WK1 API.
9553
9554         * UIProcess/API/qt/qquickwebview.cpp:
9555         (QQuickWebViewPrivate::didRelaunchProcess):
9556         (readUserScript):
9557         (QQuickWebViewPrivate::updateUserScripts):
9558         (QQuickWebViewExperimental::userScripts):
9559         (QQuickWebViewExperimental::setUserScripts):
9560         * UIProcess/API/qt/qquickwebview_p.h:
9561         * UIProcess/API/qt/qquickwebview_p_p.h:
9562         (QQuickWebViewPrivate):
9563         * UIProcess/API/qt/tests/qmltests/WebView.pro:
9564         * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added.
9565         * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added.
9566         * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added.
9567         * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added.
9568         * UIProcess/API/qt/tests/qmltests/resources.qrc: Added.
9569         * UIProcess/WebPageProxy.h:
9570         (WebPageProxy):
9571         * UIProcess/qt/WebPageProxyQt.cpp:
9572         (WebKit::WebPageProxy::setUserScripts):
9573         (WebKit):
9574         * WebProcess/WebPage/WebPage.h:
9575         (WebPage):
9576         * WebProcess/WebPage/WebPage.messages.in:
9577         * WebProcess/WebPage/qt/WebPageQt.cpp:
9578         (WebKit::WebPage::setUserScripts):
9579         (WebKit):
9580
9581 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
9582
9583         [GTK] Add return value information to WebKitWebView::load-failed signal documentation
9584         https://bugs.webkit.org/show_bug.cgi?id=87704
9585
9586         Reviewed by Martin Robinson.
9587
9588         * UIProcess/API/gtk/WebKitWebView.cpp:
9589         (webkit_web_view_class_init):
9590
9591 2012-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
9592
9593         [GTK] Add WebKitWebInspector.h to the list of WebKit2 GTK public headers
9594         https://bugs.webkit.org/show_bug.cgi?id=87703
9595
9596         Reviewed by Martin Robinson.
9597
9598         * GNUmakefile.list.am: Add WebKitWebInspector.h to webkit2gtk_h_api.
9599
9600 2012-05-25  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
9601
9602         WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
9603         https://bugs.webkit.org/show_bug.cgi?id=42328
9604
9605         Reviewed by Eric Seidel.
9606
9607         Removed unneeded setJavaScriptProfilingEnabled function from WTR after its
9608         move to windows.internals.settings.
9609
9610         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
9611         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
9612         * WebProcess/WebPage/WebInspector.cpp:
9613         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
9614         * win/WebKit2.def:
9615
9616 2012-05-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
9617
9618         Remove unused argument coders for animation
9619         https://bugs.webkit.org/show_bug.cgi?id=87435
9620
9621         Reviewed by Sam Weinig.
9622
9623         Left the used argument coders only, behind a proper USE(UI_SIDE_COMPOSITING) flag.
9624
9625         * Shared/WebCoreArgumentCoders.cpp:
9626         (CoreIPC):
9627         * Shared/WebCoreArgumentCoders.h:
9628
9629 2012-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
9630
9631         Move allowRoundingHacks to Internals interface
9632         https://bugs.webkit.org/show_bug.cgi?id=87328
9633
9634         Reviewed by Hajime Morita.
9635
9636         * win/WebKit2.def: Add setAllowsRoundingHacks() to symbol filter.
9637
9638 2012-05-26  Geoffrey Garen  <ggaren@apple.com>
9639
9640         WebKit should be lazy-finalization-safe (esp. the DOM) v2
9641         https://bugs.webkit.org/show_bug.cgi?id=87581
9642
9643         Reviewed by Oliver Hunt.
9644
9645         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
9646         (WebKit::JSNPObject::destroy):
9647         (WebKit::JSNPObject::leakNPObject):
9648         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
9649         (WebKit::NPRuntimeObjectMap::finalize): Use static_cast instead of jsCast because
9650         jsCast does Structure-based validation, and our Structure is not guaranteed
9651         to be alive when we get finalized.
9652
9653 2012-05-25  Maciej Stachowiak  <mjs@apple.com>
9654
9655         REGRESSION (r116720): Subframe PDF scrolls extremely slowly
9656         https://bugs.webkit.org/show_bug.cgi?id=87557
9657         <rdar://problem/11499408>
9658
9659         Reviewed by Anders Carlsson.
9660         
9661         It's not possible to make an automated test for this.
9662
9663         * WebProcess/Plugins/PDF/BuiltInPDFView.mm:
9664         (WebKit::BuiltInPDFView::wantsWheelEvents): Return true instead of false and delete
9665         misleading comment. While the built-in PDF view would get added to the set of scrollable
9666         areas anyway, there are some code paths that check wantsWheelEvents explicitly, so it seems
9667         necessary to reutrn true.
9668
9669 2012-05-25  Brady Eidson  <beidson@apple.com>
9670
9671         https://bugs.webkit.org/show_bug.cgi?id=87418
9672         WebBackForwardList should separate "has no current index" from the integer value of the current index
9673
9674         This patch also renames "m_current" to "m_currentIndex" for clarity and symmetry with
9675         other variable names that reference "index",
9676
9677         It also removes the m_closed and m_enabled flags which were never actually used.
9678
9679         Reviewed by Darin Adler.
9680
9681         * UIProcess/WebBackForwardList.cpp:
9682         (WebKit::WebBackForwardList::WebBackForwardList):
9683         (WebKit::WebBackForwardList::addItem):
9684         (WebKit::WebBackForwardList::goToItem):
9685         (WebKit::WebBackForwardList::currentItem):
9686         (WebKit::WebBackForwardList::backItem):
9687         (WebKit::WebBackForwardList::forwardItem):
9688         (WebKit::WebBackForwardList::itemAtIndex):
9689         (WebKit::WebBackForwardList::backListCount):
9690         (WebKit::WebBackForwardList::forwardListCount):
9691         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
9692         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
9693         (WebKit::WebBackForwardList::clear):
9694
9695         * UIProcess/WebBackForwardList.h:
9696         (WebKit::WebBackForwardList::currentIndex):
9697         (WebBackForwardList):
9698
9699         * UIProcess/cf/WebBackForwardListCF.cpp:
9700         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
9701         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
9702
9703 2012-05-25  Beth Dakin  <bdakin@apple.com>
9704
9705         https://bugs.webkit.org/show_bug.cgi?id=87529
9706         Background tabs hosted in window server flash before painting 
9707         when they first become active
9708
9709         Reviewed by Anders Carlsson.
9710
9711         Initialize to LayerHostingModeInWindowServer if that is 
9712         available to avoid having to re-make the context and re-set 
9713         everything later on.
9714         * UIProcess/WebPageProxy.cpp:
9715         (WebKit::WebPageProxy::WebPageProxy):
9716
9717 2012-05-25  Mario Sanchez Prada  <msanchez@igalia.com>
9718
9719         [GTK][WK2] Implement API for generic permission requests
9720         https://bugs.webkit.org/show_bug.cgi?id=84018
9721
9722         Reviewed by Martin Robinson.
9723
9724         Added new 'permission-request' signal to WebKitWebView, to be
9725         fired when WebKit needs confirmation from the user on whether to
9726         allow or deny certain operations, such as sharing the user's
9727         location with web site through the Geolocation API.
9728
9729         New WebKitPermissionRequest interface, providing allow() and
9730         deny() operations, to be called over the objects implementing it
9731         when emitted along with the new 'permission-request' signal.
9732
9733         * UIProcess/API/gtk/WebKitPermissionRequest.cpp: Added.
9734         (webkit_permission_request_default_init):
9735         (webkit_permission_request_allow):
9736         (webkit_permission_request_deny):
9737         * UIProcess/API/gtk/WebKitPermissionRequest.h: Added.
9738         (_WebKitPermissionRequestIface):
9739         * GNUmakefile.am: Added new files.
9740
9741         Added the new signal to WebKitWebView, providing a default handler
9742         that will just deny the request when the signal is not handled.
9743
9744         * UIProcess/API/gtk/WebKitWebView.cpp:
9745         (webkitWebViewDecidePermissionRequest): Default handler.
9746         (webkit_web_view_class_init): Declare the new signal and connect
9747         to the default handler.
9748         (webkitWebViewMakePermissionRequest): Helper function to create a
9749         make a new permission request and emit the new signal signal.
9750         * UIProcess/API/gtk/WebKitWebView.h:
9751         (_WebKitWebViewClass):
9752         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Declare the creational
9753         function webkitWebViewMakePermissionRequest for internal use only.
9754
9755         Updated documentation files.
9756
9757         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
9758         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
9759
9760 2012-05-25  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
9761
9762         [WK2] Fix client interface size for WKPageContextMenuClient.
9763         https://bugs.webkit.org/show_bug.cgi?id=87472
9764
9765         Reviewed by Carlos Garcia Campos.
9766
9767         Add correct offset for version 1 and 2 of WKPageContextMenuClient.
9768         Revision 109750 introduces a new API and increases size of interfaceSizesByVersion
9769         but the table is not properly initialized for newly introduced version 2.
9770
9771         * Shared/APIClientTraits.cpp:
9772         (WebKit):
9773
9774 2012-05-24  Andreas Kling  <kling@webkit.org>
9775
9776         Mac bots crashing under PluginInfo destructor.
9777         <http://webkit.org/b/87414>
9778         <rdar://problem/11527172>
9779
9780         Reviewed by Darin Adler.
9781
9782         We can't safely pass WTF::String to another thread without a deref() race,
9783         so pass the PluginInfo vector by pointer instead of by value.
9784
9785         * UIProcess/WebContext.cpp:
9786         (WebKit::WebContext::sendDidGetPlugins):
9787         (WebKit::WebContext::handleGetPlugins):
9788         * UIProcess/WebContext.h:
9789
9790 2012-05-25  Zalan Bujtas  <zbujtas@gmail.com>
9791
9792         [Qt][WK2] Fix failing qmltests::FitToView::test_basic()
9793         https://bugs.webkit.org/show_bug.cgi?id=87236
9794
9795         Reviewed by Kenneth Rohde Christiansen.
9796
9797         Rename contentViewportChanged to informVisibleContentChange() to
9798         reflect its functionality better. Centralize m_hadUserInteraction flag
9799         setting and add assertions on it to ensure that designated
9800         functions are called only on user interaction.
9801
9802         * UIProcess/API/qt/qquickwebview.cpp:
9803         (QQuickWebViewFlickablePrivate::onComponentComplete):
9804         (QQuickWebViewFlickablePrivate::updateViewportSize):
9805         (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange):
9806         (QQuickWebViewFlickablePrivate::_q_resume):
9807         * UIProcess/API/qt/qquickwebview_p.h:
9808         * UIProcess/API/qt/qquickwebview_p_p.h:
9809         (QQuickWebViewPrivate::_q_onInformVisibleContentChange):
9810         (QQuickWebViewFlickablePrivate):
9811         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9812         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
9813         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
9814         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
9815         (WebKit::QtViewportInteractionEngine::touchBegin):
9816         (WebKit::QtViewportInteractionEngine::focusEditableArea):
9817         (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
9818         (WebKit::QtViewportInteractionEngine::panGestureStarted):
9819         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
9820         * UIProcess/qt/QtViewportInteractionEngine.h:
9821         (QtViewportInteractionEngine):
9822
9823 2012-05-24  Tim Horton  <timothy_horton@apple.com>
9824
9825         Add feature defines for web-facing parts of CSS Regions and Exclusions
9826         https://bugs.webkit.org/show_bug.cgi?id=87442
9827         <rdar://problem/10887709>
9828
9829         Reviewed by Dan Bernstein.
9830
9831         * Configurations/FeatureDefines.xcconfig:
9832
9833 2012-05-24  Geoffrey Garen  <ggaren@apple.com>
9834
9835         WebKit should be lazy-finalization-safe (esp. the DOM)
9836         https://bugs.webkit.org/show_bug.cgi?id=87456
9837
9838         Reviewed by Filip Pizlo.
9839
9840         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
9841         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use the new idioms.
9842
9843         (WebKit::NPRuntimeObjectMap::invalidate): Check for null while iterating,
9844         since that's possible now.
9845
9846         (WebKit::NPRuntimeObjectMap::finalize): Use the new idioms.
9847
9848 2012-05-24  Brady Eidson  <beidson@apple.com>
9849
9850         Fix the build after http://trac.webkit.org/changeset/118441
9851         Also fix a glaring bug with the new code, will run it by original reviewer retroactively.
9852
9853         * UIProcess/cf/WebBackForwardListCF.cpp:
9854         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fix up the types of the ? operands
9855           to appease super-strict compilers. Don't allow negative indexes (besides the -1 "No index" index).
9856
9857 2012-05-24  Brady Eidson  <beidson@apple.com>
9858
9859         <rdar://problem/10090764> and https://bugs.webkit.org/show_bug.cgi?id=87417
9860         (Unrepro) Crashes saving session state in WebBackForwardList
9861
9862         Reviewed by Darin Adler.
9863
9864         * UIProcess/WebBackForwardList.cpp:
9865         (WebKit::WebBackForwardList::addItem): Null check the proposed item and also m_page, to make
9866           sure the page hasn't been closed making this list inactive. Be more aggressive about
9867           clearing the current entries out if there is no current item index.
9868         (WebKit::WebBackForwardList::itemAtIndex): Early null return if there is no current index.
9869         (WebKit::WebBackForwardList::clear): Don't put the current item back in the array if there was
9870           no current item.
9871
9872         * UIProcess/cf/WebBackForwardListCF.cpp:
9873         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Don't create a meaningless WebURL.
9874           Don't successfully return a dictionary if any of the entries were null. Be more aggressive about
9875           validating the current index we plan to return in the dictionary.
9876         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): More aggressively validate the
9877           current index read from disk. Replace a meaningless sanity check with our typical ASSERT.
9878
9879 2012-05-24  Anders Carlsson  <andersca@apple.com>
9880
9881         Make sure that the layer hosting mode is up-to-date when reconnecting to a new web process
9882         https://bugs.webkit.org/show_bug.cgi?id=87421
9883         <rdar://problem/11510337>
9884
9885         Reviewed by Beth Dakin.
9886
9887         Send over the layer hosting mode as part of the web page creation parameters and create the right
9888         layer hosting context based on the mode.
9889
9890         * Shared/WebPageCreationParameters.cpp:
9891         (WebKit::WebPageCreationParameters::encode):
9892         (WebKit::WebPageCreationParameters::decode):
9893         * Shared/WebPageCreationParameters.h:
9894         (WebPageCreationParameters):
9895         * UIProcess/WebPageProxy.cpp:
9896         (WebKit::WebPageProxy::creationParameters):
9897         * WebProcess/WebPage/WebPage.cpp:
9898         (WebKit::WebPage::WebPage):
9899         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
9900         (TiledCoreAnimationDrawingArea):
9901         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
9902         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
9903         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
9904         (WebKit):
9905         (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
9906
9907 2012-05-24  John Mellor  <johnme@chromium.org>
9908
9909         Font Boosting: Add compile flag and runtime setting
9910         https://bugs.webkit.org/show_bug.cgi?id=87394
9911
9912         Reviewed by Adam Barth.
9913
9914         Add ENABLE_FONT_BOOSTING.
9915
9916         * Configurations/FeatureDefines.xcconfig:
9917
9918 2012-05-24  Yael Aharon  <yael.aharon@nokia.com>
9919
9920         [Qt] Stop using the flag FIXED_POSITION_CREATES_STACKING_CONTEXT
9921         https://bugs.webkit.org/show_bug.cgi?id=87392
9922
9923         Reviewed by Antonio Gomes.
9924
9925         Turn on the setting setFixedPositionCreatesStackingContext.
9926
9927         * WebProcess/WebPage/WebPage.cpp:
9928         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
9929
9930 2012-05-24  Alexey Proskuryakov  <ap@apple.com>
9931
9932         [WK2] Let the client give local files universal access on a case by case basis
9933         https://bugs.webkit.org/show_bug.cgi?id=87174
9934         <rdar://problem/11024330>
9935
9936         Reviewed by Maciej Stachowiak.
9937
9938         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
9939         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
9940         (WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
9941         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
9942         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
9943         (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
9944         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
9945         * WebProcess/qt/QtBuiltinBundlePage.cpp:
9946         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
9947         Added glue code to call bundle client.
9948
9949 2012-05-24  Alexander Færøy  <alexander.faeroy@nokia.com>
9950
9951         Reorder arguments to compare() in the QML WebView tests
9952         https://bugs.webkit.org/show_bug.cgi?id=87374
9953
9954         Reviewed by Simon Hausmann.
9955
9956         Based on patch by Kenneth Rohde Christiansen.
9957
9958         The reordering is necessary to get correct information printed when
9959         the tests fails. Without this, the test suite will display the bogus
9960         value and not the expected value.
9961
9962         This patch also removes the delayed windowShown since this is not
9963         needed anymore, due to us using the touch events instead of mouse
9964         events.
9965
9966         * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml:
9967
9968 2012-05-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
9969
9970         [Qt] Tiles not painted after wheel or keyboard scroll.
9971         https://bugs.webkit.org/show_bug.cgi?id=87358
9972
9973         Reviewed by Kenneth Rohde Christiansen.
9974
9975         After performing a scroll requested from the WebProcess we also need
9976         to inform the painting layer of the viewport change.
9977
9978         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9979         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
9980
9981 2012-05-24  Andras Becsi  <andras.becsi@nokia.com>
9982
9983         [Qt][WK2] Fix bounce-back animation on pinch->pan
9984         https://bugs.webkit.org/show_bug.cgi?id=87266
9985
9986         Reviewed by Kenneth Rohde Christiansen.
9987
9988         If ending an out-of-bounds pinch gesture with releasing one finger
9989         (transition to a pan gesture) the bounce back animation blinks in
9990         the end position immediately first, then animates the content back
9991         into bounds.
9992
9993         QtViewportInteractionEngine::cancelScrollAnimation should return
9994         early if there is no active kinetic animation.
9995
9996         * UIProcess/qt/QtViewportInteractionEngine.cpp:
9997         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
9998
9999 2012-05-23  Ojan Vafai  <ojan@chromium.org>
10000
10001         add back the ability to disable flexbox
10002         https://bugs.webkit.org/show_bug.cgi?id=87147
10003
10004         Reviewed by Tony Chang.
10005
10006         * Configurations/FeatureDefines.xcconfig:
10007
10008 2012-05-23  Jer Noble  <jer.noble@apple.com>
10009
10010         REGRESSION (117623) - Entering/exiting fullscreen HTML5 videos, there is a quick animated fade
10011         https://bugs.webkit.org/show_bug.cgi?id=87294
10012
10013         Reviewed by Darin Adler.
10014
10015         When setting the sublayers array on the layer hosting view, wrap the call in a CATransaction which disables
10016         animations.
10017
10018         * UIProcess/API/mac/WKView.mm:
10019         (-[WKView _updateAcceleratedCompositingMode:WebKit::]):
10020
10021 2012-05-23  Dinu Jacob  <dinu.jacob@nokia.com>
10022
10023         [Qt][Wk2] Assertion failure when selecting an option in select list with size attribute greater than one
10024         https://bugs.webkit.org/show_bug.cgi?id=86974
10025
10026         Reviewed by Simon Hausmann.
10027
10028         Select list with size attribute greater than one will not initially have any
10029         item in selected state (if no option has 'selected' tag), resulting in
10030         m_selectedModelIndex in WebPopupMenuProxyQt to be invalid. Hence, need to check
10031         whether the old index is invalid before accessing the item at that index.
10032
10033         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Added new test that
10034           tests selection in a select list with size attribute value of 2.
10035         * UIProcess/API/qt/tests/qmltests/common/selectwithsize.html: Added.
10036         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
10037         (WebKit::PopupMenuItemModel::select): Check whether old index is valid before accessing
10038           the item at that index.
10039
10040 2012-05-23  Jer Noble  <jer.noble@apple.com>
10041
10042         REGRESSION (r116188): After exiting full screen, Safari window is frozen, then inline video speeds through frames as it catches up with audio
10043         https://bugs.webkit.org/show_bug.cgi?id=87206
10044
10045         Reviewed by Darin Adler.
10046
10047         When re-enabling the Safari window's autodisplay flag, also force the window to re-display.
10048         Otherwise, the window will not repaint itself until it is forced to by user interaction.
10049
10050         * UIProcess/mac/WKFullScreenWindowController.mm:
10051         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
10052
10053 2012-05-23  Martin Robinson  <mrobinson@igalia.com>
10054
10055         [GTK] [WebKit2] Add an API to enable and disable composited layer indicators
10056         https://bugs.webkit.org/show_bug.cgi?id=87053
10057
10058         Reviewed by Carlos Garcia Campos.
10059
10060         Add a WebKitSetting that allows the client to enable and disable debug
10061         borders and repaint counters for accelerated content.
10062
10063         * UIProcess/API/gtk/WebKitSettings.cpp:
10064         (webKitSettingsSetProperty): Added.
10065         (webKitSettingsGetProperty): Added.
10066         (webkit_settings_class_init): Add the new property.
10067         (webkit_settings_set_draw_compositing_indicators): Added.
10068         (webkit_settings_get_draw_compositing_indicators): Added.
10069         * UIProcess/API/gtk/WebKitSettings.h:
10070         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API points to the
10071         documentation.
10072         * UIProcess/API/gtk/test/TestWebKitSettings.h: Add a new unit test.
10073
10074 2012-05-23  Michael BrĂĽning  <michael.bruning@nokia.com>
10075
10076         [Qt][WK2] Small refactoring WebPage::confirmComposition.
10077         https://bugs.webkit.org/show_bug.cgi?id=87243
10078
10079         Reviewed by Kenneth Rohde Christiansen.
10080
10081         Change nested if into an early return to reduce complexity.
10082
10083         * WebProcess/WebPage/qt/WebPageQt.cpp:
10084         (WebKit::WebPage::confirmComposition):
10085
10086 2012-05-22  Alexander Færøy  <alexander.faeroy@nokia.com>
10087
10088         [Qt] Missing tests for the evaluateJavaScript API
10089         https://bugs.webkit.org/show_bug.cgi?id=86351
10090
10091         Reviewed by Kenneth Rohde Christiansen.
10092
10093         * UIProcess/API/qt/tests/qmltests/WebView/tst_evaluateJavaScript.qml:
10094         * UIProcess/API/qt/tests/qmltests/common/evaluatejavascript.html: Added.
10095
10096 2012-05-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
10097
10098         [Qt] FloatSize Qt Support
10099         https://bugs.webkit.org/show_bug.cgi?id=87237
10100
10101         Reviewed by Andreas Kling.
10102
10103         Basic cleanup possible to new Qt support in FloatSize.
10104
10105         * UIProcess/API/qt/qquickwebpage.cpp:
10106         (QQuickWebPagePrivate::updateSize):
10107         * UIProcess/API/qt/qwebkittest.cpp:
10108         (QWebKitTest::layoutSize):
10109
10110 2012-04-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
10111
10112         [Qt] Make the web view's url property follow the active url
10113
10114         https://bugs.webkit.org/show_bug.cgi?id=77554
10115
10116         The url property of the webview now reflects the 'active' url of the
10117         page, which maps to either the currently loading url, in the case of
10118         an ongoing load, or the result of a load, even when the load failed.
10119
10120         In practice this means that setting the url though QML, or navigating
10121         to a new url in the page by e.g clicking, will both instantly change
10122         the url-property of the webview to the target url. This differs from
10123         earlier behavior, where we would update the url when the load
10124         committed.
10125
10126         An optional argument is added to loadHtml(), to allow setting
10127         the unreachable url when providing replacement content for failed
10128         loads.
10129
10130         Finally, the location bar in the minibrowser is updated to behave
10131         a bit more like normal browsers in terms of when the url will change
10132         and how active focus is handled.
10133
10134         Reviewed by Simon Hausmann.
10135
10136         * UIProcess/API/qt/qquickwebview.cpp:
10137         (QQuickWebViewPrivate::onComponentComplete):
10138         (QQuickWebView::reload):
10139         (QQuickWebView::url):
10140         (QQuickWebView::setUrl):
10141         (QQuickWebView::loadHtml):
10142         * UIProcess/API/qt/qquickwebview_p.h:
10143         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
10144         * UIProcess/API/qt/tests/qmltests/WebView.pro:
10145         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
10146         * UIProcess/API/qt/tests/qmltests/common/link.html: Added.
10147         * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
10148         * UIProcess/qt/QtWebPageLoadClient.cpp:
10149         (QtWebPageLoadClient::QtWebPageLoadClient):
10150         (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
10151         (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
10152         (QtWebPageLoadClient::didCommitLoadForFrame):
10153         (QtWebPageLoadClient::dispatchLoadFailed):
10154         (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
10155         (QtWebPageLoadClient::didFailLoadWithErrorForFrame):
10156         * UIProcess/qt/QtWebPageLoadClient.h:
10157         (QtWebPageLoadClient):
10158
10159 2012-05-23  Simon Hausmann  <simon.hausmann@nokia.com>
10160
10161         [Qt] Race condition in LayerTreeHost/Proxy can cause blank rendering
10162         https://bugs.webkit.org/show_bug.cgi?id=87239
10163
10164         Reviewed by Kenneth Rohde Christiansen.
10165
10166         On the UI process side the WebLayerTreeRenderer/LayerTreeHostProxy pair is
10167         created with m_active = false, which makes it ignore any incoming layer updates.
10168         It remains inactive until the ContentsSGNode is created and setActive(true) is called.
10169
10170         On the web process side the LayerTreeHost is created with m_waitingForUIProcess = false.
10171
10172         Those two variables must be in sync, otherwise a race condition can
10173         happen: The web process sends updates to the ui process before the
10174         ContentsSGNode is created. This can happen for example when re-using an
10175         existing WebProcess to create a QQuickWebView and load a page very fast
10176         from the disk cache. The update arrives on the ui process side, but it
10177         is discarded because setActive(true) hasn't been called yet. As a
10178         result any updates that would for example create and populate the tiles
10179         required for rendering are ignored.
10180
10181         This patch ensures that the variables are initialized with the same values and that calling
10182         setActive(true) will trigger the rendering of the next frame.
10183
10184         * UIProcess/WebLayerTreeRenderer.cpp:
10185         (WebKit::WebLayerTreeRenderer::setActive):
10186         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
10187         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
10188
10189 2012-05-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
10190
10191         [Qt] Make QtWebError return the failing URL as a QString instead of QUrl
10192
10193         We don't want to use QUrl inside QtWebKit (only in the API layer), due
10194         to how QUrl normalizes the url.
10195
10196         Reviewed by Simon Hausmann.
10197
10198         * UIProcess/qt/QtWebError.cpp:
10199         (WebKit::QtWebError::url):
10200         * UIProcess/qt/QtWebError.h:
10201
10202 2012-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
10203
10204         [GTK] Add inspector API to WebKit2 GTK+
10205         https://bugs.webkit.org/show_bug.cgi?id=87113
10206
10207         Reviewed by Martin Robinson.
10208
10209         * GNUmakefile.list.am: Add new files to compilation.
10210         * UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Added.
10211         (WKInspectorSetInspectorClientGtk):
10212         * UIProcess/API/C/gtk/WKInspectorClientGtk.h: Added.
10213         * UIProcess/API/gtk/WebKitPrivate.h:
10214         * UIProcess/API/gtk/WebKitWebInspector.cpp: Added.
10215         (webkitWebInspectorFinalize):
10216         (webkit_web_inspector_init):
10217         (webkit_web_inspector_class_init):
10218         (openWindow): Emit WebKitWebInspector::open-window singal.
10219         (didClose): Emit WebKitWebInspector::closed signal.
10220         (bringToFront): Emit WebKitWebInspector::bring-to-front singal.
10221         (inspectedURLChanged): Set the inspected URI and emit
10222         GObject::notify signal if it changed.
10223         (attach): Emit WebKitWebInspector::attach signal.
10224         (detach): Emit WebKitWebInspector::detach signal.
10225         (didChangeAttachedHeight): Set the attached height and emit
10226         GObject::notify signal if it changed.
10227         (webkitWebInspectorCreate): Ceate a new WebKitWebInspector object
10228         for the given WKInspector. Also initialize and set the inspector
10229         client.
10230         (webkit_web_inspector_get_web_view): Return the web view used to
10231         render the inspector.
10232         (webkit_web_inspector_get_inspected_uri): Return the URI that is
10233         being inspected.
10234         (webkit_web_inspector_is_attached): Whether the inspector view is
10235         currently attached.
10236         (webkit_web_inspector_attach): Request to attach the inspector.
10237         (webkit_web_inspector_detach): Request to detach the inspector.
10238         (webkit_web_inspector_show): Request to show the inspector.
10239         (webkit_web_inspector_close): Request to close the inspector.
10240         (webkit_web_inspector_get_attached_height): Return the height that
10241         the inspector view should have when attached.
10242         * UIProcess/API/gtk/WebKitWebInspector.h: Added.
10243         * UIProcess/API/gtk/WebKitWebInspectorPrivate.h: Added.
10244         * UIProcess/API/gtk/WebKitWebView.cpp:
10245         (webkit_web_view_get_inspector): Return the WebKitWebInspector
10246         associated to the web view.
10247         * UIProcess/API/gtk/WebKitWebView.h:
10248         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
10249         WebKitWebInspector.
10250         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ad new symbols.
10251         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
10252         webkit_web_inspector_get_type.
10253         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for the
10254         inspector API.
10255         * UIProcess/API/gtk/tests/TestInspector.cpp: Added.
10256         (testInspectorDefault):
10257         (testInspectorCustom):
10258         (testInspectorWindowDestroyed):
10259         (beforeAll):
10260         (afterAll):
10261         * UIProcess/API/gtk/tests/WebViewTest.cpp:
10262         (WebViewTest::showInWindowAndWaitUntilMapped): Add optional
10263         parameter to create a toplevel or popup window.
10264         (WebViewTest::resizeView): Helper function to set the widget
10265         allocation to a given size.
10266         * UIProcess/API/gtk/tests/WebViewTest.h:
10267         * UIProcess/API/gtk/webkit2.h: Include WebKitWebInspector.h
10268         * UIProcess/WebInspectorProxy.h:
10269         (WebKit::WebInspectorProxy::inspectorView): Return the view used
10270         to render the inspector.
10271         * UIProcess/gtk/WebInspectorClientGtk.cpp: Added.
10272         (WebKit::WebInspectorClientGtk::openWindow):
10273         (WebKit::WebInspectorClientGtk::didClose):
10274         (WebKit::WebInspectorClientGtk::bringToFront):
10275         (WebKit::WebInspectorClientGtk::inspectedURLChanged):
10276         (WebKit::WebInspectorClientGtk::attach):
10277         (WebKit::WebInspectorClientGtk::detach):
10278         (WebKit::WebInspectorClientGtk::didChangeAttachedHeight):
10279         * UIProcess/gtk/WebInspectorClientGtk.h: Added.
10280         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
10281         (WebKit::inspectorViewDestroyed): Close the inspector page when
10282         the inspector view is destroyed, instead of when the inspector
10283         window is deleted, because the inspector view can now be inside a
10284         window created by the user.
10285         (WebKit::WebInspectorProxy::initializeInspectorClientGtk):
10286         Initialze the inspector client.
10287         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add a
10288         weak pointer to the inspector view to make sure it's NULL when
10289         destroyed.
10290         (WebKit::WebInspectorProxy::createInspectorWindow): Call
10291         openWindow on the inspector client, and return early if the
10292         callback was handled.
10293         (WebKit::WebInspectorProxy::platformOpen): Connect to destroy
10294         signal of the inspector view to close the page when the view is
10295         destroyed.
10296         (WebKit::WebInspectorProxy::platformDidClose): Call didClose on
10297         the inspector client.
10298         (WebKit::WebInspectorProxy::platformBringToFront): Call
10299         bringToFront on the inspector client, and return early if the
10300         callback was handled.
10301         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Call
10302         inspectedURLChanged on the inspector client.
10303         (WebKit::WebInspectorProxy::platformAttach): Call attach on the
10304         inspector client and return if the callback was handled.
10305         (WebKit::WebInspectorProxy::platformDetach): Call detach on the
10306         inspector client and return if the callback was handled.
10307         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Call
10308         didChangeAttachedHeight on the inspector client.
10309
10310 2012-05-22  Anders Carlsson  <andersca@apple.com>
10311
10312         Functions dispatched by dispatchAfterEnsuringUpdatedScrollPosition can be called after drawing area has been destroyed
10313         https://bugs.webkit.org/show_bug.cgi?id=87173
10314         <rdar://problem/11474087>
10315
10316         Reviewed by Beth Dakin.
10317
10318         Don't try to call forceRepaint if the drawing area has already been destroyed.
10319
10320         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
10321         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
10322
10323 2012-05-22  Anders Carlsson  <andersca@apple.com>
10324
10325         Crash when a plug-in view outlives its containing WebPage
10326         https://bugs.webkit.org/show_bug.cgi?id=87163
10327         <rdar://problem/10849258>
10328
10329         Reviewed by Dan Bernstein.
10330
10331         In rare cases, when a plug-in is kept alive for some reason it can outlive its WebPage. When that happens,
10332         the PluginView destructor will try to access the (deleted) web page and we'll crash.
10333
10334         Fix this by making the WebPage destructor iterate over all the registered plug-ins and null out the m_webPage pointer.
10335         Don't try to access the WebPage object if it's null.
10336
10337         Also, remove PLATFORM(MAC) ifdefs around the HashSet of known plug-in views as well as the member functions that access the set;
10338         we want this to be cross platform now.
10339
10340         * WebProcess/Plugins/PluginView.cpp:
10341         (WebKit::PluginView::PluginView):
10342         (WebKit::PluginView::~PluginView):
10343         (WebKit::PluginView::webPageDestroyed):
10344         (WebKit):
10345         * WebProcess/Plugins/PluginView.h:
10346         (PluginView):
10347         * WebProcess/WebPage/WebPage.cpp:
10348         (WebKit::WebPage::~WebPage):
10349         (WebKit::WebPage::scalePage):
10350         (WebKit):
10351         * WebProcess/WebPage/WebPage.h:
10352         (WebPage):
10353
10354 == Rolled over to ChangeLog-2012-05-22 ==