1 2009-03-19 Timothy Hatcher <timothy@apple.com>
3 Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
4 for Page, so the new RunLoopTimer in WebCore always gets a default mode.
5 Fixes the layout test failures on the Tiger build bots.
10 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
11 (-[WebView scheduleInRunLoop:forMode:]):
12 (-[WebView unscheduleFromRunLoop:forMode:]):
14 2009-03-18 Anders Carlsson <andersca@apple.com>
16 Reviewed by Oliver Hunt.
18 WebKit side of <rdar://problem/6688244>.
20 Try reinitializing the vendor port if it's invalid.
22 * Plugins/Hosted/NetscapePluginHostManager.mm:
23 (WebKit::NetscapePluginHostManager::spawnPluginHost):
25 2009-03-18 Anders Carlsson <andersca@apple.com>
27 Reviewed by Darin Adler.
29 <rdar://problem/6504776>
30 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
32 If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
33 causing the plug-in never to be stopped. Simplify the code by using a RAII object.
35 * Plugins/WebBaseNetscapePluginStream.mm:
36 (PluginStopDeferrer::PluginStopDeferrer):
37 (PluginStopDeferrer::~PluginStopDeferrer):
38 (WebNetscapePluginStream::startStream):
39 (WebNetscapePluginStream::wantsAllStreams):
40 (WebNetscapePluginStream::destroyStream):
42 2009-03-17 Darin Adler <darin@apple.com>
44 Reviewed by Adele Peterson.
46 <rdar://problem/6687005> Need support for new move-left/right selectors.
48 * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
49 * WebView/WebView.mm: Ditto.
51 2009-03-17 Darin Adler <darin@apple.com>
53 Reviewed by Adele Peterson.
55 Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
56 https://bugs.webkit.org/show_bug.cgi?id=24477
57 rdar://problem/6674184
59 * WebView/WebHTMLView.mm:
60 (responderChainRespondsToSelector): Added.
61 (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
62 can find a responder that responds to this selector rather than always assuming
63 the selector will not be handled.
65 2009-03-17 Mark Rowe <mrowe@apple.com>
69 * Plugins/Hosted/HostedNetscapePluginStream.mm:
71 2009-03-17 David Kilzer <ddkilzer@apple.com>
73 Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
75 Reviewed by Darin Adler.
77 WebKit r30323 added -_webcore_MIMEType to fix issues with
78 incorrect MIME types in NS[HTTP]URLResponse objects. However,
79 uses of -[NSURLResponse MIMEType] still persist in WebKit that
80 should be switched to use -_webcore_MIMEType. Note that
81 -[WebDataSource _responseMIMEType] calls back into WebCore to
82 get the MIME type from the ResourceResponse object, which has
83 already retrieved it via -_webcore_MIMEType.
85 * Plugins/Hosted/HostedNetscapePluginStream.mm:
86 (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
88 * Plugins/WebBaseNetscapePluginStream.mm:
89 (WebNetscapePluginStream::didReceiveResponse): Ditto.
90 * Plugins/WebNetscapePluginView.mm:
91 (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
92 * Plugins/WebPluginController.mm:
93 (-[WebPluginController pluginView:receivedResponse:]): Ditto.
94 * WebView/WebHTMLRepresentation.mm:
95 (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
96 -[WebDataSource _responseMIMEType] instead.
97 * WebView/WebPDFRepresentation.m:
98 (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
99 * WebView/WebPDFView.mm:
100 (-[WebPDFView menuForEvent:]): Ditto.
102 2009-03-17 Simon Fraser <simon.fraser@apple.com>
104 Reviewed by Darin Adler
106 https://bugs.webkit.org/show_bug.cgi?id=24396
108 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
112 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
114 Reviewed by Mark Rowe.
116 Get BUILDING_ON_* defines from Platform.h.
118 https://bugs.webkit.org/show_bug.cgi?id=24630
122 2009-03-16 Darin Adler <darin@apple.com>
124 Reviewed by Dan Bernstein.
126 <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
128 * WebCoreSupport/WebViewFactory.mm:
129 (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
130 post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
131 (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
133 2009-03-16 Anders Carlsson <andersca@apple.com>
135 Reviewed by Oliver Hunt.
137 Don't mig_deallocate random data in case an instance proxy method returns false.
139 * Plugins/Hosted/NetscapePluginHostProxy.mm:
146 2009-03-16 Anders Carlsson <andersca@apple.com>
148 Reviewed by Oliver Hunt.
150 <rdar://problem/6633944>
151 REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
153 Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
155 * Plugins/WebPluginController.mm:
156 (-[WebPluginController addPlugin:]):
158 2009-03-16 Anders Carlsson <andersca@apple.com>
160 Reviewed by Sam Weinig.
162 Fix <rdar://problem/6622601>
164 Make sure to update both the window frame and the plug-in frame.
166 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
167 (-[WebHostedNetscapePluginView addWindowObservers]):
169 2009-03-15 Dan Bernstein <mitz@apple.com>
171 Reviewed by Adele Peterson.
173 - fix <rdar://problem/6607773> WebKit should support the "Default"
174 paragraph writing direction -- or at least validate the menu item
177 Made WebHTMLView validate user interface items with the selector
178 -makeBaseWritingDirectionNatural: by returning NO and, if the item is
179 a menu item, setting its state to "off".
181 Strictly speaking, since -makeBaseWritingDirectionNatural: is never
182 valid for WebViews, WebHTMLView should not need to respond to it and
183 validate it, however because other responders respond to all three
184 -makeBaseWritingDirection*: messages and set the menu item state, having
185 WebHTMLView do the same makes application developers' lives easier.
187 * WebView/WebHTMLView.mm:
188 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
189 (-[WebHTMLView makeBaseWritingDirectionNatural:]):
191 2009-03-13 Mark Rowe <mrowe@apple.com>
193 Rubber-stamped by Dan Bernstein.
195 Take advantage of the ability of recent versions of Xcode to easily switch the active
198 * Configurations/DebugRelease.xcconfig:
200 2009-03-13 Anders Carlsson <andersca@apple.com>
202 Reviewed by Kevin Decker and Geoffrey Garen.
204 <rdar://problem/6590384>
205 REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
207 When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call,
208 and thus calling -[WebView hostWindow] will crash since _private is nil.
210 * WebView/WebView.mm:
211 (-[WebView hostWindow]):
213 2009-03-13 Anders Carlsson <andersca@apple.com>
215 And yet another attempt...
217 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
218 (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
219 (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
220 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
222 2009-03-13 Anders Carlsson <andersca@apple.com>
224 Another attempt at fixing the build.
226 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
227 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
229 2009-03-13 Anders Carlsson <andersca@apple.com>
231 Try to fix the SL build.
233 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
234 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
235 (WebNetscapePluginEventHandlerCocoa::keyDown):
237 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
239 Reviewed by Simon Fraser.
241 Update Geolocation perimission dialogs to be asynchronous.
242 https://bugs.webkit.org/show_bug.cgi?id=24505
244 WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
245 coding style set by WebSecurityOrigin.
247 WebChromeClient now calls the private UI delegate method
248 -webView:frame:requestGeolocationPermission:securityOrigin:
250 * WebCoreSupport/WebChromeClient.h:
251 * WebCoreSupport/WebChromeClient.mm:
252 (WebChromeClient::requestGeolocationPermissionForFrame):
253 * WebCoreSupport/WebGeolocation.mm: Added.
255 (-[WebGeolocation shouldClearCache]):
256 (-[WebGeolocation setIsAllowed:]):
257 (-[WebGeolocation dealloc]):
258 * WebCoreSupport/WebGeolocationInternal.h: Added.
259 * WebCoreSupport/WebGeolocationPrivate.h: Added.
260 * WebView/WebUIDelegatePrivate.h:
262 2009-03-13 Anders Carlsson <andersca@apple.com>
264 Reviewed by Dan Bernstein.
266 <rdar://problem/6610666> Revise the Cocoa event model text API
268 Replace the text input API with a simpler API that uses a separate text input window.
270 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
271 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
272 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
273 Initialize m_keyEventHandler to 0.
275 (WebNetscapePluginEventHandlerCocoa::keyDown):
276 If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
278 (WebNetscapePluginEventHandlerCocoa::focusChanged):
279 Install/remove the key event handler as needed.
281 (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
282 Get the text and send a TextInput event.
284 * Plugins/WebNetscapePluginView.h:
285 * Plugins/WebNetscapePluginView.mm:
286 Remove the old text input API.
288 (-[WebNetscapePluginView inputContext]):
289 Always return nil here.
292 * Plugins/nptextinput.h: Removed.
294 2009-03-12 Anders Carlsson <andersca@apple.com>
296 Reviewed by Mike Thole and Mark Rowe.
298 Fix <rdar://problem/6624105>.
300 Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
302 * Plugins/Hosted/NetscapePluginHostProxy.mm:
303 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
305 2009-03-12 Anders Carlsson <andersca@apple.com>
307 Reviewed by Geoffrey Garen.
309 WebKit side of <rdar://problem/6607801>
311 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
312 (WebKit::NetscapePluginInstanceProxy::destroy):
313 Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
315 * Plugins/Hosted/WebKitPluginHost.defs:
316 Add requestID parameter.
318 2009-03-12 Kevin Decker <kdecker@apple.com>
320 Reviewed by Anders Carlsson.
322 * Plugins/WebNetscapePluginPackage.mm:
323 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
325 2009-03-12 Kevin Decker <kdecker@apple.com>
327 Reviewed by Anders Carlsson.
329 Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
331 This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still
332 had a reference to open windows that the plugin created (which no longer exist).
334 * Plugins/WebNetscapePluginPackage.mm:
335 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown.
337 2009-03-11 David Kilzer <ddkilzer@apple.com>
339 Remove duplicate header include
341 Rubber-stamped by Mark Rowe.
343 * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
344 Also realphabetized lowercase #include statements.
346 2009-03-11 David Kilzer <ddkilzer@apple.com>
348 Clarify comments regarding order of FEATURE_DEFINES
350 Rubber-stamped by Mark Rowe.
352 * Configurations/WebKit.xcconfig: Added warning about the
353 consequences when FEATURE_DEFINES are not kept in sync.
355 2009-03-11 Anders Carlsson <andersca@apple.com>
357 Reviewed by Sam Weinig.
359 WebKit side of <rdar://problem/6656147>.
361 * Plugins/Hosted/NetscapePluginHostManager.mm:
362 (WebKit::NetscapePluginHostManager::instantiatePlugin):
363 Pass the requestID to _WKPHInstantiatePlugin.
365 * Plugins/Hosted/NetscapePluginHostProxy.mm:
366 Pass the requestID to setCurrentReply.
368 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
369 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
370 Store the reply in a map with the requestID as the key.
372 (WebKit::NetscapePluginInstanceProxy::waitForReply):
373 Wait for a reply that matches the given requestID.
375 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
376 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
377 Initialize member variables.
379 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
382 (WebKit::NetscapePluginInstanceProxy::print):
383 Pass the requestID to _WKPHPluginInstancePrint.
385 (WebKit::NetscapePluginInstanceProxy::loadRequest):
386 Rename m_currentRequestID to m_currentURLRequestID.
388 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
389 Process requests until we find a reply with the right requestID.
391 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
392 Pass a requestID to the _WKPH function.
394 (WebKit::NetscapePluginInstanceProxy::nextRequestID):
397 * Plugins/Hosted/ProxyInstance.mm:
398 Pass a requestID to the _WKPH functions.
400 * Plugins/Hosted/WebKitPluginClient.defs:
401 * Plugins/Hosted/WebKitPluginHost.defs:
402 Add requestID parameters.
404 2009-03-11 Anders Carlsson <andersca@apple.com>
406 Reviewed by Darin Adler.
408 Fix <rdar://problem/6620064>.
410 * Plugins/WebPluginContainerPrivate.h:
412 2009-03-10 Xan Lopez <xlopez@igalia.com>
414 Build fix, no review.
416 * WebView/WebFrame.mm:
417 (-[WebFrame _smartDeleteRangeForProposedRange:]):
419 2009-03-09 Anders Carlsson <andersca@apple.com>
421 Reviewed by Kevin Decker.
423 WebKit side of <rdar://problem/6530007>
425 * Plugins/Hosted/NetscapePluginHostProxy.mm:
427 Call NetscapePluginInstanceProxy::enumerate.
429 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
430 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
431 (WebKit::NetscapePluginInstanceProxy::enumerate):
432 Enumerate the JS object and serialize its values.
434 * Plugins/Hosted/ProxyInstance.h:
435 * Plugins/Hosted/ProxyInstance.mm:
436 (WebKit::ProxyInstance::getPropertyNames):
437 Ask the plug-in host to get the property names and deserialize them.
439 * Plugins/Hosted/WebKitPluginClient.defs:
440 * Plugins/Hosted/WebKitPluginHost.defs:
442 2009-03-09 Simon Fraser <simon.fraser@apple.com>
444 Reviewed by Oliver Hunt and Cameron Zwarich
446 https://bugs.webkit.org/show_bug.cgi?id=24440
448 The sublayer added to WebHTMLView to host accelerated compositing layers needs to
449 be a subclass of NSView which allows context menu clicks through.
451 * WebView/WebHTMLView.mm:
452 (-[WebLayerHostingView rightMouseDown:]):
453 (-[WebHTMLView attachRootLayer:]):
455 2009-03-08 Mark Rowe <mrowe@apple.com>
457 Reviewed by Oliver Hunt.
459 Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
460 Frame.h no longer needs to include it. This cuts the size of the symbols
461 for a debug build by around 3%.
463 * Plugins/WebNetscapePluginView.mm:
464 * WebView/WebFrame.mm:
465 (-[WebFrame _scrollDOMRangeToVisible:]):
466 (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
467 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
468 * WebView/WebHTMLView.mm:
469 (-[WebHTMLView jumpToSelection:]):
470 (-[WebHTMLView centerSelectionInVisibleArea:]):
472 2009-03-07 Dan Bernstein <mitz@apple.com>
474 Reviewed by Alexey Proskuryakov.
476 - fix a bug where debug builds were clearing the HTML5 application cache
477 on application termination
479 * WebView/WebView.mm:
480 (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
483 2009-03-06 Douglas R. Davidson <ddavidso@apple.com>
485 Reviewed by Justin Garcia.
487 https://bugs.webkit.org/show_bug.cgi?id=24108
489 Update spelling and grammar checking to use the new combined text
490 checking (with automatic language identification) on Snow Leopard.
492 * WebCoreSupport/WebEditorClient.h:
493 * WebCoreSupport/WebEditorClient.mm:
494 (WebEditorClient::checkSpellingAndGrammarOfParagraph):
496 2009-03-05 Adele Peterson <adele@apple.com>
498 Reviewed by Darin Adler.
500 Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
501 <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
502 <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
504 * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
505 If WebKit does not support the command, we need to pass the selector to super. In this case,
506 we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
507 can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
508 example of that happening and causing broken behavior.
510 2009-03-04 Mark Rowe <mrowe@apple.com>
512 Reviewed by Dan Bernstein.
514 <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
516 * WebView/WebHTMLView.mm:
517 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
519 2009-03-04 Adam Barth <abath@webkit.org>
521 Reviewed by Alexey Proskuryakov.
523 https://bugs.webkit.org/show_bug.cgi?id=24356
525 Fix WebKit style for allowUniversalAccessFromFileURLs.
527 * WebView/WebPreferenceKeysPrivate.h:
528 * WebView/WebPreferences.mm:
529 (+[WebPreferences initialize]):
530 (-[WebPreferences allowUniversalAccessFromFileURLs]):
531 (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
532 * WebView/WebPreferencesPrivate.h:
533 * WebView/WebView.mm:
534 (-[WebView _preferencesChangedNotification:]):
536 2009-03-03 David Kilzer <ddkilzer@apple.com>
538 <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
540 Reviewed by Mark Rowe.
542 The fix is to add INSTALLHDRS_COPY_PHASE = YES and
543 INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
544 make sure various build phase scripts work with the installhdrs
547 * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
548 based on PLATFORM_NAME to work around the missing definition on
550 * Configurations/WebKit.xcconfig: Added
551 WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
552 UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
553 Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and
554 INSTALLHDRS_SCRIPT_PHASE = YES.
556 2009-03-03 David Kilzer <ddkilzer@apple.com>
558 Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
560 Reviewed by Adam Roben.
562 Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
563 since NPAPI headers had migrated from JavaScriptCore to WebCore
566 * Configurations/WebKit.xcconfig: Removed definition of
567 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
569 2009-03-03 Anders Carlsson <andersca@apple.com>
571 Reviewed by Darin Adler.
573 Fix <rdar://problem/6633834>.
575 * Plugins/Hosted/NetscapePluginHostManager.mm:
576 (WebKit::NetscapePluginHostManager::instantiatePlugin):
577 Create a new plug-in instance if the plug-in host has crashed.
579 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
580 (WebKit::NetscapePluginInstanceProxy::invalidate):
581 Add a null check for the plug-in host proxy.
583 2009-03-02 Sam Weinig <sam@webkit.org>
585 Reviewed by Mark Rowe.
587 Enable Geolocation (except on Tiger and Leopard).
589 * Configurations/WebKit.xcconfig:
591 2009-03-02 Anders Carlsson <andersca@apple.com>
593 Reviewed by Dan Bernstein.
595 WebKit part of <rdar://problem/6638658>.
597 * Plugins/Hosted/NetscapePluginHostManager.h:
598 * Plugins/Hosted/NetscapePluginHostManager.mm:
599 (WebKit::NetscapePluginHostManager::createPropertyListFile):
600 Spawn the plug-in host and wait for it to create the property list.
602 * Plugins/WebBasePluginPackage.mm:
603 (-[WebBasePluginPackage createPropertyListFile]):
604 Factor code out into a new method.
606 (-[WebBasePluginPackage pListForPath:createFile:]):
607 Call the newly added createPropertyListFile method.
609 * Plugins/WebNetscapePluginPackage.mm:
610 (-[WebNetscapePluginPackage createPropertyListFile]):
611 Tell the plug-in host manager to create a property list file for us.
613 2009-03-02 Sam Weinig <sam@webkit.org>
615 Reviewed by Geoffrey Garen.
617 Fix for <rdar://problem/6507404> Add Geolocation support.
619 This is not yet turned on for any Mac platform.
621 Add SPI to ask the embedding application whether to allow
622 Geolocation for an origin.
624 * WebCoreSupport/WebChromeClient.h:
625 * WebCoreSupport/WebChromeClient.mm:
626 (WebChromeClient::shouldAllowGeolocationForFrame):
627 * WebView/WebUIDelegatePrivate.h:
629 2009-03-02 Anders Carlsson <andersca@apple.com>
633 * Plugins/WebNetscapePluginPackage.mm:
634 (-[WebNetscapePluginPackage _tryLoad]):
636 2009-03-02 Anders Carlsson <andersca@apple.com>
638 Reviewed by John Sullivan, Ada Chan.
640 Factor loading code out into its own method and get rid of a bunch of gotos.
642 * Plugins/WebNetscapePluginPackage.mm:
643 (-[WebNetscapePluginPackage _tryLoad]):
644 (-[WebNetscapePluginPackage load]):
646 2009-03-02 Anders Carlsson <andersca@apple.com>
650 * Plugins/WebNetscapeDeprecatedFunctions.h:
652 2009-03-02 Anders Carlsson <andersca@apple.com>
654 Reviewed by John Sullivan.
656 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
658 * Plugins/WebNetscapePluginPackage.m: Removed.
659 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
661 2009-03-01 Anders Carlsson <andersca@apple.com>
663 Reviewed by Sam Weinig.
665 WebKit side of <rdar://problem/6449689>
667 Pass the visible name to the plug-in host.
669 * Plugins/Hosted/NetscapePluginHostManager.mm:
670 (WebKit::NetscapePluginHostManager::spawnPluginHost):
672 2009-02-27 Alice Liu <alice.liu@apple.com>
674 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
675 extension to images that already have .jpg extension
677 Reviewed by Oliver Hunt.
679 * WebView/WebHTMLView.mm:
680 (-[NSString matchesExtensionEquivalent:]):
681 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
682 Relax the check for the proper extension to allow for known
683 equivalents, special-cased in matchesExtensionEquivalent function.
685 2009-02-27 Anders Carlsson <andersca@apple.com>
687 Reviewed by Geoffrey Garen.
689 <rdar://problem/6631436>
690 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
692 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
694 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
695 (WebKit::NetscapePluginInstanceProxy::evaluate):
697 2009-02-27 Anders Carlsson <andersca@apple.com>
699 Reviewed by Geoffrey Garen.
701 WebKit side of <rdar://problem/6626814>.
703 * Plugins/Hosted/NetscapePluginHostProxy.mm:
705 Make InvokeDefault async.
707 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
708 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
709 Handle passing NPObjects back to the plug-in host.
711 * Plugins/Hosted/ProxyInstance.h:
712 (WebKit::ProxyInstance::objectID):
715 * Plugins/Hosted/WebKitPluginClient.defs:
716 Make InvokeDefault a simpleroutine.
718 2009-02-27 Timothy Hatcher <timothy@apple.com>
720 Fixes an exception by null checking the WebResource before adding it to
721 the subresources array.
723 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
725 Reviewed by Geoff Garen and Anders Carlsson.
727 * WebView/WebDataSource.mm:
728 (-[WebDataSource subresources]): Null check the WebResource before adding it.
730 2009-02-27 Timothy Hatcher <timothy@apple.com>
732 Adds a workaround for Automator creating a WebView from a secondary thread.
734 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
735 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
737 Reviewed by Geoff Garen.
739 * WebView/WebView.mm:
740 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
742 2009-02-27 Adam Barth <abarth@webkit.org>
744 Reviewed by Eric Seidel.
746 Add a preference to reduce the power of file:// URLs.
748 * WebView/WebPreferenceKeysPrivate.h:
749 * WebView/WebPreferences.mm:
750 (+[WebPreferences initialize]):
751 (-[WebPreferences allowUniversalAccessFromFileUrls]):
752 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
753 * WebView/WebPreferencesPrivate.h:
754 * WebView/WebView.mm:
755 (-[WebView _preferencesChangedNotification:]):
757 2009-02-27 Simon Fraser <simon.fraser@apple.com>
759 Reviewed by Anders Carlsson
761 https://bugs.webkit.org/show_bug.cgi?id=24242
763 setCursor(), and resetCursorRects() on Tiger, were using global, not local
764 coordinates for elementAtPoint:
766 * WebView/WebHTMLView.mm:
770 2009-02-27 Adam Barth <abarth@webkit.org>
772 Reviewed by Eric Seidel.
774 Add a preference to reduce the power of file:// URLs.
776 * WebView/WebPreferenceKeysPrivate.h:
777 * WebView/WebPreferences.mm:
778 (+[WebPreferences initialize]):
779 (-[WebPreferences allowUniversalAccessFromFileUrls]):
780 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
781 * WebView/WebPreferencesPrivate.h:
782 * WebView/WebView.mm:
783 (-[WebView _preferencesChangedNotification:]):
785 2009-02-26 Adele Peterson <adele@apple.com>
787 Reviewed by Geoff Garen.
789 Fix for <rdar://problem/6618166>
790 https://bugs.webkit.org/show_bug.cgi?id=24216
791 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
793 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
794 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
795 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
797 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
798 fixed in r36919 and r38570 are still fixed.
800 * WebView/WebHTMLView.mm:
801 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
802 (-[WebHTMLView _isResigningFirstResponder]): Added.
803 * WebView/WebHTMLViewInternal.h:
804 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
805 if the document view is currently resigning first responder.
807 2009-02-25 Anders Carlsson <andersca@apple.com>
809 Reviewed by Kevin Decker.
811 Fix <rdar://problem/6623697>.
813 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
814 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
815 (WebKit::NetscapePluginInstanceProxy::print):
816 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
817 the image into the passed in context.
819 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
820 (-[WebHostedNetscapePluginView drawRect:]):
821 When printing, call NetscapePluginInstanceProxy::print.
823 * Plugins/Hosted/WebKitPluginHost.defs:
825 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
827 Reviewed by Darin Adler.
829 https://bugs.webkit.org/show_bug.cgi?id=24024
830 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
831 archiving a submission to about:blank
833 I don't know how to make an automated test for this bug.
835 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
836 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
838 2009-02-25 Chris Fleizach <cfleizach@apple.com>
840 Reviewed by Beth Dakin.
843 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
844 https://bugs.webkit.org/show_bug.cgi?id=24143
846 * WebView/WebFrame.mm:
847 (-[WebFrame _accessibilityTree]):
849 2009-02-25 Simon Fraser <simon.fraser@apple.com>
851 Build fix with ACCELERATED_COMPOSITING turned on.
853 I missed a spot in my last commit in renaming to
854 _stoppedAcceleratedCompositingForFrame:
856 * WebView/WebHTMLView.mm:
857 (-[WebHTMLView close]):
859 2009-02-25 Simon Fraser <simon.fraser@apple.com>
861 Reviewed by Dan Bernstein
863 https://bugs.webkit.org/show_bug.cgi?id=23854
865 Make an observable property, _isUsingAcceleratedCompositing, on
866 WebView that DumpRenderTree can use to specialize behavior.
868 This is implemented via a count of Frames that are using
869 accelerated compositing.
871 * WebView/WebHTMLView.mm:
872 (-[WebHTMLViewPrivate clear]):
873 (-[WebHTMLView close]):
874 (-[WebHTMLView attachRootLayer:]):
875 (-[WebHTMLView detachRootLayer]):
876 * WebView/WebView.mm:
877 (+[WebView automaticallyNotifiesObserversForKey:]):
878 (-[WebView _startedAcceleratedCompositingForFrame:]):
879 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
880 (-[WebView _isUsingAcceleratedCompositing]):
881 * WebView/WebViewInternal.h:
882 * WebView/WebViewPrivate.h:
884 2009-02-24 Sam Weinig <sam@webkit.org>
886 Reviewed by Geoffrey Garen.
888 Related to <rdar://problem/6590295>
889 Allow disabling javascript: urls.
891 * WebView/WebView.mm:
892 (-[WebView _setJavaScriptURLsAreAllowed:]):
893 * WebView/WebViewPrivate.h:
895 2009-02-24 Mark Rowe <mrowe@apple.com>
897 Reviewed by Oliver Hunt.
899 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
901 * Carbon/CarbonUtils.h:
902 * Carbon/HIWebView.h:
903 * Plugins/WebPlugin.h:
904 * Plugins/WebPluginViewFactory.h:
905 * WebView/WebUIDelegate.h:
907 2009-02-24 Peter Ammon <pammon@apple.com>
909 Reviewed by Mark Rowe.
911 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
913 * WebView/WebHTMLView.mm:
914 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
915 both the send and return type. We should also handle a nil send or return type by ignoring
916 the argument and returning whether we can handle the other type passed in.
918 2009-02-23 Anders Carlsson <andersca@apple.com>
920 Reviewed by Geoffrey Garen and Darin Adler.
922 WebKit side of <rdar://problem/6613151>.
924 Make sure to vm_deallocate all memory we get from MIG callbacks.
926 * Plugins/Hosted/NetscapePluginHostProxy.mm:
927 (DataDeallocator::DataDeallocator):
928 (DataDeallocator::~DataDeallocator):
929 Add a simple deallocator class.
933 (WKPCBooleanAndDataReply):
935 (WKPCGetStringIdentifier):
940 Use the new deallocator class.
942 2009-02-23 Anders Carlsson <andersca@apple.com>
944 Reviewed by Darin Adler.
946 Fix <rdar://problem/6450656>.
948 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
949 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
950 (WebKit::NetscapePluginInstanceProxy::insertText):
951 Add insert text which just calls the new WKPH function.
953 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
954 (-[WebHostedNetscapePluginView inputContext]):
955 Get the input context from the shared input panel.
957 (-[WebHostedNetscapePluginView keyDown:]):
958 Let the shared input panel have a go at the event first.
960 * Plugins/Hosted/WebKitPluginHost.defs:
961 Add new InsertText function.
963 2009-02-23 Mark Rowe <mrowe@apple.com>
965 Fix the build after r41126.
967 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
968 (WebKit::NetscapePluginInstanceProxy::invoke):
969 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
970 (WebKit::NetscapePluginInstanceProxy::construct):
972 2009-02-22 Dan Bernstein <mitz@apple.com>
974 Reviewed by Darin Adler.
976 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
978 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
979 in r30741, and assign the height value, rather than the width, to the
982 2009-02-21 Anders Carlsson <andersca@apple.com>
986 * Plugins/Hosted/WebTextInputWindowController.m:
988 2009-02-20 Anders Carlsson <andersca@apple.com>
990 Reviewed by Dan Bernstein.
992 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
994 * Plugins/Hosted/WebTextInputWindowController.h: Added.
995 * Plugins/Hosted/WebTextInputWindowController.m: Added.
997 2009-02-20 Kevin Decker <kdecker@apple.com>
999 Reviewed by andersca.
1001 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
1003 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
1004 we are trying to set. Depending on what other I/O is going on, it can take some time.
1006 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
1007 (setMetaData): Added. Calls WKSetMetadataURL().
1008 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
1010 2009-02-19 Dan Bernstein <mitz@apple.com>
1012 Reviewed by Sam Weinig.
1014 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
1015 Do not send loader callbacks during CSS styling
1017 * WebView/WebView.mm:
1018 (-[WebView _preferencesChangedNotification:]): Reverted the
1019 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
1021 2009-02-18 Dan Bernstein <mitz@apple.com>
1023 Reviewed by Brady Eidson.
1025 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
1027 * WebView/WebView.mm:
1028 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
1029 workaround for this crash in iChat.
1031 2009-02-18 Anders Carlsson <andersca@apple.com>
1033 Reviewed by Sam Weinig.
1035 Fix for <rdar://problem/6542390>
1037 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
1038 would cause a load to begin.
1040 * Plugins/WebNetscapePluginView.mm:
1041 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
1043 2009-02-18 Adam Roben <aroben@apple.com>
1045 Add SPI to get WebKit's custom pointing-hand cursor
1047 Reviewed by John Sullivan.
1049 * WebView/WebView.mm:
1050 (+[WebView _pointingHandCursor]): Added. Returns the custom
1051 pointing-hand cursor that WebKit uses.
1052 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
1054 2009-02-17 Eric Carlson <eric.carlson@apple.com>
1056 Reviewed by Antti Koivisto.
1058 https://bugs.webkit.org/show_bug.cgi?id=23917
1059 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
1062 * Plugins/WebPluginContainerPrivate.h:
1063 * Plugins/WebPluginController.mm:
1064 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
1065 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
1066 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
1068 * WebCoreSupport/WebFrameLoaderClient.mm:
1069 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
1070 file extension, only want a match for the new MIME type proxy plug-ins should have.
1072 2009-02-13 Anders Carlsson <andersca@apple.com>
1074 Reviewed by Kevin Decker.
1076 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
1078 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
1079 defer destruction until we're done executing the script.
1081 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1082 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
1083 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
1084 Add a simple RAII object for deferring destruction of the plug-in instance.
1088 (WKPCInvokeDefault):
1092 (WKPCRemoveProperty):
1095 Use the PluginDestroyDeferrer.
1097 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1098 (WebKit::NetscapePluginInstanceProxy::pluginID):
1099 Assert that the plug-in ID is not 0 here.
1101 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1102 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1103 Initialize the call depth.
1105 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
1106 Set the plug-in ID to 0 to aid debugging.
1108 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
1109 Increment the call depth.
1111 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
1112 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
1114 (WebKit::NetscapePluginInstanceProxy::shouldStop):
1115 If we're called this with a non-zero call depth, set shouldStopSoon to true.
1117 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1118 (-[WebHostedNetscapePluginView shouldStop]):
1121 2009-02-12 Brady Eidson <beidson@apple.com>
1123 Reviewed by Kevin Decker
1125 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
1127 * WebCoreSupport/WebFrameLoaderClient.mm:
1128 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
1131 2009-02-12 Anders Carlsson <andersca@apple.com>
1133 Reviewed by Kevin Decker.
1135 <rdar://problem/6579412>
1136 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
1138 * Plugins/WebNetscapePluginView.h:
1139 * Plugins/WebNetscapePluginView.mm:
1140 (-[WebNetscapePluginView userAgent]):
1141 Apply workaround for Silverlight workaround.
1143 (-[WebNetscapePluginView _createPlugin]):
1144 Check if the plug-in that we're creating is the silverlight plug-in.
1146 2009-02-12 Brady Eidson <beidson@apple.com>
1148 Reviewed by Darin Adler
1150 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
1152 * History/WebBackForwardList.mm:
1153 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
1154 (-[WebBackForwardList finalize]): Ditto.
1156 * Misc/WebIconFetcher.mm:
1157 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
1158 (-[WebIconFetcher finalize]): Ditto.
1160 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
1161 (-[WebEditCommand initWithEditCommand:]):
1162 (-[WebEditCommand dealloc]):
1163 (-[WebEditCommand finalize]):
1164 (-[WebEditCommand command]):
1166 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
1167 (-[WebArchivePrivate init]):
1168 (-[WebArchivePrivate initWithCoreArchive:]):
1169 (-[WebArchivePrivate coreArchive]):
1170 (-[WebArchivePrivate setCoreArchive:]):
1171 (-[WebArchivePrivate dealloc]):
1172 (-[WebArchivePrivate finalize]):
1174 * WebView/WebDataSource.mm:
1175 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
1176 (-[WebDataSourcePrivate finalize]): Ditto.
1178 2009-02-12 Brady Eidson <beidson@apple.com>
1180 Reviewed by Kevin Decker
1182 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
1184 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
1185 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
1186 WebArchive object, things started getting weird.
1188 * WebView/WebArchive.mm:
1189 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
1190 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
1191 (-[WebArchivePrivate finalize]): Ditto
1192 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
1194 2009-02-11 Mark Rowe <mrowe@apple.com>
1198 * History/WebHistory.mm:
1199 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
1201 2009-02-11 Brady Eidson <beidson@apple.com>
1203 Reviewed by Mark Rowe
1205 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
1207 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
1208 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
1209 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
1211 * History/WebHistory.mm:
1212 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
1213 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
1214 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
1215 recent entry for a given URL will be used.
1216 (-[WebHistoryPrivate addItems:]):
1217 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
1219 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
1221 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
1222 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
1224 Reviewed by Timothy Hatcher.
1226 * WebCoreSupport/WebInspectorClient.h:
1227 * WebCoreSupport/WebInspectorClient.mm:
1228 (WebInspectorClient::hiddenPanels):
1230 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
1232 Reviewed by Darin Adler.
1234 <rdar://problem/6562920> Pasted text should be normalized to NFC
1236 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
1237 -[NSString precomposedStringWithCanonicalMapping].
1239 * WebCoreSupport/WebPasteboardHelper.mm:
1240 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
1242 * WebView/WebHTMLView.mm:
1243 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
1244 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
1245 precomposed already, and the conversion is performed outside WebKit for those anyway.
1247 2009-02-10 John Sullivan <sullivan@apple.com>
1249 Reviewed by Dan Bernstein
1251 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
1252 Negative visit counts stored in History.plist aren't corrected.
1254 It's not clear how a huge negative visit count ended up in History.plist, but we can't
1255 trust data read from disk so we can at least reset this to something sane. WebCore has
1256 no guard against a visit count overflowing an int, but that seems very unlikely to have
1259 * History/WebHistoryItem.mm:
1260 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1261 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
1262 weekly visit count is in the dictionary, replace it with 0.
1264 2009-02-10 John Sullivan <sullivan@apple.com>
1266 Reviewed by Dan Bernstein
1268 <https://bugs.webkit.org/show_bug.cgi?id=23891>
1269 [WebHistoryItem _setVisitCount:] is unused and should be removed
1271 * History/WebHistoryItem.mm:
1272 (-[WebHistoryItem _setVisitCount:]):
1273 removed this unused method, which is a synonym for setVisitCount: that was introduced
1274 recently and abandoned even more recently
1276 * History/WebHistoryItemInternal.h:
1277 removed declaration of _setVisitCount:
1279 2009-02-10 Anders Carlsson <andersca@apple.com>
1281 Reviewed by Mark Rowe.
1283 <rdar://problem/6573916>
1284 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
1286 * Plugins/Hosted/NetscapePluginHostManager.mm:
1287 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1288 If we failed to instantiate the plug-in, invalidate the instance proxy.
1290 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1291 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1292 (WebKit::NetscapePluginInstanceProxy::invalidate):
1293 Remove the instance from the plug-in host's set.
1295 (WebKit::NetscapePluginInstanceProxy::destroy):
1298 2009-02-09 Mark Rowe <mrowe@apple.com>
1300 Reviewed by Dan Bernstein.
1302 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
1303 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
1305 * WebView/WebHTMLView.mm:
1306 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
1307 yet been initialized if this WebHTMLView was loaded from a nib.
1308 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
1310 2009-02-09 Eric Seidel <eric@webkit.org>
1312 Reviewed by Dave Hyatt.
1314 Rename Selection to VisibleSelection to allow us to separate
1315 the selections the user works with from the ones used by
1316 the JS editing APIs.
1317 https://bugs.webkit.org/show_bug.cgi?id=23852
1319 * WebView/WebFrame.mm:
1320 (-[WebFrame _selectNSRange:]):
1321 * WebView/WebView.mm:
1322 (-[WebView textIteratorForRect:]):
1324 2009-02-06 Anders Carlsson <andersca@apple.com>
1326 Reviewed by Kevin Decker.
1328 Fix crash when plug-in host dies.
1330 * Plugins/Hosted/HostedNetscapePluginStream.mm:
1331 (WebKit::HostedNetscapePluginStream::didFail):
1333 2009-02-05 Eric Seidel <eric@webkit.org>
1335 Reviewed by Justin Garcia.
1337 DOMSelection.getRangeAt() returns a different range than the selection
1338 https://bugs.webkit.org/show_bug.cgi?id=23601
1340 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
1342 * WebView/WebFrame.mm:
1343 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1344 (-[WebFrame _markDOMRange]):
1345 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
1346 (-[WebFrame _selectedNSRange]):
1347 * WebView/WebHTMLView.mm:
1348 (-[WebHTMLView _selectedRange]):
1349 (-[WebTextCompleteController doCompletion]):
1350 (-[WebHTMLView selectedAttributedString]):
1351 * WebView/WebView.mm:
1352 (-[WebView textIteratorForRect:]):
1353 (-[WebView selectedDOMRange]):
1355 2009-02-06 Geoffrey Garen <ggaren@apple.com>
1357 Reviewed by Sam Weinig.
1359 Part III of <rdar://problem/6552272>.
1361 Refactored to use the redirect data WebCore makes available, instead of
1362 tracking loading state in WebKit.
1364 * History/WebHistory.mm:
1365 (-[WebHistoryPrivate dealloc]):
1366 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
1367 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
1368 * History/WebHistoryInternal.h:
1369 * WebCoreSupport/WebFrameLoaderClient.h:
1370 * WebCoreSupport/WebFrameLoaderClient.mm:
1371 (WebFrameLoaderClient::updateGlobalHistory):
1372 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1374 2009-02-06 Anders Carlsson <andersca@apple.com>
1376 Reviewed by Sam Weinig.
1378 <rdar://problem/6562220>
1379 CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
1381 Make the handling of crashes in the plug-in host more robust.
1383 * Plugins/Hosted/NetscapePluginHostProxy.h:
1386 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1387 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1388 Initialize m_portSet.
1390 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
1393 (WebKit::NetscapePluginHostProxy::processRequests):
1394 Listen for messages on the port set. If we get a message to the port death notification port,
1395 then call pluginHostDied. Otherwise, process the message.
1397 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1398 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1399 (WebKit::NetscapePluginInstanceProxy::cleanup):
1400 Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
1402 (WebKit::NetscapePluginInstanceProxy::destroy):
1405 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
1408 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1409 Call NetscapePluginHostProxy::processRequests.
1411 * Plugins/Hosted/ProxyInstance.mm:
1412 (WebKit::ProxyInstance::invalidate):
1413 Add a null check for the host proxy.
1415 2009-02-06 Dan Bernstein <mitz@apple.com>
1417 - try to fix the Tiger build
1419 * Misc/WebNSArrayExtras.h:
1421 2009-02-06 Anders Carlsson <andersca@apple.com>
1423 Reviewed by Dan Bernstein.
1425 <rdar://problem/6563650>
1426 Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
1428 * Plugins/WebNetscapePluginView.mm:
1429 (-[WebNetscapePluginView loadStream]):
1430 (-[WebNetscapePluginView pluginView:receivedData:]):
1431 (-[WebNetscapePluginView _shouldCancelSrcStream]):
1433 2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
1435 Reviewed by Dan Bernstein and Geoff Garen.
1437 - WebKit code to track per-day and per-week visit counts in history
1439 For now this data is only exposed via SPI for performance reasons.
1441 * History/WebHistoryItem.mm:
1442 (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
1444 (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
1445 (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
1446 (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
1447 (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
1448 * History/WebHistoryItemInternal.h: Declare new methods.
1449 * History/WebHistoryItemPrivate.h: Ditto.
1451 * History/WebHistory.mm:
1452 (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
1453 the new _recordInitialVisit method instead of setting visit count to 1.
1455 * Misc/WebNSArrayExtras.h:
1456 * Misc/WebNSArrayExtras.m:
1457 (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
1458 (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
1460 2009-02-05 Aaron Boodman <aa@chromium.org>
1462 Reviewed by Dave Hyatt.
1464 https://bugs.webkit.org/show_bug.cgi?id=23708
1465 Adds documentElementAvailable() callback to FrameLoaderClient.
1467 * WebCoreSupport/WebFrameLoaderClient.h:
1468 Stub out documentElementAvailable().
1469 * WebCoreSupport/WebFrameLoaderClient.mm:
1472 2009-02-05 Dan Bernstein <mitz@apple.com>
1476 * WebView/WebScriptDebugger.mm:
1477 (WebScriptDebugger::initGlobalCallFrame):
1479 2009-02-05 Beth Dakin <bdakin@apple.com>
1481 Reviewed by John Sullivan and Brady Eidson.
1483 Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
1484 mail note message doesn't display it in Mail's preview pane
1486 This was failing because revision 36962 removed a version of
1487 setVerticalScrollingMode that mail calls. This patch simply adds
1490 * WebView/WebDynamicScrollBarsView.m:
1491 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
1493 2009-02-04 Anders Carlsson <andersca@apple.com>
1497 * WebView/WebScriptDebugger.mm:
1498 (WebScriptDebugger::initGlobalCallFrame):
1500 2009-02-04 Anders Carlsson <andersca@apple.com>
1502 Reviewed by Sam Weinig.
1504 Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
1506 Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
1508 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1514 * Plugins/Hosted/WebKitPluginClient.defs:
1515 * Plugins/Hosted/WebKitPluginHost.defs:
1517 2009-02-04 Anders Carlsson <andersca@apple.com>
1519 Reviewed by Mark Rowe.
1523 * WebView/WebScriptDebugger.mm:
1524 (WebScriptDebugger::initGlobalCallFrame):
1526 2009-02-04 Geoffrey Garen <ggaren@apple.com>
1528 Reviewed by Mark Rowe.
1530 Part I of <rdar://problem/6552272>.
1532 Clear the redirectURLs entry when first visiting a site, so sites that
1533 only redirect you the first time you visit them can later learn that
1534 they don't redirect.
1536 * History/WebHistory.mm:
1537 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1539 2009-02-04 Timothy Hatcher <timothy@apple.com>
1541 Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
1543 <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
1545 Reviewed by Oliver Hunt.
1547 * WebView/WebScriptDebugDelegate.h:
1549 2009-02-04 Timothy Hatcher <timothy@apple.com>
1551 Switched over from using the WebSafeForwarder for the Script Debug
1552 delegate and added high performance CallScriptDebugDelegate functions.
1554 <rdar://problem/6508457> Launching widget in Dashcode debugger is
1555 super-slow due forwardInvocation: calling debug delegate
1557 Reviewed by Oliver Hunt.
1559 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
1560 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
1561 * WebView/WebScriptDebugger.mm:
1562 (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
1563 (WebScriptDebugger::sourceParsed): Ditto.
1564 (WebScriptDebugger::callEvent): Ditto.
1565 (WebScriptDebugger::atStatement): Ditto.
1566 (WebScriptDebugger::returnEvent): Ditto.
1567 (WebScriptDebugger::exception): Ditto.
1568 * WebView/WebView.mm:
1569 (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
1570 (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
1571 method implementations for the script debug delegate. Also caches what
1572 didParseSource method to use.
1573 (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
1574 WebScriptDebugDelegateImplementations structure.
1575 (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
1576 (CallDelegate): Added more overloaded versions that take different arguments.
1577 (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
1578 * WebView/WebViewInternal.h:
1580 2009-02-03 Simon Fraser <simon.fraser@apple.com>
1582 Reviewed by Dave Hyatt
1584 https://bugs.webkit.org/show_bug.cgi?id=23365
1586 Hook up accelerated compositing layers the native
1589 * WebCoreSupport/WebChromeClient.h:
1590 * WebCoreSupport/WebChromeClient.mm:
1591 (WebChromeClient::attachRootGraphicsLayer):
1592 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1593 New methods to hook up the root GraphicsLayer to the native
1594 view system, and to synchronize layer changes with view-based
1595 drawing when layers come and go.
1597 * WebView/WebHTMLView.mm:
1598 (-[WebHTMLViewPrivate clear]):
1599 Clear the pointer to layerHostingView.
1601 (-[WebHTMLView _setAsideSubviews]):
1602 (-[WebHTMLView willRemoveSubview:]):
1603 Keep the special layer-hosting view in the subviews even
1604 when the rest of the subviews are ripped out for
1607 (-[WebHTMLView _isUsingAcceleratedCompositing]):
1608 New utility method for DumpRenderTree to know if we're
1611 (-[WebHTMLView drawRect:]):
1612 Call -disableScreenUpdatesUntilFlush if we have to
1613 synchronize layer changes with painting.
1615 (-[WebHTMLView attachRootLayer:]):
1616 (-[WebHTMLView detachRootLayer]):
1617 Attach and detach the root GraphicsLayer.
1619 * WebView/WebViewInternal.h:
1620 * WebView/WebHTMLViewInternal.h:
1621 * WebView/WebHTMLViewPrivate.h:
1622 New method declarations.
1624 * WebView/WebView.mm:
1625 (-[WebView _needsOneShotDrawingSynchronization]):
1626 (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1627 Set the flag to say if we need to synchronize layer
1628 changes and painting on the next -drawRect: call.
1630 (-[WebView viewWillMoveToWindow:]):
1631 (-[WebView viewDidMoveToWindow]):
1632 Call new notifications that the view was added to or removed from
1633 the window, which are required by the layer hosting mechanism.
1635 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1639 * Plugins/WebPluginController.mm:
1640 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1642 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1644 Reviewed by Sam Weinig.
1646 Track redirects in global history.
1648 * History/WebHistory.mm:
1649 (-[WebHistoryPrivate dealloc]):
1650 (-[WebHistoryPrivate lastVisitedEntry]):
1651 (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1652 entry in case we're asked to add redirect information to it later.
1654 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1655 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1656 information in global history.
1658 * History/WebHistoryInternal.h:
1659 * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1661 * WebCoreSupport/WebFrameLoaderClient.mm:
1662 (WebFrameLoaderClient::updateGlobalHistory):
1663 (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1664 information in global history.
1666 * WebView/WebFrame.mm:
1667 (-[WebFrame loadRequest:]):
1668 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1669 * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1671 2009-02-02 Anders Carlsson <andersca@apple.com>
1673 Reviewed by Dan Bernstein.
1675 Work around a limitation in MIG where two functions can't have the same name even if they're
1676 not in the same subsystem.
1678 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1679 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1680 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1681 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1682 * Plugins/Hosted/WebKitPluginClient.defs:
1683 * Plugins/Hosted/WebKitPluginHost.defs:
1685 2009-02-02 Anders Carlsson <andersca@apple.com>
1687 Reviewed by Sam Weinig.
1689 Implement WKPCGetPluginElementObject.
1691 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1692 (WKPCGetPluginElementNPObject):
1693 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1694 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1695 (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1696 * Plugins/Hosted/WebKitPluginClient.defs:
1697 * Plugins/WebBaseNetscapePluginView.h:
1698 * Plugins/WebBaseNetscapePluginView.mm:
1699 (-[WebBaseNetscapePluginView WebCore::]):
1701 2009-02-02 Anders Carlsson <andersca@apple.com>
1705 * WebView/WebHTMLView.mm:
1707 2009-02-02 Anders Carlsson <andersca@apple.com>
1709 Reviewed by Dan Bernstein.
1711 Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1713 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1714 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1715 (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1716 * Plugins/WebBaseNetscapePluginView.h:
1717 * Plugins/WebBaseNetscapePluginView.mm:
1718 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1719 (-[WebBaseNetscapePluginView _windowClipRect]):
1720 (-[WebBaseNetscapePluginView visibleRect]):
1721 (-[WebBaseNetscapePluginView dataSource]):
1722 * Plugins/WebKitPluginContainerView.h: Removed.
1723 * Plugins/WebKitPluginContainerView.mm: Removed.
1724 * Plugins/WebNetscapePluginView.h:
1725 * Plugins/WebNetscapePluginView.mm:
1726 (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1727 (-[WebNetscapePluginView getVariable:value:]):
1728 * WebCoreSupport/WebFrameLoaderClient.mm:
1729 (WebFrameLoaderClient::createPlugin):
1731 2009-02-02 Anders Carlsson <andersca@apple.com>
1733 Reviewed by Dan Bernstein.
1735 Update for changes to WebCore.
1737 * WebCoreSupport/WebFrameLoaderClient.h:
1738 * WebCoreSupport/WebFrameLoaderClient.mm:
1739 (WebFrameLoaderClient::createPlugin):
1741 2009-02-02 Anders Carlsson <andersca@apple.com>
1743 Reviewed by Oliver Hunt.
1745 When a new Web View was not created, report back to the plug-in host.
1747 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1748 (WebKit::NetscapePluginInstanceProxy::performRequest):
1749 * Plugins/Hosted/WebKitPluginHost.defs:
1751 2009-02-02 Anders Carlsson <andersca@apple.com>
1753 Reviewed by Kevin Decker.
1755 Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1757 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1758 (-[WebHostedNetscapePluginView drawRect:]):
1760 2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
1762 Reviewed by Darin Adler.
1764 Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1766 https://bugs.webkit.org/show_bug.cgi?id=23428
1768 FrameView::forceLayout could be killed but the comment might
1769 contain a value over the the plain FrameView::layout...
1771 Adjust the WebCore/WebKit consumers of these methods.
1773 * WebView/WebFrame.mm:
1774 (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1775 * WebView/WebHTMLView.mm:
1776 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1777 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1779 2009-01-31 John Sullivan <sullivan@apple.com>
1781 https://bugs.webkit.org/show_bug.cgi?id=23665
1783 Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1784 of calling removeObserver with unspecified notifications, or calling removeObserver
1785 multiple times for the same notification.
1787 Reviewed by Darin Adler
1789 * WebView/WebHTMLView.mm:
1790 added observingMouseMovedNotifications, observingSuperviewNotifications, and
1791 observingWindowNotifications as BOOL ivars of _private object
1792 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1793 moved to file-internal section of file, added leading underscore, now bails out
1794 if we aren't observing the relevant notifications, now records that we are no longer
1795 observing the relevant notifications
1796 (-[WebHTMLView _removeSuperviewObservers]):
1797 ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1798 (-[WebHTMLView _removeWindowObservers]):
1800 (-[WebHTMLView close]):
1801 replace general removeObserver: call with three specific calls for all the notifications
1802 that this class actually observes
1803 (-[WebHTMLView addMouseMovedObserver]):
1804 bail out if already observing relevant notifications, now records that we are observing
1805 the relevant notifications
1806 (-[WebHTMLView removeMouseMovedObserver]):
1807 updated for name change
1808 (-[WebHTMLView addSuperviewObservers]):
1809 bail out if already observing relevant notifications, now records that we are observing
1810 the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
1811 to avoid objc dispatch
1812 (-[WebHTMLView addWindowObservers]):
1814 (-[WebHTMLView viewWillMoveToSuperview:]):
1815 updated for name change
1816 (-[WebHTMLView viewWillMoveToWindow:]):
1817 updated for name changes
1819 2009-01-31 Darin Adler <darin@apple.com>
1821 Reviewed by Mark Rowe.
1823 Fix code that assumes all command selectors end in colons.
1824 rdar://problem/6545874
1826 * WebView/WebHTMLView.mm:
1827 (commandNameForSelector): Don't assert, just return a null string, when
1828 the selector doesn't end in a colon.
1830 2009-01-30 Adam Barth <abarth@webkit.org>
1832 Reviewed by Sam Weinig.
1834 Add a pref to disable web security.
1836 * WebView/WebPreferenceKeysPrivate.h:
1837 * WebView/WebPreferencesPrivate.h:
1838 * WebView/WebPreferences.mm:
1839 (+[WebPreferences initialize]):
1840 (-[WebPreferences isWebSecurityEnabled]):
1841 (-[WebPreferences setWebSecurityEnabled:]):
1842 * WebView/WebView.mm:
1843 (-[WebView _preferencesChangedNotification:]):
1845 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1847 Reviewed by Darin Adler.
1849 Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1851 Carry out the move and catch up in two call sites.
1853 * WebView/WebHTMLView.mm:
1854 (-[WebHTMLView _frameOrBoundsChanged]):
1856 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1858 Reviewed by Darin Adler.
1860 isFrameSet was moved from Frame to Document. Update the
1863 * WebView/WebFrame.mm:
1864 (-[WebFrame _isFrameSet]):
1865 * WebView/WebHTMLView.mm:
1866 (-[WebHTMLView knowsPageRange:]):
1868 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1872 * WebView/WebFramePrivate.h:
1874 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1876 Reviewed by Sam Weinig.
1878 Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1879 preparation for setting them differently during a redirect.
1881 * WebView/WebPDFView.mm:
1882 (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1884 2009-01-30 Anders Carlsson <andersca@apple.com>
1886 Reviewed by Sam Weinig.
1888 Fix <rdar://problem/6544048>
1890 Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1892 When the plug-in instance is destroyed, invalidate all proxy instances.
1894 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1895 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1896 (WebKit::NetscapePluginInstanceProxy::destroy):
1897 (WebKit::NetscapePluginInstanceProxy::addInstance):
1898 (WebKit::NetscapePluginInstanceProxy::removeInstance):
1899 * Plugins/Hosted/ProxyInstance.h:
1900 * Plugins/Hosted/ProxyInstance.mm:
1901 (WebKit::ProxyInstance::ProxyInstance):
1902 (WebKit::ProxyInstance::~ProxyInstance):
1903 (WebKit::ProxyInstance::invalidate):
1905 2009-01-30 Anders Carlsson <andersca@apple.com>
1907 Reviewed by Sam Weinig.
1909 Fix <rdar://problem/6490778>.
1911 Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1912 validate IdentifierReps before dereferencing them.
1914 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1916 (WKPCGetStringIdentifier):
1917 (WKPCGetIntIdentifier):
1918 (identifierFromIdentifierRep):
1922 (WKPCRemoveProperty):
1925 (WKPCIdentifierInfo):
1927 2009-01-30 Brady Eidson <beidson@apple.com>
1929 Reviewed by Sam Weinig
1931 Remove FrameLoaderClient code that is now handled by FrameLoader itself
1933 * WebCoreSupport/WebFrameLoaderClient.mm:
1934 (WebFrameLoaderClient::frameLoadCompleted):
1936 2009-01-29 Stephanie Lewis <slewis@apple.com>
1940 Update the order files.
1944 2009-01-29 Sam Weinig <sam@webkit.org>
1946 Reviewed by Anders Carlsson.
1948 Second step in tracking the urls a HistoryItem was redirected through
1949 Add SPI to access the array of redirect urls associated with a HistoryItem.
1951 * History/WebHistoryItem.mm:
1952 (-[WebHistoryItem dictionaryRepresentation]):
1953 (-[WebHistoryItem _redirectURLs]):
1954 * History/WebHistoryItemPrivate.h:
1956 2009-01-29 Anders Carlsson <andersca@apple.com>
1958 Reviewed by Dan Bernstein.
1960 Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
1962 * Plugins/Hosted/NetscapePluginHostProxy.h:
1963 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1964 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1967 (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
1968 If we're modal, we should always bring the plug-in host process to the front.
1970 (WebKit::NetscapePluginHostProxy::beginModal):
1971 Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1973 (WebKit::NetscapePluginHostProxy::endModal):
1974 Remove the observer.
1976 2009-01-29 Sam Weinig <sam@webkit.org>
1978 Reviewed by Mark Rowe.
1980 First step in tracking the urls a HistoryItem was redirected through.
1982 * History/WebHistoryItem.mm:
1983 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1984 (-[WebHistoryItem dictionaryRepresentation]):
1985 * Misc/WebNSDictionaryExtras.h:
1986 * Misc/WebNSDictionaryExtras.m:
1987 (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1989 2009-01-29 Anders Carlsson <andersca@apple.com>
1991 Reviewed by Sam Weinig.
1993 Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1995 * Plugins/Hosted/NetscapePluginHostManager.h:
1996 * Plugins/Hosted/NetscapePluginHostManager.mm:
1997 (WebKit::NetscapePluginHostManager::hostForPackage):
1998 Get the current PSN and pass it to spawnPluginHost.
2000 (WebKit::NetscapePluginHostManager::spawnPluginHost):
2001 Pass the PSN to the "check in" function.
2003 * Plugins/Hosted/NetscapePluginHostProxy.h:
2004 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2005 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2007 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2008 Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
2010 (WebKit::NetscapePluginHostProxy::beginModal):
2011 (WebKit::NetscapePluginHostProxy::endModal):
2012 (WebKit::NetscapePluginHostProxy::setModal):
2013 Split out the code that does all of the work into beginModal and endModal methods.
2015 * Plugins/Hosted/WebKitPluginHost.defs:
2016 * Plugins/WebNetscapePluginView.mm:
2017 (-[WebNetscapePluginView loadStream]):
2019 2009-01-29 David Kilzer <ddkilzer@apple.com>
2021 Remove semi-colons from the end of ObjC method implementations
2023 Rubber-stamped by Adam Roben.
2025 $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
2027 * DefaultDelegates/WebDefaultUIDelegate.m:
2028 (-[WebDefaultUIDelegate webView:setResizable:]):
2029 (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
2030 (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
2031 (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
2032 * History/WebBackForwardList.mm:
2033 (-[WebBackForwardList addItem:]):
2034 (-[WebBackForwardList backListWithLimit:]):
2035 (-[WebBackForwardList forwardListWithLimit:]):
2036 * History/WebHistoryItem.mm:
2037 (-[WebHistoryItem alternateTitle]):
2038 (-[WebHistoryItem setViewState:]):
2039 * Misc/WebCoreStatistics.mm:
2040 (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
2041 * Misc/WebKitNSStringExtras.m:
2042 (-[NSString _web_drawAtPoint:font:textColor:]):
2043 * Plugins/WebNetscapePluginView.mm:
2044 (-[WebNetscapePluginView setAttributeKeys:andValues:]):
2045 * WebCoreSupport/WebEditorClient.mm:
2046 (-[WebEditCommand command]):
2047 * WebView/WebFrame.mm:
2048 (-[WebFrame _getVisibleRect:]):
2049 * WebView/WebHTMLRepresentation.mm:
2050 (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
2051 * WebView/WebHTMLView.mm:
2052 (-[WebHTMLView elementAtPoint:allowShadowContent:]):
2053 * WebView/WebPreferences.mm:
2054 (-[WebPreferences setAllowsAnimatedImages:]):
2055 (-[WebPreferences setAutosaves:]):
2056 (-[WebPreferences PDFDisplayMode]):
2057 * WebView/WebView.mm:
2058 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2059 (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2060 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
2061 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
2062 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
2063 (-[WebView _insertNewlineInQuotedContent]):
2065 2009-01-28 Geoffrey Garen <ggaren@apple.com>
2067 Reviewed by Sam Weinig.
2069 Updated for WebCore rename.
2071 * WebView/WebView.mm:
2072 (-[WebView setCustomTextEncodingName:]):
2074 2009-01-28 David Kilzer <ddkilzer@apple.com>
2076 Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
2078 Reviewed by Dan Bernstein.
2080 * Misc/WebNSURLExtras.h:
2081 (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
2082 declaration after the implementation was added in r9258.
2084 2009-01-28 Sam Weinig <sam@webkit.org>
2086 Reviewed by Geoff Garen.
2088 Fix for <rdar://problem/6129678>
2089 REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
2091 * WebView/WebScriptDebugDelegate.mm:
2092 (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
2094 2009-01-27 Anders Carlsson <andersca@apple.com>
2096 Reviewed by Oliver Hunt.
2098 Fix two bugs with Core Animation based plug-ins.
2100 1. The plug-in view was marked as opaque even though it's not.
2101 (This would leave garbage in the plug-in view).
2102 2. The plug-in layer needs to have autoresizing turned on.
2104 * Plugins/WebNetscapePluginView.mm:
2105 (-[WebNetscapePluginView setLayer:]):
2107 2009-01-27 Brady Eidson <beidson@apple.com>
2109 Reviewed by Dan Bernstein
2111 Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
2113 * History/WebHistoryItem.mm:
2115 * WebCoreSupport/WebFrameLoaderClient.h:
2116 * WebCoreSupport/WebFrameLoaderClient.mm:
2117 (WebFrameLoaderClient::savePlatformDataToCachedFrame):
2118 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2121 2009-01-26 Anders Carlsson <andersca@apple.com>
2123 Reviewed by Dan Bernstein.
2125 Add the ability for plug-ins to make WebKit operate in "modal mode"
2127 * Plugins/Hosted/NetscapePluginHostProxy.h:
2128 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2129 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2130 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2131 If the plug-in crashes while we're modal, make sure to leave the modal mode.
2133 (WebKit::NetscapePluginHostProxy::setModal):
2135 * Plugins/Hosted/WebKitPluginClient.defs:
2137 2009-01-26 John Sullivan <sullivan@apple.com>
2139 fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
2140 stuck in the Name field rather than cycling around
2142 Reviewed by Dan Bernstein
2144 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
2145 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
2146 The two static text fields and the last button all had their "next key view" outlets set to the
2147 name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
2148 selectable view have exactly one "next key view" set to it.
2150 2009-01-26 Anders Carlsson <andersca@apple.com>
2152 Reviewed by Sam Weinig.
2154 Add the ability for a plug-in to show or hide the menu bar.
2156 * Plugins/Hosted/NetscapePluginHostProxy.h:
2157 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2158 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2159 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2160 (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
2161 (WKPCSetMenuBarVisible):
2162 * Plugins/Hosted/WebKitPluginClient.defs:
2164 2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2166 Reviewed by Gavin Barraclough.
2168 Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
2169 <https://bugs.webkit.org/show_bug.cgi?id=23552>
2170 <rdar://problem/6398839>
2172 Dashcode will crash when using the evaluator because it saves a global call
2173 frame, even after global code has finished executing, and then uses this as
2174 a launching pad to execute new JS in the evaluator. The fix is to detect
2175 when Dashcode is attempting to do this and execute code from a global call
2178 * ForwardingHeaders/runtime/Protect.h: Added.
2179 * WebView/WebScriptDebugDelegate.mm:
2180 (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
2181 Added debugger, a WebScriptDebugger* argument.
2182 (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
2183 a stale WebScriptCallFrame to execute new JS and evaluate it starting from
2184 the global object's global call frame instead.
2185 * WebView/WebScriptDebugger.h:
2186 (WebScriptDebugger::globalObject): Added.
2187 (WebScriptDebugger::globalCallFrame): Added.
2188 * WebView/WebScriptDebugger.mm:
2189 (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
2190 (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
2191 so that the global call frame can be saved immediately after being created.
2192 (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
2193 WebScriptCallFrame's _initWithGlobalObject method.
2195 2009-01-26 Anders Carlsson <andersca@apple.com>
2197 Reviewed by Oliver Hunt.
2199 Make WKPCInvoke a simpleroutine.
2201 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2203 * Plugins/Hosted/WebKitPluginClient.defs:
2205 2009-01-26 Anders Carlsson <andersca@apple.com>
2207 Reviewed by Sam Weinig.
2209 Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
2211 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2212 (WKPCBooleanAndDataReply):
2213 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2214 (WebKit::NetscapePluginInstanceProxy::Reply::):
2215 (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
2216 Rename NPObjectInvokeReply to BooleanAndDataReply.
2218 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2219 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2220 Fix a cut and paste error.
2222 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2225 * Plugins/Hosted/ProxyInstance.h:
2226 * Plugins/Hosted/ProxyInstance.mm:
2227 (WebKit::ProxyField::valueFromInstance):
2228 (WebKit::ProxyField::setValueToInstance):
2229 Call the ProxyInstance method.
2231 (WebKit::ProxyInstance::~ProxyInstance):
2232 Release the NPObject.
2234 (WebKit::ProxyInstance::supportsConstruct):
2235 Ask the plug-in host if an instance supports construct.
2237 (WebKit::ProxyInstance::fieldValue):
2238 (WebKit::ProxyInstance::setFieldValue):
2239 Call the plug-in host methods.
2241 * Plugins/Hosted/WebKitPluginHostTypes.h:
2242 Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
2244 2009-01-26 Mark Rowe <mrowe@apple.com>
2248 Remove -Wformat=2 from the warning flags as newer versions of GCC emit
2249 warnings about non-literal format strings for uses of our UI_STRING macro.
2251 * Configurations/Base.xcconfig:
2253 2009-01-26 Mark Rowe <mrowe@apple.com>
2255 Rubber-stamped by Sam Weinig.
2257 Clean up after r40240.
2259 * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
2260 * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
2261 is back in the build.
2263 2009-01-25 Darin Adler <darin@apple.com>
2265 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
2267 2009-01-25 Darin Adler <darin@apple.com>
2269 Discussed with Mark Rowe; not sure he reviewed it.
2271 * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
2272 -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
2274 2009-01-25 Mark Rowe <mrowe@apple.com>
2276 Rubber-stamped by Dan Bernstein.
2278 Improve the consistency of settings in our .xcconfig files.
2280 * Configurations/Base.xcconfig: Only dead code strip the normal variant.
2281 Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
2283 2009-01-25 Darin Adler <darin@apple.com>
2285 Reviewed by Sam Weinig.
2287 Bug 23522: use checked casts for render tree
2288 https://bugs.webkit.org/show_bug.cgi?id=23522
2290 Step one: RenderText.
2292 * WebView/WebRenderNode.mm:
2293 (copyRenderNode): Use toRenderText.
2295 2009-01-23 Brady Eidson <beidson@apple.com>
2297 Rubberstamped by Darin Adler
2299 Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
2301 * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
2302 (WebCachedFramePlatformData::WebCachedFramePlatformData):
2303 * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
2305 * WebCoreSupport/WebFrameLoaderClient.mm:
2306 (WebFrameLoaderClient::savePlatformDataToCachedPage):
2307 (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
2311 2009-01-23 Adele Peterson <adele@apple.com>
2315 Use new linesBoundingBox method instead of
2316 boundingBoxWidth and boundingBoxHeight for RenderText objects.
2318 * WebView/WebRenderNode.mm: (copyRenderNode):
2320 2009-01-23 Anders Carlsson <andersca@apple.com>
2324 * Plugins/Hosted/ProxyInstance.mm:
2325 (WebKit::proxyClass):
2327 2009-01-23 Anders Carlsson <andersca@apple.com>
2331 * Configurations/Base.xcconfig:
2333 2009-01-23 Anders Carlsson <andersca@apple.com>
2335 Reviewed by Sam Weinig.
2337 Turn on -Wmissing-prototypes and fix the resulting warnings.
2339 * Configurations/Base.xcconfig:
2340 * History/WebHistory.mm:
2341 (timeIntervalForBeginningOfDay):
2342 * History/WebHistoryItem.mm:
2343 (historyItemWrappers):
2344 * Misc/WebNSPasteboardExtras.mm:
2346 * WebView/WebFrame.mm:
2347 * WebView/WebScriptDebugger.mm:
2350 2009-01-22 Mark Rowe <mrowe@apple.com>
2352 Rubber-stamped by Anders Carlsson.
2354 Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
2356 Current versions of Xcode only respect it for C and Objective-C files,
2357 and our code doesn't currently compile if it is applied to C++ and
2358 Objective-C++ files.
2360 * Configurations/Base.xcconfig:
2362 2009-01-22 Anders Carlsson <andersca@apple.com>
2364 Reviewed by Sam Weinig.
2366 Add support for Invoke and InvokeDefault. Clean up code.
2368 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2370 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2371 (WebKit::NetscapePluginInstanceProxy::Reply::):
2372 (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
2373 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2374 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2375 * Plugins/Hosted/ProxyInstance.h:
2376 * Plugins/Hosted/ProxyInstance.mm:
2377 (WebKit::ProxyInstance::invoke):
2378 (WebKit::ProxyInstance::invokeMethod):
2379 (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
2380 (WebKit::ProxyInstance::invokeDefaultMethod):
2381 (WebKit::ProxyInstance::methodsNamed):
2382 (WebKit::ProxyInstance::fieldNamed):
2383 * Plugins/Hosted/WebKitPluginClient.defs:
2384 * Plugins/Hosted/WebKitPluginHost.defs:
2385 * Plugins/Hosted/WebKitPluginHostTypes.h:
2387 2009-01-22 Eric Roman <eroman@chromium.og>
2389 Reviewed by Eric Seidel.
2391 https://bugs.webkit.org/show_bug.cgi?id=20806
2392 Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
2394 * History/WebHistoryItem.mm:
2395 (-[WebHistoryItem RSSFeedReferrer]):
2396 (-[WebHistoryItem setRSSFeedReferrer:]):
2398 2009-01-22 Anders Carlsson <andersca@apple.com>
2400 Reviewed by Kevin Decker.
2402 Don't crash or hang when we fail to instantiate a plug-in.
2404 * Plugins/Hosted/NetscapePluginHostManager.mm:
2405 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2406 Return 0 on failure.
2408 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2409 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2410 Null check for the proxy member.
2412 2009-01-21 David Hyatt <hyatt@apple.com>
2414 Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
2416 Reviewed by Eric Seidel and Darin Adler
2418 * WebView/WebRenderNode.mm:
2421 2009-01-21 Anders Carlsson <andersca@apple.com>
2423 Reviewed by Sam Weinig.
2425 More browser->plug-in scripting support.
2427 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2428 (WKPCNPObjectHasPropertyReply):
2429 (WKPCNPObjectHasMethodReply):
2430 (WKPCNPObjectInvokeReply):
2431 MIG reply functions.
2433 (WKPCIdentifierInfo):
2434 Return information about an identifier given its 64-bit value.
2436 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2437 Add new reply structs.
2439 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2440 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2441 Split out code that adds values to the arrays from marshalValue.
2443 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2444 Call addValueToArray.
2446 (WebKit::NetscapePluginInstanceProxy::marshalValues):
2447 Marshal a list of values.
2449 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2450 Actually create a proxy instance.
2452 * Plugins/Hosted/ProxyInstance.h:
2453 * Plugins/Hosted/ProxyInstance.mm:
2454 (WebKit::ProxyClass::methodsNamed):
2455 (WebKit::ProxyClass::fieldNamed):
2456 Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
2458 (WebKit::proxyClass):
2459 Shared proxyClass getter.
2461 (WebKit::ProxyField::ProxyField):
2462 (WebKit::ProxyField::valueFromInstance):
2463 (WebKit::ProxyField::setValueToInstance):
2464 Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
2466 (WebKit::ProxyMethod::ProxyMethod):
2467 (WebKit::ProxyMethod::serverIdentifier):
2468 (WebKit::ProxyMethod::numParameters):
2469 Add a dummy ProxyMethod class.
2471 (WebKit::ProxyInstance::invokeMethod):
2472 Call _WKPHNPObjectInvoke.
2474 (WebKit::ProxyInstance::defaultValue):
2475 (WebKit::ProxyInstance::stringValue):
2476 (WebKit::ProxyInstance::numberValue):
2477 (WebKit::ProxyInstance::booleanValue):
2478 (WebKit::ProxyInstance::valueOf):
2479 Add dummy implementations (taken from CInstance).
2481 (WebKit::ProxyInstance::methodsNamed):
2482 Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
2484 (WebKit::ProxyInstance::fieldNamed):
2485 Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
2487 * Plugins/Hosted/WebKitPluginClient.defs:
2488 * Plugins/Hosted/WebKitPluginHost.defs:
2489 Add new MIG definitions.
2491 2009-01-21 Mark Rowe <mrowe@apple.com>
2493 Reviewed by Tim Hatcher.
2495 Clean up how we force invocations of API that happened on background threads over to the main thread.
2497 This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
2498 and return values back from the function. The new approach is to use a proxy object that forwards an
2499 NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
2502 * Misc/WebNSObjectExtras.h:
2503 * Misc/WebNSObjectExtras.mm:
2504 (-[WebMainThreadInvoker initWithTarget:]):
2505 (-[WebMainThreadInvoker forwardInvocation:]):
2506 (-[WebMainThreadInvoker methodSignatureForSelector:]):
2507 (-[WebMainThreadInvoker handleException:]):
2508 (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
2509 raised back to the WebMainThreadInvoker.
2510 (-[NSObject _webkit_invokeOnMainThread]):
2512 The following methods are updated to use the proxy object to forward methods to the main thread:
2514 * WebView/WebArchive.mm:
2515 (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
2516 (-[WebArchive mainResource]):
2517 (-[WebArchive subresources]):
2518 (-[WebArchive subframeArchives]):
2519 * WebView/WebResource.mm:
2520 (-[WebResource data]):
2521 (-[WebResource URL]):
2522 (-[WebResource MIMEType]):
2523 (-[WebResource textEncodingName]):
2524 (-[WebResource frameName]):
2525 (-[WebResource _ignoreWhenUnarchiving]):
2526 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2527 (-[WebResource _initWithData:URL:response:]):
2528 (-[WebResource _suggestedFilename]):
2529 (-[WebResource _response]):
2530 (-[WebResource _stringValue]):
2531 * WebView/WebView.mm:
2532 (-[WebView initWithFrame:frameName:groupName:]):
2533 (-[WebView initWithCoder:]):
2535 2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2537 Reviewed by George Staikos.
2539 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
2541 Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
2542 WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
2544 * WebCoreSupport/WebEditorClient.mm:
2545 (WebEditorClient::textFieldDidBeginEditing):
2546 (WebEditorClient::textFieldDidEndEditing):
2547 (WebEditorClient::textDidChangeInTextField):
2548 (WebEditorClient::doTextFieldCommandFromEvent):
2549 (WebEditorClient::textWillBeDeletedInTextField):
2550 (WebEditorClient::textDidChangeInTextArea):
2552 2009-01-19 Anders Carlsson <andersca@apple.com>
2554 Reviewed by Sam Weinig.
2556 Add and implement GetScriptableNPObject.
2558 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2559 (WKPCGetScriptableNPObjectReply):
2560 Create a new reply struct and set it as the current reply.
2563 Get rid of an unused variable.
2565 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2566 (WebKit::NetscapePluginInstanceProxy::Reply::):
2567 (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
2568 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2569 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2570 Call _WKPHGetScriptableNPObject and wait for a reply.
2572 * Plugins/Hosted/ProxyInstance.h: Added.
2573 * Plugins/Hosted/ProxyInstance.mm: Added.
2576 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2577 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2578 Call NetscapePluginInstanceProxy::createBindingsInstance.
2580 * Plugins/Hosted/WebKitPluginClient.defs:
2581 * Plugins/Hosted/WebKitPluginHost.defs:
2582 Add new declarations.
2584 2009-01-19 Sam Weinig <sam@webkit.org>
2586 Rubber-stamped by Gavin Barraclough.
2588 Remove temporary operator-> from JSValuePtr.
2590 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2591 (WebKit::NetscapePluginInstanceProxy::invoke):
2592 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2593 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2594 * WebView/WebFrame.mm:
2595 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2596 * WebView/WebView.mm:
2597 (aeDescFromJSValue):
2599 2009-01-19 Anders Carlsson <andersca@apple.com>
2601 Reviewed by Sam Weinig.
2603 Make Evaluate an asynchronous method that has a reply method.
2605 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2607 * Plugins/Hosted/WebKitPluginClient.defs:
2608 * Plugins/Hosted/WebKitPluginHost.defs:
2610 2009-01-19 Brady Eidson <beidson@apple.com>
2612 Rubberstamped by Tim Hatcher
2614 Fix long standing typo.
2616 * History/WebBackForwardList.h:
2618 2009-01-19 Mark Rowe <mrowe@apple.com>
2622 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2623 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2624 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2626 2009-01-18 Mark Rowe <mrowe@apple.com>
2628 Reviewed by Anders Carlsson.
2630 Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2631 Bug 23414: Reproducible crash accessing View menu with plugins disabled
2633 * WebView/WebFrame.mm:
2634 (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2636 2009-01-17 David Hyatt <hyatt@apple.com>
2638 Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2639 are done in WebCore instead.
2641 Reviewed by Oliver Hunt
2643 * WebView/WebFrame.mm:
2644 (-[WebFrame _selectedString]):
2645 (-[WebFrame _stringForRange:]):
2647 2009-01-17 Eric Carlson <eric.carlson@apple.com>
2649 Reviewed by Adele Peterson
2651 Complete <rdar://problem/6293969>
2653 * WebCoreSupport/WebSystemInterface.m:
2654 (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2656 2009-01-15 Brady Eidson <beidson@apple.com>
2658 Reviewed by Dan Bernstein
2660 Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2662 * History/WebHistory.mm:
2663 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2664 flag for all loads with an HTTP Method
2666 2009-01-14 Anders Carlsson <andersca@apple.com>
2668 Reviewed by Sam Weinig.
2670 Implement InvokeDefault, Construct, GetProperty and SetProperty.
2672 Fully implement marshalValue.
2674 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2675 (WKPCInvokeDefault):
2679 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2680 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2681 (WebKit::NetscapePluginInstanceProxy::evaluate):
2682 (WebKit::NetscapePluginInstanceProxy::invoke):
2683 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2684 (WebKit::NetscapePluginInstanceProxy::construct):
2685 (WebKit::NetscapePluginInstanceProxy::getProperty):
2686 (WebKit::NetscapePluginInstanceProxy::setProperty):
2687 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2688 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2689 * Plugins/Hosted/WebKitPluginClient.defs:
2691 2009-01-14 Anders Carlsson <andersca@apple.com>
2693 Reviewed by Sam Weinig.
2695 Demarshal arguments and pass them to the JS call.
2697 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2699 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2700 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2701 (WebKit::NetscapePluginInstanceProxy::invoke):
2702 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2703 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2705 2009-01-14 Mark Rowe <mrowe@apple.com>
2707 Reviewed by Timothy Hatcher.
2709 <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2711 Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2714 * WebView/WebArchive.mm:
2715 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2716 (-[WebArchive _initWithArguments:]):
2717 * WebView/WebResource.mm:
2718 (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2720 2009-01-14 Darin Adler <darin@apple.com>
2722 Reviewed by Oliver Hunt.
2724 Fix crash I ran into while printing. I was unable to reproduce it, but also,
2725 it's clear there's no guarantee that the frame will be non-zero in this case,
2726 so it seems fine to check it.
2728 * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2729 and don't do anything with it if it's zero.
2731 2009-01-14 Dan Bernstein <mitz@apple.com>
2733 Reviewed by John Sullivan.
2739 2009-01-12 Anders Carlsson <andersca@apple.com>
2741 Reviewed by Darin Adler.
2743 Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2745 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2746 (WebKit::fromUTF8WithLatin1Fallback):
2747 If the length isn't specified, get it by calling strlen.
2750 Evaluate doesn't take any arguments.
2752 (WKPCGetIntIdentifier):
2753 Call _NPN_GetIntIdentifier.
2755 (identifierFromServerIdentifier):
2756 New helper function that returns a JSC Identifier from an NPIdentifier.
2759 Call identifierFromServerIdentifier.
2761 (WKPCRemoveProperty):
2764 Call NetscapePluginInstanceProxy.
2766 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2767 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2768 (WebKit::NetscapePluginInstanceProxy::removeProperty):
2769 (WebKit::NetscapePluginInstanceProxy::hasProperty):
2770 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2772 * Plugins/Hosted/WebKitPluginClient.defs:
2773 Add new definitions.
2775 2009-01-13 Anders Carlsson <andersca@apple.com>
2779 * WebView/WebView.mm:
2780 (-[WebView _initWithArguments:]):
2782 2009-01-13 Timothy Hatcher <timothy@apple.com>
2784 Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2786 <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2788 Reviewed by Darin Adler.
2790 * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2791 * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2792 * Misc/WebNSObjectExtras.mm:
2793 (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2794 Passes the optional object to the selector.
2795 (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2796 Put the optional object into the arguments dictionary.
2797 (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2798 * WebView/WebResource.mm:
2799 (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2800 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2801 _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2802 * WebView/WebView.mm:
2803 (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2804 (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2805 (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2806 to call _initWithArguments: passing the frame, frameName and groupName.
2807 (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2809 2009-01-12 Gavin Barraclough <barraclough@apple.com>
2811 Reviewed by Oliver Hunt.
2813 Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
2815 * WebView/WebView.mm:
2816 (aeDescFromJSValue):
2818 2009-01-12 Brady Eidson <beidson@apple.com>
2820 Reviewed by Darin Adler
2822 <rdar://problem/6468274> - Track Non-get requests in global history
2824 * History/WebHistory.mm:
2825 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2826 * History/WebHistoryInternal.h:
2828 * History/WebHistoryItem.mm:
2829 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2830 (-[WebHistoryItem dictionaryRepresentation]):
2831 (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2832 * History/WebHistoryItemPrivate.h:
2834 * WebCoreSupport/WebFrameLoaderClient.mm:
2835 (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2837 2009-01-12 Anders Carlsson <andersca@apple.com>
2839 Reviewed by Sam Weinig.
2841 Move marshalling into NetscapePluginInstanceProxy.
2843 Add support for marshallin strings.
2845 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2848 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2849 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2850 (WebKit::NetscapePluginInstanceProxy::evaluate):
2851 (WebKit::NetscapePluginInstanceProxy::invoke):
2852 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2853 * Plugins/Hosted/WebKitPluginHostTypes.h:
2855 2009-01-12 Anders Carlsson <andersca@apple.com>
2857 Reviewed by Sam Weinig.
2859 Implement WKPCInvoke.
2861 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2864 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2865 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2866 (WebKit::NetscapePluginInstanceProxy::idForObject):
2867 (WebKit::NetscapePluginInstanceProxy::invoke):
2868 * Plugins/Hosted/WebKitPluginClient.defs:
2870 2009-01-12 Anders Carlsson <andersca@apple.com>
2872 Reviewed by Sam Weinig.
2874 Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2876 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2878 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2879 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2880 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2881 * Plugins/Hosted/WebKitPluginHostTypes.h:
2883 2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
2885 Reviewed by Darin Adler.
2887 Bug 22861: Turn the FontCache into a singleton
2888 https://bugs.webkit.org/show_bug.cgi?id=22861
2890 * Misc/WebCoreStatistics.mm:
2891 (+[WebCoreStatistics cachedFontDataCount]):
2892 (+[WebCoreStatistics cachedFontDataInactiveCount]):
2893 (+[WebCoreStatistics purgeInactiveFontData]):
2894 Redirected all the static calls to the global FontCache
2897 2009-01-11 Dmitry Titov <dimich@chromium.org>
2899 Reviewed by Darin Adler.
2901 https://bugs.webkit.org/show_bug.cgi?id=23207
2902 Moved currentTime() to from WebCore to WTF.
2904 * WebView/WebFrame.mm: a different header file included.
2906 2009-01-10 Darin Adler <darin@apple.com>
2908 Reviewed by Sam Weinig.
2910 <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2911 because of change to -[HTMLObjectElement data]
2913 * WebView/WebView.mm:
2914 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2915 violation check because I saw this being done off the main thread while testing Mail, and it
2916 caused problems. Put all the one time initialization under a single guard to make things just
2917 a little faster other times, and to make it clearer which things are one-time. Added a call to
2918 the new patchMailRemoveAttributesMethod function.
2919 (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2920 because I assumed it would be slightly better to have a public method name in the violation
2921 message. This calls commonInitialization later, so it will hit that one eventually.
2922 (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2923 (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2924 a WebKit method and removes the patch again on the way out.
2925 (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2926 applies the patch that fixes this bug.
2928 2009-01-09 Dan Bernstein <mitz@apple.com>
2930 Reviewed by Darin Adler.
2932 - fixed <rdar://problem/6234347> Add/change conditional key
2933 bindings for changing paragraph- and character-level writing
2934 direction (to match NSTextView)
2936 * WebView/WebHTMLView.mm:
2937 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
2938 code to validate makeBaseWritingDirectionLeftToRight: and
2939 makeBaseWritingDirectionRightToLeft:.
2940 (writingDirectionKeyBindingsEnabled): Changed this function to
2941 always return YES, except on Tiger and Leopard.
2942 (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
2943 changeBaseWritingDirectionToLTR: to this.
2944 (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
2945 changeBaseWritingDirectionToRTL: to this.
2946 (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
2947 makeBaseWritingDirectionLeftToRight:.
2948 (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
2949 makeBaseWritingDirectionRightToLeft:.
2950 * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
2951 and makeBaseWritingDirectionRightToLeft to
2952 FOR_EACH_RESPONDER_SELECTOR.
2954 2009-01-08 Anders Carlsson <andersca@apple.com>
2956 Reviewed by Sam Weinig.
2958 Add and implement WKPCGetStringIdentifier.
2960 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2961 (WKPCGetStringIdentifier):
2962 * Plugins/Hosted/WebKitPluginClient.defs:
2964 2009-01-08 Stephanie Lewis <slewis@gmail.com>
2968 * WebView/WebTextIterator.mm:
2970 2009-01-08 Anders Carlsson <andersca@apple.com>
2972 Reviewed by Sam Weinig.
2974 Add basic support for evaluating scripts.
2976 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2977 (WebKit::fromUTF8WithLatin1Fallback):
2978 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2979 (WKPCReleaseObject):
2982 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2983 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2984 (WebKit::NetscapePluginInstanceProxy::releaseObject):
2985 (WebKit::NetscapePluginInstanceProxy::evaluate):
2986 * Plugins/Hosted/WebKitPluginClient.defs:
2987 * Plugins/Hosted/WebKitPluginHostTypes.h:
2989 2009-01-08 David Hyatt <hyatt@apple.com>
2991 Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2993 Add a new ChromeClient method for handling exposure of scrolled rects.
2995 Reviewed by Oliver Hunt
2997 * WebCoreSupport/WebChromeClient.h:
2998 * WebCoreSupport/WebChromeClient.mm:
2999 (WebChromeClient::scrollRectIntoView):
3001 2009-01-08 Darin Adler <darin@apple.com>
3003 Reviewed by Tim Hatcher.
3005 Bug 23185: add a currentRange method to the WebTextIterator SPI
3006 https://bugs.webkit.org/show_bug.cgi?id=23185
3007 rdar://problem/6455834
3009 I also noticed a garbage-collection-related threading issue that I fixed, and
3010 that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
3012 * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
3013 category. Added currentTextPointer and currentTextLength.
3015 * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
3016 used _textIterator to be consistent with ObjC rather than C++ naming.
3017 (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
3018 since the finalize method here works with main-thread only WebCore objects.
3019 (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
3020 (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
3021 since I don't think it provides much value.
3022 (-[WebTextIterator atEnd]): Ditto.
3023 (-[WebTextIterator currentRange]): Added.
3024 (-[WebTextIterator currentTextPointer]): Added.
3025 (-[WebTextIterator currentTextLength]): Added.
3026 (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
3027 (-[WebTextIterator currentText]): Ditto.
3029 2009-01-08 Eric Carlson <eric.carlson@apple.com>
3031 Reviewed by Adele Peterson.
3033 Simplify Mac interfaces for drawing media controller elements
3035 <rdar://problem/6293969>
3037 * WebCoreSupport/WebSystemInterface.m:
3038 (InitWebCoreSystemInterface): Update for changes to media controller functions
3040 2009-01-07 Anders Carlsson <andersca@apple.com>
3042 Reviewed by Dan Bernstein.
3046 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3047 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3048 (WebKit::NetscapePluginInstanceProxy::idForObject):
3050 2009-01-07 Anders Carlsson <andersca@apple.com>
3052 Reviewed by Dan Bernstein.
3054 Add a way for a plug-in to get a reference to the Window JS object.
3056 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3057 (WKPCGetWindowNPObject):
3058 Call the appropriate instance.
3060 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3061 Add object ID counter.
3063 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3064 (WebKit::NetscapePluginInstanceProxy::destroy):
3065 Clear the object ID map.
3067 (WebKit::NetscapePluginInstanceProxy::idForObject):
3068 New method that returns a unique ID for a given JS object.
3070 (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3071 Return the object ID for the window JS object.
3073 * Plugins/Hosted/WebKitPluginClient.defs:
3074 Add GetWindowNPObject.
3076 2009-01-07 Darin Adler <darin@apple.com>
3078 Reviewed by Oliver Hunt.
3080 Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
3081 https://bugs.webkit.org/show_bug.cgi?id=23160
3083 * WebView/WebView.mm:
3084 (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
3085 (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
3086 * WebView/WebViewPrivate.h: Ditto.
3088 2009-01-05 Gavin Barraclough <baraclough@apple.com>
3090 Rubber Stamped by Oliver Hunt.
3092 Replace all uses of JSValue* with new wrapper class, JSValuePtr.
3093 See JavaScriptCore/ChangeLog for more detailed description.
3095 * WebView/WebFrame.mm:
3096 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3097 * WebView/WebScriptDebugDelegate.mm:
3098 (-[WebScriptCallFrame _convertValueToObjcValue:]):
3099 (-[WebScriptCallFrame exception]):
3100 (-[WebScriptCallFrame evaluateWebScript:]):
3101 * WebView/WebView.mm:
3102 (aeDescFromJSValue):
3103 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
3105 2009-01-06 Pierre-Olivier Latour <pol@apple.com>
3107 Reviewed by Darin Adler.
3109 Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
3111 https://bugs.webkit.org/show_bug.cgi?id=23126
3113 * WebView/WebFrame.mm:
3114 (-[WebFrame _numberOfActiveAnimations]):
3115 * WebView/WebFramePrivate.h:
3117 2009-01-05 David Kilzer <ddkilzer@apple.com>
3119 Add SPI to enable, disable and check state of WebIconDatabase
3121 Reviewed by Darin Adler & Timothy Hatcher.
3123 Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
3124 SPI to make it possible to enable, disable and check the state of
3127 * Misc/WebIconDatabase.mm:
3128 (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
3129 (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
3130 -isEnabled instead of -_isEnabled.
3131 (-[WebIconDatabase iconURLForURL:]): Ditto.
3132 (-[WebIconDatabase retainIconForURL:]): Ditto.
3133 (-[WebIconDatabase releaseIconForURL:]): Ditto.
3134 (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
3135 WebInternal category.
3136 (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
3137 the enabled/disabled state of the icon database.
3138 (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
3139 instead of -_isEnabled.
3140 (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
3142 (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
3143 observers when the icon database is disabled.
3144 * Misc/WebIconDatabaseInternal.h: Added declarations for
3145 -_startUpIconDatabase and -_shutDownIconDatabase.
3146 * Misc/WebIconDatabasePrivate.h: Added declarations for
3147 -isEnabled and -setEnabled:.
3149 2009-01-05 Brady Eidson <beidson@apple.com>
3151 Reviewed by Jon Honeycutt
3153 Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
3155 * History/WebHistoryItem.mm:
3156 (-[WebHistoryItem _setLastVisitWasFailure:]):
3157 * History/WebHistoryItemPrivate.h:
3159 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3161 Another blind mac build fix
3163 * WebCoreSupport/WebChromeClient.mm:
3164 (WebChromeClient::contentsSizeChanged):
3166 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3170 * WebCoreSupport/WebChromeClient.mm:
3172 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3176 * WebCoreSupport/WebChromeClient.h:
3178 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3180 Reviewed by George Staikos.
3182 Build fix for contentsSizeChanged
3184 * WebCoreSupport/WebChromeClient.h:
3185 * WebCoreSupport/WebChromeClient.mm:
3186 (WebChromeClient::contentsSizeChanged):
3188 2009-01-02 Darin Adler <darin@apple.com>
3190 Reviewed by Sam Weinig.
3192 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
3193 inside its web view when resizing its window
3194 https://bugs.webkit.org/show_bug.cgi?id=23072
3195 rdar://problem/6368028
3197 The first attempt at fixing this did not work.
3198 This time I was able to reproduce the bug and test the fix.
3200 * WebCoreSupport/WebFrameLoaderClient.mm:
3201 (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
3202 function names around a bit to make even less code at the call site.
3203 (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
3204 Dictionary application in here.
3205 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
3206 applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
3207 when the script is cached. This fixes one of the two problems with the initial
3208 patch; the other fix is in WebCore.
3209 (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
3210 applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
3212 * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
3214 2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
3216 Reviewed by Darin Adler.
3218 Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
3219 <https://bugs.webkit.org/show_bug.cgi?id=23060>
3220 <rdar://problem/6467830>
3222 After r38629, all keyboard events get sent by Editor to the EditorClient, even
3223 if the selection is not editable. If the event's command is unsupported by
3224 WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
3225 was not. When using the page up / page down keys, the events generated are of
3226 the form scrollPageUp rather than movePageUp, so they are unsupported by
3227 WebHTMLView and cause this bug to occur.
3229 * WebView/WebHTMLView.mm:
3230 (-[WebHTMLView doCommandBySelector:]):
3232 2009-01-02 Darin Adler <darin@apple.com>
3234 Reviewed by Oliver Hunt.
3236 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
3237 https://bugs.webkit.org/show_bug.cgi?id=23072
3238 rdar://problem/6368028
3240 * WebCoreSupport/WebFrameLoaderClient.mm:
3241 (isAppleDictionaryApplication): Added.
3242 (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
3243 a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
3244 (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
3245 apply the quirk when the relevant script is loaded.
3247 2008-12-26 Dan Bernstein <mitz@apple.com>
3249 Reviewed by Sam Weinig.
3251 - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
3252 global history after a successful visit
3254 * History/WebHistory.mm:
3255 (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
3256 update the wasFailure flag on the HistoryItem.
3258 2008-12-23 Darin Adler <darin@apple.com>
3260 Reviewed by Alexey Proskuryakov (a slightly earlier version).
3262 - fix https://bugs.webkit.org/show_bug.cgi?id=22976
3263 crash due to Mail's use of WebArchive and WebResource on non-main thread
3265 * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
3266 WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
3267 * Misc/WebKitLogging.m: Ditto.
3269 * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
3270 main thread workaround.
3272 * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
3273 which performs a selector on the main thread, waits for it to complete, and then
3274 returns the value on the caller thread.
3275 * Misc/WebNSObjectExtras.mm: Added.
3277 * WebView/WebArchive.mm:
3278 (-[WebArchive init]): Added WebCoreThreadViolationCheck.
3279 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
3280 initialization on main thread if needMailThreadWorkaround is true.
3281 Also added WebCoreThreadViolationCheck.
3282 (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
3283 (-[WebArchive mainResource]): Get property on main thread if
3284 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3285 (-[WebArchive subresources]): Ditto.
3286 (-[WebArchive subframeArchives]): Ditto.
3287 (-[WebArchive data]): Ditto.
3288 (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
3289 (-[WebArchive _coreLegacyWebArchive]): Ditto.
3290 (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
3291 version of initWithMainResource above.
3293 * WebView/WebResource.mm:
3294 (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
3295 (-[WebResource data]): Get property on main thread if
3296 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3297 (-[WebResource URL]): Ditto.
3298 (-[WebResource MIMEType]): Ditto.
3299 (-[WebResource textEncodingName]): Ditto.
3300 (-[WebResource frameName]): Ditto.
3301 (-[WebResource _ignoreWhenUnarchiving]): Ditto.
3302 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
3303 Perform initialization on main thread if needMailThreadWorkaround is true.
3304 Also added WebCoreThreadViolationCheck.
3305 (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
3306 (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
3307 getting at coreResource directly.
3308 (-[WebResource _response]): Get property on main thread if
3309 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3310 (-[WebResource _stringValue]): Ditto.
3311 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
3312 (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
3313 version of _initWithData above.
3315 * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
3316 clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
3317 and the needMainThreadWorkaround helper function.
3319 * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
3320 file. This probably fixes clean builds.
3321 * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
3323 * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
3324 since it's not actually used.
3325 * WebView/WebDataSource.mm: Ditto.
3326 * WebView/WebHTMLRepresentation.mm: Ditto.
3328 2008-12-23 Darin Adler <darin@apple.com>
3330 Reviewed by Dan Bernstein.
3332 - fix https://bugs.webkit.org/show_bug.cgi?id=22979
3333 crash seen in -[WebView drawsBackground] when quitting
3334 <rdar://problem/6464601>
3336 * WebView/WebView.mm:
3337 (-[WebView drawsBackground]): Added comment and a null check for _private.
3339 2008-12-22 Kevin Decker <kdecker@apple.com>
3341 Reviewed by Anders Carlsson.
3343 <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
3345 * Plugins/WebBaseNetscapePluginView.mm:
3346 (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
3348 2008-12-19 Geoffrey Garen <ggaren@apple.com>
3350 Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
3352 Added SPI for getting an unsorted vector of all items in history.
3354 * History/WebHistory.h:
3355 * History/WebHistory.mm:
3356 (-[WebHistory allItems]):
3358 2008-12-18 Dan Bernstein <mitz@apple.com>
3360 Reviewed by Sam Weinig.
3362 - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
3363 a new resource load delegae method.
3365 * WebCoreSupport/WebFrameLoaderClient.h:
3366 * WebCoreSupport/WebFrameLoaderClient.mm:
3367 (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
3368 delegate method. If the method is unimplemented, returns true for
3369 backwards compatibility.
3370 * WebView/WebView.mm:
3371 (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
3372 shouldUseCredentialStorageFunc member.
3373 (CallResourceLoadDelegateReturningBoolean): Added.
3374 * WebView/WebViewInternal.h:
3375 * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
3376 -webView:resource:shouldUseCredentialStorageForDataSource:.
3378 2008-12-18 Cameron Zwarich <zwarich@apple.com>
3380 Reviewed by Jonathan Honeycutt.
3382 Fix an apparent typo in r39385 that is causing lots of crashes.
3384 * WebCoreSupport/WebFrameLoaderClient.mm:
3385 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3387 2008-12-18 Brady Eidson <beidson@apple.com>
3389 Reviewed by John Sullivan
3391 Initial visit to a website creates history items that start with a visit count of
3394 * History/WebHistory.mm:
3395 (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
3397 * History/WebHistoryItem.mm:
3398 (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
3399 * History/WebHistoryItemInternal.h:
3401 2008-12-18 Sam Weinig <sam@webkit.org>
3403 Reviewed by John Sullivan.
3405 Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
3406 a new private frame load delegate method.
3408 * WebCoreSupport/WebFrameLoaderClient.h:
3409 * WebCoreSupport/WebFrameLoaderClient.mm:
3410 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3411 * WebView/WebView.mm:
3412 (-[WebView _cacheFrameLoadDelegateImplementations]):
3413 * WebView/WebViewInternal.h:
3414 * WebView/WebViewPrivate.h:
3416 2008-12-16 Antti Koivisto <antti@apple.com>
3418 Reviewed by John Sullivan.
3420 Add version check for shift-reload behavior.
3422 * Misc/WebKitVersionChecks.h:
3423 * WebView/WebFrame.mm:
3424 (-[WebFrame reload]):
3426 2008-12-16 Anders Carlsson <andersca@apple.com>
3428 Reviewed by Dan Bernstein.
3430 Start sending keyboard events to the plug-in host.
3432 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3433 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3434 (WebKit::NetscapePluginInstanceProxy::keyEvent):
3435 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3436 (-[WebHostedNetscapePluginView keyDown:]):
3437 (-[WebHostedNetscapePluginView keyUp:]):
3438 * Plugins/Hosted/WebKitPluginHost.defs:
3440 2008-12-16 Anders Carlsson <andersca@apple.com>
3442 Reviewed by Kevin Decker.
3444 <rdar://problem/6450538>
3446 Fix flag enumeration.
3448 * Plugins/Hosted/WebKitPluginHostTypes.h:
3450 2008-12-16 Anders Carlsson <andersca@apple.com>
3452 Reviewed by Kevin Decker.
3454 Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
3456 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3458 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3459 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3460 (WebKit::NetscapePluginInstanceProxy::loadURL):
3461 * Plugins/Hosted/WebKitPluginClient.defs:
3462 * Plugins/Hosted/WebKitPluginHostTypes.h:
3464 2008-12-16 Anders Carlsson <andersca@apple.com>
3466 Reviewed by Kevin Decker.
3468 Add trailing null to headers to avoid a crash in the plug-in host.
3470 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3471 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3473 2008-12-15 Mark Rowe <mrowe@apple.com>
3475 Rubber-stamped by Cameron Zwarich.
3477 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
3479 * Configurations/Base.xcconfig:
3480 * Configurations/DebugRelease.xcconfig:
3482 2008-12-15 Stephanie Lewis <slewis@apple.com>
3486 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3488 2008-12-15 Anders Carlsson <andersca@apple.com>
3490 Reviewed by Sam Weinig.
3492 Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
3493 back into us while it's being instantiated.
3495 * Plugins/Hosted/NetscapePluginHostManager.mm:
3496 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3497 * Plugins/Hosted/NetscapePluginHostProxy.h:
3498 (WebKit::NetscapePluginHostProxy::clientPort):
3499 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3500 (WKPCInstantiatePluginReply):
3501 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3502 (WebKit::NetscapePluginInstanceProxy::Reply::):
3503 (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
3504 (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
3505 (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
3506 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
3507 (WebKit::NetscapePluginInstanceProxy::waitForReply):
3508 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3509 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3510 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
3511 * Plugins/Hosted/WebKitPluginClient.defs:
3512 * Plugins/Hosted/WebKitPluginHost.defs:
3514 2008-12-15 Anders Carlsson <andersca@apple.com>
3516 Reviewed by Darin Adler.
3518 Let WebKit generate a plug-in ID instead of having the plug-in host do it.
3520 * Plugins/Hosted/NetscapePluginHostManager.mm:
3521 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3522 Create the plug-in proxy before instantiating the plug-in.
3524 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3525 (WebKit::NetscapePluginInstanceProxy::create):
3526 (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
3527 (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
3528 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3529 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3530 * Plugins/Hosted/WebKitPluginHost.defs:
3532 2008-12-15 Anders Carlsson <andersca@apple.com>
3534 Reviewed by Sam Weinig.
3536 LoadURL doesn't need to be asynchronous.
3538 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3540 * Plugins/Hosted/WebKitPluginClient.defs:
3541 * Plugins/Hosted/WebKitPluginHost.defs:
3543 2008-12-15 Antti Koivisto <antti@apple.com>
3545 Reviewed by Darin Adler.
3547 - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
3548 - Add corresponding IBAction to WebView.
3549 - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
3551 * WebView/WebFrame.h:
3552 * WebView/WebFrame.mm:
3553 (-[WebFrame reload]):
3554 (-[WebFrame reloadFromOrigin]):
3555 * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
3556 * WebView/WebView.h:
3557 * WebView/WebView.mm:
3558 (-[WebView reloadFromOrigin:]):
3560 2008-12-14 Dan Bernstein <mitz@apple.com>
3562 Reviewed by Darin Adler.
3564 - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
3565 should add items to userInfo
3567 * History/WebHistory.mm:
3568 (-[WebHistoryPrivate allItems]): Added this helper method, which returns
3569 all values in the _entriesByURL dictionary.
3570 (-[WebHistory removeAllItems]): Changed to send the array of all items
3571 in the notification.
3573 2008-12-13 Darin Adler <darin@apple.com>
3575 - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
3577 * WebKit.exp: Added the class. We forgot to export it when we added
3578 the WebTextIterator SPI.
3580 2008-12-12 Darin Adler <darin@apple.com>
3582 Rubber stamped by Adam Roben.
3584 - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
3585 login sheet after clicking static text, due to AppKit key loop change
3587 * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
3588 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
3589 * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3590 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3591 Set nextKeyView of the selectable static texts to the editable text.
3594 2008-12-12 Stephanie Lewis <slewis@apple.com>
3596 Reviewed by Geoff Garen.
3600 * WebView/WebView.mm:
3601 (+[WebView _setCacheModel:]):
3603 2008-12-12 Anders Carlsson <andersca@apple.com>
3605 Reviewed by Tim Hatcher.
3607 Don't try to free the dummy "1" port state.
3609 * Plugins/WebNetscapePluginView.mm:
3610 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3611 (-[WebNetscapePluginView updateAndSetWindow]):
3613 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3615 Rubber-stamped by Mark Rowe.
3617 Roll out r39212 due to assertion failures during layout tests, multiple
3618 layout test failures, memory leaks, and obvious incorrectness.
3620 * WebView/WebPreferenceKeysPrivate.h:
3621 * WebView/WebPreferences.mm:
3622 (-[WebPreferences fullDocumentTeardownEnabled]):
3623 * WebView/WebPreferencesPrivate.h:
3625 2008-12-11 Stephanie Lewis <slewis@apple.com>
3629 * WebView/WebView.mm:
3631 2008-12-11 Stephanie Lewis <slewis@apple.com>
3633 Reviewed by Oliver Hunt.
3635 Empty Web cache before quitting a debug build in order
3636 to report accurate CachedResource leaks.
3638 * WebView/WebView.mm:
3639 (-[WebView _close]):
3641 2008-12-11 Anders Carlsson <andersca@apple.com>
3645 * Misc/WebNSDataExtras.h:
3647 2008-12-11 Anders Carlsson <andersca@apple.com>
3649 Reviewed by Cameron Zwarich.
3651 https://bugs.webkit.org/show_bug.cgi?id=22797
3652 REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3654 Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3656 * Plugins/WebBaseNetscapePluginStream.mm:
3657 (WebNetscapePluginStream::destroyStreamWithReason):
3659 2008-12-10 Glenn Wilson <gwilson@google.com>
3661 Reviewed by Adam Roben.
3663 Added new methods for overriding default WebPreference values
3664 and for resetting preferences to their defaults.
3665 https://bugs.webkit.org/show_bug.cgi?id=20534
3667 * WebView/WebPreferenceKeysPrivate.h:
3668 * WebView/WebPreferences.mm:
3669 (-[WebPreferences resetToDefaults]): new method
3670 (-[WebPreferences overridePreference:flag:]): new method
3671 * WebView/WebPreferencesPrivate.h: new method signatures
3673 2008-12-10 Anders Carlsson <andersca@apple.com>
3675 Reviewed by Darin Adler.
3677 Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3679 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3682 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3683 (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3684 Factored out this from ::destroy.
3686 (WebKit::NetscapePluginInstanceProxy::destroy):
3687 Call stopAllStreams().
3689 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3692 (WebKit::NetscapePluginInstanceProxy::loadURL):
3693 Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3695 2008-12-10 Anders Carlsson <andersca@apple.com>
3697 Reviewed by Darin Adler.
3699 Move two NSData category methods to WebNSDataExtras.m.
3701 * Misc/WebNSDataExtras.h:
3702 * Misc/WebNSDataExtras.m:
3703 (-[NSData _web_startsWithBlankLine]):
3704 (-[NSData _web_locationAfterFirstBlankLine]):
3705 * Plugins/WebNetscapePluginView.mm:
3707 2008-12-10 Alice Liu <alice.liu@apple.com>
3709 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3711 Reviewed by Darin Adler.
3713 * Misc/WebNSPasteboardExtras.mm:
3714 Ask image for its file extension instead of falling back on MIME type and file path.
3715 Also moved this code to before setting the pasteboard data so as not to set any if
3716 no extension can be determined.
3717 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3719 * WebView/WebHTMLView.mm:
3720 Fixed a separate but related long-standing bug of how the filename for the promised
3721 drag data is determined by asking the image for a proper file extension.
3722 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3724 2008-12-09 Anders Carlsson <andersca@apple.com>
3726 Reviewed by Darin Adler.
3730 * WebView/WebHTMLView.mm:
3731 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3733 2008-12-09 Anders Carlsson <andersca@apple.com>
3735 Reviewed by Darin Adler.
3737 Implement software rendering of hosted plug-ins.
3739 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3740 (WKPCInvalidateRect):
3741 New MiG function. This is called by the plug-in host when it has drawn something.
3743 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3744 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3745 (-[WebHostedNetscapePluginView createPlugin]):
3746 Create a software renderer.
3748 (-[WebHostedNetscapePluginView destroyPlugin]):
3749 Destroy the software renderer.
3751 (-[WebHostedNetscapePluginView drawRect:]):
3752 Draw using the software renderer.
3754 * Plugins/Hosted/WebKitPluginClient.defs:
3757 2008-12-09 Brett Wilson <brettw@chromium.org>
3759 Reviewed by Dave Hyatt.
3761 https://bugs.webkit.org/show_bug.cgi?id=22177
3763 Add a callback on ChromeClient that the state of form elements on
3764 the page has changed. This is to allow clients implementing session
3765 saving to know when the current state is dirty.
3767 * WebCoreSupport/WebChromeClient.h:
3768 (WebChromeClient::formStateDidChange):
3770 2008-12-09 Anders Carlsson <andersca@apple.com>
3772 Reviewed by Dan Bernstein.
3774 Make sure to pause null events for hosted plug-ins as well.
3776 * WebView/WebHTMLView.mm:
3777 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3779 2008-12-09 Anders Carlsson <andersca@apple.com>
3781 Reviewed by Darin Adler.
3783 * Plugins/Hosted/NetscapePluginHostProxy.h:
3784 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3785 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3786 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3787 Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3789 2008-12-09 Timothy Hatcher <timothy@apple.com>
3791 Implement a few methods needed to keep Dictionary.app working on Leopard.
3793 <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3794 Developer Preview might break Dictionary
3796 Reviewed by Dan Bernstein.
3798 * WebView/WebFrame.mm:
3799 (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3800 (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3801 * WebView/WebHTMLView.mm:
3802 (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3803 that Dictionary.app is using.
3805 2008-12-08 Anders Carlsson <andersca@apple.com>
3807 Reviewed by Darin Adler.
3809 More work towards getting NPN_GetURL working.
3811 * Plugins/Hosted/HostedNetscapePluginStream.h:
3812 Inherit from NetscapePlugInStreamLoaderClient.
3814 (WebKit::HostedNetscapePluginStream::streamID):
3815 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3816 (WebKit::HostedNetscapePluginStream::startStream):
3817 Keep track of the resposne URL and the MIME type. Pass the response URL to the
3820 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3821 Disconnect the stream.
3823 (WebKit::HostedNetscapePluginStream::start):
3824 Create a plug-in stream loader and start loading.
3826 (WebKit::HostedNetscapePluginStream::stop):
3829 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3831 Fix the parameter order.
3833 (WKPCCancelLoadURL):
3834 New function that cancels a load of a stream with a given reason.
3836 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3837 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3838 (WebKit::NetscapePluginInstanceProxy::destroy):
3841 (WebKit::NetscapePluginInstanceProxy::pluginStream):
3842 Return a plug-in stream given a stream ID.
3844 (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3845 Remove the stream from the streams map.
3847 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3848 Create a stream and load it.
3850 * Plugins/Hosted/WebKitPluginClient.defs:
3853 * Plugins/Hosted/WebKitPluginHost.defs:
3854 Add responseURL to StartStream.
3856 * Plugins/WebBaseNetscapePluginView.h:
3857 * Plugins/WebBaseNetscapePluginView.mm:
3858 (-[WebBaseNetscapePluginView pluginPackage]):
3859 Move this down to the base class from WebNetscapePluginView.
3861 * Plugins/WebNetscapePluginView.h:
3862 * Plugins/WebNetscapePluginView.mm:
3864 2008-12-08 Dan Bernstein <mitz@apple.com>
3866 Reviewed by John Sullivan.
3868 - WebKit/mac part of tracking the global history item for a WebView
3870 * WebView/WebView.mm:
3871 (-[WebView _globalHistoryItem]): Added. Returns the page's global
3873 * WebView/WebViewPrivate.h:
3875 2008-12-06 Simon Fraser <simon.fraser@apple.com>
3877 Reviewed by Dave Hyatt
3879 https://bugs.webkit.org/show_bug.cgi?id=15671
3881 VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3883 * WebView/WebFrame.mm:
3884 (-[WebFrame _caretRectAtNode:offset:affinity:]):
3886 2008-12-06 David Kilzer <ddkilzer@apple.com>
3888 Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3890 <https://bugs.webkit.org/show_bug.cgi?id=22666>
3892 Reviewed by Darin Adler.
3894 * DOM/WebDOMOperations.mm:
3895 (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3896 ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3898 2008-12-05 Alexey Proskuryakov <ap@webkit.org>
3900 Reviewed by Darin Adler.
3902 <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3903 in Safari before opening a mail message in Mail
3905 * Carbon/CarbonWindowAdapter.m: Removed.
3906 * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3907 (+[CarbonWindowAdapter initialize]):
3908 * History/WebBackForwardList.mm:
3909 (+[WebBackForwardList initialize]):
3910 * History/WebHistoryItem.mm:
3911 (+[WebHistoryItem initialize]):
3912 * Misc/WebElementDictionary.mm:
3913 (+[WebElementDictionary initialize]):
3914 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3915 (+[WebHostedNetscapePluginView initialize]):
3916 * Plugins/WebBaseNetscapePluginView.mm:
3917 * Plugins/WebBasePluginPackage.m: Removed.
3918 * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3919 (+[WebBasePluginPackage initialize]):
3920 * Plugins/WebNetscapePluginView.mm:
3921 (+[WebNetscapePluginView initialize]):
3922 * WebCoreSupport/WebEditorClient.mm:
3923 (+[WebEditCommand initialize]):
3924 * WebCoreSupport/WebFrameLoaderClient.mm:
3925 * WebView/WebArchive.mm:
3926 (+[WebArchivePrivate initialize]):
3927 * WebView/WebDataSource.mm:
3928 (+[WebDataSourcePrivate initialize]):
3929 * WebView/WebHTMLView.mm:
3930 (+[WebHTMLViewPrivate initialize]):
3931 (+[WebHTMLView initialize]):
3932 * WebView/WebResource.mm:
3933 (+[WebResourcePrivate initialize]):
3934 * WebView/WebView.mm:
3935 (+[WebViewPrivate initialize]):
3936 Call JSC::initializeThreading();
3938 2008-12-04 Stephanie Lewis <slewis@apple.com>
3942 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3945 2008-12-04 Anders Carlsson <andersca@apple.com>
3947 Reviewed by Sam Weinig.
3949 More work on streams.
3951 * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
3952 (WebKit::HostedNetscapePluginStream::create):
3953 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
3954 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3955 (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
3956 (WebKit::HostedNetscapePluginStream::startStream):
3957 (WebKit::HostedNetscapePluginStream::didReceiveData):
3958 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3959 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3960 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3961 (WebKit::NetscapePluginInstanceProxy::pluginView):
3962 (WebKit::NetscapePluginInstanceProxy::hostProxy):
3963 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3964 (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
3965 (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
3966 (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
3967 (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
3968 (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
3969 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3970 (WebKit::NetscapePluginInstanceProxy::performRequest):
3971 (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3972 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3973 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3974 * Plugins/Hosted/WebKitPluginHost.defs:
3976 2008-12-04 Anders Carlsson <andersca@apple.com>
3978 Reviewed by Sam Weinig.
3980 Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3981 but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3982 implementations can share more code.
3984 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3986 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3987 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3988 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3989 (WebKit::NetscapePluginInstanceProxy::loadURL):
3990 (WebKit::NetscapePluginInstanceProxy::performRequest):
3991 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3992 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3993 * Plugins/Hosted/WebKitPluginClient.defs:
3994 * Plugins/Hosted/WebKitPluginHost.defs:
3996 2008-12-04 Anders Carlsson <andersca@apple.com>
3998 Reviewed by Dan Bernstein.
4000 Move requestWithURLCString to WebBaseNetscapePluginView.
4002 * Plugins/WebBaseNetscapePluginView.h:
4003 * Plugins/WebBaseNetscapePluginView.mm:
4004 (-[WebBaseNetscapePluginView requestWithURLCString:]):
4005 * Plugins/WebNetscapePluginView.mm:
4007 2008-12-03 Anders Carlsson <andersca@apple.com>
4009 Reviewed by Sam Weinig.
4011 Move WebPluginRequest to its own file.
4013 * Plugins/WebNetscapePluginView.mm:
4014 * Plugins/WebPluginRequest.h: Added.
4015 * Plugins/WebPluginRequest.m: Added.
4016 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
4017 (-[WebPluginRequest dealloc]):
4018 (-[WebPluginRequest request]):
4019 (-[WebPluginRequest frameName]):
4020 (-[WebPluginRequest isCurrentEventUserGesture]):
4021 (-[WebPluginRequest sendNotification]):
4022 (-[WebPluginRequest notifyData]):
4024 2008-12-03 Anders Carlsson <andersca@apple.com>
4026 Handle the CA model.
4028 * Plugins/WebNetscapePluginView.mm:
4029 (-[WebNetscapePluginView setWindowIfNecessary]):
4031 2008-12-03 Anders Carlsson <andersca@apple.com>
4033 Reviewed by Kevin Decker.
4035 <rdar://problem/6412293>
4036 Call NPP_SetWindow for CA plug-ins.
4038 * Plugins/WebNetscapePluginView.mm:
4039 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
4040 (-[WebNetscapePluginView restorePortState:]):
4041 (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
4042 (-[WebNetscapePluginView updateAndSetWindow]):
4043 (-[WebNetscapePluginView setWindowIfNecessary]):
4045 2008-12-03 Anders Carlsson <andersca@apple.com>
4047 Fix the release build.
4049 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4050 (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
4052 2008-12-03 Anders Carlsson <andersca@apple.com>
4054 Reviewed by Dan Bernstein.
4056 <rdar://problem/6412234>
4057 Don't crash if we can't launch the plug-in host.
4059 * Plugins/Hosted/NetscapePluginHostManager.mm:
4060 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4062 2008-12-02 Anders Carlsson <andersca@apple.com>
4064 Reviewed by Dan Bernstein.
4066 Start processing messages sent to the client port.
4068 * Plugins/Hosted/NetscapePluginHostProxy.h:
4069 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4070 Add a map from ports to plug-in proxies. Turn the set of instances into a map from
4071 pluginID to instance proxy.
4074 Look up the right instance proxy and call status().
4076 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4077 (WebKit::NetscapePluginInstanceProxy::pluginID):
4078 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4079 (WebKit::NetscapePluginInstanceProxy::status):
4082 * Plugins/Hosted/WebKitPluginClient.defs:
4083 Add the plug-in ID to StatusText.
4085 2008-12-02 Gregory Hughes <ghughes@apple.com>
4087 Reviewed by Beth Dakin.
4089 Bug 22513: ZOOM: text selection does not send correct zoom bounds
4091 When zoomed, text selection must send the zoom bounds in flipped
4094 * WebCoreSupport/WebViewFactory.mm:
4095 (-[WebViewFactory accessibilityConvertScreenRect:]):
4097 2008-12-02 Anders Carlsson <andersca@apple.com>
4099 Reviewed by Dan Bernstein.
4101 Create a client mach port and pass it to the plug-in host.
4103 * Plugins/Hosted/NetscapePluginHostManager.h:
4104 * Plugins/Hosted/NetscapePluginHostManager.mm:
4105 (WebKit::NetscapePluginHostManager::hostForPackage):
4106 (WebKit::NetscapePluginHostManager::spawnPluginHost):
4107 * Plugins/Hosted/NetscapePluginHostProxy.h:
4108 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4109 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4110 * Plugins/Hosted/WebKitPluginHost.defs:
4112 2008-12-02 Anders Carlsson <andersca@apple.com>
4114 Reviewed by Sam Weinig.
4116 Let the plug-in views know if the plug-in host crashes.
4118 * Plugins/Hosted/NetscapePluginHostManager.h:
4119 * Plugins/Hosted/NetscapePluginHostManager.mm:
4120 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4121 * Plugins/Hosted/NetscapePluginHostProxy.h:
4122 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4123 (WebKit::NetscapePluginHostProxy::pluginHostDied):
4124 (WebKit::NetscapePluginHostProxy::addPluginInstance):
4125 (WebKit::NetscapePluginHostProxy::removePluginInstance):
4127 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4128 (WebKit::NetscapePluginInstanceProxy::create):
4129 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4130 Keep a pointer to the host proxy.
4132 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4133 Add the instance to the host set.
4135 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
4136 Remove the instance form the host set.
4138 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
4139 Tell the plug-in view that the plug-in died.
4141 * Plugins/Hosted/WebHostedNetscapePluginView.h:
4142 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4143 (-[WebHostedNetscapePluginView createPlugin]):
4144 Pass the plug-in view to the instantiatePlugin.
4146 (-[WebHostedNetscapePluginView pluginHostDied]):
4147 Handle the plug-in host crashing.
4149 (-[WebHostedNetscapePluginView drawRect:]):
4150 Fill the plug-in view with a nice red shade if the plug-in crashes.
4152 2008-12-01 Anders Carlsson <andersca@apple.com>
4154 Reviewed by Dan Bernstein.
4156 Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
4158 * Plugins/Hosted/NetscapePluginHostManager.h:
4159 * Plugins/Hosted/NetscapePluginHostManager.mm:
4160 (WebKit::NetscapePluginHostManager::pluginHostDied):
4161 Remove the plug-in host from the map.
4163 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4164 NetscapePluginHostProxy is no longer refcounted.
4166 * Plugins/Hosted/NetscapePluginHostProxy.h:
4167 This is no longer refcounted. Add a set of plug-in instances (unused for now).
4169 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4170 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4171 Create a death notification port.
4173 (WebKit::NetscapePluginHostProxy::pluginHostDied):
4174 Tell the manager that we're gone and delete ourselves.
4176 (WebKit::NetscapePluginHostProxy::deathPortCallback):
4177 New CFMachPort callback.
4179 2008-12-01 Anders Carlsson <andersca@apple.com>
4181 Reviewed by Dan Bernstein.
4183 Move instantiatePlugin to NetscapePluginHostManager.
4185 * Plugins/Hosted/NetscapePluginHostManager.h:
4186 * Plugins/Hosted/NetscapePluginHostManager.mm:
4187 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4188 * Plugins/Hosted/NetscapePluginHostProxy.h:
4189 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4190 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4191 (-[WebHostedNetscapePluginView createPlugin]):
4193 2008-12-01 Anders Carlsson <andersca@apple.com>
4195 Reviewed by Dan Bernstein.
4197 Pass the plug-in host port directly to the instance proxy.
4199 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4200 (WebKit::NetscapePluginHostProxy::instantiatePlugin):
4201 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4202 (WebKit::NetscapePluginInstanceProxy::create):
4203 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4204 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4205 (WebKit::NetscapePluginInstanceProxy::resize):
4206 (WebKit::NetscapePluginInstanceProxy::destroy):
4207 (WebKit::NetscapePluginInstanceProxy::focusChanged):
4208 (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
4209 (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
4210 (WebKit::NetscapePluginInstanceProxy::startTimers):
4211 (WebKit::NetscapePluginInstanceProxy::mouseEvent):
4212 (WebKit::NetscapePluginInstanceProxy::stopTimers):
4214 2008-12-01 Anders Carlsson <andersca@apple.com>
4216 Try to fix the Tiger build.
4218 * Plugins/WebNetscapePluginView.mm:
4220 2008-12-01 Anders Carlsson <andersca@apple.com>
4222 Rename _layer to _pluginLayer where I forgot to do so.
4224 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4225 (-[WebHostedNetscapePluginView destroyPlugin]):
4226 * Plugins/WebNetscapePluginView.h:
4227 * Plugins/WebNetscapePluginView.mm:
4228 (-[WebNetscapePluginView createPlugin]):
4229 (-[WebNetscapePluginView setLayer:]):
4230 (-[WebNetscapePluginView destroyPlugin]):
4232 2008-12-01 Anders Carlsson <andersca@apple.com>
4234 Reviewed by Adam Roben.
4236 Make sure to re-insert layers as needed so they won't be lost when the layer backed
4237 view is removed from the view hierarchy.
4239 * Plugins/Hosted/WebHostedNetscapePluginView.h:
4240 Add _pluginLayer ivar.
4242 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4243 (-[WebHostedNetscapePluginView createPlugin]):
4244 Don't add the layer here.
4246 (-[WebHostedNetscapePluginView setLayer:]):
4247 Instead, add it here.