a3bbc7adc9831ae0efedbf54ab64820069517fdc
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-12-06  Tony Chang  <tony@chromium.org>
2
3         Unreviewed, Apple Win Debug build fix.
4
5         * win/WebKit2.def.in: Add 2 symbols that are needed by the debug build.
6
7 2012-12-06  Alexey Proskuryakov  <ap@apple.com>
8
9         Track private browsing session in network process
10         https://bugs.webkit.org/show_bug.cgi?id=104281
11
12         Reviewed by Jessie Berlin.
13
14         Added ensure/destroy messages that match what's done in WebProcess. Also similarly,
15         ensuring a private session may happen on demand if network process has been restarted
16         after a crash, or if private browsing is enabled via a persistent preference.
17
18         Eventually, we should find a way to share code between WebFrameNetworkingContext
19         and RemoteNetworkingContext.
20
21         * NetworkProcess/NetworkProcess.cpp:
22         (WebKit::NetworkProcess::initializeNetworkProcess):
23         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
24         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
25         * NetworkProcess/NetworkProcess.h:
26         * NetworkProcess/NetworkProcess.messages.in:
27         * NetworkProcess/mac/RemoteNetworkingContext.h:
28         (RemoteNetworkingContext):
29         * NetworkProcess/mac/RemoteNetworkingContext.mm:
30         (WebKit::privateBrowsingStorageSessionIdentifierBase):
31         (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
32         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
33         (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
34         * Shared/Network/NetworkProcessCreationParameters.cpp:
35         (WebKit::NetworkProcessCreationParameters::encode):
36         (WebKit::NetworkProcessCreationParameters::decode):
37         * Shared/Network/NetworkProcessCreationParameters.h:
38         (NetworkProcessCreationParameters):
39         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
40         (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess):
41         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
42         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
43         * WebProcess/WebProcess.cpp:
44         (WebKit::WebProcess::initializeWebProcess):
45
46 2012-12-06  Laszlo Gombos  <l.gombos@samsung.com>
47
48         [EFL] Remove ENABLE_GLIB_SUPPORT CMake variable
49         https://bugs.webkit.org/show_bug.cgi?id=104278
50
51         Reviewed by Brent Fulgham.
52
53         The guards are not required as it is always set for EFL.
54
55         * PlatformEfl.cmake:
56         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
57         (WebKit::PluginProcessProxy::scanPlugin):
58         * WebProcess/efl/WebProcessMainEfl.cpp:
59         (WebKit::WebProcessMainEfl):
60
61 2012-12-06  Tony Chang  <tony@chromium.org>
62
63         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
64         https://bugs.webkit.org/show_bug.cgi?id=104042
65
66         Reviewed by Antti Koivisto.
67
68         Update exports for Internals.cpp.
69
70         * win/WebKit2.def.in:
71
72 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
73
74         [Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change
75         https://bugs.webkit.org/show_bug.cgi?id=104269
76
77         Unreviewed, trivialy fixing last minute change.
78
79         Move signal emission to the correct place.
80
81         * UIProcess/API/qt/qquickwebview.cpp:
82         (QQuickWebViewFlickablePrivate::onComponentComplete):
83         * UIProcess/qt/PageViewportControllerClientQt.cpp:
84         (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):
85
86 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
87
88         [Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change
89         https://bugs.webkit.org/show_bug.cgi?id=104269
90
91         Reviewed by Kenneth Rohde Christiansen.
92
93         Since the ViewportInfoItem of MiniBrowser is created before the
94         WebView finishes construction, thus before the viewport controller
95         has been instantiated, the shown device pixel ratio was incorrect.
96         Additionally QWebKitTest's notification signal was also not emitted
97         when the value changed.
98
99         * UIProcess/API/qt/qquickwebview.cpp:
100         (QQuickWebViewPrivate::QQuickWebViewPrivate):
101         * UIProcess/qt/PageViewportControllerClientQt.cpp:
102         (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):
103
104 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
105
106         Unreviewed, rolling out r136788.
107         http://trac.webkit.org/changeset/136788
108         https://bugs.webkit.org/show_bug.cgi?id=104260
109
110         Asserts on EFL WebKit2 Debug bot (Requested by yael on
111         #webkit).
112
113         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
114         (WebKit::LayerTreeRenderer::setLayerState):
115         (WebKit::LayerTreeRenderer::setRootLayerID):
116         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
117         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
118         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
119         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
120         (LayerTreeCoordinator):
121
122 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
123
124         Unreviewed, rolling out r136795.
125         http://trac.webkit.org/changeset/136795
126         https://bugs.webkit.org/show_bug.cgi?id=104257
127
128         Asserts on EFL WebKit2 Debug bot (Requested by yael on
129         #webkit).
130
131         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
132         (WebKit::LayerTreeRenderer::setRootLayerID):
133
134 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
135
136         Internals.getElementByIdInShadowRoot is nonsense now.
137         https://bugs.webkit.org/show_bug.cgi?id=104241
138
139         Reviewed by Kent Tamura.
140
141         * win/WebKit2.def.in:
142
143 2012-12-06  Christophe Dumez  <christophe.dumez@intel.com>
144
145         [EFL][WK2] Context clients should unregister themselves when destroyed
146         https://bugs.webkit.org/show_bug.cgi?id=104113
147
148         Reviewed by Kenneth Rohde Christiansen.
149
150         Make sure the context clients (History and Download clients)
151         unregister themselves when destroyed to make sure their
152         callback functions are never called after the client objects
153         have been destroyed (i.e. when the parent Ewk_Context has
154         been destroyed).
155
156         This addresses crashing issues after a Ewk_Context object
157         gets unref'd and destroyed.
158
159         * UIProcess/efl/ContextHistoryClientEfl.cpp:
160         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
161         (WebKit):
162         (WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl):
163         * UIProcess/efl/ContextHistoryClientEfl.h:
164         (ContextHistoryClientEfl):
165         * UIProcess/efl/DownloadManagerEfl.cpp:
166         (WebKit::DownloadManagerEfl::~DownloadManagerEfl):
167         (WebKit):
168         * UIProcess/efl/DownloadManagerEfl.h:
169         (DownloadManagerEfl):
170
171 2012-12-05  Huang Dongsung  <luxtella@company100.net>
172
173         Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
174         https://bugs.webkit.org/show_bug.cgi?id=103843
175
176         Reviewed by Noam Rosenthal.
177
178         Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its
179         lifecycle. LayerTreeRenderer, LayerTreeCoordinator and LayerTreeCoordinatorProxy
180         have the same lifecycle to WebPage and the root layer is reused even if loading
181         new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more
182         than twice.
183
184         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
185         (WebKit::LayerTreeRenderer::setRootLayerID):
186
187 2012-12-05  Brent Fulgham  <bfulgham@webkit.org>
188
189         [Windows, WinCairo] Regenerate .def files on changes
190         https://bugs.webkit.org/show_bug.cgi?id=104136
191
192         Reviewed by Tim Horton.
193
194         The new .def file generator is not regenerating the link
195         export definitions once it creates the definition file
196         the first time. You must clean the build directory for
197         new symbols to be added (or removed).
198
199         * win/WebKit2.vcproj: Change the WebKit2.def file reference to
200           point to the generated version of the file.
201         * win/WebKit2ExportGenerator.vcproj: Add WebKit2.def.in as a source
202           file that participates in the build so that Visual Studio knows
203           to build the project when the file changes.
204         * win/WebKit2ExportGeneratorBuildCmd.cmd: Added. Refactor build
205           command into its own shell script.
206         * win/WebKit2ExportGeneratorPostBuild.cmd: Call new BuildCmd script.
207         * win/WebKit2ExportGeneratorPreBuild.cmd: Delete the old generator
208           and definition files to ensure a clean build.
209
210 2012-12-05  Halton Huo  <halton.huo@intel.com>
211
212         [CMake] Unify coding style for CMake files
213         https://bugs.webkit.org/show_bug.cgi?id=103605
214
215         Reviewed by Laszlo Gombos.
216
217         Update cmake files(.cmake, CMakeLists.txt) with following style rules:
218         1. Indentation
219         1.1 Use spaces, not tabs.
220         1.2 Four spaces as indent.
221         2. Spacing
222         2.1 Place one space between control statements and their parentheses.
223             For eg, if (), else (), elseif (), endif (), foreach (),
224             endforeach (), while (), endwhile (), break ().
225         2.2 Do not place spaces between function and macro statements and
226             their parentheses. For eg, macro(), endmacro(), function(),
227             endfunction().
228         2.3 Do not place spaces between a command or function or macro and its
229             parentheses, or between a parenthesis and its content. For eg,
230             message("testing") not message( "testing") or message ("testing" )
231         2.4 No space at line ending.
232         3. Lowercase when call commands macros and functions. For eg,
233            add_executable() not ADD_EXECUTABLE(), set() not SET().
234
235         * CMakeLists.txt:
236         * PlatformEfl.cmake:
237         * win/WebKit2ExportGenerator.vcproj:
238         * win/WebKit2ExportGeneratorCommon.vsprops:
239
240 2012-12-05  Huang Dongsung  <luxtella@company100.net>
241
242         Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
243         https://bugs.webkit.org/show_bug.cgi?id=103843
244
245         Reviewed by Noam Rosenthal.
246
247         Send SetRootCompositingLayer message to the UI process in the
248         constructor instead of sending it on the first flush.
249
250         This is in preparation for refactoring TextureMapper to work in an actor
251         model (http://webkit.org/b/103854).
252
253         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
254         (WebKit::LayerTreeRenderer::setLayerState):
255         (WebKit::LayerTreeRenderer::setRootLayerID):
256         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
257         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
258         (WebKit::LayerTreeCoordinator::initializeRootCompositingLayer):
259         (WebKit):
260         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
261         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
262         (LayerTreeCoordinator):
263
264 2012-12-05  Jinwoo Song  <jinwoo7.song@samsung.com>
265
266         [EFL][WK2] Don't use the C API internally in ewk_cookie_manager
267         https://bugs.webkit.org/show_bug.cgi?id=103243
268
269         Reviewed by Gyuyoung Kim.
270
271         Used the C++ classes directly instead of the C API wrappers
272         to avoid a lot of toImpl/toAPI casts.
273
274         * UIProcess/API/efl/ewk_context.cpp:
275         (EwkContext::cookieManager):
276         * UIProcess/API/efl/ewk_cookie_manager.cpp:
277         (EwkCookieManager::EwkCookieManager):
278         (EwkCookieManager::~EwkCookieManager):
279         (EwkCookieManager::setPersistentStorage):
280         (EwkCookieManager::setHTTPAcceptPolicy):
281         (EwkCookieManager::clearHostnameCookies):
282         (EwkCookieManager::clearAllCookies):
283         (EwkCookieManager::watchChanges):
284         (EwkCookieManager::getHostNamesWithCookies):
285         (EwkCookieManager::getHTTPAcceptPolicy):
286         * UIProcess/API/efl/ewk_cookie_manager_private.h:
287         (EwkCookieManager::create):
288         (EwkCookieManager):
289
290 2012-12-05  No'am Rosenthal  <noam@webkit.org>
291
292         Coordinated Graphics: Enable support for setContentsToBackgroundColor
293         https://bugs.webkit.org/show_bug.cgi?id=104128
294
295         Reviewed by Kenneth Rohde Christiansen.
296
297         Enable setContentsToBackgroundColor in CoordinatedGraphicsLayer, and pass it through to the UI process.
298
299         * Shared/WebLayerTreeInfo.h:
300         (WebLayerInfo):
301         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
302         (WebKit::LayerTreeRenderer::setLayerState):
303         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
304         (WebCore::CoordinatedGraphicsLayer::setContentsToBackgroundColor):
305         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
306         (CoordinatedGraphicsLayer):
307
308 2012-12-05  Alexey Proskuryakov  <ap@apple.com>
309
310         <rdar://problem/12809890> Should allow sandbox lookup of com.apple.tccd
311
312         Reviewed by Beth Dakin and Dan Bernstein.
313
314         * WebProcess/com.apple.WebProcess.sb.in:
315
316 2012-12-05  Alexey Proskuryakov  <ap@apple.com>
317
318         [WK2] Would like to queue messages while NetworkProcess is launching
319         https://bugs.webkit.org/show_bug.cgi?id=104143
320
321         Reviewed by Anders Carlsson.
322
323         Factored out process launching and message sending code to a ChildProcessProxy class.
324         Process closing and crashing code should be moved once we better understand common
325         requirements for the processes.
326
327         * CMakeLists.txt:
328         * GNUmakefile.list.am:
329         * Target.pri:
330         * WebKit2.xcodeproj/project.pbxproj:
331         * win/WebKit2.vcproj:
332         Added ChildProcessProxy files.
333
334         * Shared/ChildProcessProxy.cpp: Added.
335         (WebKit::ChildProcessProxy::ChildProcessProxy):
336         (WebKit::ChildProcessProxy::~ChildProcessProxy):
337         (WebKit::ChildProcessProxy::fromConnection):
338         (WebKit::ChildProcessProxy::connect):
339         (WebKit::ChildProcessProxy::terminate):
340         (WebKit::ChildProcessProxy::sendMessage):
341         (WebKit::ChildProcessProxy::isLaunching):
342         (WebKit::ChildProcessProxy::didFinishLaunching):
343         (WebKit::ChildProcessProxy::clearConnection):
344         * Shared/ChildProcessProxy.h: Added.
345         (WebKit::ChildProcessProxy::connection):
346         (WebKit::ChildProcessProxy::isValid):
347         (WebKit::ChildProcessProxy::canSendMessage):
348         (WebKit::ChildProcessProxy::processIdentifier):
349         (WebKit::ChildProcessProxy::send):
350         (WebKit::ChildProcessProxy::sendSync):
351         Moved code from WebProcessProxy. Every ChildProcessProxy is a connection client,
352         but every one is a connection queue client, so that latter is passed as an argument.
353
354         * UIProcess/Network/NetworkProcessProxy.h:
355         * UIProcess/Network/NetworkProcessProxy.cpp:
356         Removed unused syncMessageSendTimedOut(), thank you OVERRIDE.
357
358         * UIProcess/Network/NetworkProcessProxy.cpp:
359         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
360         (WebKit::NetworkProcessProxy::getLaunchOptions):
361         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
362         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
363         (WebKit::NetworkProcessProxy::didFinishLaunching):
364         * UIProcess/Network/NetworkProcessProxy.h:
365         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
366         (WebKit::NetworkProcessProxy::setApplicationIsOccluded):
367         * UIProcess/WebProcessProxy.cpp:
368         (WebKit::WebProcessProxy::WebProcessProxy):
369         (WebKit::WebProcessProxy::~WebProcessProxy):
370         (WebKit::WebProcessProxy::getLaunchOptions):
371         (WebKit::WebProcessProxy::disconnect):
372         (WebKit::WebProcessProxy::didFinishLaunching):
373         Use shared code.
374
375         * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::fromConnection):
376         NetworkProcess inherits from conneciton client privately, so we need to do most
377         of the work in ClientProcessProxy, and further upcast here.
378
379         * UIProcess/efl/WebProcessProxyEfl.cpp:
380         (WebKit::WebProcessProxy::platformGetLaunchOptions):
381         * UIProcess/gtk/WebProcessProxyGtk.cpp:
382         (WebKit::WebProcessProxy::platformGetLaunchOptions):
383         * UIProcess/mac/WebProcessProxyMac.mm:
384         (WebKit::WebProcessProxy::platformGetLaunchOptions):
385         * UIProcess/qt/WebProcessProxyQt.cpp:
386         (WebKit::WebProcessProxy::platformGetLaunchOptions):
387         * UIProcess/win/WebProcessProxyWin.cpp:
388         (WebKit::WebProcessProxy::platformGetLaunchOptions):
389         Updated for renaming, platformConnect -> platformGetLaunchOptions().
390
391 2012-12-05  Kiran Muppala  <cmuppala@apple.com>
392
393         WebKit2 child processes need to initialize timer coalescing policy on Mac.
394         https://bugs.webkit.org/show_bug.cgi?id=103613
395
396         Reviewed by Mark Rowe.
397
398         Set timer coalescing policy of WebKit2 child processes to that of visible applications
399         until they can manage the policy based on UI process visibility.
400
401         * Shared/mac/ChildProcessMac.mm:
402         (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
403         for visible applications.
404         (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.
405
406 2012-12-05  Anders Carlsson  <andersca@apple.com>
407
408         Connection::waitForMessage shouldn't use the message ID
409         https://bugs.webkit.org/show_bug.cgi?id=104157
410
411         Reviewed by Andreas Kling.
412
413         Pass the message receiver name and message name to waitForMessage and use them for lookups instead of
414         the message ID.
415
416         * Platform/CoreIPC/Connection.cpp:
417         (CoreIPC::Connection::createSyncMessageEncoder):
418         (CoreIPC::Connection::waitForMessage):
419         (CoreIPC::Connection::processIncomingMessage):
420         * Platform/CoreIPC/Connection.h:
421         (CoreIPC::Connection::waitForAndDispatchImmediately):
422
423 2012-12-05  Jae Hyun Park  <jae.park@company100.net>
424
425         Coordinated Graphics: Move AreaAllocator and UpdateAtlas to CoordinatedGraphics
426         https://bugs.webkit.org/show_bug.cgi?id=103864
427
428         Reviewed by Noam Rosenthal.
429
430         AreaAllocator and UpdateAtlas are only used for Coordinated Graphics.
431         So, these should be moved to CoordinatedGraphics to clarify the code.
432
433         No new test, because no change of behavior.
434
435         * CMakeLists.txt:
436         * Target.pri:
437         * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/AreaAllocator.cpp.
438         (WebKit):
439         (WebKit::AreaAllocator::AreaAllocator):
440         (WebKit::AreaAllocator::~AreaAllocator):
441         (WebKit::AreaAllocator::expand):
442         (WebKit::AreaAllocator::expandBy):
443         (WebKit::AreaAllocator::release):
444         (WebKit::AreaAllocator::overhead):
445         (WebKit::AreaAllocator::roundAllocation):
446         (WebKit::GeneralAreaAllocator::GeneralAreaAllocator):
447         (WebKit::GeneralAreaAllocator::~GeneralAreaAllocator):
448         (WebKit::GeneralAreaAllocator::freeNode):
449         (WebKit::GeneralAreaAllocator::expand):
450         (WebKit::fitsWithin):
451         (WebKit::GeneralAreaAllocator::allocate):
452         (WebKit::GeneralAreaAllocator::allocateFromNode):
453         (WebKit::GeneralAreaAllocator::splitNode):
454         (WebKit::GeneralAreaAllocator::updateLargestFree):
455         (WebKit::GeneralAreaAllocator::release):
456         (WebKit::GeneralAreaAllocator::overhead):
457         * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: Renamed from Source/WebKit2/WebProcess/WebPage/AreaAllocator.h.
458         (WebCore::nextPowerOfTwo):
459         (WebCore):
460         (WebKit):
461         (AreaAllocator):
462         (WebKit::AreaAllocator::size):
463         (WebKit::AreaAllocator::minimumAllocation):
464         (WebKit::AreaAllocator::setMinimumAllocation):
465         (WebKit::AreaAllocator::margin):
466         (WebKit::AreaAllocator::setMargin):
467         (GeneralAreaAllocator):
468         (Node):
469         * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp.
470         (WebKit):
471         (WebKit::UpdateAtlas::UpdateAtlas):
472         (WebKit::UpdateAtlas::~UpdateAtlas):
473         (WebKit::UpdateAtlas::buildLayoutIfNeeded):
474         (WebKit::UpdateAtlas::didSwapBuffers):
475         (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
476         * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: Renamed from Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h.
477         (WebCore):
478         (WebKit):
479         (UpdateAtlasClient):
480         (UpdateAtlas):
481         (WebKit::UpdateAtlas::size):
482         (WebKit::UpdateAtlas::flags):
483         (WebKit::UpdateAtlas::addTimeInactive):
484         (WebKit::UpdateAtlas::isInactive):
485         (WebKit::UpdateAtlas::isInUse):
486
487 2012-12-05  Michael Brüning  <michael.bruning@digia.com>
488
489         Fix compilation for Qt5.0.0 stable branch.
490         https://bugs.webkit.org/show_bug.cgi?id=103870
491
492         Reviewed by Simon Hausmann.
493
494         QWindow::pos() and QQuickItem::pos() have been renamed to position().
495         Patch by Lars Knoll <lars.knoll@digia.com>
496
497         * UIProcess/qt/PageViewportControllerClientQt.cpp:
498         (WebKit::PageViewportControllerClientQt::setContentRectVisiblePositionAtScale):
499         (WebKit::PageViewportControllerClientQt::setViewportPosition):
500
501 2012-12-05  Christophe Dumez  <christophe.dumez@intel.com>
502
503         [EFL][WK2] EWK2UnitTestBase.ewk_favicon_database_async_icon_get is crashing with new Ewk_Context
504         https://bugs.webkit.org/show_bug.cgi?id=104110
505
506         Reviewed by Laszlo Gombos.
507
508         Unregister the WKFaviconDatabase client in EwkFaviconDatabase
509         destructor to avoid crashing if the callbacks get called
510         after the EwkFaviconDatabase object has been destroyed (i.e.
511         the parent EwkContext object was destroyed).
512
513         * UIProcess/API/efl/ewk_favicon_database.cpp:
514         (EwkFaviconDatabase::~EwkFaviconDatabase):
515
516 2012-12-05  Andras Becsi  <andras.becsi@digia.com>
517
518         [Qt][WK2] REGRESSION(r135399): It made qmltests::DoubleTapToZoom::test_double_zoomInAndBack() API test fail
519         https://bugs.webkit.org/show_bug.cgi?id=103889
520
521         Reviewed by Jocelyn Turcotte.
522
523         The client should always be notified in PageViewportController::didChangeViewportAttributes
524         about the changed attributes not only if the minimum scale changed. This ensures that these
525         changes are propagated to QWebKitTest and the zoom stack of double-tap-to-zoom is reset correctly.
526         Also increase precision of scale comparisons since the current value resulted in flakyness in
527         scale related API tests.
528
529         * UIProcess/PageViewportController.cpp:
530         (WebKit::PageViewportController::didChangeViewportAttributes):
531         (WebKit::PageViewportController::updateMinimumScaleToFit):
532
533 2012-12-05  Christophe Dumez  <christophe.dumez@intel.com>
534
535         [CoordinatedGraphics] Use unsigned integers for CoordinatedTile IDs
536         https://bugs.webkit.org/show_bug.cgi?id=103816
537
538         Reviewed by Jocelyn Turcotte.
539
540         Use unsigned integer for CoordinatedTile identifier type.
541         CoordinatedTile was previously using signed integers for
542         its identifier which is unsafe because the generated ID
543         will overflow at some point and the C and C++ language
544         standards say that overflow of a signed value is undefined
545         behaviour.
546
547         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
548         (WebKit::CoordinatedBackingStore::createTile):
549         (WebKit::CoordinatedBackingStore::removeTile):
550         (WebKit::CoordinatedBackingStore::removeAllTiles):
551         (WebKit::CoordinatedBackingStore::updateTile):
552         (WebKit::CoordinatedBackingStore::texture):
553         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
554         (WebKit::CoordinatedBackingStore::commitTileOperations):
555         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
556         (CoordinatedBackingStore):
557         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
558         (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
559         (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
560         (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
561         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
562         (LayerTreeCoordinatorProxy):
563         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
564         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
565         (WebKit::LayerTreeRenderer::createTile):
566         (WebKit::LayerTreeRenderer::removeTile):
567         (WebKit::LayerTreeRenderer::updateTile):
568         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
569         (LayerTreeRenderer):
570         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
571         (WebCore::CoordinatedGraphicsLayer::createTile):
572         (WebCore::CoordinatedGraphicsLayer::updateTile):
573         (WebCore::CoordinatedGraphicsLayer::removeTile):
574         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
575         (CoordinatedGraphicsLayerClient):
576         (CoordinatedGraphicsLayer):
577         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
578         (WebKit):
579         (WebKit::CoordinatedTile::CoordinatedTile):
580         (WebKit::CoordinatedTile::~CoordinatedTile):
581         (WebKit::CoordinatedTile::updateBackBuffer):
582         (WebKit::CoordinatedTile::isReadyToPaint):
583         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
584         (CoordinatedTile):
585         (CoordinatedTileClient):
586         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
587         (WebKit::LayerTreeCoordinator::createTile):
588         (WebKit::LayerTreeCoordinator::updateTile):
589         (WebKit::LayerTreeCoordinator::removeTile):
590         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
591         (LayerTreeCoordinator):
592
593 2012-12-05  Yuni Jeong  <yhnet.jung@samsung.com>
594
595         [EFL][WK2] Add APIs to get/set private browsing.
596         https://bugs.webkit.org/show_bug.cgi?id=102052
597
598         Reviewed by Gyuyoung Kim.
599
600         Private Browsing allows a user to browse the Internet without saving any information about which sites and pages a user has visited.
601
602         * UIProcess/API/efl/ewk_settings.cpp:
603         (ewk_settings_private_browsing_enabled_set):
604         (ewk_settings_private_browsing_enabled_get):
605         * UIProcess/API/efl/ewk_settings.h:
606         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
607         (TEST_F):
608
609 2012-12-05  Joaquim Rocha  <jrocha@igalia.com>
610
611         URL schemes registered as local, no access, display isolated and as CORS enabled are not registered again after a web process crash
612         https://bugs.webkit.org/show_bug.cgi?id=104013
613
614         Reviewed by Darin Adler.
615
616         * WebProcess/WebProcess.cpp:
617         (WebKit::WebProcess::initializeWebProcess): Iterate through the schemes stored in
618         urlSchemesRegisteredAsLocal, urlSchemesRegisteredAsNoAccess,
619         urlSchemesRegisteredAsDisplayIsolated and urlSchemesRegisteredAsCORSEnabled and
620         call the respective (already existing) methods for registering them.
621
622 2012-12-04  Yuni Jeong  <yhnet.jung@samsung.com>
623
624         [EFL][WK2] Add APIs to get/set default font size.
625         https://bugs.webkit.org/show_bug.cgi?id=101921
626
627         Reviewed by Gyuyoung Kim.
628
629         Add setting APIs for default font size and a unit test.
630
631         * UIProcess/API/efl/ewk_settings.cpp:
632         (ewk_settings_default_font_size_set):
633         (ewk_settings_default_font_size_get):
634         * UIProcess/API/efl/ewk_settings.h:
635         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
636         (TEST_F):
637
638 2012-12-04  Anders Carlsson  <andersca@apple.com>
639
640         Remove #ifs that are always true
641         https://bugs.webkit.org/show_bug.cgi?id=104080
642
643         Reviewed by Andreas Kling.
644
645         __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 is always true, so remove all the #ifs.
646
647         * PluginProcess/mac/PluginProcessMac.mm:
648         (WebKit::initializeSandbox):
649         (WebKit::PluginProcess::platformInitialize):
650         * Shared/DictionaryPopupInfo.cpp:
651         (WebKit::DictionaryPopupInfo::encode):
652         (WebKit::DictionaryPopupInfo::decode):
653         * Shared/DictionaryPopupInfo.h:
654         * Shared/mac/WebEventFactory.mm:
655         (WebKit::phaseForEvent):
656         (WebKit::momentumPhaseForEvent):
657         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
658         (WebKit::initializeSandbox):
659         (WebKit::SharedWorkerProcess::platformInitialize):
660         * UIProcess/API/mac/PDFViewController.mm:
661         (WebKit::PDFViewScrollView_scrollWheel):
662         (WebKit::PDFViewController::pdfKitBundle):
663         * UIProcess/API/mac/PageClientImpl.mm:
664         (WebKit::PageClientImpl::didPerformDictionaryLookup):
665         (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
666         (WebKit::PageClientImpl::recordAutocorrectionResponse):
667         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
668         * UIProcess/API/mac/WKView.mm:
669         (-[WKView displayIfNeeded]):
670         (-[WKView draggingUpdated:]):
671         (-[WKView viewDidMoveToWindow]):
672         (-[WKView _intrinsicDeviceScaleFactor]):
673         (-[WKView _cacheWindowBottomCornerRect]):
674         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
675         (+[WKView hideWordDefinitionWindow]):
676         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
677         * UIProcess/Launcher/mac/EnvironmentVariables.h:
678         (EnvironmentVariables):
679         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
680         (WebKit::addDYLDEnvironmentAdditions):
681         (WebKit::createWebProcessServiceForWebKitDevelopment):
682         (WebKit):
683         (WebKit::tryPreexistingProcess):
684         (WebKit::createProcess):
685         (WebKit::ProcessLauncher::launchProcess):
686         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
687         (WebKit::PluginInfoStore::shouldUsePlugin):
688         (WebKit::PluginInfoStore::reactivateInactivePlugin):
689         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
690         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
691         * UIProcess/WebPageProxy.cpp:
692         (WebKit::WebPageProxy::didCommitLoadForFrame):
693         (WebKit::WebPageProxy::pageDidScroll):
694         (WebKit::WebPageProxy::processDidCrash):
695         (WebKit::WebPageProxy::recordAutocorrectionResponse):
696         (WebKit::WebPageProxy::handleAlternativeTextUIResult):
697         * UIProcess/WebPageProxy.h:
698         (WebPageProxy):
699         * UIProcess/WebPageProxy.messages.in:
700         * UIProcess/mac/TextCheckerMac.mm:
701         (WebKit::initializeState):
702         (WebKit::TextChecker::getGuessesForWord):
703         * UIProcess/mac/WKFullScreenWindowController.mm:
704         (convertRectToScreen):
705         * UIProcess/mac/WebContextMac.mm:
706         (WebKit::WebContext::platformInitializeWebProcess):
707         * WebKit2Prefix.h:
708         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
709         (WebKit::NPN_GetValue):
710         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
711         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
712         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
713         * WebProcess/WebCoreSupport/WebEditorClient.h:
714         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
715         (InitWebCoreSystemInterface):
716         * WebProcess/WebPage/WebPage.cpp:
717         (WebKit):
718         * WebProcess/WebPage/WebPage.h:
719         (WebPage):
720         * WebProcess/WebPage/WebPage.messages.in:
721         * WebProcess/WebPage/mac/WebPageMac.mm:
722         (WebKit::WebPage::performDictionaryLookupAtLocation):
723         (WebKit::WebPage::performDictionaryLookupForSelection):
724         (WebKit::WebPage::performDictionaryLookupForRange):
725         * WebProcess/mac/SecItemShimMethods.mm:
726         * WebProcess/mac/WebProcessMac.mm:
727         (WebKit::WebProcess::secItemResponse):
728         * WebProcess/mac/WebProcessMainMac.mm:
729         (WebKit::WebProcessMain):
730         * WebProcessService/WebProcessServiceMain.mm:
731         (main):
732         * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm:
733         (WebProcessServiceForWebKitDevelopmentEventHandler):
734         (main):
735
736 2012-12-04  Anders Carlsson  <andersca@apple.com>
737
738         Remove more Snow Leopard only code
739         https://bugs.webkit.org/show_bug.cgi?id=104079
740
741         Reviewed by Andreas Kling.
742
743         All of the SecKeychainItem code was Snow Leopard only.
744
745         * Shared/mac/SecKeychainItemRequestData.cpp: Removed.
746         * Shared/mac/SecKeychainItemRequestData.h: Removed.
747         * Shared/mac/SecKeychainItemResponseData.cpp: Removed.
748         * Shared/mac/SecKeychainItemResponseData.h: Removed.
749         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
750         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
751         * UIProcess/WebProcessProxy.h:
752         (WebProcessProxy):
753         * UIProcess/WebProcessProxy.messages.in:
754         * UIProcess/mac/WebProcessProxyMac.mm:
755         * WebKit2.xcodeproj/project.pbxproj:
756         * WebProcess/WebProcess.h:
757         * WebProcess/WebProcess.messages.in:
758         * WebProcess/mac/KeychainItemShimMethods.h: Removed.
759         * WebProcess/mac/KeychainItemShimMethods.mm: Removed.
760         * WebProcess/mac/WebProcessMac.mm:
761         (WebKit::WebProcess::initializeShim):
762         * WebProcess/mac/WebProcessShim.mm:
763
764 2012-12-04  Anders Carlsson  <andersca@apple.com>
765
766         Remove PageClient::didChangeScrollbarsForMainFrame
767         https://bugs.webkit.org/show_bug.cgi?id=104077
768
769         Reviewed by Andreas Kling.
770
771         The aforementioned function was only used to implement some Snow Leopard specific behavior that we no longer support.
772
773         * UIProcess/API/gtk/PageClientImpl.cpp:
774         * UIProcess/API/gtk/PageClientImpl.h:
775         (PageClientImpl):
776         * UIProcess/API/mac/PageClientImpl.h:
777         (PageClientImpl):
778         * UIProcess/API/mac/PageClientImpl.mm:
779         * UIProcess/API/mac/WKView.mm:
780         (-[WKView viewWillMoveToWindow:]):
781         * UIProcess/API/mac/WKViewInternal.h:
782         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
783         * UIProcess/PageClient.h:
784         (PageClient):
785         * UIProcess/WebPageProxy.cpp:
786         (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
787         * UIProcess/efl/PageClientBase.cpp:
788         (WebKit):
789         * UIProcess/efl/PageClientBase.h:
790         (PageClientBase):
791         * UIProcess/qt/QtPageClient.h:
792         * UIProcess/win/WebView.cpp:
793         * UIProcess/win/WebView.h:
794         (WebView):
795
796 2012-12-04  Andy Estes  <aestes@apple.com>
797
798         [WebKit2] WKWebProcessPlugInBrowserContextControllers should be treated as type WKBrowsingContextControllerType for encoding purposes
799         https://bugs.webkit.org/show_bug.cgi?id=104063
800
801         Reviewed by Sam Weinig.
802
803         Objective-C message graphs can include browsing context controller
804         objects, which are decoded as WKWebProcessPlugInBrowserContextControllers
805         in the web process plug-in and as WKBrowsingContextControllers in the UI
806         process. Ensure we correctly encode WKWebProcessPlugInBrowserContextControllers
807         by treating them as type WKBrowsingContextControllerType.
808
809         * Shared/mac/ObjCObjectGraphCoders.mm:
810         (WebKit::typeFromObject):
811
812 2012-12-04  Simon Fraser  <simon.fraser@apple.com>
813
814         Show a mini visualizer for the tile cache tiles
815         https://bugs.webkit.org/show_bug.cgi?id=104053
816
817         Reviewed by Beth Dakin.
818
819         Plumb through a preference that controls the visibility of a tiled
820         scrolling indicator, and parent that layer in the TiledCoreAnimationDrawingArea.
821
822         * Shared/WebPreferencesStore.h:
823         * UIProcess/API/C/WKPreferences.cpp:
824         (WKPreferencesSetTiledScrollingIndicatorVisible):
825         (WKPreferencesGetTiledScrollingIndicatorVisible):
826         * UIProcess/API/C/WKPreferencesPrivate.h:
827         * WebProcess/WebPage/WebPage.cpp:
828         (WebKit::WebPage::updatePreferences):
829         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
830         (TiledCoreAnimationDrawingArea):
831         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
832         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
833         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
834         (WebKit::TiledCoreAnimationDrawingArea::mainFrameTiledBacking):
835         (WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):
836
837 2012-12-04  Anders Carlsson  <andersca@apple.com>
838
839         Set the visible process name before entering the sandbox
840         https://bugs.webkit.org/show_bug.cgi?id=104030
841         <rdar://problem/12800317>
842
843         Reviewed by Sam Weinig.
844
845         Pass the UI process name along as a process initialization parameter so we can set it
846         before entering the sandbox. Remove the UI process name from WebProcessCreationParameters.
847
848         * Shared/WebProcessCreationParameters.cpp:
849         (WebKit::WebProcessCreationParameters::encode):
850         (WebKit::WebProcessCreationParameters::decode):
851         * Shared/WebProcessCreationParameters.h:
852         (WebProcessCreationParameters):
853         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
854         (WebKit::connectToWebProcessServiceForWebKitDevelopment):
855         (WebKit::createWebProcessService):
856         (WebKit::createProcess):
857         * UIProcess/mac/WebContextMac.mm:
858         (WebKit::WebContext::platformInitializeWebProcess):
859         * WebProcess/mac/WebProcessInitialization.h:
860         (WebProcessInitializationParameters):
861         * WebProcess/mac/WebProcessInitialization.mm:
862         (WebKit::initializeWebProcess):
863         * WebProcess/mac/WebProcessMac.mm:
864         (WebKit::WebProcess::platformInitializeWebProcess):
865         * WebProcess/mac/WebProcessMainMac.mm:
866         (WebKit::WebProcessMain):
867         * WebProcess/mac/WebProcessServiceEntryPoints.h:
868         * WebProcess/mac/WebProcessServiceEntryPoints.mm:
869         (WebKit::WebProcessServiceEventHandler):
870         (initializeWebProcessForWebProcessServiceForWebKitDevelopment):
871         * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm:
872         (WebProcessServiceForWebKitDevelopmentEventHandler):
873
874 2012-12-03  Alexey Proskuryakov  <ap@apple.com>
875
876         [WK2] Track private browsing session explicitly
877         <rdar://problem/12714532>
878         https://bugs.webkit.org/show_bug.cgi?id=103953
879
880         Reviewed by Jessie Berlin.
881
882         * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode):
883         Fixed a confusing ifdef - this code is inside PLATFORM(WIN), so PLATFORM(MAC)
884         makes no sense.
885
886         * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled):
887         This is the only place in WK2 where we can learn that private browsing got disabled -
888         no other functions are called when there are no pages open.
889
890         * UIProcess/WebContext.h:
891         * UIProcess/WebContext.cpp:
892         (WebKit::WebContext::willStartUsingPrivateBrowsing):
893         (WebKit::WebContext::willStopUsingPrivateBrowsing):
894         Count the number of API calls. We only implement a single shared private browsing
895         session, not one per page group as API implies. When private browsing gets disabled,
896         we want to destroy its session.
897
898         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences):
899         Ensure a private browsing session if the current page needs it.
900
901         * WebProcess/WebProcess.h:
902         * WebProcess/WebProcess.messages.in:
903         * WebProcess/WebProcess.cpp:
904         (WebKit::WebProcess::ensurePrivateBrowsingSession):
905         (WebKit::WebProcess::destroyPrivateBrowsingSession):
906         Call through to WebFrameNetworkingContext.
907
908 2012-12-04  Yuni Jeong  <yhnet.jung@samsung.com>
909
910         [EFL][WK2] Add APIs to toggle plug-ins support.
911         https://bugs.webkit.org/show_bug.cgi?id=101920
912
913         Reviewed by Gyuyoung Kim.
914
915         Add setting APIs to toggle plug-ins support and add corresponding API tests.
916
917         * UIProcess/API/efl/ewk_settings.cpp:
918         (ewk_settings_plugins_enabled_set):
919         (ewk_settings_plugins_enabled_get):
920         * UIProcess/API/efl/ewk_settings.h:
921         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
922         (TEST_F):
923
924 2012-12-04  Andras Becsi  <andras.becsi@digia.com>
925
926         [Qt][WK2] Do not override previously set flags of QQuickWebView when enabling drag&drop
927         https://bugs.webkit.org/show_bug.cgi?id=103901
928
929         Reviewed by Jocelyn Turcotte.
930
931         Setting the specific flag instead of resetting all the flags
932         when enabling QQuickItem::ItemAcceptsDrops.
933         This fixes clipping of the contents of QQuickWebView.
934
935         * UIProcess/API/qt/qquickwebview.cpp:
936         (QQuickWebViewPrivate::initialize):
937
938 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
939
940         [GTK] Avoid unnecessary heap allocations during drag and drop operations
941         https://bugs.webkit.org/show_bug.cgi?id=87938
942
943         Reviewed by Martin Robinson.
944
945         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
946         (webkitWebViewBaseDragDataReceived): Create DragData for the given
947         DataObjectGtk in the stack.
948         (webkitWebViewBaseDragMotion): Ditto.
949         (webkitWebViewBaseDragDrop): Ditto.
950
951 2012-12-04  Jaehun Lim  <ljaehun.lim@samsung.com>
952
953         [EFL][WK2] Use consistent class names inside Ewk classes
954         https://bugs.webkit.org/show_bug.cgi?id=103015
955
956         Reviewed by Gyuyoung Kim.
957
958         WebKit EFL doesn't use '_' in class names.
959         This patch removes the remaining uses of '_' inside Ewk classes.
960
961         * UIProcess/API/efl/EwkViewImpl.cpp:
962         (EwkViewImpl::EwkViewImpl):
963         (EwkViewImpl::~EwkViewImpl):
964         (EwkViewImpl::informIconChange):
965         (EwkViewImpl::requestColorPicker):
966         (EwkViewImpl::requestPopupMenu):
967         * UIProcess/API/efl/ewk_back_forward_list.cpp:
968         (EwkBackForwardList::nextItem):
969         (EwkBackForwardList::previousItem):
970         (EwkBackForwardList::currentItem):
971         (EwkBackForwardList::itemAt):
972         (EwkBackForwardList::getFromCacheOrCreate):
973         (EwkBackForwardList::createEinaList):
974         * UIProcess/API/efl/ewk_back_forward_list_private.h:
975         (EwkBackForwardList):
976         * UIProcess/API/efl/ewk_context.cpp:
977         (EwkContext::EwkContext):
978         (EwkContext::cookieManager):
979         (EwkContext::databaseManager):
980         (EwkContext::ensureFaviconDatabase):
981         (EwkContext::faviconDatabase):
982         (EwkContext::storageManager):
983         * UIProcess/API/efl/ewk_context_private.h:
984         (EwkContext):
985         * UIProcess/API/efl/ewk_cookie_manager.cpp:
986         (EwkCookieManager::cookiesDidChange):
987         (getAcceptPolicyCallback):
988         (getHostnamesWithCookiesCallback):
989         * UIProcess/API/efl/ewk_cookie_manager_private.h:
990         (EwkCookieManager::create):
991         * UIProcess/API/efl/ewk_database_manager.cpp:
992         (EwkDatabaseManager::createOriginList):
993         (getDatabaseOriginsCallback):
994         * UIProcess/API/efl/ewk_database_manager_private.h:
995         (EwkDatabaseManager):
996         * UIProcess/API/efl/ewk_favicon_database.cpp:
997         (EwkFaviconDatabase::didChangeIconForPageURL):
998         (EwkFaviconDatabase::iconDataReadyForPageURL):
999         * UIProcess/API/efl/ewk_popup_menu.cpp:
1000         (EwkPopupMenu::EwkPopupMenu):
1001         (EwkPopupMenu::~EwkPopupMenu):
1002         * UIProcess/API/efl/ewk_storage_manager.cpp:
1003         (EwkStorageManager::createOriginList):
1004         (getStorageOriginsCallback):
1005         * UIProcess/API/efl/ewk_storage_manager_private.h:
1006         (EwkStorageManager):
1007
1008 2012-12-03  Huang Dongsung  <luxtella@company100.net>
1009
1010         Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
1011         https://bugs.webkit.org/show_bug.cgi?id=103843
1012
1013         Reviewed by Noam Rosenthal.
1014
1015         Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()
1016         because LayerTreeCoordinatorProxy::didRenderFrame() is always called after
1017         setting the root layer. There is no behaviour changes because setting the root
1018         layer isn't actually applied to TextureMapperLayer until DidRenderFrame message
1019         is received.
1020
1021         This is in preparation for refactoring TextureMapper to work in an actor
1022         model (http://webkit.org/b/103854).
1023
1024         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
1025         (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
1026         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1027         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
1028
1029 2012-12-03  Anders Carlsson  <andersca@apple.com>
1030
1031         Make it easier to add more web process initialization parameters
1032         https://bugs.webkit.org/show_bug.cgi?id=103942
1033
1034         Reviewed by Andreas Kling.
1035
1036         Add a WebProcessInitializationParameters struct to make it easier to add more initialization
1037         parameters in the future. Also, fix naming and spelling errors.
1038
1039         * WebProcess/mac/WebProcessInitialization.h:
1040         (WebProcessInitializationParameters):
1041         (WebKit):
1042         * WebProcess/mac/WebProcessInitialization.mm:
1043         (WebKit::initializeWebProcess):
1044         * WebProcess/mac/WebProcessMainMac.mm:
1045         (WebKit::WebProcessMain):
1046         * WebProcess/mac/WebProcessServiceEntryPoints.h:
1047         * WebProcess/mac/WebProcessServiceEntryPoints.mm:
1048         (WebKit::WebProcessServiceEventHandler):
1049         (webProcessServiceMain):
1050         (initializeWebProcessForWebProcessServiceForWebKitDevelopment):
1051         * WebProcessService/WebProcessServiceMain.mm:
1052         (main):
1053         * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm:
1054         (WebProcessServiceForWebKitDevelopmentEventHandler):
1055
1056 2012-12-03  Tim Horton  <timothy_horton@apple.com>
1057
1058         PDFPlugin: <embed> and <object> PDFs affect their parent frame's page scale
1059         https://bugs.webkit.org/show_bug.cgi?id=103286
1060         <rdar://problem/12752315>
1061
1062         Reviewed by Dan Bernstein.
1063
1064         Style fixes after http://trac.webkit.org/changeset/136316.
1065
1066         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1067         (WebKit::PDFPlugin::isFullFramePlugin):
1068
1069 2012-12-03  Alexis Menard  <alexis@webkit.org>
1070
1071         [Mac] Enable CSS3 background-position offset by default.
1072         https://bugs.webkit.org/show_bug.cgi?id=103905
1073
1074         Reviewed by Simon Fraser.
1075
1076         Turn the flag on by default.
1077
1078         * Configurations/FeatureDefines.xcconfig:
1079
1080 2012-12-03  Ryuan Choi  <ryuan.choi@samsung.com>
1081
1082         [EFL][WK2] Add contents,size,changed signal to the ewk_view API
1083         https://bugs.webkit.org/show_bug.cgi?id=103094
1084
1085         Reviewed by Kenneth Rohde Christiansen.
1086
1087         This patch emits signal to let applications know contents size.
1088         Applications can use this signal to give some additional behavior such as
1089         minimap, external scroll for quick movement.
1090
1091         * UIProcess/API/efl/EwkViewCallbacks.h: Added contents,size,changed signal.
1092         * UIProcess/API/efl/EwkViewImpl.cpp: Removed dead code.
1093         * UIProcess/API/efl/EwkViewImpl.h: Ditto.
1094         (EwkViewImpl):
1095         * UIProcess/API/efl/ewk_view.h: Added test case.
1096         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1097         (onContentsSizeChanged):
1098         (TEST_F):
1099         * UIProcess/efl/PageClientDefaultImpl.cpp: Emitted contents,size,changed signal.
1100         (WebKit::PageClientDefaultImpl::didChangeContentsSize):
1101         * UIProcess/efl/PageClientLegacyImpl.cpp: Ditto.
1102         (WebKit::PageClientLegacyImpl::didChangeContentsSize):
1103         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1104         (WebKit::WebChromeClient::contentsSizeChanged):
1105         Sended DidChangeContentsSize message although TILED_BACKINGSTORE is disabled.
1106
1107 2012-12-03  Csaba Osztrogonác  <ossy@webkit.org>
1108
1109         Unreviewed fix after r136292 to make GIT-SVN repositories happy.
1110
1111         * win/WebKit2ExportGenerator.vcproj: Added property svn:eol-style.
1112         * win/WebKit2ExportGeneratorCommon.vsprops: Added property svn:eol-style.
1113         * win/WebKit2ExportGeneratorDebug.vsprops: Added property svn:eol-style.
1114         * win/WebKit2ExportGeneratorDebugAll.vsprops: Added property svn:eol-style.
1115         * win/WebKit2ExportGeneratorDebugCairoCFLite.vsprops: Added property svn:eol-style.
1116         * win/WebKit2ExportGeneratorPostBuild.cmd: Added property svn:eol-style.
1117         * win/WebKit2ExportGeneratorPreBuild.cmd: Added property svn:eol-style.
1118         * win/WebKit2ExportGeneratorProduction.vsprops: Added property svn:eol-style.
1119         * win/WebKit2ExportGeneratorRelease.vsprops: Added property svn:eol-style.
1120         * win/WebKit2ExportGeneratorReleaseCairoCFLite.vsprops: Added property svn:eol-style.
1121
1122 2012-12-03  Michael Brüning  <michael.bruning@digia.com>
1123
1124         [Qt][WK2] New resize tests fail
1125         https://bugs.webkit.org/show_bug.cgi?id=103875
1126
1127         Reviewed by Jocelyn Turcotte.
1128
1129         Removes reference to unused viewportSpy, adds clearing the sizeSpy to the init method instead.   
1130
1131         * UIProcess/API/qt/tests/qmltests/WebView/tst_resize.qml:
1132
1133 2012-12-03  Joaquim Rocha  <jrocha@igalia.com>
1134
1135         [GTK] Custom URI schemes stop working on Epiphany using WebKit2 after killing the web process
1136         https://bugs.webkit.org/show_bug.cgi?id=103729
1137
1138         Reviewed by Carlos Garcia Campos.
1139
1140         When a URI scheme is registered and the WebProcess is killed,
1141         those schemes would not work anymore after the process is relaunched.
1142
1143         This was observed in Epiphany and possibly affects any port that
1144         uses libsoup.
1145
1146         * Shared/WebProcessCreationParameters.cpp:
1147         (WebKit::WebProcessCreationParameters::encode): Encode the registered URI schemes.
1148         (WebKit::WebProcessCreationParameters::decode): Decode the registered URI schemes.
1149         * Shared/WebProcessCreationParameters.h: Add the urlSchemesRegistered Vector to hold the registered URI schemes.
1150         (WebProcessCreationParameters):
1151         * UIProcess/efl/WebContextEfl.cpp:
1152         (WebKit::WebContext::platformInitializeWebProcess): Assign the parameters.urlSchemesRegistered from the URI schemes
1153         registered in the WebSoupRequestManagerProxy and removed the notImplemented() call.
1154         * UIProcess/gtk/WebContextGtk.cpp:
1155         (WebKit::WebContext::platformInitializeWebProcess): Assign the parameters.urlSchemesRegistered from the URI schemes
1156         registered in the WebSoupRequestManagerProxy.
1157         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
1158         (WebKit::WebSoupRequestManagerProxy::registerURIScheme): Add the given scheme to the m_registeredURISchemes Vector.
1159         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1160         (WebKit::WebSoupRequestManagerProxy::registeredURISchemes): Return the m_registeredURISchemes.
1161         (WebSoupRequestManagerProxy): Define the m_registeredURISchemes to hold the schemes that are registered.
1162         * WebProcess/soup/WebProcessSoup.cpp:
1163         (WebKit::WebProcess::platformInitializeWebProcess): Call m_soupRequestManager.registerURIScheme for each URI scheme
1164         found in the parameters.
1165         * WebProcess/soup/WebSoupRequestManager.h: Make registerURIScheme public.
1166         (WebSoupRequestManager):
1167
1168 2012-12-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1169
1170         CSS Device Adaptation: window.innerWidth returns wrong value if CSS viewport descriptors are applied
1171         https://bugs.webkit.org/show_bug.cgi?id=103737
1172
1173         Reviewed by Kenneth Rohde Christiansen.
1174
1175         ViewportStyleResolver used frame view visibleContentRect size as initial viewport size.
1176         This however caused a problem when page enabled/disabled CSS stylesheets, having viewport
1177         descriptors. Viewport descriptors from new stylesheet were applied to the visibleContentRect
1178         affected already by the viewport descriptors from the previous stylesheet.
1179
1180         New 'initialViewportSize' property (http://dev.w3.org/csswg/css-device-adapt/#initial-viewport)
1181         was added to frame view so that viewport descriptors can always be applied to the reliable
1182         viewport size.
1183
1184         Both newly added 'initialViewportSize' property and 'fixedVisibleContentRect' property
1185         are assigned appropriately now in WebPage::sendViewportAttributesChanged().
1186
1187         * WebProcess/WebPage/WebPage.cpp:
1188         (WebKit::WebPage::sendViewportAttributesChanged):
1189
1190 2012-12-02  Huang Dongsung  <luxtella@company100.net>
1191
1192         Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy
1193         https://bugs.webkit.org/show_bug.cgi?id=103843
1194
1195         Reviewed by Noam Rosenthal.
1196
1197         Send messages to the UI process by the tree order.
1198         This is in preparation for refactoring TextureMapper to work in an actor
1199         model (http://webkit.org/b/103854).
1200
1201         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1202         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
1203
1204 2012-12-02  Ryuan Choi  <ryuan.choi@gmail.com>
1205
1206         [EFL][WK2] Update comments of header files which mentions deprecated API
1207         https://bugs.webkit.org/show_bug.cgi?id=103718
1208
1209         Reviewed by Gyuyoung Kim.
1210
1211         Updated comments which mentions XXX_unref() which was replaced to ewk_object_unref()
1212
1213         * UIProcess/API/efl/ewk_context.h:
1214         * UIProcess/API/efl/ewk_database_manager.h:
1215         * UIProcess/API/efl/ewk_storage_manager.h:
1216
1217 2012-12-02  Huang Dongsung  <luxtella@company100.net>
1218
1219         REGRESSION(r134376): ASSERT(!m_mainBackingStore) hits in CoordinatedGraphicsLayer::syncImageBacking().
1220         https://bugs.webkit.org/show_bug.cgi?id=103845
1221
1222         Reviewed by Noam Rosenthal.
1223
1224         flushCompositingStateForThisLayerOnly() calls syncImageBacking() before calling
1225         updateContentBuffers(). It means there can be the moment that
1226         CoordinatedGraphicsLayer has m_mainBackingStore although
1227         shouldHaveBackingStore() return false.
1228         This patch changes syncImageBacking() to check shouldHaveBackingStore() instead
1229         of m_mainBackingStore.
1230
1231         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1232         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
1233         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
1234         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
1235         (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore):
1236         (WebCore):
1237         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1238         (CoordinatedGraphicsLayer):
1239
1240 2012-12-02  Seokju Kwon  <seokju.kwon@gmail.com>
1241
1242         Rename WebSocketServerGtk.cpp as WebSocketServerSoup.cpp
1243         https://bugs.webkit.org/show_bug.cgi?id=103743
1244
1245         Reviewed by Gustavo Noronha Silva.
1246
1247         EFL port is using a GSocket based implementation as well.
1248         WebSocketServerSoup can be used together.
1249
1250         * GNUmakefile.list.am:
1251         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: Renamed from Source/WebKit2/UIProcess/InspectorServer/gtk/WebSocketServerGtk.cpp.
1252         (WebKit):
1253         (WebKit::connectionCallback):
1254         (WebKit::WebSocketServer::platformInitialize):
1255         (WebKit::WebSocketServer::platformListen):
1256         (WebKit::WebSocketServer::platformClose):
1257
1258 2012-12-02  Christophe Dumez  <christophe.dumez@intel.com>
1259
1260         [CoordinatedGraphics] LayerTreeRenderer::removeImageBacking() calls HashMap::find() twice
1261         https://bugs.webkit.org/show_bug.cgi?id=103815
1262
1263         Reviewed by Noam Rosenthal.
1264
1265         Call HashMap::take() in LayerTreeRenderer::removeImageBacking()
1266         to avoid calling HashMap::find() twice. find() was called once
1267         explicitly to get an iterator and a second time to remove the
1268         value from the value from the HashMap. We could have used
1269         remove(iterator) instead of remove(key) but using take() results
1270         in simpler code.
1271
1272         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1273         (WebKit::LayerTreeRenderer::removeImageBacking):
1274
1275 2012-12-02  Huang Dongsung  <luxtella@company100.net>
1276
1277         Coordinated Graphics: Images disappear randomly
1278         https://bugs.webkit.org/show_bug.cgi?id=103522
1279
1280         Reviewed by Kenneth Rohde Christiansen.
1281
1282         Currently, we delete layers before synchronizing layer states of layers. It
1283         causes flash. This patch deletes layers after the synchronization.
1284
1285         In addiation, this patch removes updateViewport() in
1286         LayerTreeCoordinatorProxy::deleteCompositingLayer() because
1287         LayerTreeCoordinatorProxy::didRenderFrame() is always called after
1288         deleting layers.
1289
1290         * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
1291         (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
1292         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
1293         (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
1294
1295 2012-12-02  Brent Fulgham  <bfulgham@webkit.org>
1296
1297         [Windows, WinCairo] Revise export definitions to match mac.
1298         https://bugs.webkit.org/show_bug.cgi?id=103687
1299
1300         Reviewed by Tim Horton.
1301
1302         Update export definition files to use the same feature exclusion
1303         macros as other generated ports.
1304
1305         * win/WebKit2.def.in: Added additional build macro guards.
1306
1307 2012-12-02  No'am Rosenthal  <noam@webkit.org>
1308
1309         [CoordinatedGraphics] Crash in TextureMapperLayer::setBackingStore()
1310         https://bugs.webkit.org/show_bug.cgi?id=103714
1311
1312         Reviewed by Kenneth Rohde Christiansen.
1313
1314         Remove a layer from the m_pendingSyncBackingStores map when it is deleted.
1315
1316         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1317         (WebKit::LayerTreeRenderer::deleteLayer):
1318
1319 2012-12-02  Yael Aharon  <yael.aharon@intel.com>
1320
1321         [EFL][WK2] MiniBrowser should have a legacy mode
1322         https://bugs.webkit.org/show_bug.cgi?id=103679
1323
1324         Reviewed by Kenneth Rohde Christiansen.
1325
1326         We need a way to create a web view in legacy mode, while still using the default context.
1327         WKViewCreate creates a legacy view, so change it to create a default context if a context
1328         was not passed.
1329
1330         * UIProcess/API/efl/ewk_view.cpp:
1331         (ewk_view_base_add):
1332
1333 2012-12-01  Tim Horton  <timothy_horton@apple.com>
1334
1335         PDFPlugin: Support PDF form editing in <iframe>s
1336         https://bugs.webkit.org/show_bug.cgi?id=103287
1337         <rdar://problem/10326917>
1338
1339         Reviewed by Dan Bernstein.
1340
1341         PDFPlugin form editing depends on having a Document that has the same
1342         size and position as the plugin; this is true not only in the full-main-frame
1343         case, but also in the <iframe> case. Therefore, we can enable form editing
1344         for <iframe> PDFPlugins.
1345
1346         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1347         (WebKit::PDFPlugin::supportsForms): Support form editing whenever
1348         our Document's widget is our PluginView (which will only be true in the
1349         full-main-frame or <iframe> case).
1350
1351 2012-12-01  Tim Horton  <timothy_horton@apple.com>
1352
1353         PDFPlugin: <embed> and <object> PDFs affect their parent frame's page scale
1354         https://bugs.webkit.org/show_bug.cgi?id=103286
1355         <rdar://problem/12752315>
1356
1357         Reviewed by Dan Bernstein.
1358
1359         Detecting whether or not a PDFPlugin is a full-page plugin or not is not
1360         as simple as checking isMainFrame(), because <embed> and <object> will
1361         cause PDFPlugin to live in the main frame, while still not being full-page.
1362         We also have to check that the main frame's document is a PluginDocument,
1363         and whether that PluginDocument's PluginWidget is our PDFPlugin's PluginView.
1364
1365         * WebProcess/Plugins/PDF/PDFPlugin.h:
1366         (PDFPlugin): Add isFullFramePlugin.
1367         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1368         (WebKit::PDFPlugin::isFullFramePlugin): Check whether the main frame is
1369         backed by a PluginDocument, and that that PluginDocument corresponds
1370         to this PDFPlugin.
1371         (WebKit::PDFPlugin::handlesPageScaleFactor): Use isFullFramePlugin.
1372         (WebKit::PDFPlugin::supportsForms): Use isFullFramePlugin.
1373
1374 2012-12-01  Tim Horton  <timothy_horton@apple.com>
1375
1376         [wk2] Use spoolRect instead of snapshots for print preview
1377         https://bugs.webkit.org/show_bug.cgi?id=103798
1378         <rdar://problem/12686749>
1379
1380         Reviewed by Sam Weinig.
1381
1382         Revert to using spoolRect instead of snapshotting for printing; this was a bogus
1383         change I made in http://trac.webkit.org/changeset/133935 which was irrelevant to
1384         the core of that change, and incorrectly disregards the Frame parameter passed to
1385         beginPrinting, instead using the WebPage's current Frame.
1386
1387         * WebProcess/WebPage/WebPage.cpp:
1388         (WebKit::WebPage::drawRectToImage):
1389
1390 2012-11-30  Anders Carlsson  <andersca@apple.com>
1391
1392         Always listen for the DidFirstLayout layout milestone
1393         https://bugs.webkit.org/show_bug.cgi?id=103795
1394         <rdar://problem/12790268>
1395
1396         Reviewed by Dan Bernstein.
1397
1398         The DidFirstLayout layout milestone is used to determine when to unfreeze the layer tree, so we always want to listen for it.
1399
1400         * WebProcess/WebPage/WebPage.cpp:
1401         (WebKit::WebPage::WebPage):
1402
1403 2012-11-30  Pierre Rossi  <pierre.rossi@gmail.com>
1404
1405         [Qt] Unreviewed speculative Mac build fix after r136232
1406
1407         cleanup an oversight from r136235
1408
1409         * PluginProcess.pro: s/webkit/webkitwidgets/
1410
1411 2012-11-30  Brent Fulgham  <bfulgham@webkit.org>
1412
1413         [Windows, WinCairo] Generate library export symbol file.
1414         https://bugs.webkit.org/show_bug.cgi?id=103687
1415
1416         Reviewed by Tim Horton.
1417
1418         Generate the export definition file based on the compile options
1419         and port settings. Get rid of the old hand-written file, and use
1420         a revised master input file that allows using conditional
1421         settings to generate the output, much like the Mac and other
1422         ports do.
1423
1424         * win/WebKit2.def: Removed.
1425         * win/WebKit2.def.in: Added.
1426         * win/WebKit2Apple.vsprops:
1427         * win/WebKit2CFLite.def: Removed.
1428         * win/WebKit2CFLite.vsprops:
1429         * win/WebKit2Common.vsprops:
1430         * win/WebKit2ExportGenerator.vcproj: Added.
1431         * win/WebKit2ExportGeneratorCommon.vsprops: Added.
1432         * win/WebKit2ExportGeneratorDebug.vsprops: Added.
1433         * win/WebKit2ExportGeneratorDebugAll.vsprops: Added.
1434         * win/WebKit2ExportGeneratorDebugCairoCFLite.vsprops: Added.
1435         * win/WebKit2ExportGeneratorPostBuild.cmd: Added.
1436         * win/WebKit2ExportGeneratorPreBuild.cmd: Added.
1437         * win/WebKit2ExportGeneratorProduction.vsprops: Added.
1438         * win/WebKit2ExportGeneratorRelease.vsprops: Added.
1439         * win/WebKit2ExportGeneratorReleaseCairoCFLite.vsprops: Added.
1440
1441 2012-11-30  Tim Horton  <timothy_horton@apple.com>
1442
1443         (Simple)PDFPlugin: Support conversion of PostScript documents
1444         https://bugs.webkit.org/show_bug.cgi?id=103289
1445         <rdar://problem/10235708>
1446
1447         Reviewed by Dan Bernstein.
1448
1449         SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
1450         to PDF before handing them off to their respective backends.
1451
1452         As PDFPlugin inherits from SimplePDFPlugin, it gets the new functionality automatically.
1453
1454         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add convertPostScriptDataIfNeeded(), and m_isPostScript.
1455         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1456         (WebKit::SimplePDFPlugin::pluginInfo): SimplePDFPlugin should claim to support PDF and PostScript.
1457         (WebKit::convertPostScriptDataSourceToPDF): PS->PDF conversion code, copied from PDFViewController (which I intend to remove).
1458         (WebKit::SimplePDFPlugin::convertPostScriptDataIfNeeded): Check if the loaded data represents a PS file; if so, convert it.
1459         (WebKit::SimplePDFPlugin::streamDidReceiveResponse): Check if the loaded data is of MIME type application/postscript, and store that in m_isPostScript.
1460         (WebKit::SimplePDFPlugin::streamDidFinishLoading): Call convertPostScriptDataIfNeeded when we finish loading.
1461         (WebKit::SimplePDFPlugin::manualStreamDidReceiveResponse): Ditto from streamDidReceiveResponse.
1462         (WebKit::SimplePDFPlugin::manualStreamDidFinishLoading): Ditto from streamDidFinishLoading.
1463         * WebProcess/WebPage/WebPage.cpp:
1464         (WebKit::WebPage::createPlugin): Use (Simple)PDFPlugin for PostScript files too.
1465
1466 2012-11-30  Tim Horton  <timothy_horton@apple.com>
1467
1468         PDFPlugin: "Show Definition" context menu item should be implemented
1469         https://bugs.webkit.org/show_bug.cgi?id=103389
1470         <rdar://problem/12710751>
1471
1472         Reviewed by Dan Bernstein.
1473
1474         Call existing dictionary popup code when the context menu "Show Definition" item is selected.
1475
1476         * WebProcess/Plugins/PDF/PDFPlugin.h:
1477         (PDFPlugin): Add showDefinitionForAttributedString and convertFromPDFViewToRootView.
1478         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1479         (-[WKPDFLayerControllerDelegate showDefinitionForAttributedString:atPoint:]): Forward this call to PDFPlugin.
1480         (WebKit::PDFPlugin::showDefinitionForAttributedString): Create a DictionaryPopupInfo with the necessary information.
1481         Ask WebPageProxy to show the dictionary popup.
1482         (WebKit::PDFPlugin::convertFromPDFViewToRootView): Convert a point from PDFLayerController space to the root view space.
1483
1484 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>
1485
1486         Unreviewed trivial Qt build fix:
1487
1488         Always link against WebProcess against QT += webkit and use webkitwidgets only if available.
1489
1490         * WebProcess.pro:
1491
1492 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi  <pierre.rossi@digia.com>
1493
1494         [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
1495         https://bugs.webkit.org/show_bug.cgi?id=99314
1496
1497         Reviewed by Tor Arne Vestbø.
1498
1499         This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
1500         shared libraries.
1501
1502         It's a big refactoring that mostly involves moving WebCore dependent
1503         code into QtWebKit and accessing it through exported QWebFrameAdapter
1504         and QWebPageAdapter classes.
1505
1506
1507         * UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro:
1508         * UIProcess/API/qt/tests/publicapi/publicapi.pro:
1509         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1510         * UIProcess/API/qt/tests/qmltests/WebView.pro:
1511         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
1512         * UIProcess/API/qt/tests/qrawwebview/qrawwebview.pro:
1513         * UIProcess/API/qt/tests/tests.pri:
1514
1515 2012-11-30  Joone Hur  <joone.hur@intel.com>
1516
1517         [EFL]Drawing artifacts while resizing the view
1518         https://bugs.webkit.org/show_bug.cgi?id=101288
1519
1520         Reviewed by Kenneth Rohde Christiansen.
1521
1522         An Evas GL surface is recreated when the window is resized, but the update of the surface is 
1523         asynchronously done, which gives Evas a chance of painting the empty surface on the screen.
1524         As a result, the flickering problem happens while resizing the view.
1525         So this patch allows to create an Evas GL surface synchronously with the update of the surface.
1526
1527         * UIProcess/API/efl/EwkViewImpl.cpp:
1528         (EwkViewImpl::EwkViewImpl): Set m_pendingSurfaceResize to false.
1529         (EwkViewImpl::displayTimerFired): Create an Evas GL surface.
1530         * UIProcess/API/efl/EwkViewImpl.h:
1531         (EwkViewImpl::setNeedsSurfaceResize): Added.
1532         (EwkViewImpl):
1533         * UIProcess/API/efl/ewk_view.cpp:
1534         (_ewk_view_smart_calculate): Set m_pendingSurfaceResize to true.
1535
1536 2012-11-30  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1537
1538         [WK2] TiledBackingStore: Frame view re-layouts with wrong Fixed Visible Content Rect.
1539         https://bugs.webkit.org/show_bug.cgi?id=103428
1540
1541         Reviewed by Kenneth Rohde Christiansen.
1542
1543         Set now appropriate fixed visible content rect before layout when viewport
1544         attributes change.
1545
1546         * UIProcess/PageViewportController.cpp:
1547         (WebKit::PageViewportController::syncVisibleContents):
1548         (WebKit::PageViewportController::didChangeViewportAttributes):
1549         * WebProcess/WebPage/WebPage.cpp:
1550         (WebKit::WebPage::sendViewportAttributesChanged):
1551
1552 2012-11-30  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1553
1554         [EFL] Gardening after r136031 and r136142
1555         https://bugs.webkit.org/show_bug.cgi?id=103734
1556
1557         Unreviewed, API test EWK2UnitTestBase.ewk_view_setting_encoding_custom
1558         is asserting after r136031. So, disabling the test until bug 103732 is
1559         fixed.
1560
1561         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1562         (TEST_F):
1563
1564 2012-11-30  Zeno Albisser  <zeno@webkit.org>
1565
1566         [Qt] Enable WebGL by default.
1567         https://bugs.webkit.org/show_bug.cgi?id=103731
1568
1569         Reviewed by Simon Hausmann.
1570
1571         * UIProcess/API/qt/qquickwebview.cpp:
1572         (QQuickWebViewPrivate::initialize):
1573
1574 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
1575
1576         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
1577         https://bugs.webkit.org/show_bug.cgi?id=101192
1578
1579         Reviewed by Hajime Morita.
1580
1581         Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
1582
1583         Tests: No new tests because there is no functional change.
1584
1585         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1586         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1587         (WebKit::InjectedBundle::setCSSRegionsEnabled):
1588         (WebKit):
1589         * WebProcess/InjectedBundle/InjectedBundle.h:
1590         (InjectedBundle):
1591         * WebProcess/WebPage/WebPage.cpp:
1592         (WebKit::WebPage::updatePreferences):
1593
1594 2012-11-29  Tim Horton  <timothy_horton@apple.com>
1595
1596         PDFPlugin: Only plain text can be copied out of PDFs
1597         https://bugs.webkit.org/show_bug.cgi?id=103591
1598         <rdar://problem/12555161>
1599
1600         Reviewed by Alexey Proskuryakov.
1601
1602         Don't write zero-length data to the pasteboard, just skip the item.
1603
1604         As mentioned in the comment, we don't expect this to come up, and would like to know if it does,
1605         so we assert that it doesn't happen in debug builds.
1606
1607         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1608         (WebKit::PDFPlugin::writeItemsToPasteboard):
1609
1610 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
1611
1612         [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb
1613         https://bugs.webkit.org/show_bug.cgi?id=103476
1614
1615         Reviewed by Alejandro G. Castro.
1616
1617         Create the RedirectedXCompositeWindow with an argument specifying that it
1618         should never have a GLContext backing it.
1619
1620         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1621         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
1622
1623 2012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
1624
1625         [HTMLTemplateElement] Add feature flag
1626         https://bugs.webkit.org/show_bug.cgi?id=103694
1627
1628         Reviewed by Adam Barth.
1629
1630         This flag will guard the implementation of the HTMLTemplateElement.
1631         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
1632
1633         * Configurations/FeatureDefines.xcconfig:
1634
1635 2012-11-29  Alexey Proskuryakov  <ap@apple.com>
1636
1637         [WK2] Forward cookie jar calls to NetworkProcess
1638         https://bugs.webkit.org/show_bug.cgi?id=103457
1639
1640         Reviewed by Darin Adler.
1641
1642         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1643         Added messages to maniputate CookieJar in network process.
1644
1645         * NetworkProcess/NetworkConnectionToWebProcess.h:
1646         * NetworkProcess/NetworkConnectionToWebProcess.cpp: Removed unnecessary WebCore:: prefixes,
1647         this file has a using direcive.
1648         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1649         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1650         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1651         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1652         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1653         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1654         (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
1655         (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
1656         (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
1657         Added implementations that use PlatformCookieJar in the network process.
1658
1659         * Scripts/webkit2/messages.py: (struct_or_class):
1660         * Shared/WebCoreArgumentCoders.h:
1661         * Shared/WebCoreArgumentCoders.cpp:
1662         (CoreIPC::::encode):
1663         (CoreIPC::::decode):
1664         Added support for Cookie.
1665         
1666         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1667         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1668         (WebKit::WebPlatformStrategies::cookiesForDOM):
1669         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1670         (WebKit::WebPlatformStrategies::cookiesEnabled):
1671         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1672         (WebKit::WebPlatformStrategies::getRawCookies):
1673         (WebKit::WebPlatformStrategies::deleteCookie):
1674         (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
1675         (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
1676         (WebKit::WebPlatformStrategies::deleteAllCookies):
1677         When using the network process, forward cookie calls to it.
1678
1679 2012-11-29  Kiran Muppala  <cmuppala@apple.com>
1680
1681         Instantiate snapshot plugins in a PluginProcess with muted audio
1682         https://bugs.webkit.org/show_bug.cgi?id=101536
1683
1684         Reviewed by Anders Carlsson.
1685
1686         Plugins created for generation of a snapshot should be instantiated in a separate process with
1687         muted audio so that any sound generated during the snapshot process is not audible to the user.
1688
1689         * Configurations/WebKit2.xcconfig: Add CoreAudio to the list of linked frameworks.
1690         * PluginProcess/PluginProcess.h: Add PluginProcess::Type enum with values for regular and
1691         snapshot process types. Provide DefaultHash and IsInteger template specializations for the enum
1692         so that PluginProcessConnectionManager can store it in a HashMap.
1693         * PluginProcess/mac/PluginProcessMac.mm:
1694         (WebKit::muteAudio):
1695         (WebKit::PluginProcess::platformInitialize): Mute audio if the process creation parameters indicate
1696         that the plugin process type is snapshot process.
1697         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1698         (WebKit::PluginProcessCreationParameters::encode):
1699         (WebKit::PluginProcessCreationParameters::decode):
1700         * Shared/Plugins/PluginProcessCreationParameters.h: Add processType process creation parameter.
1701         * UIProcess/Plugins/PluginProcessManager.cpp:
1702         (WebKit::PluginProcessManager::getPluginProcessConnection): Add process type parameter.
1703         (WebKit::PluginProcessManager::getSitesWithData): Forward message to regular plugin process only.
1704         (WebKit::PluginProcessManager::clearSiteData): Forward message to regular plugin process only.
1705         (WebKit::PluginProcessManager::pluginProcessWithPath): Add process type parameter.
1706         (WebKit::PluginProcessManager::getOrCreatePluginProcess): Ditto.
1707         * UIProcess/Plugins/PluginProcessManager.h:
1708         * UIProcess/Plugins/PluginProcessProxy.cpp:
1709         (WebKit::PluginProcessProxy::create): Add process type parameter.
1710         (WebKit::PluginProcessProxy::PluginProcessProxy): Ditto.
1711         (WebKit::PluginProcessProxy::didClose): Include process type with the plugin process crashed message.
1712         (WebKit::PluginProcessProxy::didFinishLaunching): Set process type process creation parameter.
1713         * UIProcess/Plugins/PluginProcessProxy.h:
1714         (WebKit::PluginProcessProxy::processType):
1715         * UIProcess/WebProcessProxy.cpp:
1716         (WebKit::WebProcessProxy::getPluginProcessConnection): Pass along process type parameter to
1717         PluginProcessManager.
1718         * UIProcess/WebProcessProxy.h:
1719         (WebProcessProxy):
1720         * UIProcess/WebProcessProxy.messages.in: Add process type parameter to GetPluginProcessConnection message.
1721         * WebProcess/Plugins/PluginProcessConnection.cpp:
1722         (WebKit::PluginProcessConnection::PluginProcessConnection): Add process type parameter.
1723         * WebProcess/Plugins/PluginProcessConnection.h:
1724         (WebKit::PluginProcessConnection::create): Ditto.
1725         (WebKit::PluginProcessConnection::processType): Ditto.
1726         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1727         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Add process type parameter.
1728         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection): Use process type in addition to
1729         plugin path to find the connection to remove.
1730         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): Add process type parameter.
1731         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1732         * WebProcess/Plugins/PluginProxy.cpp:
1733         (WebKit::PluginProxy::create): Ditto.
1734         (WebKit::PluginProxy::PluginProxy): Ditto.
1735         (WebKit::PluginProxy::initialize): Add process type parameter in call to
1736         PluginProcessConnectionManager::getPluginProcessConnection.
1737         * WebProcess/Plugins/PluginProxy.h:
1738         * WebProcess/WebPage/WebPage.cpp:
1739         (WebKit::WebPage::createPlugin): Determine process type based on display state of plugin element and
1740         pass it to PluginProxy::create.
1741         * WebProcess/WebProcess.cpp:
1742         (WebKit::WebProcess::pluginProcessCrashed): Pass along process type parameter to
1743         PluginProcessConnectionManager.
1744         * WebProcess/WebProcess.h:
1745         * WebProcess/WebProcess.messages.in: Add process type parameter to PluginProcessCrashed message.
1746
1747 2012-11-29  Anders Carlsson  <andersca@apple.com>
1748
1749         Initialize m_xpcConnection to null if the identifier doesn't have an XPC connection
1750         https://bugs.webkit.org/show_bug.cgi?id=103689
1751
1752         Reviewed by Darin Adler.
1753
1754         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1755         (CoreIPC::Connection::platformInitialize):
1756
1757 2012-11-29  Christophe Dumez  <christophe.dumez@intel.com>
1758
1759         [CoordinatedGraphics] Use OwnPtr for LayerMap's layers in LayerTreeRenderer
1760         https://bugs.webkit.org/show_bug.cgi?id=103650
1761
1762         Reviewed by Noam Rosenthal.
1763
1764         We currently store raw pointers to WebCore::GraphicsLayer in the LayerMap
1765         meaning that we need to delete them manually. This patch leverages smart
1766         pointers and stores layers as OwnPtr in the LayerMap so that the layers
1767         are owned by the HashMap and we don't have to handle memory manually.
1768
1769         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1770         (WebKit::LayerTreeRenderer::adjustPositionForFixedLayers):
1771         (WebKit::LayerTreeRenderer::setLayerChildren):
1772         (WebKit::LayerTreeRenderer::deleteLayer):
1773         (WebKit::LayerTreeRenderer::ensureLayer):
1774         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1775
1776 2012-11-29  Anders Carlsson  <andersca@apple.com>
1777
1778         Add a minimumLayoutWidth WKView property
1779         https://bugs.webkit.org/show_bug.cgi?id=103660
1780         <rdar://problem/11791729>
1781
1782         Reviewed by Beth Dakin.
1783
1784         When minimumLayoutWidth is set to a positive value, the WKView will update its intrinsic content size given the layout width.
1785
1786         * UIProcess/API/mac/PageClientImpl.h:
1787         * UIProcess/API/mac/PageClientImpl.mm:
1788         (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
1789         Call the WKView.
1790
1791         * UIProcess/API/mac/WKView.mm:
1792         (-[WKView intrinsicContentSize]):
1793         Override the intrinsicContentSize getter.
1794
1795         (-[WKView _setIntrinsicContentSize:]):
1796         Update the intrinsic content size and mark it as invalid.
1797
1798         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1799         By default, the WKView should have no intrinsic size.
1800
1801         (-[WKView minimumLayoutWidth]):
1802         (-[WKView setMinimumLayoutWidth:]):
1803         Call through to the WebPageProxy object.
1804
1805         * UIProcess/API/mac/WKViewPrivate.h:
1806         Add the SPI here.
1807
1808         * UIProcess/DrawingAreaProxy.h:
1809         (WebKit::DrawingAreaProxy::minimumLayoutWidthDidChange):
1810         (WebKit::DrawingAreaProxy::didUpdateGeometry):
1811         (WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
1812         Add empty stubs.
1813
1814         * UIProcess/DrawingAreaProxy.messages.in:
1815         Update the DidUpdateGeometry signature and add IntrinsicContentSizeDidChange.
1816
1817         * UIProcess/WebPageProxy.cpp:
1818         (WebKit::WebPageProxy::WebPageProxy):
1819         Initialize the minimum layout width.
1820
1821         (WebKit::WebPageProxy::setMinimumLayoutWidth):
1822         Update the minimum layout width and call the drawing area proxy.
1823
1824         * UIProcess/WebPageProxy.h:
1825         (WebKit::WebPageProxy::minimumLayoutWidth):
1826         Add getter.
1827
1828         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1829         (TiledCoreAnimationDrawingAreaProxy):
1830         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1831         (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutWidthDidChange):
1832         Update the geometry if needed.
1833
1834         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
1835         Update the intrinsic content size.
1836
1837         (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
1838         Call through to WebPageProxy::intrinsicContentSizeDidChange.
1839
1840         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1841         Pass along the minimum layout width.
1842
1843         * UIProcess/mac/WebPageProxyMac.mm:
1844         (WebKit::WebPageProxy::intrinsicContentSizeDidChange):
1845         Call through to the page client.
1846
1847         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1848         (WebKit::WebChromeClient::contentsSizeChanged):
1849         Call DrawingArea::mainFrameContentSizeChanged.
1850
1851         * WebProcess/WebPage/DrawingArea.h:
1852         (WebKit::DrawingArea::mainFrameContentSizeChanged):
1853         Add empty stub.
1854
1855         (WebKit::DrawingArea::updateGeometry):
1856         Update signature.
1857
1858         * WebProcess/WebPage/DrawingArea.messages.in:
1859         Add minimumLayoutWidth to UpdateGeometry.
1860
1861         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1862         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1863         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
1864         If the content size change is not coming from updateGeometry, send an InstrinsicContentSizeDidChange message.
1865
1866         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1867         If m_minimumLayoutWidth is positive, do an initial layout pass to figure out the height of the page and then do another
1868         layout with the viewport set to that height.
1869
1870 2012-11-29  Anders Carlsson  <andersca@apple.com>
1871
1872         CoreIPC::Connection should retain its xpc_connection_t
1873         https://bugs.webkit.org/show_bug.cgi?id=103671
1874         <rdar://problem/12717331>
1875
1876         Reviewed by Beth Dakin.
1877
1878         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1879         (CoreIPC::Connection::platformInitialize):
1880         Retain the xpc_connection_t object here to balance the xpc_object_release in platformInvalidate.
1881
1882 2012-11-29  Brent Fulgham  <bfulgham@webkit.org>
1883
1884         [Windows, WinCairo] Unreviewed build fix.  Build was failing
1885         because the export definition file included a debug-only
1886         symbol.  It's not needed and shouldn't be included for export.
1887
1888         * win/WebKit2.def: Don't require notSolidColor to be exported.
1889         * win/WebKit2CFLite.def: Ditto.
1890
1891 2012-11-29  Tim Horton  <timothy_horton@apple.com>
1892
1893         PDFPlugin: Only plain text can be copied out of PDFs
1894         https://bugs.webkit.org/show_bug.cgi?id=103591
1895         <rdar://problem/12555161>
1896
1897         Reviewed by Alexey Proskuryakov.
1898
1899         Enable rich data to be copied from PDFKit to the pasteboard.
1900
1901         * WebProcess/Plugins/PDF/PDFPlugin.h:
1902         (PDFPlugin): Add writeItemsToPasteboard.
1903         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1904         (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]): Move implementation to PDFPlugin.
1905         (WebKit::PDFPlugin::writeItemsToPasteboard): Don't round-trip through WebCore for pasteboard operations,
1906         use WebContext directly. This provides a simple way to hand over a buffer for complex pasteboard types
1907         (RTF, HTML, etc.). Use this interface for arbitrary non-plain-text pasteboard data that PDFKit hands us.
1908
1909 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
1910
1911         [GTK] [WebKit2] Embed the HTTP authentication dialog into the WebView
1912         https://bugs.webkit.org/show_bug.cgi?id=103277
1913
1914         Reviewed by Carlos Garcia Campos.
1915
1916         Embed the WebKit2 HTTP authentication dialog into the WebView. Add the dialog as a child
1917         of the WebKitWebViewBase container (like the web inspector).
1918
1919         We do not yet properly handle pages that require authentication for more than one resource.
1920         As that is an uncommon situation, it will be handled in another patch.
1921
1922         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp:
1923         (WebKit::drawSignal): We have to override the draw signal of the dialog to draw
1924         a GtkWindow background on the widget. This is required because the widget doesn't
1925         have a real GtkWindow to draw its background.
1926         (WebKit::loadChangedSignal): When a new load starts in the WebView destroy the dialog. This
1927         is so that the dialog doesn't stick around when the user chooses to navigate away from the
1928         page requiring authentication.
1929         (WebKit::WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog): Create an eventbox
1930         and frame to hold the dialog contents. Also append the 'background' widget class to the
1931         event box, so that it can draw a GtkWindow background in the draw signal handler.
1932         (WebKit::WebKit2GtkAuthenticationDialog::~WebKit2GtkAuthenticationDialog): Disconnect the
1933         load status changed signal handler.
1934         (WebKit::WebKit2GtkAuthenticationDialog::show): When it's time to show the dialog, add it to
1935         WebKitWebViewBase.
1936         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Add some new methods for handling the
1937         embedded dialog.
1938         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1939         (didReceiveAuthenticationChallengeInFrame): Collapse the creation of the dialog into one line.
1940         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1941         (_WebKitWebViewBasePrivate): Add the dialog as a property of the private structure.
1942         (webkitWebViewChildIsInternalWidget): Added this helper used for determining when a child widget
1943         is "internal" (ie the web inspector or the authentication dialog).
1944         (webkitWebViewBaseContainerAdd): Only add non-internal widgets to the children map.
1945         (webkitWebViewBaseAddAuthenticationDialog): Added.
1946         (webkitWebViewBaseAddWebInspector): Added this more-foolproof method of adding a web inspector
1947         to the WebView. This also aligns it with the way the authentication dialog is added.
1948         (webkitWebViewBaseContainerRemove): When removing the authentication dialog, zero out the
1949         field in the private structure.
1950         (webkitWebViewBaseContainerForall): Add support for the authentication dialog here too.
1951         (webkitWebViewBaseChildMoveResize): Don't pass on move_resize events to internal children.
1952         (webkit_web_view_base_init): Zero out the authentication dialog member on init.
1953         (webkitWebViewBaseDraw): If the authentication dialog is active, draw a shadow over web content.
1954         (resizeWebKitWebViewBaseFromAllocation): Make the authentication dialog centered in the view.
1955         (webkitWebViewBaseKeyPressEvent): Pass on key events to the authentication dialog if active.
1956         (webkitWebViewBaseButtonPressEvent): If the authentication dialog is active don't pass button events
1957         to web content.
1958         (webkitWebViewBaseButtonReleaseEvent):  Ditto.
1959         (webkitWebViewBaseScrollEvent): Ditto.
1960         (webkitWebViewBaseMotionNotifyEvent): Ditto.
1961         (webkitWebViewBaseFocus): Pass on focus events to the authentication dialog so that tabbing between
1962         elements in the dialog works correctly.
1963         (webkit_web_view_base_class_init): Hook up the focus event.
1964         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add new methods for adding the authentication dialog
1965         and the web inspector.
1966         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1967         (WebKit::WebInspectorProxy::createInspectorWindow): Use the new method for adding the web inspector.
1968
1969 2012-11-29  Andrei Bucur  <abucur@adobe.com>
1970
1971         Fix the build after r136095
1972         https://bugs.webkit.org/show_bug.cgi?id=103629
1973
1974         Unreviewed.
1975
1976         Add a static_cast to fix the build.
1977
1978         * Shared/mac/ObjCObjectGraphCoders.mm:
1979         (WebKit::ObjCObjectGraphEncoder::baseEncode):
1980
1981 2012-11-29  Christophe Dumez  <christophe.dumez@intel.com>
1982
1983         [CoordinatedGraphics] Have LayerTreeRenderer::ensureLayer() return the layer
1984         https://bugs.webkit.org/show_bug.cgi?id=103645
1985
1986         Reviewed by Noam Rosenthal.
1987
1988         The current LayerTreeRenderer code keep calling ensureLayer() and then
1989         LayerMap::find() to retrieve the layer. Since ensureLayer() already has
1990         a pointer to the layer, we can simply have the function return it.
1991         This is slightly more efficient and it makes the code a bit simpler.
1992
1993         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
1994         (WebKit::LayerTreeRenderer::setLayerChildren):
1995         (WebKit::LayerTreeRenderer::setLayerFilters):
1996         (WebKit::LayerTreeRenderer::setLayerState):
1997         (WebKit::LayerTreeRenderer::ensureLayer):
1998         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1999
2000 2012-11-29  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2001
2002         [WK2] TiledBackingStore: User events are sent to web page before it is shown
2003         https://bugs.webkit.org/show_bug.cgi?id=101753
2004
2005         Reviewed by Jocelyn Turcotte.
2006
2007         User events are suppressed on WEB process side while drawing area is frozen.
2008
2009         * WebProcess/WebPage/WebPage.cpp:
2010         (WebKit::WebPage::mouseEvent):
2011         (WebKit::WebPage::wheelEvent):
2012         (WebKit::WebPage::keyEvent):
2013         (WebKit::WebPage::gestureEvent):
2014         (WebKit::WebPage::touchEvent):
2015         (WebKit::WebPage::sendIfEventCannotBeHandled):
2016         (WebKit):
2017         (WebKit::WebPage::didCompletePageTransition):
2018         * WebProcess/WebPage/WebPage.h:
2019         (WebPage):
2020
2021 2012-11-29  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2022
2023         Possible to resize out of bounds 
2024         https://bugs.webkit.org/show_bug.cgi?id=103521
2025
2026         Reviewed by Jocelyn Turcotte.
2027
2028         Enforce the viewportBounds after resize, and ensure a user fitted page remains
2029         fit on viewport resize, but not on content growth.
2030
2031         * UIProcess/API/qt/tests/qmltests/WebView/tst_resize.qml: Added.
2032         * UIProcess/PageViewportController.cpp:
2033         (WebKit::PageViewportController::didChangeContentsSize):
2034         (WebKit::PageViewportController::didChangeViewportAttributes):
2035         (WebKit::PageViewportController::updateMinimumScaleToFit):
2036         * UIProcess/PageViewportController.h:
2037         (PageViewportController):
2038
2039 2012-11-29  Michael Brüning  <michael.bruning@digia.com>
2040
2041         [Qt][WK2] Commit the preedit string in the input method when focus is about to be moved.
2042         https://bugs.webkit.org/show_bug.cgi?id=97774
2043
2044         Reviewed by Kenneth Rohde Christiansen.
2045
2046         Implements the handler for willSetInputMethodState in WebKit2 in Qt.
2047         This is needed to tell the input method instance in Qt to commit its
2048         preedit content when the focus has moved to another node to prevent a
2049         bug where the old preedit string was kept as the preedit string and
2050         the editor moved focus back to the old node when continuing to enter
2051         text via the input method.
2052
2053         This behavior is analog to the behavior of the QtQuick text input
2054         elements.
2055
2056         * UIProcess/API/qt/raw/qrawwebview.cpp:
2057         (QRawWebViewPrivate::handleWillSetInputMethodState):
2058         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
2059         (QRawWebViewPrivate):
2060         * UIProcess/PageClient.h:
2061         (PageClient):
2062         * UIProcess/WebPageProxy.h:
2063         (WebPageProxy):
2064         * UIProcess/WebPageProxy.messages.in:
2065         * UIProcess/qt/QtPageClient.cpp:
2066         (WebKit::QtPageClient::handleWillSetInputMethodState):
2067         (WebKit):
2068         * UIProcess/qt/QtPageClient.h:
2069         (QtPageClient):
2070         * UIProcess/qt/QtWebPageEventHandler.cpp:
2071         (WebKit::QtWebPageEventHandler::handleWillSetInputMethodState):
2072         (WebKit):
2073         * UIProcess/qt/QtWebPageEventHandler.h:
2074         (QtWebPageEventHandler):
2075         * UIProcess/qt/WebPageProxyQt.cpp:
2076         (WebKit::WebPageProxy::willSetInputMethodState):
2077         (WebKit):
2078         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2079         (WebKit::WebEditorClient::willSetInputMethodState):
2080
2081 2012-11-28  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2082
2083         [Qt] The WebView should be flickable only using touch events
2084         https://bugs.webkit.org/show_bug.cgi?id=100964
2085
2086         Reviewed by Kenneth Rohde Christiansen.
2087
2088         Let a user interacting with the WebView using a mouse the same way that a
2089         desktop browser would.
2090         This allows normal behaviors like text selecting, hover events, mouse cursors
2091         as well as avoid touch highlighting and touch adjustment.
2092
2093         To do so we let all mouse events to be handled by the page directly instead
2094         of sending them to QtWebPageEventHandler. Since unhandled mouse events aren't
2095         pushed back to the PageClient like touch events does, this have the intended
2096         behavior of not letting mouse events affect QQuickFlickable.
2097
2098         * UIProcess/API/qt/qquickwebview.cpp:
2099         * UIProcess/API/qt/qquickwebview_p_p.h:
2100         (QQuickWebViewFlickablePrivate):
2101
2102 2012-11-29  Andras Becsi  <andras.becsi@digia.com>
2103
2104         [Qt] Fix installation of QtWebProcess binary
2105         https://bugs.webkit.org/show_bug.cgi?id=101735
2106
2107         Reviewed by Simon Hausmann.
2108
2109         If available use QLibraryInfo::LibraryExecutablesPath to find
2110         the web process and the plugin process and deploy both helper
2111         processes to QT_INSTALL_LIBEXECS.
2112
2113         The effective fallback used to find the helper processes becomes:
2114             1. Application directory
2115             2. Qt library executables directory (QLibraryInfo::LibraryExecutablesPath)
2116             3. Qt binaries directory (QLibraryInfo::BinariesPath)
2117             4. No absolute path used
2118
2119         * PluginProcess.pro:
2120         * Shared/qt/ProcessExecutablePathQt.cpp:
2121         (WebKit::executablePath):
2122         * WebProcess.pro:
2123
2124 2012-11-28  Ryuan Choi  <ryuan.choi@gmail.com>
2125
2126         [EFL] Generate big_button_theme.edj
2127         https://bugs.webkit.org/show_bug.cgi?id=103511
2128
2129         Reviewed by Gyuyoung Kim.
2130
2131         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
2132         (EWK2UnitTest::EWK2UnitTestEnvironment::pathForTheme):
2133         (EWK2UnitTest):
2134         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
2135         (EWK2UnitTestEnvironment):
2136         * UIProcess/API/efl/tests/resources/big_button_theme.edj: Removed.
2137         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Modified to use generated big_button_theme.edj
2138         (TEST_F):
2139
2140 2012-11-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2141
2142         Unreviewed, rolling out r135973.
2143         http://trac.webkit.org/changeset/135973
2144         https://bugs.webkit.org/show_bug.cgi?id=103604
2145
2146         It made API test crash on EFL bots (Requested by gyuyoung on
2147         #webkit).
2148
2149         * UIProcess/API/efl/ewk_view.cpp:
2150         (createEwkView):
2151
2152 2012-11-28  Michael Pruett  <michael@68k.org>
2153
2154         IndexedDB: Remove duplicate toWireString() and createFromWire() methods in JSC SerializedScriptValue
2155         https://bugs.webkit.org/show_bug.cgi?id=103554
2156
2157         Reviewed by Kentaro Hara.
2158
2159         In r135022, duplicate createFromWire() and toWireString() methods
2160         were added to the JSC version of SerializedScriptValue. In
2161         order to allow the JSC SerializedScriptValue to compile when
2162         ENABLE(INDEXED_DATABASE) is turned on, these new methods have
2163         been removed and the old methods have been moved outside the
2164         ENABLE(INDEXED_DATABASE) guard.
2165
2166         * win/WebKit2.def:
2167         * win/WebKit2CFLite.def:
2168
2169 2012-11-28  Sam Weinig  <sam@webkit.org>
2170
2171         Fix 32bit build.
2172
2173         * Shared/mac/ObjCObjectGraphCoders.mm:
2174         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
2175         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
2176
2177 2012-11-28  Sam Weinig  <sam@webkit.org>
2178
2179         Add an objc object graph wrapper and coder for WKConnection message bodies
2180         https://bugs.webkit.org/show_bug.cgi?id=103589
2181
2182         Reviewed by Anders Carlsson.
2183
2184         Adds a new type of UserMessageCoder for objc object graphs that allows encoding/decoding
2185         WKBrowsingContextController across the wire.
2186
2187         * Shared/APIClient.h:
2188         (APIClient):
2189         (WebKit::APIClient::client):
2190         Add accessor for the ClientInterface.
2191
2192         * Shared/APIObject.h:
2193         Add new TypeObjCObjectGraph type.
2194
2195         * Shared/mac/ObjCObjectGraph.h: Added.
2196         (ObjCObjectGraph):
2197         (WebKit::ObjCObjectGraph::create):
2198         (WebKit::ObjCObjectGraph::root):
2199         (WebKit::ObjCObjectGraph::ObjCObjectGraph):
2200         (WebKit::ObjCObjectGraph::type):
2201         * Shared/mac/ObjCObjectGraph.mm: Added.
2202         Wraps 
2203
2204         * Shared/mac/ObjCObjectGraphCoders.h: Added.
2205         (WebContextObjCObjectGraphEncoder):
2206         (WebContextObjCObjectGraphDecoder):
2207         (InjectedBundleObjCObjectGraphEncoder):
2208         (InjectedBundleObjCObjectGraphDecoder):
2209         * Shared/mac/ObjCObjectGraphCoders.mm: Added.
2210         (WebKit::typeFromObject):
2211         (ObjCObjectGraphEncoder):
2212         (WebKit::ObjCObjectGraphEncoder::baseEncode):
2213         (WebKit::ObjCObjectGraphEncoder::ObjCObjectGraphEncoder):
2214         (ObjCObjectGraphDecoder):
2215         (WebKit::ObjCObjectGraphDecoder::baseDecode):
2216         (WebKit::ObjCObjectGraphDecoder::ObjCObjectGraphDecoder):
2217         (WebContextObjCObjectGraphEncoderImpl):
2218         (WebKit::WebContextObjCObjectGraphEncoderImpl::WebContextObjCObjectGraphEncoderImpl):
2219         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
2220         (WebContextObjCObjectGraphDecoderImpl):
2221         (WebKit::WebContextObjCObjectGraphDecoderImpl::WebContextObjCObjectGraphDecoderImpl):
2222         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
2223         (InjectedBundleObjCObjectGraphEncoderImpl):
2224         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::InjectedBundleObjCObjectGraphEncoderImpl):
2225         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
2226         (InjectedBundleObjCObjectGraphDecoderImpl):
2227         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::InjectedBundleObjCObjectGraphDecoderImpl):
2228         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
2229         (WebKit::WebContextObjCObjectGraphEncoder::WebContextObjCObjectGraphEncoder):
2230         (WebKit::WebContextObjCObjectGraphEncoder::encode):
2231         (WebKit::WebContextObjCObjectGraphDecoder::WebContextObjCObjectGraphDecoder):
2232         (WebKit::WebContextObjCObjectGraphDecoder::decode):
2233         (WebKit::InjectedBundleObjCObjectGraphEncoder::InjectedBundleObjCObjectGraphEncoder):
2234         (WebKit::InjectedBundleObjCObjectGraphEncoder::encode):
2235         (WebKit::InjectedBundleObjCObjectGraphDecoder::InjectedBundleObjCObjectGraphDecoder):
2236         (WebKit::InjectedBundleObjCObjectGraphDecoder::decode):
2237         Added.
2238
2239         * UIProcess/API/mac/WKBrowsingContextController.mm:
2240         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
2241         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
2242         Expose the accessor to get the WKPageRef from a WKBrowsingContextController and add a 
2243         new method to get a WKBrowsingContextController from a WKPageRef.
2244
2245         * UIProcess/API/mac/WKConnection.mm:
2246         (-[WKConnection sendMessageWithName:body:]):
2247         (didReceiveMessage):
2248         Switch WKConnection to use ObjCObjectGraph to encode the messageBody.
2249
2250         * UIProcess/WebContextUserMessageCoders.h:
2251         (WebKit::WebContextUserMessageEncoder::encode):
2252         (WebKit::WebContextUserMessageDecoder::decode):
2253         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
2254         (WebKit::InjectedBundleUserMessageEncoder::encode):
2255         (WebKit::InjectedBundleUserMessageDecoder::decode):
2256         Proxy to ObjCObjectGraph coders when user message encoding/decoding ObjCObjectGraph APIObjects.
2257
2258         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2259         (-[WKWebProcessPlugInController _browserContextControllerForBundlePageRef:]):
2260         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
2261         Add method to get WKWebProcessPlugInController from the WKBundlePageRef.
2262
2263         * WebKit2.xcodeproj/project.pbxproj:
2264         Add new files.
2265
2266 2012-11-28  Sergio Villar Senin  <svillar@igalia.com>
2267
2268         [WK2][Qt] Add drag&drop support to Flickable webView
2269         https://bugs.webkit.org/show_bug.cgi?id=100778
2270
2271         Reviewed by Jocelyn Turcotte.
2272
2273         Enable the ItemAcceptsDrops flag in the flickable WebView. This
2274         will allow the WebView to receive drag&drop events.
2275
2276         * UIProcess/API/qt/qquickwebview.cpp:
2277         (QQuickWebViewPrivate::initialize):
2278
2279 2012-11-28  Shinya Kawanaka  <shinyak@chromium.org>
2280
2281         [Shadow] Move Distribution stuffs from ShadowRoot
2282         https://bugs.webkit.org/show_bug.cgi?id=103481
2283
2284         Reviewed by Hajime Morita.
2285
2286         * win/WebKit2.def:
2287         * win/WebKit2CFLite.def:
2288
2289 2012-11-28  Tim Horton  <timothy_horton@apple.com>
2290
2291         [mac] Dictionary lookup bubble loses intrarange formatting
2292         https://bugs.webkit.org/show_bug.cgi?id=103496
2293         <rdar://problem/12762172>
2294
2295         Reviewed by Alexey Proskuryakov.
2296
2297         Pass an NSAttributedString (made via WebHTMLConverter on the WebProcess side) through
2298         when showing dictionary popups, so that we preserve more formatting in the yellow dictionary
2299         highlight. Also, remove the fontInfo member from DictionaryPopupInfo, since we don't need it anymore.
2300
2301         * Shared/DictionaryPopupInfo.cpp:
2302         (WebKit::DictionaryPopupInfo::encode): Don't encode the now-removed fontInfo member.
2303         (WebKit::DictionaryPopupInfo::decode): Don't decode the now-removed fontInfo member.
2304         * Shared/DictionaryPopupInfo.h: Remove the fontInfo member.
2305         * UIProcess/API/mac/PageClientImpl.h:
2306         (PageClientImpl): didPerformDictionaryLookup should take an AttributedString instead of a plain String, and
2307         no longer needs to take the page scale factor.
2308         * UIProcess/API/mac/PageClientImpl.mm:
2309         (WebKit::PageClientImpl::didPerformDictionaryLookup): Use the AttributedString we're handed from the WebProcess
2310         instead of constructing one ourselves; this way, we have all the attributes instead of just a single font.
2311         * UIProcess/PageClient.h:
2312         (PageClient): didPerformDictionaryLookup should take an AttributedString instead of a plain String.
2313         * UIProcess/WebPageProxy.h:
2314         (WebPageProxy): didPerformDictionaryLookup should take an AttributedString instead of a plain String.
2315         * UIProcess/WebPageProxy.messages.in: DidPerformDictionaryLookup should take an AttributedString instead of a plain String.
2316         * UIProcess/mac/WebPageProxyMac.mm:
2317         (WebKit::WebPageProxy::didPerformDictionaryLookup): didPerformDictionaryLookup should take an AttributedString instead of a plain String.
2318         * WebProcess/WebPage/mac/WebPageMac.mm:
2319         (WebKit::WebPage::performDictionaryLookupForRange): performDictionaryLookupForRange should hand WebPageProxy an AttributedString
2320         constructed via WebHTMLConverter instead of a plain text string paired with a single font descriptor.
2321         Also, scale the size of every font attribute by the current pageScaleFactor.
2322
2323 2012-11-28  peavo@outlook.com  <peavo@outlook.com>
2324
2325         [WinCairo] Crash when requesting favicon.
2326         https://bugs.webkit.org/show_bug.cgi?id=102689
2327
2328         Reviewed by Brent Fulgham.
2329
2330         * win/WebKit2CFLite.def: Link fixes.
2331         * win/WebKit2.def: Link fixes.
2332
2333 2012-11-28  Christophe Dumez  <christophe.dumez@intel.com>
2334
2335         Regression(r135962): m_pendingSyncBackingStores needs to be cleared in LayerTreeRenderer::purgeGLResources()
2336         https://bugs.webkit.org/show_bug.cgi?id=103527
2337
2338         Reviewed by Jocelyn Turcotte.
2339
2340         Make sure m_pendingSyncBackingStores is cleared in
2341         LayerTreeRenderer::purgeGLResources() to avoid trying to assign
2342         backing store to layers after everything has been invalidated.
2343
2344         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2345         (WebKit::LayerTreeRenderer::purgeGLResources):
2346
2347 2012-11-28  Christophe Dumez  <christophe.dumez@intel.com>
2348
2349         Regression(r135962): ASSERTION FAILED: !m_pedningSyncBackingStores.contains(layer)
2350         https://bugs.webkit.org/show_bug.cgi?id=103498
2351
2352         Reviewed by Kenneth Rohde Christiansen.
2353
2354         We hit the !m_pedningSyncBackingStores.contains(layer) assertion
2355         in LayerTreeRenderer when 2 asynchronous backing store operations
2356         are pending. The current code checks if the layer already has a
2357         backing store in its guard but this is insufficient as it is not
2358         checking the m_pendingSyncBackingStores hash for pending backing
2359         store changes.
2360
2361         In this patch, we improve the guards in createBackingStoreIfNeeded()
2362         and removeBackingStoreIfNeeded() to check not only if the layer has
2363         already a backing store but also check m_pendingSyncBackingStores
2364         for pending changes. This is safer and it allows for optimizations
2365         in the cases where we have both a removal and a creation pending.
2366         In those cases, we can simply cancel the pending operation instead
2367         of queueing a new one.
2368
2369         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2370         (WebKit::LayerTreeRenderer::getBackingStore):
2371         (WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
2372         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
2373         (WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations):
2374         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2375
2376 2012-11-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2377
2378         [EFL][WK2] MiniBrowser rendering should not get blurry when scrolled down with different scale values
2379         https://bugs.webkit.org/show_bug.cgi?id=103079
2380
2381         Reviewed by Simon Hausmann.
2382
2383         The problem was caused because we moved the page inside our viewport
2384         in non-discrete units.
2385
2386         Now instead of changing the content visible in our viewport by
2387         applying scale, and then transforming the CSS offset, we now first
2388         discretely position the page in UI coordinates.
2389
2390         This patch also removes some dead code.
2391
2392         * UIProcess/API/efl/EwkViewImpl.cpp:
2393         (EwkViewImpl::transformFromScene):
2394         (EwkViewImpl::displayTimerFired):
2395
2396            Transform according to the page position.
2397
2398         * UIProcess/API/efl/EwkViewImpl.h:
2399         (EwkViewImpl::setPagePosition): Now stores a float.
2400         (EwkViewImpl::discretePagePosition): Returns the discrete page position.
2401         (EwkViewImpl):
2402         * UIProcess/efl/PageClientLegacyImpl.cpp:
2403         (WebKit::PageClientLegacyImpl::updateViewportSize):
2404         (WebKit::PageClientLegacyImpl::pageDidRequestScroll):
2405         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2406         (WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
2407         (WebKit::PageViewportControllerClientEfl::setViewportPosition): Convert to page position.
2408         (WebKit::PageViewportControllerClientEfl::setContentsScale):
2409         (WebKit::PageViewportControllerClientEfl::didResumeContent):
2410         * UIProcess/efl/PageViewportControllerClientEfl.h:
2411         (WebKit::PageViewportControllerClientEfl::scaleFactor): Use the value
2412         from the view directly.
2413         (WebKit::PageViewportControllerClientEfl::contentPosition):
2414         (PageViewportControllerClientEfl):
2415
2416 2012-11-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2417
2418         [EFL][WK2][AC] No need to export GL properties from EwkViewImpl class
2419         https://bugs.webkit.org/show_bug.cgi?id=103505
2420
2421         Reviewed by Kenneth Rohde Christiansen.
2422
2423         No need to export GL data members from EwkViewImpl class, 
2424         those are internal implementation objects not used by anyone outside the class.
2425
2426         * UIProcess/API/efl/EwkViewImpl.cpp:
2427         (EwkViewImpl::displayTimerFired):
2428         (EwkViewImpl::createGLSurface):
2429         * UIProcess/API/efl/EwkViewImpl.h:
2430         (EwkViewImpl):
2431         (EwkViewImpl::evasGLContext):
2432         (EwkViewImpl::evasGLSurface):
2433
2434 2012-11-28  Joone Hur  <joone.hur@intel.com>
2435
2436         [EFL][WK2][AC] Clear the viewport with white color
2437         https://bugs.webkit.org/show_bug.cgi?id=103495
2438
2439         When initializing a GL surface, we should clear the buffer with white color.
2440
2441         Reviewed by Kenneth Rohde Christiansen.
2442
2443         * UIProcess/API/efl/EwkViewImpl.cpp:
2444         (EwkViewImpl::createGLSurface):
2445
2446 2012-11-27  Jinwoo Song  <jinwoo7.song@samsung.com>
2447
2448         [EFL][WK2] Duplicated WebPageGroup initialization
2449         https://bugs.webkit.org/show_bug.cgi?id=103229
2450
2451         Reviewed by Gyuyoung Kim.
2452
2453         WebPageGroup does not need to be created in creating EwkView when the pageGroupRef is 0
2454         because the default WebPageGroup(m_defaultPageGroup) is created in WebContext constructor.
2455
2456         As a side effect on the duplicated initialization, pageGroupID increases even when the EwkView
2457         is created with default context.
2458
2459         * UIProcess/API/efl/ewk_view.cpp:
2460         (createEwkView):
2461
2462 2012-11-27  Huang Dongsung  <luxtella@company100.net>
2463
2464         REGRESSION(r135620): ASSERT(m_state.drawsContent && m_state.contentsVisible && !m_size.isEmpty()) hits in TextureMapperLayer::paintSelf().
2465         https://bugs.webkit.org/show_bug.cgi?id=103171
2466
2467         Reviewed by Noam Rosenthal.
2468
2469         Ensure that TextureMapperLayer has a backing store when the layer has
2470         drawsContent and contentsVisible properties and the size of the layer is not
2471         empty.
2472
2473         LayerTreeRenderer::setLayerState() must not set a backing store to
2474         TextureMapperLayer because setLayerState() just changes states of
2475         GraphicsLayerTextureMapper instead of TextureMapperLayer.
2476
2477         Now LayerTreeRenderer::flushLayerChanges() sets a backing store as well as layer
2478         states to TextureMapperLayer.
2479
2480         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2481         (WebKit::LayerTreeRenderer::getBackingStore):
2482         (WebKit::LayerTreeRenderer::prepareContentBackingStore):
2483         (WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
2484         (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
2485         (WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations):
2486         (WebKit::LayerTreeRenderer::flushLayerChanges):
2487         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2488         (WebCore):
2489
2490 2012-11-27  Tim Horton  <timothy_horton@apple.com>
2491
2492         PDFPlugin: Should not be able to edit read-only text annotations
2493         https://bugs.webkit.org/show_bug.cgi?id=103387
2494         <rdar://problem/12752313>
2495
2496         Reviewed by Alexey Proskuryakov.
2497
2498         Don't allow read-only annotations to become active.
2499
2500         * WebKit2.xcodeproj/project.pbxproj: Add PDFAnnotationTextWidgetDetails.h.
2501         * WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Added.
2502         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2503         (WebKit::PDFPlugin::setActiveAnnotation): Bail if the annotation is read-only.
2504         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Move PDFAnnotationTextWidget details category to PDFAnnotationTextWidgetDetails.h
2505
2506 2012-11-27  Huang Dongsung  <luxtella@company100.net>
2507
2508         Coordinated Graphics: Refactor code managing a backing store in LayerTreeRenderer.
2509         https://bugs.webkit.org/show_bug.cgi?id=103298
2510
2511         Reviewed by Noam Rosenthal.
2512
2513         This patch makes LayerTreeRenderer assign a content backing store to
2514         TextureMapperLayer only in setLayerState(). Currently, createTile() can assign
2515         the backing store to TextureMapperLayer and it can break the invariant condition
2516         of TextureMapperLayer: TextureMapperLayer can have its own backing store only if
2517         the layer has following conditions: drawsContent, contentsVisible and non empty
2518         size.
2519
2520         In addition, the modified code about creating and removing a backing store
2521         matches the same purpose code of CoordinatedGraphicsLayer and
2522         GraphicsLayerTextureMapepr.
2523
2524         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2525         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
2526         (CoordinatedBackingStore):
2527         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2528         (WebKit::layerShouldHaveBackingStore):
2529         (WebKit):
2530         (WebKit::LayerTreeRenderer::setLayerState):
2531         (WebKit::LayerTreeRenderer::getBackingStore):
2532         (WebKit::LayerTreeRenderer::prepareContentBackingStore):
2533         (WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
2534         (WebKit::LayerTreeRenderer::removeBackingStore):
2535         (WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize):
2536         (WebKit::LayerTreeRenderer::createTile):
2537         (WebKit::LayerTreeRenderer::removeTile):
2538         (WebKit::LayerTreeRenderer::updateTile):
2539         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
2540         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2541         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2542             This method does not create a backing store anymore because flushCompositingStateForThisLayerOnly()
2543             can create a backing store if needed. Moreover, we must sync a layer state prior to creating a backing store
2544             after this patch, because LayerTreeRenderer::createTile() does not create a backing store anymore.
2545
2546 2012-11-27  James Simonsen  <simonjam@chromium.org>
2547
2548         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
2549         https://bugs.webkit.org/show_bug.cgi?id=102151
2550
2551         Reviewed by Adam Barth.
2552
2553         * WebProcess/Plugins/PluginView.cpp:
2554         (WebKit::PluginView::performFrameLoadURLRequest):
2555         * WebProcess/WebPage/WebPage.cpp:
2556         (WebKit::WebPage::loadURLRequest):
2557         (WebKit::WebPage::loadData):
2558
2559 2012-10-22  Jer Noble  <jer.noble@apple.com>
2560
2561         [WK2] [Mac] WebKit Full Screen API should use NSWindow full screen API.
2562         https://bugs.webkit.org/show_bug.cgi?id=100025
2563
2564         Reviewed by Dan Bernstein.
2565
2566         Use the NSWindow full screen API when taking the WebView full screen. To facility the case where the browser window is already
2567         in full screen mode, no longer hide the browser window when entering full screen. Instead, provide a placeholder view with 
2568         instructions to click the placeholder to exit full screen.
2569
2570         * UIProcess/mac/WKFullScreenWindowController.h:
2571         * UIProcess/mac/WKFullScreenWindowController.mm:
2572         (-[WKFullScreenWindowController init]): Set self as the window's delegate; enable window's full screen action.
2573         (-[WKFullScreenWindowController dealloc]): Clear our window's delegate.
2574         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Remove reference to _updateWindowAndDockForFullScreen.
2575         (-[WKFullScreenWindowController enterFullScreen:]):  Ditto. Create a WKFullScreenPlaceholderView instead of generic NSImageView.
2576         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Ditto. Call NSWindow enterFullScreen: API.
2577         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Show the warning view.
2578         (-[WKFullScreenWindowController exitFullScreen]): Hide the warning view.
2579         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]): Add special case where we are exiting
2580             from full screen mode when the full screen window is not on screen.
2581         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Remove reference to _updateMenuAndDockForFullScreen.
2582         (-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Added. Return the background window and the full screen window.
2583         (-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
2584         (-[WKFullScreenWindowController window:startCustomAnimationToEnterFullScreenWithDuration:]): Added. Call through to _startEnterFullScreenAnimationWithDuration:
2585         (-[WKFullScreenWindowController window:startCustomAnimationToExitFullScreenWithDuration:]): Added. Call through to _startExitFullScreenAnimationWithDuration:
2586
2587 2012-11-27  Yael Aharon  <yael.aharon@intel.com>
2588
2589         [EFL][WK2] 3D pixel tests are failing
2590         https://bugs.webkit.org/show_bug.cgi?id=102833
2591
2592         Reviewed by Kenneth Rohde Christiansen.
2593
2594         Added an API for generating a snapshot, to be used from WebKitTestRunner.
2595
2596         * PlatformEfl.cmake:
2597         * UIProcess/API/C/efl/WKView.cpp:
2598         (WKViewGetSnapshot):
2599         * UIProcess/API/C/efl/WKView.h:
2600         * UIProcess/API/efl/EwkViewImpl.cpp:
2601         (EwkViewImpl::onFaviconChanged):
2602         (EwkViewImpl::takeSnapshot):
2603         * UIProcess/API/efl/EwkViewImpl.h:
2604         (EwkViewImpl):
2605         * UIProcess/API/efl/SnapshotImageGL.cpp: Added.
2606         (getImageFromCurrentTexture):
2607         * UIProcess/API/efl/SnapshotImageGL.h: Added.
2608
2609 2012-11-27  Tim Horton  <timothy_horton@apple.com>
2610
2611         PDFPlugin: Page scale factor should affect subframe PDFs
2612         https://bugs.webkit.org/show_bug.cgi?id=103291
2613         <rdar://problem/12555249>
2614
2615         Reviewed by Darin Adler.
2616
2617         For subframe PDFs, hand PDFKit the pageScaleFactor for the parent page
2618         so it can scale its drawing appropriately.
2619
2620         * WebProcess/Plugins/PDF/PDFPlugin.h: Add updatePageAndDeviceScaleFactors.
2621         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2622         (WebKit::PDFPlugin::pdfDocumentDidLoad): Call updatePageAndDeviceScaleFactors
2623         instead of manually updating PDFLayerController's device scale factor.
2624         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors): Hand PDFLayerController
2625         the "underlying" (non-zoom) content scale, which is the product of the
2626         device scale and the page scale.
2627         (WebKit::PDFPlugin::contentsScaleFactorChanged): Use updatePageAndDeviceScaleFactors.
2628         (WebKit::PDFPlugin::geometryDidChange): Use updatePageAndDeviceScaleFactors to keep
2629         PDFLayerController's notion of the page scale up to date when the plugin's
2630         geometry changes.
2631
2632 2012-11-27  Tim Horton  <timothy_horton@apple.com>
2633
2634         PDFPlugin: Scroll bars do not grow on hover
2635         https://bugs.webkit.org/show_bug.cgi?id=103382
2636         <rdar://problem/12555262>
2637
2638         Reviewed by Beth Dakin.
2639
2640         PDFPlugin needs to forward relevant mouse events to the scrollbars.
2641         In addition, it needs to implement currentMousePosition so ScrollableArea and friends
2642         can find the mouse position at arbitrary times.
2643
2644         I also took this opportunity to factor some coordinate space conversion functions out.
2645
2646         * WebProcess/Plugins/PDF/PDFPlugin.h:
2647         (WebKit::PDFPlugin::currentMousePosition): Added. Return the last mouse position in our coordinate space.
2648         (WebKit::PDFPlugin::convertFromRootViewToPlugin): Added.
2649         (WebKit::PDFPlugin::convertFromPluginToPDFView): Added.
2650         (PDFPlugin):
2651         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2652         (WebKit::PDFPlugin::convertFromRootViewToPlugin): Convert a point from content space to plugin space, via the transform we get in geometryDidChange.
2653         (WebKit::PDFPlugin::convertFromPluginToPDFView): Convert a point from plugin space to PDFLayerController's flipped coordinate space.
2654         (WebKit::PDFPlugin::geometryDidChange): Use convertFromPluginToPDFView.
2655         (WebKit::PDFPlugin::nsEventForWebMouseEvent): Cache the mouse position in plugin space instead of PDFLayerController space. Use our new conversion functions.
2656         (WebKit::PDFPlugin::handleMouseEvent): Forward relevant mouse events to scrollbars:
2657         Determine which scrollbar the mouse is over now, and which it was previously over, and use that to:
2658         If the mouse is moved over a scrollbar, send mouseEntered to the scrollbar.
2659         If the mouse is moved out of a scrollbar, send mouseExited to the scrollbar.
2660         If the mouse is currently over a scrollbar, send mouseMoved/Up/Down to the scrollbar instead of PDFLayerController.
2661         If the mouse is currently over the scroll corner, bail, because nobody should get those events.
2662
2663 2012-11-27  Dan Bernstein  <mitz@apple.com>
2664
2665         Entering Tab View after a bunch of YouTube pages were opened in background tabs makes all of them start playing simultaneously
2666         https://bugs.webkit.org/show_bug.cgi?id=103358
2667
2668         Reviewed by Adele Peterson.
2669
2670         To fix this, this patch adds WKPageSetMayStartMediaWhenInWindow(), which allows the client to
2671         prevent media from starting automatically when the view is put in a window.
2672
2673         * Shared/WebPageCreationParameters.cpp:
2674         (WebKit::WebPageCreationParameters::encode): Encode mayStartMediaWhenInWindow.
2675         (WebKit::WebPageCreationParameters::decode): Decode mayStartMediaWhenInWindow.
2676         * Shared/WebPageCreationParameters.h:
2677         (WebPageCreationParameters): Added boolean member mayStartMediaWhenInWindow.
2678         * UIProcess/API/C/WKPage.cpp:
2679         (WKPageSetMayStartMediaWhenInWindow): Added. Calls through to WebPageProxy.
2680         * UIProcess/API/C/WKPagePrivate.h: Declared WKPageSetMayStartMediaWhenInWindow.
2681         * UIProcess/WebPageProxy.cpp:
2682         (WebKit::WebPageProxy::WebPageProxy): Added initializiation of m_mayStartMediaWhenInWindow
2683         to true, the value matching the current behavior.
2684         (WebKit::WebPageProxy::setMayStartMediaWhenInWindow): Added. Updates
2685         m_mayStartMediaWhenInWindow and sends a message to the Web process to do the same.
2686         (WebKit::WebPageProxy::creationParameters): Changed to set mayStartMediaWhenInWindow in the
2687         process creation parameters.
2688         * UIProcess/WebPageProxy.h:
2689         (WebPageProxy): Declared setMayStartMediaWhenInWindow() and added member variable
2690         m_mayStartMediaWhenInWindow.
2691         * WebProcess/WebPage/WebPage.cpp:
2692         (WebKit::WebPage::WebPage): Initialized m_mayStartMediaWhenInWindow from the creation
2693         parameters.
2694         (WebKit::WebPage::setIsInWindow): Made starting of media upon being added to a window
2695         conditional on m_mayStartMediaWhenInWindow.
2696         (WebKit::WebPage::setMayStartMediaWhenInWindow): Added. Sets m_mayStartMediaWhenInWindow. If
2697         already in a window when changing from false to true, starts m_setCanStartMediaTimer.
2698         * WebProcess/WebPage/WebPage.h:
2699         (WebPage): Declared setMayStartMediaWhenInWindow() and added member variable m_mayStartMediaWhenInWindow.
2700         * WebProcess/WebPage/WebPage.messages.in: Added SetMayStartMediaWhenInWindow.
2701
2702 2012-11-27  Pratik Solanki  <psolanki@apple.com>
2703
2704         objc/objc-runtime.h does not exist on all PLATFORM(MAC)
2705         https://bugs.webkit.org/show_bug.cgi?id=101780
2706
2707         Reviewed by Brent Fulgham.
2708
2709         Clean up header includes so we don't include objc/objc-runtime.h.
2710
2711         * PluginProcess/mac/PluginProcessShim.mm:
2712         * UIProcess/API/mac/PDFViewController.mm:
2713
2714 2012-11-27  Alexey Proskuryakov  <ap@apple.com>
2715
2716         [WK2] WebPageProxy::relatedPages() cannot assume that this page is known to process
2717         https://bugs.webkit.org/show_bug.cgi?id=103433
2718         <rdar://problem/12543513>
2719
2720         Reviewed by Jessie Berlin.
2721
2722         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::relatedPages): Removed an incorrect
2723         assertion, and modified code to not rely on its condition being true.
2724
2725 2012-11-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2726
2727         [EFL][Qt][WK2] Tiles not always painted
2728         https://bugs.webkit.org/show_bug.cgi?id=103271
2729
2730         Reviewed by Kenneth Rohde Christiansen.
2731
2732         The problem turned up because visible content was synchromized before the new fixed
2733         layout size had been applied in the web process.
2734
2735         * UIProcess/PageViewportController.cpp:
2736         (WebKit::PageViewportController::didChangeViewportSize):
2737         (WebKit::PageViewportController::didChangeViewportAttributes):
2738
2739 2012-11-27  Yael Aharon  <yael.aharon@intel.com>
2740
2741         [EFL] Graphics layer edges are sometimes very pixelated
2742         https://bugs.webkit.org/show_bug.cgi?id=103302
2743
2744         Reviewed by Kenneth Rohde Christiansen.
2745
2746         The call setEnableEdgeDistanceAntialiasing(true) was lost in the refactoring of
2747         http://trac.webkit.org/changeset/135401.
2748
2749         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
2750         (WebKit::LayerTreeRenderer::paintToCurrentGLContext):
2751
2752 2012-11-27  KwangYong Choi  <ky0.choi@samsung.com>
2753
2754         [X11] Allow empty plugin name and description during scan plugin
2755         https://bugs.webkit.org/show_bug.cgi?id=103234
2756
2757         Reviewed by Simon Hausmann.
2758
2759         Empty entries should be allowed when split the output string of scan plugin
2760         because the plugin name and the description can be empty string.
2761
2762         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
2763         (WebKit::PluginProcessProxy::scanPlugin):
2764         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2765         (WebKit::PluginProcessProxy::scanPlugin):
2766
2767 2012-11-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2768
2769         Unreviewed, rolling out r135819.
2770         http://trac.webkit.org/changeset/135819
2771         https://bugs.webkit.org/show_bug.cgi?id=103388
2772
2773         It broke many tests on Qt and EFL WK2 platforms (Requested by
2774         Ossy on #webkit).
2775
2776         * Shared/WebPageCreationParameters.cpp:
2777         (WebKit::WebPageCreationParameters::encode):
2778         (WebKit::WebPageCreationParameters::decode):
2779         * Shared/WebPageCreationParameters.h:
2780         (WebPageCreationParameters):
2781         * UIProcess/API/C/WKPage.cpp:
2782         (WKPageCopyRelatedPages):
2783         * UIProcess/API/C/WKPagePrivate.h:
2784         * UIProcess/WebPageProxy.cpp:
2785         (WebKit::WebPageProxy::WebPageProxy):
2786         (WebKit::WebPageProxy::creationParameters):
2787         * UIProcess/WebPageProxy.h:
2788         (WebPageProxy):
2789         * WebProcess/WebPage/WebPage.cpp:
2790         (WebKit::WebPage::WebPage):
2791         (WebKit::WebPage::setIsInWindow):
2792         * WebProcess/WebPage/WebPage.h:
2793         (WebPage):
2794         * WebProcess/WebPage/WebPage.messages.in:
2795
2796 2012-11-27  Kyungjin Kim  <gen.kim@samsung.com>
2797
2798         [WK2] Expose Accelerated2dCanvas flag set and get in WebKit2
2799         https://bugs.webkit.org/show_bug.cgi?id=103008
2800
2801         Reviewed by Gyuyoung Kim.
2802
2803         Fix API names in WKPreferences from 2d to 2D.
2804
2805         * UIProcess/API/C/WKPreferences.cpp:
2806         (WKPreferencesSetAccelerated2DCanvasEnabled):
2807         (WKPreferencesGetAccelerated2DCanvasEnabled):
2808         * UIProcess/API/C/WKPreferencesPrivate.h:
2809
2810 2012-11-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2811
2812         Unreviewed, rolling out r135786.
2813         http://trac.webkit.org/changeset/135786
2814         https://bugs.webkit.org/show_bug.cgi?id=103379
2815
2816         It made 3 plugin tests timeout on several platforms (Requested
2817         by Ossy on #webkit).
2818
2819         * WebProcess/Plugins/PluginView.cpp:
2820         (WebKit::PluginView::performFrameLoadURLRequest):
2821         * WebProcess/WebPage/WebPage.cpp:
2822         (WebKit::WebPage::loadURLRequest):
2823         (WebKit::WebPage::loadData):
2824         (WebKit::WebPage::linkClicked):
2825
2826 2012-11-27  Huang Dongsung  <luxtella@company100.net>
2827
2828         Coordinated Graphics: Remove the maskTarget member of CoordinatedGraphicsLayer.
2829         https://bugs.webkit.org/show_bug.cgi?id=103297
2830
2831         Reviewed by Noam Rosenthal.
2832
2833         Remove the maskTarget member of CoordinatedGraphicsLayer, which is not used.
2834
2835         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2836         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2837         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
2838         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2839         (CoordinatedGraphicsLayer):
2840
2841 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2842
2843         Unreviewed, rolling out r135822.
2844         http://trac.webkit.org/changeset/135822
2845         https://bugs.webkit.org/show_bug.cgi?id=103369
2846
2847         Undo the revert of r135818, since that change does not affect
2848         code used by Chromium (Requested by apavlov on #webkit).
2849
2850         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2851         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
2852         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
2853
2854 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2855
2856         Unreviewed, rolling out r135818.
2857         http://trac.webkit.org/changeset/135818
2858         https://bugs.webkit.org/show_bug.cgi?id=103368
2859
2860         platform/chromium/virtual/threaded/compositing/visibility
2861         /visibility-simple-webgl-layer.html crash on Mountain Lion
2862         (Requested by apavlov on #webkit).
2863
2864         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2865         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
2866         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
2867
2868 2012-11-26  Dan Bernstein  <mitz@apple.com>
2869
2870         <rdar://problem/11931191> Entering Tab View after a bunch of YouTube pages were opened in background tabs makes all of them start playing simultaneously
2871         https://bugs.webkit.org/show_bug.cgi?id=103358
2872
2873         Reviewed by Adele Peterson.
2874
2875         To fix this, this patch adds WKPageSetMayStartMediaWhenInWindow(), which allows the client to
2876         prevent media from starting automatically when the view is put in a window.
2877
2878         * Shared/WebPageCreationParameters.cpp:
2879         (WebKit::WebPageCreationParameters::encode): Encode mayStartMediaWhenInWindow.
2880         (WebKit::WebPageCreationParameters::decode): Decode mayStartMediaWhenInWindow.
2881         * Shared/WebPageCreationParameters.h:
2882         (WebPageCreationParameters): Added boolean member mayStartMediaWhenInWindow.
2883         * UIProcess/API/C/WKPage.cpp:
2884         (WKPageSetMayStartMediaWhenInWindow): Added. Calls through to WebPageProxy.
2885         * UIProcess/API/C/WKPagePrivate.h: Declared WKPageSetMayStartMediaWhenInWindow.
2886         * UIProcess/WebPageProxy.cpp:
2887         (WebKit::WebPageProxy::WebPageProxy): Added initializiation of m_mayStartMediaWhenInWindow
2888         to true, the value matching the current behavior.
2889         (WebKit::WebPageProxy::setMayStartMediaWhenInWindow): Added. Updates
2890         m_mayStartMediaWhenInWindow and sends a message to the Web process to do the same.
2891         (WebKit::WebPageProxy::creationParameters): Changed to set mayStartMediaWhenInWindow in the
2892         process creation parameters.
2893         * UIProcess/WebPageProxy.h:
2894         (WebPageProxy): Declared setMayStartMediaWhenInWindow() and added member variable
2895         m_mayStartMediaWhenInWindow.
2896         * WebProcess/WebPage/WebPage.cpp:
2897         (WebKit::WebPage::WebPage): Initialized m_mayStartMediaWhenInWindow from the creation
2898         parameters.
2899         (WebKit::WebPage::setIsInWindow): Made starting of media upon being added to a window
2900         conditional on m_mayStartMediaWhenInWindow.
2901         (WebKit::WebPage::setMayStartMediaWhenInWindow): Added. Sets m_mayStartMediaWhenInWindow. If
2902         already in a window when changing from false to true, starts m_setCanStartMediaTimer.
2903         * WebProcess/WebPage/WebPage.h:
2904         (WebPage): Declared setMayStartMediaWhenInWindow() and added member variable m_mayStartMediaWhenInWindow.
2905         * WebProcess/WebPage/WebPage.messages.in: Added SetMayStartMediaWhenInWindow.
2906
2907 2012-11-26  Huang Dongsung  <luxtella@company100.net>
2908
2909         Coordinated Graphics: Set visibility to a mask layer in GraphicsLayer::setContentsVisible().
2910         https://bugs.webkit.org/show_bug.cgi?id=103297
2911
2912         Reviewed by Noam Rosenthal.
2913
2914         GraphicsLayerTextureMapper and CoordinatedGraphicsLayer set the visibility of a
2915         mask layer in setContentsVisible() and setMaskLayer() like setting a size.
2916         This patch is needed because RenderLayerBacking does not set the visibility to a
2917         mask layer like the size.
2918
2919         This patch does not change user experience because an invisible layer is not
2920         rendered although the mask layer is rendered. In that sense, it is an
2921         optimization patch.
2922
2923         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2924         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
2925         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
2926
2927 2012-11-26  Kyungjin Kim  <gen.kim@samsung.com>
2928
2929         [WK2] Expose Accelerated2dCanvas flag set and get in WebKit2
2930         https://bugs.webkit.org/show_bug.cgi?id=103008
2931
2932         Reviewed by Gyuyoung Kim.
2933
2934         Add setting APIs for accelerated 2d canvas in WebKit2.
2935
2936         * Shared/WebPreferencesStore.h:
2937         (WebKit):
2938         * UIProcess/API/C/WKPreferences.cpp:
2939         (WKPreferencesSetAccelerated2dCanvasEnabled):
2940         (WKPreferencesGetAccelerated2dCanvasEnabled):
2941         * UIProcess/API/C/WKPreferencesPrivate.h:
2942         * WebProcess/WebPage/WebPage.cpp:
2943         (WebKit::WebPage::updatePreferences):
2944
2945 2012-11-26  Tim Horton  <timothy_horton@apple.com>
2946
2947         Ensure that plugins are initialized before using handleEditingCommand/isEditingCommandEnabled/shouldAllowScripting
2948         https://bugs.webkit.org/show_bug.cgi?id=103288
2949
2950         Reviewed by Dan Bernstein.
2951
2952         Other PluginView methods that use m_plugin null-check m_plugin and check
2953         that the plugin has finished initializing before using it. These three
2954         should do the same thing.
2955
2956         * WebProcess/Plugins/PluginView.cpp:
2957         (WebKit::PluginView::handleEditingCommand):
2958         (WebKit::PluginView::isEditingCommandEnabled):
2959         (WebKit::PluginView::shouldAllowScripting):
2960
2961 2012-11-26  Tim Horton  <timothy_horton@apple.com>
2962
2963         PDFPlugin: Subframe PDF context menus are in the wrong place
2964         https://bugs.webkit.org/show_bug.cgi?id=103284
2965         <rdar://problem/12727972>
2966
2967         Reviewed by Dan Bernstein.
2968
2969         Event position is in window coordinates, not content coordinates.
2970         Since we have no windowToScreen(), use windowToContents and contentsToScreen
2971         to get to screen coordinate space, which WKPopupContextMenu wants.
2972
2973         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2974         (WebKit::PDFPlugin::handleContextMenuEvent):
2975
2976 2012-11-26  Tim Horton  <timothy_horton@apple.com>
2977
2978         PDFPlugin: Ctrl-click opens a link in a PDF in addition to context menu
2979         https://bugs.webkit.org/show_bug.cgi?id=103282
2980         <rdar://problem/12710892>
2981
2982         Reviewed by Dan Bernstein.
2983
2984         Don't send standard mouse events to PDFKit if a click will also show/hide the context menu.
2985
2986         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2987         (WebKit::PDFPlugin::handleMouseEvent):
2988
2989 2012-11-26  Ryuan Choi  <ryuan.choi@gmail.com>
2990
2991         [EFL] Unreviewed build fix after r135767 without Tiled Backing Store
2992         https://bugs.webkit.org/show_bug.cgi?id=103320
2993
2994         Unreviewed build fix.
2995
2996         * WebProcess/Plugins/Plugin.cpp:
2997         * WebProcess/Plugins/Plugin.h:
2998         (WebCore):
2999
3000 2012-11-26  James Simonsen  <simonjam@chromium.org>
3001
3002         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
3003         https://bugs.webkit.org/show_bug.cgi?id=102151
3004
3005         Reviewed by Adam Barth.
3006
3007         * WebProcess/Plugins/PluginView.cpp:
3008         (WebKit::PluginView::performFrameLoadURLRequest):
3009         * WebProcess/WebPage/WebPage.cpp:
3010         (WebKit::WebPage::loadURLRequest):
3011         (WebKit::WebPage::loadData):
3012
3013 2012-11-26  Jon Lee  <jonlee@apple.com>
3014
3015         Pass clicks through to the restarted plugin
3016         https://bugs.webkit.org/show_bug.cgi?id=102150
3017         <rdar://problem/12695575>
3018
3019         Reviewed by Simon Fraser.
3020
3021         Expose convertToRootView() as a public function for all plugins. It converts the click point
3022         from local plugin coordinates to root view coordinates. When the events are sent to the
3023         plugin, the coordinate gets converted back to the local reference frame.
3024         * WebProcess/Plugins/Plugin.cpp:
3025         (WebKit::Plugin::convertToRootView): Default implementation should not be reached.
3026         * WebProcess/Plugins/Plugin.h: Promote convertToRootView() from NetscapePlugin.h.
3027         * WebProcess/Plugins/Netscape/NetscapePlugin.h: An implementation already existed. Make the
3028         method virtual.
3029         * WebProcess/Plugins/PluginProxy.h:
3030         * WebProcess/Plugins/PluginProxy.cpp:
3031         (WebKit::PluginProxy::convertToRootView): Apply the transform to the provided point to return
3032         a point in root view coordinates.
3033
3034         Change the threshold state to PlayingWithPendingMouseClick instead of Playing, since that is
3035         the earliest state where the plugin is playing.
3036         * WebProcess/Plugins/PluginView.cpp: Give the snapshot a little more time to generate.
3037         (WebKit::PluginView::didInitializePlugin): When the plugin has initialized, tell the plugin
3038         element to dispatch the pending mouse click.
3039         (WebKit::PluginView::paint):
3040         (WebKit::PluginView::createWebEvent): Helper function to convert a WebCore mouse event to a
3041         WebMouseEvent.
3042         (WebKit::PluginView::handleEvent): If the event is simulated, there is no source event from
3043         the UI process. So we fabricate one based on the simulated event.
3044         (WebKit::PluginView::invalidateRect):
3045         (WebKit::PluginView::isAcceleratedCompositingEnabled):
3046         * WebProcess/Plugins/PluginView.h:
3047
3048 2012-11-26  Kalev Lember  <kalevlember@gmail.com>
3049
3050         [GTK] Explicitly link against librt
3051         https://bugs.webkit.org/show_bug.cgi?id=103194
3052
3053         Reviewed by Martin Robinson.
3054
3055         Fixes broken build with undefined references to shm_open / shm_unlink
3056         symbols. SharedMemoryUnix.cpp uses these so we need to link with -lrt.
3057
3058         * GNUmakefile.am:
3059
3060 2012-11-26  Christophe Dumez  <christophe.dumez@intel.com>
3061
3062         [EFL][WK2] Add setting to enable / disable HTML5 local storage functionality
3063         https://bugs.webkit.org/show_bug.cgi?id=103224
3064
3065         Reviewed by Laszlo Gombos.
3066
3067         Add API to ewk_settings to enable / disable the HTML5
3068         local storage functionality. The functionality is
3069         enabled by default.
3070
3071         * UIProcess/API/efl/ewk_settings.cpp:
3072         (ewk_settings_local_storage_enabled_set):
3073         (ewk_settings_local_storage_enabled_get):
3074         * UIProcess/API/efl/ewk_settings.h:
3075         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
3076         (TEST_F): Add API test for ewk_settings_local_storage_enabled_get / set.
3077
3078 2012-11-26  Rafael Brandao  <rafael.lobo@openbossa.org>
3079
3080         [CoordinatedGraphics] Access to LayerTreeRenderer::m_renderQueue should be thread safe
3081         https://bugs.webkit.org/show_bug.cgi?id=101341
3082
3083         Reviewed by Noam Rosenthal.
3084
3085         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3086         (WebKit::LayerTreeRenderer::syncRemoteContent): The previous swap already clears the
3087         vector on m_renderQueue. It is also done in a thread-safe way, so clearing it afterward
3088         can be harmful as we've already released the lock.
3089
3090 2012-11-26  Jaehun Lim  <ljaehun.lim@samsung.com>
3091
3092         Text Autosizing: Add Text Autosizing APIs for WK2
3093         https://bugs.webkit.org/show_bug.cgi?id=100633
3094
3095         Reviewed by Sam Weinig.
3096
3097         Implement basic Text Autosizing APIs for WK2.
3098         Text Autosizing is a useful feature for mobile browsers. It adjusts the font size
3099         of text in wide columns, and makes text more legible.
3100         This patch adds setting APIs for Text Autosizing in WK2.
3101
3102         * Shared/WebPreferencesStore.h:
3103         (WebKit):
3104         * UIProcess/API/C/WKPreferences.cpp:
3105         (WKPreferencesSetTextAutosizingEnabled):
3106         (WKPreferencesGetTextAutosizingEnabled):
3107         * UIProcess/API/C/WKPreferences.h:
3108         * WebProcess/WebPage/WebPage.cpp:
3109         (WebKit::WebPage::updatePreferences):
3110
3111 2012-11-26  Pierre Rossi  <pierre.rossi@gmail.com>
3112
3113         [Qt] REGRESSION(r135575): It made all tests assert
3114         https://bugs.webkit.org/show_bug.cgi?id=103169
3115
3116         Reviewed by Simon Hausmann.
3117
3118         This fixes another regression introduced in r135515:
3119         initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
3120         since it can be called from WebKit2 to initialize QStyle for testing.
3121         This would then lead to things such as PlatformStrategies being
3122         initialized twice.
3123
3124         * qt/MainQt.cpp: No need to initialize anything if we're not using QStyle.
3125         (WebKit):
3126         (main):
3127
3128 2012-11-26  Huang Dongsung  <luxtella@company100.net>
3129
3130         REGRESSION(134142): ASSERT(!m_size.isZero()) hits in CoordinatedBackingStore::paintToTextureMapper().
3131         https://bugs.webkit.org/show_bug.cgi?id=103217
3132
3133         Reviewed by Noam Rosenthal.
3134
3135         It is possible for CoordinatedBackingStore of directed composited image to not
3136         have tiles, because CoordinatedImageBacking does not create tiles when the image
3137         is invisible.
3138
3139         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
3140         (WebKit::CoordinatedBackingStore::paintToTextureMapper):
3141
3142 2012-11-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3143
3144         [WK2] TiledBackingStore: page contents is scaled wrongly
3145         https://bugs.webkit.org/show_bug.cgi?id=103090
3146
3147         Reviewed by Kenneth Rohde Christiansen.
3148
3149         Before this change the page contents scaling in PageViewportController was
3150         defined all the times by m_rawAttributes.initialScale. If initial scale had not
3151         been specified in the viewport meta tag it was set to m_minimumScaleToFit inside
3152         PageViewportController::didChangeViewportAttributes().
3153
3154         The problem was that m_minimumScaleToFit could have wrong value as contents size
3155         might have not be updated by the time PageViewportController::didChangeViewportAttributes()
3156         was invoked.
3157
3158         The solution is to use m_minimumScaleToFit for contents scaling if initial scale
3159         is not specified in the viewport meta tag, as it is updated all the time. 
3160         Also a flag m_initiallyFitToViewport is added to PageViewportController to detect
3161         whether m_minimumScaleToFit should be used for scaling.
3162
3163         * UIProcess/PageViewportController.cpp:
3164         (WebKit::PageViewportController::PageViewportController):
3165         (WebKit::PageViewportController::didChangeContentsSize):
3166         (WebKit::PageViewportController::pageTransitionViewportReady):
3167         (WebKit::PageViewportController::didChangeViewportAttributes):
3168         * UIProcess/PageViewportController.h:
3169         (PageViewportController):
3170
3171 2012-11-24  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3172
3173         [EFL][WK2] Stop the mess with DECLARE_EWK_VIEW_CALLBACK arg type definition
3174         https://bugs.webkit.org/show_bug.cgi?id=103187
3175
3176         Reviewed by Kenneth Rohde Christiansen.
3177
3178         Now the client should pass to DECLARE_EWK_VIEW_CALLBACK macro exacly the 
3179         same arg type s/he wants to have in the Ewk_View callback.
3180
3181         * UIProcess/API/efl/EwkViewCallbacks.h:
3182         (EvasObjectHolder):
3183         (EwkViewCallbacks::EvasObjectHolder::EvasObjectHolder):
3184         (EwkViewCallbacks):
3185
3186 2012-11-24  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3187
3188         [EFL][WK2] Check errors in EwkView callbacks usage at compile time
3189         https://bugs.webkit.org/show_bug.cgi?id=103177
3190
3191         Reviewed by Kenneth Rohde Christiansen.
3192
3193         Errors in EwkView callbacks usage are now checked at compile time.
3194
3195         * UIProcess/API/efl/EwkViewCallbacks.h:
3196         (CallBack):
3197         (EwkViewCallbacks::CallBack::CallBack):
3198         (EwkViewCallbacks::CallBack::call):
3199
3200 2012-11-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3201
3202         Unreviewed, rolling out r135575.
3203         http://trac.webkit.org/changeset/135575
3204         https://bugs.webkit.org/show_bug.cgi?id=103169
3205
3206         It made all tests assert (Requested by Ossy on #webkit).
3207
3208         * qt/MainQt.cpp:
3209         (WebKit):
3210         (main):
3211
3212 2012-11-23  Alexis Menard  <alexis@webkit.org>
3213
3214         [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
3215         https://bugs.webkit.org/show_bug.cgi?id=102104
3216
3217         Reviewed by Julien Chaffraix.
3218
3219         Protect the new feature behind a feature flag.
3220
3221         * Configurations/FeatureDefines.xcconfig:
3222
3223 2012-11-23  Huang Dongsung  <luxtella@company100.net>
3224
3225         Coordinated Graphics: Match the behavior of selfOrAncestorHaveNonAffineTransforms() to its name.
3226         https://bugs.webkit.org/show_bug.cgi?id=103097
3227
3228         Reviewed by Noam Rosenthal.
3229
3230         CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms() does
3231         not check its ancestor. This patch makes this method check its ancestor
3232         to match its name.
3233
3234         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3235         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
3236
3237 2012-11-23  Huang Dongsung  <luxtella@company100.net>
3238
3239         Coordinated Graphics: LayerTreeRenderer::removeTile() does not remove tiles actually.
3240         https://bugs.webkit.org/show_bug.cgi?id=103030
3241
3242         Reviewed by Noam Rosenthal.
3243
3244         LayerTreeRenderer::removeTile() must add a backing store into
3245         m_backingStoresWithPendingBuffers. Otherwise, tiles are not removed.
3246
3247         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3248         (WebKit::LayerTreeRenderer::removeTile):
3249
3250 2012-11-23  Huang Dongsung  <luxtella@company100.net>
3251
3252         [TexMap] Remove dependency of TextureMapperLayer on GraphicsLayerTextureMapper.
3253         https://bugs.webkit.org/show_bug.cgi?id=103046
3254
3255         Reviewed by Noam Rosenthal.
3256
3257         This patch makes GraphicsLayerTextureMapper create its own backing
3258         store. However, LayerTreeRenderer also creates its own backing store. So
3259         when LayerTreeRenderer uses GraphicsLayerTextureMapper,
3260         LayerTreeRenderer needs GraphicsLayerTextureMapper to not create its own
3261         backing store.
3262
3263         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3264         (WebKit::LayerTreeRenderer::createLayer):
3265         (WebKit::LayerTreeRenderer::getBackingStore):
3266
3267 2012-11-23  Huang Dongsung  <luxtella@company100.net>
3268
3269         REGRESSION(r135486): ASSERT(isMainThread()) hit in LayerTreeRenderer::setActive(bool)
3270         https://bugs.webkit.org/show_bug.cgi?id=103077
3271
3272         Reviewed by Noam Rosenthal.
3273
3274         Currently, the painting thread uses purgeGLResources() and setActive().
3275         QQuickWebPage::updatePaintNode() indirectly calls both methods after
3276         locking the main thread.
3277
3278         This patch changes two points.
3279         1. Remove ASSERT(isMainThread()) in methods that the painting thread can
3280         call.
3281         2. Make purgeGLResources() and setActive() call methods of
3282         LayerTreeCoordinatorProxy via dispatchOnMainThread().
3283
3284         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3285         (WebKit::LayerTreeRenderer::LayerTreeRenderer):
3286         (WebKit::LayerTreeRenderer::renderNextFrame):
3287         (WebKit::LayerTreeRenderer::purgeGLResources):
3288         (WebKit):
3289         (WebKit::LayerTreeRenderer::purgeBackingStores):
3290         (WebKit::LayerTreeRenderer::setActive):
3291         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
3292         (LayerTreeRenderer):
3293
3294 2012-11-23  Christophe Dumez  <christophe.dumez@intel.com>
3295
3296         [EFL][WK2][AC] EwkViewImpl::transformToScreen() does not retrieve the Ecore_X_Window properly
3297         https://bugs.webkit.org/show_bug.cgi?id=103133
3298
3299         Reviewed by Kenneth Rohde Christiansen.
3300
3301         If accelerated compositing is enabled, EwkViewImpl::transformToScreen() should
3302         attempt to retrieve the Ecore_X_Window using ecore_evas_gl_x11_window_get() first
3303         and only fall back to ecore_evas_software_x11_window_get().
3304
3305         * UIProcess/API/efl/EwkViewImpl.cpp:
3306         (EwkViewImpl::transformToScreen):
3307
3308 2012-11-23  Wojciech Bielawski  <w.bielawski@samsung.com>
3309
3310         [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick()
3311         https://bugs.webkit.org/show_bug.cgi?id=86881
3312
3313         Reviewed by Kenneth Rohde Christiansen.
3314
3315         InjectedBundle API extended to retrieve contextMenu entries names.
3316         WebContextMenu exteded with function to retrieve menu items.
3317         This API is required by layout tests.
3318         Common code in WebContextMenu.cpp moved to separate method menuItemsWithUserData().
3319         Behaviour of dependend methods is unchanged.
3320
3321         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3322         (WKBundlePageGetContextMenuEntriesNames):
3323         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3324         * WebProcess/WebPage/WebContextMenu.cpp:
3325         (WebKit::WebContextMenu::items):
3326         (WebKit):
3327         * WebProcess/WebPage/WebContextMenu.h:
3328         (WebContextMenu):
3329
3330 2012-11-22  Pierre Rossi  <pierre.rossi@gmail.com>
3331
3332         [Qt] Avoid initializing PlatformStrategies twice.
3333
3334         Rubber-stamped by Simon Hausmann.
3335
3336         This fixes another regression introduced in r135515:
3337         initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
3338         since it can be called from WebKit2 to initialize QStyle for testing.
3339         This would then lead to things such as PlatformStrategies being
3340         initialized twice.
3341
3342         * qt/MainQt.cpp: No need to initialize anything if we're not using QStyle.
3343         (WebKit):
3344         (main):
3345
3346 2012-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3347
3348         [GTK] Use custom private macros to define GObjects
3349         https://bugs.webkit.org/show_bug.cgi?id=99705
3350
3351         Reviewed by Martin Robinson.
3352
3353         Add WEBKIT_DEFINE_TYPE macros, similar and compatible with
3354         G_DEFINE_TYPE macros, to define GObject types. These macros also
3355         define the init and finalize functions reducing the GObject
3356         boilerplate and hiding the placement new syntax that causes some
3357         confusion. The patch replaces the use of G_DEFINE_TYPE macros by
3358         WEBKIT_DEFINE_TYPE ones and removes the init and finalize
3359         implementations, moving custom code when needed to the private
3360         struct constructor/destructor or constructed/dispose virtual
3361         methods when appropriate.
3362
3363         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
3364         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
3365         (webkit_back_forward_list_item_class_init):
3366         * UIProcess/API/gtk/WebKitContextMenu.cpp:
3367         (webkitContextMenuDispose):
3368         (webkit_context_menu_class_init):
3369         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
3370         (_WebKitContextMenuItemPrivate::~_WebKitContextMenuItemPrivate):
3371         (_WebKitContextMenuItemPrivate):
3372         (webkit_context_menu_item_class_init):
3373         * UIProcess/API/gtk/WebKitCookieManager.cpp:
3374         (_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
3375         (_WebKitCookieManagerPrivate):
3376         * UIProcess/API/gtk/WebKitDownload.cpp:
3377         (webkit_download_class_init):
3378         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
3379         (webkit_favicon_database_class_init):
3380         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3381         (webkitFileChooserRequestDispose):
3382         (webkit_file_chooser_request_class_init):
3383         * UIProcess/API/gtk/WebKitFindController.cpp:
3384         (webkit_find_controller_class_init):
3385         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
3386         (webkitFormSubmissionRequestDispose):
3387         (webkit_form_submission_request_class_init):
3388         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:
3389         (webkitGeolocationPermissionRequestDispose):
3390         (webkit_geolocation_permission_request_class_init):
3391         * UIProcess/API/gtk/WebKitHitTestResult.cpp:
3392         (webkit_hit_test_result_class_init):
3393         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
3394         (webkit_navigation_policy_decision_class_init):
3395         * UIProcess/API/gtk/WebKitPlugin.cpp:
3396         (_WebKitPluginPrivate::~_WebKitPluginPrivate):
3397         (_WebKitPluginPrivate):
3398         (webkit_plugin_class_init):
3399         * UIProcess/API/gtk/WebKitPolicyDecision.cpp:
3400         (webkitPolicyDecisionDispose):
3401         (webkit_policy_decision_class_init):
3402         (webkit_policy_decision_use):
3403         (webkit_policy_decision_ignore):
3404         (webkit_policy_decision_download):
3405         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
3406         (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):
3407         (_WebKitPrintOperationPrivate):
3408         (webkit_print_operation_class_init):
3409         * UIProcess/API/gtk/WebKitPrivate.h:
3410         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
3411         (webkit_response_policy_decision_class_init):
3412         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
3413         (webkit_security_manager_class_init):
3414         * UIProcess/API/gtk/WebKitSettings.cpp:
3415         (_WebKitSettingsPrivate::_WebKitSettingsPrivate):
3416         (_WebKitSettingsPrivate):
3417         (webkit_settings_class_init):
3418         * UIProcess/API/gtk/WebKitURIRequest.cpp:
3419         (webkit_uri_request_class_init):
3420         * UIProcess/API/gtk/WebKitURIResponse.cpp:
3421         (webkit_uri_response_class_init):
3422         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
3423         (webkit_uri_scheme_request_class_init):
3424         * UIProcess/API/gtk/WebKitWebContext.cpp:
3425         * UIProcess/API/gtk/WebKitWebInspector.cpp:
3426         (_WebKitWebInspectorPrivate::~_WebKitWebInspectorPrivate):
3427         (_WebKitWebInspectorPrivate):
3428         (webkit_web_inspector_class_init):
3429         * UIProcess/API/gtk/WebKitWebResource.cpp:
3430         (webkit_web_resource_class_init):
3431         * UIProcess/API/gtk/WebKitWebView.cpp:
3432         (_WebKitWebViewPrivate::~_WebKitWebViewPrivate):
3433         (_WebKitWebViewPrivate):
3434         (webkitWebViewConstructed):
3435         (webkitWebViewDispose):
3436         (webkit_web_view_class_init):
3437         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3438         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
3439         (_WebKitWebViewBasePrivate):
3440         (_WebKitWebViewBasePrivate::~_WebKitWebViewBasePrivate):
3441         (webkitWebViewBaseDispose):
3442         (webkitWebViewBaseConstructed):
3443         (webkit_web_view_base_class_init):
3444         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp:
3445         (webkit_web_view_base_accessible_class_init):
3446         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
3447         (webkit_window_properties_class_init):
3448
3449 2012-11-22  KwangYong Choi  <ky0.choi@samsung.com>
3450
3451         [EFL][WK2] Buildfix when ENABLE_NETSCAPE_PLUGIN_API is disabled
3452         https://bugs.webkit.org/show_bug.cgi?id=103044
3453
3454         Reviewed by Kentaro Hara.
3455
3456         enum ProcessType has PluginProcess only if ENABLE(PLUGIN_PROCESS) is enabled.
3457         So, guard PluginProcess with ENABLE(PLUGIN_PROCESS).
3458
3459         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3460         (WebKit::ProcessLauncher::launchProcess):
3461
3462 2012-09-26  Gustavo Noronha Silva  <gns@gnome.org>
3463
3464         [GTK] Split SVG from WebCore to work-around make limitation
3465         https://bugs.webkit.org/show_bug.cgi?id=97735
3466
3467         Reviewed by Carlos Garcia Campos.
3468
3469         Add a new libtool convenience library, libWebCoreSVG.la, to work-around
3470         make limitation when linking libWebCore.
3471
3472         * GNUmakefile.am: link libWebCoreSVG.la into libwebkit2gtk.
3473
3474 2012-11-22  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
3475
3476         [Qt] Separate QWidget dependant code into separate WebKitWidgets static library
3477         https://bugs.webkit.org/show_bug.cgi?id=102800
3478
3479         Reviewed by Tor Arne Vestbø.
3480
3481         This patch separates code that needs to use QWidget related APIs in
3482         WebKit/qt/WebCoreSupport and Api from code that doesn't. This means for
3483         example FrameLoaderClientQt.cpp remains in the WebKit1 static library,
3484         while qwebpage.cpp and qwebframe.cpp become part of the WebKitWidgets
3485         static library. WebKit1 is compiled without QT += widgets and therefore
3486         any widget related dependency has been moved "up" and out of WebKit1 into
3487         the WebKitWidgets library.
3488
3489         Between the code in WebKit.a and WebKitWidgets.a new adapters and
3490         interfaces have been introduced, such as QWebPageAdapter and
3491         QWebFrameAdapter. QWebPageAdapter, when used from WebKit1, is a way to
3492         call out into the API layer, implemented by QWebPage (QWebPagePrivate).
3493         The other way around if QWebPage wants to access WebCore or
3494         WebCoreSupport related functionality, it will go through
3495         QWebPageAdapater (as base class). The separation in the direction up
3496         into the API layer is complete with this patch, no code in WebKit1
3497         depends on QtWidgets. The separation the other way around, code in the
3498         API layer not using any WebCore types, is not complete yet.
3499
3500         Some classes such as QWebSettings, QWebElement or
3501         DumpRenderTreeSupportQt remain in WebKit1. While they are API layer,
3502         they do not depend on widget related Qt APIs and they make much more
3503         use of WebCore internal APIs and therefore are easier to keep in
3504         WebKit1.
3505
3506         In the future we plan to place a real shared library boundary between
3507         WebKit1 and WebKitWidgets, by keeping the WebKit1 static library as
3508         part of the QtWebKit shared library and by turning the WebKitWidgets
3509         static library into a shared one.
3510
3511         * qt/MainQt.cpp:
3512         (WebKit):
3513         (main):
3514
3515 2012-11-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3516
3517         [WK2][EFL] No need to remove surface before replacing
3518         https://bugs.webkit.org/show_bug.cgi?id=103055
3519
3520         Rubberstamped by Simon Hausmann.
3521
3522         The surface is stored in a OwnPtr which automatically
3523         frees the existing surface after replacing it with a new
3524         one. For some reason, this also fixes resizing issues on
3525         my Nvidia driver.
3526
3527         * UIProcess/API/efl/EwkViewImpl.cpp:
3528         (EwkViewImpl::createGLSurface):
3529         * UIProcess/API/efl/EwkViewImpl.h:
3530         * UIProcess/API/efl/ewk_view.cpp:
3531         (_ewk_view_smart_calculate):
3532
3533 2012-11-22  Christophe Dumez  <christophe.dumez@intel.com>
3534
3535         WebKitTestRunner needs layoutTestController.setCacheModel
3536         https://bugs.webkit.org/show_bug.cgi?id=42684
3537
3538         Reviewed by Kenneth Rohde Christiansen.
3539
3540         Add Bundle C API for WebKitTestRunner to set the
3541         cache model.
3542
3543         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3544         (WKBundleSetCacheModel):
3545         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3546         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3547         (WebKit::InjectedBundle::setCacheModel):
3548         (WebKit):
3549         * WebProcess/InjectedBundle/InjectedBundle.h:
3550         (InjectedBundle):
3551         * WebProcess/WebProcess.h:
3552         (WebProcess):
3553
3554 2012-11-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3555
3556         REGRESSION(r135399): Wrong assertion causing an assertion failure: m_rawAttributes.initialScale > 0
3557         https://bugs.webkit.org/show_bug.cgi?id=102971
3558
3559         Reviewed by Kenneth Rohde Christiansen.
3560
3561         m_rawAttributes.initialScale has to be initialized even if m_minimumScaleToFit hasn't changed
3562         it's value.
3563
3564         * UIProcess/PageViewportController.cpp:
3565         (WebKit::PageViewportController::didChangeViewportAttributes):
3566
3567 2012-11-22  Eunmi Lee  <eunmi15.lee@samsung.com>
3568
3569         [EFL][WK2] Correct the parameters of WebPlatformTouchPoint.
3570         https://bugs.webkit.org/show_bug.cgi?id=102865
3571
3572         Reviewed by Kenneth Rohde Christiansen.
3573
3574         Set the screen position as a third parameter and contents position as
3575         a fourth parameter of WebPlatformTouchPoint().
3576
3577         * Shared/efl/WebEventFactory.cpp:
3578         (WebKit::WebEventFactory::createWebTouchEvent):
3579
3580 2012-11-22  Huang Dongsung  <luxtella@company100.net>
3581
3582         Coordinated Graphics: Remove an invisible TiledBackingStore of CoordinatedGraphicsLayer.
3583         https://bugs.webkit.org/show_bug.cgi?id=102894
3584
3585         Reviewed by Kenneth Rohde Christiansen.
3586
3587         CoordinatedGraphicsLayer does not need to have a backing store
3588         if (!drawsContent() || !contentsAreVisible() || m_size.isEmpty()).
3589
3590         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3591         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
3592
3593 2012-11-22  Huang Dongsung  <luxtella@company100.net>
3594
3595         Coordinated Graphics: refactor LayerTreeRenderer.
3596         https://bugs.webkit.org/show_bug.cgi?id=103004
3597
3598         Reviewed by Noam Rosenthal.
3599
3600         This patch changes two subjects.
3601         1. Add ASSERT(isMainThread()) in all methods that are called in the main thread.
3602         In addition, make dispatchOnMainThread() use callOnMainThread(const Function<void()>&
3603         function) instead of its own implementation.
3604
3605         2. Remove setAccelerationMode() because we don't use m_accelerationMode member
3606         except for the setter.
3607
3608         * UIProcess/API/efl/EwkViewImpl.cpp:
3609         (EwkViewImpl::createGLSurface):
3610         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3611         (WebKit):
3612         (WebKit::LayerTreeRenderer::dispatchOnMainThread):
3613         (WebKit::LayerTreeRenderer::LayerTreeRenderer):
3614         (WebKit::LayerTreeRenderer::animationFrameReady):
3615         (WebKit::LayerTreeRenderer::updateViewport):
3616         (WebKit::LayerTreeRenderer::renderNextFrame):
3617         (WebKit::LayerTreeRenderer::purgeGLResources):
3618         (WebKit::LayerTreeRenderer::detach):
3619         (WebKit::LayerTreeRenderer::setActive):
3620         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
3621         (LayerTreeRenderer):
3622         * UIProcess/efl/PageClientBase.cpp:
3623         (WebKit::PageClientBase::createDrawingAreaProxy):
3624
3625 2012-11-21  Jinwoo Song  <jinwoo7.song@samsung.com>
3626
3627         [EFL][WK2] Use consistent class names in the clients
3628         https://bugs.webkit.org/show_bug.cgi?id=102684
3629
3630         Reviewed by Gyuyoung Kim.
3631
3632         WebKit EFL classes do not use '_' since r135117 but '_' is still remained
3633         in some clients classes. This patch removed the '_' to make class names
3634         to be consistent.
3635
3636         * UIProcess/efl/ContextHistoryClientEfl.cpp:
3637         (WebKit::ContextHistoryClientEfl::didNavigateWithNavigationData):
3638         * UIProcess/efl/DownloadManagerEfl.cpp:
3639         (WebKit::DownloadManagerEfl::didFail):
3640         * UIProcess/efl/FormClientEfl.cpp:
3641         (WebKit::FormClientEfl::willSubmitForm):
3642         * UIProcess/efl/PageLoadClientEfl.cpp:
3643         (WebKit::PageLoadClientEfl::didReceiveIntentForFrame):
3644         (WebKit::PageLoadClientEfl::registerIntentServiceForFrame):
3645         (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
3646         (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
3647         (WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame):
3648         * UIProcess/efl/PagePolicyClientEfl.cpp:
3649         (WebKit::PagePolicyClientEfl::decidePolicyForNavigationAction):
3650         (WebKit::PagePolicyClientEfl::decidePolicyForNewWindowAction):
3651         * UIProcess/efl/PageUIClientEfl.cpp:
3652         (WebKit::PageUIClientEfl::runOpenPanel):
3653         * UIProcess/efl/RequestManagerClientEfl.cpp:
3654         (WebKit::EwkUrlSchemeHandler::EwkUrlSchemeHandler):
3655         (WebKit::RequestManagerClientEfl::didReceiveURIRequest):
3656         (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
3657         * UIProcess/efl/RequestManagerClientEfl.h:
3658         (RequestManagerClientEfl):
3659         * UIProcess/efl/ResourceLoadClientEfl.cpp:
3660         (WebKit::ResourceLoadClientEfl::didInitiateLoadForResource):
3661         (WebKit::ResourceLoadClientEfl::didSendRequestForResource):
3662         (WebKit::ResourceLoadClientEfl::didReceiveResponseForResource):
3663         (WebKit::ResourceLoadClientEfl::didFinishLoadForResource):
3664         (WebKit::ResourceLoadClientEfl::didFailLoadForResource):
3665         * UIProcess/efl/ResourceLoadClientEfl.h:
3666         (ResourceLoadClientEfl):
3667
3668 2012-11-21  Jaehun Lim  <ljaehun.lim@samsung.com>
3669
3670         [EFL][WK2] Remove #include "ewk_view_private.h" in PageViewportControllerClientEfl.cpp
3671         https://bugs.webkit.org/show_bug.cgi?id=102773
3672
3673         Reviewed by Gyuyoung Kim.
3674
3675         PageViewportControllerClientEfl.cpp doesn't need to include ewk_view_private.h.
3676
3677         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3678
3679 2012-11-21  Huang Dongsung  <luxtella@company100.net>
3680
3681         Coordinated Graphics: refactor changing children code in CoordinatedGraphicsLayer.
3682         https://bugs.webkit.org/show_bug.cgi?id=102896
3683
3684         Reviewed by Noam Rosenthal.
3685
3686         When changing children, we don't need to sync a layer state because
3687         there is no more need to send the parent ID every time the layer tree
3688         hierarchy changes. So this patch removes didChangeLayerState() in
3689         methods which change children.
3690
3691         In addition, purgeBackingStores() does not need to call didChangeChildren()
3692         because purgeBackingStores() does not change children.
3693
3694         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3695         (WebCore::CoordinatedGraphicsLayer::setChildren):
3696         (WebCore::CoordinatedGraphicsLayer::addChild):
3697         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
3698         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
3699         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
3700         (WebCore::CoordinatedGraphicsLayer::replaceChild):
3701         (WebCore::CoordinatedGraphicsLayer::removeFromParent):
3702         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
3703
3704 2012-11-21  Huang Dongsung  <luxtella@company100.net>
3705
3706         REGRESSION(r135212): Fix crash due to an infinite rect.
3707         https://bugs.webkit.org/show_bug.cgi?id=102891
3708
3709         Reviewed by Noam Rosenthal.
3710
3711         When CoordinatedGraphicsLayer has a 3D transform, tiledBackingStoreVisibleRect()
3712         can calculate an infinite rect. However, TiledBackingStore cannot handle the
3713         infinite rect. This patch clamps the infinite rect to avoid crash in
3714         TiledBackingStore.
3715
3716         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3717         (WebCore::clampToContentsRectIfRectIsInfinite):
3718         (WebCore):
3719         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
3720
3721 2012-11-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3722
3723         Disambiguate innerNodeFramePoint and mainFramePoint
3724         https://bugs.webkit.org/show_bug.cgi?id=98139
3725
3726         Reviewed by Julien Chaffraix.
3727
3728         Switch to using HitTestResult::innerNodeFrame and HitTestResult::innerNodeFramePoint.
3729
3730         * WebProcess/WebPage/WebContextMenu.cpp:
3731         (WebKit::WebContextMenu::show):
3732         * WebProcess/WebPage/mac/WebPageMac.mm:
3733         (WebKit::WebPage::characterIndexForPoint):
3734
3735 2012-11-21  Simon Hausmann  <simon.hausmann@digia.com>
3736
3737         Unreviewed Qt/Windows build fix.
3738         https://bugs.webkit.org/show_bug.cgi?id=102787
3739
3740         Remove inclusion of QtQml, which drags in QtNetwork, which drags in qnetworksession.h, which
3741         defines a member function called "interface". Since windows headers also define a pre-processor
3742         macro called "interface", it has to do that. However we have now a dependency between combaseapi.h,
3743         which #defines interface and is included earlier (before qnetworksession.h) and shlwapi.h, which _needs_
3744         the interface macro and is included afterwards. Since this module-wide QtQml inclusion is unnecessary
3745         and just slows down the build, this patch removes it.
3746
3747         * UIProcess/API/qt/qwebkittest_p.h:
3748
3749 2012-11-21  Huang Dongsung  <luxtella@company100.net>
3750
3751         Coordinated Graphics: refactor LayerTreeRenderer::syncRemoteContent().
3752         https://bugs.webkit.org/show_bug.cgi?id=102900
3753
3754         Reviewed by Noam Rosenthal.
3755
3756         Currently, QQuickWebPage::updatePaintNode() calls
3757         LayerTreeRenderer::syncRemoteContent() with locking the main thread.
3758         syncRemoteContent() is heavy, so we should not call syncRemoteContent() in
3759         updatePaintNode(). Calling syncRemoteContent() in the painting thread is
3760         thread-safe because syncRemoteContent() does not access any data
3761         structures, which the main thread use.
3762
3763         After this patch, syncRemoteContent() is used only internally, so
3764         syncRemoteContent() becomes private.
3765
3766         * UIProcess/API/efl/EwkViewImpl.cpp:
3767         (EwkViewImpl::displayTimerFired):
3768         * UIProcess/API/qt/qquickwebpage.cpp:
3769         (QQuickWebPage::updatePaintNode):
3770         * UIProcess/API/qt/raw/qrawwebview.cpp:
3771         (QRawWebView::paint):
3772         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3773         (WebKit::LayerTreeRenderer::paintToCurrentGLContext):
3774         (WebKit::LayerTreeRenderer::ensureRootLayer):
3775         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
3776         (LayerTreeRenderer):
3777
3778 2012-11-21  Andras Becsi  <andras.becsi@digia.com>
3779
3780         [WK2] Viewport meta tag broken after r134801
3781         https://bugs.webkit.org/show_bug.cgi?id=102801
3782
3783         Reviewed by Kenneth Rohde Christiansen.
3784
3785         If the initial-scale attribute is not explicitly specified it is left -1 by the
3786         viewport meta algorithm and if the content is not scalable the min and max scales
3787         are restricted by restrictScaleFactorToInitialScaleIfNotUserScalable() which resulted
3788         in negative scales on the UI side.
3789         Make sure that the minimum scale to fit the viewport is calculated before restricting
3790         the scales and use this scale as the initial scale if no explicit initial scale was set.
3791
3792         * UIProcess/PageViewportController.cpp:
3793         (WebKit::PageViewportController::PageViewportController):
3794         (WebKit::PageViewportController::pageTransitionViewportReady):
3795         (WebKit::PageViewportController::didChangeViewportAttributes):
3796         (WebKit::PageViewportController::updateMinimumScaleToFit):
3797
3798 2012-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3799
3800         [EFL][WK2] Support Context Menu
3801         https://bugs.webkit.org/show_bug.cgi?id=96200
3802
3803         Reviewed by Laszlo Gombos.
3804
3805         This patch supports WK2 EFL's context menu as WK1 implementation because we can't use elementary in inside WebKit.
3806         Only basic functionalities of context menu are supported. Beside this implementation follows GTK's implementation.
3807         For example, ewk_context_menu_new, ewk_context_menu_item_append, ewk_context_menu_item_remove are supported.
3808
3809         In addition, ewk_defines.h file is added in order to support cross inclusion as GTK port.
3810
3811         * PlatformEfl.cmake:
3812         * UIProcess/API/efl/EWebKit2.h:
3813         * UIProcess/API/efl/EwkViewImpl.cpp:
3814         (EwkViewImpl::EwkViewImpl):
3815         (EwkViewImpl::showContextMenu):
3816         (EwkViewImpl::hideContextMenu):
3817         * UIProcess/API/efl/EwkViewImpl.h:
3818         (WebKit):
3819         (EwkViewImpl):
3820         * UIProcess/API/efl/ewk_context_menu.cpp: Added.
3821         (EwkContextMenu::EwkContextMenu):
3822         (EwkContextMenu::~EwkContextMenu):
3823         (EwkContextMenu::hide):
3824         (Ewk_Context_Menu::appendItem):
3825         (Ewk_Context_Menu::removeItem):
3826         (EwkContextMenu::contextMenuItemSelected):
3827         (ewk_context_menu_new):
3828         (ewk_context_menu_new_with_items):
3829         (ewk_context_menu_item_append):
3830         (ewk_context_menu_item_remove):
3831         (ewk_context_menu_hide):
3832         (ewk_context_menu_items_get):
3833         (ewk_context_menu_item_select):
3834         * UIProcess/API/efl/ewk_context_menu.h: Added.
3835         * UIProcess/API/efl/ewk_context_menu_item.cpp: Added.
3836         (EwkContextMenuItem::EwkContextMenuItem):
3837         (ewk_context_menu_item_new):
3838         (ewk_context_menu_item_new_with_submenu):
3839         (ewk_context_menu_item_type_get):
3840         (ewk_context_menu_item_type_set):
3841         (ewk_context_menu_item_action_get):
3842         (ewk_context_menu_item_action_set):
3843         (ewk_context_menu_item_title_get):
3844         (ewk_context_menu_item_title_set):
3845         (ewk_context_menu_item_checked_get):
3846         (ewk_context_menu_item_checked_set):
3847         (ewk_context_menu_item_enabled_get):
3848         (ewk_context_menu_item_enabled_set):
3849         * UIProcess/API/efl/ewk_context_menu_item.h: Added.
3850         * UIProcess/API/efl/ewk_context_menu_item_private.h: Added.
3851         (EwkContextMenuItem):
3852         (EwkContextMenuItem::create):
3853         (EwkContextMenuItem::action):
3854         (EwkContextMenuItem::setAction):
3855         (EwkContextMenuItem::title):
3856         (EwkContextMenuItem::setTitle):
3857         (EwkContextMenuItem::type):
3858         (EwkContextMenuItem::setType):
3859         (EwkContextMenuItem::checked):
3860         (EwkContextMenuItem::setChecked):
3861         (EwkContextMenuItem::enabled):
3862         (EwkContextMenuItem::setEnabled):
3863         * UIProcess/API/efl/ewk_context_menu_private.h: Added.
3864         (WebKit):
3865         (EwkContextMenu):
3866         (EwkContextMenu::create):
3867         (EwkContextMenu::items):
3868         * UIProcess/API/efl/ewk_defines.h: Added.
3869         * UIProcess/API/efl/ewk_view.h:
3870         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Added.
3871         (checkBasicContextMenuItem):
3872         (showContextMenu):
3873         (TEST_F):
3874         * UIProcess/efl/ContextMenuClientEfl.cpp: Added.
3875         (toContextClientEfl):
3876         (ContextMenuClientEfl::ContextMenuClientEfl):
3877         (ContextMenuClientEfl::getContextMenuFromProposedMenu):
3878         * UIProcess/efl/ContextMenuClientEfl.h: Added.
3879         (WebKit):
3880         (ContextMenuClientEfl):
3881         (WebKit::ContextMenuClientEfl::create):
3882         * UIProcess/efl/PageClientBase.cpp:
3883         (WebKit::PageClientBase::createContextMenuProxy):
3884         * UIProcess/efl/WebContextMenuProxyEfl.cpp: Added.
3885         (WebKit):
3886         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
3887         (WebKit::WebContextMenuProxyEfl::~WebContextMenuProxyEfl):
3888         (WebKit::WebContextMenuProxyEfl::showContextMenu):
3889         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
3890         (WebKit::WebContextMenuProxyEfl::contextMenuItemSelected):
3891         * UIProcess/efl/WebContextMenuProxyEfl.h: Added.
3892         (WebKit):
3893         (WebContextMenuProxyEfl):
3894         (WebKit::WebContextMenuProxyEfl::create):
3895
3896 2012-11-21  Jongseok Yang  <js45.yang@samsung.com>
3897
3898         [EFL][WK2] Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX
3899         https://bugs.webkit.org/show_bug.cgi?id=102867
3900
3901         Reviewed by Gyuyoung Kim.
3902
3903         Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX.
3904
3905         ewk_view_setting_encoding_custom_XXX APIs might be misunderstanded as the "setting" word
3906         because ewk_view_setting_encoding_custom_set triggers the "reload" operation.
3907         And ewk_view_setting_XXX is not correct because there is ewk_settings object for settings.
3908
3909         * UIProcess/API/efl/ewk_view.cpp:
3910         (ewk_view_encoding_custom_get):
3911         (ewk_view_encoding_custom_set):
3912         * UIProcess/API/efl/ewk_view.h:
3913         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3914         (TEST_F):
3915
3916 2012-11-20  Jinwoo Song  <jinwoo7.song@samsung.com>
3917
3918         [EFL][WK2] Remove unnecessary #include in API test
3919         https://bugs.webkit.org/show_bug.cgi?id=102674
3920
3921         Reviewed by Laszlo Gombos.
3922
3923         Removed duplicated header files from the API test cases.
3924         Now, EWK2UnitTestBase.h includes the basic header files, 
3925         so test cases may only include this one and add the addtional
3926         header files if necessary.
3927
3928         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3929         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
3930         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp:
3931         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
3932         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
3933         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
3934         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3935         * UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp:
3936         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
3937         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
3938         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
3939         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
3940         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
3941         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
3942         * UIProcess/API/efl/tests/test_ewk2_intents.cpp:
3943         * UIProcess/API/efl/tests/test_ewk2_object.cpp:
3944         * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp:
3945         * UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp:
3946         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
3947         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
3948         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
3949         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3950
3951 2012-11-19  Sam Weinig  <sam@webkit.org>
3952
3953         Simplify WebConnection by removing its underlying CoreIPC::Connection
3954         https://bugs.webkit.org/show_bug.cgi?id=102771
3955
3956         Reviewed by Anders Carlsson.
3957
3958         Instead of having WebConnection subclasses own the CoreIPC::Connection,
3959         move back to having the WebProcess and WebProcessProxy own it (and be
3960         its Connection::Client) and use the new MessageReceiver class to vend
3961         messages to the WebConnection.
3962
3963         * Shared/WebConnection.cpp:
3964         (WebKit::WebConnection::WebConnection):
3965         (WebKit::WebConnection::postMessage):
3966         (WebKit::WebConnection::didClose):
3967         (WebKit::WebConnection::didReceiveMessage):
3968         * Shared/WebConnection.h:
3969         Make WebConnection both a MessageReceiver and MessageSender
3970         and add virtual functions for derived classes to fill in.
3971
3972         * UIProcess/WebConnectionToWebProcess.cpp:
3973         (WebKit::WebConnectionToWebProcess::create):
3974         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
3975         (WebKit::WebConnectionToWebProcess::invalidate):
3976         (WebKit::WebConnectionToWebProcess::decodeMessageBody):
3977         (WebKit::WebConnectionToWebProcess::connection):
3978         (WebKit::WebConnectionToWebProcess::destinationID):
3979         (WebKit::WebConnectionToWebProcess::hasValidConnection):
3980         * UIProcess/WebConnectionToWebProcess.h:
3981         * UIProcess/WebProcessProxy.cpp:
3982         (WebKit::WebProcessProxy::~WebProcessProxy):
3983         (WebKit::WebProcessProxy::fromConnection):
3984         (WebKit::WebProcessProxy::disconnect):
3985         (WebKit::WebProcessProxy::addMessageReceiver):
3986         (WebKit::WebProcessProxy::didClose):
3987         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
3988         (WebKit::WebProcessProxy::didFinishLaunching):
3989         * UIProcess/WebProcessProxy.h:
3990         (WebKit::WebProcessProxy::connection):
3991         (WebProcessProxy):
3992         (WebKit::WebProcessProxy::webConnection):
3993         * WebProcess/WebConnectionToUIProcess.cpp:
3994         (WebKit::WebConnectionToUIProcess::create):
3995         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
3996         (WebKit):
3997         (WebKit::WebConnectionToUIProcess::invalidate):
3998         (WebKit::WebConnectionToUIProcess::connection):
3999         (WebKit::WebConnectionToUIProcess::destinationID):
4000         (WebKit::WebConnectionToUIProcess::hasValidConnection):
4001         * WebProcess/WebConnectionToUIProcess.h:
4002         (WebConnectionToUIProcess):
4003         * WebProcess/WebProcess.cpp:
4004         (WebKit::WebProcess::initialize):
4005         (WebKit::WebProcess::terminate):
4006         * WebProcess/WebProcess.h:
4007         (WebKit::WebProcess::connection):
4008         (WebKit::WebProcess::webConnectionToUIProcess):
4009         Move the CoreIPC::Connection back to the processes.
4010
4011 2012-11-20  Jinwoo Song  <jinwoo7.song@samsung.com>
4012
4013         [EFL][WK2] Add Ewk_Window_Features API and related UI callbacks
4014         https://bugs.webkit.org/show_bug.cgi?id=99114
4015
4016         Reviewed by Gyuyoung Kim.
4017
4018         Added Ewk_Window_Features API so that we can create new windows
4019         with various window features such as location, size, toolbar, menubar,
4020         statusbar, locationbar, scrollbar, resizable, and fullscreen.
4021
4022         UI client callbacks related to window features also implemented
4023         so that it is possible to retrieve the window object property values.
4024
4025         * PlatformEfl.cmake:
4026         * UIProcess/API/efl/EWebKit2.h:
4027         * UIProcess/API/efl/EwkViewCallbacks.h:
4028         (EwkViewCallbacks):
4029         * UIProcess/API/efl/EwkViewImpl.cpp:
4030         (EwkViewImpl::windowFeatures):
4031         (EwkViewImpl::createNewPage):
4032         (EwkViewImpl::closePage):
4033         * UIProcess/API/efl/EwkViewImpl.h:
4034         (EwkViewImpl):
4035         * UIProcess/API/efl/ewk_view.h:
4036         * UIProcess/efl/PageUIClientEfl.cpp:
4037         (WebKit::PageUIClientEfl::createNewPage):
4038         (WebKit::PageUIClientEfl::toolbarsAreVisible):
4039         (WebKit):
4040         (WebKit::PageUIClientEfl::setToolbarsAreVisible):
4041         (WebKit::PageUIClientEfl::menuBarIsVisible):
4042         (WebKit::PageUIClientEfl::setMenuBarIsVisible):
4043         (WebKit::PageUIClientEfl::statusBarIsVisible):
4044         (WebKit::PageUIClientEfl::setStatusBarIsVisible):
4045         (WebKit::PageUIClientEfl::isResizable):