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