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