2011-04-01 Sam Weinig <sam@webkit.org>
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-04-01  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Adam Roben.
4
5         Add adoptWK to WKRetainPtr.h
6         https://bugs.webkit.org/show_bug.cgi?id=57670
7
8         * UIProcess/API/cpp/WKRetainPtr.h:
9         (WebKit::adoptWK):
10         Add shared implementation of adoptWK. Previously both WebKitTestRunner
11         and TestWebKitAPI had separate versions of it.
12
13 2011-04-01  Anders Carlsson  <andersca@apple.com>
14
15         Reviewed by Sam Weinig.
16
17         Shockwave plug-in doesn't accept mouse events
18         https://bugs.webkit.org/show_bug.cgi?id=57653
19         <rdar://problem/8483273>
20
21         Add a missing break.
22
23         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
24         (WebKit::NetscapePlugin::convertPoint):
25
26 2011-04-01  Sam Weinig  <sam@webkit.org>
27
28         Reviewed by Anders Carlsson.
29
30         WebKitTestRunner needs layoutTestController.shadowRoot
31         https://bugs.webkit.org/show_bug.cgi?id=57661
32
33         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
34         (WKBundleNodeHandleGetRenderRect):
35         (WKBundleNodeHandleGetElementBounds):
36         (WKBundleNodeHandleCopyElementShadowRoot):
37         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
38         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
39         (WebKit::InjectedBundleNodeHandle::elementShadowRoot):
40         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
41         Add accessor for the shadowRoot of an element in the bundle.
42
43 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
44
45         Reviewed by Darin Adler.
46
47         Make WebKit2 text input handling more like WebKit1
48         https://bugs.webkit.org/show_bug.cgi?id=57649
49
50         We now send more sync messages from UI process to Web process for NSTextInput protocol
51         methods. Some of the exchanges are avoided by pre-calculating the responses before asking
52         UI process to interpret key events, and also with each sync message sent during
53         interpretation, and which could change the state.
54
55         * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a missing
56         specialization for a function with 6 arguments and 2 returned values.
57
58         * Scripts/webkit2/messages.py: Added TextInputState to struct list.
59
60         * Shared/WebCoreArgumentCoders.h: Fixed a bug in CompositionUnderline encoding, which only
61         encoded a part of Color field, and didn't match decoder.
62
63         * Shared/mac/TextInputState.h: Added. This is state that's needed for IM machinery and that
64         we don't want to send sync messages for. This is similar to SelectionState, but the latter
65         is only updated asynchronously, and is thus less reliable.
66
67         * UIProcess/API/mac/PageClientImpl.h: We don't "intercept", we "interpret".
68
69         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::interpretKeyEvent): Pass
70         current text input state, and don't expect anything input method related in return, as input
71         methods are now sync.
72
73         * UIProcess/API/mac/WKView.mm:
74         (-[WKView doCommandBySelector:]):
75         (-[WKView insertText:]):
76         (-[WKView keyDown:]):
77         (-[WKView _executeSavedKeypressCommands]):
78         (-[WKView inputContext]):
79         (-[WKView selectedRange]):
80         (-[WKView hasMarkedText]):
81         (-[WKView unmarkText]):
82         (-[WKView setMarkedText:selectedRange:]):
83         (-[WKView markedRange]):
84         (-[WKView attributedSubstringFromRange:]):
85         (-[WKView characterIndexForPoint:]):
86         (-[WKView firstRectForCharacterRange:]):
87         (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
88         * UIProcess/API/mac/WKViewInternal.h:
89         * UIProcess/PageClient.h:
90         * UIProcess/WebPageProxy.h:
91         * UIProcess/WebPageProxy.messages.in:
92         * UIProcess/mac/WebPageProxyMac.mm:
93         (WebKit::WebPageProxy::setComposition):
94         (WebKit::WebPageProxy::confirmComposition):
95         (WebKit::WebPageProxy::insertText):
96         (WebKit::WebPageProxy::getSelectedRange):
97         (WebKit::WebPageProxy::executeKeypressCommands):
98         (WebKit::WebPageProxy::interpretQueuedKeyEvent):
99         * WebKit2.xcodeproj/project.pbxproj:
100         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
101         (WebKit::WebEditorClient::handleKeyboardEvent):
102         (WebKit::WebEditorClient::handleInputMethodKeydown):
103         * WebProcess/WebPage/WebPage.cpp:
104         (WebKit::WebPage::WebPage):
105         * WebProcess/WebPage/WebPage.h:
106         (WebKit::WebPage::viewFrameInWindowCoordinates):
107         * WebProcess/WebPage/WebPage.messages.in:
108         * WebProcess/WebPage/mac/WebPageMac.mm:
109         (WebKit::createSelectorExceptionMap):
110         (WebKit::commandNameForSelectorName):
111         (WebKit::currentTextInputState):
112         (WebKit::frameForEvent):
113         (WebKit::WebPage::executeKeypressCommandsInternal):
114         (WebKit::WebPage::handleEditingKeyboardEvent):
115         (WebKit::WebPage::setComposition):
116         (WebKit::WebPage::confirmComposition):
117         (WebKit::WebPage::insertText):
118         (WebKit::WebPage::getSelectedRange):
119         (WebKit::convertToRange):
120         (WebKit::WebPage::executeKeypressCommands):
121         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
122         Rewrote to be more like WebKit1.
123
124 2011-04-01  Chang Shu  <cshu@webkit.org>
125
126         Reviewed by Darin Adler.
127
128         WebKitTestRunner needs layoutTestController.setDatabaseQuota
129         https://bugs.webkit.org/show_bug.cgi?id=57568
130
131         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
132         (WKBundleSetDatabaseQuota):
133         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
134         * WebProcess/InjectedBundle/InjectedBundle.cpp:
135         (WebKit::InjectedBundle::setDatabaseQuota):
136         * WebProcess/InjectedBundle/InjectedBundle.h:
137         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
138
139 2011-04-01  Timothy Hatcher  <timothy@apple.com>
140
141         Make momentum scroll event latching work in WebKit2 on Mac.
142
143         <rdar://problem/8751861>
144
145         Reviewed by Darin Adler.
146
147         * Shared/mac/WebEventFactory.mm:
148         (WebKit::momentumPhaseForEvent): Return a phase on older Mac system by using WKGetNSEventMomentumPhase.
149         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
150         (InitWebCoreSystemInterface): Remove IsLatchingWheelEvent, add GetNSEventMomentumPhase.
151
152 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
153
154         Reviewed by Anders Carlsson.
155
156         Assertion failure (type == event.type()) after a web process crash
157         https://bugs.webkit.org/show_bug.cgi?id=56228
158         <rdar://problem/8806106>
159
160         This partially un-confuses the UI process about key processing state after a web process
161         crash. It may not be pefect yet - sending a KeyUp to a new process that never saw a KeyDown
162         seems weird.
163
164         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash):
165
166 2011-04-01  Adam Roben  <aroben@apple.com>
167
168         Cairo build fix
169
170         * WebProcess/WebPage/LayerTreeHost.cpp: Only pull in the LayerTreeHostCA derived classes for
171         PLATFORM(CA) ports.
172
173 2011-03-31  Adam Roben  <aroben@apple.com>
174
175         Split LayerTreeHostCA into a base class and derived Mac and Win classes
176
177         This will make it easier to customize the Mac and Windows implementations without adding too
178         many #ifdefs.
179
180         Fixes <http://webkit.org/b/57606> Windows and Mac should use separate LayerTreeHost classes
181
182         Reviewed by Anders Carlsson.
183
184         * WebKit2.xcodeproj/project.pbxproj: Added LayerTreeHostCAMac.h.
185
186         * WebProcess/WebPage/LayerTreeHost.cpp:
187         (WebKit::LayerTreeHost::create): Create a LayerTreeHostCAMac on Mac, and LayerTreeHostCAWin
188         on Windows.
189
190         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
191         (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some code from here...
192         (WebKit::LayerTreeHostCA::initialize): ...to here. This function will be called after the
193         constructor returns, and thus can safely call functions that are pure virtual in this class
194         and its base class. We now pass our LayerTreeContext to platformInitialize so that our
195         derived classes can initialize it.
196         (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Removed Mac-specific code.
197
198         (WebKit::LayerTreeHostCA::invalidate):
199         (WebKit::LayerTreeHostCA::sizeDidChange):
200         (WebKit::LayerTreeHostCA::forceRepaint):
201         (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush):
202         Removed platform* calls. Derived classes can just override these functions to do what they
203         need.
204
205         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed Mac-specific pieces. Made some functions
206         virtual so that derived classes can override them.
207
208         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Added.
209
210         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
211         (WebKit::LayerTreeHostCAMac::create): Create and initialize a host.
212         (WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Simple constructor.
213         (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac): Moved code here from LayerTreeHostCA
214         destructor.
215         (WebKit::LayerTreeHostCAMac::platformInitialize): Removed direct uses of LayerTreeHostCA
216         data members.
217
218         (WebKit::LayerTreeHostCAMac::invalidate):
219         (WebKit::LayerTreeHostCAMac::sizeDidChange):
220         (WebKit::LayerTreeHostCAMac::forceRepaint):
221         (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
222         Renamed from platform*. Now call up to the base class.
223
224         (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Updated type.
225
226         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
227         (WebKit::LayerTreeHostCAWin::create): Create and initialize a host.
228
229         (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin):
230         (WebKit::LayerTreeHostCAWin::~LayerTreeHostCAWin):
231         (WebKit::LayerTreeHostCAWin::platformInitialize):
232         (WebKit::LayerTreeHostCAWin::scheduleLayerFlush):
233         Stubbed out.
234
235         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added.
236
237         * win/WebKit2.vcproj: Added LayerTreeHostCAWin.h
238
239         * win/WebKit2Apple.vsprops: Added WebProcess/WebPage/ca/win to the include path.
240
241 2011-03-31  Brent Fulgham  <bfulgham@webkit.org>
242
243         Unreviewed WinCairo build fix after r82632.
244
245         * UIProcess/DrawingAreaProxyImpl.cpp:
246         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
247
248 2011-03-31  Adam Roben  <aroben@apple.com>
249
250         Add SharedMemory::adopt, which can take ownership of an existing file mapping object
251
252         Fixes <http://webkit.org/b/57599> Need a way to wrap an existing file mapping object in a
253         SharedMemory
254
255         Reviewed by Anders Carlsson.
256
257         * Platform/SharedMemory.h: Added adopt.
258
259         * Platform/win/SharedMemoryWin.cpp:
260         (WebKit::SharedMemory::create): Moved code to adopt the HANDLE from here...
261         (WebKit::SharedMemory::adopt): ...to here.
262
263 2011-03-31  Chang Shu  <cshu@webkit.org>
264
265         Reviewed by Darin Adler.
266
267         WebKitTestRunner needs layoutTestController.clearAllDatabases
268         https://bugs.webkit.org/show_bug.cgi?id=42540
269
270         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
271         (WKBundleClearAllDatabases):
272         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
273         * WebProcess/InjectedBundle/InjectedBundle.cpp:
274         (WebKit::InjectedBundle::clearAllDatabases):
275         * WebProcess/InjectedBundle/InjectedBundle.h:
276         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
277
278 2011-03-31  Anders Carlsson  <andersca@apple.com>
279
280         Reviewed by Sam Weinig.
281
282         Add some more media related things to the sandbox profile.
283
284         * WebProcess/com.apple.WebProcess.sb:
285
286 2011-03-31  Anders Carlsson  <andersca@apple.com>
287
288         Reviewed by Dan Bernstein.
289
290         Tabbed pages redraw unnecessarily when activated
291         https://bugs.webkit.org/show_bug.cgi?id=57589
292         <rdar://problem/9218258>
293
294         * UIProcess/DrawingAreaProxyImpl.cpp:
295         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
296         If we become visible and have no backing store, make sure to call backingStoreStateDidChange
297         so that the next time we're asked to paint we'll wait for something to paint.
298
299         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
300         Remove now redundant call to backingStoreStateDidChange.
301
302 2011-03-31  Sam Weinig  <sam@webkit.org>
303
304         Reviewed by Anders Carlsson.
305
306         Sandbox violations when playing back HTML5 video on YouTube
307         <rdar://problem/8950692>
308
309         * WebProcess/com.apple.WebProcess.sb:
310
311 2011-03-31  Darin Adler  <darin@apple.com>
312
313         Reviewed by Sam Weinig.
314
315         Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
316         https://bugs.webkit.org/show_bug.cgi?id=57573
317
318         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
319         (WKBundlePageSimulateMouseDown): Added.
320         (WKBundlePageSimulateMouseUp): Added.
321         (WKBundlePageSimulateMouseMotion): Added.
322         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added above functions.
323         * WebProcess/WebPage/WebPage.cpp:
324         (WebKit::WebPage::simulateMouseDown): Added.
325         (WebKit::WebPage::simulateMouseUp): Added.
326         (WebKit::WebPage::simulateMouseMotion): Added.
327         * WebProcess/WebPage/WebPage.h: Added above functions.
328
329 2011-03-31  Sam Weinig  <sam@webkit.org>
330
331         Reviewed by Anders Carlsson.
332
333         Rename WebCore's UI_STRING to WEB_UI_STRING to not overlap with WebKit API
334         https://bugs.webkit.org/show_bug.cgi?id=57582
335
336         * PluginProcess/mac/PluginProcessMac.mm:
337         (WebKit::PluginProcess::platformInitialize):
338         * UIProcess/mac/WebInspectorProxyMac.mm:
339         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
340         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
341         * WebProcess/mac/WebProcessMac.mm:
342         (WebKit::WebProcess::platformInitializeWebProcess):
343
344 2011-03-31  Adam Roben  <aroben@apple.com>
345
346         Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object
347
348         When passed to ::MapViewOfFile, FILE_MAP_WRITE implies FILE_MAP_READ, but other file mapping
349         APIs don't work that way. This bug wasn't causing any problems in practice, but it would
350         have prevented us from creating a DIB that wraps a SharedMemory object (which I noticed
351         while working on another bug).
352
353         Fixes <http://webkit.org/b/57576> File mappings used by read-write SharedMemory objects
354         aren't correctly marked as read-write after being sent over a CoreIPC::Connection
355
356         Reviewed by Brian Weinstein.
357
358         * Platform/win/SharedMemoryWin.cpp:
359         (WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
360         SharedMemory.
361
362 2011-03-31  Adam Roben  <aroben@apple.com>
363
364         Quote the executable path we pass to ::CreateProcessW
365
366         This will ensure that spaces in the path will be interpreted correctly.
367
368         Fixes <http://webkit.org/b/57569> Web process sometimes fails to launch when there are
369         spaces in its path
370
371         Reviewed by Steve Falkenburg.
372
373         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
374         (WebKit::ProcessLauncher::launchProcess): Surround the executable path in quotes.
375
376 2011-03-31  Alexey Proskuryakov  <ap@apple.com>
377
378         Patch by John Harvey, reviewed and tweaked by me.
379
380         <rdar://problem/8644403> Should notify TSM that plug-ins would show a bottom input window for marked text.
381
382         * UIProcess/API/mac/WKTextInputWindowController.mm:
383         (-[WKTextInputPanel _interpretKeyEvent:string:]):
384
385 2011-03-31  Anders Carlsson  <andersca@apple.com>
386
387         Reviewed by John Sullivan, Darin Adler, Dan Bernstein and Sam Weinig.
388
389         If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
390         https://bugs.webkit.org/show_bug.cgi?id=57561
391         <rdar://problem/9127411>
392
393         Ensure that any readwrite sandbox directories actually exist before entering the sandbox.
394
395         * WebProcess/mac/WebProcessMac.mm:
396         (WebKit::appendReadwriteSandboxDirectory):
397
398 2011-03-31  John Sullivan  <sullivan@apple.com>
399
400         Reviewed by Darin Adler and Adam Roben.
401
402         <rdar://problem/9214824> Find client not told when WKPageCountStringMatches exceeds maximum
403         https://bugs.webkit.org/show_bug.cgi?id=57552
404
405         * WebProcess/WebPage/FindController.cpp:
406         (WebKit::FindController::countStringMatches):
407         Use the same technique as findString() to report kWKMoreThanMaximumMatchCount when appropriate.
408         (WebKit::FindController::findString):
409         Convert numeric_limits::max() to max() - 1 to avoid overflow case.
410
411 2011-03-31  Evan Martin  <evan@chromium.org>
412
413         Reviewed by Eric Seidel.
414
415         <title> should support dir attribute
416         https://bugs.webkit.org/show_bug.cgi?id=50961
417
418         Update to new FrameLoaderClient interface.
419
420         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
421         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
422         (WebKit::WebFrameLoaderClient::setTitle):
423         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
424
425 2011-03-31  Balazs Kelemen  <kbalazs@webkit.org>
426
427         Reviewed by Csaba Osztrogonác.
428
429         [WK2] Introduce an option for no NPAPI support
430         https://bugs.webkit.org/show_bug.cgi?id=55828
431
432         Stub out NPAPI support for platform and OS combinations that are
433         not supported yet. Ancestor patch was made by Laszlo Gombos.
434
435         * GNUmakefile.am: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
436         to the build system.
437
438         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
439         Remove the sanity check because from now all combinations that
440         don't have an explicitly set plugin architecture fall into
441         the PLUGIN_ARCHITECTURE(UNSUPPORTED) category and has a stubbed
442         implementation.
443
444         * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: Added.
445         Stubbed implementation.
446         (WebKit::NetscapePluginModule::getPluginInfo):
447         (WebKit::NetscapePluginModule::determineQuirks):
448
449         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Guard with
450         PLUGIN_ARCHITECTURE(X11).
451
452         * WebKit2.pro: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
453         to the build system.
454
455         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: Added.
456         Stubbed implementation
457         (WebKit::NetscapePlugin::platformPostInitialize):
458         (WebKit::NetscapePlugin::platformDestroy):
459         (WebKit::NetscapePlugin::platformInvalidate):
460         (WebKit::NetscapePlugin::platformGeometryDidChange):
461         (WebKit::NetscapePlugin::platformPaint):
462         (WebKit::NetscapePlugin::platformHandleMouseEvent):
463         (WebKit::NetscapePlugin::platformHandleWheelEvent):
464         (WebKit::NetscapePlugin::platformSetFocus):
465         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
466         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
467         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
468
469         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Guard with
470         PLUGIN_ARCHITECTURE(X11)
471
472         * config.h: Introduce PLUGIN_ARCHITECTURE(UNSUPPORTED) as another
473         option. Make platform and OS combinations that are not supported
474         yet fall into this. Don't use Q_WS_X11 to test the window system
475         for Qt because it is not defined without including <QtGlobal>.
476         No clue about how could it work so far.
477
478 2011-03-31  Vamshikrishna.Yellenki  <vamshi@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
479
480         Reviewed by Martin Robinson.
481
482         Implement MiniBrowser for Gtk port.
483         https://bugs.webkit.org/show_bug.cgi?id=48512
484
485         * Shared/API/c/gtk/WKBaseGtk.h: Add the stdbool.h include.
486
487 2011-03-30  Dan Bernstein  <mitz@apple.com>
488
489         Reviewed by Maciej Stachowiak.
490
491         <rdar://problem/9005982> Flash of white when a WKView with composited content moves on-screen
492         https://bugs.webkit.org/show_bug.cgi?id=57522
493
494         * UIProcess/DrawingAreaProxyImpl.cpp:
495         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Invalidate the current
496         backing store state, so that we get an update as soon as the page enters compositing mode
497         next.
498         * WebProcess/WebPage/DrawingAreaImpl.cpp:
499         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Added a call to
500         LayerTreeHost::forceRepaint() in order to flush and synchronize the layers
501         before sending the update message to the UI process.
502
503 2011-03-30  Sam Weinig  <sam@webkit.org>
504
505         Reviewed by Anders Carlsson.
506
507         Sandbox violations if you navigate a file URL via something other than a click
508         <rdar://problem/9016086>
509         https://bugs.webkit.org/show_bug.cgi?id=57519
510
511         * WebProcess/WebPage/WebPage.cpp:
512         (WebKit::shouldReuseCommittedSandboxExtension):
513         Remove unnecessary restriction on extension reuse. Any type of file to file navigation
514         should be allowed.
515
516 2011-03-30  Anders Carlsson  <andersca@apple.com>
517
518         Reviewed by Sam Weinig.
519
520         Clean up the sandbox parameter code
521         https://bugs.webkit.org/show_bug.cgi?id=57518
522
523         * Shared/WebProcessCreationParameters.h:
524         Make nsURLCachePath and uiProcessBundleResourcePath Strings to match the other paths we send over.
525
526         * UIProcess/mac/WebContextMac.mm:
527         (WebKit::WebContext::platformInitializeWebProcess):
528         nsURLCachePath and uiProcessBundleResourcePath are now Strings.
529
530         * WebProcess/mac/WebProcessMac.mm:
531         (WebKit::appendSandboxParameterPathInternal):
532         (WebKit::appendReadwriteConfDirectory):
533         (WebKit::appendReadonlySandboxDirectory):
534         (WebKit::appendReadwriteSandboxDirectory):
535         (WebKit::initializeSandbox):
536         Make it more clear whether the directories we're adding are readonly or readwrite. No functionality change.
537         
538         (WebKit::WebProcess::platformInitializeWebProcess):
539         nsURLCachePath is now a string.
540
541 2011-03-30  Anders Carlsson  <andersca@apple.com>
542
543         Reviewed by Sam Weinig.
544
545         Downloading a file fails due to a sandbox violation if the destination path is a symlink
546         https://bugs.webkit.org/show_bug.cgi?id=57517
547         <rdar://problem/8943865>
548
549         Make sure to resolve any symlinks in the given path when creating a sandbox extension handle.
550         Note that we can't use realpath or -[NSString stringByResolvingSymlinksInPath], because those calls
551         will fail if the pointed to file doesn't exist.
552
553         * Shared/mac/SandboxExtensionMac.mm:
554         (WebKit::resolveSymlinksInPath):
555         New function that resolves all the symlinks in the given path.
556
557         (WebKit::SandboxExtension::createHandle):
558         Call resolveSymlinksInPath on the resulting path.
559
560 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
561
562         Reviewed by Adam Roben.
563
564         Share most vsprops between Release and Production builds in releaseproduction.vsprops
565         https://bugs.webkit.org/show_bug.cgi?id=57508
566
567         * win/WebKit2Production.vsprops:
568         * win/WebKit2Release.vsprops:
569         * win/WebKit2ReleaseCairoCFLite.vsprops:
570         * win/WebKit2WebProcessProduction.vsprops:
571         * win/WebKit2WebProcessRelease.vsprops:
572         * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
573
574 2011-03-30  Ivan Krstić  <ike@apple.com>
575
576         Reviewed by Oliver Hunt.
577
578         Ensure consistent, readable working directory for WebProcess before entering sandbox
579         <rdar://problem/8951176>
580
581         * WebProcess/mac/WebProcessMac.mm:
582         (WebKit::WebProcess::platformInitializeWebProcess):
583
584 2011-03-30  Sam Weinig  <sam@webkit.org>
585
586         Reviewed by Brady Eidson.
587
588         WebKit2: Attempting to view css file from url causes it to download
589         <rdar://problem/9102611>
590         https://bugs.webkit.org/show_bug.cgi?id=57501
591
592         * UIProcess/WebPageProxy.cpp:
593         (WebKit::WebPageProxy::canShowMIMEType):
594         Match WebKit1 by allowing any MIME type that starts with "text/"
595         except the ones we explicitly blacklist.
596
597 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
598
599         Reviewed by Adam Roben.
600
601         Update Windows production build logic for new production configurations
602         https://bugs.webkit.org/show_bug.cgi?id=57494
603
604         * win/WebKit2.make:
605         * win/WebKit2Production.vsprops:
606         * win/WebKit2WebProcessProduction.vsprops:
607
608 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
609
610         Reviewed by Adam Roben.
611
612         Rename Windows configuration Release_LTCG to Production for clarity
613         https://bugs.webkit.org/show_bug.cgi?id=57465
614
615         * win/WebKit2.submit.sln:
616         * win/WebKit2.vcproj:
617         * win/WebKit2Generated.vcproj:
618         * win/WebKit2Production.vsprops: Copied from Source/WebKit2/win/WebKit2ReleaseLTCG.vsprops.
619         * win/WebKit2ReleaseLTCG.vsprops: Removed.
620         * win/WebKit2WebProcess.vcproj:
621         * win/WebKit2WebProcessProduction.vsprops: Copied from Source/WebKit2/win/WebKit2WebProcessReleaseLTCG.vsprops.
622         * win/WebKit2WebProcessReleaseLTCG.vsprops: Removed.
623
624 2011-03-30  Jer Noble  <jer.noble@apple.com>
625
626         Reviewed by Dan Bernstein.
627
628         WebKit2: WebProcess is using 89%, while viewing a PDF
629         https://bugs.webkit.org/show_bug.cgi?id=57471
630
631         Break a never ending display/update cycle between the UIProcess and the WebProcess
632         by clearing the dirty region when a page has a custom representation (like a PDF).
633         Also, avoid the issue where possible by not setting the dirty region in the same case.
634
635         * WebProcess/WebPage/DrawingAreaImpl.cpp:
636         (WebKit::DrawingAreaImpl::setNeedsDisplay): Bail early if mainFrameHasCustomRepresentation().
637         (WebKit::DrawingAreaImpl::scroll): Ditto.
638         (WebKit::DrawingAreaImpl::display): Both bail early and clear m_dirtyRegion if 
639             mainFrameHasCustomRepresentation().
640
641 2011-03-30  Sam Weinig  <sam@webkit.org>
642
643         Fix Snow Leopard build.
644
645         * UIProcess/mac/WebContextMenuProxyMac.mm:
646         (WebKit::WebContextMenuProxyMac::showContextMenu):
647
648 2011-03-30  Sam Weinig  <sam@webkit.org>
649
650         Reviewed by Anders Carlsson.
651
652         WebKit2 contextual menu looks different than the rest of the OS
653         <rdar://problem/9172935>
654         https://bugs.webkit.org/show_bug.cgi?id=57475
655
656         * UIProcess/mac/WebContextMenuProxyMac.mm:
657         (WebKit::WebContextMenuProxyMac::showContextMenu):
658         Use correct SPI for showing a context menu. The dummy view is also
659         not necessary, so remove it.
660
661 2011-03-30  Anders Carlsson  <andersca@apple.com>
662
663         Reviewed by Sam Weinig.
664
665         Crash when NPN_Evaluate removes the plug-in frame
666         https://bugs.webkit.org/show_bug.cgi?id=57474
667         <rdar://problem/9191396>
668
669         Get a reference to the frame since it can be nulled out if running the JavaScript code
670         causes the plug-in's containing frame to be removed from the frame tree.
671
672         * WebProcess/Plugins/PluginView.cpp:
673         (WebKit::PluginView::evaluate):
674
675 2011-03-30  Sam Weinig  <sam@webkit.org>
676
677         Reviewed by Anders Carlsson.
678
679         Add default localization strategy that can be shared by WebKit1 and WebKit2
680         https://bugs.webkit.org/show_bug.cgi?id=57406
681
682         * Shared/WebLocalizableStrings.h: Removed.
683         Removed in favor of using WebCore/LocalizedStrings.h directly.
684
685         * PluginProcess/mac/PluginProcessMac.mm:
686         * UIProcess/API/mac/WKView.mm:
687         * UIProcess/mac/WebInspectorProxyMac.mm:
688         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
689         * WebProcess/mac/WebProcessMac.mm:
690         Use WebCore/LocalizedStrings.h directly.
691
692         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
693         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
694         Remove localization strategy override in favor of using new default implementation.
695
696         * GNUmakefile.am:
697         * WebKit2.pro:
698         * WebKit2.xcodeproj/project.pbxproj:
699         * win/WebKit2.vcproj:
700         Remove WebLocalizableStrings.h
701
702 2011-03-30  Anders Carlsson  <andersca@apple.com>
703
704         Reviewed by Adam Roben.
705
706         Assertion failure in plug-in process when calling WKPluginSiteDataManagerGetSitesWithData
707         https://bugs.webkit.org/show_bug.cgi?id=57468
708         <rdar://problem/9199089>
709
710         Call decrementLoadCount from removeWebProcessConnection instead of startShutdownTimerIfNecessary,
711         otherwise we'll get a load count underflow when a connection is never created.
712
713         * PluginProcess/PluginProcess.cpp:
714         (WebKit::PluginProcess::removeWebProcessConnection):
715         (WebKit::PluginProcess::createWebProcessConnection):
716         (WebKit::PluginProcess::startShutdownTimerIfNecessary):
717
718 2011-03-30  Jessie Berlin  <jberlin@apple.com>
719
720         Reviewed by Anders Carlsson.
721
722         WebKit2: Make sure to try to terminate the Web Process when any work that might require the
723         Web Process to be relaunched is done
724         https://bugs.webkit.org/show_bug.cgi?id=57462
725
726         For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are
727         no more callbacks waiting to be invoked.
728
729         For the the Managers in the WebProcess, call WebProcess::shared().terminateIfPossible() when
730         any work called for by a ManagerProxy function that called relaunchProcessIfNecessary is
731         finished.
732
733         * UIProcess/WebContext.cpp:
734         (WebKit::WebContext::shouldTerminate):
735         Check with each of the ManagerProxies.
736
737         * UIProcess/WebApplicationCacheManagerProxy.cpp:
738         (WebKit::WebApplicationCacheManagerProxy::shouldTerminate):
739         * UIProcess/WebApplicationCacheManagerProxy.h:
740         * UIProcess/WebCookieManagerProxy.cpp:
741         (WebKit::WebCookieManagerProxy::shouldTerminate):
742         * UIProcess/WebCookieManagerProxy.h:
743         * UIProcess/WebDatabaseManagerProxy.cpp:
744         (WebKit::WebDatabaseManagerProxy::shouldTerminate):
745         * UIProcess/WebDatabaseManagerProxy.h:
746         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
747         (WebKit::WebKeyValueStorageManagerProxy::shouldTerminate):
748         * UIProcess/WebKeyValueStorageManagerProxy.h:
749         * UIProcess/WebMediaCacheManagerProxy.cpp:
750         (WebKit::WebMediaCacheManagerProxy::shouldTerminate):
751         * UIProcess/WebMediaCacheManagerProxy.h:
752         * UIProcess/WebResourceCacheManagerProxy.cpp:
753         (WebKit::WebResourceCacheManagerProxy::shouldTerminate):
754         * UIProcess/WebResourceCacheManagerProxy.h:
755
756         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
757         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
758         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
759         (WebKit::WebApplicationCacheManager::deleteAllEntries):
760         * WebProcess/Cookies/WebCookieManager.cpp:
761         (WebKit::WebCookieManager::getHostnamesWithCookies):
762         (WebKit::WebCookieManager::deleteCookiesForHostname):
763         (WebKit::WebCookieManager::deleteAllCookies):
764         (WebKit::WebCookieManager::startObservingCookieChanges):
765         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
766         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
767         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
768         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
769         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
770         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
771         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
772         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
773         (WebKit::WebMediaCacheManager::clearCacheForHostname):
774         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
775         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
776         (WebKit::WebResourceCacheManager::getCacheOrigins):
777         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
778         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
779         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
780         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
781         (WebKit::WebDatabaseManager::getDatabaseOrigins):
782         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
783         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
784         (WebKit::WebDatabaseManager::deleteAllDatabases):
785         (WebKit::WebDatabaseManager::setQuotaForOrigin):
786
787 2011-03-30  Adam Roben  <aroben@apple.com>
788
789         Mac build fix after r82442
790
791         * WebProcess/Plugins/PluginProxy.cpp:
792         (WebKit::PluginProxy::geometryDidChange): Added a missing argument.
793
794 2011-03-29  Adam Roben  <aroben@apple.com>
795
796         Add a way to specify that a ShareableBitmap has no alpha channel
797
798         Before this patch, all ShareableBitmaps had an alpha channel. With this patch, all
799         ShareableBitmaps *still* have an alpha channel. But now there's a way to specify you don't
800         want one (which will be used in the future)!
801
802         Fixes <http://webkit.org/b/57388> Need a way to specify that a ShareableBitmap has no alpha
803         channel
804
805         Reviewed by Anders Carlsson.
806
807         * Shared/ShareableBitmap.cpp:
808         (WebKit::ShareableBitmap::Handle::Handle): Moved here from the header file, and added
809         initialization of m_flags.
810
811         (WebKit::ShareableBitmap::Handle::encode):
812         (WebKit::ShareableBitmap::Handle::decode):
813         Encode/decode m_flags.
814
815         (WebKit::ShareableBitmap::create):
816         (WebKit::ShareableBitmap::createShareable):
817         Pass along the new Flags argument.
818
819         (WebKit::ShareableBitmap::createHandle): Store our Flags on the Handle.
820         (WebKit::ShareableBitmap::ShareableBitmap): Store the Flags in m_flags.
821
822         * Shared/ShareableBitmap.h: Added Flag, Flags, and m_flags, and added a Flags argument to
823         some create functions.
824
825         * Shared/WebCoreArgumentCoders.cpp:
826         (CoreIPC::encodeImage):
827         * Shared/WebImage.cpp:
828         (WebKit::WebImage::create):
829         Specify that we want a bitmap that supports alpha to maintain current behavior.
830
831         * Shared/cg/ShareableBitmapCG.cpp:
832         (WebKit::bitmapInfo): New helper function. Includes an alpha channel only if specified in
833         the flags.
834
835         (WebKit::ShareableBitmap::createGraphicsContext):
836         (WebKit::ShareableBitmap::makeCGImage):
837         Use the new helper function.
838
839         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
840         (WebKit::NetscapePlugin::snapshot):
841         * WebProcess/Plugins/PluginProxy.cpp:
842         (WebKit::PluginProxy::geometryDidChange):
843         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
844         (WebKit::convertImageToBitmap):
845         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
846         (WebKit::WebPopupMenu::setUpPlatformData):
847         * WebProcess/WebPage/DrawingAreaImpl.cpp:
848         (WebKit::DrawingAreaImpl::display):
849         * WebProcess/WebPage/FindController.cpp:
850         (WebKit::FindController::updateFindIndicator):
851         Specify that we want a bitmap that supports alpha to maintain current behavior.
852
853 2011-03-29  Adam Roben  <aroben@apple.com>
854
855         Add ShareableBitmap::Handle
856
857         This object is used for encoding/decoding a ShareableBitmap via CoreIPC. It currently just
858         encapsulates a SharedMemory::Handle (which is what we were using previously) and the image's
859         size (which means callers no longer need to deal with the size explicitly), but in the
860         future could be used to store more information about the bitmap.
861
862         This should cause no behavior changes.
863
864         Fixes <http://webkit.org/b/57397> ShareableBitmap needs its own Handle type
865
866         Reviewed by Anders Carlsson.
867
868         * PluginProcess/PluginControllerProxy.cpp:
869         (WebKit::PluginControllerProxy::geometryDidChange): No longer need to pass a size to create,
870         since the Handle records the size.
871         (WebKit::PluginControllerProxy::snapshot): No longer need the bufferSize argument, since the
872         Handle records the size.
873
874         * PluginProcess/PluginControllerProxy.h:
875         * PluginProcess/PluginControllerProxy.messages.in:
876         Updated Handle types and removed unnecessary size argument to Snapshot.
877
878         * Shared/PlatformPopupMenuData.cpp:
879         (WebKit::PlatformPopupMenuData::encode):
880         (WebKit::PlatformPopupMenuData::decode):
881         * Shared/PlatformPopupMenuData.h:
882         Changed to use ShareableBitmap::Handle and removed m_backingStoreSize, which is now stored
883         in the Handles.
884
885         * Shared/ShareableBitmap.cpp:
886         (WebKit::ShareableBitmap::Handle::encode):
887         (WebKit::ShareableBitmap::Handle::decode):
888         Simple encode/decode functions.
889
890         (WebKit::ShareableBitmap::create): Get the size from the Handle instead of as a separate
891         argument.
892         (WebKit::ShareableBitmap::createHandle): Store our size in the Handle.
893
894         * Shared/ShareableBitmap.h: Added ShareableBitmap::Handle and made some functions use it.
895
896         * Shared/UpdateInfo.h: Changed to use ShareableBitmap::Handle.
897
898         * Shared/UserMessageCoders.h:
899         (WebKit::UserMessageEncoder::baseEncode):
900         (WebKit::UserMessageDecoder::baseDecode):
901         * Shared/WebCoreArgumentCoders.cpp:
902         (CoreIPC::encodeImage):
903         (CoreIPC::decodeImage):
904         Use the size stored in the Handle instead of encoding/decoding one separately.
905
906         * UIProcess/API/mac/PageClientImpl.h:
907         * UIProcess/API/mac/PageClientImpl.mm:
908         (WebKit::PageClientImpl::setDragImage):
909         Removed the unnecessary imageSize argument. We can get it from the image itself.
910
911         * UIProcess/BackingStore.cpp:
912         (WebKit::BackingStore::incorporateUpdate):
913         * UIProcess/FindIndicator.cpp:
914         (WebKit::FindIndicator::create):
915         No longer need to pass a size when creating a ShareableBitmap from a Handle.
916
917         * UIProcess/FindIndicator.h: Changed to use ShareableBitmap::Handle.
918
919         * UIProcess/PageClient.h: Removed unnecessary imageSize argument from setDragImage.
920
921         * UIProcess/WebPageProxy.cpp:
922         (WebKit::WebPageProxy::setFindIndicator):
923         * UIProcess/WebPageProxy.h:
924         * UIProcess/WebPageProxy.messages.in:
925         * UIProcess/mac/WebPageProxyMac.mm:
926         (WebKit::WebPageProxy::setDragImage):
927         * WebProcess/Plugins/PluginProxy.cpp:
928         (WebKit::PluginProxy::snapshot):
929         (WebKit::PluginProxy::geometryDidChange):
930         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
931         (WebKit::WebDragClient::startDrag):
932         Changed to use ShareableBitmap::Handle and removed now-unnecessary size arguments (since we
933         can get the size from the Handle).
934
935         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
936         (WebKit::WebPopupMenu::setUpPlatformData): Don't need to store the backing store size in the
937         data anymore; the Handles will make sure it reaches the other process.
938
939         * WebProcess/WebPage/FindController.cpp:
940         (WebKit::FindController::updateFindIndicator):
941         (WebKit::FindController::hideFindIndicator):
942         Changed to use ShareableBitmap::Handle.
943
944 2011-03-30  Alejandro G. Castro  <alex@igalia.com>
945
946         Fix GTK build after r81980.
947
948         * GNUmakefile.am:
949
950 2011-03-29  Beth Dakin  <bdakin@apple.com>
951
952         Reviewed by Maciej Stachowiak.
953
954         Fix for https://bugs.webkit.org/show_bug.cgi?id=57408 
955         webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard 
956         -and corresponding-
957         <rdar://problem/8665411>
958
959         * Shared/WebPageCreationParameters.cpp:
960         (WebKit::WebPageCreationParameters::encode):
961         (WebKit::WebPageCreationParameters::decode):
962         * Shared/WebPageCreationParameters.h:
963         * UIProcess/API/mac/PageClientImpl.h:
964         * UIProcess/API/mac/PageClientImpl.mm:
965         (WebKit::PageClientImpl::userSpaceScaleFactor):
966         * UIProcess/API/qt/qwkpage_p.h:
967         (QWKPagePrivate::userSpaceScaleFactor):
968         * UIProcess/PageClient.h:
969         * UIProcess/WebPageProxy.cpp:
970         (WebKit::WebPageProxy::creationParameters):
971         * UIProcess/gtk/WebView.h:
972         (WebKit::WebView::userSpaceScaleFactor):
973         * UIProcess/win/WebView.h:
974         (WebKit::WebView::userSpaceScaleFactor):
975         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
976         (WebKit::WebChromeClient::scaleFactor):
977         * WebProcess/WebPage/WebPage.cpp:
978         (WebKit::WebPage::WebPage):
979         * WebProcess/WebPage/WebPage.h:
980         (WebKit::WebPage::userSpaceScaleFactor):
981
982 2011-03-29  Brent Fulgham  <bfulgham@webkit.org>
983
984         Unreviewed WinCairo build fix.
985
986         Bring DownloadCurl implementation stubs in line with current
987         CFNetwork API.
988
989         * WebProcess/Downloads/curl/DownloadCurl.cpp:
990         (WebKit::Download::receivedCredential):
991         (WebKit::Download::receivedRequestToContinueWithoutCredential):
992         (WebKit::Download::receivedCancellation):
993
994 2011-03-29  Chris Fleizach  <cfleizach@apple.com>
995
996         Reviewed by Darin Adler.
997
998         AX: WK2: When creating the window remote token, use what's returned from accessibility
999         https://bugs.webkit.org/show_bug.cgi?id=57398
1000
1001         This will allow a specific WKView to override what's used for the window attribute of the
1002         HTML elements.
1003
1004         * UIProcess/API/mac/WKView.mm:
1005         (-[WKView viewDidMoveToWindow]):
1006
1007 2011-03-29  Jeff Miller  <jeffm@apple.com>
1008
1009         Reviewed by Sam Weinig.
1010
1011         Make Windows-only InjectedBundle functions platform-specific
1012         https://bugs.webkit.org/show_bug.cgi?id=57385
1013         
1014         Added files for Windows-specific WKBundle functions.
1015         Removed stub wrappers for InjectedBundle::setHostAllowsAnyHTTPSCertificate() and InjectedBundle::setClientCertificate() from non-Windows platforms.
1016
1017         * WebProcess/InjectedBundle/API/c/WKBundle.cpp: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.cpp.
1018         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.h.
1019         * WebProcess/InjectedBundle/API/c/win: Added.
1020         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp: Added.
1021         (WKBundleSetHostAllowsAnyHTTPSCertificate): Moved from WKBundle.cpp.
1022         (WKBundleSetClientCertificate): Moved from WKBundle.cpp.
1023         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Added.
1024         * WebProcess/InjectedBundle/InjectedBundle.h: setHostAllowsAnyHTTPSCertificate() and setClientCertificate() are Windows-only.
1025         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
1026         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
1027         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
1028         * win/WebKit2.vcproj: Added WKBundlePrivateWin.cpp and WKBundlePrivateWin.h.
1029         * win/WebKit2Generated.make: Copy WKBundlePrivateWin.h.
1030
1031 2011-03-29  Anders Carlsson  <andersca@apple.com>
1032
1033         Fix Windows build.
1034
1035         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1036         (WebKit::Download::receivedCredential):
1037         (WebKit::Download::receivedRequestToContinueWithoutCredential):
1038         (WebKit::Download::receivedCancellation):
1039
1040 2011-03-29  Anders Carlsson  <andersca@apple.com>
1041
1042         Reviewed by Sam Weinig.
1043
1044         Downloads: Authentication support
1045         https://bugs.webkit.org/show_bug.cgi?id=57403
1046         <rdar://problem/8691166>
1047
1048         * UIProcess/API/C/WKContext.h:
1049         Add didReceiveAuthenticationChallenge callback.
1050
1051         * UIProcess/Downloads/DownloadProxy.cpp:
1052         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
1053         Call the download client.
1054
1055         * UIProcess/Downloads/DownloadProxy.messages.in:
1056         Add DidReceiveAuthenticationChallenge message.
1057
1058         * UIProcess/WebDownloadClient.cpp:
1059         (WebKit::WebDownloadClient::didReceiveAuthenticationChallenge):
1060         Call the client callback function.
1061
1062         * UIProcess/WebDownloadClient.h:
1063         * WebProcess/Authentication/AuthenticationManager.cpp:
1064         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1065         Send the DidReceiveAuthenticationChallenge message to the download proxy.
1066
1067         (WebKit::AuthenticationManager::useCredentialForChallenge):
1068         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
1069         (WebKit::AuthenticationManager::cancelChallenge):
1070         If the authentication client is null, call the static download member functions.
1071
1072         * WebProcess/Authentication/AuthenticationManager.h:
1073         * WebProcess/Downloads/Download.cpp:
1074         (WebKit::Download::didReceiveAuthenticationChallenge):
1075         Call the authentication manager.
1076
1077         * WebProcess/Downloads/Download.h:
1078         * WebProcess/Downloads/mac/DownloadMac.mm:
1079         (WebKit::Download::receivedCredential):
1080         (WebKit::Download::receivedRequestToContinueWithoutCredential):
1081         (WebKit::Download::receivedCancellation):
1082         Call the right sender methods.
1083
1084         (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
1085         (-[WKDownloadAsDelegate downloadShouldUseCredentialStorage:]):
1086         Call the right Download member functions.
1087
1088         * WebProcess/Downloads/qt/DownloadQt.cpp:
1089         (WebKit::Download::receivedCredential):
1090         (WebKit::Download::receivedRequestToContinueWithoutCredential):
1091         (WebKit::Download::receivedCancellation):
1092         * WebProcess/Downloads/soup/DownloadSoup.cpp:
1093         (WebKit::Download::receivedCredential):
1094         (WebKit::Download::receivedRequestToContinueWithoutCredential):
1095         (WebKit::Download::receivedCancellation):
1096         Add stubs.
1097
1098 2011-03-29  Anders Carlsson  <andersca@apple.com>
1099
1100         Reviewed by Sam Weinig.
1101
1102         AuthenticationChallengeProxy objects should be associated with processes, not pages
1103         https://bugs.webkit.org/show_bug.cgi?id=57401
1104
1105         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
1106         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
1107         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
1108         (WebKit::AuthenticationChallengeProxy::useCredential):
1109         (WebKit::AuthenticationChallengeProxy::cancel):
1110         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
1111         (WebKit::AuthenticationChallengeProxy::create):
1112         * UIProcess/WebPageProxy.cpp:
1113         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
1114
1115 2011-03-29  Sam Weinig  <sam@webkit.org>
1116
1117         Reviewed by Anders Carlsson.
1118
1119         Use LocalizedStrings.h as a bottleneck for localized strings instead of
1120         using UI_STRING.
1121
1122         * UIProcess/API/mac/WKView.mm:
1123         (-[WKView validateUserInterfaceItem:]):
1124         Call existing localization functions instead of using UI_STRING.
1125
1126         (-[WKView _getTextInputState:selectionEnd:underlines:]):
1127         Remove unnecessary WebCore:: prefix.
1128
1129 2011-03-29  Chang Shu  <cshu@webkit.org>
1130
1131         Reviewed by Kenneth Rohde Christiansen.
1132
1133         WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs
1134         https://bugs.webkit.org/show_bug.cgi?id=42692
1135
1136         * Shared/WebPreferencesStore.cpp:
1137         (WebKit::WebPreferencesStore::decode):
1138         (WebKit::WebPreferencesStore::overrideAllowUniversalAccessFromFileURLsForTestRunner):
1139         * Shared/WebPreferencesStore.h:
1140         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1141         (WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner):
1142         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1143         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1144         (WebKit::InjectedBundle::overrideAllowUniversalAccessFromFileURLsForTestRunner):
1145         * WebProcess/InjectedBundle/InjectedBundle.h:
1146
1147 2011-03-29  Timothy Hatcher  <timothy@apple.com>
1148
1149         Update the order of the context menu to better match AppKit on Mac.
1150
1151         <rdar://problem/9054893>
1152
1153         Reviewed by John Sullivan.
1154
1155         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1156         (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
1157         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1158
1159 2011-03-29  Jeff Miller  <jeffm@apple.com>
1160
1161         Fix formatting of WebKit2.vcproj after r82283.
1162
1163         * win/WebKit2.vcproj:
1164
1165 2011-03-29  Martin Robinson  <mrobinson@igalia.com>
1166
1167         [GTK] Build failed with ‘GDK_KEY_KP_Space’ was not declared in this scope
1168         https://bugs.webkit.org/show_bug.cgi?id=55314
1169
1170         Build fix for older versions of GTK+. Use the deprecated names for GDK key
1171         defines and include GtkVersioning.h to allow building on newer versions
1172         of GTK+.
1173
1174         * Shared/gtk/WebEventFactory.cpp:
1175         (WebKit::isGdkKeyCodeFromKeyPad): Update key defines.
1176
1177 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
1178
1179         Reviewed by Darin Adler.
1180
1181         Use per-configuration vsprops in WebKit to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
1182         https://bugs.webkit.org/show_bug.cgi?id=57383
1183
1184         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
1185         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
1186         the IDE. To avoid this, add a separate vsprops file for each project configuration that
1187         contains the required inherited property sheets.
1188
1189         * win/WebKit2.vcproj:
1190         * win/WebKit2Debug.vsprops: Added.
1191         * win/WebKit2DebugAll.vsprops: Added.
1192         * win/WebKit2DebugCairoCFLite.vsprops: Added.
1193         * win/WebKit2Release.vsprops: Added.
1194         * win/WebKit2ReleaseCairoCFLite.vsprops: Added.
1195         * win/WebKit2ReleaseLTCG.vsprops: Added.
1196         * win/WebKit2WebProcess.vcproj:
1197         * win/WebKit2WebProcessDebug.vsprops: Added.
1198         * win/WebKit2WebProcessDebugAll.vsprops: Added.
1199         * win/WebKit2WebProcessDebugCairoCFLite.vsprops: Added.
1200         * win/WebKit2WebProcessRelease.vsprops: Added.
1201         * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: Added.
1202         * win/WebKit2WebProcessReleaseLTCG.vsprops: Added.
1203
1204 2011-03-29  Jessie Berlin  <jberlin@apple.com>
1205
1206         Reviewed by Anders Carlsson.
1207
1208         WebKit2: The WebProcess should be relaunched if necessary when WebKit2 is asked for
1209         information about Cookies, Databases, Local Storage, etc.
1210         https://bugs.webkit.org/show_bug.cgi?id=57374
1211
1212         Instead of bailing when the WebProcess is not valid, call relaunchProcessIfNecessary().
1213
1214         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1215         (WebKit::WebPluginSiteDataManager::getSitesWithData):
1216         (WebKit::WebPluginSiteDataManager::clearSiteData):
1217         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1218         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
1219         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
1220         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
1221         * UIProcess/WebCookieManagerProxy.cpp:
1222         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
1223         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
1224         (WebKit::WebCookieManagerProxy::deleteAllCookies):
1225         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
1226         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
1227         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
1228         * UIProcess/WebDatabaseManagerProxy.cpp:
1229         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
1230         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
1231         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
1232         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
1233         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
1234         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
1235         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1236         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1237         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
1238         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
1239         * UIProcess/WebMediaCacheManagerProxy.cpp:
1240         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
1241         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
1242         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
1243         * UIProcess/WebResourceCacheManagerProxy.cpp:
1244         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
1245         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
1246         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
1247
1248 2011-03-29  Jeff Miller  <jeffm@apple.com>
1249
1250         Reviewed by Darin Adler.
1251
1252         WebKit2: Support setting the client certificate on Windows
1253         https://bugs.webkit.org/show_bug.cgi?id=57368
1254         
1255         Allow setting the client certificate for a host via the injected bundle.
1256         This requires the ability for Webkit2 Windows clients to create a WKCertificateInfo from a PCCERT_CONTEXT so they can send it to the web process.
1257
1258         * Shared/API/c/win/WKCertificateInfoWin.cpp:
1259         (WKCertificateInfoCreateWithCertificate): Added.
1260         * Shared/API/c/win/WKCertificateInfoWin.h: Added WKCertificateInfoCreateWithCertificate().
1261         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1262         (WKBundleSetClientCertificate): Added.
1263         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetClientCertificate().
1264         * WebProcess/InjectedBundle/InjectedBundle.h: Added setClientCertificate().
1265         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1266         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
1267         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
1268         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
1269         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
1270         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
1271         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
1272         (WebKit::InjectedBundle::setClientCertificate): Added.
1273
1274 2011-03-29  Timothy Hatcher  <timothy@apple.com>
1275
1276         Make WebKit2 work with update-webkit-localizable-strings.
1277
1278         https://webkit.org/b/57354
1279
1280         Reviewed by Sam Weinig.
1281
1282         * PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
1283         * Shared/WebLocalizableStrings.h: Added.
1284         * UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
1285         * UIProcess/mac/WebInspectorProxyMac.mm:
1286         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME.
1287         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros.
1288         Use WebLocalizableStrings.h.
1289         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1290         (registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h.
1291         * WebProcess/mac/WebProcessMac.mm:
1292         (WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME.
1293
1294         * GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
1295         * WebKit2.pro: Ditto.
1296         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1297         * win/WebKit2.vcproj: Ditto.
1298
1299 2011-03-29  Jeff Miller  <jeffm@apple.com>
1300
1301         Reviewed by Darin Adler.
1302
1303         CoreIPC::decodeResourceError() leaks a CFDataRef
1304         https://bugs.webkit.org/show_bug.cgi?id=57366
1305
1306         * Shared/win/WebCoreArgumentCodersWin.cpp:
1307         (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.
1308
1309 2011-03-29  Anders Carlsson  <andersca@apple.com>
1310
1311         Reviewed by Sam Weinig.
1312
1313         Allow the AppleConnect plug-in to use the QuickDraw drawing model
1314         https://bugs.webkit.org/show_bug.cgi?id=57365
1315         <rdar://problem/8712320>
1316
1317         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1318         (WebKit::NetscapePluginModule::determineQuirks):
1319         * Shared/Plugins/PluginQuirks.h:
1320         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1321         (WebKit::NetscapePlugin::platformPostInitialize):
1322
1323 2011-03-29  Darin Adler  <darin@apple.com>
1324
1325         Reviewed by Adam Roben.
1326
1327         WebKit2 bundle page needs to offer generated file hooks
1328         https://bugs.webkit.org/show_bug.cgi?id=57279
1329
1330         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added shouldGenerateFileForUpload and
1331         generateFileForUpload callback pointers.
1332
1333         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1334         (WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Added.
1335         (WebKit::InjectedBundlePageUIClient::generateFileForUpload): Added.
1336         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added functions above.
1337
1338         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1339         (WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Implemented by
1340         calling the functions above.
1341         (WebKit::WebChromeClient::generateReplacementFile): Ditto.
1342
1343 2011-03-29  Anders Carlsson  <andersca@apple.com>
1344
1345         Reviewed by Darin Adler.
1346
1347         Assertion failure in plug-in process with clang-built 32/64-bit WebKit2
1348         https://bugs.webkit.org/show_bug.cgi?id=57359
1349
1350         Don't use __alignof when encoding and decoding scalar types.
1351         
1352         Darwin 32-bit, double and unsigned long long are 4-byte aligned but on 64-bit they're
1353         8-byte aligned which causes problems when doing IPC between 32-bit and 64-bit processes.
1354         GCC is buggy and returns 8, but clang is correct and returns 4. Use sizeof instead which we know
1355         is equal to or greater than the alignment.
1356
1357         * Platform/CoreIPC/ArgumentDecoder.cpp:
1358         (CoreIPC::ArgumentDecoder::decodeBool):
1359         (CoreIPC::ArgumentDecoder::decodeUInt32):
1360         (CoreIPC::ArgumentDecoder::decodeUInt64):
1361         (CoreIPC::ArgumentDecoder::decodeInt32):
1362         (CoreIPC::ArgumentDecoder::decodeInt64):
1363         (CoreIPC::ArgumentDecoder::decodeFloat):
1364         (CoreIPC::ArgumentDecoder::decodeDouble):
1365         * Platform/CoreIPC/ArgumentEncoder.cpp:
1366         (CoreIPC::ArgumentEncoder::encodeBool):
1367         (CoreIPC::ArgumentEncoder::encodeUInt32):
1368         (CoreIPC::ArgumentEncoder::encodeUInt64):
1369         (CoreIPC::ArgumentEncoder::encodeInt32):
1370         (CoreIPC::ArgumentEncoder::encodeInt64):
1371         (CoreIPC::ArgumentEncoder::encodeFloat):
1372         (CoreIPC::ArgumentEncoder::encodeDouble):
1373
1374 2011-03-29  Brent Fulgham  <bfulgham@webkit.org>
1375
1376         Unreviewed build fix after r81928.
1377
1378         * win/WebKit2.vcproj: Don't build CG-specific icon routines
1379         for WinCairo port.
1380
1381 2011-03-29  Sam Weinig  <sam@webkit.org>
1382
1383         Reviewed by Anders Carlsson.
1384
1385         Reproducible crash running under libgmalloc, in -[WKView(Internal) removeTrackingRect:] --&gt; objc_assign_ivar_non_gc
1386         <rdar://problem/9193352>
1387         https://bugs.webkit.org/show_bug.cgi?id=57358
1388
1389         -[WKView removeTrackingRect] can be called from below -[WKView dealloc] after we have
1390         destroyed _data. So, nil out _data after releasing it and nil check it appropriately.
1391         
1392         * UIProcess/API/mac/WKView.mm:
1393         (-[WKView dealloc]):
1394         Nil out _data after releasing it.
1395
1396         (-[WKView removeTrackingRect:]):
1397         Add early return for nil _data.
1398
1399 2011-03-29  Jeff Miller  <jeffm@apple.com>
1400
1401         Reviewed by Jon Honeycutt.
1402
1403         Add WebCore::copyCertificateToData() on Windows
1404         https://bugs.webkit.org/show_bug.cgi?id=57296
1405         
1406         Remove duplicate code that implemented this functionality in WebCoreArgumentCodersWin.cpp and use WebCore::copyCertificateToData() instead. 
1407
1408         * Shared/win/WebCoreArgumentCodersWin.cpp:
1409         (CoreIPC::decodeResourceError): Use WebCore::copyCertificateToData().
1410
1411 2011-03-29  Balazs Kelemen  <kbalazs@webkit.org>
1412
1413         Unreviewed build fix (64 bit gcc).
1414
1415         GCC does not accept uint64_t formatted as %lli.
1416
1417         * UIProcess/WebIconDatabase.cpp:
1418         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Add explicit cast to long long.
1419
1420 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
1421
1422         Reviewed by Dan Bernstein.
1423
1424         WKPageGetSourceForFrame and WKPageGetContentsAsString should throw an error in case of a race with page loading
1425         https://bugs.webkit.org/show_bug.cgi?id=57305
1426         <rdar://problem/8738060>, <rdar://problem/8780168>
1427
1428         * UIProcess/WebPageProxy.cpp:
1429         (WebKit::WebPageProxy::close): Clear m_loadDependentStringCallbackIDs
1430         (WebKit::WebPageProxy::getSourceForFrame): track the callback as load dependent
1431         (WebKit::WebPageProxy::getContentsAsString): ditto
1432         (WebKit::WebPageProxy::clearLoadDependentCallbacks): Invalidate all load dependent callbacks
1433         (WebKit::WebPageProxy::didCommitLoadForFrame): Call clearLoadDependentCallbacks
1434         (WebKit::WebPageProxy::didFailLoadForFrame): ditto
1435         (WebKit::WebPageProxy::stringCallback): Remove callback from load dependent set if appropriate
1436         (WebKit::WebPageProxy::processDidCrash): Clear m_loadDependentStringCallbackIDs
1437         * UIProcess/WebPageProxy.h: Add m_loadDependentStringCallbackIDs hash set.
1438
1439 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
1440
1441         Reviewed by Darin Adler.
1442
1443         Use String instead of CString as return value of openTemporaryFile
1444         https://bugs.webkit.org/show_bug.cgi?id=55332
1445
1446         * Shared/WebMemorySampler.cpp:
1447         (WebKit::WebMemorySampler::initializeTempLogFile):
1448         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1449         (WebKit::NetscapePluginStream::stop):
1450         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1451
1452 2011-03-28  Brian Weinstein  <bweinstein@apple.com>
1453
1454         Reviewed by Jon Honeycutt.
1455
1456         WebKit2: Downloads started with DownloadCFNet::start never start
1457         https://bugs.webkit.org/show_bug.cgi?id=57268
1458
1459         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1460         (WebKit::Download::start): Call CFURLDownloadStart on the download we create.
1461
1462 2011-03-28  Anders Carlsson  <andersca@apple.com>
1463
1464         Fix Windows build.
1465
1466         * Shared/ShareableBitmap.h:
1467
1468 2011-03-28  Anders Carlsson  <andersca@apple.com>
1469
1470         Reviewed by Sam Weinig.
1471
1472         Beep when pressing a menu key equivalent when a plug-in has focus
1473         https://bugs.webkit.org/show_bug.cgi?id=57264
1474         <rdar://problem/8935597>
1475
1476         We don't want the WKTextInputWindowController inputContext to be involved in interpretKeyEvents.
1477
1478         * UIProcess/API/mac/WKView.mm:
1479         (-[WKView inputContext]):
1480
1481 2011-03-28  Anders Carlsson  <andersca@apple.com>
1482
1483         Reviewed by Sam Weinig.
1484
1485         CGImageRefs must hold a strong reference to underlying data
1486         https://bugs.webkit.org/show_bug.cgi?id=57263
1487         <rdar://problem/9146179>
1488
1489         Make paintBitmapContext use CGBitmapContextCreateImage, which creates a copy-on-write copy
1490         of the bitmap data. Also, add ShareableBitmap::makeCGImageCopy which does the same thing, and
1491         ShareableBitmap::makeCGImage in the cases where we know that the ShareableBitmap data will never change.
1492
1493         * Platform/cg/CGUtilities.cpp:
1494         (WebKit::paintImage):
1495         Factor image painting code out into a separate function.
1496
1497         (WebKit::paintBitmapContext):
1498         Call paintImage.
1499
1500         * Shared/API/c/cg/WKImageCG.cpp:
1501         (WKImagemakeCGImage):
1502         Use ShareableBitmap::makeCGImageCopy.
1503
1504         * Shared/ShareableBitmap.h:
1505         * Shared/cg/ShareableBitmapCG.cpp:
1506         (WebKit::ShareableBitmap::createGraphicsContext):
1507         (WebKit::ShareableBitmap::paint):
1508         (WebKit::ShareableBitmap::makeCGImageCopy):
1509         (WebKit::ShareableBitmap::makeCGImage):
1510         (WebKit::ShareableBitmap::releaseBitmapContextData):
1511         (WebKit::ShareableBitmap::releaseDataProviderData):
1512         Add makeCGImage and makeCGImageCopy.
1513
1514         * Shared/cg/WebCoreArgumentCodersCG.cpp:
1515         (CoreIPC::createImage):
1516         Use ShareableBitmap::makeCGImage.
1517         
1518         * UIProcess/API/mac/PageClientImpl.mm:
1519         (WebKit::PageClientImpl::setDragImage):
1520         Use ShareableBitmap::makeCGImage and plug a CGImageRef leak.
1521
1522 2011-03-28  Alexey Proskuryakov  <ap@apple.com>
1523
1524         Build fix.
1525
1526         * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): It's not "event" in this function, it's
1527         "theEvent".
1528
1529 2011-03-28  Alexey Proskuryakov  <ap@apple.com>
1530
1531         Reviewed by Darin Adler.
1532
1533         https://bugs.webkit.org/show_bug.cgi?id=57260
1534         Clean up text input code a little
1535
1536         * UIProcess/API/mac/WKView.mm:
1537         (-[WKView doCommandBySelector:]): This NSTextInput protocol method lacked a LOG() call.
1538         (-[WKView keyDown:]): Added (possibly useless) event protection to match performKeyEquivalent:
1539         and also WebKit1.
1540
1541         * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment.
1542
1543 2011-03-28  Jeff Miller  <jeffm@apple.com>
1544
1545         Reviewed by Adam Roben.
1546
1547         ResourceError::certificate() should return a PCCERT_CONTEXT
1548         https://bugs.webkit.org/show_bug.cgi?id=57262
1549
1550         * Shared/win/PlatformCertificateInfo.cpp:
1551         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Don't assert if no PCCERT_CONTEXT is specified.
1552         * Shared/win/WebCoreArgumentCodersWin.cpp:
1553         (CoreIPC::encodeResourceError): Removed unneeded code now that ResourceError::certificate() returns a PCCERT_CONTEXT.
1554
1555 2011-03-28  Jeff Miller  <jeffm@apple.com>
1556
1557         Rubber-stamped by Adam Roben.
1558
1559         Remove unused CFErrorRef.
1560
1561         * Shared/win/WebCoreArgumentCodersWin.cpp:
1562         (CoreIPC::encodeResourceError): Remove unused CFErrorRef.
1563
1564 2011-03-28  Jeff Miller  <jeffm@apple.com>
1565
1566         Reviewed by Adam Roben.
1567
1568         Include certificate when sending a WebCore::ResourceError to UI process on Windows
1569         https://bugs.webkit.org/show_bug.cgi?id=57195
1570         
1571         Add support for sending the certificate with the WebCore::ResourceError.
1572
1573         * Shared/win/WebCoreArgumentCodersWin.cpp:
1574         (CoreIPC::encodeResourceError): Encode certificate data.
1575         (CoreIPC::deallocCertContext): Added.
1576         (CoreIPC::createCertContextDeallocator): Added.
1577         (CoreIPC::copyCert): Added.
1578         (CoreIPC::decodeResourceError): Decode certificate data.
1579
1580 2011-03-27  Andy Estes  <aestes@apple.com>
1581
1582         Reviewed by Maciej Stachowiak.
1583
1584         Correctly get a plug-in's MIME type when it uses WebPluginMIMETypesFilename
1585         https://bugs.webkit.org/show_bug.cgi?id=57205
1586         
1587         If the plug-in's Info.plist uses WebPluginMIMETypesFilename to specify
1588         plug-in MIME types, WebKit has to check for a property list file in
1589         ~/Library/Preferences for the MIME type dictionary.
1590
1591         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1592         (WebKit::getMIMETypesFromPluginBundle): If the bundle's Info dictionary
1593         has the key WebPluginMIMETypesFilename, open the property list
1594         specified by that key's value and return the MIME type dictionary from
1595         there. Otherwise, return the MIME type dictionary specified by the key
1596         WebPluginMIMETypes.
1597         (WebKit::getPluginInfoFromPropertyLists): Call
1598         getMIMETypesFromPluginBundle().
1599
1600 2011-03-27  Jer Noble  <jer.noble@apple.com>
1601
1602         Reviewed by Maciej Stachowiak.
1603
1604         Full Screen: disable keyboard access by default
1605         https://bugs.webkit.org/show_bug.cgi?id=56684
1606
1607         Take into account whether keyboard access was requested when deciding whether full
1608         screen mode is supported.
1609
1610         * UIProcess/WebFullScreenManagerProxy.cpp:
1611         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
1612         * UIProcess/WebFullScreenManagerProxy.h:
1613         * UIProcess/WebFullScreenManagerProxy.messages.in:
1614         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1615         (WebKit::WebFullScreenManager::supportsFullScreen):
1616         * WebProcess/FullScreen/WebFullScreenManager.h:
1617         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1618         (WebKit::WebChromeClient::supportsFullScreenForElement):
1619         * WebProcess/WebCoreSupport/WebChromeClient.h:
1620
1621 2011-03-27  Anders Carlsson  <andersca@apple.com>
1622
1623         Reviewed by Sam Weinig.
1624
1625         Dock doesn't come back after leaving fullscreen on Hulu
1626         https://bugs.webkit.org/show_bug.cgi?id=57189
1627         <rdar://problem/9192413>
1628
1629         Port some code over from the old WebKit1 plug-in host.
1630
1631         * PluginProcess/mac/PluginProcessShim.mm:
1632         (WebKit::shimShowMenuBar):
1633         (WebKit::shimHideMenuBar):
1634         (WebKit::shimIsMenuBarVisible):
1635
1636 2011-03-27  Anders Carlsson  <andersca@apple.com>
1637
1638         Reviewed by Sam Weinig.
1639
1640         Keep a strong reference to the connection to avoid crashes.
1641
1642         * Platform/CoreIPC/Connection.cpp:
1643
1644 2011-03-26  Jeff Miller  <jeffm@apple.com>
1645
1646         Reviewed by Sam Weinig.
1647
1648         WKErrorCopyCFError() doesn't actually return a copy of the CFErrorRef
1649         https://bugs.webkit.org/show_bug.cgi?id=57172
1650
1651         * Shared/API/c/cf/WKErrorCF.cpp:
1652         (WKErrorCopyCFError): Use RetainPtr<> and leakRef() to return a real copy.
1653
1654 2011-03-26  Maciej Stachowiak  <mjs@apple.com>
1655
1656         Revert inadvertently committed changes.
1657
1658         * WebProcess/com.apple.WebProcess.sb:
1659
1660 2011-03-26  Jer Noble  <jer.noble@apple.com>
1661
1662         Reviewed by Eric Carlson.
1663
1664         Enable the Full Screen API by default in WebKit/mac and WebKit2
1665         https://bugs.webkit.org/show_bug.cgi?id=56956
1666
1667         * Shared/WebPreferencesStore.h: Default the fullScreenEnabled preference to true.
1668
1669 2011-03-26  Jeff Miller  <jeffm@apple.com>
1670
1671         Reviewed by Steve Falkenburg.
1672
1673         Add PlatformCertificateInfo::PlatformCertificateInfo(PCCERT_CONTEXT) constructor on Windows
1674         https://bugs.webkit.org/show_bug.cgi?id=57152
1675         
1676         We're going to need to create a PlatformCertificateInfo with a single certificate on Windows to support client certificates.
1677         Also, stop relying on the fact that the Win32 API CertDuplicateCertificateContext() currently returns the same PCCERT_CONTEXT that you pass to it, since that may change in the future.
1678
1679         * Shared/win/PlatformCertificateInfo.cpp:
1680         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor. Use return value from CertDuplicateCertificateContext().
1681         (WebKit::PlatformCertificateInfo::operator=): Use return value from CertDuplicateCertificateContext().
1682         * Shared/win/PlatformCertificateInfo.h: Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor.
1683
1684 2011-03-26  Anders Carlsson  <andersca@apple.com>
1685
1686         Reviewed by Sam Weinig.
1687
1688         Graphic corruption appeared with Silverlight contents while resizing window
1689         https://bugs.webkit.org/show_bug.cgi?id=57167
1690         <rdar://problem/9094052>
1691
1692         Pass DispatchMessageEvenWhenWaitingForSyncReply when sending GeometryDidChange messages since that will guarantee
1693         that those messages will be handled before PaintEntirePlugin messages which prevents the PaintEntirePlugin handler from
1694         painting into the wrong backing store.
1695
1696         * WebProcess/Plugins/PluginProxy.cpp:
1697         (WebKit::PluginProxy::geometryDidChange):
1698
1699 2011-03-26  Sam Weinig  <sam@webkit.org>
1700
1701         Reviewed by Anders Carlsson.
1702
1703         Web process considered unresponsive (SPOD shown) when displaying a JavaScript alert() as a result of a click
1704         <rdar://problem/9067557>
1705         https://bugs.webkit.org/show_bug.cgi?id=57166
1706
1707         * UIProcess/WebPageProxy.cpp:
1708         (WebKit::WebPageProxy::runJavaScriptAlert):
1709         (WebKit::WebPageProxy::runJavaScriptConfirm):
1710         (WebKit::WebPageProxy::runJavaScriptPrompt):
1711         Invalidate the responsiveness timer before calling out to the client.
1712
1713 2011-03-26  Anders Carlsson  <andersca@apple.com>
1714
1715         Reviewed by Sam Weinig.
1716
1717         ASSERTION FAILED: m_operationInProgress == NoOperation loading nytimes.com
1718         https://bugs.webkit.org/show_bug.cgi?id=57165
1719         <rdar://problem/9024311>
1720
1721         The assertion fired because during GC, the web process sends a synchronous NPObjectMessageReceiver::Deallocate
1722         message to the plug-in process. Since this is a synchronous message, the web process needs to process incoming synchronous
1723         messages. While waiting, we get an incoming PluginProxy::Evaluate message from the plug-in. This causes JavaScript to run
1724         during GC which is very bad.
1725
1726         The fix for this is to add a flag on the connection that will cause synchronous messages sent by the connection (in this case the
1727         plug-in process) to not be processed while the other side (the web process) is waiting for a synchronous reply _unless_ the connection
1728         is actually processing a synchronous message. (The last part is to avoid deadlocks).
1729
1730         Since the call to NPN_Evaluate by the plug-in (that ends up sending the PluginProxy::Evaluate message) comes from a run loop timer firing,
1731         it's OK to wait for it to be processed by the web process when it returns to the run loop.
1732
1733         * Platform/CoreIPC/Connection.cpp:
1734         (CoreIPC::Connection::Connection):
1735         Initialize m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage and m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount.
1736
1737         (CoreIPC::Connection::setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage):
1738         Set m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage.
1739
1740         (CoreIPC::Connection::sendMessage):
1741         Don't add the MessageID::DispatchMessageWhenWaitingForSyncReply flag when the right flags has been set on the connection, and it's not processing a synchronous message.
1742
1743         (CoreIPC::Connection::dispatchMessage):
1744         Increment and decrement m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount accordingly.
1745
1746         * PluginProcess/WebProcessConnection.cpp:
1747         (WebKit::WebProcessConnection::WebProcessConnection):
1748         Call setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the connection.
1749
1750 2011-03-26  Sam Weinig  <sam@webkit.org>
1751
1752         Rollout r82042 (If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations))
1753
1754         -[NSString stringByResolvingSymlinksInPath] does not do what we needed for paths within /private.
1755         This caused all SSL sites to stop working.
1756
1757         * WebProcess/mac/WebProcessMac.mm:
1758         (WebKit::appendSandboxParameterPath):
1759         (WebKit::initializeSandbox):
1760
1761 2011-03-26  Sam Weinig  <sam@webkit.org>
1762
1763         Reviewed by Anders Carlsson.
1764
1765         If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
1766         <rdar://problem/9127411>
1767         https://bugs.webkit.org/show_bug.cgi?id=57164
1768
1769         * WebProcess/mac/WebProcessMac.mm:
1770         (WebKit::appendSandboxParameterPath):
1771         (WebKit::initializeSandbox):
1772         Use -[NSString stringByResolvingSymlinksInPath] instead of realpath to ensure we can resolve
1773         symlinks even if the file/directory doesn't exist yet.
1774
1775 2011-03-26  Anders Carlsson  <andersca@apple.com>
1776
1777         Reviewed by Sam Weinig.
1778
1779         Factor processing of incoming sync replies out into processIncomingSyncReply
1780         https://bugs.webkit.org/show_bug.cgi?id=57161
1781
1782         * Platform/CoreIPC/Connection.cpp:
1783         (CoreIPC::Connection::sendSyncMessage):
1784         Pass DispatchMessageEvenWhenWaitingForSyncReply to sendMessage.
1785
1786         (CoreIPC::Connection::processIncomingSyncReply):
1787         Move code from processIncomingMessage to here.
1788
1789         (CoreIPC::Connection::processIncomingMessage):
1790         Call processIncomingSyncReply.
1791
1792 2011-03-26  Sam Weinig  <sam@webkit.org>
1793
1794         Reviewed by Anders Carlsson.
1795
1796         WebKit2: Assert in CoreIPC::typeFromCFTypeRef() when loading a site with an invalid certificate
1797         <rdar://problem/9188041>
1798         https://bugs.webkit.org/show_bug.cgi?id=57159
1799
1800         * Shared/cf/ArgumentCodersCF.cpp:
1801         (CoreIPC::typeFromCFTypeRef):
1802         (CoreIPC::encode):
1803         (CoreIPC::decode):
1804         * Shared/cf/ArgumentCodersCF.h:
1805         Add encoding/decoding for SecCertificateRef type.
1806
1807         * Shared/mac/PlatformCertificateInfo.mm:
1808         (WebKit::PlatformCertificateInfo::encode):
1809         (WebKit::PlatformCertificateInfo::decode):
1810         Use ArgumentCodersCF now that it knows how to encode/decode SecCertificateRefs.
1811
1812 2011-03-26  Anders Carlsson  <andersca@apple.com>
1813
1814         Reviewed by Sam Weinig.
1815
1816         Handle synchronous replies coming in out of order
1817         https://bugs.webkit.org/show_bug.cgi?id=57158
1818
1819         When processing an incoming reply, don't assume that it belongs to the last sent synchronous request.
1820         Instead, iterate over the m_pendingSyncReplies vector backwards looking for the corresponding request.
1821
1822         * Platform/CoreIPC/Connection.cpp:
1823         (CoreIPC::Connection::processIncomingMessage):
1824
1825 2011-03-26  Anders Carlsson  <andersca@apple.com>
1826
1827         Reviewed by Sam Weinig.
1828
1829         Fix a possible deadlock when two synchronous messages are sent at the same time
1830         https://bugs.webkit.org/show_bug.cgi?id=57155
1831
1832         Simplify code and fix a possible (although highly improbable) dead lock.
1833
1834         * Platform/CoreIPC/Connection.cpp:
1835         Make SyncMessageState atomically ref counted since it can be ref()'ed from the connection queue.
1836         Get rid of m_waitForSyncReplyCount and add m_didScheduleDispatchMessagesWork.
1837
1838         (CoreIPC::Connection::SyncMessageState::SyncMessageState):
1839         Initialize m_didScheduleDispatchMessagesWork to false.
1840
1841         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
1842         if m_didScheduleDispatchMessagesWork is false, schedule a call to dispatchMessageAndResetDidScheduleDispatchMessagesWork
1843         on the client run loop.
1844
1845         (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork):
1846         Dispatch messages and set m_didScheduleDispatchMessagesWork back to false.
1847
1848         (CoreIPC::Connection::sendSyncMessage):
1849         Remove calls to beginWaitForSyncReply and endWaitForSyncReply.
1850
1851 2011-03-25  Sam Weinig  <sam@webkit.org>
1852
1853         Reviewed by Adele Peterson.
1854
1855         WKPageLoadAlternateHTMLString doesn't re-spawn a dead WebProcess, but should
1856         <rdar://problem/9191493>
1857         https://bugs.webkit.org/show_bug.cgi?id=57134
1858
1859         Make all load functions respawn a dead WebProcess for consistency.
1860
1861         * UIProcess/WebPageProxy.cpp:
1862         (WebKit::WebPageProxy::loadHTMLString):
1863         Respawn a dead WebProcess.
1864
1865         (WebKit::WebPageProxy::loadAlternateHTMLString):
1866         Respawn a dead WebProcess.
1867
1868         (WebKit::WebPageProxy::loadPlainTextString):
1869         Respawn a dead WebProcess.
1870
1871         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1872         * UIProcess/WebPageProxy.h:
1873         * UIProcess/WebPageProxy.messages.in:
1874         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1875         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1876         * WebProcess/WebPage/WebPage.cpp:
1877         (WebKit::WebPage::loadAlternateHTMLString):
1878         Since we may no longer always have a main frame when calling WKPageLoadAlternateHTMLString,
1879         set the unreachable URL, if there is one, on provisional load.
1880
1881 2011-03-25  Anders Carlsson  <andersca@apple.com>
1882
1883         Reviewed by Sam Weinig.
1884
1885         PluginView's call to invalidateContentsAndWindow() in invalidateRect() is wrong for plug-ins which paint into compositing layers
1886         https://bugs.webkit.org/show_bug.cgi?id=57133
1887         <rdar://problem/9029442>
1888
1889         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1890         (WebKit::NetscapePlugin::platformInvalidate):
1891         Return true under the Core Animation drawing model, since that prevents the plug-in from calling PluginController::invalidate.
1892
1893         * WebProcess/Plugins/PluginView.cpp:
1894         (WebKit::PluginView::invalidateRect):
1895         Don't call invalidateContentsAndWindow() if the plug-in has a Core Animation layer.
1896
1897 2011-03-25  Brady Eidson  <beidson@apple.com>
1898
1899         Reviewed by Sam Weinig.
1900
1901         <rdar://problem/8648311> and https://bugs.webkit.org/show_bug.cgi?id=56425
1902         WebKit2 IconDatabase and API
1903
1904         This gets a basic, usable API in place.
1905         Enhancements can come in other bugs as they're needed.
1906
1907         * UIProcess/API/C/WKIconDatabase.cpp:
1908         (WKIconDatabaseRetainIconForURL):
1909         (WKIconDatabaseReleaseIconForURL):
1910         (WKIconDatabaseEnableDatabaseCleanup):
1911         * UIProcess/API/C/WKIconDatabase.h:
1912         
1913         The first actual accessor for an "icon for a URL" is for a CGImageRef:
1914         * UIProcess/API/C/cg: Added.
1915         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp: Added.
1916         (WKIconDatabaseGetCGImageForURL):
1917         * UIProcess/API/C/cg/WKIconDatabaseCG.h: Added.
1918         
1919         Expose relevant methods to support the above API:
1920         * UIProcess/WebIconDatabase.cpp:
1921         (WebKit::WebIconDatabase::WebIconDatabase): New IconDatabases will have cleanup disabled from the start,
1922           and require a single call to "enableDatabaseCleanup" to allow cleanup.
1923         (WebKit::WebIconDatabase::setDatabasePath):
1924         (WebKit::WebIconDatabase::enableDatabaseCleanup):
1925         (WebKit::WebIconDatabase::imageForPageURL):
1926         * UIProcess/WebIconDatabase.h:
1927         
1928         Project file stuff:
1929         * WebKit2.xcodeproj/project.pbxproj:
1930         * win/WebKit2.vcproj:
1931
1932 2011-03-25  Jeff Miller  <jeffm@apple.com>
1933
1934         Reviewed by Darin Adler.
1935
1936         Add CoreIPC::encodeResourceError() and CoreIPC::decodeResourceError() for all platforms
1937         https://bugs.webkit.org/show_bug.cgi?id=57125
1938         
1939         Currently, these are only implemented on the Mac, but we're going to need them for Windows as well, so we might as well make them always platform-specific.
1940         In this patch, just replicate the existing common non-Mac implementation in WebCoreArgumentCoders.h to platform-specific files.
1941
1942         * Shared/WebCoreArgumentCoders.h: Move non-Mac implementations of encodeResourceError() and decodeResourceError() to common files.
1943         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1944         (CoreIPC::encodeResourceError): Added.
1945         (CoreIPC::decodeResourceError): Added.
1946         * Shared/qt/WebCoreArgumentCodersQt.cpp:
1947         (CoreIPC::encodeResourceError): Added.
1948         (CoreIPC::decodeResourceError): Added.
1949         * Shared/win/WebCoreArgumentCodersWin.cpp:
1950         (CoreIPC::encodeResourceError): Added.
1951         (CoreIPC::decodeResourceError): Added.
1952
1953 2011-03-25  Andy Estes  <aestes@apple.com>
1954
1955         Reviewed by Adele Peterson.
1956
1957         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
1958         https://bugs.webkit.org/show_bug.cgi?id=49016
1959
1960         Update objectContentType() implementation to handle the
1961         shouldPreferPlugInsForImages flag.
1962
1963         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1964         (WebKit::WebFrameLoaderClient::objectContentType):
1965         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1966
1967 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
1968
1969         Unreviewed build correction.
1970
1971         Add stubs for WK2 cookie handling with cURL.
1972
1973         * WebProcess/Cookies/curl: Added.
1974         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added.
1975         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1976         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
1977         * win/WebKit2.vcproj:
1978
1979 2011-03-25  Steve Falkenburg  <sfalken@apple.com>
1980
1981         Reviewed by Brian Weinstein.
1982
1983         Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
1984         https://bugs.webkit.org/show_bug.cgi?id=57119
1985         <rdar://problem/9054148>
1986
1987         This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
1988         not available in WebKit. The plug-in is fairly widespread, since it was included in
1989         a Windows Update push at one point.
1990
1991         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1992         (WebKit::PluginInfoStore::shouldUsePlugin): Blacklist npwpf.dll.
1993
1994 2011-03-25  Jessie Berlin  <jberlin@apple.com>
1995
1996         Reviewed by Anders Carlsson.
1997
1998         WebKit2: Need to be able to set and get the Cookie Storage Policy.
1999         https://bugs.webkit.org/show_bug.cgi?id=50780
2000
2001         Part 2: Make it possible to set the initial policy on Windows.
2002
2003         In WebKit1, we read the initial policy on Windows from WebPreferences at startup.
2004         Since that is not possible in WebKit2, make it possible to specify the initial policy
2005         as a creation parameter to the WebProcess.
2006
2007         * Shared/WebProcessCreationParameters.cpp:
2008         (WebKit::WebProcessCreationParameters::encode):
2009         Encode initialHTTPCookieAcceptPolicy on Windows.
2010         (WebKit::WebProcessCreationParameters::decode):
2011         Decode initialHTTPCookieAcceptPolicy on Windows.
2012         * Shared/WebProcessCreationParameters.h:
2013
2014         * UIProcess/API/C/win/WKContextPrivateWin.h:
2015         * UIProcess/API/C/win/WKContextWin.cpp:
2016         (WKContextSetInitialHTTPCookieAcceptPolicy):
2017         Call through to WebContext.
2018
2019         * UIProcess/WebContext.cpp:
2020         (WebKit::WebContext::WebContext):
2021         Give the initial policy a default of "Always".
2022         * UIProcess/WebContext.h:
2023         (WebKit::WebContext::setInitialHTTPCookieAcceptPolicy):
2024         * UIProcess/win/WebContextWin.cpp:
2025         (WebKit::WebContext::platformInitializeWebProcess):
2026         Set the initial policy on Windows.
2027
2028         * WebProcess/Cookies/WebCookieManager.h:
2029         Make setHTTPCookieAcceptPolicy public so that it can be called from WebProcessWin.
2030
2031         * WebProcess/win/WebProcessWin.cpp:
2032         (WebKit::WebProcess::platformInitializeWebProcess):
2033         Tell the WebCookieManager about the initial policy.
2034
2035 2011-03-25  Jessie Berlin  <jberlin@apple.com>
2036
2037         Reviewed by Sam Weinig.
2038
2039         WebKit2: Need to be able to set and get the Cookie Storage Policy.
2040         https://bugs.webkit.org/show_bug.cgi?id=50780
2041
2042         * Shared/HTTPCookieAcceptPolicy.h: Added.
2043
2044         * UIProcess/API/C/WKAPICast.h:
2045         (WebKit::toHTTPCookieAcceptPolicy):
2046         (WebKit::toAPI):
2047
2048         * UIProcess/API/C/WKCookieManager.cpp:
2049         (WKCookieManagerSetHTTPCookieAcceptPolicy):
2050         Call through to WebCookieManagerProxy.
2051         (WKCookieManagerGetHTTPCookieAcceptPolicy):
2052         Ditto.
2053         * UIProcess/API/C/WKCookieManager.h:
2054
2055         * UIProcess/WebCookieManagerProxy.cpp:
2056         (WebKit::WebCookieManagerProxy::invalidate):
2057         Invalidate the get http cookie accept policy callbacks.
2058         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
2059         Send a message to the Web Process with the new value.
2060         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
2061         Keep track of the callback and send a message to the Web Process.
2062         (WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
2063         Invoke the callback.
2064         * UIProcess/mac/WebCookieManagerProxyMac.mm: Added.
2065         (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
2066         On Mac, also set the policy in the UI Process because the sandboxed Web Process cannot
2067         persist the policy.
2068         * UIProcess/WebCookieManagerProxy.h:
2069         * UIProcess/WebCookieManagerProxy.messages.in:
2070
2071         * WebKit2.pri:
2072         * WebKit2.pro:
2073         * WebKit2.xcodeproj/project.pbxproj:
2074         * win/WebKit2.vcproj:
2075         * win/WebKit2Common.vsprops:
2076
2077         * WebProcess/Cookies/WebCookieManager.cpp:
2078         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
2079         Call platformSetHTTPCookieAcceptPolicy.
2080         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
2081         Send the result of platformGetHTTPCookieAcceptPolicy to the UI Process.
2082         * WebProcess/Cookies/WebCookieManager.h:
2083         * WebProcess/Cookies/WebCookieManager.messages.in:
2084
2085         * WebProcess/Cookies/cf: Added.
2086         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Added.
2087         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2088         Set the policy on both the default cookie storage and any Private Browsing cookie storage.
2089         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2090         * WebProcess/Cookies/mac: Added.
2091         * WebProcess/Cookies/mac/WebCookieManagerMac.mm: Added.
2092         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2093         Set the policy on the default cookie storage and add a FIXME to set it on any Private
2094         Browsing cookie storage.
2095         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2096
2097         * WebProcess/Cookies/gtk: Added.
2098         * WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Added.
2099         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2100         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2101         * WebProcess/Cookies/qt: Added.
2102         * WebProcess/Cookies/qt/WebCookieManagerQt.cpp: Added.
2103         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2104         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2105
2106 2011-03-25  Brian Weinstein  <bweinstein@apple.com>
2107
2108         Reviewed by Alexey Proskuryakov.
2109
2110         REGRESSION(r79227): CFURLCache not initialized correctly in WebKit2
2111         https://bugs.webkit.org/show_bug.cgi?id=57109
2112         <rdar://problem/9184590>
2113         
2114         Check for a trailing Windows path separator, not a Unix path separator.
2115
2116         * UIProcess/win/WebContextWin.cpp:
2117         (WebKit::WebContext::platformInitializeWebProcess):
2118
2119 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2120
2121         Reviewed by Andreas Kling.
2122
2123         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
2124         https://bugs.webkit.org/show_bug.cgi?id=57087
2125
2126         Use explicit conversion for string to avoid depending on the default codec
2127         installed by the user code.
2128
2129         * Platform/qt/SharedMemoryQt.cpp:
2130         (WebKit::SharedMemory::create):
2131         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2132         (WebKit::initializeGTK):
2133         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
2134         (tst_QGraphicsWKView::loadEmptyPage):
2135         (tst_QGraphicsWKView::loadEmptyUrl):
2136         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp:
2137         (tst_QWKPage::loadEmptyUrl):
2138         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2139         (WebKit::ProcessLauncher::launchProcess):
2140         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2141         (WebKit::getPluginDisplay):
2142         * WebProcess/qt/WebProcessMainQt.cpp:
2143         (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
2144         (WebKit::WebProcessMainQt):
2145
2146 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
2147
2148         Correct project file missing $(WebKitVSPropsRedirectionDir)s
2149         after r81924.
2150
2151         * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir)
2152
2153 2011-03-25  Alejandro G. Castro  <alex@igalia.com>
2154
2155         Reviewed by Martin Robinson.
2156
2157         [WK2] Consider .c files in the generate-forwarding-headers script
2158         https://bugs.webkit.org/show_bug.cgi?id=56680
2159
2160         * Scripts/generate-forwarding-headers.pl:
2161
2162 2011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2163
2164         Unreviewed, rolling out r81916 and r81917.
2165         http://trac.webkit.org/changeset/81916
2166         http://trac.webkit.org/changeset/81917
2167         https://bugs.webkit.org/show_bug.cgi?id=57071
2168
2169         broke a test on platforms that do not have QuickTime installed
2170         (Requested by estes on #webkit).
2171
2172         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2173         (WebKit::WebFrameLoaderClient::objectContentType):
2174         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2175
2176 2011-03-24  Brady Eidson  <beidson@apple.com>
2177
2178         Reviewed by Darin Adler.
2179
2180         https://bugs.webkit.org/show_bug.cgi?id=57069
2181         Add WKIconDatabase api to the project files, and expose accessor on WKContext.
2182
2183         Project file stuffs:
2184         * GNUmakefile.am:
2185         * WebKit2.xcodeproj/project.pbxproj:
2186         * win/WebKit2.vcproj:
2187
2188         * Shared/API/c/WKBase.h:
2189         * UIProcess/API/C/WKAPICast.h:
2190
2191         * UIProcess/API/C/WKContext.cpp:
2192         (WKContextGetIconDatabase):
2193         * UIProcess/API/C/WKContext.h:
2194
2195         * UIProcess/API/C/WKIconDatabase.cpp: Added.
2196         (WKIconDatabaseGetTypeID):
2197         * UIProcess/API/C/WKIconDatabase.h: Added.
2198
2199         * UIProcess/WebContext.h:
2200         (WebKit::WebContext::iconDatabase):
2201
2202 2011-03-24  Brent Fulgham  <bfulgham@webkit.org>
2203
2204         Build correction.
2205
2206         Disable the CA Layer stuff when building with Cairo.
2207
2208         * win/WebKit2.vcproj:
2209
2210 2011-03-24  Brady Eidson  <beidson@apple.com>
2211
2212         Reviewed by Sam Weinig.
2213
2214         https://bugs.webkit.org/show_bug.cgi?id=57058
2215         Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
2216
2217         * UIProcess/WebIconDatabase.cpp:
2218         (WebKit::WebIconDatabase::WebIconDatabase):
2219         (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path.
2220         (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl.
2221         (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl.
2222         (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl.
2223         (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl.
2224         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with.
2225         (WebKit::WebIconDatabase::performImport):
2226         (WebKit::WebIconDatabase::didImportIconURLForPageURL):
2227         (WebKit::WebIconDatabase::didImportIconDataForPageURL):
2228         (WebKit::WebIconDatabase::didChangeIconForPageURL):
2229         (WebKit::WebIconDatabase::didRemoveAllIcons):
2230         (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions
2231           are now that they're available.
2232         * UIProcess/WebIconDatabase.h:
2233
2234         Add an IconDatabase logging channel:
2235         * Platform/Logging.cpp:
2236         (WebKit::initializeLogChannelsIfNecessary):
2237         * Platform/Logging.h:
2238
2239         * UIProcess/WebContext.cpp:
2240         (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
2241           opening it.
2242         * UIProcess/WebContext.h:
2243
2244 2011-03-24  Andy Estes  <aestes@apple.com>
2245
2246         Reviewed by Darin Adler.
2247
2248         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
2249         https://bugs.webkit.org/show_bug.cgi?id=49016
2250
2251         Update objectContentType() implementation to handle the
2252         shouldPreferPlugInsForImages flag.
2253
2254         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2255         (WebKit::WebFrameLoaderClient::objectContentType):
2256         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2257
2258 2011-03-24  Adam Roben  <aroben@apple.com>
2259
2260         Start compiling LayerTreeHostCA on Windows
2261
2262         Fixes <http://webkit.org/b/57060> WebKit2.vcproj should compile LayerTreeHostCA
2263
2264         Reviewed by Anders Carlsson.
2265
2266         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: Added.
2267         (WebKit::LayerTreeHostCA::platformInitialize):
2268         (WebKit::LayerTreeHostCA::scheduleLayerFlush):
2269         (WebKit::LayerTreeHostCA::platformInvalidate):
2270         (WebKit::LayerTreeHostCA::platformSizeDidChange):
2271         (WebKit::LayerTreeHostCA::platformForceRepaint):
2272         (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
2273         Stubbed out.
2274
2275         * win/WebKit2.vcproj: Added new files. Let VS reorder existing files.
2276
2277         * win/WebKit2Apple.vsprops: Added WebProcess\WebPage\ca to the include path.
2278
2279 2011-03-24  Jer Noble  <jer.noble@apple.com>
2280
2281         Unreviewed build fix.
2282
2283         Remove reference to LayerTreeHostMac.h from WebFullScreenManagerMac.mm.
2284
2285         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2286
2287 2011-03-24  Adam Roben  <aroben@apple.com>
2288
2289         Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm
2290
2291         Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows
2292
2293         Reviewed by Anders Carlsson.
2294
2295         * WebKit2.xcodeproj/project.pbxproj:
2296
2297         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.mm.
2298         (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some Mac-specific code to
2299         LayerTreeHostCAMac.mm.
2300         (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Wrapped some Mac-specific code in
2301         PLATFORM(MAC).
2302
2303         (WebKit::LayerTreeHostCA::invalidate):
2304         (WebKit::LayerTreeHostCA::sizeDidChange):
2305         (WebKit::LayerTreeHostCA::forceRepaint):
2306         Moved some Mac-specific code to LayerTreeHostCAMac.mm.
2307
2308         (WebKit::LayerTreeHostCA::performScheduledLayerFlush): Renamed from
2309         flushPendingLayerChangesRunLoopObserverCallback. Moved some code from here...
2310         (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush): ...to here. Moved some
2311         Mac-specific code to LayerTreeHostCAMac.mm.
2312
2313         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific
2314         declarations in PLATFORM(MAC).
2315
2316         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: Added.
2317         (WebKit::LayerTreeHostCA::platformInitialize):
2318         (WebKit::LayerTreeHostCA::scheduleLayerFlush):
2319         (WebKit::LayerTreeHostCA::platformInvalidate):
2320         (WebKit::LayerTreeHostCA::platformSizeDidChange):
2321         (WebKit::LayerTreeHostCA::platformForceRepaint):
2322         (WebKit::LayerTreeHostCA::flushPendingLayerChangesRunLoopObserverCallback):
2323         (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
2324         Code was extracted from LayerTreeHostCA.cpp.
2325
2326 2011-03-24  Adam Roben  <aroben@apple.com>
2327
2328         Rename LayerTreeHostMac to LayerTreeHostCA
2329
2330         This is the first step toward sharing code with Windows.
2331
2332         Fixes <http://webkit.org/b/57051>.
2333
2334         Reviewed by Anders Carlsson.
2335
2336         * WebKit2.xcodeproj/project.pbxproj:
2337         * WebProcess/WebPage/LayerTreeHost.cpp:
2338         (WebKit::LayerTreeHost::create):
2339         Updated for rename.
2340
2341         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h.
2342         * WebProcess/WebPage/ca/LayerTreeHostCA.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm.
2343
2344 2011-03-17  Jer Noble  <jer.noble@apple.com>
2345
2346         Reviewed by Maciej Stachowiak.
2347
2348         WebKit2: Cancelling full screen early leaves full screen window up.
2349         https://bugs.webkit.org/show_bug.cgi?id=56589
2350
2351         No new tests, as WebKitTestRunner does not currently support the new Full Screen API.
2352
2353         Notify the UIProcess when it needs to tear down its layer hosting view, turn off
2354         the background layer when not in accelerated rendering mode and don't swap out 
2355         the web view unnecessarily 
2356
2357         * UIProcess/mac/WKFullScreenWindowController.mm:
2358         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Check before swapping _webView.
2359         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:]): Add the _layerHostingView
2360             to the full screen window's animationView, not its contentsView.
2361         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Hide the background layer.
2362         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2363         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): If given a null rootLayer, tell
2364             the client to exit accelerated mode.
2365
2366 2011-03-24  Enrica Casucci  <enrica@apple.com>
2367
2368         Reviewed by Alexey Proskuryakov.
2369
2370         WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working.
2371         https://bugs.webkit.org/show_bug.cgi?id=56975
2372         <rdar://problem/8915066>
2373         
2374         Adding missing entry point to support Mac OS X services in WebKit2.
2375
2376         * UIProcess/API/mac/WKView.mm:
2377         (-[WKView readSelectionFromPasteboard:]): Added.
2378         * UIProcess/WebPageProxy.h:
2379         * UIProcess/mac/WebPageProxyMac.mm:
2380         (WebKit::WebPageProxy::readSelectionFromPasteboard): Added.
2381         * WebProcess/WebPage/WebPage.h:
2382         * WebProcess/WebPage/WebPage.messages.in: Added synchronous
2383         message.
2384         * WebProcess/WebPage/mac/WebPageMac.mm:
2385         (WebKit::WebPage::readSelectionFromPasteboard): Added.
2386
2387 2011-03-24  Jia Pu  <jpu@apple.com>
2388
2389         Reviewed by Darin Adler.
2390
2391         Dismissed reversion suggestion is incorrectly learned.
2392         https://bugs.webkit.org/show_bug.cgi?id=57039
2393
2394         CorrectionPanel should always use [NSSpellChecker dismissCorrectionBubbleForView].
2395         [NSSpellChecker cancelCorrectionBubbleForView] is reserved for situation where correction panel
2396         is dismissed explicitly by ESC key or clicking the dimiss button. Misusing these causes
2397         incorrect automatic learning.
2398
2399         * UIProcess/mac/CorrectionPanel.mm:
2400         (WebKit::CorrectionPanel::dismissInternal):
2401
2402 2011-03-24  Brian Weinstein  <bweinstein@apple.com>
2403
2404         Reviewed by Adam Roben.
2405
2406         WebKit2: Add Trackpoint driver hack to support IBM trackpads
2407         https://bugs.webkit.org/show_bug.cgi?id=49830
2408         <rdar://problem/8705951>
2409
2410         Copy code from WebKit1 to WebKit2 to handle initializing fake scrollbars so 
2411         IBM machines with a trackpad send us WM_VSCROLL and WM_HSCROLL messages.
2412
2413         Listen for the WM_VSCROLL and WM_HSCROLL messages, and turn the values into
2414         ScrollDirection and ScrollGranularity, and send a scroll command to the
2415         WebProcess.
2416
2417         * UIProcess/WebPageProxy.cpp:
2418         (WebKit::WebPageProxy::scrollBy): Send a message to the WebProcess.
2419         * UIProcess/WebPageProxy.h:
2420         * UIProcess/win/WebView.cpp:
2421         (WebKit::WebView::wndProc): Add WM_VSCROLL and WM_HSCROLL message handling.
2422         (WebKit::WebView::initialize): Call shouldInitializeTrackPointHack.
2423         (WebKit::WebView::onHorizontalScroll): Turn wParam into a ScrollDirection and ScrollGranularity. 
2424         (WebKit::WebView::onVerticalScroll): Ditto.
2425         (WebKit::WebView::shouldInitializeTrackPointHack): Check the registry for keys that indicate
2426             the machine has a IBM Trackpoint driver.
2427         * UIProcess/win/WebView.h:
2428         * WebProcess/WebPage/WebPage.cpp:
2429         (WebKit::WebPage::scrollBy): Call scroll method.
2430         (WebKit::WebPage::scroll): Moved from WebPageMac and WebPageWin.
2431         (WebKit::WebPage::logicalScroll): Ditto.
2432         * WebProcess/WebPage/WebPage.h:
2433         * WebProcess/WebPage/WebPage.messages.in: Add a new scrollBy message. 
2434         * WebProcess/WebPage/mac/WebPageMac.mm: Remove scroll and logicalScroll, they are now in WebPage.cpp.
2435         * WebProcess/WebPage/win/WebPageWin.cpp: Ditto.
2436
2437 2011-03-24  Sam Weinig  <sam@webkit.org>
2438
2439         Reviewed by Darin Adler.
2440
2441         Dictionary text extraction is not correctly detecting word boundaries on bing.com
2442         <rdar://problem/9078569>
2443         https://bugs.webkit.org/show_bug.cgi?id=56995
2444
2445         * Shared/DictionaryPopupInfo.cpp:
2446         (WebKit::DictionaryPopupInfo::encode):
2447         (WebKit::DictionaryPopupInfo::decode):
2448         * Shared/DictionaryPopupInfo.h:
2449         Add options dictionary.
2450
2451         * UIProcess/API/mac/PageClientImpl.mm:
2452         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2453         Add path that can pass options through.
2454
2455         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2456         (WebKit::WebContextMenuClient::lookUpInDictionary):
2457         Use the new performDictionaryLookupForSelection which can extract context
2458         if supported.
2459
2460         * WebProcess/WebPage/WebPage.h:
2461         * WebProcess/WebPage/mac/WebPageMac.mm:
2462         (WebKit::characterRangeAtPositionForPoint):
2463         (WebKit::characterRangeAtPoint):
2464         Split functionality out of characterRangeAtPoint and into 
2465         characterRangeAtPositionForPoint to avoid doing duplicate work 
2466         if you already have the position.
2467
2468         (WebKit::isPositionInRange):
2469         (WebKit::shouldUseSelection):
2470         Add predicate to determine if we should use the selection instead
2471         of expanding to find the word we are over.
2472
2473         (WebKit::WebPage::performDictionaryLookupAtLocation):
2474         If available, use the surrounding paragraph as context to get better extraction
2475         and to get lexicographical information about the word. Also, clean up and use 
2476         editing APIs to make the code more concise and understandable.
2477
2478         (WebKit::WebPage::performDictionaryLookupForSelection):
2479         Use similar logic as in performDictionaryLookupAtLocation to extract additional
2480         details from a selection for use in the dictionary popup.
2481
2482         (WebKit::WebPage::performDictionaryLookupForRange):
2483         Pass options to WebProcess if available.
2484
2485 2011-03-24  Jon Lee  <jonlee@apple.com>
2486
2487         Reviewed by Darin Adler.
2488
2489         WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
2490         <rdar://problem/8553962>
2491
2492         * WebProcess/WebPage/WebPage.cpp:
2493         (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame
2494
2495 2011-03-24  Brian Weinstein  <bweinstein@apple.com>
2496
2497         Rubber-stamped by Sam Weinig.
2498
2499         Fix a typo in the VK_LEFT case of performDefaultBehaviorForKeyEvent.
2500
2501         * WebProcess/WebPage/mac/WebPageMac.mm:
2502         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): It should be a logical or,
2503             not a bitwise or.
2504
2505 2011-03-24  Jeff Miller  <jeffm@apple.com>
2506
2507         Fix typo - USE(CF_NETWORK) should be USE(CFNETWORK).
2508
2509         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
2510         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): USE(CF_NETWORK) should be USE(CFNETWORK)
2511
2512 2011-03-23  Jia Pu  <jpu@apple.com>
2513
2514         Reviewed by Darin Adler.
2515
2516         Hook up new AppKit autocorrection UI with WK2.
2517         https://bugs.webkit.org/show_bug.cgi?id=56055
2518         <rdar://problem/8947463>
2519
2520         Please see WebCore/ChangeLog for detail.
2521
2522         The calls to AppKit are implemented in PageClientImpl. Other changes are necessary for the
2523         plumbing work.
2524
2525         * UIProcess/API/mac/PageClientImpl.h:
2526         * UIProcess/API/mac/PageClientImpl.mm:
2527         (WebKit::PageClientImpl::showCorrectionPanel):
2528         (WebKit::PageClientImpl::dismissCorrectionPanel):
2529         (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
2530         (WebKit::PageClientImpl::recordAutocorrectionResponse):
2531         * UIProcess/API/mac/WKView.mm:
2532         (-[WKView spellCheckerDocumentTag]):
2533         (-[WKView handleCorrectionPanelResult:]):
2534         * UIProcess/API/mac/WKViewPrivate.h:
2535         * UIProcess/PageClient.h:
2536         * UIProcess/WebPageProxy.cpp:
2537         (WebKit::WebPageProxy::didCommitLoadForFrame):
2538         (WebKit::WebPageProxy::showCorrectionPanel):
2539         (WebKit::WebPageProxy::dismissCorrectionPanel):
2540         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
2541         (WebKit::WebPageProxy::recordAutocorrectionResponse):
2542         (WebKit::WebPageProxy::handleCorrectionPanelResult):
2543         * UIProcess/WebPageProxy.h:
2544         * UIProcess/WebPageProxy.messages.in:
2545         * UIProcess/mac/CorrectionPanel.h: Added.
2546         (WebKit::CorrectionPanel::isShowing):
2547         * UIProcess/mac/CorrectionPanel.mm: Added.
2548         (correctionBubbleType):
2549         (WebKit::CorrectionPanel::CorrectionPanel):
2550         (WebKit::CorrectionPanel::~CorrectionPanel):
2551         (WebKit::CorrectionPanel::show):
2552         (WebKit::CorrectionPanel::dismiss):
2553         (WebKit::CorrectionPanel::dismissSoon):
2554         (WebKit::CorrectionPanel::dismissInternal):
2555         (WebKit::CorrectionPanel::recordAutocorrectionResponse):
2556         * WebKit2.xcodeproj/project.pbxproj:
2557         * WebProcess/WebCoreSupport/WebEditorClient.h:
2558         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2559         (WebKit::WebEditorClient::showCorrectionPanel):
2560         (WebKit::WebEditorClient::dismissCorrectionPanel):
2561         (WebKit::WebEditorClient::dismissCorrectionPanelSoon):
2562         (WebKit::WebEditorClient::recordAutocorrectionResponse):
2563         * WebProcess/WebPage/WebPage.cpp:
2564         (WebKit::WebPage::handleCorrectionPanelResult):
2565         * WebProcess/WebPage/WebPage.h:
2566         * WebProcess/WebPage/WebPage.messages.in:
2567
2568 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
2569
2570         Reviewed by Maciej Stachowiak.
2571
2572         WebKit2: Need API to manage the Media Cache
2573         https://bugs.webkit.org/show_bug.cgi?id=56878
2574         <rdar://problem/9082503>
2575
2576         Call through to HTMLMediaElement functions to manage the WebCore media cache.
2577
2578         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
2579         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
2580         (WebKit::WebMediaCacheManager::clearCacheForHostname):
2581         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
2582
2583 2011-03-23  Jeff Miller  <jeffm@apple.com>
2584
2585         Reviewed by Darin Adler.
2586
2587         Add WKBundleSetHostAllowsAnyHTTPSCertificate() for Windows
2588         https://bugs.webkit.org/show_bug.cgi?id=56972
2589         
2590         This is the WebKit2 equivalent to the WebKit1 API IWebMutableURLRequest::setAllowsAnyHTTPSCertificate().
2591
2592         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2593         (WKBundleSetHostAllowsAnyHTTPSCertificate): Added.
2594         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetHostAllowsAnyHTTPSCertificate().
2595         * WebProcess/InjectedBundle/InjectedBundle.h: Added setHostAllowsAnyHTTPSCertificate().
2596         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2597         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
2598         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
2599         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
2600         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
2601         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
2602         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
2603         (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added.
2604
2605 2011-03-23  Sam Weinig  <sam@webkit.org>
2606
2607         Reviewed by Anders Carlsson.
2608
2609         Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
2610
2611         This API is not necessary.
2612
2613         * Shared/WebPageCreationParameters.cpp:
2614         (WebKit::WebPageCreationParameters::encode):
2615         (WebKit::WebPageCreationParameters::decode):
2616         * Shared/WebPageCreationParameters.h:
2617         * UIProcess/API/mac/WKView.h:
2618         * UIProcess/API/mac/WKView.mm:
2619         (-[WKView initWithFrame:]):
2620         (-[WKView initWithFrame:contextRef:]):
2621         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2622         * UIProcess/WebPageProxy.cpp:
2623         (WebKit::WebPageProxy::creationParameters):
2624         * UIProcess/WebPageProxy.h:
2625         * WebProcess/WebPage/WebFrame.cpp:
2626         (WebKit::WebFrame::createMainFrame):
2627         * WebProcess/WebPage/WebFrame.h:
2628         * WebProcess/WebPage/WebPage.cpp:
2629         (WebKit::WebPage::WebPage):
2630
2631 2011-03-23  Balazs Kelemen  <kbalazs@webkit.org>
2632
2633         Reviewed by Andreas Kling.
2634
2635         [WK2] Handle keyboard and mouse events on X11
2636         https://bugs.webkit.org/show_bug.cgi?id=56103
2637
2638         Propagate keyboard and mouse events to the plugin
2639         as XEvent's.
2640
2641         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2642         (WebKit::initializeXEvent):
2643         (WebKit::xTimeStamp):
2644         (WebKit::xKeyModifiers):
2645         (WebKit::setCommonMouseEventFields):
2646         (WebKit::setXMotionEventFields):
2647         (WebKit::setXButtonEventFields):
2648         (WebKit::setXCrossingEventFields):
2649         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2650         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2651         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2652         (WebKit::setXKeyEventFields):
2653         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2654
2655 2011-03-23  Anders Carlsson  <andersca@apple.com>
2656
2657         Reviewed by Sam Weinig.
2658
2659         Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not
2660         https://bugs.webkit.org/show_bug.cgi?id=56954
2661
2662         This is so we'll eventually be able to send sync messages that aren't processed immediately if the 
2663         destination is waiting for a reply to another synchronous message.
2664
2665         * Platform/CoreIPC/Connection.cpp:
2666         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
2667         Only check for the DispatchMessageWhenWaitingForSyncReply flag.
2668
2669         (CoreIPC::Connection::sendSyncMessage):
2670         Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID.
2671
2672         * Platform/CoreIPC/Connection.h:
2673         (CoreIPC::Connection::sendSync):        
2674         (CoreIPC::Connection::deprecatedSendSync):
2675         No need to add SyncMessage here anymore.
2676
2677 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
2678
2679         Qt Build Fix.
2680
2681         * DerivedSources.pro:
2682
2683 2011-03-22  Brian Weinstein  <bweinstein@apple.com>
2684
2685         Reviewed by Darin Adler.
2686
2687         WebKit2: Need API to manage the Media Cache
2688         https://bugs.webkit.org/show_bug.cgi?id=56878
2689         <rdar://problem/9082503>
2690
2691         Project File Fun:
2692         * GNUmakefile.am:
2693         * WebKit2.pri:
2694         * WebKit2.pro:
2695         * WebKit2.xcodeproj/project.pbxproj:
2696         * win/WebKit2.vcproj:
2697         * win/WebKit2Common.vsprops:
2698         * win/WebKit2Generated.make:
2699         
2700         Derived Sources and API fun:
2701         * DerivedSources.make:
2702         * DerivedSources.pro:
2703         * Platform/CoreIPC/MessageID.h:
2704         * Shared/API/c/WKBase.h:
2705         * Shared/APIObject.h:
2706         * UIProcess/API/C/WKAPICast.h:
2707         
2708         * UIProcess/WebProcessProxy.cpp:
2709         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages.
2710         * WebProcess/WebProcess.cpp:
2711         (WebKit::WebProcess::didReceiveMessage): Ditto.
2712         
2713         * UIProcess/WebContext.cpp:
2714         (WebKit::WebContext::WebContext): Initialize the WebMediaCacheManagerProxy member variable.
2715         (WebKit::WebContext::~WebContext): Invalidate the WebMediaCacheManagerProxy.
2716         (WebKit::WebContext::disconnectProcess): Ditto.
2717         (WebKit::WebContext::didReceiveMessage): Add a case for MediaCache messages.
2718         * UIProcess/WebContext.h:
2719         (WebKit::WebContext::mediaCacheManagerProxy):
2720
2721         * UIProcess/API/C/WKContext.cpp:
2722         (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager.
2723         * UIProcess/API/C/WKContext.h:
2724
2725         * UIProcess/API/C/WKMediaCacheManager.cpp: Added.
2726         (WKMediaCacheManagerGetTypeID): Returns the WebMediaCacheManagerProxy type.
2727         (WKMediaCacheManagerGetHostnamesWithMediaCache): Calls down to the WebMediaCacheManagerProxy.
2728         (WKMediaCacheManagerClearCacheForHostname): Ditto.
2729         (WKMediaCacheManagerClearCacheForAllHostnames): Ditto.
2730         * UIProcess/API/C/WKMediaCacheManager.h: Added.
2731
2732         * UIProcess/WebMediaCacheManagerProxy.cpp: Added.
2733         (WebKit::WebMediaCacheManagerProxy::create):
2734         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
2735         (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy):
2736         (WebKit::WebMediaCacheManagerProxy::invalidate):
2737         (WebKit::WebMediaCacheManagerProxy::didReceiveMessage):
2738         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Call through to the WebProcess.
2739         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Process the WebProcess response,
2740             and call the callback.
2741         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Call through to the WebProcess.
2742         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Call through to the WebProcess.
2743         * UIProcess/WebMediaCacheManagerProxy.h: Added.
2744         (WebKit::WebMediaCacheManagerProxy::clearContext):
2745         (WebKit::WebMediaCacheManagerProxy::type):
2746         * UIProcess/WebMediaCacheManagerProxy.messages.in: Added.
2747
2748         * WebProcess/MediaCache: Added.
2749         * WebProcess/MediaCache/WebMediaCacheManager.cpp: Added.
2750         (WebKit::WebMediaCacheManager::shared):
2751         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
2752         (WebKit::WebMediaCacheManager::didReceiveMessage):
2753         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Added a FIXME to call through to WebCore.
2754         (WebKit::WebMediaCacheManager::clearCacheForHostname): Ditto.
2755         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Ditto.
2756         * WebProcess/MediaCache/WebMediaCacheManager.h: Added.
2757         * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Added.
2758
2759 2011-03-22  Brady Eidson  <beidson@apple.com>
2760
2761         Reviewed by Sam Weinig.
2762
2763         Add asynchronous load decision call to WebKit2 IconDatabase
2764         https://bugs.webkit.org/show_bug.cgi?id=56887
2765
2766         * UIProcess/WebIconDatabase.cpp:
2767         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): In the future, get the actual load decision from the database.
2768           For now, always message "IconLoadNo" back to the WebProcess.
2769         * UIProcess/WebIconDatabase.h:
2770         * UIProcess/WebIconDatabase.messages.in:
2771         
2772         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2773         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Message the UIProcess for the load decision.
2774         (WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Callback into WebCore with the received load decision.
2775         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
2776         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
2777
2778 2011-03-23  Chris Fleizach  <cfleizach@apple.com>
2779
2780         Reviewed by Darin Adler.
2781
2782         REGRESSION: WK2: AX: PDF in Safari no longer accessible.
2783         https://bugs.webkit.org/show_bug.cgi?id=56849
2784
2785         The WKView needs to know when to return the WKPDFView and when to return
2786         the remote web process connection.
2787
2788         * UIProcess/API/mac/PDFViewController.h:
2789         (WebKit::PDFViewController::pdfView):
2790         * UIProcess/API/mac/WKView.mm:
2791         (-[WKView accessibilityFocusedUIElement]):
2792         (-[WKView accessibilityHitTest:]):
2793         (-[WKView accessibilityAttributeValue:]):
2794
2795 2011-03-21  Stephanie Lewis  <slewis@apple.com>
2796
2797         Reviewed by Simon Fraser.
2798
2799         https://bugs.webkit.org/show_bug.cgi?id=56798
2800         Wrap autorelease pools around calls that can have pathological memory growth on Membuster.  
2801         Only wrap the main runloop because some background threads are not expected to call into 
2802         objc and an autorelease pool could mask bugs.
2803
2804         * Platform/mac/RunLoopMac.mm:
2805         (RunLoop::performWork):
2806         (RunLoop::TimerBase::timerFired):
2807         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2808         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
2809
2810 2011-03-22  Anders Carlsson  <andersca@apple.com>
2811
2812         Reviewed by Sam Weinig.
2813
2814         OBJECT element with DivX source is always downloaded
2815         https://bugs.webkit.org/show_bug.cgi?id=56879
2816
2817         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2818         (WebKit::getPluginInfoFromPropertyLists):
2819         Always try to split every element in the "WebPluginExtensions" array, since the DivX plug-in
2820         specifies multiple file extensions in a single element.
2821         
2822         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2823         (WebKit::pluginSupportsExtension):
2824         Add a new helper function.
2825
2826         (WebKit::WebFrameLoaderClient::objectContentType):
2827         If we can't find the MIME for an extension, explicitly check if there's a plugin that claims to
2828         handle the given extension.
2829
2830 2011-03-22  Brady Eidson  <beidson@apple.com>
2831
2832         Reviewed by Sam Weinig.
2833
2834         Rename the synchronous icon database messages to be prefixed with "synchronous"
2835
2836         * UIProcess/WebIconDatabase.cpp:
2837         (WebKit::WebIconDatabase::synchronousIconDataForPageURL):
2838         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
2839         (WebKit::WebIconDatabase::synchronousIconDataKnownForIconURL):
2840         (WebKit::WebIconDatabase::synchronousLoadDecisionForIconURL):
2841         * UIProcess/WebIconDatabase.h:
2842         * UIProcess/WebIconDatabase.messages.in:
2843
2844         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2845         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
2846
2847 2011-03-22  Sam Weinig  <sam@webkit.org>
2848
2849         Rubber-stamped by Anders Carlsson.
2850
2851         Loading a new tab does not dismiss Lookup
2852         <rdar://problem/9138391> 
2853
2854         * UIProcess/API/mac/WKView.mm:
2855         (-[WKView viewDidMoveToWindow]):
2856         Hide the dictionary popup when moving the WKView out of a window.
2857
2858 2011-03-22  Anders Carlsson  <andersca@apple.com>
2859
2860         Reviewed by Sam Weinig.
2861
2862         Microsoft Silverlight playback shows artifacts
2863         https://bugs.webkit.org/show_bug.cgi?id=56863
2864         <rdar://problem/9103136>
2865
2866         * PluginProcess/PluginControllerProxy.cpp:
2867         (WebKit::PluginControllerProxy::paint):
2868         If the plug-in is transparent, clear the dirty rect before painting.
2869
2870         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2871         (WebKit::NetscapePluginModule::determineQuirks):
2872         Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins.
2873
2874         * Shared/Plugins/PluginQuirks.h:
2875         Add MakeTransparentIfBackgroundAttributeExists quirk.
2876
2877         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2878         (WebKit::NPN_SetValue):
2879         Handle NPPVpluginTransparentBool.
2880
2881         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2882         (WebKit::NetscapePlugin::NetscapePlugin):
2883         Initialize m_isTransparent to false.
2884
2885         (WebKit::NetscapePlugin::setIsTransparent):
2886         Set m_isTransparent.
2887
2888         (WebKit::NetscapePlugin::initialize):
2889         If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent
2890         if there's a 'background' attribute.
2891
2892         (WebKit::NetscapePlugin::isTransparent):
2893         Add getter.
2894
2895         * WebProcess/Plugins/Plugin.h:
2896         Add isTransparent().
2897
2898         * WebProcess/Plugins/PluginProxy.cpp:
2899         (WebKit::PluginProxy::paint):
2900         Always copy the plug-in backing store to the plug-in proxy backing store.
2901
2902         (WebKit::PluginProxy::isTransparent):
2903         Add getter that should never be called.
2904
2905         (WebKit::PluginProxy::update):
2906         Always copy the plug-in backing store to the plug-in proxy backing store.
2907
2908 2011-03-22  Anders Carlsson  <andersca@apple.com>
2909
2910         Reviewed by Sam Weinig.
2911
2912         Crash when calling PluginProxy::evaluate on a destroyed plug-in
2913         https://bugs.webkit.org/show_bug.cgi?id=56848
2914         <rdar://problem/9168975>
2915
2916         Return early if the NPObject doesn't exist anymore.
2917
2918         * WebProcess/Plugins/PluginProxy.cpp:
2919         (WebKit::PluginProxy::evaluate):
2920
2921 2011-03-22  Sam Weinig  <sam@webkit.org>
2922
2923         Reviewed by Adam Roben.
2924
2925         WebKit2: Cannot make a selection past the end of the visible page (no autoscrolling)
2926         <rdar://problem/8823874>
2927         https://bugs.webkit.org/show_bug.cgi?id=56847
2928
2929         * Shared/mac/WebEventFactory.mm:
2930         (WebKit::currentMouseButton):
2931         (WebKit::mouseButtonForEvent):
2932         Add mouse button for mouseEnter/Exit events. [NSEvent buttonNumber] doesn't seem to give the right result
2933         for these events, but getting the currentMouseButton does work.
2934
2935 2011-03-21  Brady Eidson  <beidson@apple.com>
2936
2937         Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783
2938
2939         * Platform/mac/Logging.mac.mm:
2940
2941 2011-03-21  Brady Eidson  <beidson@apple.com>
2942
2943         Reviewed by Brian Weinstein.
2944
2945         https://bugs.webkit.org/show_bug.cgi?id=56783
2946         Actually hook up WebKit2 logging on Mac.
2947
2948         * Platform/Logging.cpp:
2949         (WebKit::initializeLogChannel):
2950         * Platform/Logging.h:
2951         * Platform/mac/Logging.mac.mm: Added.
2952         (WebKit::initializeLogChannel):
2953  
2954        * UIProcess/WebContext.cpp:
2955         (WebKit::WebContext::WebContext): Initialize logging if necessary.
2956
2957         * WebKit2.xcodeproj/project.pbxproj:
2958
2959 2011-03-21  Alexey Proskuryakov  <ap@apple.com>
2960
2961         Reviewed by Darin Adler.
2962
2963         REGRESSION (r81269): WebKit2 gets into an infinite recursion after an unhandled command key
2964         https://bugs.webkit.org/show_bug.cgi?id=56782
2965         <rdar://problem/9151993>
2966
2967         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
2968         Factored out code for resending an event and moved it to WKView.
2969
2970         * UIProcess/API/mac/WKView.mm:
2971         (-[WKView performKeyEquivalent:]): Don't zero out _keyDownEventBeingResent, it's easier
2972         to just do that in _resendKeyDownEvent:.
2973         (-[WKView keyDown:]): Ditto.
2974         (-[WKView _resendKeyDownEvent:]): Moved from PageClientImpl.mm. Added an assertion that we
2975         are not already resending an event - it would be too confusing if we ever had to do that,
2976         but looks like this never happens.
2977
2978         * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent.
2979
2980 2011-03-21  Anders Carlsson  <andersca@apple.com>
2981
2982         Reviewed by Sam Weinig.
2983
2984         QT plug-in fails to load contextual menu
2985         https://bugs.webkit.org/show_bug.cgi?id=56777
2986         <rdar://problem/8979033>
2987
2988         Open a Carbon resource map and make it the current map when calling NP_Initialize.
2989
2990         * Platform/Module.cpp:
2991         (WebKit::Module::Module):
2992         Initialize m_bundleResourceMap to -1.
2993
2994         * Platform/Module.h:
2995         Add m_bundleResourceMap.
2996
2997         * Platform/mac/ModuleMac.mm:
2998         (WebKit::Module::unload):
2999         Close the resource map.
3000
3001         (WebKit::Module::bundleResourceMap):
3002         Open a resource map if necessary.
3003
3004         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3005         (WebKit::NetscapePluginModule::tryLoad):
3006         Get the resource map and make it current before calling NP_Initialize.
3007
3008 2011-03-21  Anders Carlsson  <andersca@apple.com>
3009
3010         Reviewed by Sam Weinig.
3011
3012         Plug-in process crashes if it fails to load a plug-in module
3013         https://bugs.webkit.org/show_bug.cgi?id=56775
3014
3015         * PluginProcess/PluginControllerProxy.cpp:
3016         (WebKit::PluginControllerProxy::initialize):
3017         If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in.
3018
3019         * PluginProcess/WebProcessConnection.cpp:
3020         (WebKit::WebProcessConnection::removePluginControllerProxy):
3021         Remove an incorrect assertion. Don't invalidate the remote object map if the plug-in is null.
3022
3023 2011-03-21  Anders Carlsson  <andersca@apple.com>
3024
3025         Reviewed by Sam Weinig.
3026
3027         QT plug-in loads controller at top of movie not bottom
3028         https://bugs.webkit.org/show_bug.cgi?id=56764
3029         <rdar://problem/8979037>
3030
3031         Create a layer with geometryFlipped set and add the plug-in layer as a sublayer,
3032         matching WebKit1.
3033
3034         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3035         (WebKit::NetscapePlugin::platformPostInitialize):
3036
3037 2011-03-21  Sam Weinig  <sam@webkit.org>
3038
3039         Reviewed by Anders Carlsson.
3040
3041         WebKit2 needs preferences to change security knobs
3042         https://bugs.webkit.org/show_bug.cgi?id=56762
3043
3044         Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed
3045         and FileAccessFromFileURLsAllowed.
3046
3047         * Shared/WebPreferencesStore.h:
3048         * UIProcess/API/C/WKPreferences.cpp:
3049         (WKPreferencesSetWebSecurityEnabled):
3050         (WKPreferencesGetWebSecurityEnabled):
3051         (WKPreferencesSetUniversalAccessFromFileURLsAllowed):
3052         (WKPreferencesGetUniversalAccessFromFileURLsAllowed):
3053         (WKPreferencesSetFileAccessFromFileURLsAllowed):
3054         (WKPreferencesGetFileAccessFromFileURLsAllowed):
3055         * UIProcess/API/C/WKPreferencesPrivate.h:
3056         * WebProcess/WebPage/WebPage.cpp:
3057         (WebKit::WebPage::updatePreferences):
3058
3059 2011-03-21  Sam Weinig  <sam@webkit.org>
3060
3061         Reviewed by Anders Carlsson.
3062
3063         Remove old DrawingArea and LayerHostingView code from WKView.
3064
3065         * UIProcess/API/mac/WKView.mm:
3066         (-[WKView drawRect:]):
3067         (-[WKView hitTest:]):
3068         (-[WKView WebKit::]):
3069
3070 2011-03-21  Sam Weinig  <sam@webkit.org>
3071
3072         Reviewed by Anders Carlsson.
3073
3074         Need WebKit2 API for creating a page with a specific main frame name
3075         https://bugs.webkit.org/show_bug.cgi?id=56759
3076
3077         * Shared/WebPageCreationParameters.cpp:
3078         (WebKit::WebPageCreationParameters::encode):
3079         (WebKit::WebPageCreationParameters::decode):
3080         * Shared/WebPageCreationParameters.h:
3081         Add mainFrameName to creation parameters.
3082
3083         * UIProcess/API/mac/WKView.h:
3084         * UIProcess/API/mac/WKView.mm:
3085         (-[WKView initWithFrame:]):
3086         (-[WKView initWithFrame:contextRef:]):
3087         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3088         (-[WKView initWithFrame:contextRef:pageGroupRef:mainFrameName:]):
3089         Add new initializer which takes a main frame name.
3090
3091         * UIProcess/WebPageProxy.cpp:
3092         (WebKit::WebPageProxy::setMainFrameName):
3093         (WebKit::WebPageProxy::creationParameters):
3094         * UIProcess/WebPageProxy.h:
3095         Store the main frame name for initialization/re-initialization.
3096
3097         * WebProcess/WebPage/WebFrame.cpp:
3098         (WebKit::WebFrame::createMainFrame):
3099         * WebProcess/WebPage/WebFrame.h:
3100         * WebProcess/WebPage/WebPage.cpp:
3101         (WebKit::WebPage::WebPage):
3102         Pass the name to main frame creation.
3103
3104 2011-03-20  Bill Budge  <bbudge@chromium.org>
3105
3106         Reviewed by Adam Barth.
3107
3108         Rename ThreadSafeShared to ThreadSafeRefCounted
3109         https://bugs.webkit.org/show_bug.cgi?id=56714
3110
3111         No new tests. Exposes no new functionality.
3112
3113         * Platform/CoreIPC/Connection.h:
3114         * Platform/WorkQueue.h:
3115         * Platform/win/WorkQueueWin.cpp:
3116         * UIProcess/Launcher/ProcessLauncher.h:
3117         * UIProcess/Launcher/ThreadLauncher.h:
3118
3119 2011-03-19  Anton D'Auria  <adauria@apple.com>
3120
3121         Reviewed by Alexey Proskuryakov.
3122
3123         ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
3124         https://bugs.webkit.org/show_bug.cgi?id=56415
3125
3126         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin
3127         instead of ApplicationCacheStorage::deleteEntriesForOrigin.
3128         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
3129
3130 2011-03-18  Sam Weinig  <sam@webkit.org>
3131
3132         Attempt to fix the WinCairo build.
3133
3134         * win/WebKit2.vcproj:
3135
3136 2011-03-18  Anders Carlsson  <andersca@apple.com>
3137
3138         Reviewed by Dan Bernstein.
3139
3140         Empty gray page after going back from a PDF
3141         https://bugs.webkit.org/show_bug.cgi?id=56694
3142         <rdar://problem/8811854>
3143
3144         Update m_frameHasCustomRepresentation when loading a page that's in the page cache.
3145
3146         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3147         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
3148
3149 2011-03-18  Anders Carlsson  <andersca@apple.com>
3150
3151         Reviewed by Sam Weinig.
3152
3153         Crash when sending a sync message ends up invalidating the connection
3154         https://bugs.webkit.org/show_bug.cgi?id=56686
3155         <rdar://problem/9048781>
3156
3157         Guard against a null client.
3158
3159         * Platform/CoreIPC/Connection.cpp:
3160         (CoreIPC::Connection::sendSyncMessage):
3161
3162 2011-03-18  Balazs Kelemen  <kbalazs@webkit.org>
3163
3164         Reviewed by Benjamin Poulain.
3165
3166         [Qt][WK2] Need a way to debug the web process after the UI process dies
3167         https://bugs.webkit.org/show_bug.cgi?id=56116
3168
3169         Allow the web process to outlive it's parent process
3170         in debug builds if the QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS
3171         environment variable is set.
3172
3173         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3174         (WebKit::QtWebProcess::setupChildProcess): Used getenv
3175         since the prctl call is already in a Linux-only block
3176         and the implementation in this file is a candidate
3177         for sharing across ports in the future.
3178
3179 2011-03-18  Darin Adler  <darin@apple.com>
3180
3181         Reviewed by Anders Carlsson.
3182
3183         Command-period does not stop load when page has focus in WebKit2
3184         https://bugs.webkit.org/show_bug.cgi?id=56601
3185
3186         * UIProcess/API/mac/WKView.mm:
3187         (-[WKView doCommandBySelector:]): If called outside interpretKeyEvents,
3188         call through to super.
3189         (-[WKView insertText:]): Assert that we are inside interpretKeyEvents.
3190         (-[WKView unmarkText]): Ditto.
3191         (-[WKView setMarkedText:selectedRange:]): Ditto.
3192         (-[WKView _interceptKeyEvent:]): Set a flag to indicate we are inside
3193         interpretKeyEvents for use by the above.
3194
3195 2011-03-18  Brady Eidson  <beidson@apple.com>
3196
3197         Reviewed by Sam Weinig.
3198
3199         https://bugs.webkit.org/show_bug.cgi?id=56425
3200         More groundwork for WebKit2 IconDatabase
3201
3202         -Update the synchronous method names to be prefixed with "synchronous."
3203         -Add empty implementations for the asynchronous accessors.
3204
3205         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
3206         (WebKit::WebIconDatabaseProxy::setEnabled):
3207         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
3208         (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
3209         (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
3210         (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
3211         (WebKit::WebIconDatabaseProxy::supportsAsynchronousMode):
3212         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
3213         (WebKit::WebIconDatabaseProxy::iconDataForIconURL):
3214         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
3215
3216 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
3217
3218         Reviewed by Martin Robinson.
3219
3220         Fixed compilation after r80925.
3221
3222         * GNUmakefile.am:
3223         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: Added.
3224         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
3225         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
3226         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
3227         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
3228         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
3229         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
3230         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
3231         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
3232         (WebKit::WebFullScreenManagerProxy::getFullScreenRect):
3233         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Added.
3234         (WebKit::WebFullScreenManagerGtk::WebFullScreenManagerGtk):
3235         (WebKit::WebFullScreenManager::create):
3236         (WebKit::WebFullScreenManagerGtk::setRootFullScreenLayer):
3237         (WebKit::WebFullScreenManagerGtk::beginEnterFullScreenAnimation):
3238         (WebKit::WebFullScreenManagerGtk::beginExitFullScreenAnimation):
3239         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Added.
3240
3241 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
3242
3243         Unreviewed, fixed compilation after r81208.
3244
3245         * GNUmakefile.am:
3246
3247 2011-03-18  John Sullivan  <sullivan@apple.com>
3248
3249         Reviewed by Dan Bernstein.
3250
3251         https://bugs.webkit.org/show_bug.cgi?id=56645
3252         Assertion fires when hidden Find-on-Page matches are encountered in WebKit2
3253
3254         * WebProcess/WebPage/FindController.cpp:
3255         (WebKit::FindController::updateFindIndicator):
3256         Bail out if the selection rect is empty, before trying to generate an appropriately-sized
3257         bitmap. (Previously it was bailing out afterwards, but encountering an assertion in debug
3258         builds along the way.)
3259
3260 2011-03-18  Mark Rowe  <mrowe@apple.com>
3261
3262         Rubber-stamped by Jon Honeycutt.
3263
3264         <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only
3265
3266         Fix a bogus change from r81392 that made PluginProcessShim.xcconfig import DebugRelease.xcconfig.
3267         As its name suggests, DebugRelease.xcconfig is only applicable for the debug and release configurations.
3268         It overrides the valid build architectures and also restricts the build to only the active architecture.
3269         
3270         * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what
3271         each target-specific .xcconfig file should import.
3272
3273 2011-03-17  Mark Rowe  <mrowe@apple.com>
3274
3275         Fix the build.
3276
3277         * WebKit2.xcodeproj/project.pbxproj:
3278
3279 2011-03-17  Anders Carlsson  <andersca@apple.com>
3280
3281         Reviewed by Sam Weinig.
3282
3283         Implement PluginProcessProxy::setFullscreenWindowIsShowing
3284         https://bugs.webkit.org/show_bug.cgi?id=56618
3285
3286         * UIProcess/Plugins/PluginProcessProxy.cpp:
3287         (WebKit::PluginProcessProxy::PluginProcessProxy):
3288         Initialize m_fullscreenWindowIsShowing.
3289
3290         (WebKit::PluginProcessProxy::didClose):
3291         if m_fullscreenWindowIsShowing is true, call exitFullscreen.
3292
3293         * UIProcess/Plugins/PluginProcessProxy.h:
3294         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3295         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
3296         Add helper function for getting a PSN for the plug-in process.
3297
3298         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
3299         Make the plug-in process the front process.
3300
3301         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
3302         Make the current process (the UI process) the front process.
3303
3304         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
3305         Call enterFullscreen or exitFullscreen.
3306
3307         (WebKit::PluginProcessProxy::enterFullscreen):
3308         Make the plug-in process the front process and hide the menu bar.
3309
3310         (WebKit::PluginProcessProxy::exitFullscreen):
3311         Show the menu bar and if necessary make the UI process the front process.
3312
3313         (WebKit::PluginProcessProxy::endModal):
3314         call makeUIProcessTheFrontProcess.
3315
3316         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
3317         Call makePluginProcessTheFrontProcess.
3318
3319 2011-03-17  Adam Roben  <aroben@apple.com>
3320
3321         Make bidi text in <select> menus in WebKit2 on Windows match WebKit1
3322
3323         Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release
3324         (WebKit2 Tests)
3325
3326         Reviewed by Sam Weinig.
3327
3328         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3329         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
3330         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
3331         On Windows, return the same values we return in WebKit1.
3332
3333 2011-03-17  Anders Carlsson  <andersca@apple.com>
3334
3335         Reviewed by Sam Weinig.
3336
3337         Implement PluginProcessProxy::setModalWindowIsShowing
3338         https://bugs.webkit.org/show_bug.cgi?id=56615
3339
3340         * UIProcess/Plugins/PluginProcessProxy.cpp:
3341         (WebKit::PluginProcessProxy::PluginProcessProxy):
3342         Initialize m_modalWindowIsShowing.
3343
3344         (WebKit::PluginProcessProxy::didClose):
3345         If m_modalWindowIsShowing is true, we must call endModal.
3346
3347         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3348         (-[WKPlaceholderModalWindow _wantsUserAttention]):
3349         Add a WKPlaceholderModalWindow.
3350
3351         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
3352         Call beginModal or endModal depending on whether we're showing a modal window or not.
3353
3354         (WebKit::PluginProcessProxy::beginModal):
3355         Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications.
3356
3357         (WebKit::PluginProcessProxy::endModal):
3358         Tear down the window and the run loop.
3359
3360         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
3361         Make sure that the plug-in process is frontmost.
3362
3363 2011-03-17  Jeff Miller  <jeffm@apple.com>
3364
3365         Reviewed by Adam Roben.
3366
3367         Web page shouldn't swallow alt-key combinations on Windows
3368         https://bugs.webkit.org/show_bug.cgi?id=56612
3369         
3370         Make Alt+Left Arrow and Alt+Right Arrow go back and forward, but make
3371         sure any alt-key combinations bubble up to the client.
3372
3373         * WebProcess/WebPage/win/WebPageWin.cpp:
3374         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Make Alt+Left Arrow and Alt+Right Arrow go back and forward, ignore any other alt-key combinations.
3375
3376 2011-03-17  Anders Carlsson  <andersca@apple.com>
3377
3378         Reviewed by Sam Weinig.
3379
3380         Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process
3381         https://bugs.webkit.org/show_bug.cgi?id=56610
3382
3383         * PluginProcess/mac/PluginProcessMac.mm:
3384         (WebKit::FullscreenWindowTracker::FullscreenWindowTracker):
3385         Add fullscreen window tracker class.
3386
3387         (WebKit::rectCoversAnyScreen):
3388         Return whether the given rect covers any screen.
3389
3390         (WebKit::windowCoversAnyScreen):
3391         Return whether the given window covers any screen.
3392
3393         (WebKit::FullscreenWindowTracker::windowShown):
3394         If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
3395
3396         (WebKit::FullscreenWindowTracker::windowHidden):
3397         If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
3398
3399         (WebKit::cocoaWindowShown):
3400         (WebKit::cocoaWindowHidden):
3401         (WebKit::carbonWindowShown):
3402         (WebKit::carbonWindowHidden):
3403         Call the window tracking functions.
3404
3405         (WebKit::setModal):
3406         Call PluginProcess::setModalWindowIsShowing.
3407
3408         (WebKit::PluginProcess::setModalWindowIsShowing):
3409         (WebKit::PluginProcess::setFullscreenWindowIsShowing):
3410         Send CoreIPC messages.
3411
3412         * UIProcess/Plugins/PluginProcessProxy.h:
3413         * UIProcess/Plugins/PluginProcessProxy.messages.in:
3414         Add new messages.
3415
3416         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3417         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
3418         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
3419         Add stubs.
3420
3421 2011-03-17  Sam Weinig  <sam@webkit.org>
3422
3423         Reviewed by Brady Eidson.
3424
3425         Allow passing a certificate chain as a user message
3426         <rdar://problem/8951709>
3427         https://bugs.webkit.org/show_bug.cgi?id=56605
3428
3429         * Shared/API/c/mac/WKCertificateInfoMac.h:
3430         * Shared/API/c/mac/WKCertificateInfoMac.mm:
3431         (WKCertificateInfoCreateWithCertficateChain):
3432         Added. Creates a WKCertificate from a certificate chain.
3433
3434         * Shared/UserMessageCoders.h:
3435         (WebKit::UserMessageEncoder::baseEncode):
3436         (WebKit::UserMessageDecoder::baseDecode):
3437         Add encoding/decoding of WebCertificateInfo.
3438
3439 2011-03-17  Anders Carlsson  <andersca@apple.com>
3440
3441         Reviewed by Sam Weinig.
3442
3443         Add PluginProcessShim hooks for when windows are shown and hidden
3444         https://bugs.webkit.org/show_bug.cgi?id=56597
3445
3446         * Configurations/PluginProcessShim.xcconfig:
3447         Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h.
3448
3449         * PluginProcess/mac/PluginProcessMac.mm:
3450         (WebKit::cocoaWindowShown):
3451         (WebKit::cocoaWindowHidden):
3452         (WebKit::carbonWindowShown):
3453         (WebKit::carbonWindowHidden):
3454         (WebKit::setModal):
3455         (WebKit::PluginProcess::initializeShim):
3456         Add empty stubs.
3457
3458         * PluginProcess/mac/PluginProcessShim.h:
3459         * PluginProcess/mac/PluginProcessShim.mm:
3460         (WebKit::beginModal):
3461         (WebKit::endModal):
3462         Keep a modal count and call setModal accordingly.
3463
3464         (WebKit::shim_NSApplication_RunModalForWindow):
3465         (WebKit::shimModalDialog):
3466         (WebKit::shimAlert):
3467         Call beginModal/endModal.
3468
3469         (WebKit::shimShowWindow):
3470         (WebKit::shimHideWindow):
3471         Call the shim functions.
3472         
3473         (WebKit::WebKitPluginProcessShimInitialize):
3474         Listen for notifications and call the necessary shim functions.
3475
3476         * WebKit2.xcodeproj/project.pbxproj:
3477         Link the plug-in process shim with AppKit and QuartzCore and WKSI.
3478
3479 2011-03-17  Jeff Miller  <jeffm@apple.com>
3480
3481         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
3482         
3483         *.mode*
3484         *.pbxuser
3485         *.perspective*
3486         project.xcworkspace
3487         xcuserdata
3488
3489         * WebKit2.xcodeproj: Modified property svn:ignore.
3490
3491 2011-03-17  Sam Weinig  <sam@webkit.org>
3492
3493         Reviewed by Anders Carlsson.
3494
3495         WKErrors need the PeerCertificateChain for certificate errors
3496         <rdar://problem/8951784>
3497         https://bugs.webkit.org/show_bug.cgi?id=56592
3498
3499         * Shared/WebCoreArgumentCoders.h:
3500         Special case encoding/decoding of ResourceErrors for the mac.
3501
3502         * Shared/mac/PlatformCertificateInfo.h:
3503         * Shared/mac/PlatformCertificateInfo.mm:
3504         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
3505         Add constructor that take the PeerCertificateChain as CFArrayRef.
3506
3507         * Shared/mac/WebCoreArgumentCodersMac.mm:
3508         (CoreIPC::encodeResourceError):
3509         (CoreIPC::decodeResourceError):
3510         Add encode/decode for ResourceError using the underlying NSError
3511         and encoding/decoding as much of the userInfo as we know how to.
3512         Right now this includes all string values and the PeerCertificateChain.
3513
3514 2011-03-17  John Sullivan  <sullivan@apple.com>
3515
3516         Reviewed by Adam Roben.
3517
3518         https://bugs.webkit.org/show_bug.cgi?id=56574
3519         Dealloc'ing a WKView can leave a stale reference to it in NSWindow
3520
3521         * UIProcess/API/mac/WKView.mm:
3522         (-[WKView viewWillMoveToWindow:]):
3523         Clear the outgoing window's growBoxOwner if it is this view.