1 2011-04-01 Anders Carlsson <andersca@apple.com>
3 Reviewed by Sam Weinig.
5 Shockwave plug-in doesn't accept mouse events
6 https://bugs.webkit.org/show_bug.cgi?id=57653
7 <rdar://problem/8483273>
11 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
12 (WebKit::NetscapePlugin::convertPoint):
14 2011-04-01 Sam Weinig <sam@webkit.org>
16 Reviewed by Anders Carlsson.
18 WebKitTestRunner needs layoutTestController.shadowRoot
19 https://bugs.webkit.org/show_bug.cgi?id=57661
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.
31 2011-04-01 Alexey Proskuryakov <ap@apple.com>
33 Reviewed by Darin Adler.
35 Make WebKit2 text input handling more like WebKit1
36 https://bugs.webkit.org/show_bug.cgi?id=57649
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.
43 * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a missing
44 specialization for a function with 6 arguments and 2 returned values.
46 * Scripts/webkit2/messages.py: Added TextInputState to struct list.
48 * Shared/WebCoreArgumentCoders.h: Fixed a bug in CompositionUnderline encoding, which only
49 encoded a part of Color field, and didn't match decoder.
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.
55 * UIProcess/API/mac/PageClientImpl.h: We don't "intercept", we "interpret".
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
61 * UIProcess/API/mac/WKView.mm:
62 (-[WKView doCommandBySelector:]):
63 (-[WKView insertText:]):
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.
112 2011-04-01 Chang Shu <cshu@webkit.org>
114 Reviewed by Darin Adler.
116 WebKitTestRunner needs layoutTestController.setDatabaseQuota
117 https://bugs.webkit.org/show_bug.cgi?id=57568
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:
127 2011-04-01 Timothy Hatcher <timothy@apple.com>
129 Make momentum scroll event latching work in WebKit2 on Mac.
131 <rdar://problem/8751861>
133 Reviewed by Darin Adler.
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.
140 2011-04-01 Alexey Proskuryakov <ap@apple.com>
142 Reviewed by Anders Carlsson.
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>
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
152 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash):
154 2011-04-01 Adam Roben <aroben@apple.com>
158 * WebProcess/WebPage/LayerTreeHost.cpp: Only pull in the LayerTreeHostCA derived classes for
161 2011-03-31 Adam Roben <aroben@apple.com>
163 Split LayerTreeHostCA into a base class and derived Mac and Win classes
165 This will make it easier to customize the Mac and Windows implementations without adding too
168 Fixes <http://webkit.org/b/57606> Windows and Mac should use separate LayerTreeHost classes
170 Reviewed by Anders Carlsson.
172 * WebKit2.xcodeproj/project.pbxproj: Added LayerTreeHostCAMac.h.
174 * WebProcess/WebPage/LayerTreeHost.cpp:
175 (WebKit::LayerTreeHost::create): Create a LayerTreeHostCAMac on Mac, and LayerTreeHostCAWin
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.
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
193 * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed Mac-specific pieces. Made some functions
194 virtual so that derived classes can override them.
196 * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Added.
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
203 (WebKit::LayerTreeHostCAMac::platformInitialize): Removed direct uses of LayerTreeHostCA
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.
212 (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Updated type.
214 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
215 (WebKit::LayerTreeHostCAWin::create): Create and initialize a host.
217 (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin):
218 (WebKit::LayerTreeHostCAWin::~LayerTreeHostCAWin):
219 (WebKit::LayerTreeHostCAWin::platformInitialize):
220 (WebKit::LayerTreeHostCAWin::scheduleLayerFlush):
223 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added.
225 * win/WebKit2.vcproj: Added LayerTreeHostCAWin.h
227 * win/WebKit2Apple.vsprops: Added WebProcess/WebPage/ca/win to the include path.
229 2011-03-31 Brent Fulgham <bfulgham@webkit.org>
231 Unreviewed WinCairo build fix after r82632.
233 * UIProcess/DrawingAreaProxyImpl.cpp:
234 (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
236 2011-03-31 Adam Roben <aroben@apple.com>
238 Add SharedMemory::adopt, which can take ownership of an existing file mapping object
240 Fixes <http://webkit.org/b/57599> Need a way to wrap an existing file mapping object in a
243 Reviewed by Anders Carlsson.
245 * Platform/SharedMemory.h: Added adopt.
247 * Platform/win/SharedMemoryWin.cpp:
248 (WebKit::SharedMemory::create): Moved code to adopt the HANDLE from here...
249 (WebKit::SharedMemory::adopt): ...to here.
251 2011-03-31 Chang Shu <cshu@webkit.org>
253 Reviewed by Darin Adler.
255 WebKitTestRunner needs layoutTestController.clearAllDatabases
256 https://bugs.webkit.org/show_bug.cgi?id=42540
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:
266 2011-03-31 Anders Carlsson <andersca@apple.com>
268 Reviewed by Sam Weinig.
270 Add some more media related things to the sandbox profile.
272 * WebProcess/com.apple.WebProcess.sb:
274 2011-03-31 Anders Carlsson <andersca@apple.com>
276 Reviewed by Dan Bernstein.
278 Tabbed pages redraw unnecessarily when activated
279 https://bugs.webkit.org/show_bug.cgi?id=57589
280 <rdar://problem/9218258>
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.
287 (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
288 Remove now redundant call to backingStoreStateDidChange.
290 2011-03-31 Sam Weinig <sam@webkit.org>
292 Reviewed by Anders Carlsson.
294 Sandbox violations when playing back HTML5 video on YouTube
295 <rdar://problem/8950692>
297 * WebProcess/com.apple.WebProcess.sb:
299 2011-03-31 Darin Adler <darin@apple.com>
301 Reviewed by Sam Weinig.
303 Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
304 https://bugs.webkit.org/show_bug.cgi?id=57573
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.
317 2011-03-31 Sam Weinig <sam@webkit.org>
319 Reviewed by Anders Carlsson.
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
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):
332 2011-03-31 Adam Roben <aroben@apple.com>
334 Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object
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).
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
344 Reviewed by Brian Weinstein.
346 * Platform/win/SharedMemoryWin.cpp:
347 (WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
350 2011-03-31 Adam Roben <aroben@apple.com>
352 Quote the executable path we pass to ::CreateProcessW
354 This will ensure that spaces in the path will be interpreted correctly.
356 Fixes <http://webkit.org/b/57569> Web process sometimes fails to launch when there are
359 Reviewed by Steve Falkenburg.
361 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
362 (WebKit::ProcessLauncher::launchProcess): Surround the executable path in quotes.
364 2011-03-31 Alexey Proskuryakov <ap@apple.com>
366 Patch by John Harvey, reviewed and tweaked by me.
368 <rdar://problem/8644403> Should notify TSM that plug-ins would show a bottom input window for marked text.
370 * UIProcess/API/mac/WKTextInputWindowController.mm:
371 (-[WKTextInputPanel _interpretKeyEvent:string:]):
373 2011-03-31 Anders Carlsson <andersca@apple.com>
375 Reviewed by John Sullivan, Darin Adler, Dan Bernstein and Sam Weinig.
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>
381 Ensure that any readwrite sandbox directories actually exist before entering the sandbox.
383 * WebProcess/mac/WebProcessMac.mm:
384 (WebKit::appendReadwriteSandboxDirectory):
386 2011-03-31 John Sullivan <sullivan@apple.com>
388 Reviewed by Darin Adler and Adam Roben.
390 <rdar://problem/9214824> Find client not told when WKPageCountStringMatches exceeds maximum
391 https://bugs.webkit.org/show_bug.cgi?id=57552
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.
399 2011-03-31 Evan Martin <evan@chromium.org>
401 Reviewed by Eric Seidel.
403 <title> should support dir attribute
404 https://bugs.webkit.org/show_bug.cgi?id=50961
406 Update to new FrameLoaderClient interface.
408 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
409 (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
410 (WebKit::WebFrameLoaderClient::setTitle):
411 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
413 2011-03-31 Balazs Kelemen <kbalazs@webkit.org>
415 Reviewed by Csaba Osztrogonác.
417 [WK2] Introduce an option for no NPAPI support
418 https://bugs.webkit.org/show_bug.cgi?id=55828
420 Stub out NPAPI support for platform and OS combinations that are
421 not supported yet. Ancestor patch was made by Laszlo Gombos.
423 * GNUmakefile.am: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
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
432 * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: Added.
433 Stubbed implementation.
434 (WebKit::NetscapePluginModule::getPluginInfo):
435 (WebKit::NetscapePluginModule::determineQuirks):
437 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Guard with
438 PLUGIN_ARCHITECTURE(X11).
440 * WebKit2.pro: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
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):
457 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Guard with
458 PLUGIN_ARCHITECTURE(X11)
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.
466 2011-03-31 Vamshikrishna.Yellenki <vamshi@motorola.com> and Alejandro G. Castro <alex@igalia.com>
468 Reviewed by Martin Robinson.
470 Implement MiniBrowser for Gtk port.
471 https://bugs.webkit.org/show_bug.cgi?id=48512
473 * Shared/API/c/gtk/WKBaseGtk.h: Add the stdbool.h include.
475 2011-03-30 Dan Bernstein <mitz@apple.com>
477 Reviewed by Maciej Stachowiak.
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
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
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.
491 2011-03-30 Sam Weinig <sam@webkit.org>
493 Reviewed by Anders Carlsson.
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
499 * WebProcess/WebPage/WebPage.cpp:
500 (WebKit::shouldReuseCommittedSandboxExtension):
501 Remove unnecessary restriction on extension reuse. Any type of file to file navigation
504 2011-03-30 Anders Carlsson <andersca@apple.com>
506 Reviewed by Sam Weinig.
508 Clean up the sandbox parameter code
509 https://bugs.webkit.org/show_bug.cgi?id=57518
511 * Shared/WebProcessCreationParameters.h:
512 Make nsURLCachePath and uiProcessBundleResourcePath Strings to match the other paths we send over.
514 * UIProcess/mac/WebContextMac.mm:
515 (WebKit::WebContext::platformInitializeWebProcess):
516 nsURLCachePath and uiProcessBundleResourcePath are now Strings.
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.
526 (WebKit::WebProcess::platformInitializeWebProcess):
527 nsURLCachePath is now a string.
529 2011-03-30 Anders Carlsson <andersca@apple.com>
531 Reviewed by Sam Weinig.
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>
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.
541 * Shared/mac/SandboxExtensionMac.mm:
542 (WebKit::resolveSymlinksInPath):
543 New function that resolves all the symlinks in the given path.
545 (WebKit::SandboxExtension::createHandle):
546 Call resolveSymlinksInPath on the resulting path.
548 2011-03-30 Steve Falkenburg <sfalken@apple.com>
550 Reviewed by Adam Roben.
552 Share most vsprops between Release and Production builds in releaseproduction.vsprops
553 https://bugs.webkit.org/show_bug.cgi?id=57508
555 * win/WebKit2Production.vsprops:
556 * win/WebKit2Release.vsprops:
557 * win/WebKit2ReleaseCairoCFLite.vsprops:
558 * win/WebKit2WebProcessProduction.vsprops:
559 * win/WebKit2WebProcessRelease.vsprops:
560 * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
562 2011-03-30 Ivan Krstić <ike@apple.com>
564 Reviewed by Oliver Hunt.
566 Ensure consistent, readable working directory for WebProcess before entering sandbox
567 <rdar://problem/8951176>
569 * WebProcess/mac/WebProcessMac.mm:
570 (WebKit::WebProcess::platformInitializeWebProcess):
572 2011-03-30 Sam Weinig <sam@webkit.org>
574 Reviewed by Brady Eidson.
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
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.
585 2011-03-30 Steve Falkenburg <sfalken@apple.com>
587 Reviewed by Adam Roben.
589 Update Windows production build logic for new production configurations
590 https://bugs.webkit.org/show_bug.cgi?id=57494
593 * win/WebKit2Production.vsprops:
594 * win/WebKit2WebProcessProduction.vsprops:
596 2011-03-30 Steve Falkenburg <sfalken@apple.com>
598 Reviewed by Adam Roben.
600 Rename Windows configuration Release_LTCG to Production for clarity
601 https://bugs.webkit.org/show_bug.cgi?id=57465
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.
612 2011-03-30 Jer Noble <jer.noble@apple.com>
614 Reviewed by Dan Bernstein.
616 WebKit2: WebProcess is using 89%, while viewing a PDF
617 https://bugs.webkit.org/show_bug.cgi?id=57471
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.
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().
629 2011-03-30 Sam Weinig <sam@webkit.org>
631 Fix Snow Leopard build.
633 * UIProcess/mac/WebContextMenuProxyMac.mm:
634 (WebKit::WebContextMenuProxyMac::showContextMenu):
636 2011-03-30 Sam Weinig <sam@webkit.org>
638 Reviewed by Anders Carlsson.
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
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.
649 2011-03-30 Anders Carlsson <andersca@apple.com>
651 Reviewed by Sam Weinig.
653 Crash when NPN_Evaluate removes the plug-in frame
654 https://bugs.webkit.org/show_bug.cgi?id=57474
655 <rdar://problem/9191396>
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.
660 * WebProcess/Plugins/PluginView.cpp:
661 (WebKit::PluginView::evaluate):
663 2011-03-30 Sam Weinig <sam@webkit.org>
665 Reviewed by Anders Carlsson.
667 Add default localization strategy that can be shared by WebKit1 and WebKit2
668 https://bugs.webkit.org/show_bug.cgi?id=57406
670 * Shared/WebLocalizableStrings.h: Removed.
671 Removed in favor of using WebCore/LocalizedStrings.h directly.
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.
680 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
681 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
682 Remove localization strategy override in favor of using new default implementation.
686 * WebKit2.xcodeproj/project.pbxproj:
687 * win/WebKit2.vcproj:
688 Remove WebLocalizableStrings.h
690 2011-03-30 Anders Carlsson <andersca@apple.com>
692 Reviewed by Adam Roben.
694 Assertion failure in plug-in process when calling WKPluginSiteDataManagerGetSitesWithData
695 https://bugs.webkit.org/show_bug.cgi?id=57468
696 <rdar://problem/9199089>
698 Call decrementLoadCount from removeWebProcessConnection instead of startShutdownTimerIfNecessary,
699 otherwise we'll get a load count underflow when a connection is never created.
701 * PluginProcess/PluginProcess.cpp:
702 (WebKit::PluginProcess::removeWebProcessConnection):
703 (WebKit::PluginProcess::createWebProcessConnection):
704 (WebKit::PluginProcess::startShutdownTimerIfNecessary):
706 2011-03-30 Jessie Berlin <jberlin@apple.com>
708 Reviewed by Anders Carlsson.
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
714 For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are
715 no more callbacks waiting to be invoked.
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
721 * UIProcess/WebContext.cpp:
722 (WebKit::WebContext::shouldTerminate):
723 Check with each of the ManagerProxies.
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:
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):
775 2011-03-30 Adam Roben <aroben@apple.com>
777 Mac build fix after r82442
779 * WebProcess/Plugins/PluginProxy.cpp:
780 (WebKit::PluginProxy::geometryDidChange): Added a missing argument.
782 2011-03-29 Adam Roben <aroben@apple.com>
784 Add a way to specify that a ShareableBitmap has no alpha channel
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)!
790 Fixes <http://webkit.org/b/57388> Need a way to specify that a ShareableBitmap has no alpha
793 Reviewed by Anders Carlsson.
795 * Shared/ShareableBitmap.cpp:
796 (WebKit::ShareableBitmap::Handle::Handle): Moved here from the header file, and added
797 initialization of m_flags.
799 (WebKit::ShareableBitmap::Handle::encode):
800 (WebKit::ShareableBitmap::Handle::decode):
801 Encode/decode m_flags.
803 (WebKit::ShareableBitmap::create):
804 (WebKit::ShareableBitmap::createShareable):
805 Pass along the new Flags argument.
807 (WebKit::ShareableBitmap::createHandle): Store our Flags on the Handle.
808 (WebKit::ShareableBitmap::ShareableBitmap): Store the Flags in m_flags.
810 * Shared/ShareableBitmap.h: Added Flag, Flags, and m_flags, and added a Flags argument to
811 some create functions.
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.
819 * Shared/cg/ShareableBitmapCG.cpp:
820 (WebKit::bitmapInfo): New helper function. Includes an alpha channel only if specified in
823 (WebKit::ShareableBitmap::createGraphicsContext):
824 (WebKit::ShareableBitmap::makeCGImage):
825 Use the new helper function.
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.
841 2011-03-29 Adam Roben <aroben@apple.com>
843 Add ShareableBitmap::Handle
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.
850 This should cause no behavior changes.
852 Fixes <http://webkit.org/b/57397> ShareableBitmap needs its own Handle type
854 Reviewed by Anders Carlsson.
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.
862 * PluginProcess/PluginControllerProxy.h:
863 * PluginProcess/PluginControllerProxy.messages.in:
864 Updated Handle types and removed unnecessary size argument to Snapshot.
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
873 * Shared/ShareableBitmap.cpp:
874 (WebKit::ShareableBitmap::Handle::encode):
875 (WebKit::ShareableBitmap::Handle::decode):
876 Simple encode/decode functions.
878 (WebKit::ShareableBitmap::create): Get the size from the Handle instead of as a separate
880 (WebKit::ShareableBitmap::createHandle): Store our size in the Handle.
882 * Shared/ShareableBitmap.h: Added ShareableBitmap::Handle and made some functions use it.
884 * Shared/UpdateInfo.h: Changed to use ShareableBitmap::Handle.
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.
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.
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.
905 * UIProcess/FindIndicator.h: Changed to use ShareableBitmap::Handle.
907 * UIProcess/PageClient.h: Removed unnecessary imageSize argument from setDragImage.
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).
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.
927 * WebProcess/WebPage/FindController.cpp:
928 (WebKit::FindController::updateFindIndicator):
929 (WebKit::FindController::hideFindIndicator):
930 Changed to use ShareableBitmap::Handle.
932 2011-03-30 Alejandro G. Castro <alex@igalia.com>
934 Fix GTK build after r81980.
938 2011-03-29 Beth Dakin <bdakin@apple.com>
940 Reviewed by Maciej Stachowiak.
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
945 <rdar://problem/8665411>
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):
970 2011-03-29 Brent Fulgham <bfulgham@webkit.org>
972 Unreviewed WinCairo build fix.
974 Bring DownloadCurl implementation stubs in line with current
977 * WebProcess/Downloads/curl/DownloadCurl.cpp:
978 (WebKit::Download::receivedCredential):
979 (WebKit::Download::receivedRequestToContinueWithoutCredential):
980 (WebKit::Download::receivedCancellation):
982 2011-03-29 Chris Fleizach <cfleizach@apple.com>
984 Reviewed by Darin Adler.
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
989 This will allow a specific WKView to override what's used for the window attribute of the
992 * UIProcess/API/mac/WKView.mm:
993 (-[WKView viewDidMoveToWindow]):
995 2011-03-29 Jeff Miller <jeffm@apple.com>
997 Reviewed by Sam Weinig.
999 Make Windows-only InjectedBundle functions platform-specific
1000 https://bugs.webkit.org/show_bug.cgi?id=57385
1002 Added files for Windows-specific WKBundle functions.
1003 Removed stub wrappers for InjectedBundle::setHostAllowsAnyHTTPSCertificate() and InjectedBundle::setClientCertificate() from non-Windows platforms.
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.
1019 2011-03-29 Anders Carlsson <andersca@apple.com>
1023 * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1024 (WebKit::Download::receivedCredential):
1025 (WebKit::Download::receivedRequestToContinueWithoutCredential):
1026 (WebKit::Download::receivedCancellation):
1028 2011-03-29 Anders Carlsson <andersca@apple.com>
1030 Reviewed by Sam Weinig.
1032 Downloads: Authentication support
1033 https://bugs.webkit.org/show_bug.cgi?id=57403
1034 <rdar://problem/8691166>
1036 * UIProcess/API/C/WKContext.h:
1037 Add didReceiveAuthenticationChallenge callback.
1039 * UIProcess/Downloads/DownloadProxy.cpp:
1040 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
1041 Call the download client.
1043 * UIProcess/Downloads/DownloadProxy.messages.in:
1044 Add DidReceiveAuthenticationChallenge message.
1046 * UIProcess/WebDownloadClient.cpp:
1047 (WebKit::WebDownloadClient::didReceiveAuthenticationChallenge):
1048 Call the client callback function.
1050 * UIProcess/WebDownloadClient.h:
1051 * WebProcess/Authentication/AuthenticationManager.cpp:
1052 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1053 Send the DidReceiveAuthenticationChallenge message to the download proxy.
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.
1060 * WebProcess/Authentication/AuthenticationManager.h:
1061 * WebProcess/Downloads/Download.cpp:
1062 (WebKit::Download::didReceiveAuthenticationChallenge):
1063 Call the authentication manager.
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.
1072 (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
1073 (-[WKDownloadAsDelegate downloadShouldUseCredentialStorage:]):
1074 Call the right Download member functions.
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):
1086 2011-03-29 Anders Carlsson <andersca@apple.com>
1088 Reviewed by Sam Weinig.
1090 AuthenticationChallengeProxy objects should be associated with processes, not pages
1091 https://bugs.webkit.org/show_bug.cgi?id=57401
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):
1103 2011-03-29 Sam Weinig <sam@webkit.org>
1105 Reviewed by Anders Carlsson.
1107 Use LocalizedStrings.h as a bottleneck for localized strings instead of
1110 * UIProcess/API/mac/WKView.mm:
1111 (-[WKView validateUserInterfaceItem:]):
1112 Call existing localization functions instead of using UI_STRING.
1114 (-[WKView _getTextInputState:selectionEnd:underlines:]):
1115 Remove unnecessary WebCore:: prefix.
1117 2011-03-29 Chang Shu <cshu@webkit.org>
1119 Reviewed by Kenneth Rohde Christiansen.
1121 WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs
1122 https://bugs.webkit.org/show_bug.cgi?id=42692
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:
1135 2011-03-29 Timothy Hatcher <timothy@apple.com>
1137 Update the order of the context menu to better match AppKit on Mac.
1139 <rdar://problem/9054893>
1141 Reviewed by John Sullivan.
1143 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1144 (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
1145 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1147 2011-03-29 Jeff Miller <jeffm@apple.com>
1149 Fix formatting of WebKit2.vcproj after r82283.
1151 * win/WebKit2.vcproj:
1153 2011-03-29 Martin Robinson <mrobinson@igalia.com>
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
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
1162 * Shared/gtk/WebEventFactory.cpp:
1163 (WebKit::isGdkKeyCodeFromKeyPad): Update key defines.
1165 2011-03-29 Steve Falkenburg <sfalken@apple.com>
1167 Reviewed by Darin Adler.
1169 Use per-configuration vsprops in WebKit to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
1170 https://bugs.webkit.org/show_bug.cgi?id=57383
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.
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.
1192 2011-03-29 Jessie Berlin <jberlin@apple.com>
1194 Reviewed by Anders Carlsson.
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
1200 Instead of bailing when the WebProcess is not valid, call relaunchProcessIfNecessary().
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):
1236 2011-03-29 Jeff Miller <jeffm@apple.com>
1238 Reviewed by Darin Adler.
1240 WebKit2: Support setting the client certificate on Windows
1241 https://bugs.webkit.org/show_bug.cgi?id=57368
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.
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.
1262 2011-03-29 Timothy Hatcher <timothy@apple.com>
1264 Make WebKit2 work with update-webkit-localizable-strings.
1266 https://webkit.org/b/57354
1268 Reviewed by Sam Weinig.
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.
1282 * GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
1283 * WebKit2.pro: Ditto.
1284 * WebKit2.xcodeproj/project.pbxproj: Ditto.
1285 * win/WebKit2.vcproj: Ditto.
1287 2011-03-29 Jeff Miller <jeffm@apple.com>
1289 Reviewed by Darin Adler.
1291 CoreIPC::decodeResourceError() leaks a CFDataRef
1292 https://bugs.webkit.org/show_bug.cgi?id=57366
1294 * Shared/win/WebCoreArgumentCodersWin.cpp:
1295 (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.
1297 2011-03-29 Anders Carlsson <andersca@apple.com>
1299 Reviewed by Sam Weinig.
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>
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):
1311 2011-03-29 Darin Adler <darin@apple.com>
1313 Reviewed by Adam Roben.
1315 WebKit2 bundle page needs to offer generated file hooks
1316 https://bugs.webkit.org/show_bug.cgi?id=57279
1318 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added shouldGenerateFileForUpload and
1319 generateFileForUpload callback pointers.
1321 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1322 (WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Added.
1323 (WebKit::InjectedBundlePageUIClient::generateFileForUpload): Added.
1324 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added functions above.
1326 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1327 (WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Implemented by
1328 calling the functions above.
1329 (WebKit::WebChromeClient::generateReplacementFile): Ditto.
1331 2011-03-29 Anders Carlsson <andersca@apple.com>
1333 Reviewed by Darin Adler.
1335 Assertion failure in plug-in process with clang-built 32/64-bit WebKit2
1336 https://bugs.webkit.org/show_bug.cgi?id=57359
1338 Don't use __alignof when encoding and decoding scalar types.
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.
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):
1362 2011-03-29 Brent Fulgham <bfulgham@webkit.org>
1364 Unreviewed build fix after r81928.
1366 * win/WebKit2.vcproj: Don't build CG-specific icon routines
1369 2011-03-29 Sam Weinig <sam@webkit.org>
1371 Reviewed by Anders Carlsson.
1373 Reproducible crash running under libgmalloc, in -[WKView(Internal) removeTrackingRect:] --> objc_assign_ivar_non_gc
1374 <rdar://problem/9193352>
1375 https://bugs.webkit.org/show_bug.cgi?id=57358
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.
1380 * UIProcess/API/mac/WKView.mm:
1381 (-[WKView dealloc]):
1382 Nil out _data after releasing it.
1384 (-[WKView removeTrackingRect:]):
1385 Add early return for nil _data.
1387 2011-03-29 Jeff Miller <jeffm@apple.com>
1389 Reviewed by Jon Honeycutt.
1391 Add WebCore::copyCertificateToData() on Windows
1392 https://bugs.webkit.org/show_bug.cgi?id=57296
1394 Remove duplicate code that implemented this functionality in WebCoreArgumentCodersWin.cpp and use WebCore::copyCertificateToData() instead.
1396 * Shared/win/WebCoreArgumentCodersWin.cpp:
1397 (CoreIPC::decodeResourceError): Use WebCore::copyCertificateToData().
1399 2011-03-29 Balazs Kelemen <kbalazs@webkit.org>
1401 Unreviewed build fix (64 bit gcc).
1403 GCC does not accept uint64_t formatted as %lli.
1405 * UIProcess/WebIconDatabase.cpp:
1406 (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Add explicit cast to long long.
1408 2011-03-28 Maciej Stachowiak <mjs@apple.com>
1410 Reviewed by Dan Bernstein.
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>
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.
1427 2011-03-28 Patrick Gansterer <paroga@webkit.org>
1429 Reviewed by Darin Adler.
1431 Use String instead of CString as return value of openTemporaryFile
1432 https://bugs.webkit.org/show_bug.cgi?id=55332
1434 * Shared/WebMemorySampler.cpp:
1435 (WebKit::WebMemorySampler::initializeTempLogFile):
1436 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1437 (WebKit::NetscapePluginStream::stop):
1438 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1440 2011-03-28 Brian Weinstein <bweinstein@apple.com>
1442 Reviewed by Jon Honeycutt.
1444 WebKit2: Downloads started with DownloadCFNet::start never start
1445 https://bugs.webkit.org/show_bug.cgi?id=57268
1447 * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1448 (WebKit::Download::start): Call CFURLDownloadStart on the download we create.
1450 2011-03-28 Anders Carlsson <andersca@apple.com>
1454 * Shared/ShareableBitmap.h:
1456 2011-03-28 Anders Carlsson <andersca@apple.com>
1458 Reviewed by Sam Weinig.
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>
1464 We don't want the WKTextInputWindowController inputContext to be involved in interpretKeyEvents.
1466 * UIProcess/API/mac/WKView.mm:
1467 (-[WKView inputContext]):
1469 2011-03-28 Anders Carlsson <andersca@apple.com>
1471 Reviewed by Sam Weinig.
1473 CGImageRefs must hold a strong reference to underlying data
1474 https://bugs.webkit.org/show_bug.cgi?id=57263
1475 <rdar://problem/9146179>
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.
1481 * Platform/cg/CGUtilities.cpp:
1482 (WebKit::paintImage):
1483 Factor image painting code out into a separate function.
1485 (WebKit::paintBitmapContext):
1488 * Shared/API/c/cg/WKImageCG.cpp:
1489 (WKImagemakeCGImage):
1490 Use ShareableBitmap::makeCGImageCopy.
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.
1502 * Shared/cg/WebCoreArgumentCodersCG.cpp:
1503 (CoreIPC::createImage):
1504 Use ShareableBitmap::makeCGImage.
1506 * UIProcess/API/mac/PageClientImpl.mm:
1507 (WebKit::PageClientImpl::setDragImage):
1508 Use ShareableBitmap::makeCGImage and plug a CGImageRef leak.
1510 2011-03-28 Alexey Proskuryakov <ap@apple.com>
1514 * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): It's not "event" in this function, it's
1517 2011-03-28 Alexey Proskuryakov <ap@apple.com>
1519 Reviewed by Darin Adler.
1521 https://bugs.webkit.org/show_bug.cgi?id=57260
1522 Clean up text input code a little
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:
1529 * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment.
1531 2011-03-28 Jeff Miller <jeffm@apple.com>
1533 Reviewed by Adam Roben.
1535 ResourceError::certificate() should return a PCCERT_CONTEXT
1536 https://bugs.webkit.org/show_bug.cgi?id=57262
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.
1543 2011-03-28 Jeff Miller <jeffm@apple.com>
1545 Rubber-stamped by Adam Roben.
1547 Remove unused CFErrorRef.
1549 * Shared/win/WebCoreArgumentCodersWin.cpp:
1550 (CoreIPC::encodeResourceError): Remove unused CFErrorRef.
1552 2011-03-28 Jeff Miller <jeffm@apple.com>
1554 Reviewed by Adam Roben.
1556 Include certificate when sending a WebCore::ResourceError to UI process on Windows
1557 https://bugs.webkit.org/show_bug.cgi?id=57195
1559 Add support for sending the certificate with the WebCore::ResourceError.
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.
1568 2011-03-27 Andy Estes <aestes@apple.com>
1570 Reviewed by Maciej Stachowiak.
1572 Correctly get a plug-in's MIME type when it uses WebPluginMIMETypesFilename
1573 https://bugs.webkit.org/show_bug.cgi?id=57205
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.
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
1585 (WebKit::getPluginInfoFromPropertyLists): Call
1586 getMIMETypesFromPluginBundle().
1588 2011-03-27 Jer Noble <jer.noble@apple.com>
1590 Reviewed by Maciej Stachowiak.
1592 Full Screen: disable keyboard access by default
1593 https://bugs.webkit.org/show_bug.cgi?id=56684
1595 Take into account whether keyboard access was requested when deciding whether full
1596 screen mode is supported.
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:
1609 2011-03-27 Anders Carlsson <andersca@apple.com>
1611 Reviewed by Sam Weinig.
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>
1617 Port some code over from the old WebKit1 plug-in host.
1619 * PluginProcess/mac/PluginProcessShim.mm:
1620 (WebKit::shimShowMenuBar):
1621 (WebKit::shimHideMenuBar):
1622 (WebKit::shimIsMenuBarVisible):
1624 2011-03-27 Anders Carlsson <andersca@apple.com>
1626 Reviewed by Sam Weinig.
1628 Keep a strong reference to the connection to avoid crashes.
1630 * Platform/CoreIPC/Connection.cpp:
1632 2011-03-26 Jeff Miller <jeffm@apple.com>
1634 Reviewed by Sam Weinig.
1636 WKErrorCopyCFError() doesn't actually return a copy of the CFErrorRef
1637 https://bugs.webkit.org/show_bug.cgi?id=57172
1639 * Shared/API/c/cf/WKErrorCF.cpp:
1640 (WKErrorCopyCFError): Use RetainPtr<> and leakRef() to return a real copy.
1642 2011-03-26 Maciej Stachowiak <mjs@apple.com>
1644 Revert inadvertently committed changes.
1646 * WebProcess/com.apple.WebProcess.sb:
1648 2011-03-26 Jer Noble <jer.noble@apple.com>
1650 Reviewed by Eric Carlson.
1652 Enable the Full Screen API by default in WebKit/mac and WebKit2
1653 https://bugs.webkit.org/show_bug.cgi?id=56956
1655 * Shared/WebPreferencesStore.h: Default the fullScreenEnabled preference to true.
1657 2011-03-26 Jeff Miller <jeffm@apple.com>
1659 Reviewed by Steve Falkenburg.
1661 Add PlatformCertificateInfo::PlatformCertificateInfo(PCCERT_CONTEXT) constructor on Windows
1662 https://bugs.webkit.org/show_bug.cgi?id=57152
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.
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.
1672 2011-03-26 Anders Carlsson <andersca@apple.com>
1674 Reviewed by Sam Weinig.
1676 Graphic corruption appeared with Silverlight contents while resizing window
1677 https://bugs.webkit.org/show_bug.cgi?id=57167
1678 <rdar://problem/9094052>
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.
1684 * WebProcess/Plugins/PluginProxy.cpp:
1685 (WebKit::PluginProxy::geometryDidChange):
1687 2011-03-26 Sam Weinig <sam@webkit.org>
1689 Reviewed by Anders Carlsson.
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
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.
1701 2011-03-26 Anders Carlsson <andersca@apple.com>
1703 Reviewed by Sam Weinig.
1705 ASSERTION FAILED: m_operationInProgress == NoOperation loading nytimes.com
1706 https://bugs.webkit.org/show_bug.cgi?id=57165
1707 <rdar://problem/9024311>
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.
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).
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.
1721 * Platform/CoreIPC/Connection.cpp:
1722 (CoreIPC::Connection::Connection):
1723 Initialize m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage and m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount.
1725 (CoreIPC::Connection::setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage):
1726 Set m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage.
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.
1731 (CoreIPC::Connection::dispatchMessage):
1732 Increment and decrement m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount accordingly.
1734 * PluginProcess/WebProcessConnection.cpp:
1735 (WebKit::WebProcessConnection::WebProcessConnection):
1736 Call setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the connection.
1738 2011-03-26 Sam Weinig <sam@webkit.org>
1740 Rollout r82042 (If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations))
1742 -[NSString stringByResolvingSymlinksInPath] does not do what we needed for paths within /private.
1743 This caused all SSL sites to stop working.
1745 * WebProcess/mac/WebProcessMac.mm:
1746 (WebKit::appendSandboxParameterPath):
1747 (WebKit::initializeSandbox):
1749 2011-03-26 Sam Weinig <sam@webkit.org>
1751 Reviewed by Anders Carlsson.
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
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.
1763 2011-03-26 Anders Carlsson <andersca@apple.com>
1765 Reviewed by Sam Weinig.
1767 Factor processing of incoming sync replies out into processIncomingSyncReply
1768 https://bugs.webkit.org/show_bug.cgi?id=57161
1770 * Platform/CoreIPC/Connection.cpp:
1771 (CoreIPC::Connection::sendSyncMessage):
1772 Pass DispatchMessageEvenWhenWaitingForSyncReply to sendMessage.
1774 (CoreIPC::Connection::processIncomingSyncReply):
1775 Move code from processIncomingMessage to here.
1777 (CoreIPC::Connection::processIncomingMessage):
1778 Call processIncomingSyncReply.
1780 2011-03-26 Sam Weinig <sam@webkit.org>
1782 Reviewed by Anders Carlsson.
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
1788 * Shared/cf/ArgumentCodersCF.cpp:
1789 (CoreIPC::typeFromCFTypeRef):
1792 * Shared/cf/ArgumentCodersCF.h:
1793 Add encoding/decoding for SecCertificateRef type.
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.
1800 2011-03-26 Anders Carlsson <andersca@apple.com>
1802 Reviewed by Sam Weinig.
1804 Handle synchronous replies coming in out of order
1805 https://bugs.webkit.org/show_bug.cgi?id=57158
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.
1810 * Platform/CoreIPC/Connection.cpp:
1811 (CoreIPC::Connection::processIncomingMessage):
1813 2011-03-26 Anders Carlsson <andersca@apple.com>
1815 Reviewed by Sam Weinig.
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
1820 Simplify code and fix a possible (although highly improbable) dead lock.
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.
1826 (CoreIPC::Connection::SyncMessageState::SyncMessageState):
1827 Initialize m_didScheduleDispatchMessagesWork to false.
1829 (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
1830 if m_didScheduleDispatchMessagesWork is false, schedule a call to dispatchMessageAndResetDidScheduleDispatchMessagesWork
1831 on the client run loop.
1833 (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork):
1834 Dispatch messages and set m_didScheduleDispatchMessagesWork back to false.
1836 (CoreIPC::Connection::sendSyncMessage):
1837 Remove calls to beginWaitForSyncReply and endWaitForSyncReply.
1839 2011-03-25 Sam Weinig <sam@webkit.org>
1841 Reviewed by Adele Peterson.
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
1847 Make all load functions respawn a dead WebProcess for consistency.
1849 * UIProcess/WebPageProxy.cpp:
1850 (WebKit::WebPageProxy::loadHTMLString):
1851 Respawn a dead WebProcess.
1853 (WebKit::WebPageProxy::loadAlternateHTMLString):
1854 Respawn a dead WebProcess.
1856 (WebKit::WebPageProxy::loadPlainTextString):
1857 Respawn a dead WebProcess.
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.
1869 2011-03-25 Anders Carlsson <andersca@apple.com>
1871 Reviewed by Sam Weinig.
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>
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.
1881 * WebProcess/Plugins/PluginView.cpp:
1882 (WebKit::PluginView::invalidateRect):
1883 Don't call invalidateContentsAndWindow() if the plug-in has a Core Animation layer.
1885 2011-03-25 Brady Eidson <beidson@apple.com>
1887 Reviewed by Sam Weinig.
1889 <rdar://problem/8648311> and https://bugs.webkit.org/show_bug.cgi?id=56425
1890 WebKit2 IconDatabase and API
1892 This gets a basic, usable API in place.
1893 Enhancements can come in other bugs as they're needed.
1895 * UIProcess/API/C/WKIconDatabase.cpp:
1896 (WKIconDatabaseRetainIconForURL):
1897 (WKIconDatabaseReleaseIconForURL):
1898 (WKIconDatabaseEnableDatabaseCleanup):
1899 * UIProcess/API/C/WKIconDatabase.h:
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.
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:
1917 * WebKit2.xcodeproj/project.pbxproj:
1918 * win/WebKit2.vcproj:
1920 2011-03-25 Jeff Miller <jeffm@apple.com>
1922 Reviewed by Darin Adler.
1924 Add CoreIPC::encodeResourceError() and CoreIPC::decodeResourceError() for all platforms
1925 https://bugs.webkit.org/show_bug.cgi?id=57125
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.
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.
1941 2011-03-25 Andy Estes <aestes@apple.com>
1943 Reviewed by Adele Peterson.
1945 REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
1946 https://bugs.webkit.org/show_bug.cgi?id=49016
1948 Update objectContentType() implementation to handle the
1949 shouldPreferPlugInsForImages flag.
1951 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1952 (WebKit::WebFrameLoaderClient::objectContentType):
1953 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1955 2011-03-25 Brent Fulgham <bfulgham@webkit.org>
1957 Unreviewed build correction.
1959 Add stubs for WK2 cookie handling with cURL.
1961 * WebProcess/Cookies/curl: Added.
1962 * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added.
1963 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1964 (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
1965 * win/WebKit2.vcproj:
1967 2011-03-25 Steve Falkenburg <sfalken@apple.com>
1969 Reviewed by Brian Weinstein.
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>
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.
1979 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1980 (WebKit::PluginInfoStore::shouldUsePlugin): Blacklist npwpf.dll.
1982 2011-03-25 Jessie Berlin <jberlin@apple.com>
1984 Reviewed by Anders Carlsson.
1986 WebKit2: Need to be able to set and get the Cookie Storage Policy.
1987 https://bugs.webkit.org/show_bug.cgi?id=50780
1989 Part 2: Make it possible to set the initial policy on Windows.
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.
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:
2002 * UIProcess/API/C/win/WKContextPrivateWin.h:
2003 * UIProcess/API/C/win/WKContextWin.cpp:
2004 (WKContextSetInitialHTTPCookieAcceptPolicy):
2005 Call through to WebContext.
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.
2016 * WebProcess/Cookies/WebCookieManager.h:
2017 Make setHTTPCookieAcceptPolicy public so that it can be called from WebProcessWin.
2019 * WebProcess/win/WebProcessWin.cpp:
2020 (WebKit::WebProcess::platformInitializeWebProcess):
2021 Tell the WebCookieManager about the initial policy.
2023 2011-03-25 Jessie Berlin <jberlin@apple.com>
2025 Reviewed by Sam Weinig.
2027 WebKit2: Need to be able to set and get the Cookie Storage Policy.
2028 https://bugs.webkit.org/show_bug.cgi?id=50780
2030 * Shared/HTTPCookieAcceptPolicy.h: Added.
2032 * UIProcess/API/C/WKAPICast.h:
2033 (WebKit::toHTTPCookieAcceptPolicy):
2036 * UIProcess/API/C/WKCookieManager.cpp:
2037 (WKCookieManagerSetHTTPCookieAcceptPolicy):
2038 Call through to WebCookieManagerProxy.
2039 (WKCookieManagerGetHTTPCookieAcceptPolicy):
2041 * UIProcess/API/C/WKCookieManager.h:
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
2056 * UIProcess/WebCookieManagerProxy.h:
2057 * UIProcess/WebCookieManagerProxy.messages.in:
2061 * WebKit2.xcodeproj/project.pbxproj:
2062 * win/WebKit2.vcproj:
2063 * win/WebKit2Common.vsprops:
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:
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):
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):
2094 2011-03-25 Brian Weinstein <bweinstein@apple.com>
2096 Reviewed by Alexey Proskuryakov.
2098 REGRESSION(r79227): CFURLCache not initialized correctly in WebKit2
2099 https://bugs.webkit.org/show_bug.cgi?id=57109
2100 <rdar://problem/9184590>
2102 Check for a trailing Windows path separator, not a Unix path separator.
2104 * UIProcess/win/WebContextWin.cpp:
2105 (WebKit::WebContext::platformInitializeWebProcess):
2107 2011-03-25 Benjamin Poulain <benjamin.poulain@nokia.com>
2109 Reviewed by Andreas Kling.
2111 [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
2112 https://bugs.webkit.org/show_bug.cgi?id=57087
2114 Use explicit conversion for string to avoid depending on the default codec
2115 installed by the user code.
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):
2134 2011-03-25 Brent Fulgham <bfulgham@webkit.org>
2136 Correct project file missing $(WebKitVSPropsRedirectionDir)s
2139 * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir)
2141 2011-03-25 Alejandro G. Castro <alex@igalia.com>
2143 Reviewed by Martin Robinson.
2145 [WK2] Consider .c files in the generate-forwarding-headers script
2146 https://bugs.webkit.org/show_bug.cgi?id=56680
2148 * Scripts/generate-forwarding-headers.pl:
2150 2011-03-24 Sheriff Bot <webkit.review.bot@gmail.com>
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
2157 broke a test on platforms that do not have QuickTime installed
2158 (Requested by estes on #webkit).
2160 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2161 (WebKit::WebFrameLoaderClient::objectContentType):
2162 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2164 2011-03-24 Brady Eidson <beidson@apple.com>
2166 Reviewed by Darin Adler.
2168 https://bugs.webkit.org/show_bug.cgi?id=57069
2169 Add WKIconDatabase api to the project files, and expose accessor on WKContext.
2171 Project file stuffs:
2173 * WebKit2.xcodeproj/project.pbxproj:
2174 * win/WebKit2.vcproj:
2176 * Shared/API/c/WKBase.h:
2177 * UIProcess/API/C/WKAPICast.h:
2179 * UIProcess/API/C/WKContext.cpp:
2180 (WKContextGetIconDatabase):
2181 * UIProcess/API/C/WKContext.h:
2183 * UIProcess/API/C/WKIconDatabase.cpp: Added.
2184 (WKIconDatabaseGetTypeID):
2185 * UIProcess/API/C/WKIconDatabase.h: Added.
2187 * UIProcess/WebContext.h:
2188 (WebKit::WebContext::iconDatabase):
2190 2011-03-24 Brent Fulgham <bfulgham@webkit.org>
2194 Disable the CA Layer stuff when building with Cairo.
2196 * win/WebKit2.vcproj:
2198 2011-03-24 Brady Eidson <beidson@apple.com>
2200 Reviewed by Sam Weinig.
2202 https://bugs.webkit.org/show_bug.cgi?id=57058
2203 Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
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:
2222 Add an IconDatabase logging channel:
2223 * Platform/Logging.cpp:
2224 (WebKit::initializeLogChannelsIfNecessary):
2225 * Platform/Logging.h:
2227 * UIProcess/WebContext.cpp:
2228 (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
2230 * UIProcess/WebContext.h:
2232 2011-03-24 Andy Estes <aestes@apple.com>
2234 Reviewed by Darin Adler.
2236 REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
2237 https://bugs.webkit.org/show_bug.cgi?id=49016
2239 Update objectContentType() implementation to handle the
2240 shouldPreferPlugInsForImages flag.
2242 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2243 (WebKit::WebFrameLoaderClient::objectContentType):
2244 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2246 2011-03-24 Adam Roben <aroben@apple.com>
2248 Start compiling LayerTreeHostCA on Windows
2250 Fixes <http://webkit.org/b/57060> WebKit2.vcproj should compile LayerTreeHostCA
2252 Reviewed by Anders Carlsson.
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):
2263 * win/WebKit2.vcproj: Added new files. Let VS reorder existing files.
2265 * win/WebKit2Apple.vsprops: Added WebProcess\WebPage\ca to the include path.
2267 2011-03-24 Jer Noble <jer.noble@apple.com>
2269 Unreviewed build fix.
2271 Remove reference to LayerTreeHostMac.h from WebFullScreenManagerMac.mm.
2273 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2275 2011-03-24 Adam Roben <aroben@apple.com>
2277 Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm
2279 Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows
2281 Reviewed by Anders Carlsson.
2283 * WebKit2.xcodeproj/project.pbxproj:
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
2291 (WebKit::LayerTreeHostCA::invalidate):
2292 (WebKit::LayerTreeHostCA::sizeDidChange):
2293 (WebKit::LayerTreeHostCA::forceRepaint):
2294 Moved some Mac-specific code to LayerTreeHostCAMac.mm.
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.
2301 * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific
2302 declarations in PLATFORM(MAC).
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.
2314 2011-03-24 Adam Roben <aroben@apple.com>
2316 Rename LayerTreeHostMac to LayerTreeHostCA
2318 This is the first step toward sharing code with Windows.
2320 Fixes <http://webkit.org/b/57051>.
2322 Reviewed by Anders Carlsson.
2324 * WebKit2.xcodeproj/project.pbxproj:
2325 * WebProcess/WebPage/LayerTreeHost.cpp:
2326 (WebKit::LayerTreeHost::create):
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.
2332 2011-03-17 Jer Noble <jer.noble@apple.com>
2334 Reviewed by Maciej Stachowiak.
2336 WebKit2: Cancelling full screen early leaves full screen window up.
2337 https://bugs.webkit.org/show_bug.cgi?id=56589
2339 No new tests, as WebKitTestRunner does not currently support the new Full Screen API.
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
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.
2354 2011-03-24 Enrica Casucci <enrica@apple.com>
2356 Reviewed by Alexey Proskuryakov.
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>
2362 Adding missing entry point to support Mac OS X services in WebKit2.
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
2372 * WebProcess/WebPage/mac/WebPageMac.mm:
2373 (WebKit::WebPage::readSelectionFromPasteboard): Added.
2375 2011-03-24 Jia Pu <jpu@apple.com>
2377 Reviewed by Darin Adler.
2379 Dismissed reversion suggestion is incorrectly learned.
2380 https://bugs.webkit.org/show_bug.cgi?id=57039
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.
2387 * UIProcess/mac/CorrectionPanel.mm:
2388 (WebKit::CorrectionPanel::dismissInternal):
2390 2011-03-24 Brian Weinstein <bweinstein@apple.com>
2392 Reviewed by Adam Roben.
2394 WebKit2: Add Trackpoint driver hack to support IBM trackpads
2395 https://bugs.webkit.org/show_bug.cgi?id=49830
2396 <rdar://problem/8705951>
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.
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
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.
2425 2011-03-24 Sam Weinig <sam@webkit.org>
2427 Reviewed by Darin Adler.
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
2433 * Shared/DictionaryPopupInfo.cpp:
2434 (WebKit::DictionaryPopupInfo::encode):
2435 (WebKit::DictionaryPopupInfo::decode):
2436 * Shared/DictionaryPopupInfo.h:
2437 Add options dictionary.
2439 * UIProcess/API/mac/PageClientImpl.mm:
2440 (WebKit::PageClientImpl::didPerformDictionaryLookup):
2441 Add path that can pass options through.
2443 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2444 (WebKit::WebContextMenuClient::lookUpInDictionary):
2445 Use the new performDictionaryLookupForSelection which can extract context
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.
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.
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.
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.
2470 (WebKit::WebPage::performDictionaryLookupForRange):
2471 Pass options to WebProcess if available.
2473 2011-03-24 Jon Lee <jonlee@apple.com>
2475 Reviewed by Darin Adler.
2477 WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
2478 <rdar://problem/8553962>
2480 * WebProcess/WebPage/WebPage.cpp:
2481 (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame
2483 2011-03-24 Brian Weinstein <bweinstein@apple.com>
2485 Rubber-stamped by Sam Weinig.
2487 Fix a typo in the VK_LEFT case of performDefaultBehaviorForKeyEvent.
2489 * WebProcess/WebPage/mac/WebPageMac.mm:
2490 (WebKit::WebPage::performDefaultBehaviorForKeyEvent): It should be a logical or,
2493 2011-03-24 Jeff Miller <jeffm@apple.com>
2495 Fix typo - USE(CF_NETWORK) should be USE(CFNETWORK).
2497 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
2498 (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): USE(CF_NETWORK) should be USE(CFNETWORK)
2500 2011-03-23 Jia Pu <jpu@apple.com>
2502 Reviewed by Darin Adler.
2504 Hook up new AppKit autocorrection UI with WK2.
2505 https://bugs.webkit.org/show_bug.cgi?id=56055
2506 <rdar://problem/8947463>
2508 Please see WebCore/ChangeLog for detail.
2510 The calls to AppKit are implemented in PageClientImpl. Other changes are necessary for the
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:
2556 2011-03-23 Brian Weinstein <bweinstein@apple.com>
2558 Reviewed by Maciej Stachowiak.
2560 WebKit2: Need API to manage the Media Cache
2561 https://bugs.webkit.org/show_bug.cgi?id=56878
2562 <rdar://problem/9082503>
2564 Call through to HTMLMediaElement functions to manage the WebCore media cache.
2566 * WebProcess/MediaCache/WebMediaCacheManager.cpp:
2567 (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
2568 (WebKit::WebMediaCacheManager::clearCacheForHostname):
2569 (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
2571 2011-03-23 Jeff Miller <jeffm@apple.com>
2573 Reviewed by Darin Adler.
2575 Add WKBundleSetHostAllowsAnyHTTPSCertificate() for Windows
2576 https://bugs.webkit.org/show_bug.cgi?id=56972
2578 This is the WebKit2 equivalent to the WebKit1 API IWebMutableURLRequest::setAllowsAnyHTTPSCertificate().
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.
2593 2011-03-23 Sam Weinig <sam@webkit.org>
2595 Reviewed by Anders Carlsson.
2597 Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
2599 This API is not necessary.
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):
2619 2011-03-23 Balazs Kelemen <kbalazs@webkit.org>
2621 Reviewed by Andreas Kling.
2623 [WK2] Handle keyboard and mouse events on X11
2624 https://bugs.webkit.org/show_bug.cgi?id=56103
2626 Propagate keyboard and mouse events to the plugin
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):
2643 2011-03-23 Anders Carlsson <andersca@apple.com>
2645 Reviewed by Sam Weinig.
2647 Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not
2648 https://bugs.webkit.org/show_bug.cgi?id=56954
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.
2653 * Platform/CoreIPC/Connection.cpp:
2654 (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
2655 Only check for the DispatchMessageWhenWaitingForSyncReply flag.
2657 (CoreIPC::Connection::sendSyncMessage):
2658 Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID.
2660 * Platform/CoreIPC/Connection.h:
2661 (CoreIPC::Connection::sendSync):
2662 (CoreIPC::Connection::deprecatedSendSync):
2663 No need to add SyncMessage here anymore.
2665 2011-03-23 Brian Weinstein <bweinstein@apple.com>
2669 * DerivedSources.pro:
2671 2011-03-22 Brian Weinstein <bweinstein@apple.com>
2673 Reviewed by Darin Adler.
2675 WebKit2: Need API to manage the Media Cache
2676 https://bugs.webkit.org/show_bug.cgi?id=56878
2677 <rdar://problem/9082503>
2683 * WebKit2.xcodeproj/project.pbxproj:
2684 * win/WebKit2.vcproj:
2685 * win/WebKit2Common.vsprops:
2686 * win/WebKit2Generated.make:
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:
2696 * UIProcess/WebProcessProxy.cpp:
2697 (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages.
2698 * WebProcess/WebProcess.cpp:
2699 (WebKit::WebProcess::didReceiveMessage): Ditto.
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):
2709 * UIProcess/API/C/WKContext.cpp:
2710 (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager.
2711 * UIProcess/API/C/WKContext.h:
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.
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.
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.
2747 2011-03-22 Brady Eidson <beidson@apple.com>
2749 Reviewed by Sam Weinig.
2751 Add asynchronous load decision call to WebKit2 IconDatabase
2752 https://bugs.webkit.org/show_bug.cgi?id=56887
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:
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:
2766 2011-03-23 Chris Fleizach <cfleizach@apple.com>
2768 Reviewed by Darin Adler.
2770 REGRESSION: WK2: AX: PDF in Safari no longer accessible.
2771 https://bugs.webkit.org/show_bug.cgi?id=56849
2773 The WKView needs to know when to return the WKPDFView and when to return
2774 the remote web process connection.
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:]):
2783 2011-03-21 Stephanie Lewis <slewis@apple.com>
2785 Reviewed by Simon Fraser.
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.
2792 * Platform/mac/RunLoopMac.mm:
2793 (RunLoop::performWork):
2794 (RunLoop::TimerBase::timerFired):
2795 * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2796 (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
2798 2011-03-22 Anders Carlsson <andersca@apple.com>
2800 Reviewed by Sam Weinig.
2802 OBJECT element with DivX source is always downloaded
2803 https://bugs.webkit.org/show_bug.cgi?id=56879
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.
2810 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2811 (WebKit::pluginSupportsExtension):
2812 Add a new helper function.
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.
2818 2011-03-22 Brady Eidson <beidson@apple.com>
2820 Reviewed by Sam Weinig.
2822 Rename the synchronous icon database messages to be prefixed with "synchronous"
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:
2832 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2833 (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
2835 2011-03-22 Sam Weinig <sam@webkit.org>
2837 Rubber-stamped by Anders Carlsson.
2839 Loading a new tab does not dismiss Lookup
2840 <rdar://problem/9138391>
2842 * UIProcess/API/mac/WKView.mm:
2843 (-[WKView viewDidMoveToWindow]):
2844 Hide the dictionary popup when moving the WKView out of a window.
2846 2011-03-22 Anders Carlsson <andersca@apple.com>
2848 Reviewed by Sam Weinig.
2850 Microsoft Silverlight playback shows artifacts
2851 https://bugs.webkit.org/show_bug.cgi?id=56863
2852 <rdar://problem/9103136>
2854 * PluginProcess/PluginControllerProxy.cpp:
2855 (WebKit::PluginControllerProxy::paint):
2856 If the plug-in is transparent, clear the dirty rect before painting.
2858 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2859 (WebKit::NetscapePluginModule::determineQuirks):
2860 Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins.
2862 * Shared/Plugins/PluginQuirks.h:
2863 Add MakeTransparentIfBackgroundAttributeExists quirk.
2865 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2866 (WebKit::NPN_SetValue):
2867 Handle NPPVpluginTransparentBool.
2869 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2870 (WebKit::NetscapePlugin::NetscapePlugin):
2871 Initialize m_isTransparent to false.
2873 (WebKit::NetscapePlugin::setIsTransparent):
2874 Set m_isTransparent.
2876 (WebKit::NetscapePlugin::initialize):
2877 If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent
2878 if there's a 'background' attribute.
2880 (WebKit::NetscapePlugin::isTransparent):
2883 * WebProcess/Plugins/Plugin.h:
2884 Add isTransparent().
2886 * WebProcess/Plugins/PluginProxy.cpp:
2887 (WebKit::PluginProxy::paint):
2888 Always copy the plug-in backing store to the plug-in proxy backing store.
2890 (WebKit::PluginProxy::isTransparent):
2891 Add getter that should never be called.
2893 (WebKit::PluginProxy::update):
2894 Always copy the plug-in backing store to the plug-in proxy backing store.
2896 2011-03-22 Anders Carlsson <andersca@apple.com>
2898 Reviewed by Sam Weinig.
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>
2904 Return early if the NPObject doesn't exist anymore.
2906 * WebProcess/Plugins/PluginProxy.cpp:
2907 (WebKit::PluginProxy::evaluate):
2909 2011-03-22 Sam Weinig <sam@webkit.org>
2911 Reviewed by Adam Roben.
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
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.
2923 2011-03-21 Brady Eidson <beidson@apple.com>
2925 Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783
2927 * Platform/mac/Logging.mac.mm:
2929 2011-03-21 Brady Eidson <beidson@apple.com>
2931 Reviewed by Brian Weinstein.
2933 https://bugs.webkit.org/show_bug.cgi?id=56783
2934 Actually hook up WebKit2 logging on Mac.
2936 * Platform/Logging.cpp:
2937 (WebKit::initializeLogChannel):
2938 * Platform/Logging.h:
2939 * Platform/mac/Logging.mac.mm: Added.
2940 (WebKit::initializeLogChannel):
2942 * UIProcess/WebContext.cpp:
2943 (WebKit::WebContext::WebContext): Initialize logging if necessary.
2945 * WebKit2.xcodeproj/project.pbxproj:
2947 2011-03-21 Alexey Proskuryakov <ap@apple.com>
2949 Reviewed by Darin Adler.
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>
2955 * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
2956 Factored out code for resending an event and moved it to WKView.
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.
2966 * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent.
2968 2011-03-21 Anders Carlsson <andersca@apple.com>
2970 Reviewed by Sam Weinig.
2972 QT plug-in fails to load contextual menu
2973 https://bugs.webkit.org/show_bug.cgi?id=56777
2974 <rdar://problem/8979033>
2976 Open a Carbon resource map and make it the current map when calling NP_Initialize.
2978 * Platform/Module.cpp:
2979 (WebKit::Module::Module):
2980 Initialize m_bundleResourceMap to -1.
2982 * Platform/Module.h:
2983 Add m_bundleResourceMap.
2985 * Platform/mac/ModuleMac.mm:
2986 (WebKit::Module::unload):
2987 Close the resource map.
2989 (WebKit::Module::bundleResourceMap):
2990 Open a resource map if necessary.
2992 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2993 (WebKit::NetscapePluginModule::tryLoad):
2994 Get the resource map and make it current before calling NP_Initialize.
2996 2011-03-21 Anders Carlsson <andersca@apple.com>
2998 Reviewed by Sam Weinig.
3000 Plug-in process crashes if it fails to load a plug-in module
3001 https://bugs.webkit.org/show_bug.cgi?id=56775
3003 * PluginProcess/PluginControllerProxy.cpp:
3004 (WebKit::PluginControllerProxy::initialize):
3005 If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in.
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.
3011 2011-03-21 Anders Carlsson <andersca@apple.com>
3013 Reviewed by Sam Weinig.
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>
3019 Create a layer with geometryFlipped set and add the plug-in layer as a sublayer,
3022 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3023 (WebKit::NetscapePlugin::platformPostInitialize):
3025 2011-03-21 Sam Weinig <sam@webkit.org>
3027 Reviewed by Anders Carlsson.
3029 WebKit2 needs preferences to change security knobs
3030 https://bugs.webkit.org/show_bug.cgi?id=56762
3032 Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed
3033 and FileAccessFromFileURLsAllowed.
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):
3047 2011-03-21 Sam Weinig <sam@webkit.org>
3049 Reviewed by Anders Carlsson.
3051 Remove old DrawingArea and LayerHostingView code from WKView.
3053 * UIProcess/API/mac/WKView.mm:
3054 (-[WKView drawRect:]):
3055 (-[WKView hitTest:]):
3056 (-[WKView WebKit::]):
3058 2011-03-21 Sam Weinig <sam@webkit.org>
3060 Reviewed by Anders Carlsson.
3062 Need WebKit2 API for creating a page with a specific main frame name
3063 https://bugs.webkit.org/show_bug.cgi?id=56759
3065 * Shared/WebPageCreationParameters.cpp:
3066 (WebKit::WebPageCreationParameters::encode):
3067 (WebKit::WebPageCreationParameters::decode):
3068 * Shared/WebPageCreationParameters.h:
3069 Add mainFrameName to creation parameters.
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.
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.
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.
3092 2011-03-20 Bill Budge <bbudge@chromium.org>
3094 Reviewed by Adam Barth.
3096 Rename ThreadSafeShared to ThreadSafeRefCounted
3097 https://bugs.webkit.org/show_bug.cgi?id=56714
3099 No new tests. Exposes no new functionality.
3101 * Platform/CoreIPC/Connection.h:
3102 * Platform/WorkQueue.h:
3103 * Platform/win/WorkQueueWin.cpp:
3104 * UIProcess/Launcher/ProcessLauncher.h:
3105 * UIProcess/Launcher/ThreadLauncher.h:
3107 2011-03-19 Anton D'Auria <adauria@apple.com>
3109 Reviewed by Alexey Proskuryakov.
3111 ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
3112 https://bugs.webkit.org/show_bug.cgi?id=56415
3114 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin
3115 instead of ApplicationCacheStorage::deleteEntriesForOrigin.
3116 (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
3118 2011-03-18 Sam Weinig <sam@webkit.org>
3120 Attempt to fix the WinCairo build.
3122 * win/WebKit2.vcproj:
3124 2011-03-18 Anders Carlsson <andersca@apple.com>
3126 Reviewed by Dan Bernstein.
3128 Empty gray page after going back from a PDF
3129 https://bugs.webkit.org/show_bug.cgi?id=56694
3130 <rdar://problem/8811854>
3132 Update m_frameHasCustomRepresentation when loading a page that's in the page cache.
3134 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3135 (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
3137 2011-03-18 Anders Carlsson <andersca@apple.com>
3139 Reviewed by Sam Weinig.
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>
3145 Guard against a null client.
3147 * Platform/CoreIPC/Connection.cpp:
3148 (CoreIPC::Connection::sendSyncMessage):
3150 2011-03-18 Balazs Kelemen <kbalazs@webkit.org>
3152 Reviewed by Benjamin Poulain.
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
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.
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.
3167 2011-03-18 Darin Adler <darin@apple.com>
3169 Reviewed by Anders Carlsson.
3171 Command-period does not stop load when page has focus in WebKit2
3172 https://bugs.webkit.org/show_bug.cgi?id=56601
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.
3183 2011-03-18 Brady Eidson <beidson@apple.com>
3185 Reviewed by Sam Weinig.
3187 https://bugs.webkit.org/show_bug.cgi?id=56425
3188 More groundwork for WebKit2 IconDatabase
3190 -Update the synchronous method names to be prefixed with "synchronous."
3191 -Add empty implementations for the asynchronous accessors.
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:
3204 2011-03-18 Alejandro G. Castro <alex@igalia.com>
3206 Reviewed by Martin Robinson.
3208 Fixed compilation after r80925.
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.
3229 2011-03-18 Alejandro G. Castro <alex@igalia.com>
3231 Unreviewed, fixed compilation after r81208.
3235 2011-03-18 John Sullivan <sullivan@apple.com>
3237 Reviewed by Dan Bernstein.
3239 https://bugs.webkit.org/show_bug.cgi?id=56645
3240 Assertion fires when hidden Find-on-Page matches are encountered in WebKit2
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.)
3248 2011-03-18 Mark Rowe <mrowe@apple.com>
3250 Rubber-stamped by Jon Honeycutt.
3252 <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only
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.
3258 * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what
3259 each target-specific .xcconfig file should import.
3261 2011-03-17 Mark Rowe <mrowe@apple.com>
3265 * WebKit2.xcodeproj/project.pbxproj:
3267 2011-03-17 Anders Carlsson <andersca@apple.com>
3269 Reviewed by Sam Weinig.
3271 Implement PluginProcessProxy::setFullscreenWindowIsShowing
3272 https://bugs.webkit.org/show_bug.cgi?id=56618
3274 * UIProcess/Plugins/PluginProcessProxy.cpp:
3275 (WebKit::PluginProcessProxy::PluginProcessProxy):
3276 Initialize m_fullscreenWindowIsShowing.
3278 (WebKit::PluginProcessProxy::didClose):
3279 if m_fullscreenWindowIsShowing is true, call exitFullscreen.
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.
3286 (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
3287 Make the plug-in process the front process.
3289 (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
3290 Make the current process (the UI process) the front process.
3292 (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
3293 Call enterFullscreen or exitFullscreen.
3295 (WebKit::PluginProcessProxy::enterFullscreen):
3296 Make the plug-in process the front process and hide the menu bar.
3298 (WebKit::PluginProcessProxy::exitFullscreen):
3299 Show the menu bar and if necessary make the UI process the front process.
3301 (WebKit::PluginProcessProxy::endModal):
3302 call makeUIProcessTheFrontProcess.
3304 (WebKit::PluginProcessProxy::applicationDidBecomeActive):
3305 Call makePluginProcessTheFrontProcess.
3307 2011-03-17 Adam Roben <aroben@apple.com>
3309 Make bidi text in <select> menus in WebKit2 on Windows match WebKit1
3311 Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release
3314 Reviewed by Sam Weinig.
3316 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3317 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
3318 (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
3319 On Windows, return the same values we return in WebKit1.
3321 2011-03-17 Anders Carlsson <andersca@apple.com>
3323 Reviewed by Sam Weinig.
3325 Implement PluginProcessProxy::setModalWindowIsShowing
3326 https://bugs.webkit.org/show_bug.cgi?id=56615
3328 * UIProcess/Plugins/PluginProcessProxy.cpp:
3329 (WebKit::PluginProcessProxy::PluginProcessProxy):
3330 Initialize m_modalWindowIsShowing.
3332 (WebKit::PluginProcessProxy::didClose):
3333 If m_modalWindowIsShowing is true, we must call endModal.
3335 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3336 (-[WKPlaceholderModalWindow _wantsUserAttention]):
3337 Add a WKPlaceholderModalWindow.
3339 (WebKit::PluginProcessProxy::setModalWindowIsShowing):
3340 Call beginModal or endModal depending on whether we're showing a modal window or not.
3342 (WebKit::PluginProcessProxy::beginModal):
3343 Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications.
3345 (WebKit::PluginProcessProxy::endModal):
3346 Tear down the window and the run loop.
3348 (WebKit::PluginProcessProxy::applicationDidBecomeActive):
3349 Make sure that the plug-in process is frontmost.
3351 2011-03-17 Jeff Miller <jeffm@apple.com>
3353 Reviewed by Adam Roben.
3355 Web page shouldn't swallow alt-key combinations on Windows
3356 https://bugs.webkit.org/show_bug.cgi?id=56612
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.
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.
3364 2011-03-17 Anders Carlsson <andersca@apple.com>
3366 Reviewed by Sam Weinig.
3368 Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process
3369 https://bugs.webkit.org/show_bug.cgi?id=56610
3371 * PluginProcess/mac/PluginProcessMac.mm:
3372 (WebKit::FullscreenWindowTracker::FullscreenWindowTracker):
3373 Add fullscreen window tracker class.
3375 (WebKit::rectCoversAnyScreen):
3376 Return whether the given rect covers any screen.
3378 (WebKit::windowCoversAnyScreen):
3379 Return whether the given window covers any screen.
3381 (WebKit::FullscreenWindowTracker::windowShown):
3382 If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
3384 (WebKit::FullscreenWindowTracker::windowHidden):
3385 If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
3387 (WebKit::cocoaWindowShown):
3388 (WebKit::cocoaWindowHidden):
3389 (WebKit::carbonWindowShown):
3390 (WebKit::carbonWindowHidden):
3391 Call the window tracking functions.
3394 Call PluginProcess::setModalWindowIsShowing.
3396 (WebKit::PluginProcess::setModalWindowIsShowing):
3397 (WebKit::PluginProcess::setFullscreenWindowIsShowing):
3398 Send CoreIPC messages.
3400 * UIProcess/Plugins/PluginProcessProxy.h:
3401 * UIProcess/Plugins/PluginProcessProxy.messages.in:
3404 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3405 (WebKit::PluginProcessProxy::setModalWindowIsShowing):
3406 (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
3409 2011-03-17 Sam Weinig <sam@webkit.org>
3411 Reviewed by Brady Eidson.
3413 Allow passing a certificate chain as a user message
3414 <rdar://problem/8951709>
3415 https://bugs.webkit.org/show_bug.cgi?id=56605
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.
3422 * Shared/UserMessageCoders.h:
3423 (WebKit::UserMessageEncoder::baseEncode):
3424 (WebKit::UserMessageDecoder::baseDecode):
3425 Add encoding/decoding of WebCertificateInfo.
3427 2011-03-17 Anders Carlsson <andersca@apple.com>
3429 Reviewed by Sam Weinig.
3431 Add PluginProcessShim hooks for when windows are shown and hidden
3432 https://bugs.webkit.org/show_bug.cgi?id=56597
3434 * Configurations/PluginProcessShim.xcconfig:
3435 Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h.
3437 * PluginProcess/mac/PluginProcessMac.mm:
3438 (WebKit::cocoaWindowShown):
3439 (WebKit::cocoaWindowHidden):
3440 (WebKit::carbonWindowShown):
3441 (WebKit::carbonWindowHidden):
3443 (WebKit::PluginProcess::initializeShim):
3446 * PluginProcess/mac/PluginProcessShim.h:
3447 * PluginProcess/mac/PluginProcessShim.mm:
3448 (WebKit::beginModal):
3450 Keep a modal count and call setModal accordingly.
3452 (WebKit::shim_NSApplication_RunModalForWindow):
3453 (WebKit::shimModalDialog):
3454 (WebKit::shimAlert):
3455 Call beginModal/endModal.
3457 (WebKit::shimShowWindow):
3458 (WebKit::shimHideWindow):
3459 Call the shim functions.
3461 (WebKit::WebKitPluginProcessShimInitialize):
3462 Listen for notifications and call the necessary shim functions.
3464 * WebKit2.xcodeproj/project.pbxproj:
3465 Link the plug-in process shim with AppKit and QuartzCore and WKSI.
3467 2011-03-17 Jeff Miller <jeffm@apple.com>
3469 Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
3477 * WebKit2.xcodeproj: Modified property svn:ignore.
3479 2011-03-17 Sam Weinig <sam@webkit.org>
3481 Reviewed by Anders Carlsson.
3483 WKErrors need the PeerCertificateChain for certificate errors
3484 <rdar://problem/8951784>
3485 https://bugs.webkit.org/show_bug.cgi?id=56592
3487 * Shared/WebCoreArgumentCoders.h:
3488 Special case encoding/decoding of ResourceErrors for the mac.
3490 * Shared/mac/PlatformCertificateInfo.h:
3491 * Shared/mac/PlatformCertificateInfo.mm:
3492 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
3493 Add constructor that take the PeerCertificateChain as CFArrayRef.
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.
3502 2011-03-17 John Sullivan <sullivan@apple.com>
3504 Reviewed by Adam Roben.
3506 https://bugs.webkit.org/show_bug.cgi?id=56574
3507 Dealloc'ing a WKView can leave a stale reference to it in NSWindow
3509 * UIProcess/API/mac/WKView.mm:
3510 (-[WKView viewWillMoveToWindow:]):
3511 Clear the outgoing window's growBoxOwner if it is this view.
3513 2011-03-17 Anders Carlsson <andersca@apple.com>
3515 Rubber-stamped by John Sullivan.
3517 Rename PluginProcessShim.cpp to PluginProcessShim.mm.
3519 * PluginProcess/mac/PluginProcessShim.cpp: Removed.
3520 * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp.
3521 * WebKit2.xcodeproj/project.pbxproj:
3523 2011-03-17 Anders Carlsson <andersca@apple.com>
3525 Reviewed by Darin Adler.
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>
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.
3536 * PluginProcess/PluginControllerProxy.cpp:
3537 (WebKit::PluginControllerProxy::initialize):
3538 If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so.
3540 (WebKit::PluginControllerProxy::destroy):
3541 Pass the plug-in to removePluginControllerProxy.
3543 * PluginProcess/WebProcessConnection.cpp:
3544 (WebKit::WebProcessConnection::removePluginControllerProxy):
3545 Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
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.
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.
3558 (WebKit::NPObjectMessageReceiver::plugin):
3561 * Shared/Plugins/NPObjectProxy.h:
3562 (WebKit::NPObjectProxy::plugin):
3565 * Shared/Plugins/NPRemoteObjectMap.cpp:
3566 (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
3567 Remove m_isInvalidating.
3569 (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
3572 (WebKit::NPRemoteObjectMap::pluginDestroyed):
3573 Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in.
3575 * Shared/Plugins/NPRemoteObjectMap.h:
3576 Remove m_isInvalidating.
3578 * WebProcess/Plugins/PluginProcessConnection.cpp:
3579 (WebKit::PluginProcessConnection::removePluginProxy):
3580 Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
3582 2011-03-17 Oleg Romashin <oleg.romashin@nokia.com>
3584 Reviewed by Anders Carlsson.
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
3590 * Scripts/webkit2/messages.py:
3591 * Scripts/webkit2/messages_unittest.py:
3593 2011-03-16 Joseph Pecoraro <joepeck@webkit.org>
3595 Reviewed by Kenneth Rohde Christiansen.
3597 Viewport no longer allows an auto value for "user-scalable"
3598 https://bugs.webkit.org/show_bug.cgi?id=55416
3600 Make the default value for userScalable be true.
3602 * UIProcess/API/qt/qwkpage.cpp:
3603 (QWKPage::viewportAttributesForSize):
3605 2011-03-16 Anders Carlsson <andersca@apple.com>
3607 Reviewed by Dan Bernstein.
3609 NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object
3610 https://bugs.webkit.org/show_bug.cgi?id=56506
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):
3649 2011-03-16 Beth Dakin <bdakin@apple.com>
3651 Reviewed by Darin Adler.
3653 Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath
3654 WebPageProxy::viewWillStartLiveResize when resizing window after web process
3657 <rdar://problem/9037685>
3659 Just need simple isValid() checks here.
3660 * UIProcess/WebPageProxy.cpp:
3661 (WebKit::WebPageProxy::initializeUIClient):
3662 (WebKit::WebPageProxy::viewWillStartLiveResize):
3663 (WebKit::WebPageProxy::viewWillEndLiveResize):
3665 2011-03-16 Damian Kaleta <dkaleta@apple.com>
3667 Reviewed by Kevin Decker.
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>
3673 * UIProcess/Plugins/PluginProcessProxy.cpp:
3674 (WebKit::PluginProcessProxy::PluginProcessProxy):
3675 * UIProcess/Plugins/PluginProcessProxy.h:
3676 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3677 (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
3679 2011-03-16 Chris Fleizach <cfleizach@apple.com>
3681 Reviewed by Darin Adler.
3683 WK2: Need to propagate enhanced accessibility flag from UI -> web process
3684 https://bugs.webkit.org/show_bug.cgi?id=56379
3686 Support sending the enhanced accessibility flag between processes.
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:
3706 2011-03-15 Oliver Hunt <oliver@apple.com>
3708 Reviewed by Geoffrey Garen.
3710 Make Structure creation require a JSGlobalData
3711 https://bugs.webkit.org/show_bug.cgi?id=56438
3713 Mechanical change to make all Structure creation use a JSGlobalData&.
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):
3724 2011-03-16 Alexey Proskuryakov <ap@apple.com>
3726 Reviewed by Dan Bernstein.
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>
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.
3736 2011-03-16 Sam Weinig <sam@webkit.org>
3738 Reviewed by Adam Roben.
3740 Add WebKit2 API to figure out if an input or textarea was edited
3741 https://bugs.webkit.org/show_bug.cgi?id=56474
3743 Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and
3744 WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time,
3745 I will work on giving these functions longer names.
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:
3756 2011-03-16 Brady Eidson <beidson@apple.com>
3758 Reviewed by Adam Roben.
3760 https://bugs.webkit.org/show_bug.cgi?id=56467
3761 IconDatabase-related crash seen in WK2 tests
3763 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
3764 (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case.
3766 2011-03-16 Benjamin Poulain <benjamin.poulain@nokia.com>
3768 Reviewed by Kenneth Rohde Christiansen.
3770 [Qt][WK2] Loading an empty URL crashes
3771 https://bugs.webkit.org/show_bug.cgi?id=55501
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.
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.
3779 Tested through the Qt API tests.
3781 * UIProcess/API/C/WKPage.cpp:
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:
3792 2011-03-15 Brady Eidson <beidson@apple.com>
3794 Reviewed by Sam Weinig.
3796 https://bugs.webkit.org/show_bug.cgi?id=56425
3797 WebKit2 icon database.
3799 Project file paperwork:
3800 * DerivedSources.make:
3801 * DerivedSources.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".
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):
3819 Prep to make WebIconDatabase an API object:
3820 * Shared/APIObject.h:
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:
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):
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):
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):
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.
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:
3898 2011-03-15 Sam Weinig <sam@webkit.org>
3900 Reviewed by Anders Carlsson.
3902 WebKit2: False SPOD cursor when context menu is open
3903 <rdar://problem/9029154>
3904 https://bugs.webkit.org/show_bug.cgi?id=56433
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.
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.
3920 2011-03-15 Siddharth Mathur <siddharth.mathur@nokia.com>
3922 Reviewed by Laszlo Gombos.
3924 [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol
3925 https://bugs.webkit.org/show_bug.cgi?id=56417
3927 Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure
3928 the symbol is always exported/imported.
3930 * WebProcess/qt/WebProcessMainQt.cpp:
3931 (WebKit::WebProcessMainQt):
3934 2011-03-15 Alexey Proskuryakov <ap@apple.com>
3936 Reviewed by Darin Adler.
3938 REGRESSION (WebKit2): keygen element doesn't work
3939 https://bugs.webkit.org/show_bug.cgi?id=56402
3940 <rdar://problem/9006545>
3942 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3943 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3944 Added strings used by keygen.
3946 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
3947 a function used by keygen.
3949 2011-03-15 Beth Dakin <bdakin@apple.com>
3951 Reviewed by Simon Fraser.
3953 WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6%
3955 New WebKitystemInterface function to force the scrollbars to flash
3956 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3957 (InitWebCoreSystemInterface):
3959 2011-03-15 Anders Carlsson <andersca@apple.com>
3961 Reviewed by Sam Weinig.
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>
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
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):
3980 2011-03-15 Martin Robinson <mrobinson@igalia.com>
3982 Reviewed by Adam Barth.
3984 [GTK] [WebKit2] The UIProcess never changes the mouse cursor
3985 https://bugs.webkit.org/show_bug.cgi?id=56333
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.
3991 * UIProcess/gtk/WebView.cpp:
3992 (WebKit::WebView::setCursor): Ported implementation from WebKit1.
3994 2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
3996 Reviewed by Darin Adler.
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.
4002 https://bugs.webkit.org/show_bug.cgi?id=27551
4006 2011-03-14 Alexey Proskuryakov <ap@apple.com>
4008 Reviewed by Darin Adler.
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>
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).
4019 2011-03-14 Adam Roben <aroben@apple.com>
4021 Make WKBundlePageCanHandleRequest return true for empty document URLs
4023 Reviewed by Sam Weinig.
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.
4029 * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest.
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.
4039 2011-03-14 Chris Fleizach <cfleizach@apple.com>
4041 Reviewed by Beth Dakin.
4043 CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248
4044 https://bugs.webkit.org/show_bug.cgi?id=56336
4046 Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view()
4049 * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
4050 (-[AccessibilityWebPageObject accessibilityHitTest:]):
4052 2011-03-14 Alice Liu <alice.liu@apple.com>
4054 Reviewed by Sam Weinig.
4056 Provide API for creating WKImage from CGImageRef
4057 https://bugs.webkit.org/show_bug.cgi?id=56159
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:
4064 2011-03-14 Balazs Kelemen <kbalazs@webkit.org>
4066 Reviewed by Adam Roben.
4068 [Qt][WK2]Unbreak InjectedBundle on Qt
4069 https://bugs.webkit.org/show_bug.cgi?id=54109
4071 Add API's to WKURL and WKString to satisfy
4072 WebKitTestRunner's needs.
4074 * Shared/API/c/WKString.cpp:
4075 (WKStringIsEqualToUTF8CStringIgnoringCase):
4076 * Shared/API/c/WKString.h:
4077 * Shared/API/c/WKURL.cpp:
4078 (WKURLCopyHostName):
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.
4091 2011-03-14 Jeff Miller <jeffm@apple.com>
4093 Reviewed by Adam Roben.
4095 Add WKViewSetScrollOffsetOnNextResize() to C API on Windows
4096 https://bugs.webkit.org/show_bug.cgi?id=56340
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().
4106 2011-03-14 Brian Weinstein <bweinstein@apple.com>
4108 Reviewed by Adam Roben and Gavin Barraclough.
4110 FileSystemWin.cpp needs listDirectory() implementation
4111 https://bugs.webkit.org/show_bug.cgi?id=56331
4112 <rdar://problem/9126635>
4114 Move PathWalker down into WebCore, and call the PathWalker in WebCore
4115 (that now has a second argument, the pattern to take).
4117 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
4118 (WebKit::PluginInfoStore::pluginPathsInDirectory):
4120 2011-03-14 Sam Weinig <sam@webkit.org>
4122 Reviewed by Darin Adler.
4124 WebKit2: No icon shown for <input type=file>
4125 <rdar://problem/8988982>
4126 https://bugs.webkit.org/show_bug.cgi?id=54288
4128 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4129 (WebKit::WebChromeClient::chooseIconForFiles):
4130 Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles.
4132 2011-03-14 Brady Eidson <beidson@apple.com>
4134 Reviewed by Dan Bernstein.
4136 <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
4137 Need WK2 API to view/manage origins with LocalStorage
4139 Hookup the existing API stubs to the WebCore implementations:
4140 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: