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