1 2009-03-02 Sam Weinig <sam@webkit.org>
5 Enable Geolocation (except on Tiger and Leopard).
7 * Configurations/WebKit.xcconfig:
9 2009-03-02 Anders Carlsson <andersca@apple.com>
11 Reviewed by Dan Bernstein.
13 WebKit part of <rdar://problem/6638658>.
15 * Plugins/Hosted/NetscapePluginHostManager.h:
16 * Plugins/Hosted/NetscapePluginHostManager.mm:
17 (WebKit::NetscapePluginHostManager::createPropertyListFile):
18 Spawn the plug-in host and wait for it to create the property list.
20 * Plugins/WebBasePluginPackage.mm:
21 (-[WebBasePluginPackage createPropertyListFile]):
22 Factor code out into a new method.
24 (-[WebBasePluginPackage pListForPath:createFile:]):
25 Call the newly added createPropertyListFile method.
27 * Plugins/WebNetscapePluginPackage.mm:
28 (-[WebNetscapePluginPackage createPropertyListFile]):
29 Tell the plug-in host manager to create a property list file for us.
31 2009-03-02 Sam Weinig <sam@webkit.org>
33 Reviewed by Geoffrey Garen.
35 Fix for <rdar://problem/6507404> Add Geolocation support.
37 This is not yet turned on for any Mac platform.
39 Add SPI to ask the embedding application whether to allow
40 Geolocation for an origin.
42 * WebCoreSupport/WebChromeClient.h:
43 * WebCoreSupport/WebChromeClient.mm:
44 (WebChromeClient::shouldAllowGeolocationForFrame):
45 * WebView/WebUIDelegatePrivate.h:
47 2009-03-02 Anders Carlsson <andersca@apple.com>
51 * Plugins/WebNetscapePluginPackage.mm:
52 (-[WebNetscapePluginPackage _tryLoad]):
54 2009-03-02 Anders Carlsson <andersca@apple.com>
56 Reviewed by John Sullivan, Ada Chan.
58 Factor loading code out into its own method and get rid of a bunch of gotos.
60 * Plugins/WebNetscapePluginPackage.mm:
61 (-[WebNetscapePluginPackage _tryLoad]):
62 (-[WebNetscapePluginPackage load]):
64 2009-03-02 Anders Carlsson <andersca@apple.com>
68 * Plugins/WebNetscapeDeprecatedFunctions.h:
70 2009-03-02 Anders Carlsson <andersca@apple.com>
72 Reviewed by John Sullivan.
74 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
76 * Plugins/WebNetscapePluginPackage.m: Removed.
77 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
79 2009-03-01 Anders Carlsson <andersca@apple.com>
81 Reviewed by Sam Weinig.
83 WebKit side of <rdar://problem/6449689>
85 Pass the visible name to the plug-in host.
87 * Plugins/Hosted/NetscapePluginHostManager.mm:
88 (WebKit::NetscapePluginHostManager::spawnPluginHost):
90 2009-02-27 Alice Liu <alice.liu@apple.com>
92 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
93 extension to images that already have .jpg extension
95 Reviewed by Oliver Hunt.
97 * WebView/WebHTMLView.mm:
98 (-[NSString matchesExtensionEquivalent:]):
99 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
100 Relax the check for the proper extension to allow for known
101 equivalents, special-cased in matchesExtensionEquivalent function.
103 2009-02-27 Anders Carlsson <andersca@apple.com>
105 Reviewed by Geoffrey Garen.
107 <rdar://problem/6631436>
108 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
110 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
112 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
113 (WebKit::NetscapePluginInstanceProxy::evaluate):
115 2009-02-27 Anders Carlsson <andersca@apple.com>
117 Reviewed by Geoffrey Garen.
119 WebKit side of <rdar://problem/6626814>.
121 * Plugins/Hosted/NetscapePluginHostProxy.mm:
123 Make InvokeDefault async.
125 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
126 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
127 Handle passing NPObjects back to the plug-in host.
129 * Plugins/Hosted/ProxyInstance.h:
130 (WebKit::ProxyInstance::objectID):
133 * Plugins/Hosted/WebKitPluginClient.defs:
134 Make InvokeDefault a simpleroutine.
136 2009-02-27 Timothy Hatcher <timothy@apple.com>
138 Fixes an exception by null checking the WebResource before adding it to
139 the subresources array.
141 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
143 Reviewed by Geoff Garen and Anders Carlsson.
145 * WebView/WebDataSource.mm:
146 (-[WebDataSource subresources]): Null check the WebResource before adding it.
148 2009-02-27 Timothy Hatcher <timothy@apple.com>
150 Adds a workaround for Automator creating a WebView from a secondary thread.
152 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
153 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
155 Reviewed by Geoff Garen.
157 * WebView/WebView.mm:
158 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
160 2009-02-27 Adam Barth <abarth@webkit.org>
162 Reviewed by Eric Seidel.
164 Add a preference to reduce the power of file:// URLs.
166 * WebView/WebPreferenceKeysPrivate.h:
167 * WebView/WebPreferences.mm:
168 (+[WebPreferences initialize]):
169 (-[WebPreferences allowUniversalAccessFromFileUrls]):
170 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
171 * WebView/WebPreferencesPrivate.h:
172 * WebView/WebView.mm:
173 (-[WebView _preferencesChangedNotification:]):
175 2009-02-27 Simon Fraser <simon.fraser@apple.com>
177 Reviewed by Anders Carlsson
179 https://bugs.webkit.org/show_bug.cgi?id=24242
181 setCursor(), and resetCursorRects() on Tiger, were using global, not local
182 coordinates for elementAtPoint:
184 * WebView/WebHTMLView.mm:
188 2009-02-27 Adam Barth <abarth@webkit.org>
190 Reviewed by Eric Seidel.
192 Add a preference to reduce the power of file:// URLs.
194 * WebView/WebPreferenceKeysPrivate.h:
195 * WebView/WebPreferences.mm:
196 (+[WebPreferences initialize]):
197 (-[WebPreferences allowUniversalAccessFromFileUrls]):
198 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
199 * WebView/WebPreferencesPrivate.h:
200 * WebView/WebView.mm:
201 (-[WebView _preferencesChangedNotification:]):
203 2009-02-26 Adele Peterson <adele@apple.com>
205 Reviewed by Geoff Garen.
207 Fix for <rdar://problem/6618166>
208 https://bugs.webkit.org/show_bug.cgi?id=24216
209 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
211 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
212 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
213 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
215 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
216 fixed in r36919 and r38570 are still fixed.
218 * WebView/WebHTMLView.mm:
219 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
220 (-[WebHTMLView _isResigningFirstResponder]): Added.
221 * WebView/WebHTMLViewInternal.h:
222 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
223 if the document view is currently resigning first responder.
225 2009-02-25 Anders Carlsson <andersca@apple.com>
227 Reviewed by Kevin Decker.
229 Fix <rdar://problem/6623697>.
231 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
232 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
233 (WebKit::NetscapePluginInstanceProxy::print):
234 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
235 the image into the passed in context.
237 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
238 (-[WebHostedNetscapePluginView drawRect:]):
239 When printing, call NetscapePluginInstanceProxy::print.
241 * Plugins/Hosted/WebKitPluginHost.defs:
243 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
245 Reviewed by Darin Adler.
247 https://bugs.webkit.org/show_bug.cgi?id=24024
248 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
249 archiving a submission to about:blank
251 I don't know how to make an automated test for this bug.
253 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
254 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
256 2009-02-25 Chris Fleizach <cfleizach@apple.com>
258 Reviewed by Beth Dakin.
261 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
262 https://bugs.webkit.org/show_bug.cgi?id=24143
264 * WebView/WebFrame.mm:
265 (-[WebFrame _accessibilityTree]):
267 2009-02-25 Simon Fraser <simon.fraser@apple.com>
269 Build fix with ACCELERATED_COMPOSITING turned on.
271 I missed a spot in my last commit in renaming to
272 _stoppedAcceleratedCompositingForFrame:
274 * WebView/WebHTMLView.mm:
275 (-[WebHTMLView close]):
277 2009-02-25 Simon Fraser <simon.fraser@apple.com>
279 Reviewed by Dan Bernstein
281 https://bugs.webkit.org/show_bug.cgi?id=23854
283 Make an observable property, _isUsingAcceleratedCompositing, on
284 WebView that DumpRenderTree can use to specialize behavior.
286 This is implemented via a count of Frames that are using
287 accelerated compositing.
289 * WebView/WebHTMLView.mm:
290 (-[WebHTMLViewPrivate clear]):
291 (-[WebHTMLView close]):
292 (-[WebHTMLView attachRootLayer:]):
293 (-[WebHTMLView detachRootLayer]):
294 * WebView/WebView.mm:
295 (+[WebView automaticallyNotifiesObserversForKey:]):
296 (-[WebView _startedAcceleratedCompositingForFrame:]):
297 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
298 (-[WebView _isUsingAcceleratedCompositing]):
299 * WebView/WebViewInternal.h:
300 * WebView/WebViewPrivate.h:
302 2009-02-24 Sam Weinig <sam@webkit.org>
304 Reviewed by Geoffrey Garen.
306 Related to <rdar://problem/6590295>
307 Allow disabling javascript: urls.
309 * WebView/WebView.mm:
310 (-[WebView _setJavaScriptURLsAreAllowed:]):
311 * WebView/WebViewPrivate.h:
313 2009-02-24 Mark Rowe <mrowe@apple.com>
315 Reviewed by Oliver Hunt.
317 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
319 * Carbon/CarbonUtils.h:
320 * Carbon/HIWebView.h:
321 * Plugins/WebPlugin.h:
322 * Plugins/WebPluginViewFactory.h:
323 * WebView/WebUIDelegate.h:
325 2009-02-24 Peter Ammon <pammon@apple.com>
327 Reviewed by Mark Rowe.
329 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
331 * WebView/WebHTMLView.mm:
332 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
333 both the send and return type. We should also handle a nil send or return type by ignoring
334 the argument and returning whether we can handle the other type passed in.
336 2009-02-23 Anders Carlsson <andersca@apple.com>
338 Reviewed by Geoffrey Garen and Darin Adler.
340 WebKit side of <rdar://problem/6613151>.
342 Make sure to vm_deallocate all memory we get from MIG callbacks.
344 * Plugins/Hosted/NetscapePluginHostProxy.mm:
345 (DataDeallocator::DataDeallocator):
346 (DataDeallocator::~DataDeallocator):
347 Add a simple deallocator class.
351 (WKPCBooleanAndDataReply):
353 (WKPCGetStringIdentifier):
358 Use the new deallocator class.
360 2009-02-23 Anders Carlsson <andersca@apple.com>
362 Reviewed by Darin Adler.
364 Fix <rdar://problem/6450656>.
366 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
367 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
368 (WebKit::NetscapePluginInstanceProxy::insertText):
369 Add insert text which just calls the new WKPH function.
371 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
372 (-[WebHostedNetscapePluginView inputContext]):
373 Get the input context from the shared input panel.
375 (-[WebHostedNetscapePluginView keyDown:]):
376 Let the shared input panel have a go at the event first.
378 * Plugins/Hosted/WebKitPluginHost.defs:
379 Add new InsertText function.
381 2009-02-23 Mark Rowe <mrowe@apple.com>
383 Fix the build after r41126.
385 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
386 (WebKit::NetscapePluginInstanceProxy::invoke):
387 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
388 (WebKit::NetscapePluginInstanceProxy::construct):
390 2009-02-22 Dan Bernstein <mitz@apple.com>
392 Reviewed by Darin Adler.
394 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
396 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
397 in r30741, and assign the height value, rather than the width, to the
400 2009-02-21 Anders Carlsson <andersca@apple.com>
404 * Plugins/Hosted/WebTextInputWindowController.m:
406 2009-02-20 Anders Carlsson <andersca@apple.com>
408 Reviewed by Dan Bernstein.
410 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
412 * Plugins/Hosted/WebTextInputWindowController.h: Added.
413 * Plugins/Hosted/WebTextInputWindowController.m: Added.
415 2009-02-20 Kevin Decker <kdecker@apple.com>
417 Reviewed by andersca.
419 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
421 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
422 we are trying to set. Depending on what other I/O is going on, it can take some time.
424 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
425 (setMetaData): Added. Calls WKSetMetadataURL().
426 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
428 2009-02-19 Dan Bernstein <mitz@apple.com>
430 Reviewed by Sam Weinig.
432 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
433 Do not send loader callbacks during CSS styling
435 * WebView/WebView.mm:
436 (-[WebView _preferencesChangedNotification:]): Reverted the
437 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
439 2009-02-18 Dan Bernstein <mitz@apple.com>
441 Reviewed by Brady Eidson.
443 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
445 * WebView/WebView.mm:
446 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
447 workaround for this crash in iChat.
449 2009-02-18 Anders Carlsson <andersca@apple.com>
451 Reviewed by Sam Weinig.
453 Fix for <rdar://problem/6542390>
455 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
456 would cause a load to begin.
458 * Plugins/WebNetscapePluginView.mm:
459 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
461 2009-02-18 Adam Roben <aroben@apple.com>
463 Add SPI to get WebKit's custom pointing-hand cursor
465 Reviewed by John Sullivan.
467 * WebView/WebView.mm:
468 (+[WebView _pointingHandCursor]): Added. Returns the custom
469 pointing-hand cursor that WebKit uses.
470 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
472 2009-02-17 Eric Carlson <eric.carlson@apple.com>
474 Reviewed by Antti Koivisto.
476 https://bugs.webkit.org/show_bug.cgi?id=23917
477 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
480 * Plugins/WebPluginContainerPrivate.h:
481 * Plugins/WebPluginController.mm:
482 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
483 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
484 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
486 * WebCoreSupport/WebFrameLoaderClient.mm:
487 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
488 file extension, only want a match for the new MIME type proxy plug-ins should have.
490 2009-02-13 Anders Carlsson <andersca@apple.com>
492 Reviewed by Kevin Decker.
494 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
496 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
497 defer destruction until we're done executing the script.
499 * Plugins/Hosted/NetscapePluginHostProxy.mm:
500 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
501 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
502 Add a simple RAII object for deferring destruction of the plug-in instance.
510 (WKPCRemoveProperty):
513 Use the PluginDestroyDeferrer.
515 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
516 (WebKit::NetscapePluginInstanceProxy::pluginID):
517 Assert that the plug-in ID is not 0 here.
519 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
520 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
521 Initialize the call depth.
523 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
524 Set the plug-in ID to 0 to aid debugging.
526 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
527 Increment the call depth.
529 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
530 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
532 (WebKit::NetscapePluginInstanceProxy::shouldStop):
533 If we're called this with a non-zero call depth, set shouldStopSoon to true.
535 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
536 (-[WebHostedNetscapePluginView shouldStop]):
539 2009-02-12 Brady Eidson <beidson@apple.com>
541 Reviewed by Kevin Decker
543 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
545 * WebCoreSupport/WebFrameLoaderClient.mm:
546 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
549 2009-02-12 Anders Carlsson <andersca@apple.com>
551 Reviewed by Kevin Decker.
553 <rdar://problem/6579412>
554 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
556 * Plugins/WebNetscapePluginView.h:
557 * Plugins/WebNetscapePluginView.mm:
558 (-[WebNetscapePluginView userAgent]):
559 Apply workaround for Silverlight workaround.
561 (-[WebNetscapePluginView _createPlugin]):
562 Check if the plug-in that we're creating is the silverlight plug-in.
564 2009-02-12 Brady Eidson <beidson@apple.com>
566 Reviewed by Darin Adler
568 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
570 * History/WebBackForwardList.mm:
571 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
572 (-[WebBackForwardList finalize]): Ditto.
574 * Misc/WebIconFetcher.mm:
575 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
576 (-[WebIconFetcher finalize]): Ditto.
578 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
579 (-[WebEditCommand initWithEditCommand:]):
580 (-[WebEditCommand dealloc]):
581 (-[WebEditCommand finalize]):
582 (-[WebEditCommand command]):
584 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
585 (-[WebArchivePrivate init]):
586 (-[WebArchivePrivate initWithCoreArchive:]):
587 (-[WebArchivePrivate coreArchive]):
588 (-[WebArchivePrivate setCoreArchive:]):
589 (-[WebArchivePrivate dealloc]):
590 (-[WebArchivePrivate finalize]):
592 * WebView/WebDataSource.mm:
593 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
594 (-[WebDataSourcePrivate finalize]): Ditto.
596 2009-02-12 Brady Eidson <beidson@apple.com>
598 Reviewed by Kevin Decker
600 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
602 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
603 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
604 WebArchive object, things started getting weird.
606 * WebView/WebArchive.mm:
607 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
608 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
609 (-[WebArchivePrivate finalize]): Ditto
610 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
612 2009-02-11 Mark Rowe <mrowe@apple.com>
616 * History/WebHistory.mm:
617 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
619 2009-02-11 Brady Eidson <beidson@apple.com>
621 Reviewed by Mark Rowe
623 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
625 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
626 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
627 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
629 * History/WebHistory.mm:
630 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
631 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
632 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
633 recent entry for a given URL will be used.
634 (-[WebHistoryPrivate addItems:]):
635 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
637 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
639 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
640 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
642 Reviewed by Timothy Hatcher.
644 * WebCoreSupport/WebInspectorClient.h:
645 * WebCoreSupport/WebInspectorClient.mm:
646 (WebInspectorClient::hiddenPanels):
648 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
650 Reviewed by Darin Adler.
652 <rdar://problem/6562920> Pasted text should be normalized to NFC
654 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
655 -[NSString precomposedStringWithCanonicalMapping].
657 * WebCoreSupport/WebPasteboardHelper.mm:
658 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
660 * WebView/WebHTMLView.mm:
661 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
662 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
663 precomposed already, and the conversion is performed outside WebKit for those anyway.
665 2009-02-10 John Sullivan <sullivan@apple.com>
667 Reviewed by Dan Bernstein
669 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
670 Negative visit counts stored in History.plist aren't corrected.
672 It's not clear how a huge negative visit count ended up in History.plist, but we can't
673 trust data read from disk so we can at least reset this to something sane. WebCore has
674 no guard against a visit count overflowing an int, but that seems very unlikely to have
677 * History/WebHistoryItem.mm:
678 (-[WebHistoryItem initFromDictionaryRepresentation:]):
679 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
680 weekly visit count is in the dictionary, replace it with 0.
682 2009-02-10 John Sullivan <sullivan@apple.com>
684 Reviewed by Dan Bernstein
686 <https://bugs.webkit.org/show_bug.cgi?id=23891>
687 [WebHistoryItem _setVisitCount:] is unused and should be removed
689 * History/WebHistoryItem.mm:
690 (-[WebHistoryItem _setVisitCount:]):
691 removed this unused method, which is a synonym for setVisitCount: that was introduced
692 recently and abandoned even more recently
694 * History/WebHistoryItemInternal.h:
695 removed declaration of _setVisitCount:
697 2009-02-10 Anders Carlsson <andersca@apple.com>
699 Reviewed by Mark Rowe.
701 <rdar://problem/6573916>
702 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
704 * Plugins/Hosted/NetscapePluginHostManager.mm:
705 (WebKit::NetscapePluginHostManager::instantiatePlugin):
706 If we failed to instantiate the plug-in, invalidate the instance proxy.
708 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
709 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
710 (WebKit::NetscapePluginInstanceProxy::invalidate):
711 Remove the instance from the plug-in host's set.
713 (WebKit::NetscapePluginInstanceProxy::destroy):
716 2009-02-09 Mark Rowe <mrowe@apple.com>
718 Reviewed by Dan Bernstein.
720 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
721 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
723 * WebView/WebHTMLView.mm:
724 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
725 yet been initialized if this WebHTMLView was loaded from a nib.
726 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
728 2009-02-09 Eric Seidel <eric@webkit.org>
730 Reviewed by Dave Hyatt.
732 Rename Selection to VisibleSelection to allow us to separate
733 the selections the user works with from the ones used by
735 https://bugs.webkit.org/show_bug.cgi?id=23852
737 * WebView/WebFrame.mm:
738 (-[WebFrame _selectNSRange:]):
739 * WebView/WebView.mm:
740 (-[WebView textIteratorForRect:]):
742 2009-02-06 Anders Carlsson <andersca@apple.com>
744 Reviewed by Kevin Decker.
746 Fix crash when plug-in host dies.
748 * Plugins/Hosted/HostedNetscapePluginStream.mm:
749 (WebKit::HostedNetscapePluginStream::didFail):
751 2009-02-05 Eric Seidel <eric@webkit.org>
753 Reviewed by Justin Garcia.
755 DOMSelection.getRangeAt() returns a different range than the selection
756 https://bugs.webkit.org/show_bug.cgi?id=23601
758 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
760 * WebView/WebFrame.mm:
761 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
762 (-[WebFrame _markDOMRange]):
763 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
764 (-[WebFrame _selectedNSRange]):
765 * WebView/WebHTMLView.mm:
766 (-[WebHTMLView _selectedRange]):
767 (-[WebTextCompleteController doCompletion]):
768 (-[WebHTMLView selectedAttributedString]):
769 * WebView/WebView.mm:
770 (-[WebView textIteratorForRect:]):
771 (-[WebView selectedDOMRange]):
773 2009-02-06 Geoffrey Garen <ggaren@apple.com>
775 Reviewed by Sam Weinig.
777 Part III of <rdar://problem/6552272>.
779 Refactored to use the redirect data WebCore makes available, instead of
780 tracking loading state in WebKit.
782 * History/WebHistory.mm:
783 (-[WebHistoryPrivate dealloc]):
784 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
785 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
786 * History/WebHistoryInternal.h:
787 * WebCoreSupport/WebFrameLoaderClient.h:
788 * WebCoreSupport/WebFrameLoaderClient.mm:
789 (WebFrameLoaderClient::updateGlobalHistory):
790 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
792 2009-02-06 Anders Carlsson <andersca@apple.com>
794 Reviewed by Sam Weinig.
796 <rdar://problem/6562220>
797 CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
799 Make the handling of crashes in the plug-in host more robust.
801 * Plugins/Hosted/NetscapePluginHostProxy.h:
804 * Plugins/Hosted/NetscapePluginHostProxy.mm:
805 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
806 Initialize m_portSet.
808 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
811 (WebKit::NetscapePluginHostProxy::processRequests):
812 Listen for messages on the port set. If we get a message to the port death notification port,
813 then call pluginHostDied. Otherwise, process the message.
815 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
816 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
817 (WebKit::NetscapePluginInstanceProxy::cleanup):
818 Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
820 (WebKit::NetscapePluginInstanceProxy::destroy):
823 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
826 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
827 Call NetscapePluginHostProxy::processRequests.
829 * Plugins/Hosted/ProxyInstance.mm:
830 (WebKit::ProxyInstance::invalidate):
831 Add a null check for the host proxy.
833 2009-02-06 Dan Bernstein <mitz@apple.com>
835 - try to fix the Tiger build
837 * Misc/WebNSArrayExtras.h:
839 2009-02-06 Anders Carlsson <andersca@apple.com>
841 Reviewed by Dan Bernstein.
843 <rdar://problem/6563650>
844 Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
846 * Plugins/WebNetscapePluginView.mm:
847 (-[WebNetscapePluginView loadStream]):
848 (-[WebNetscapePluginView pluginView:receivedData:]):
849 (-[WebNetscapePluginView _shouldCancelSrcStream]):
851 2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
853 Reviewed by Dan Bernstein and Geoff Garen.
855 - WebKit code to track per-day and per-week visit counts in history
857 For now this data is only exposed via SPI for performance reasons.
859 * History/WebHistoryItem.mm:
860 (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
862 (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
863 (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
864 (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
865 (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
866 * History/WebHistoryItemInternal.h: Declare new methods.
867 * History/WebHistoryItemPrivate.h: Ditto.
869 * History/WebHistory.mm:
870 (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
871 the new _recordInitialVisit method instead of setting visit count to 1.
873 * Misc/WebNSArrayExtras.h:
874 * Misc/WebNSArrayExtras.m:
875 (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
876 (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
878 2009-02-05 Aaron Boodman <aa@chromium.org>
880 Reviewed by Dave Hyatt.
882 https://bugs.webkit.org/show_bug.cgi?id=23708
883 Adds documentElementAvailable() callback to FrameLoaderClient.
885 * WebCoreSupport/WebFrameLoaderClient.h:
886 Stub out documentElementAvailable().
887 * WebCoreSupport/WebFrameLoaderClient.mm:
890 2009-02-05 Dan Bernstein <mitz@apple.com>
894 * WebView/WebScriptDebugger.mm:
895 (WebScriptDebugger::initGlobalCallFrame):
897 2009-02-05 Beth Dakin <bdakin@apple.com>
899 Reviewed by John Sullivan and Brady Eidson.
901 Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
902 mail note message doesn't display it in Mail's preview pane
904 This was failing because revision 36962 removed a version of
905 setVerticalScrollingMode that mail calls. This patch simply adds
908 * WebView/WebDynamicScrollBarsView.m:
909 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
911 2009-02-04 Anders Carlsson <andersca@apple.com>
915 * WebView/WebScriptDebugger.mm:
916 (WebScriptDebugger::initGlobalCallFrame):
918 2009-02-04 Anders Carlsson <andersca@apple.com>
920 Reviewed by Sam Weinig.
922 Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
924 Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
926 * Plugins/Hosted/NetscapePluginHostProxy.mm:
932 * Plugins/Hosted/WebKitPluginClient.defs:
933 * Plugins/Hosted/WebKitPluginHost.defs:
935 2009-02-04 Anders Carlsson <andersca@apple.com>
937 Reviewed by Mark Rowe.
941 * WebView/WebScriptDebugger.mm:
942 (WebScriptDebugger::initGlobalCallFrame):
944 2009-02-04 Geoffrey Garen <ggaren@apple.com>
946 Reviewed by Mark Rowe.
948 Part I of <rdar://problem/6552272>.
950 Clear the redirectURLs entry when first visiting a site, so sites that
951 only redirect you the first time you visit them can later learn that
954 * History/WebHistory.mm:
955 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
957 2009-02-04 Timothy Hatcher <timothy@apple.com>
959 Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
961 <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
963 Reviewed by Oliver Hunt.
965 * WebView/WebScriptDebugDelegate.h:
967 2009-02-04 Timothy Hatcher <timothy@apple.com>
969 Switched over from using the WebSafeForwarder for the Script Debug
970 delegate and added high performance CallScriptDebugDelegate functions.
972 <rdar://problem/6508457> Launching widget in Dashcode debugger is
973 super-slow due forwardInvocation: calling debug delegate
975 Reviewed by Oliver Hunt.
977 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
978 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
979 * WebView/WebScriptDebugger.mm:
980 (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
981 (WebScriptDebugger::sourceParsed): Ditto.
982 (WebScriptDebugger::callEvent): Ditto.
983 (WebScriptDebugger::atStatement): Ditto.
984 (WebScriptDebugger::returnEvent): Ditto.
985 (WebScriptDebugger::exception): Ditto.
986 * WebView/WebView.mm:
987 (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
988 (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
989 method implementations for the script debug delegate. Also caches what
990 didParseSource method to use.
991 (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
992 WebScriptDebugDelegateImplementations structure.
993 (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
994 (CallDelegate): Added more overloaded versions that take different arguments.
995 (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
996 * WebView/WebViewInternal.h:
998 2009-02-03 Simon Fraser <simon.fraser@apple.com>
1000 Reviewed by Dave Hyatt
1002 https://bugs.webkit.org/show_bug.cgi?id=23365
1004 Hook up accelerated compositing layers the native
1007 * WebCoreSupport/WebChromeClient.h:
1008 * WebCoreSupport/WebChromeClient.mm:
1009 (WebChromeClient::attachRootGraphicsLayer):
1010 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1011 New methods to hook up the root GraphicsLayer to the native
1012 view system, and to synchronize layer changes with view-based
1013 drawing when layers come and go.
1015 * WebView/WebHTMLView.mm:
1016 (-[WebHTMLViewPrivate clear]):
1017 Clear the pointer to layerHostingView.
1019 (-[WebHTMLView _setAsideSubviews]):
1020 (-[WebHTMLView willRemoveSubview:]):
1021 Keep the special layer-hosting view in the subviews even
1022 when the rest of the subviews are ripped out for
1025 (-[WebHTMLView _isUsingAcceleratedCompositing]):
1026 New utility method for DumpRenderTree to know if we're
1029 (-[WebHTMLView drawRect:]):
1030 Call -disableScreenUpdatesUntilFlush if we have to
1031 synchronize layer changes with painting.
1033 (-[WebHTMLView attachRootLayer:]):
1034 (-[WebHTMLView detachRootLayer]):
1035 Attach and detach the root GraphicsLayer.
1037 * WebView/WebViewInternal.h:
1038 * WebView/WebHTMLViewInternal.h:
1039 * WebView/WebHTMLViewPrivate.h:
1040 New method declarations.
1042 * WebView/WebView.mm:
1043 (-[WebView _needsOneShotDrawingSynchronization]):
1044 (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1045 Set the flag to say if we need to synchronize layer
1046 changes and painting on the next -drawRect: call.
1048 (-[WebView viewWillMoveToWindow:]):
1049 (-[WebView viewDidMoveToWindow]):
1050 Call new notifications that the view was added to or removed from
1051 the window, which are required by the layer hosting mechanism.
1053 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1057 * Plugins/WebPluginController.mm:
1058 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1060 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1062 Reviewed by Sam Weinig.
1064 Track redirects in global history.
1066 * History/WebHistory.mm:
1067 (-[WebHistoryPrivate dealloc]):
1068 (-[WebHistoryPrivate lastVisitedEntry]):
1069 (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1070 entry in case we're asked to add redirect information to it later.
1072 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1073 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1074 information in global history.
1076 * History/WebHistoryInternal.h:
1077 * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1079 * WebCoreSupport/WebFrameLoaderClient.mm:
1080 (WebFrameLoaderClient::updateGlobalHistory):
1081 (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1082 information in global history.
1084 * WebView/WebFrame.mm:
1085 (-[WebFrame loadRequest:]):
1086 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1087 * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1089 2009-02-02 Anders Carlsson <andersca@apple.com>
1091 Reviewed by Dan Bernstein.
1093 Work around a limitation in MIG where two functions can't have the same name even if they're
1094 not in the same subsystem.
1096 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1097 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1098 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1099 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1100 * Plugins/Hosted/WebKitPluginClient.defs:
1101 * Plugins/Hosted/WebKitPluginHost.defs:
1103 2009-02-02 Anders Carlsson <andersca@apple.com>
1105 Reviewed by Sam Weinig.
1107 Implement WKPCGetPluginElementObject.
1109 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1110 (WKPCGetPluginElementNPObject):
1111 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1112 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1113 (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1114 * Plugins/Hosted/WebKitPluginClient.defs:
1115 * Plugins/WebBaseNetscapePluginView.h:
1116 * Plugins/WebBaseNetscapePluginView.mm:
1117 (-[WebBaseNetscapePluginView WebCore::]):
1119 2009-02-02 Anders Carlsson <andersca@apple.com>
1123 * WebView/WebHTMLView.mm:
1125 2009-02-02 Anders Carlsson <andersca@apple.com>
1127 Reviewed by Dan Bernstein.
1129 Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1131 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1132 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1133 (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1134 * Plugins/WebBaseNetscapePluginView.h:
1135 * Plugins/WebBaseNetscapePluginView.mm:
1136 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1137 (-[WebBaseNetscapePluginView _windowClipRect]):
1138 (-[WebBaseNetscapePluginView visibleRect]):
1139 (-[WebBaseNetscapePluginView dataSource]):
1140 * Plugins/WebKitPluginContainerView.h: Removed.
1141 * Plugins/WebKitPluginContainerView.mm: Removed.
1142 * Plugins/WebNetscapePluginView.h:
1143 * Plugins/WebNetscapePluginView.mm:
1144 (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1145 (-[WebNetscapePluginView getVariable:value:]):
1146 * WebCoreSupport/WebFrameLoaderClient.mm:
1147 (WebFrameLoaderClient::createPlugin):
1149 2009-02-02 Anders Carlsson <andersca@apple.com>
1151 Reviewed by Dan Bernstein.
1153 Update for changes to WebCore.
1155 * WebCoreSupport/WebFrameLoaderClient.h:
1156 * WebCoreSupport/WebFrameLoaderClient.mm:
1157 (WebFrameLoaderClient::createPlugin):
1159 2009-02-02 Anders Carlsson <andersca@apple.com>
1161 Reviewed by Oliver Hunt.
1163 When a new Web View was not created, report back to the plug-in host.
1165 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1166 (WebKit::NetscapePluginInstanceProxy::performRequest):
1167 * Plugins/Hosted/WebKitPluginHost.defs:
1169 2009-02-02 Anders Carlsson <andersca@apple.com>
1171 Reviewed by Kevin Decker.
1173 Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1175 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1176 (-[WebHostedNetscapePluginView drawRect:]):
1178 2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
1180 Reviewed by Darin Adler.
1182 Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1184 https://bugs.webkit.org/show_bug.cgi?id=23428
1186 FrameView::forceLayout could be killed but the comment might
1187 contain a value over the the plain FrameView::layout...
1189 Adjust the WebCore/WebKit consumers of these methods.
1191 * WebView/WebFrame.mm:
1192 (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1193 * WebView/WebHTMLView.mm:
1194 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1195 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1197 2009-01-31 John Sullivan <sullivan@apple.com>
1199 https://bugs.webkit.org/show_bug.cgi?id=23665
1201 Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1202 of calling removeObserver with unspecified notifications, or calling removeObserver
1203 multiple times for the same notification.
1205 Reviewed by Darin Adler
1207 * WebView/WebHTMLView.mm:
1208 added observingMouseMovedNotifications, observingSuperviewNotifications, and
1209 observingWindowNotifications as BOOL ivars of _private object
1210 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1211 moved to file-internal section of file, added leading underscore, now bails out
1212 if we aren't observing the relevant notifications, now records that we are no longer
1213 observing the relevant notifications
1214 (-[WebHTMLView _removeSuperviewObservers]):
1215 ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1216 (-[WebHTMLView _removeWindowObservers]):
1218 (-[WebHTMLView close]):
1219 replace general removeObserver: call with three specific calls for all the notifications
1220 that this class actually observes
1221 (-[WebHTMLView addMouseMovedObserver]):
1222 bail out if already observing relevant notifications, now records that we are observing
1223 the relevant notifications
1224 (-[WebHTMLView removeMouseMovedObserver]):
1225 updated for name change
1226 (-[WebHTMLView addSuperviewObservers]):
1227 bail out if already observing relevant notifications, now records that we are observing
1228 the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
1229 to avoid objc dispatch
1230 (-[WebHTMLView addWindowObservers]):
1232 (-[WebHTMLView viewWillMoveToSuperview:]):
1233 updated for name change
1234 (-[WebHTMLView viewWillMoveToWindow:]):
1235 updated for name changes
1237 2009-01-31 Darin Adler <darin@apple.com>
1239 Reviewed by Mark Rowe.
1241 Fix code that assumes all command selectors end in colons.
1242 rdar://problem/6545874
1244 * WebView/WebHTMLView.mm:
1245 (commandNameForSelector): Don't assert, just return a null string, when
1246 the selector doesn't end in a colon.
1248 2009-01-30 Adam Barth <abarth@webkit.org>
1250 Reviewed by Sam Weinig.
1252 Add a pref to disable web security.
1254 * WebView/WebPreferenceKeysPrivate.h:
1255 * WebView/WebPreferencesPrivate.h:
1256 * WebView/WebPreferences.mm:
1257 (+[WebPreferences initialize]):
1258 (-[WebPreferences isWebSecurityEnabled]):
1259 (-[WebPreferences setWebSecurityEnabled:]):
1260 * WebView/WebView.mm:
1261 (-[WebView _preferencesChangedNotification:]):
1263 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1265 Reviewed by Darin Adler.
1267 Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1269 Carry out the move and catch up in two call sites.
1271 * WebView/WebHTMLView.mm:
1272 (-[WebHTMLView _frameOrBoundsChanged]):
1274 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1276 Reviewed by Darin Adler.
1278 isFrameSet was moved from Frame to Document. Update the
1281 * WebView/WebFrame.mm:
1282 (-[WebFrame _isFrameSet]):
1283 * WebView/WebHTMLView.mm:
1284 (-[WebHTMLView knowsPageRange:]):
1286 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1290 * WebView/WebFramePrivate.h:
1292 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1294 Reviewed by Sam Weinig.
1296 Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1297 preparation for setting them differently during a redirect.
1299 * WebView/WebPDFView.mm:
1300 (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1302 2009-01-30 Anders Carlsson <andersca@apple.com>
1304 Reviewed by Sam Weinig.
1306 Fix <rdar://problem/6544048>
1308 Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1310 When the plug-in instance is destroyed, invalidate all proxy instances.
1312 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1313 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1314 (WebKit::NetscapePluginInstanceProxy::destroy):
1315 (WebKit::NetscapePluginInstanceProxy::addInstance):
1316 (WebKit::NetscapePluginInstanceProxy::removeInstance):
1317 * Plugins/Hosted/ProxyInstance.h:
1318 * Plugins/Hosted/ProxyInstance.mm:
1319 (WebKit::ProxyInstance::ProxyInstance):
1320 (WebKit::ProxyInstance::~ProxyInstance):
1321 (WebKit::ProxyInstance::invalidate):
1323 2009-01-30 Anders Carlsson <andersca@apple.com>
1325 Reviewed by Sam Weinig.
1327 Fix <rdar://problem/6490778>.
1329 Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1330 validate IdentifierReps before dereferencing them.
1332 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1334 (WKPCGetStringIdentifier):
1335 (WKPCGetIntIdentifier):
1336 (identifierFromIdentifierRep):
1340 (WKPCRemoveProperty):
1343 (WKPCIdentifierInfo):
1345 2009-01-30 Brady Eidson <beidson@apple.com>
1347 Reviewed by Sam Weinig
1349 Remove FrameLoaderClient code that is now handled by FrameLoader itself
1351 * WebCoreSupport/WebFrameLoaderClient.mm:
1352 (WebFrameLoaderClient::frameLoadCompleted):
1354 2009-01-29 Stephanie Lewis <slewis@apple.com>
1358 Update the order files.
1362 2009-01-29 Sam Weinig <sam@webkit.org>
1364 Reviewed by Anders Carlsson.
1366 Second step in tracking the urls a HistoryItem was redirected through
1367 Add SPI to access the array of redirect urls associated with a HistoryItem.
1369 * History/WebHistoryItem.mm:
1370 (-[WebHistoryItem dictionaryRepresentation]):
1371 (-[WebHistoryItem _redirectURLs]):
1372 * History/WebHistoryItemPrivate.h:
1374 2009-01-29 Anders Carlsson <andersca@apple.com>
1376 Reviewed by Dan Bernstein.
1378 Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
1380 * Plugins/Hosted/NetscapePluginHostProxy.h:
1381 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1382 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1385 (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
1386 If we're modal, we should always bring the plug-in host process to the front.
1388 (WebKit::NetscapePluginHostProxy::beginModal):
1389 Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1391 (WebKit::NetscapePluginHostProxy::endModal):
1392 Remove the observer.
1394 2009-01-29 Sam Weinig <sam@webkit.org>
1396 Reviewed by Mark Rowe.
1398 First step in tracking the urls a HistoryItem was redirected through.
1400 * History/WebHistoryItem.mm:
1401 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1402 (-[WebHistoryItem dictionaryRepresentation]):
1403 * Misc/WebNSDictionaryExtras.h:
1404 * Misc/WebNSDictionaryExtras.m:
1405 (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1407 2009-01-29 Anders Carlsson <andersca@apple.com>
1409 Reviewed by Sam Weinig.
1411 Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1413 * Plugins/Hosted/NetscapePluginHostManager.h:
1414 * Plugins/Hosted/NetscapePluginHostManager.mm:
1415 (WebKit::NetscapePluginHostManager::hostForPackage):
1416 Get the current PSN and pass it to spawnPluginHost.
1418 (WebKit::NetscapePluginHostManager::spawnPluginHost):
1419 Pass the PSN to the "check in" function.
1421 * Plugins/Hosted/NetscapePluginHostProxy.h:
1422 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1423 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1425 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1426 Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
1428 (WebKit::NetscapePluginHostProxy::beginModal):
1429 (WebKit::NetscapePluginHostProxy::endModal):
1430 (WebKit::NetscapePluginHostProxy::setModal):
1431 Split out the code that does all of the work into beginModal and endModal methods.
1433 * Plugins/Hosted/WebKitPluginHost.defs:
1434 * Plugins/WebNetscapePluginView.mm:
1435 (-[WebNetscapePluginView loadStream]):
1437 2009-01-29 David Kilzer <ddkilzer@apple.com>
1439 Remove semi-colons from the end of ObjC method implementations
1441 Rubber-stamped by Adam Roben.
1443 $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
1445 * DefaultDelegates/WebDefaultUIDelegate.m:
1446 (-[WebDefaultUIDelegate webView:setResizable:]):
1447 (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
1448 (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
1449 (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
1450 * History/WebBackForwardList.mm:
1451 (-[WebBackForwardList addItem:]):
1452 (-[WebBackForwardList backListWithLimit:]):
1453 (-[WebBackForwardList forwardListWithLimit:]):
1454 * History/WebHistoryItem.mm:
1455 (-[WebHistoryItem alternateTitle]):
1456 (-[WebHistoryItem setViewState:]):
1457 * Misc/WebCoreStatistics.mm:
1458 (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
1459 * Misc/WebKitNSStringExtras.m:
1460 (-[NSString _web_drawAtPoint:font:textColor:]):
1461 * Plugins/WebNetscapePluginView.mm:
1462 (-[WebNetscapePluginView setAttributeKeys:andValues:]):
1463 * WebCoreSupport/WebEditorClient.mm:
1464 (-[WebEditCommand command]):
1465 * WebView/WebFrame.mm:
1466 (-[WebFrame _getVisibleRect:]):
1467 * WebView/WebHTMLRepresentation.mm:
1468 (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
1469 * WebView/WebHTMLView.mm:
1470 (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1471 * WebView/WebPreferences.mm:
1472 (-[WebPreferences setAllowsAnimatedImages:]):
1473 (-[WebPreferences setAutosaves:]):
1474 (-[WebPreferences PDFDisplayMode]):
1475 * WebView/WebView.mm:
1476 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1477 (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1478 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1479 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1480 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1481 (-[WebView _insertNewlineInQuotedContent]):
1483 2009-01-28 Geoffrey Garen <ggaren@apple.com>
1485 Reviewed by Sam Weinig.
1487 Updated for WebCore rename.
1489 * WebView/WebView.mm:
1490 (-[WebView setCustomTextEncodingName:]):
1492 2009-01-28 David Kilzer <ddkilzer@apple.com>
1494 Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
1496 Reviewed by Dan Bernstein.
1498 * Misc/WebNSURLExtras.h:
1499 (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
1500 declaration after the implementation was added in r9258.
1502 2009-01-28 Sam Weinig <sam@webkit.org>
1504 Reviewed by Geoff Garen.
1506 Fix for <rdar://problem/6129678>
1507 REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
1509 * WebView/WebScriptDebugDelegate.mm:
1510 (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
1512 2009-01-27 Anders Carlsson <andersca@apple.com>
1514 Reviewed by Oliver Hunt.
1516 Fix two bugs with Core Animation based plug-ins.
1518 1. The plug-in view was marked as opaque even though it's not.
1519 (This would leave garbage in the plug-in view).
1520 2. The plug-in layer needs to have autoresizing turned on.
1522 * Plugins/WebNetscapePluginView.mm:
1523 (-[WebNetscapePluginView setLayer:]):
1525 2009-01-27 Brady Eidson <beidson@apple.com>
1527 Reviewed by Dan Bernstein
1529 Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
1531 * History/WebHistoryItem.mm:
1533 * WebCoreSupport/WebFrameLoaderClient.h:
1534 * WebCoreSupport/WebFrameLoaderClient.mm:
1535 (WebFrameLoaderClient::savePlatformDataToCachedFrame):
1536 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1539 2009-01-26 Anders Carlsson <andersca@apple.com>
1541 Reviewed by Dan Bernstein.
1543 Add the ability for plug-ins to make WebKit operate in "modal mode"
1545 * Plugins/Hosted/NetscapePluginHostProxy.h:
1546 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1547 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1548 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1549 If the plug-in crashes while we're modal, make sure to leave the modal mode.
1551 (WebKit::NetscapePluginHostProxy::setModal):
1553 * Plugins/Hosted/WebKitPluginClient.defs:
1555 2009-01-26 John Sullivan <sullivan@apple.com>
1557 fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
1558 stuck in the Name field rather than cycling around
1560 Reviewed by Dan Bernstein
1562 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
1563 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
1564 The two static text fields and the last button all had their "next key view" outlets set to the
1565 name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
1566 selectable view have exactly one "next key view" set to it.
1568 2009-01-26 Anders Carlsson <andersca@apple.com>
1570 Reviewed by Sam Weinig.
1572 Add the ability for a plug-in to show or hide the menu bar.
1574 * Plugins/Hosted/NetscapePluginHostProxy.h:
1575 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1576 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1577 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1578 (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
1579 (WKPCSetMenuBarVisible):
1580 * Plugins/Hosted/WebKitPluginClient.defs:
1582 2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
1584 Reviewed by Gavin Barraclough.
1586 Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
1587 <https://bugs.webkit.org/show_bug.cgi?id=23552>
1588 <rdar://problem/6398839>
1590 Dashcode will crash when using the evaluator because it saves a global call
1591 frame, even after global code has finished executing, and then uses this as
1592 a launching pad to execute new JS in the evaluator. The fix is to detect
1593 when Dashcode is attempting to do this and execute code from a global call
1596 * ForwardingHeaders/runtime/Protect.h: Added.
1597 * WebView/WebScriptDebugDelegate.mm:
1598 (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
1599 Added debugger, a WebScriptDebugger* argument.
1600 (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
1601 a stale WebScriptCallFrame to execute new JS and evaluate it starting from
1602 the global object's global call frame instead.
1603 * WebView/WebScriptDebugger.h:
1604 (WebScriptDebugger::globalObject): Added.
1605 (WebScriptDebugger::globalCallFrame): Added.
1606 * WebView/WebScriptDebugger.mm:
1607 (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
1608 (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
1609 so that the global call frame can be saved immediately after being created.
1610 (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
1611 WebScriptCallFrame's _initWithGlobalObject method.
1613 2009-01-26 Anders Carlsson <andersca@apple.com>
1615 Reviewed by Oliver Hunt.
1617 Make WKPCInvoke a simpleroutine.
1619 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1621 * Plugins/Hosted/WebKitPluginClient.defs:
1623 2009-01-26 Anders Carlsson <andersca@apple.com>
1625 Reviewed by Sam Weinig.
1627 Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
1629 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1630 (WKPCBooleanAndDataReply):
1631 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1632 (WebKit::NetscapePluginInstanceProxy::Reply::):
1633 (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
1634 Rename NPObjectInvokeReply to BooleanAndDataReply.
1636 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1637 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1638 Fix a cut and paste error.
1640 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1643 * Plugins/Hosted/ProxyInstance.h:
1644 * Plugins/Hosted/ProxyInstance.mm:
1645 (WebKit::ProxyField::valueFromInstance):
1646 (WebKit::ProxyField::setValueToInstance):
1647 Call the ProxyInstance method.
1649 (WebKit::ProxyInstance::~ProxyInstance):
1650 Release the NPObject.
1652 (WebKit::ProxyInstance::supportsConstruct):
1653 Ask the plug-in host if an instance supports construct.
1655 (WebKit::ProxyInstance::fieldValue):
1656 (WebKit::ProxyInstance::setFieldValue):
1657 Call the plug-in host methods.
1659 * Plugins/Hosted/WebKitPluginHostTypes.h:
1660 Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
1662 2009-01-26 Mark Rowe <mrowe@apple.com>
1666 Remove -Wformat=2 from the warning flags as newer versions of GCC emit
1667 warnings about non-literal format strings for uses of our UI_STRING macro.
1669 * Configurations/Base.xcconfig:
1671 2009-01-26 Mark Rowe <mrowe@apple.com>
1673 Rubber-stamped by Sam Weinig.
1675 Clean up after r40240.
1677 * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
1678 * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
1679 is back in the build.
1681 2009-01-25 Darin Adler <darin@apple.com>
1683 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
1685 2009-01-25 Darin Adler <darin@apple.com>
1687 Discussed with Mark Rowe; not sure he reviewed it.
1689 * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
1690 -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
1692 2009-01-25 Mark Rowe <mrowe@apple.com>
1694 Rubber-stamped by Dan Bernstein.
1696 Improve the consistency of settings in our .xcconfig files.
1698 * Configurations/Base.xcconfig: Only dead code strip the normal variant.
1699 Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
1701 2009-01-25 Darin Adler <darin@apple.com>
1703 Reviewed by Sam Weinig.
1705 Bug 23522: use checked casts for render tree
1706 https://bugs.webkit.org/show_bug.cgi?id=23522
1708 Step one: RenderText.
1710 * WebView/WebRenderNode.mm:
1711 (copyRenderNode): Use toRenderText.
1713 2009-01-23 Brady Eidson <beidson@apple.com>
1715 Rubberstamped by Darin Adler
1717 Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
1719 * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
1720 (WebCachedFramePlatformData::WebCachedFramePlatformData):
1721 * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
1723 * WebCoreSupport/WebFrameLoaderClient.mm:
1724 (WebFrameLoaderClient::savePlatformDataToCachedPage):
1725 (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
1729 2009-01-23 Adele Peterson <adele@apple.com>
1733 Use new linesBoundingBox method instead of
1734 boundingBoxWidth and boundingBoxHeight for RenderText objects.
1736 * WebView/WebRenderNode.mm: (copyRenderNode):
1738 2009-01-23 Anders Carlsson <andersca@apple.com>
1742 * Plugins/Hosted/ProxyInstance.mm:
1743 (WebKit::proxyClass):
1745 2009-01-23 Anders Carlsson <andersca@apple.com>
1749 * Configurations/Base.xcconfig:
1751 2009-01-23 Anders Carlsson <andersca@apple.com>
1753 Reviewed by Sam Weinig.
1755 Turn on -Wmissing-prototypes and fix the resulting warnings.
1757 * Configurations/Base.xcconfig:
1758 * History/WebHistory.mm:
1759 (timeIntervalForBeginningOfDay):
1760 * History/WebHistoryItem.mm:
1761 (historyItemWrappers):
1762 * Misc/WebNSPasteboardExtras.mm:
1764 * WebView/WebFrame.mm:
1765 * WebView/WebScriptDebugger.mm:
1768 2009-01-22 Mark Rowe <mrowe@apple.com>
1770 Rubber-stamped by Anders Carlsson.
1772 Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
1774 Current versions of Xcode only respect it for C and Objective-C files,
1775 and our code doesn't currently compile if it is applied to C++ and
1776 Objective-C++ files.
1778 * Configurations/Base.xcconfig:
1780 2009-01-22 Anders Carlsson <andersca@apple.com>
1782 Reviewed by Sam Weinig.
1784 Add support for Invoke and InvokeDefault. Clean up code.
1786 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1788 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1789 (WebKit::NetscapePluginInstanceProxy::Reply::):
1790 (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
1791 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1792 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1793 * Plugins/Hosted/ProxyInstance.h:
1794 * Plugins/Hosted/ProxyInstance.mm:
1795 (WebKit::ProxyInstance::invoke):
1796 (WebKit::ProxyInstance::invokeMethod):
1797 (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
1798 (WebKit::ProxyInstance::invokeDefaultMethod):
1799 (WebKit::ProxyInstance::methodsNamed):
1800 (WebKit::ProxyInstance::fieldNamed):
1801 * Plugins/Hosted/WebKitPluginClient.defs:
1802 * Plugins/Hosted/WebKitPluginHost.defs:
1803 * Plugins/Hosted/WebKitPluginHostTypes.h:
1805 2009-01-22 Eric Roman <eroman@chromium.og>
1807 Reviewed by Eric Seidel.
1809 https://bugs.webkit.org/show_bug.cgi?id=20806
1810 Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
1812 * History/WebHistoryItem.mm:
1813 (-[WebHistoryItem RSSFeedReferrer]):
1814 (-[WebHistoryItem setRSSFeedReferrer:]):
1816 2009-01-22 Anders Carlsson <andersca@apple.com>
1818 Reviewed by Kevin Decker.
1820 Don't crash or hang when we fail to instantiate a plug-in.
1822 * Plugins/Hosted/NetscapePluginHostManager.mm:
1823 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1824 Return 0 on failure.
1826 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1827 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1828 Null check for the proxy member.
1830 2009-01-21 David Hyatt <hyatt@apple.com>
1832 Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
1834 Reviewed by Eric Seidel and Darin Adler
1836 * WebView/WebRenderNode.mm:
1839 2009-01-21 Anders Carlsson <andersca@apple.com>
1841 Reviewed by Sam Weinig.
1843 More browser->plug-in scripting support.
1845 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1846 (WKPCNPObjectHasPropertyReply):
1847 (WKPCNPObjectHasMethodReply):
1848 (WKPCNPObjectInvokeReply):
1849 MIG reply functions.
1851 (WKPCIdentifierInfo):
1852 Return information about an identifier given its 64-bit value.
1854 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1855 Add new reply structs.
1857 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1858 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1859 Split out code that adds values to the arrays from marshalValue.
1861 (WebKit::NetscapePluginInstanceProxy::marshalValue):
1862 Call addValueToArray.
1864 (WebKit::NetscapePluginInstanceProxy::marshalValues):
1865 Marshal a list of values.
1867 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1868 Actually create a proxy instance.
1870 * Plugins/Hosted/ProxyInstance.h:
1871 * Plugins/Hosted/ProxyInstance.mm:
1872 (WebKit::ProxyClass::methodsNamed):
1873 (WebKit::ProxyClass::fieldNamed):
1874 Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
1876 (WebKit::proxyClass):
1877 Shared proxyClass getter.
1879 (WebKit::ProxyField::ProxyField):
1880 (WebKit::ProxyField::valueFromInstance):
1881 (WebKit::ProxyField::setValueToInstance):
1882 Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
1884 (WebKit::ProxyMethod::ProxyMethod):
1885 (WebKit::ProxyMethod::serverIdentifier):
1886 (WebKit::ProxyMethod::numParameters):
1887 Add a dummy ProxyMethod class.
1889 (WebKit::ProxyInstance::invokeMethod):
1890 Call _WKPHNPObjectInvoke.
1892 (WebKit::ProxyInstance::defaultValue):
1893 (WebKit::ProxyInstance::stringValue):
1894 (WebKit::ProxyInstance::numberValue):
1895 (WebKit::ProxyInstance::booleanValue):
1896 (WebKit::ProxyInstance::valueOf):
1897 Add dummy implementations (taken from CInstance).
1899 (WebKit::ProxyInstance::methodsNamed):
1900 Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
1902 (WebKit::ProxyInstance::fieldNamed):
1903 Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
1905 * Plugins/Hosted/WebKitPluginClient.defs:
1906 * Plugins/Hosted/WebKitPluginHost.defs:
1907 Add new MIG definitions.
1909 2009-01-21 Mark Rowe <mrowe@apple.com>
1911 Reviewed by Tim Hatcher.
1913 Clean up how we force invocations of API that happened on background threads over to the main thread.
1915 This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
1916 and return values back from the function. The new approach is to use a proxy object that forwards an
1917 NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
1920 * Misc/WebNSObjectExtras.h:
1921 * Misc/WebNSObjectExtras.mm:
1922 (-[WebMainThreadInvoker initWithTarget:]):
1923 (-[WebMainThreadInvoker forwardInvocation:]):
1924 (-[WebMainThreadInvoker methodSignatureForSelector:]):
1925 (-[WebMainThreadInvoker handleException:]):
1926 (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
1927 raised back to the WebMainThreadInvoker.
1928 (-[NSObject _webkit_invokeOnMainThread]):
1930 The following methods are updated to use the proxy object to forward methods to the main thread:
1932 * WebView/WebArchive.mm:
1933 (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1934 (-[WebArchive mainResource]):
1935 (-[WebArchive subresources]):
1936 (-[WebArchive subframeArchives]):
1937 * WebView/WebResource.mm:
1938 (-[WebResource data]):
1939 (-[WebResource URL]):
1940 (-[WebResource MIMEType]):
1941 (-[WebResource textEncodingName]):
1942 (-[WebResource frameName]):
1943 (-[WebResource _ignoreWhenUnarchiving]):
1944 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1945 (-[WebResource _initWithData:URL:response:]):
1946 (-[WebResource _suggestedFilename]):
1947 (-[WebResource _response]):
1948 (-[WebResource _stringValue]):
1949 * WebView/WebView.mm:
1950 (-[WebView initWithFrame:frameName:groupName:]):
1951 (-[WebView initWithCoder:]):
1953 2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1955 Reviewed by George Staikos.
1957 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
1959 Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
1960 WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
1962 * WebCoreSupport/WebEditorClient.mm:
1963 (WebEditorClient::textFieldDidBeginEditing):
1964 (WebEditorClient::textFieldDidEndEditing):
1965 (WebEditorClient::textDidChangeInTextField):
1966 (WebEditorClient::doTextFieldCommandFromEvent):
1967 (WebEditorClient::textWillBeDeletedInTextField):
1968 (WebEditorClient::textDidChangeInTextArea):
1970 2009-01-19 Anders Carlsson <andersca@apple.com>
1972 Reviewed by Sam Weinig.
1974 Add and implement GetScriptableNPObject.
1976 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1977 (WKPCGetScriptableNPObjectReply):
1978 Create a new reply struct and set it as the current reply.
1981 Get rid of an unused variable.
1983 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1984 (WebKit::NetscapePluginInstanceProxy::Reply::):
1985 (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
1986 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1987 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1988 Call _WKPHGetScriptableNPObject and wait for a reply.
1990 * Plugins/Hosted/ProxyInstance.h: Added.
1991 * Plugins/Hosted/ProxyInstance.mm: Added.
1994 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1995 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1996 Call NetscapePluginInstanceProxy::createBindingsInstance.
1998 * Plugins/Hosted/WebKitPluginClient.defs:
1999 * Plugins/Hosted/WebKitPluginHost.defs:
2000 Add new declarations.
2002 2009-01-19 Sam Weinig <sam@webkit.org>
2004 Rubber-stamped by Gavin Barraclough.
2006 Remove temporary operator-> from JSValuePtr.
2008 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2009 (WebKit::NetscapePluginInstanceProxy::invoke):
2010 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2011 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2012 * WebView/WebFrame.mm:
2013 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2014 * WebView/WebView.mm:
2015 (aeDescFromJSValue):
2017 2009-01-19 Anders Carlsson <andersca@apple.com>
2019 Reviewed by Sam Weinig.
2021 Make Evaluate an asynchronous method that has a reply method.
2023 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2025 * Plugins/Hosted/WebKitPluginClient.defs:
2026 * Plugins/Hosted/WebKitPluginHost.defs:
2028 2009-01-19 Brady Eidson <beidson@apple.com>
2030 Rubberstamped by Tim Hatcher
2032 Fix long standing typo.
2034 * History/WebBackForwardList.h:
2036 2009-01-19 Mark Rowe <mrowe@apple.com>
2040 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2041 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2042 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2044 2009-01-18 Mark Rowe <mrowe@apple.com>
2046 Reviewed by Anders Carlsson.
2048 Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2049 Bug 23414: Reproducible crash accessing View menu with plugins disabled
2051 * WebView/WebFrame.mm:
2052 (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2054 2009-01-17 David Hyatt <hyatt@apple.com>
2056 Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2057 are done in WebCore instead.
2059 Reviewed by Oliver Hunt
2061 * WebView/WebFrame.mm:
2062 (-[WebFrame _selectedString]):
2063 (-[WebFrame _stringForRange:]):
2065 2009-01-17 Eric Carlson <eric.carlson@apple.com>
2067 Reviewed by Adele Peterson
2069 Complete <rdar://problem/6293969>
2071 * WebCoreSupport/WebSystemInterface.m:
2072 (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2074 2009-01-15 Brady Eidson <beidson@apple.com>
2076 Reviewed by Dan Bernstein
2078 Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2080 * History/WebHistory.mm:
2081 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2082 flag for all loads with an HTTP Method
2084 2009-01-14 Anders Carlsson <andersca@apple.com>
2086 Reviewed by Sam Weinig.
2088 Implement InvokeDefault, Construct, GetProperty and SetProperty.
2090 Fully implement marshalValue.
2092 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2093 (WKPCInvokeDefault):
2097 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2098 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2099 (WebKit::NetscapePluginInstanceProxy::evaluate):
2100 (WebKit::NetscapePluginInstanceProxy::invoke):
2101 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2102 (WebKit::NetscapePluginInstanceProxy::construct):
2103 (WebKit::NetscapePluginInstanceProxy::getProperty):
2104 (WebKit::NetscapePluginInstanceProxy::setProperty):
2105 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2106 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2107 * Plugins/Hosted/WebKitPluginClient.defs:
2109 2009-01-14 Anders Carlsson <andersca@apple.com>
2111 Reviewed by Sam Weinig.
2113 Demarshal arguments and pass them to the JS call.
2115 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2117 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2118 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2119 (WebKit::NetscapePluginInstanceProxy::invoke):
2120 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2121 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2123 2009-01-14 Mark Rowe <mrowe@apple.com>
2125 Reviewed by Timothy Hatcher.
2127 <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2129 Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2132 * WebView/WebArchive.mm:
2133 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2134 (-[WebArchive _initWithArguments:]):
2135 * WebView/WebResource.mm:
2136 (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2138 2009-01-14 Darin Adler <darin@apple.com>
2140 Reviewed by Oliver Hunt.
2142 Fix crash I ran into while printing. I was unable to reproduce it, but also,
2143 it's clear there's no guarantee that the frame will be non-zero in this case,
2144 so it seems fine to check it.
2146 * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2147 and don't do anything with it if it's zero.
2149 2009-01-14 Dan Bernstein <mitz@apple.com>
2151 Reviewed by John Sullivan.
2157 2009-01-12 Anders Carlsson <andersca@apple.com>
2159 Reviewed by Darin Adler.
2161 Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2163 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2164 (WebKit::fromUTF8WithLatin1Fallback):
2165 If the length isn't specified, get it by calling strlen.
2168 Evaluate doesn't take any arguments.
2170 (WKPCGetIntIdentifier):
2171 Call _NPN_GetIntIdentifier.
2173 (identifierFromServerIdentifier):
2174 New helper function that returns a JSC Identifier from an NPIdentifier.
2177 Call identifierFromServerIdentifier.
2179 (WKPCRemoveProperty):
2182 Call NetscapePluginInstanceProxy.
2184 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2185 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2186 (WebKit::NetscapePluginInstanceProxy::removeProperty):
2187 (WebKit::NetscapePluginInstanceProxy::hasProperty):
2188 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2190 * Plugins/Hosted/WebKitPluginClient.defs:
2191 Add new definitions.
2193 2009-01-13 Anders Carlsson <andersca@apple.com>
2197 * WebView/WebView.mm:
2198 (-[WebView _initWithArguments:]):
2200 2009-01-13 Timothy Hatcher <timothy@apple.com>
2202 Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2204 <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2206 Reviewed by Darin Adler.
2208 * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2209 * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2210 * Misc/WebNSObjectExtras.mm:
2211 (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2212 Passes the optional object to the selector.
2213 (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2214 Put the optional object into the arguments dictionary.
2215 (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2216 * WebView/WebResource.mm:
2217 (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2218 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2219 _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2220 * WebView/WebView.mm:
2221 (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2222 (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2223 (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2224 to call _initWithArguments: passing the frame, frameName and groupName.
2225 (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2227 2009-01-12 Gavin Barraclough <barraclough@apple.com>
2229 Reviewed by Oliver Hunt.
2231 Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
2233 * WebView/WebView.mm:
2234 (aeDescFromJSValue):
2236 2009-01-12 Brady Eidson <beidson@apple.com>
2238 Reviewed by Darin Adler
2240 <rdar://problem/6468274> - Track Non-get requests in global history
2242 * History/WebHistory.mm:
2243 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2244 * History/WebHistoryInternal.h:
2246 * History/WebHistoryItem.mm:
2247 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2248 (-[WebHistoryItem dictionaryRepresentation]):
2249 (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2250 * History/WebHistoryItemPrivate.h:
2252 * WebCoreSupport/WebFrameLoaderClient.mm:
2253 (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2255 2009-01-12 Anders Carlsson <andersca@apple.com>
2257 Reviewed by Sam Weinig.
2259 Move marshalling into NetscapePluginInstanceProxy.
2261 Add support for marshallin strings.
2263 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2266 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2267 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2268 (WebKit::NetscapePluginInstanceProxy::evaluate):
2269 (WebKit::NetscapePluginInstanceProxy::invoke):
2270 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2271 * Plugins/Hosted/WebKitPluginHostTypes.h:
2273 2009-01-12 Anders Carlsson <andersca@apple.com>
2275 Reviewed by Sam Weinig.
2277 Implement WKPCInvoke.
2279 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2282 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2283 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2284 (WebKit::NetscapePluginInstanceProxy::idForObject):
2285 (WebKit::NetscapePluginInstanceProxy::invoke):
2286 * Plugins/Hosted/WebKitPluginClient.defs:
2288 2009-01-12 Anders Carlsson <andersca@apple.com>
2290 Reviewed by Sam Weinig.
2292 Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2294 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2296 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2297 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2298 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2299 * Plugins/Hosted/WebKitPluginHostTypes.h:
2301 2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
2303 Reviewed by Darin Adler.
2305 Bug 22861: Turn the FontCache into a singleton
2306 https://bugs.webkit.org/show_bug.cgi?id=22861
2308 * Misc/WebCoreStatistics.mm:
2309 (+[WebCoreStatistics cachedFontDataCount]):
2310 (+[WebCoreStatistics cachedFontDataInactiveCount]):
2311 (+[WebCoreStatistics purgeInactiveFontData]):
2312 Redirected all the static calls to the global FontCache
2315 2009-01-11 Dmitry Titov <dimich@chromium.org>
2317 Reviewed by Darin Adler.
2319 https://bugs.webkit.org/show_bug.cgi?id=23207
2320 Moved currentTime() to from WebCore to WTF.
2322 * WebView/WebFrame.mm: a different header file included.
2324 2009-01-10 Darin Adler <darin@apple.com>
2326 Reviewed by Sam Weinig.
2328 <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2329 because of change to -[HTMLObjectElement data]
2331 * WebView/WebView.mm:
2332 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2333 violation check because I saw this being done off the main thread while testing Mail, and it
2334 caused problems. Put all the one time initialization under a single guard to make things just
2335 a little faster other times, and to make it clearer which things are one-time. Added a call to
2336 the new patchMailRemoveAttributesMethod function.
2337 (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2338 because I assumed it would be slightly better to have a public method name in the violation
2339 message. This calls commonInitialization later, so it will hit that one eventually.
2340 (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2341 (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2342 a WebKit method and removes the patch again on the way out.
2343 (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2344 applies the patch that fixes this bug.
2346 2009-01-09 Dan Bernstein <mitz@apple.com>
2348 Reviewed by Darin Adler.
2350 - fixed <rdar://problem/6234347> Add/change conditional key
2351 bindings for changing paragraph- and character-level writing
2352 direction (to match NSTextView)
2354 * WebView/WebHTMLView.mm:
2355 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
2356 code to validate makeBaseWritingDirectionLeftToRight: and
2357 makeBaseWritingDirectionRightToLeft:.
2358 (writingDirectionKeyBindingsEnabled): Changed this function to
2359 always return YES, except on Tiger and Leopard.
2360 (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
2361 changeBaseWritingDirectionToLTR: to this.
2362 (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
2363 changeBaseWritingDirectionToRTL: to this.
2364 (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
2365 makeBaseWritingDirectionLeftToRight:.
2366 (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
2367 makeBaseWritingDirectionRightToLeft:.
2368 * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
2369 and makeBaseWritingDirectionRightToLeft to
2370 FOR_EACH_RESPONDER_SELECTOR.
2372 2009-01-08 Anders Carlsson <andersca@apple.com>
2374 Reviewed by Sam Weinig.
2376 Add and implement WKPCGetStringIdentifier.
2378 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2379 (WKPCGetStringIdentifier):
2380 * Plugins/Hosted/WebKitPluginClient.defs:
2382 2009-01-08 Stephanie Lewis <slewis@gmail.com>
2386 * WebView/WebTextIterator.mm:
2388 2009-01-08 Anders Carlsson <andersca@apple.com>
2390 Reviewed by Sam Weinig.
2392 Add basic support for evaluating scripts.
2394 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2395 (WebKit::fromUTF8WithLatin1Fallback):
2396 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2397 (WKPCReleaseObject):
2400 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2401 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2402 (WebKit::NetscapePluginInstanceProxy::releaseObject):
2403 (WebKit::NetscapePluginInstanceProxy::evaluate):
2404 * Plugins/Hosted/WebKitPluginClient.defs:
2405 * Plugins/Hosted/WebKitPluginHostTypes.h:
2407 2009-01-08 David Hyatt <hyatt@apple.com>
2409 Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2411 Add a new ChromeClient method for handling exposure of scrolled rects.
2413 Reviewed by Oliver Hunt
2415 * WebCoreSupport/WebChromeClient.h:
2416 * WebCoreSupport/WebChromeClient.mm:
2417 (WebChromeClient::scrollRectIntoView):
2419 2009-01-08 Darin Adler <darin@apple.com>
2421 Reviewed by Tim Hatcher.
2423 Bug 23185: add a currentRange method to the WebTextIterator SPI
2424 https://bugs.webkit.org/show_bug.cgi?id=23185
2425 rdar://problem/6455834
2427 I also noticed a garbage-collection-related threading issue that I fixed, and
2428 that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
2430 * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
2431 category. Added currentTextPointer and currentTextLength.
2433 * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
2434 used _textIterator to be consistent with ObjC rather than C++ naming.
2435 (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
2436 since the finalize method here works with main-thread only WebCore objects.
2437 (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
2438 (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
2439 since I don't think it provides much value.
2440 (-[WebTextIterator atEnd]): Ditto.
2441 (-[WebTextIterator currentRange]): Added.
2442 (-[WebTextIterator currentTextPointer]): Added.
2443 (-[WebTextIterator currentTextLength]): Added.
2444 (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
2445 (-[WebTextIterator currentText]): Ditto.
2447 2009-01-08 Eric Carlson <eric.carlson@apple.com>
2449 Reviewed by Adele Peterson.
2451 Simplify Mac interfaces for drawing media controller elements
2453 <rdar://problem/6293969>
2455 * WebCoreSupport/WebSystemInterface.m:
2456 (InitWebCoreSystemInterface): Update for changes to media controller functions
2458 2009-01-07 Anders Carlsson <andersca@apple.com>
2460 Reviewed by Dan Bernstein.
2464 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2465 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2466 (WebKit::NetscapePluginInstanceProxy::idForObject):
2468 2009-01-07 Anders Carlsson <andersca@apple.com>
2470 Reviewed by Dan Bernstein.
2472 Add a way for a plug-in to get a reference to the Window JS object.
2474 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2475 (WKPCGetWindowNPObject):
2476 Call the appropriate instance.
2478 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2479 Add object ID counter.
2481 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2482 (WebKit::NetscapePluginInstanceProxy::destroy):
2483 Clear the object ID map.
2485 (WebKit::NetscapePluginInstanceProxy::idForObject):
2486 New method that returns a unique ID for a given JS object.
2488 (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2489 Return the object ID for the window JS object.
2491 * Plugins/Hosted/WebKitPluginClient.defs:
2492 Add GetWindowNPObject.
2494 2009-01-07 Darin Adler <darin@apple.com>
2496 Reviewed by Oliver Hunt.
2498 Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
2499 https://bugs.webkit.org/show_bug.cgi?id=23160
2501 * WebView/WebView.mm:
2502 (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
2503 (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
2504 * WebView/WebViewPrivate.h: Ditto.
2506 2009-01-05 Gavin Barraclough <baraclough@apple.com>
2508 Rubber Stamped by Oliver Hunt.
2510 Replace all uses of JSValue* with new wrapper class, JSValuePtr.
2511 See JavaScriptCore/ChangeLog for more detailed description.
2513 * WebView/WebFrame.mm:
2514 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2515 * WebView/WebScriptDebugDelegate.mm:
2516 (-[WebScriptCallFrame _convertValueToObjcValue:]):
2517 (-[WebScriptCallFrame exception]):
2518 (-[WebScriptCallFrame evaluateWebScript:]):
2519 * WebView/WebView.mm:
2520 (aeDescFromJSValue):
2521 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2523 2009-01-06 Pierre-Olivier Latour <pol@apple.com>
2525 Reviewed by Darin Adler.
2527 Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
2529 https://bugs.webkit.org/show_bug.cgi?id=23126
2531 * WebView/WebFrame.mm:
2532 (-[WebFrame _numberOfActiveAnimations]):
2533 * WebView/WebFramePrivate.h:
2535 2009-01-05 David Kilzer <ddkilzer@apple.com>
2537 Add SPI to enable, disable and check state of WebIconDatabase
2539 Reviewed by Darin Adler & Timothy Hatcher.
2541 Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
2542 SPI to make it possible to enable, disable and check the state of
2545 * Misc/WebIconDatabase.mm:
2546 (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
2547 (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
2548 -isEnabled instead of -_isEnabled.
2549 (-[WebIconDatabase iconURLForURL:]): Ditto.
2550 (-[WebIconDatabase retainIconForURL:]): Ditto.
2551 (-[WebIconDatabase releaseIconForURL:]): Ditto.
2552 (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
2553 WebInternal category.
2554 (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
2555 the enabled/disabled state of the icon database.
2556 (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
2557 instead of -_isEnabled.
2558 (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
2560 (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
2561 observers when the icon database is disabled.
2562 * Misc/WebIconDatabaseInternal.h: Added declarations for
2563 -_startUpIconDatabase and -_shutDownIconDatabase.
2564 * Misc/WebIconDatabasePrivate.h: Added declarations for
2565 -isEnabled and -setEnabled:.
2567 2009-01-05 Brady Eidson <beidson@apple.com>
2569 Reviewed by Jon Honeycutt
2571 Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
2573 * History/WebHistoryItem.mm:
2574 (-[WebHistoryItem _setLastVisitWasFailure:]):
2575 * History/WebHistoryItemPrivate.h:
2577 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2579 Another blind mac build fix
2581 * WebCoreSupport/WebChromeClient.mm:
2582 (WebChromeClient::contentsSizeChanged):
2584 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2588 * WebCoreSupport/WebChromeClient.mm:
2590 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2594 * WebCoreSupport/WebChromeClient.h:
2596 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2598 Reviewed by George Staikos.
2600 Build fix for contentsSizeChanged
2602 * WebCoreSupport/WebChromeClient.h:
2603 * WebCoreSupport/WebChromeClient.mm:
2604 (WebChromeClient::contentsSizeChanged):
2606 2009-01-02 Darin Adler <darin@apple.com>
2608 Reviewed by Sam Weinig.
2610 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2611 inside its web view when resizing its window
2612 https://bugs.webkit.org/show_bug.cgi?id=23072
2613 rdar://problem/6368028
2615 The first attempt at fixing this did not work.
2616 This time I was able to reproduce the bug and test the fix.
2618 * WebCoreSupport/WebFrameLoaderClient.mm:
2619 (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
2620 function names around a bit to make even less code at the call site.
2621 (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
2622 Dictionary application in here.
2623 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
2624 applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
2625 when the script is cached. This fixes one of the two problems with the initial
2626 patch; the other fix is in WebCore.
2627 (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
2628 applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
2630 * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
2632 2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2634 Reviewed by Darin Adler.
2636 Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
2637 <https://bugs.webkit.org/show_bug.cgi?id=23060>
2638 <rdar://problem/6467830>
2640 After r38629, all keyboard events get sent by Editor to the EditorClient, even
2641 if the selection is not editable. If the event's command is unsupported by
2642 WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
2643 was not. When using the page up / page down keys, the events generated are of
2644 the form scrollPageUp rather than movePageUp, so they are unsupported by
2645 WebHTMLView and cause this bug to occur.
2647 * WebView/WebHTMLView.mm:
2648 (-[WebHTMLView doCommandBySelector:]):
2650 2009-01-02 Darin Adler <darin@apple.com>
2652 Reviewed by Oliver Hunt.
2654 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2655 https://bugs.webkit.org/show_bug.cgi?id=23072
2656 rdar://problem/6368028
2658 * WebCoreSupport/WebFrameLoaderClient.mm:
2659 (isAppleDictionaryApplication): Added.
2660 (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
2661 a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
2662 (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
2663 apply the quirk when the relevant script is loaded.
2665 2008-12-26 Dan Bernstein <mitz@apple.com>
2667 Reviewed by Sam Weinig.
2669 - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
2670 global history after a successful visit
2672 * History/WebHistory.mm:
2673 (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
2674 update the wasFailure flag on the HistoryItem.
2676 2008-12-23 Darin Adler <darin@apple.com>
2678 Reviewed by Alexey Proskuryakov (a slightly earlier version).
2680 - fix https://bugs.webkit.org/show_bug.cgi?id=22976
2681 crash due to Mail's use of WebArchive and WebResource on non-main thread
2683 * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
2684 WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
2685 * Misc/WebKitLogging.m: Ditto.
2687 * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
2688 main thread workaround.
2690 * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
2691 which performs a selector on the main thread, waits for it to complete, and then
2692 returns the value on the caller thread.
2693 * Misc/WebNSObjectExtras.mm: Added.
2695 * WebView/WebArchive.mm:
2696 (-[WebArchive init]): Added WebCoreThreadViolationCheck.
2697 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
2698 initialization on main thread if needMailThreadWorkaround is true.
2699 Also added WebCoreThreadViolationCheck.
2700 (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
2701 (-[WebArchive mainResource]): Get property on main thread if
2702 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2703 (-[WebArchive subresources]): Ditto.
2704 (-[WebArchive subframeArchives]): Ditto.
2705 (-[WebArchive data]): Ditto.
2706 (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
2707 (-[WebArchive _coreLegacyWebArchive]): Ditto.
2708 (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
2709 version of initWithMainResource above.
2711 * WebView/WebResource.mm:
2712 (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
2713 (-[WebResource data]): Get property on main thread if
2714 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2715 (-[WebResource URL]): Ditto.
2716 (-[WebResource MIMEType]): Ditto.
2717 (-[WebResource textEncodingName]): Ditto.
2718 (-[WebResource frameName]): Ditto.
2719 (-[WebResource _ignoreWhenUnarchiving]): Ditto.
2720 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2721 Perform initialization on main thread if needMailThreadWorkaround is true.
2722 Also added WebCoreThreadViolationCheck.
2723 (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
2724 (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
2725 getting at coreResource directly.
2726 (-[WebResource _response]): Get property on main thread if
2727 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2728 (-[WebResource _stringValue]): Ditto.
2729 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
2730 (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
2731 version of _initWithData above.
2733 * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
2734 clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
2735 and the needMainThreadWorkaround helper function.
2737 * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
2738 file. This probably fixes clean builds.
2739 * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
2741 * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
2742 since it's not actually used.
2743 * WebView/WebDataSource.mm: Ditto.
2744 * WebView/WebHTMLRepresentation.mm: Ditto.
2746 2008-12-23 Darin Adler <darin@apple.com>
2748 Reviewed by Dan Bernstein.
2750 - fix https://bugs.webkit.org/show_bug.cgi?id=22979
2751 crash seen in -[WebView drawsBackground] when quitting
2752 <rdar://problem/6464601>
2754 * WebView/WebView.mm:
2755 (-[WebView drawsBackground]): Added comment and a null check for _private.
2757 2008-12-22 Kevin Decker <kdecker@apple.com>
2759 Reviewed by Anders Carlsson.
2761 <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
2763 * Plugins/WebBaseNetscapePluginView.mm:
2764 (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
2766 2008-12-19 Geoffrey Garen <ggaren@apple.com>
2768 Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
2770 Added SPI for getting an unsorted vector of all items in history.
2772 * History/WebHistory.h:
2773 * History/WebHistory.mm:
2774 (-[WebHistory allItems]):
2776 2008-12-18 Dan Bernstein <mitz@apple.com>
2778 Reviewed by Sam Weinig.
2780 - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
2781 a new resource load delegae method.
2783 * WebCoreSupport/WebFrameLoaderClient.h:
2784 * WebCoreSupport/WebFrameLoaderClient.mm:
2785 (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
2786 delegate method. If the method is unimplemented, returns true for
2787 backwards compatibility.
2788 * WebView/WebView.mm:
2789 (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
2790 shouldUseCredentialStorageFunc member.
2791 (CallResourceLoadDelegateReturningBoolean): Added.
2792 * WebView/WebViewInternal.h:
2793 * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
2794 -webView:resource:shouldUseCredentialStorageForDataSource:.
2796 2008-12-18 Cameron Zwarich <zwarich@apple.com>
2798 Reviewed by Jonathan Honeycutt.
2800 Fix an apparent typo in r39385 that is causing lots of crashes.
2802 * WebCoreSupport/WebFrameLoaderClient.mm:
2803 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2805 2008-12-18 Brady Eidson <beidson@apple.com>
2807 Reviewed by John Sullivan
2809 Initial visit to a website creates history items that start with a visit count of
2812 * History/WebHistory.mm:
2813 (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
2815 * History/WebHistoryItem.mm:
2816 (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
2817 * History/WebHistoryItemInternal.h:
2819 2008-12-18 Sam Weinig <sam@webkit.org>
2821 Reviewed by John Sullivan.
2823 Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
2824 a new private frame load delegate method.
2826 * WebCoreSupport/WebFrameLoaderClient.h:
2827 * WebCoreSupport/WebFrameLoaderClient.mm:
2828 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2829 * WebView/WebView.mm:
2830 (-[WebView _cacheFrameLoadDelegateImplementations]):
2831 * WebView/WebViewInternal.h:
2832 * WebView/WebViewPrivate.h:
2834 2008-12-16 Antti Koivisto <antti@apple.com>
2836 Reviewed by John Sullivan.
2838 Add version check for shift-reload behavior.
2840 * Misc/WebKitVersionChecks.h:
2841 * WebView/WebFrame.mm:
2842 (-[WebFrame reload]):
2844 2008-12-16 Anders Carlsson <andersca@apple.com>
2846 Reviewed by Dan Bernstein.
2848 Start sending keyboard events to the plug-in host.
2850 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2851 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2852 (WebKit::NetscapePluginInstanceProxy::keyEvent):
2853 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2854 (-[WebHostedNetscapePluginView keyDown:]):
2855 (-[WebHostedNetscapePluginView keyUp:]):
2856 * Plugins/Hosted/WebKitPluginHost.defs:
2858 2008-12-16 Anders Carlsson <andersca@apple.com>
2860 Reviewed by Kevin Decker.
2862 <rdar://problem/6450538>
2864 Fix flag enumeration.
2866 * Plugins/Hosted/WebKitPluginHostTypes.h:
2868 2008-12-16 Anders Carlsson <andersca@apple.com>
2870 Reviewed by Kevin Decker.
2872 Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
2874 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2876 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2877 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2878 (WebKit::NetscapePluginInstanceProxy::loadURL):
2879 * Plugins/Hosted/WebKitPluginClient.defs:
2880 * Plugins/Hosted/WebKitPluginHostTypes.h:
2882 2008-12-16 Anders Carlsson <andersca@apple.com>
2884 Reviewed by Kevin Decker.
2886 Add trailing null to headers to avoid a crash in the plug-in host.
2888 * Plugins/Hosted/HostedNetscapePluginStream.mm:
2889 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
2891 2008-12-15 Mark Rowe <mrowe@apple.com>
2893 Rubber-stamped by Cameron Zwarich.
2895 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2897 * Configurations/Base.xcconfig:
2898 * Configurations/DebugRelease.xcconfig:
2900 2008-12-15 Stephanie Lewis <slewis@apple.com>
2904 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2906 2008-12-15 Anders Carlsson <andersca@apple.com>
2908 Reviewed by Sam Weinig.
2910 Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
2911 back into us while it's being instantiated.
2913 * Plugins/Hosted/NetscapePluginHostManager.mm:
2914 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2915 * Plugins/Hosted/NetscapePluginHostProxy.h:
2916 (WebKit::NetscapePluginHostProxy::clientPort):
2917 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2918 (WKPCInstantiatePluginReply):
2919 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2920 (WebKit::NetscapePluginInstanceProxy::Reply::):
2921 (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
2922 (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
2923 (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
2924 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
2925 (WebKit::NetscapePluginInstanceProxy::waitForReply):
2926 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2927 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2928 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2929 * Plugins/Hosted/WebKitPluginClient.defs:
2930 * Plugins/Hosted/WebKitPluginHost.defs:
2932 2008-12-15 Anders Carlsson <andersca@apple.com>
2934 Reviewed by Darin Adler.
2936 Let WebKit generate a plug-in ID instead of having the plug-in host do it.
2938 * Plugins/Hosted/NetscapePluginHostManager.mm:
2939 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2940 Create the plug-in proxy before instantiating the plug-in.
2942 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2943 (WebKit::NetscapePluginInstanceProxy::create):
2944 (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
2945 (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
2946 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2947 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2948 * Plugins/Hosted/WebKitPluginHost.defs:
2950 2008-12-15 Anders Carlsson <andersca@apple.com>
2952 Reviewed by Sam Weinig.
2954 LoadURL doesn't need to be asynchronous.
2956 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2958 * Plugins/Hosted/WebKitPluginClient.defs:
2959 * Plugins/Hosted/WebKitPluginHost.defs:
2961 2008-12-15 Antti Koivisto <antti@apple.com>
2963 Reviewed by Darin Adler.
2965 - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
2966 - Add corresponding IBAction to WebView.
2967 - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
2969 * WebView/WebFrame.h:
2970 * WebView/WebFrame.mm:
2971 (-[WebFrame reload]):
2972 (-[WebFrame reloadFromOrigin]):
2973 * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
2974 * WebView/WebView.h:
2975 * WebView/WebView.mm:
2976 (-[WebView reloadFromOrigin:]):
2978 2008-12-14 Dan Bernstein <mitz@apple.com>
2980 Reviewed by Darin Adler.
2982 - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
2983 should add items to userInfo
2985 * History/WebHistory.mm:
2986 (-[WebHistoryPrivate allItems]): Added this helper method, which returns
2987 all values in the _entriesByURL dictionary.
2988 (-[WebHistory removeAllItems]): Changed to send the array of all items
2989 in the notification.
2991 2008-12-13 Darin Adler <darin@apple.com>
2993 - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
2995 * WebKit.exp: Added the class. We forgot to export it when we added
2996 the WebTextIterator SPI.
2998 2008-12-12 Darin Adler <darin@apple.com>
3000 Rubber stamped by Adam Roben.
3002 - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
3003 login sheet after clicking static text, due to AppKit key loop change
3005 * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
3006 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
3007 * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3008 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3009 Set nextKeyView of the selectable static texts to the editable text.
3012 2008-12-12 Stephanie Lewis <slewis@apple.com>
3014 Reviewed by Geoff Garen.
3018 * WebView/WebView.mm:
3019 (+[WebView _setCacheModel:]):
3021 2008-12-12 Anders Carlsson <andersca@apple.com>
3023 Reviewed by Tim Hatcher.
3025 Don't try to free the dummy "1" port state.
3027 * Plugins/WebNetscapePluginView.mm:
3028 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3029 (-[WebNetscapePluginView updateAndSetWindow]):
3031 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3033 Rubber-stamped by Mark Rowe.
3035 Roll out r39212 due to assertion failures during layout tests, multiple
3036 layout test failures, memory leaks, and obvious incorrectness.
3038 * WebView/WebPreferenceKeysPrivate.h:
3039 * WebView/WebPreferences.mm:
3040 (-[WebPreferences fullDocumentTeardownEnabled]):
3041 * WebView/WebPreferencesPrivate.h:
3043 2008-12-11 Stephanie Lewis <slewis@apple.com>
3047 * WebView/WebView.mm:
3049 2008-12-11 Stephanie Lewis <slewis@apple.com>
3051 Reviewed by Oliver Hunt.
3053 Empty Web cache before quitting a debug build in order
3054 to report accurate CachedResource leaks.
3056 * WebView/WebView.mm:
3057 (-[WebView _close]):
3059 2008-12-11 Anders Carlsson <andersca@apple.com>
3063 * Misc/WebNSDataExtras.h:
3065 2008-12-11 Anders Carlsson <andersca@apple.com>
3067 Reviewed by Cameron Zwarich.
3069 https://bugs.webkit.org/show_bug.cgi?id=22797
3070 REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3072 Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3074 * Plugins/WebBaseNetscapePluginStream.mm:
3075 (WebNetscapePluginStream::destroyStreamWithReason):
3077 2008-12-10 Glenn Wilson <gwilson@google.com>
3079 Reviewed by Adam Roben.
3081 Added new methods for overriding default WebPreference values
3082 and for resetting preferences to their defaults.
3083 https://bugs.webkit.org/show_bug.cgi?id=20534
3085 * WebView/WebPreferenceKeysPrivate.h:
3086 * WebView/WebPreferences.mm:
3087 (-[WebPreferences resetToDefaults]): new method
3088 (-[WebPreferences overridePreference:flag:]): new method
3089 * WebView/WebPreferencesPrivate.h: new method signatures
3091 2008-12-10 Anders Carlsson <andersca@apple.com>
3093 Reviewed by Darin Adler.
3095 Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3097 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3100 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3101 (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3102 Factored out this from ::destroy.
3104 (WebKit::NetscapePluginInstanceProxy::destroy):
3105 Call stopAllStreams().
3107 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3110 (WebKit::NetscapePluginInstanceProxy::loadURL):
3111 Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3113 2008-12-10 Anders Carlsson <andersca@apple.com>
3115 Reviewed by Darin Adler.
3117 Move two NSData category methods to WebNSDataExtras.m.
3119 * Misc/WebNSDataExtras.h:
3120 * Misc/WebNSDataExtras.m:
3121 (-[NSData _web_startsWithBlankLine]):
3122 (-[NSData _web_locationAfterFirstBlankLine]):
3123 * Plugins/WebNetscapePluginView.mm:
3125 2008-12-10 Alice Liu <alice.liu@apple.com>
3127 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3129 Reviewed by Darin Adler.
3131 * Misc/WebNSPasteboardExtras.mm:
3132 Ask image for its file extension instead of falling back on MIME type and file path.
3133 Also moved this code to before setting the pasteboard data so as not to set any if
3134 no extension can be determined.
3135 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3137 * WebView/WebHTMLView.mm:
3138 Fixed a separate but related long-standing bug of how the filename for the promised
3139 drag data is determined by asking the image for a proper file extension.
3140 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3142 2008-12-09 Anders Carlsson <andersca@apple.com>
3144 Reviewed by Darin Adler.
3148 * WebView/WebHTMLView.mm:
3149 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3151 2008-12-09 Anders Carlsson <andersca@apple.com>
3153 Reviewed by Darin Adler.
3155 Implement software rendering of hosted plug-ins.
3157 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3158 (WKPCInvalidateRect):
3159 New MiG function. This is called by the plug-in host when it has drawn something.
3161 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3162 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3163 (-[WebHostedNetscapePluginView createPlugin]):
3164 Create a software renderer.
3166 (-[WebHostedNetscapePluginView destroyPlugin]):
3167 Destroy the software renderer.
3169 (-[WebHostedNetscapePluginView drawRect:]):
3170 Draw using the software renderer.
3172 * Plugins/Hosted/WebKitPluginClient.defs:
3175 2008-12-09 Brett Wilson <brettw@chromium.org>
3177 Reviewed by Dave Hyatt.
3179 https://bugs.webkit.org/show_bug.cgi?id=22177
3181 Add a callback on ChromeClient that the state of form elements on
3182 the page has changed. This is to allow clients implementing session
3183 saving to know when the current state is dirty.
3185 * WebCoreSupport/WebChromeClient.h:
3186 (WebChromeClient::formStateDidChange):
3188 2008-12-09 Anders Carlsson <andersca@apple.com>
3190 Reviewed by Dan Bernstein.
3192 Make sure to pause null events for hosted plug-ins as well.
3194 * WebView/WebHTMLView.mm:
3195 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3197 2008-12-09 Anders Carlsson <andersca@apple.com>
3199 Reviewed by Darin Adler.
3201 * Plugins/Hosted/NetscapePluginHostProxy.h:
3202 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3203 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3204 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3205 Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3207 2008-12-09 Timothy Hatcher <timothy@apple.com>
3209 Implement a few methods needed to keep Dictionary.app working on Leopard.
3211 <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3212 Developer Preview might break Dictionary
3214 Reviewed by Dan Bernstein.
3216 * WebView/WebFrame.mm:
3217 (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3218 (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3219 * WebView/WebHTMLView.mm:
3220 (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3221 that Dictionary.app is using.
3223 2008-12-08 Anders Carlsson <andersca@apple.com>
3225 Reviewed by Darin Adler.
3227 More work towards getting NPN_GetURL working.
3229 * Plugins/Hosted/HostedNetscapePluginStream.h:
3230 Inherit from NetscapePlugInStreamLoaderClient.
3232 (WebKit::HostedNetscapePluginStream::streamID):
3233 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3234 (WebKit::HostedNetscapePluginStream::startStream):
3235 Keep track of the resposne URL and the MIME type. Pass the response URL to the
3238 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3239 Disconnect the stream.
3241 (WebKit::HostedNetscapePluginStream::start):
3242 Create a plug-in stream loader and start loading.
3244 (WebKit::HostedNetscapePluginStream::stop):
3247 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3249 Fix the parameter order.
3251 (WKPCCancelLoadURL):
3252 New function that cancels a load of a stream with a given reason.
3254 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3255 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3256 (WebKit::NetscapePluginInstanceProxy::destroy):
3259 (WebKit::NetscapePluginInstanceProxy::pluginStream):
3260 Return a plug-in stream given a stream ID.
3262 (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3263 Remove the stream from the streams map.
3265 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3266 Create a stream and load it.
3268 * Plugins/Hosted/WebKitPluginClient.defs:
3271 * Plugins/Hosted/WebKitPluginHost.defs:
3272 Add responseURL to StartStream.
3274 * Plugins/WebBaseNetscapePluginView.h:
3275 * Plugins/WebBaseNetscapePluginView.mm:
3276 (-[WebBaseNetscapePluginView pluginPackage]):
3277 Move this down to the base class from WebNetscapePluginView.
3279 * Plugins/WebNetscapePluginView.h:
3280 * Plugins/WebNetscapePluginView.mm:
3282 2008-12-08 Dan Bernstein <mitz@apple.com>
3284 Reviewed by John Sullivan.
3286 - WebKit/mac part of tracking the global history item for a WebView
3288 * WebView/WebView.mm:
3289 (-[WebView _globalHistoryItem]): Added. Returns the page's global
3291 * WebView/WebViewPrivate.h:
3293 2008-12-06 Simon Fraser <simon.fraser@apple.com>
3295 Reviewed by Dave Hyatt
3297 https://bugs.webkit.org/show_bug.cgi?id=15671
3299 VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3301 * WebView/WebFrame.mm:
3302 (-[WebFrame _caretRectAtNode:offset:affinity:]):
3304 2008-12-06 David Kilzer <ddkilzer@apple.com>
3306 Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3308 <https://bugs.webkit.org/show_bug.cgi?id=22666>
3310 Reviewed by Darin Adler.
3312 * DOM/WebDOMOperations.mm:
3313 (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3314 ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3316 2008-12-05 Alexey Proskuryakov <ap@webkit.org>
3318 Reviewed by Darin Adler.
3320 <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3321 in Safari before opening a mail message in Mail
3323 * Carbon/CarbonWindowAdapter.m: Removed.
3324 * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3325 (+[CarbonWindowAdapter initialize]):
3326 * History/WebBackForwardList.mm:
3327 (+[WebBackForwardList initialize]):
3328 * History/WebHistoryItem.mm:
3329 (+[WebHistoryItem initialize]):
3330 * Misc/WebElementDictionary.mm:
3331 (+[WebElementDictionary initialize]):
3332 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3333 (+[WebHostedNetscapePluginView initialize]):
3334 * Plugins/WebBaseNetscapePluginView.mm:
3335 * Plugins/WebBasePluginPackage.m: Removed.
3336 * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3337 (+[WebBasePluginPackage initialize]):
3338 * Plugins/WebNetscapePluginView.mm:
3339 (+[WebNetscapePluginView initialize]):
3340 * WebCoreSupport/WebEditorClient.mm:
3341 (+[WebEditCommand initialize]):
3342 * WebCoreSupport/WebFrameLoaderClient.mm:
3343 * WebView/WebArchive.mm:
3344 (+[WebArchivePrivate initialize]):
3345 * WebView/WebDataSource.mm:
3346 (+[WebDataSourcePrivate initialize]):
3347 * WebView/WebHTMLView.mm:
3348 (+[WebHTMLViewPrivate initialize]):
3349 (+[WebHTMLView initialize]):
3350 * WebView/WebResource.mm:
3351 (+[WebResourcePrivate initialize]):
3352 * WebView/WebView.mm:
3353 (+[WebViewPrivate initialize]):
3354 Call JSC::initializeThreading();
3356 2008-12-04 Stephanie Lewis <slewis@apple.com>
3360 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3363 2008-12-04 Anders Carlsson <andersca@apple.com>
3365 Reviewed by Sam Weinig.
3367 More work on streams.
3369 * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
3370 (WebKit::HostedNetscapePluginStream::create):
3371 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
3372 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3373 (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
3374 (WebKit::HostedNetscapePluginStream::startStream):
3375 (WebKit::HostedNetscapePluginStream::didReceiveData):
3376 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3377 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3378 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3379 (WebKit::NetscapePluginInstanceProxy::pluginView):
3380 (WebKit::NetscapePluginInstanceProxy::hostProxy):
3381 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3382 (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
3383 (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
3384 (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
3385 (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
3386 (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
3387 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3388 (WebKit::NetscapePluginInstanceProxy::performRequest):
3389 (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3390 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3391 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3392 * Plugins/Hosted/WebKitPluginHost.defs:
3394 2008-12-04 Anders Carlsson <andersca@apple.com>
3396 Reviewed by Sam Weinig.
3398 Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3399 but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3400 implementations can share more code.
3402 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3404 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3405 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3406 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3407 (WebKit::NetscapePluginInstanceProxy::loadURL):
3408 (WebKit::NetscapePluginInstanceProxy::performRequest):
3409 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3410 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3411 * Plugins/Hosted/WebKitPluginClient.defs:
3412 * Plugins/Hosted/WebKitPluginHost.defs:
3414 2008-12-04 Anders Carlsson <andersca@apple.com>
3416 Reviewed by Dan Bernstein.
3418 Move requestWithURLCString to WebBaseNetscapePluginView.
3420 * Plugins/WebBaseNetscapePluginView.h:
3421 * Plugins/WebBaseNetscapePluginView.mm:
3422 (-[WebBaseNetscapePluginView requestWithURLCString:]):
3423 * Plugins/WebNetscapePluginView.mm:
3425 2008-12-03 Anders Carlsson <andersca@apple.com>
3427 Reviewed by Sam Weinig.
3429 Move WebPluginRequest to its own file.
3431 * Plugins/WebNetscapePluginView.mm:
3432 * Plugins/WebPluginRequest.h: Added.
3433 * Plugins/WebPluginRequest.m: Added.
3434 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3435 (-[WebPluginRequest dealloc]):
3436 (-[WebPluginRequest request]):
3437 (-[WebPluginRequest frameName]):
3438 (-[WebPluginRequest isCurrentEventUserGesture]):
3439 (-[WebPluginRequest sendNotification]):
3440 (-[WebPluginRequest notifyData]):
3442 2008-12-03 Anders Carlsson <andersca@apple.com>
3444 Handle the CA model.
3446 * Plugins/WebNetscapePluginView.mm:
3447 (-[WebNetscapePluginView setWindowIfNecessary]):
3449 2008-12-03 Anders Carlsson <andersca@apple.com>
3451 Reviewed by Kevin Decker.
3453 <rdar://problem/6412293>
3454 Call NPP_SetWindow for CA plug-ins.
3456 * Plugins/WebNetscapePluginView.mm:
3457 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3458 (-[WebNetscapePluginView restorePortState:]):
3459 (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
3460 (-[WebNetscapePluginView updateAndSetWindow]):
3461 (-[WebNetscapePluginView setWindowIfNecessary]):
3463 2008-12-03 Anders Carlsson <andersca@apple.com>
3465 Fix the release build.
3467 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3468 (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
3470 2008-12-03 Anders Carlsson <andersca@apple.com>
3472 Reviewed by Dan Bernstein.
3474 <rdar://problem/6412234>
3475 Don't crash if we can't launch the plug-in host.
3477 * Plugins/Hosted/NetscapePluginHostManager.mm:
3478 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3480 2008-12-02 Anders Carlsson <andersca@apple.com>
3482 Reviewed by Dan Bernstein.
3484 Start processing messages sent to the client port.
3486 * Plugins/Hosted/NetscapePluginHostProxy.h:
3487 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3488 Add a map from ports to plug-in proxies. Turn the set of instances into a map from
3489 pluginID to instance proxy.
3492 Look up the right instance proxy and call status().
3494 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3495 (WebKit::NetscapePluginInstanceProxy::pluginID):
3496 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3497 (WebKit::NetscapePluginInstanceProxy::status):
3500 * Plugins/Hosted/WebKitPluginClient.defs:
3501 Add the plug-in ID to StatusText.
3503 2008-12-02 Gregory Hughes <ghughes@apple.com>
3505 Reviewed by Beth Dakin.
3507 Bug 22513: ZOOM: text selection does not send correct zoom bounds
3509 When zoomed, text selection must send the zoom bounds in flipped
3512 * WebCoreSupport/WebViewFactory.mm:
3513 (-[WebViewFactory accessibilityConvertScreenRect:]):
3515 2008-12-02 Anders Carlsson <andersca@apple.com>
3517 Reviewed by Dan Bernstein.
3519 Create a client mach port and pass it to the plug-in host.
3521 * Plugins/Hosted/NetscapePluginHostManager.h:
3522 * Plugins/Hosted/NetscapePluginHostManager.mm:
3523 (WebKit::NetscapePluginHostManager::hostForPackage):
3524 (WebKit::NetscapePluginHostManager::spawnPluginHost):
3525 * Plugins/Hosted/NetscapePluginHostProxy.h:
3526 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3527 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3528 * Plugins/Hosted/WebKitPluginHost.defs:
3530 2008-12-02 Anders Carlsson <andersca@apple.com>
3532 Reviewed by Sam Weinig.
3534 Let the plug-in views know if the plug-in host crashes.
3536 * Plugins/Hosted/NetscapePluginHostManager.h:
3537 * Plugins/Hosted/NetscapePluginHostManager.mm:
3538 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3539 * Plugins/Hosted/NetscapePluginHostProxy.h:
3540 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3541 (WebKit::NetscapePluginHostProxy::pluginHostDied):
3542 (WebKit::NetscapePluginHostProxy::addPluginInstance):
3543 (WebKit::NetscapePluginHostProxy::removePluginInstance):
3545 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3546 (WebKit::NetscapePluginInstanceProxy::create):
3547 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3548 Keep a pointer to the host proxy.
3550 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3551 Add the instance to the host set.
3553 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3554 Remove the instance form the host set.
3556 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3557 Tell the plug-in view that the plug-in died.
3559 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3560 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3561 (-[WebHostedNetscapePluginView createPlugin]):
3562 Pass the plug-in view to the instantiatePlugin.
3564 (-[WebHostedNetscapePluginView pluginHostDied]):
3565 Handle the plug-in host crashing.
3567 (-[WebHostedNetscapePluginView drawRect:]):
3568 Fill the plug-in view with a nice red shade if the plug-in crashes.
3570 2008-12-01 Anders Carlsson <andersca@apple.com>
3572 Reviewed by Dan Bernstein.
3574 Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
3576 * Plugins/Hosted/NetscapePluginHostManager.h:
3577 * Plugins/Hosted/NetscapePluginHostManager.mm:
3578 (WebKit::NetscapePluginHostManager::pluginHostDied):
3579 Remove the plug-in host from the map.
3581 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3582 NetscapePluginHostProxy is no longer refcounted.
3584 * Plugins/Hosted/NetscapePluginHostProxy.h:
3585 This is no longer refcounted. Add a set of plug-in instances (unused for now).
3587 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3588 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3589 Create a death notification port.
3591 (WebKit::NetscapePluginHostProxy::pluginHostDied):
3592 Tell the manager that we're gone and delete ourselves.
3594 (WebKit::NetscapePluginHostProxy::deathPortCallback):
3595 New CFMachPort callback.
3597 2008-12-01 Anders Carlsson <andersca@apple.com>
3599 Reviewed by Dan Bernstein.
3601 Move instantiatePlugin to NetscapePluginHostManager.