1 2009-03-02 Anders Carlsson <andersca@apple.com>
3 Reviewed by Dan Bernstein.
5 WebKit part of <rdar://problem/6638658>.
7 * Plugins/Hosted/NetscapePluginHostManager.h:
8 * Plugins/Hosted/NetscapePluginHostManager.mm:
9 (WebKit::NetscapePluginHostManager::createPropertyListFile):
10 Spawn the plug-in host and wait for it to create the property list.
12 * Plugins/WebBasePluginPackage.mm:
13 (-[WebBasePluginPackage createPropertyListFile]):
14 Factor code out into a new method.
16 (-[WebBasePluginPackage pListForPath:createFile:]):
17 Call the newly added createPropertyListFile method.
19 * Plugins/WebNetscapePluginPackage.mm:
20 (-[WebNetscapePluginPackage createPropertyListFile]):
21 Tell the plug-in host manager to create a property list file for us.
23 2009-03-02 Sam Weinig <sam@webkit.org>
25 Reviewed by Geoffrey Garen.
27 Fix for <rdar://problem/6507404> Add Geolocation support.
29 This is not yet turned on for any Mac platform.
31 Add SPI to ask the embedding application whether to allow
32 Geolocation for an origin.
34 * WebCoreSupport/WebChromeClient.h:
35 * WebCoreSupport/WebChromeClient.mm:
36 (WebChromeClient::shouldAllowGeolocationForFrame):
37 * WebView/WebUIDelegatePrivate.h:
39 2009-03-02 Anders Carlsson <andersca@apple.com>
43 * Plugins/WebNetscapePluginPackage.mm:
44 (-[WebNetscapePluginPackage _tryLoad]):
46 2009-03-02 Anders Carlsson <andersca@apple.com>
48 Reviewed by John Sullivan, Ada Chan.
50 Factor loading code out into its own method and get rid of a bunch of gotos.
52 * Plugins/WebNetscapePluginPackage.mm:
53 (-[WebNetscapePluginPackage _tryLoad]):
54 (-[WebNetscapePluginPackage load]):
56 2009-03-02 Anders Carlsson <andersca@apple.com>
60 * Plugins/WebNetscapeDeprecatedFunctions.h:
62 2009-03-02 Anders Carlsson <andersca@apple.com>
64 Reviewed by John Sullivan.
66 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
68 * Plugins/WebNetscapePluginPackage.m: Removed.
69 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
71 2009-03-01 Anders Carlsson <andersca@apple.com>
73 Reviewed by Sam Weinig.
75 WebKit side of <rdar://problem/6449689>
77 Pass the visible name to the plug-in host.
79 * Plugins/Hosted/NetscapePluginHostManager.mm:
80 (WebKit::NetscapePluginHostManager::spawnPluginHost):
82 2009-02-27 Alice Liu <alice.liu@apple.com>
84 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
85 extension to images that already have .jpg extension
87 Reviewed by Oliver Hunt.
89 * WebView/WebHTMLView.mm:
90 (-[NSString matchesExtensionEquivalent:]):
91 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
92 Relax the check for the proper extension to allow for known
93 equivalents, special-cased in matchesExtensionEquivalent function.
95 2009-02-27 Anders Carlsson <andersca@apple.com>
97 Reviewed by Geoffrey Garen.
99 <rdar://problem/6631436>
100 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
102 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
104 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
105 (WebKit::NetscapePluginInstanceProxy::evaluate):
107 2009-02-27 Anders Carlsson <andersca@apple.com>
109 Reviewed by Geoffrey Garen.
111 WebKit side of <rdar://problem/6626814>.
113 * Plugins/Hosted/NetscapePluginHostProxy.mm:
115 Make InvokeDefault async.
117 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
118 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
119 Handle passing NPObjects back to the plug-in host.
121 * Plugins/Hosted/ProxyInstance.h:
122 (WebKit::ProxyInstance::objectID):
125 * Plugins/Hosted/WebKitPluginClient.defs:
126 Make InvokeDefault a simpleroutine.
128 2009-02-27 Timothy Hatcher <timothy@apple.com>
130 Fixes an exception by null checking the WebResource before adding it to
131 the subresources array.
133 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
135 Reviewed by Geoff Garen and Anders Carlsson.
137 * WebView/WebDataSource.mm:
138 (-[WebDataSource subresources]): Null check the WebResource before adding it.
140 2009-02-27 Timothy Hatcher <timothy@apple.com>
142 Adds a workaround for Automator creating a WebView from a secondary thread.
144 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
145 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
147 Reviewed by Geoff Garen.
149 * WebView/WebView.mm:
150 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
152 2009-02-27 Adam Barth <abarth@webkit.org>
154 Reviewed by Eric Seidel.
156 Add a preference to reduce the power of file:// URLs.
158 * WebView/WebPreferenceKeysPrivate.h:
159 * WebView/WebPreferences.mm:
160 (+[WebPreferences initialize]):
161 (-[WebPreferences allowUniversalAccessFromFileUrls]):
162 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
163 * WebView/WebPreferencesPrivate.h:
164 * WebView/WebView.mm:
165 (-[WebView _preferencesChangedNotification:]):
167 2009-02-27 Simon Fraser <simon.fraser@apple.com>
169 Reviewed by Anders Carlsson
171 https://bugs.webkit.org/show_bug.cgi?id=24242
173 setCursor(), and resetCursorRects() on Tiger, were using global, not local
174 coordinates for elementAtPoint:
176 * WebView/WebHTMLView.mm:
180 2009-02-27 Adam Barth <abarth@webkit.org>
182 Reviewed by Eric Seidel.
184 Add a preference to reduce the power of file:// URLs.
186 * WebView/WebPreferenceKeysPrivate.h:
187 * WebView/WebPreferences.mm:
188 (+[WebPreferences initialize]):
189 (-[WebPreferences allowUniversalAccessFromFileUrls]):
190 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
191 * WebView/WebPreferencesPrivate.h:
192 * WebView/WebView.mm:
193 (-[WebView _preferencesChangedNotification:]):
195 2009-02-26 Adele Peterson <adele@apple.com>
197 Reviewed by Geoff Garen.
199 Fix for <rdar://problem/6618166>
200 https://bugs.webkit.org/show_bug.cgi?id=24216
201 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
203 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
204 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
205 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
207 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
208 fixed in r36919 and r38570 are still fixed.
210 * WebView/WebHTMLView.mm:
211 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
212 (-[WebHTMLView _isResigningFirstResponder]): Added.
213 * WebView/WebHTMLViewInternal.h:
214 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
215 if the document view is currently resigning first responder.
217 2009-02-25 Anders Carlsson <andersca@apple.com>
219 Reviewed by Kevin Decker.
221 Fix <rdar://problem/6623697>.
223 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
224 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
225 (WebKit::NetscapePluginInstanceProxy::print):
226 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
227 the image into the passed in context.
229 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
230 (-[WebHostedNetscapePluginView drawRect:]):
231 When printing, call NetscapePluginInstanceProxy::print.
233 * Plugins/Hosted/WebKitPluginHost.defs:
235 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
237 Reviewed by Darin Adler.
239 https://bugs.webkit.org/show_bug.cgi?id=24024
240 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
241 archiving a submission to about:blank
243 I don't know how to make an automated test for this bug.
245 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
246 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
248 2009-02-25 Chris Fleizach <cfleizach@apple.com>
250 Reviewed by Beth Dakin.
253 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
254 https://bugs.webkit.org/show_bug.cgi?id=24143
256 * WebView/WebFrame.mm:
257 (-[WebFrame _accessibilityTree]):
259 2009-02-25 Simon Fraser <simon.fraser@apple.com>
261 Build fix with ACCELERATED_COMPOSITING turned on.
263 I missed a spot in my last commit in renaming to
264 _stoppedAcceleratedCompositingForFrame:
266 * WebView/WebHTMLView.mm:
267 (-[WebHTMLView close]):
269 2009-02-25 Simon Fraser <simon.fraser@apple.com>
271 Reviewed by Dan Bernstein
273 https://bugs.webkit.org/show_bug.cgi?id=23854
275 Make an observable property, _isUsingAcceleratedCompositing, on
276 WebView that DumpRenderTree can use to specialize behavior.
278 This is implemented via a count of Frames that are using
279 accelerated compositing.
281 * WebView/WebHTMLView.mm:
282 (-[WebHTMLViewPrivate clear]):
283 (-[WebHTMLView close]):
284 (-[WebHTMLView attachRootLayer:]):
285 (-[WebHTMLView detachRootLayer]):
286 * WebView/WebView.mm:
287 (+[WebView automaticallyNotifiesObserversForKey:]):
288 (-[WebView _startedAcceleratedCompositingForFrame:]):
289 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
290 (-[WebView _isUsingAcceleratedCompositing]):
291 * WebView/WebViewInternal.h:
292 * WebView/WebViewPrivate.h:
294 2009-02-24 Sam Weinig <sam@webkit.org>
296 Reviewed by Geoffrey Garen.
298 Related to <rdar://problem/6590295>
299 Allow disabling javascript: urls.
301 * WebView/WebView.mm:
302 (-[WebView _setJavaScriptURLsAreAllowed:]):
303 * WebView/WebViewPrivate.h:
305 2009-02-24 Mark Rowe <mrowe@apple.com>
307 Reviewed by Oliver Hunt.
309 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
311 * Carbon/CarbonUtils.h:
312 * Carbon/HIWebView.h:
313 * Plugins/WebPlugin.h:
314 * Plugins/WebPluginViewFactory.h:
315 * WebView/WebUIDelegate.h:
317 2009-02-24 Peter Ammon <pammon@apple.com>
319 Reviewed by Mark Rowe.
321 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
323 * WebView/WebHTMLView.mm:
324 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
325 both the send and return type. We should also handle a nil send or return type by ignoring
326 the argument and returning whether we can handle the other type passed in.
328 2009-02-23 Anders Carlsson <andersca@apple.com>
330 Reviewed by Geoffrey Garen and Darin Adler.
332 WebKit side of <rdar://problem/6613151>.
334 Make sure to vm_deallocate all memory we get from MIG callbacks.
336 * Plugins/Hosted/NetscapePluginHostProxy.mm:
337 (DataDeallocator::DataDeallocator):
338 (DataDeallocator::~DataDeallocator):
339 Add a simple deallocator class.
343 (WKPCBooleanAndDataReply):
345 (WKPCGetStringIdentifier):
350 Use the new deallocator class.
352 2009-02-23 Anders Carlsson <andersca@apple.com>
354 Reviewed by Darin Adler.
356 Fix <rdar://problem/6450656>.
358 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
359 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
360 (WebKit::NetscapePluginInstanceProxy::insertText):
361 Add insert text which just calls the new WKPH function.
363 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
364 (-[WebHostedNetscapePluginView inputContext]):
365 Get the input context from the shared input panel.
367 (-[WebHostedNetscapePluginView keyDown:]):
368 Let the shared input panel have a go at the event first.
370 * Plugins/Hosted/WebKitPluginHost.defs:
371 Add new InsertText function.
373 2009-02-23 Mark Rowe <mrowe@apple.com>
375 Fix the build after r41126.
377 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
378 (WebKit::NetscapePluginInstanceProxy::invoke):
379 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
380 (WebKit::NetscapePluginInstanceProxy::construct):
382 2009-02-22 Dan Bernstein <mitz@apple.com>
384 Reviewed by Darin Adler.
386 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
388 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
389 in r30741, and assign the height value, rather than the width, to the
392 2009-02-21 Anders Carlsson <andersca@apple.com>
396 * Plugins/Hosted/WebTextInputWindowController.m:
398 2009-02-20 Anders Carlsson <andersca@apple.com>
400 Reviewed by Dan Bernstein.
402 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
404 * Plugins/Hosted/WebTextInputWindowController.h: Added.
405 * Plugins/Hosted/WebTextInputWindowController.m: Added.
407 2009-02-20 Kevin Decker <kdecker@apple.com>
409 Reviewed by andersca.
411 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
413 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
414 we are trying to set. Depending on what other I/O is going on, it can take some time.
416 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
417 (setMetaData): Added. Calls WKSetMetadataURL().
418 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
420 2009-02-19 Dan Bernstein <mitz@apple.com>
422 Reviewed by Sam Weinig.
424 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
425 Do not send loader callbacks during CSS styling
427 * WebView/WebView.mm:
428 (-[WebView _preferencesChangedNotification:]): Reverted the
429 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
431 2009-02-18 Dan Bernstein <mitz@apple.com>
433 Reviewed by Brady Eidson.
435 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
437 * WebView/WebView.mm:
438 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
439 workaround for this crash in iChat.
441 2009-02-18 Anders Carlsson <andersca@apple.com>
443 Reviewed by Sam Weinig.
445 Fix for <rdar://problem/6542390>
447 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
448 would cause a load to begin.
450 * Plugins/WebNetscapePluginView.mm:
451 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
453 2009-02-18 Adam Roben <aroben@apple.com>
455 Add SPI to get WebKit's custom pointing-hand cursor
457 Reviewed by John Sullivan.
459 * WebView/WebView.mm:
460 (+[WebView _pointingHandCursor]): Added. Returns the custom
461 pointing-hand cursor that WebKit uses.
462 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
464 2009-02-17 Eric Carlson <eric.carlson@apple.com>
466 Reviewed by Antti Koivisto.
468 https://bugs.webkit.org/show_bug.cgi?id=23917
469 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
472 * Plugins/WebPluginContainerPrivate.h:
473 * Plugins/WebPluginController.mm:
474 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
475 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
476 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
478 * WebCoreSupport/WebFrameLoaderClient.mm:
479 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
480 file extension, only want a match for the new MIME type proxy plug-ins should have.
482 2009-02-13 Anders Carlsson <andersca@apple.com>
484 Reviewed by Kevin Decker.
486 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
488 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
489 defer destruction until we're done executing the script.
491 * Plugins/Hosted/NetscapePluginHostProxy.mm:
492 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
493 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
494 Add a simple RAII object for deferring destruction of the plug-in instance.
502 (WKPCRemoveProperty):
505 Use the PluginDestroyDeferrer.
507 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
508 (WebKit::NetscapePluginInstanceProxy::pluginID):
509 Assert that the plug-in ID is not 0 here.
511 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
512 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
513 Initialize the call depth.
515 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
516 Set the plug-in ID to 0 to aid debugging.
518 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
519 Increment the call depth.
521 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
522 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
524 (WebKit::NetscapePluginInstanceProxy::shouldStop):
525 If we're called this with a non-zero call depth, set shouldStopSoon to true.
527 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
528 (-[WebHostedNetscapePluginView shouldStop]):
531 2009-02-12 Brady Eidson <beidson@apple.com>
533 Reviewed by Kevin Decker
535 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
537 * WebCoreSupport/WebFrameLoaderClient.mm:
538 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
541 2009-02-12 Anders Carlsson <andersca@apple.com>
543 Reviewed by Kevin Decker.
545 <rdar://problem/6579412>
546 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
548 * Plugins/WebNetscapePluginView.h:
549 * Plugins/WebNetscapePluginView.mm:
550 (-[WebNetscapePluginView userAgent]):
551 Apply workaround for Silverlight workaround.
553 (-[WebNetscapePluginView _createPlugin]):
554 Check if the plug-in that we're creating is the silverlight plug-in.
556 2009-02-12 Brady Eidson <beidson@apple.com>
558 Reviewed by Darin Adler
560 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
562 * History/WebBackForwardList.mm:
563 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
564 (-[WebBackForwardList finalize]): Ditto.
566 * Misc/WebIconFetcher.mm:
567 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
568 (-[WebIconFetcher finalize]): Ditto.
570 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
571 (-[WebEditCommand initWithEditCommand:]):
572 (-[WebEditCommand dealloc]):
573 (-[WebEditCommand finalize]):
574 (-[WebEditCommand command]):
576 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
577 (-[WebArchivePrivate init]):
578 (-[WebArchivePrivate initWithCoreArchive:]):
579 (-[WebArchivePrivate coreArchive]):
580 (-[WebArchivePrivate setCoreArchive:]):
581 (-[WebArchivePrivate dealloc]):
582 (-[WebArchivePrivate finalize]):
584 * WebView/WebDataSource.mm:
585 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
586 (-[WebDataSourcePrivate finalize]): Ditto.
588 2009-02-12 Brady Eidson <beidson@apple.com>
590 Reviewed by Kevin Decker
592 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
594 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
595 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
596 WebArchive object, things started getting weird.
598 * WebView/WebArchive.mm:
599 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
600 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
601 (-[WebArchivePrivate finalize]): Ditto
602 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
604 2009-02-11 Mark Rowe <mrowe@apple.com>
608 * History/WebHistory.mm:
609 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
611 2009-02-11 Brady Eidson <beidson@apple.com>
613 Reviewed by Mark Rowe
615 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
617 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
618 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
619 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
621 * History/WebHistory.mm:
622 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
623 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
624 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
625 recent entry for a given URL will be used.
626 (-[WebHistoryPrivate addItems:]):
627 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
629 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
631 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
632 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
634 Reviewed by Timothy Hatcher.
636 * WebCoreSupport/WebInspectorClient.h:
637 * WebCoreSupport/WebInspectorClient.mm:
638 (WebInspectorClient::hiddenPanels):
640 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
642 Reviewed by Darin Adler.
644 <rdar://problem/6562920> Pasted text should be normalized to NFC
646 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
647 -[NSString precomposedStringWithCanonicalMapping].
649 * WebCoreSupport/WebPasteboardHelper.mm:
650 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
652 * WebView/WebHTMLView.mm:
653 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
654 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
655 precomposed already, and the conversion is performed outside WebKit for those anyway.
657 2009-02-10 John Sullivan <sullivan@apple.com>
659 Reviewed by Dan Bernstein
661 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
662 Negative visit counts stored in History.plist aren't corrected.
664 It's not clear how a huge negative visit count ended up in History.plist, but we can't
665 trust data read from disk so we can at least reset this to something sane. WebCore has
666 no guard against a visit count overflowing an int, but that seems very unlikely to have
669 * History/WebHistoryItem.mm:
670 (-[WebHistoryItem initFromDictionaryRepresentation:]):
671 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
672 weekly visit count is in the dictionary, replace it with 0.
674 2009-02-10 John Sullivan <sullivan@apple.com>
676 Reviewed by Dan Bernstein
678 <https://bugs.webkit.org/show_bug.cgi?id=23891>
679 [WebHistoryItem _setVisitCount:] is unused and should be removed
681 * History/WebHistoryItem.mm:
682 (-[WebHistoryItem _setVisitCount:]):
683 removed this unused method, which is a synonym for setVisitCount: that was introduced
684 recently and abandoned even more recently
686 * History/WebHistoryItemInternal.h:
687 removed declaration of _setVisitCount:
689 2009-02-10 Anders Carlsson <andersca@apple.com>
691 Reviewed by Mark Rowe.
693 <rdar://problem/6573916>
694 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
696 * Plugins/Hosted/NetscapePluginHostManager.mm:
697 (WebKit::NetscapePluginHostManager::instantiatePlugin):
698 If we failed to instantiate the plug-in, invalidate the instance proxy.
700 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
701 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
702 (WebKit::NetscapePluginInstanceProxy::invalidate):
703 Remove the instance from the plug-in host's set.
705 (WebKit::NetscapePluginInstanceProxy::destroy):
708 2009-02-09 Mark Rowe <mrowe@apple.com>
710 Reviewed by Dan Bernstein.
712 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
713 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
715 * WebView/WebHTMLView.mm:
716 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
717 yet been initialized if this WebHTMLView was loaded from a nib.
718 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
720 2009-02-09 Eric Seidel <eric@webkit.org>
722 Reviewed by Dave Hyatt.
724 Rename Selection to VisibleSelection to allow us to separate
725 the selections the user works with from the ones used by
727 https://bugs.webkit.org/show_bug.cgi?id=23852
729 * WebView/WebFrame.mm:
730 (-[WebFrame _selectNSRange:]):
731 * WebView/WebView.mm:
732 (-[WebView textIteratorForRect:]):
734 2009-02-06 Anders Carlsson <andersca@apple.com>
736 Reviewed by Kevin Decker.
738 Fix crash when plug-in host dies.
740 * Plugins/Hosted/HostedNetscapePluginStream.mm:
741 (WebKit::HostedNetscapePluginStream::didFail):
743 2009-02-05 Eric Seidel <eric@webkit.org>
745 Reviewed by Justin Garcia.
747 DOMSelection.getRangeAt() returns a different range than the selection
748 https://bugs.webkit.org/show_bug.cgi?id=23601
750 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
752 * WebView/WebFrame.mm:
753 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
754 (-[WebFrame _markDOMRange]):
755 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
756 (-[WebFrame _selectedNSRange]):
757 * WebView/WebHTMLView.mm:
758 (-[WebHTMLView _selectedRange]):
759 (-[WebTextCompleteController doCompletion]):
760 (-[WebHTMLView selectedAttributedString]):
761 * WebView/WebView.mm:
762 (-[WebView textIteratorForRect:]):
763 (-[WebView selectedDOMRange]):
765 2009-02-06 Geoffrey Garen <ggaren@apple.com>
767 Reviewed by Sam Weinig.
769 Part III of <rdar://problem/6552272>.
771 Refactored to use the redirect data WebCore makes available, instead of
772 tracking loading state in WebKit.
774 * History/WebHistory.mm:
775 (-[WebHistoryPrivate dealloc]):
776 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
777 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
778 * History/WebHistoryInternal.h:
779 * WebCoreSupport/WebFrameLoaderClient.h:
780 * WebCoreSupport/WebFrameLoaderClient.mm:
781 (WebFrameLoaderClient::updateGlobalHistory):
782 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
784 2009-02-06 Anders Carlsson <andersca@apple.com>
786 Reviewed by Sam Weinig.
788 <rdar://problem/6562220>
789 CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
791 Make the handling of crashes in the plug-in host more robust.
793 * Plugins/Hosted/NetscapePluginHostProxy.h:
796 * Plugins/Hosted/NetscapePluginHostProxy.mm:
797 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
798 Initialize m_portSet.
800 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
803 (WebKit::NetscapePluginHostProxy::processRequests):
804 Listen for messages on the port set. If we get a message to the port death notification port,
805 then call pluginHostDied. Otherwise, process the message.
807 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
808 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
809 (WebKit::NetscapePluginInstanceProxy::cleanup):
810 Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
812 (WebKit::NetscapePluginInstanceProxy::destroy):
815 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
818 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
819 Call NetscapePluginHostProxy::processRequests.
821 * Plugins/Hosted/ProxyInstance.mm:
822 (WebKit::ProxyInstance::invalidate):
823 Add a null check for the host proxy.
825 2009-02-06 Dan Bernstein <mitz@apple.com>
827 - try to fix the Tiger build
829 * Misc/WebNSArrayExtras.h:
831 2009-02-06 Anders Carlsson <andersca@apple.com>
833 Reviewed by Dan Bernstein.
835 <rdar://problem/6563650>
836 Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
838 * Plugins/WebNetscapePluginView.mm:
839 (-[WebNetscapePluginView loadStream]):
840 (-[WebNetscapePluginView pluginView:receivedData:]):
841 (-[WebNetscapePluginView _shouldCancelSrcStream]):
843 2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
845 Reviewed by Dan Bernstein and Geoff Garen.
847 - WebKit code to track per-day and per-week visit counts in history
849 For now this data is only exposed via SPI for performance reasons.
851 * History/WebHistoryItem.mm:
852 (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
854 (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
855 (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
856 (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
857 (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
858 * History/WebHistoryItemInternal.h: Declare new methods.
859 * History/WebHistoryItemPrivate.h: Ditto.
861 * History/WebHistory.mm:
862 (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
863 the new _recordInitialVisit method instead of setting visit count to 1.
865 * Misc/WebNSArrayExtras.h:
866 * Misc/WebNSArrayExtras.m:
867 (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
868 (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
870 2009-02-05 Aaron Boodman <aa@chromium.org>
872 Reviewed by Dave Hyatt.
874 https://bugs.webkit.org/show_bug.cgi?id=23708
875 Adds documentElementAvailable() callback to FrameLoaderClient.
877 * WebCoreSupport/WebFrameLoaderClient.h:
878 Stub out documentElementAvailable().
879 * WebCoreSupport/WebFrameLoaderClient.mm:
882 2009-02-05 Dan Bernstein <mitz@apple.com>
886 * WebView/WebScriptDebugger.mm:
887 (WebScriptDebugger::initGlobalCallFrame):
889 2009-02-05 Beth Dakin <bdakin@apple.com>
891 Reviewed by John Sullivan and Brady Eidson.
893 Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
894 mail note message doesn't display it in Mail's preview pane
896 This was failing because revision 36962 removed a version of
897 setVerticalScrollingMode that mail calls. This patch simply adds
900 * WebView/WebDynamicScrollBarsView.m:
901 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
903 2009-02-04 Anders Carlsson <andersca@apple.com>
907 * WebView/WebScriptDebugger.mm:
908 (WebScriptDebugger::initGlobalCallFrame):
910 2009-02-04 Anders Carlsson <andersca@apple.com>
912 Reviewed by Sam Weinig.
914 Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
916 Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
918 * Plugins/Hosted/NetscapePluginHostProxy.mm:
924 * Plugins/Hosted/WebKitPluginClient.defs:
925 * Plugins/Hosted/WebKitPluginHost.defs:
927 2009-02-04 Anders Carlsson <andersca@apple.com>
929 Reviewed by Mark Rowe.
933 * WebView/WebScriptDebugger.mm:
934 (WebScriptDebugger::initGlobalCallFrame):
936 2009-02-04 Geoffrey Garen <ggaren@apple.com>
938 Reviewed by Mark Rowe.
940 Part I of <rdar://problem/6552272>.
942 Clear the redirectURLs entry when first visiting a site, so sites that
943 only redirect you the first time you visit them can later learn that
946 * History/WebHistory.mm:
947 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
949 2009-02-04 Timothy Hatcher <timothy@apple.com>
951 Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
953 <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
955 Reviewed by Oliver Hunt.
957 * WebView/WebScriptDebugDelegate.h:
959 2009-02-04 Timothy Hatcher <timothy@apple.com>
961 Switched over from using the WebSafeForwarder for the Script Debug
962 delegate and added high performance CallScriptDebugDelegate functions.
964 <rdar://problem/6508457> Launching widget in Dashcode debugger is
965 super-slow due forwardInvocation: calling debug delegate
967 Reviewed by Oliver Hunt.
969 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
970 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
971 * WebView/WebScriptDebugger.mm:
972 (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
973 (WebScriptDebugger::sourceParsed): Ditto.
974 (WebScriptDebugger::callEvent): Ditto.
975 (WebScriptDebugger::atStatement): Ditto.
976 (WebScriptDebugger::returnEvent): Ditto.
977 (WebScriptDebugger::exception): Ditto.
978 * WebView/WebView.mm:
979 (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
980 (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
981 method implementations for the script debug delegate. Also caches what
982 didParseSource method to use.
983 (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
984 WebScriptDebugDelegateImplementations structure.
985 (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
986 (CallDelegate): Added more overloaded versions that take different arguments.
987 (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
988 * WebView/WebViewInternal.h:
990 2009-02-03 Simon Fraser <simon.fraser@apple.com>
992 Reviewed by Dave Hyatt
994 https://bugs.webkit.org/show_bug.cgi?id=23365
996 Hook up accelerated compositing layers the native
999 * WebCoreSupport/WebChromeClient.h:
1000 * WebCoreSupport/WebChromeClient.mm:
1001 (WebChromeClient::attachRootGraphicsLayer):
1002 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1003 New methods to hook up the root GraphicsLayer to the native
1004 view system, and to synchronize layer changes with view-based
1005 drawing when layers come and go.
1007 * WebView/WebHTMLView.mm:
1008 (-[WebHTMLViewPrivate clear]):
1009 Clear the pointer to layerHostingView.
1011 (-[WebHTMLView _setAsideSubviews]):
1012 (-[WebHTMLView willRemoveSubview:]):
1013 Keep the special layer-hosting view in the subviews even
1014 when the rest of the subviews are ripped out for
1017 (-[WebHTMLView _isUsingAcceleratedCompositing]):
1018 New utility method for DumpRenderTree to know if we're
1021 (-[WebHTMLView drawRect:]):
1022 Call -disableScreenUpdatesUntilFlush if we have to
1023 synchronize layer changes with painting.
1025 (-[WebHTMLView attachRootLayer:]):
1026 (-[WebHTMLView detachRootLayer]):
1027 Attach and detach the root GraphicsLayer.
1029 * WebView/WebViewInternal.h:
1030 * WebView/WebHTMLViewInternal.h:
1031 * WebView/WebHTMLViewPrivate.h:
1032 New method declarations.
1034 * WebView/WebView.mm:
1035 (-[WebView _needsOneShotDrawingSynchronization]):
1036 (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1037 Set the flag to say if we need to synchronize layer
1038 changes and painting on the next -drawRect: call.
1040 (-[WebView viewWillMoveToWindow:]):
1041 (-[WebView viewDidMoveToWindow]):
1042 Call new notifications that the view was added to or removed from
1043 the window, which are required by the layer hosting mechanism.
1045 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1049 * Plugins/WebPluginController.mm:
1050 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1052 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1054 Reviewed by Sam Weinig.
1056 Track redirects in global history.
1058 * History/WebHistory.mm:
1059 (-[WebHistoryPrivate dealloc]):
1060 (-[WebHistoryPrivate lastVisitedEntry]):
1061 (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1062 entry in case we're asked to add redirect information to it later.
1064 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1065 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1066 information in global history.
1068 * History/WebHistoryInternal.h:
1069 * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1071 * WebCoreSupport/WebFrameLoaderClient.mm:
1072 (WebFrameLoaderClient::updateGlobalHistory):
1073 (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1074 information in global history.
1076 * WebView/WebFrame.mm:
1077 (-[WebFrame loadRequest:]):
1078 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1079 * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1081 2009-02-02 Anders Carlsson <andersca@apple.com>
1083 Reviewed by Dan Bernstein.
1085 Work around a limitation in MIG where two functions can't have the same name even if they're
1086 not in the same subsystem.
1088 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1089 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1090 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1091 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1092 * Plugins/Hosted/WebKitPluginClient.defs:
1093 * Plugins/Hosted/WebKitPluginHost.defs:
1095 2009-02-02 Anders Carlsson <andersca@apple.com>
1097 Reviewed by Sam Weinig.
1099 Implement WKPCGetPluginElementObject.
1101 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1102 (WKPCGetPluginElementNPObject):
1103 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1104 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1105 (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1106 * Plugins/Hosted/WebKitPluginClient.defs:
1107 * Plugins/WebBaseNetscapePluginView.h:
1108 * Plugins/WebBaseNetscapePluginView.mm:
1109 (-[WebBaseNetscapePluginView WebCore::]):
1111 2009-02-02 Anders Carlsson <andersca@apple.com>
1115 * WebView/WebHTMLView.mm:
1117 2009-02-02 Anders Carlsson <andersca@apple.com>
1119 Reviewed by Dan Bernstein.
1121 Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1123 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1124 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1125 (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1126 * Plugins/WebBaseNetscapePluginView.h:
1127 * Plugins/WebBaseNetscapePluginView.mm:
1128 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1129 (-[WebBaseNetscapePluginView _windowClipRect]):
1130 (-[WebBaseNetscapePluginView visibleRect]):
1131 (-[WebBaseNetscapePluginView dataSource]):
1132 * Plugins/WebKitPluginContainerView.h: Removed.
1133 * Plugins/WebKitPluginContainerView.mm: Removed.
1134 * Plugins/WebNetscapePluginView.h:
1135 * Plugins/WebNetscapePluginView.mm:
1136 (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1137 (-[WebNetscapePluginView getVariable:value:]):
1138 * WebCoreSupport/WebFrameLoaderClient.mm:
1139 (WebFrameLoaderClient::createPlugin):
1141 2009-02-02 Anders Carlsson <andersca@apple.com>
1143 Reviewed by Dan Bernstein.
1145 Update for changes to WebCore.
1147 * WebCoreSupport/WebFrameLoaderClient.h:
1148 * WebCoreSupport/WebFrameLoaderClient.mm:
1149 (WebFrameLoaderClient::createPlugin):
1151 2009-02-02 Anders Carlsson <andersca@apple.com>
1153 Reviewed by Oliver Hunt.
1155 When a new Web View was not created, report back to the plug-in host.
1157 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1158 (WebKit::NetscapePluginInstanceProxy::performRequest):
1159 * Plugins/Hosted/WebKitPluginHost.defs:
1161 2009-02-02 Anders Carlsson <andersca@apple.com>
1163 Reviewed by Kevin Decker.
1165 Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1167 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1168 (-[WebHostedNetscapePluginView drawRect:]):
1170 2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
1172 Reviewed by Darin Adler.
1174 Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1176 https://bugs.webkit.org/show_bug.cgi?id=23428
1178 FrameView::forceLayout could be killed but the comment might
1179 contain a value over the the plain FrameView::layout...
1181 Adjust the WebCore/WebKit consumers of these methods.
1183 * WebView/WebFrame.mm:
1184 (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1185 * WebView/WebHTMLView.mm:
1186 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1187 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1189 2009-01-31 John Sullivan <sullivan@apple.com>
1191 https://bugs.webkit.org/show_bug.cgi?id=23665
1193 Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1194 of calling removeObserver with unspecified notifications, or calling removeObserver
1195 multiple times for the same notification.
1197 Reviewed by Darin Adler
1199 * WebView/WebHTMLView.mm:
1200 added observingMouseMovedNotifications, observingSuperviewNotifications, and
1201 observingWindowNotifications as BOOL ivars of _private object
1202 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1203 moved to file-internal section of file, added leading underscore, now bails out
1204 if we aren't observing the relevant notifications, now records that we are no longer
1205 observing the relevant notifications
1206 (-[WebHTMLView _removeSuperviewObservers]):
1207 ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1208 (-[WebHTMLView _removeWindowObservers]):
1210 (-[WebHTMLView close]):
1211 replace general removeObserver: call with three specific calls for all the notifications
1212 that this class actually observes
1213 (-[WebHTMLView addMouseMovedObserver]):
1214 bail out if already observing relevant notifications, now records that we are observing
1215 the relevant notifications
1216 (-[WebHTMLView removeMouseMovedObserver]):
1217 updated for name change
1218 (-[WebHTMLView addSuperviewObservers]):
1219 bail out if already observing relevant notifications, now records that we are observing
1220 the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
1221 to avoid objc dispatch
1222 (-[WebHTMLView addWindowObservers]):
1224 (-[WebHTMLView viewWillMoveToSuperview:]):
1225 updated for name change
1226 (-[WebHTMLView viewWillMoveToWindow:]):
1227 updated for name changes
1229 2009-01-31 Darin Adler <darin@apple.com>
1231 Reviewed by Mark Rowe.
1233 Fix code that assumes all command selectors end in colons.
1234 rdar://problem/6545874
1236 * WebView/WebHTMLView.mm:
1237 (commandNameForSelector): Don't assert, just return a null string, when
1238 the selector doesn't end in a colon.
1240 2009-01-30 Adam Barth <abarth@webkit.org>
1242 Reviewed by Sam Weinig.
1244 Add a pref to disable web security.
1246 * WebView/WebPreferenceKeysPrivate.h:
1247 * WebView/WebPreferencesPrivate.h:
1248 * WebView/WebPreferences.mm:
1249 (+[WebPreferences initialize]):
1250 (-[WebPreferences isWebSecurityEnabled]):
1251 (-[WebPreferences setWebSecurityEnabled:]):
1252 * WebView/WebView.mm:
1253 (-[WebView _preferencesChangedNotification:]):
1255 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1257 Reviewed by Darin Adler.
1259 Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1261 Carry out the move and catch up in two call sites.
1263 * WebView/WebHTMLView.mm:
1264 (-[WebHTMLView _frameOrBoundsChanged]):
1266 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1268 Reviewed by Darin Adler.
1270 isFrameSet was moved from Frame to Document. Update the
1273 * WebView/WebFrame.mm:
1274 (-[WebFrame _isFrameSet]):
1275 * WebView/WebHTMLView.mm:
1276 (-[WebHTMLView knowsPageRange:]):
1278 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1282 * WebView/WebFramePrivate.h:
1284 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1286 Reviewed by Sam Weinig.
1288 Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1289 preparation for setting them differently during a redirect.
1291 * WebView/WebPDFView.mm:
1292 (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1294 2009-01-30 Anders Carlsson <andersca@apple.com>
1296 Reviewed by Sam Weinig.
1298 Fix <rdar://problem/6544048>
1300 Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1302 When the plug-in instance is destroyed, invalidate all proxy instances.
1304 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1305 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1306 (WebKit::NetscapePluginInstanceProxy::destroy):
1307 (WebKit::NetscapePluginInstanceProxy::addInstance):
1308 (WebKit::NetscapePluginInstanceProxy::removeInstance):
1309 * Plugins/Hosted/ProxyInstance.h:
1310 * Plugins/Hosted/ProxyInstance.mm:
1311 (WebKit::ProxyInstance::ProxyInstance):
1312 (WebKit::ProxyInstance::~ProxyInstance):
1313 (WebKit::ProxyInstance::invalidate):
1315 2009-01-30 Anders Carlsson <andersca@apple.com>
1317 Reviewed by Sam Weinig.
1319 Fix <rdar://problem/6490778>.
1321 Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1322 validate IdentifierReps before dereferencing them.
1324 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1326 (WKPCGetStringIdentifier):
1327 (WKPCGetIntIdentifier):
1328 (identifierFromIdentifierRep):
1332 (WKPCRemoveProperty):
1335 (WKPCIdentifierInfo):
1337 2009-01-30 Brady Eidson <beidson@apple.com>
1339 Reviewed by Sam Weinig
1341 Remove FrameLoaderClient code that is now handled by FrameLoader itself
1343 * WebCoreSupport/WebFrameLoaderClient.mm:
1344 (WebFrameLoaderClient::frameLoadCompleted):
1346 2009-01-29 Stephanie Lewis <slewis@apple.com>
1350 Update the order files.
1354 2009-01-29 Sam Weinig <sam@webkit.org>
1356 Reviewed by Anders Carlsson.
1358 Second step in tracking the urls a HistoryItem was redirected through
1359 Add SPI to access the array of redirect urls associated with a HistoryItem.
1361 * History/WebHistoryItem.mm:
1362 (-[WebHistoryItem dictionaryRepresentation]):
1363 (-[WebHistoryItem _redirectURLs]):
1364 * History/WebHistoryItemPrivate.h:
1366 2009-01-29 Anders Carlsson <andersca@apple.com>
1368 Reviewed by Dan Bernstein.
1370 Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
1372 * Plugins/Hosted/NetscapePluginHostProxy.h:
1373 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1374 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1377 (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
1378 If we're modal, we should always bring the plug-in host process to the front.
1380 (WebKit::NetscapePluginHostProxy::beginModal):
1381 Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1383 (WebKit::NetscapePluginHostProxy::endModal):
1384 Remove the observer.
1386 2009-01-29 Sam Weinig <sam@webkit.org>
1388 Reviewed by Mark Rowe.
1390 First step in tracking the urls a HistoryItem was redirected through.
1392 * History/WebHistoryItem.mm:
1393 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1394 (-[WebHistoryItem dictionaryRepresentation]):
1395 * Misc/WebNSDictionaryExtras.h:
1396 * Misc/WebNSDictionaryExtras.m:
1397 (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1399 2009-01-29 Anders Carlsson <andersca@apple.com>
1401 Reviewed by Sam Weinig.
1403 Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1405 * Plugins/Hosted/NetscapePluginHostManager.h:
1406 * Plugins/Hosted/NetscapePluginHostManager.mm:
1407 (WebKit::NetscapePluginHostManager::hostForPackage):
1408 Get the current PSN and pass it to spawnPluginHost.
1410 (WebKit::NetscapePluginHostManager::spawnPluginHost):
1411 Pass the PSN to the "check in" function.
1413 * Plugins/Hosted/NetscapePluginHostProxy.h:
1414 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1415 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1417 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1418 Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
1420 (WebKit::NetscapePluginHostProxy::beginModal):
1421 (WebKit::NetscapePluginHostProxy::endModal):
1422 (WebKit::NetscapePluginHostProxy::setModal):
1423 Split out the code that does all of the work into beginModal and endModal methods.
1425 * Plugins/Hosted/WebKitPluginHost.defs:
1426 * Plugins/WebNetscapePluginView.mm:
1427 (-[WebNetscapePluginView loadStream]):
1429 2009-01-29 David Kilzer <ddkilzer@apple.com>
1431 Remove semi-colons from the end of ObjC method implementations
1433 Rubber-stamped by Adam Roben.
1435 $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
1437 * DefaultDelegates/WebDefaultUIDelegate.m:
1438 (-[WebDefaultUIDelegate webView:setResizable:]):
1439 (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
1440 (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
1441 (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
1442 * History/WebBackForwardList.mm:
1443 (-[WebBackForwardList addItem:]):
1444 (-[WebBackForwardList backListWithLimit:]):
1445 (-[WebBackForwardList forwardListWithLimit:]):
1446 * History/WebHistoryItem.mm:
1447 (-[WebHistoryItem alternateTitle]):
1448 (-[WebHistoryItem setViewState:]):
1449 * Misc/WebCoreStatistics.mm:
1450 (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
1451 * Misc/WebKitNSStringExtras.m:
1452 (-[NSString _web_drawAtPoint:font:textColor:]):
1453 * Plugins/WebNetscapePluginView.mm:
1454 (-[WebNetscapePluginView setAttributeKeys:andValues:]):
1455 * WebCoreSupport/WebEditorClient.mm:
1456 (-[WebEditCommand command]):
1457 * WebView/WebFrame.mm:
1458 (-[WebFrame _getVisibleRect:]):
1459 * WebView/WebHTMLRepresentation.mm:
1460 (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
1461 * WebView/WebHTMLView.mm:
1462 (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1463 * WebView/WebPreferences.mm:
1464 (-[WebPreferences setAllowsAnimatedImages:]):
1465 (-[WebPreferences setAutosaves:]):
1466 (-[WebPreferences PDFDisplayMode]):
1467 * WebView/WebView.mm:
1468 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1469 (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1470 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1471 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1472 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1473 (-[WebView _insertNewlineInQuotedContent]):
1475 2009-01-28 Geoffrey Garen <ggaren@apple.com>
1477 Reviewed by Sam Weinig.
1479 Updated for WebCore rename.
1481 * WebView/WebView.mm:
1482 (-[WebView setCustomTextEncodingName:]):
1484 2009-01-28 David Kilzer <ddkilzer@apple.com>
1486 Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
1488 Reviewed by Dan Bernstein.
1490 * Misc/WebNSURLExtras.h:
1491 (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
1492 declaration after the implementation was added in r9258.
1494 2009-01-28 Sam Weinig <sam@webkit.org>
1496 Reviewed by Geoff Garen.
1498 Fix for <rdar://problem/6129678>
1499 REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
1501 * WebView/WebScriptDebugDelegate.mm:
1502 (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
1504 2009-01-27 Anders Carlsson <andersca@apple.com>
1506 Reviewed by Oliver Hunt.
1508 Fix two bugs with Core Animation based plug-ins.
1510 1. The plug-in view was marked as opaque even though it's not.
1511 (This would leave garbage in the plug-in view).
1512 2. The plug-in layer needs to have autoresizing turned on.
1514 * Plugins/WebNetscapePluginView.mm:
1515 (-[WebNetscapePluginView setLayer:]):
1517 2009-01-27 Brady Eidson <beidson@apple.com>
1519 Reviewed by Dan Bernstein
1521 Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
1523 * History/WebHistoryItem.mm:
1525 * WebCoreSupport/WebFrameLoaderClient.h:
1526 * WebCoreSupport/WebFrameLoaderClient.mm:
1527 (WebFrameLoaderClient::savePlatformDataToCachedFrame):
1528 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1531 2009-01-26 Anders Carlsson <andersca@apple.com>
1533 Reviewed by Dan Bernstein.
1535 Add the ability for plug-ins to make WebKit operate in "modal mode"
1537 * Plugins/Hosted/NetscapePluginHostProxy.h:
1538 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1539 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1540 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1541 If the plug-in crashes while we're modal, make sure to leave the modal mode.
1543 (WebKit::NetscapePluginHostProxy::setModal):
1545 * Plugins/Hosted/WebKitPluginClient.defs:
1547 2009-01-26 John Sullivan <sullivan@apple.com>
1549 fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
1550 stuck in the Name field rather than cycling around
1552 Reviewed by Dan Bernstein
1554 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
1555 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
1556 The two static text fields and the last button all had their "next key view" outlets set to the
1557 name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
1558 selectable view have exactly one "next key view" set to it.
1560 2009-01-26 Anders Carlsson <andersca@apple.com>
1562 Reviewed by Sam Weinig.
1564 Add the ability for a plug-in to show or hide the menu bar.
1566 * Plugins/Hosted/NetscapePluginHostProxy.h:
1567 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1568 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1569 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1570 (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
1571 (WKPCSetMenuBarVisible):
1572 * Plugins/Hosted/WebKitPluginClient.defs:
1574 2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
1576 Reviewed by Gavin Barraclough.
1578 Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
1579 <https://bugs.webkit.org/show_bug.cgi?id=23552>
1580 <rdar://problem/6398839>
1582 Dashcode will crash when using the evaluator because it saves a global call
1583 frame, even after global code has finished executing, and then uses this as
1584 a launching pad to execute new JS in the evaluator. The fix is to detect
1585 when Dashcode is attempting to do this and execute code from a global call
1588 * ForwardingHeaders/runtime/Protect.h: Added.
1589 * WebView/WebScriptDebugDelegate.mm:
1590 (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
1591 Added debugger, a WebScriptDebugger* argument.
1592 (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
1593 a stale WebScriptCallFrame to execute new JS and evaluate it starting from
1594 the global object's global call frame instead.
1595 * WebView/WebScriptDebugger.h:
1596 (WebScriptDebugger::globalObject): Added.
1597 (WebScriptDebugger::globalCallFrame): Added.
1598 * WebView/WebScriptDebugger.mm:
1599 (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
1600 (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
1601 so that the global call frame can be saved immediately after being created.
1602 (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
1603 WebScriptCallFrame's _initWithGlobalObject method.
1605 2009-01-26 Anders Carlsson <andersca@apple.com>
1607 Reviewed by Oliver Hunt.
1609 Make WKPCInvoke a simpleroutine.
1611 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1613 * Plugins/Hosted/WebKitPluginClient.defs:
1615 2009-01-26 Anders Carlsson <andersca@apple.com>
1617 Reviewed by Sam Weinig.
1619 Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
1621 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1622 (WKPCBooleanAndDataReply):
1623 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1624 (WebKit::NetscapePluginInstanceProxy::Reply::):
1625 (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
1626 Rename NPObjectInvokeReply to BooleanAndDataReply.
1628 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1629 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1630 Fix a cut and paste error.
1632 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1635 * Plugins/Hosted/ProxyInstance.h:
1636 * Plugins/Hosted/ProxyInstance.mm:
1637 (WebKit::ProxyField::valueFromInstance):
1638 (WebKit::ProxyField::setValueToInstance):
1639 Call the ProxyInstance method.
1641 (WebKit::ProxyInstance::~ProxyInstance):
1642 Release the NPObject.
1644 (WebKit::ProxyInstance::supportsConstruct):
1645 Ask the plug-in host if an instance supports construct.
1647 (WebKit::ProxyInstance::fieldValue):
1648 (WebKit::ProxyInstance::setFieldValue):
1649 Call the plug-in host methods.
1651 * Plugins/Hosted/WebKitPluginHostTypes.h:
1652 Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
1654 2009-01-26 Mark Rowe <mrowe@apple.com>
1658 Remove -Wformat=2 from the warning flags as newer versions of GCC emit
1659 warnings about non-literal format strings for uses of our UI_STRING macro.
1661 * Configurations/Base.xcconfig:
1663 2009-01-26 Mark Rowe <mrowe@apple.com>
1665 Rubber-stamped by Sam Weinig.
1667 Clean up after r40240.
1669 * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
1670 * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
1671 is back in the build.
1673 2009-01-25 Darin Adler <darin@apple.com>
1675 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
1677 2009-01-25 Darin Adler <darin@apple.com>
1679 Discussed with Mark Rowe; not sure he reviewed it.
1681 * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
1682 -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
1684 2009-01-25 Mark Rowe <mrowe@apple.com>
1686 Rubber-stamped by Dan Bernstein.
1688 Improve the consistency of settings in our .xcconfig files.
1690 * Configurations/Base.xcconfig: Only dead code strip the normal variant.
1691 Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
1693 2009-01-25 Darin Adler <darin@apple.com>
1695 Reviewed by Sam Weinig.
1697 Bug 23522: use checked casts for render tree
1698 https://bugs.webkit.org/show_bug.cgi?id=23522
1700 Step one: RenderText.
1702 * WebView/WebRenderNode.mm:
1703 (copyRenderNode): Use toRenderText.
1705 2009-01-23 Brady Eidson <beidson@apple.com>
1707 Rubberstamped by Darin Adler
1709 Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
1711 * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
1712 (WebCachedFramePlatformData::WebCachedFramePlatformData):
1713 * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
1715 * WebCoreSupport/WebFrameLoaderClient.mm:
1716 (WebFrameLoaderClient::savePlatformDataToCachedPage):
1717 (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
1721 2009-01-23 Adele Peterson <adele@apple.com>
1725 Use new linesBoundingBox method instead of
1726 boundingBoxWidth and boundingBoxHeight for RenderText objects.
1728 * WebView/WebRenderNode.mm: (copyRenderNode):
1730 2009-01-23 Anders Carlsson <andersca@apple.com>
1734 * Plugins/Hosted/ProxyInstance.mm:
1735 (WebKit::proxyClass):
1737 2009-01-23 Anders Carlsson <andersca@apple.com>
1741 * Configurations/Base.xcconfig:
1743 2009-01-23 Anders Carlsson <andersca@apple.com>
1745 Reviewed by Sam Weinig.
1747 Turn on -Wmissing-prototypes and fix the resulting warnings.
1749 * Configurations/Base.xcconfig:
1750 * History/WebHistory.mm:
1751 (timeIntervalForBeginningOfDay):
1752 * History/WebHistoryItem.mm:
1753 (historyItemWrappers):
1754 * Misc/WebNSPasteboardExtras.mm:
1756 * WebView/WebFrame.mm:
1757 * WebView/WebScriptDebugger.mm:
1760 2009-01-22 Mark Rowe <mrowe@apple.com>
1762 Rubber-stamped by Anders Carlsson.
1764 Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
1766 Current versions of Xcode only respect it for C and Objective-C files,
1767 and our code doesn't currently compile if it is applied to C++ and
1768 Objective-C++ files.
1770 * Configurations/Base.xcconfig:
1772 2009-01-22 Anders Carlsson <andersca@apple.com>
1774 Reviewed by Sam Weinig.
1776 Add support for Invoke and InvokeDefault. Clean up code.
1778 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1780 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1781 (WebKit::NetscapePluginInstanceProxy::Reply::):
1782 (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
1783 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1784 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1785 * Plugins/Hosted/ProxyInstance.h:
1786 * Plugins/Hosted/ProxyInstance.mm:
1787 (WebKit::ProxyInstance::invoke):
1788 (WebKit::ProxyInstance::invokeMethod):
1789 (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
1790 (WebKit::ProxyInstance::invokeDefaultMethod):
1791 (WebKit::ProxyInstance::methodsNamed):
1792 (WebKit::ProxyInstance::fieldNamed):
1793 * Plugins/Hosted/WebKitPluginClient.defs:
1794 * Plugins/Hosted/WebKitPluginHost.defs:
1795 * Plugins/Hosted/WebKitPluginHostTypes.h:
1797 2009-01-22 Eric Roman <eroman@chromium.og>
1799 Reviewed by Eric Seidel.
1801 https://bugs.webkit.org/show_bug.cgi?id=20806
1802 Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
1804 * History/WebHistoryItem.mm:
1805 (-[WebHistoryItem RSSFeedReferrer]):
1806 (-[WebHistoryItem setRSSFeedReferrer:]):
1808 2009-01-22 Anders Carlsson <andersca@apple.com>
1810 Reviewed by Kevin Decker.
1812 Don't crash or hang when we fail to instantiate a plug-in.
1814 * Plugins/Hosted/NetscapePluginHostManager.mm:
1815 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1816 Return 0 on failure.
1818 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1819 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1820 Null check for the proxy member.
1822 2009-01-21 David Hyatt <hyatt@apple.com>
1824 Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
1826 Reviewed by Eric Seidel and Darin Adler
1828 * WebView/WebRenderNode.mm:
1831 2009-01-21 Anders Carlsson <andersca@apple.com>
1833 Reviewed by Sam Weinig.
1835 More browser->plug-in scripting support.
1837 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1838 (WKPCNPObjectHasPropertyReply):
1839 (WKPCNPObjectHasMethodReply):
1840 (WKPCNPObjectInvokeReply):
1841 MIG reply functions.
1843 (WKPCIdentifierInfo):
1844 Return information about an identifier given its 64-bit value.
1846 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1847 Add new reply structs.
1849 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1850 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1851 Split out code that adds values to the arrays from marshalValue.
1853 (WebKit::NetscapePluginInstanceProxy::marshalValue):
1854 Call addValueToArray.
1856 (WebKit::NetscapePluginInstanceProxy::marshalValues):
1857 Marshal a list of values.
1859 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1860 Actually create a proxy instance.
1862 * Plugins/Hosted/ProxyInstance.h:
1863 * Plugins/Hosted/ProxyInstance.mm:
1864 (WebKit::ProxyClass::methodsNamed):
1865 (WebKit::ProxyClass::fieldNamed):
1866 Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
1868 (WebKit::proxyClass):
1869 Shared proxyClass getter.
1871 (WebKit::ProxyField::ProxyField):
1872 (WebKit::ProxyField::valueFromInstance):
1873 (WebKit::ProxyField::setValueToInstance):
1874 Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
1876 (WebKit::ProxyMethod::ProxyMethod):
1877 (WebKit::ProxyMethod::serverIdentifier):
1878 (WebKit::ProxyMethod::numParameters):
1879 Add a dummy ProxyMethod class.
1881 (WebKit::ProxyInstance::invokeMethod):
1882 Call _WKPHNPObjectInvoke.
1884 (WebKit::ProxyInstance::defaultValue):
1885 (WebKit::ProxyInstance::stringValue):
1886 (WebKit::ProxyInstance::numberValue):
1887 (WebKit::ProxyInstance::booleanValue):
1888 (WebKit::ProxyInstance::valueOf):
1889 Add dummy implementations (taken from CInstance).
1891 (WebKit::ProxyInstance::methodsNamed):
1892 Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
1894 (WebKit::ProxyInstance::fieldNamed):
1895 Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
1897 * Plugins/Hosted/WebKitPluginClient.defs:
1898 * Plugins/Hosted/WebKitPluginHost.defs:
1899 Add new MIG definitions.
1901 2009-01-21 Mark Rowe <mrowe@apple.com>
1903 Reviewed by Tim Hatcher.
1905 Clean up how we force invocations of API that happened on background threads over to the main thread.
1907 This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
1908 and return values back from the function. The new approach is to use a proxy object that forwards an
1909 NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
1912 * Misc/WebNSObjectExtras.h:
1913 * Misc/WebNSObjectExtras.mm:
1914 (-[WebMainThreadInvoker initWithTarget:]):
1915 (-[WebMainThreadInvoker forwardInvocation:]):
1916 (-[WebMainThreadInvoker methodSignatureForSelector:]):
1917 (-[WebMainThreadInvoker handleException:]):
1918 (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
1919 raised back to the WebMainThreadInvoker.
1920 (-[NSObject _webkit_invokeOnMainThread]):
1922 The following methods are updated to use the proxy object to forward methods to the main thread:
1924 * WebView/WebArchive.mm:
1925 (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1926 (-[WebArchive mainResource]):
1927 (-[WebArchive subresources]):
1928 (-[WebArchive subframeArchives]):
1929 * WebView/WebResource.mm:
1930 (-[WebResource data]):
1931 (-[WebResource URL]):
1932 (-[WebResource MIMEType]):
1933 (-[WebResource textEncodingName]):
1934 (-[WebResource frameName]):
1935 (-[WebResource _ignoreWhenUnarchiving]):
1936 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1937 (-[WebResource _initWithData:URL:response:]):
1938 (-[WebResource _suggestedFilename]):
1939 (-[WebResource _response]):
1940 (-[WebResource _stringValue]):
1941 * WebView/WebView.mm:
1942 (-[WebView initWithFrame:frameName:groupName:]):
1943 (-[WebView initWithCoder:]):
1945 2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1947 Reviewed by George Staikos.
1949 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
1951 Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
1952 WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
1954 * WebCoreSupport/WebEditorClient.mm:
1955 (WebEditorClient::textFieldDidBeginEditing):
1956 (WebEditorClient::textFieldDidEndEditing):
1957 (WebEditorClient::textDidChangeInTextField):
1958 (WebEditorClient::doTextFieldCommandFromEvent):
1959 (WebEditorClient::textWillBeDeletedInTextField):
1960 (WebEditorClient::textDidChangeInTextArea):
1962 2009-01-19 Anders Carlsson <andersca@apple.com>
1964 Reviewed by Sam Weinig.
1966 Add and implement GetScriptableNPObject.
1968 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1969 (WKPCGetScriptableNPObjectReply):
1970 Create a new reply struct and set it as the current reply.
1973 Get rid of an unused variable.
1975 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1976 (WebKit::NetscapePluginInstanceProxy::Reply::):
1977 (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
1978 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1979 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1980 Call _WKPHGetScriptableNPObject and wait for a reply.
1982 * Plugins/Hosted/ProxyInstance.h: Added.
1983 * Plugins/Hosted/ProxyInstance.mm: Added.
1986 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1987 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1988 Call NetscapePluginInstanceProxy::createBindingsInstance.
1990 * Plugins/Hosted/WebKitPluginClient.defs:
1991 * Plugins/Hosted/WebKitPluginHost.defs:
1992 Add new declarations.
1994 2009-01-19 Sam Weinig <sam@webkit.org>
1996 Rubber-stamped by Gavin Barraclough.
1998 Remove temporary operator-> from JSValuePtr.
2000 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2001 (WebKit::NetscapePluginInstanceProxy::invoke):
2002 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2003 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2004 * WebView/WebFrame.mm:
2005 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2006 * WebView/WebView.mm:
2007 (aeDescFromJSValue):
2009 2009-01-19 Anders Carlsson <andersca@apple.com>
2011 Reviewed by Sam Weinig.
2013 Make Evaluate an asynchronous method that has a reply method.
2015 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2017 * Plugins/Hosted/WebKitPluginClient.defs:
2018 * Plugins/Hosted/WebKitPluginHost.defs:
2020 2009-01-19 Brady Eidson <beidson@apple.com>
2022 Rubberstamped by Tim Hatcher
2024 Fix long standing typo.
2026 * History/WebBackForwardList.h:
2028 2009-01-19 Mark Rowe <mrowe@apple.com>
2032 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2033 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2034 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2036 2009-01-18 Mark Rowe <mrowe@apple.com>
2038 Reviewed by Anders Carlsson.
2040 Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2041 Bug 23414: Reproducible crash accessing View menu with plugins disabled
2043 * WebView/WebFrame.mm:
2044 (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2046 2009-01-17 David Hyatt <hyatt@apple.com>
2048 Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2049 are done in WebCore instead.
2051 Reviewed by Oliver Hunt
2053 * WebView/WebFrame.mm:
2054 (-[WebFrame _selectedString]):
2055 (-[WebFrame _stringForRange:]):
2057 2009-01-17 Eric Carlson <eric.carlson@apple.com>
2059 Reviewed by Adele Peterson
2061 Complete <rdar://problem/6293969>
2063 * WebCoreSupport/WebSystemInterface.m:
2064 (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2066 2009-01-15 Brady Eidson <beidson@apple.com>
2068 Reviewed by Dan Bernstein
2070 Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2072 * History/WebHistory.mm:
2073 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2074 flag for all loads with an HTTP Method
2076 2009-01-14 Anders Carlsson <andersca@apple.com>
2078 Reviewed by Sam Weinig.
2080 Implement InvokeDefault, Construct, GetProperty and SetProperty.
2082 Fully implement marshalValue.
2084 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2085 (WKPCInvokeDefault):
2089 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2090 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2091 (WebKit::NetscapePluginInstanceProxy::evaluate):
2092 (WebKit::NetscapePluginInstanceProxy::invoke):
2093 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2094 (WebKit::NetscapePluginInstanceProxy::construct):
2095 (WebKit::NetscapePluginInstanceProxy::getProperty):
2096 (WebKit::NetscapePluginInstanceProxy::setProperty):
2097 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2098 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2099 * Plugins/Hosted/WebKitPluginClient.defs:
2101 2009-01-14 Anders Carlsson <andersca@apple.com>
2103 Reviewed by Sam Weinig.
2105 Demarshal arguments and pass them to the JS call.
2107 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2109 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2110 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2111 (WebKit::NetscapePluginInstanceProxy::invoke):
2112 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2113 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2115 2009-01-14 Mark Rowe <mrowe@apple.com>
2117 Reviewed by Timothy Hatcher.
2119 <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2121 Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2124 * WebView/WebArchive.mm:
2125 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2126 (-[WebArchive _initWithArguments:]):
2127 * WebView/WebResource.mm:
2128 (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2130 2009-01-14 Darin Adler <darin@apple.com>
2132 Reviewed by Oliver Hunt.
2134 Fix crash I ran into while printing. I was unable to reproduce it, but also,
2135 it's clear there's no guarantee that the frame will be non-zero in this case,
2136 so it seems fine to check it.
2138 * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2139 and don't do anything with it if it's zero.
2141 2009-01-14 Dan Bernstein <mitz@apple.com>
2143 Reviewed by John Sullivan.
2149 2009-01-12 Anders Carlsson <andersca@apple.com>
2151 Reviewed by Darin Adler.
2153 Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2155 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2156 (WebKit::fromUTF8WithLatin1Fallback):
2157 If the length isn't specified, get it by calling strlen.
2160 Evaluate doesn't take any arguments.
2162 (WKPCGetIntIdentifier):
2163 Call _NPN_GetIntIdentifier.
2165 (identifierFromServerIdentifier):
2166 New helper function that returns a JSC Identifier from an NPIdentifier.
2169 Call identifierFromServerIdentifier.
2171 (WKPCRemoveProperty):
2174 Call NetscapePluginInstanceProxy.
2176 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2177 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2178 (WebKit::NetscapePluginInstanceProxy::removeProperty):
2179 (WebKit::NetscapePluginInstanceProxy::hasProperty):
2180 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2182 * Plugins/Hosted/WebKitPluginClient.defs:
2183 Add new definitions.
2185 2009-01-13 Anders Carlsson <andersca@apple.com>
2189 * WebView/WebView.mm:
2190 (-[WebView _initWithArguments:]):
2192 2009-01-13 Timothy Hatcher <timothy@apple.com>
2194 Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2196 <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2198 Reviewed by Darin Adler.
2200 * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2201 * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2202 * Misc/WebNSObjectExtras.mm:
2203 (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2204 Passes the optional object to the selector.
2205 (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2206 Put the optional object into the arguments dictionary.
2207 (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2208 * WebView/WebResource.mm:
2209 (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2210 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2211 _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2212 * WebView/WebView.mm:
2213 (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2214 (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2215 (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2216 to call _initWithArguments: passing the frame, frameName and groupName.
2217 (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2219 2009-01-12 Gavin Barraclough <barraclough@apple.com>
2221 Reviewed by Oliver Hunt.
2223 Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
2225 * WebView/WebView.mm:
2226 (aeDescFromJSValue):
2228 2009-01-12 Brady Eidson <beidson@apple.com>
2230 Reviewed by Darin Adler
2232 <rdar://problem/6468274> - Track Non-get requests in global history
2234 * History/WebHistory.mm:
2235 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2236 * History/WebHistoryInternal.h:
2238 * History/WebHistoryItem.mm:
2239 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2240 (-[WebHistoryItem dictionaryRepresentation]):
2241 (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2242 * History/WebHistoryItemPrivate.h:
2244 * WebCoreSupport/WebFrameLoaderClient.mm:
2245 (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2247 2009-01-12 Anders Carlsson <andersca@apple.com>
2249 Reviewed by Sam Weinig.
2251 Move marshalling into NetscapePluginInstanceProxy.
2253 Add support for marshallin strings.
2255 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2258 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2259 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2260 (WebKit::NetscapePluginInstanceProxy::evaluate):
2261 (WebKit::NetscapePluginInstanceProxy::invoke):
2262 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2263 * Plugins/Hosted/WebKitPluginHostTypes.h:
2265 2009-01-12 Anders Carlsson <andersca@apple.com>
2267 Reviewed by Sam Weinig.
2269 Implement WKPCInvoke.
2271 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2274 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2275 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2276 (WebKit::NetscapePluginInstanceProxy::idForObject):
2277 (WebKit::NetscapePluginInstanceProxy::invoke):
2278 * Plugins/Hosted/WebKitPluginClient.defs:
2280 2009-01-12 Anders Carlsson <andersca@apple.com>
2282 Reviewed by Sam Weinig.
2284 Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2286 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2288 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2289 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2290 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2291 * Plugins/Hosted/WebKitPluginHostTypes.h:
2293 2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
2295 Reviewed by Darin Adler.
2297 Bug 22861: Turn the FontCache into a singleton
2298 https://bugs.webkit.org/show_bug.cgi?id=22861
2300 * Misc/WebCoreStatistics.mm:
2301 (+[WebCoreStatistics cachedFontDataCount]):
2302 (+[WebCoreStatistics cachedFontDataInactiveCount]):
2303 (+[WebCoreStatistics purgeInactiveFontData]):
2304 Redirected all the static calls to the global FontCache
2307 2009-01-11 Dmitry Titov <dimich@chromium.org>
2309 Reviewed by Darin Adler.
2311 https://bugs.webkit.org/show_bug.cgi?id=23207
2312 Moved currentTime() to from WebCore to WTF.
2314 * WebView/WebFrame.mm: a different header file included.
2316 2009-01-10 Darin Adler <darin@apple.com>
2318 Reviewed by Sam Weinig.
2320 <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2321 because of change to -[HTMLObjectElement data]
2323 * WebView/WebView.mm:
2324 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2325 violation check because I saw this being done off the main thread while testing Mail, and it
2326 caused problems. Put all the one time initialization under a single guard to make things just
2327 a little faster other times, and to make it clearer which things are one-time. Added a call to
2328 the new patchMailRemoveAttributesMethod function.
2329 (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2330 because I assumed it would be slightly better to have a public method name in the violation
2331 message. This calls commonInitialization later, so it will hit that one eventually.
2332 (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2333 (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2334 a WebKit method and removes the patch again on the way out.
2335 (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2336 applies the patch that fixes this bug.
2338 2009-01-09 Dan Bernstein <mitz@apple.com>
2340 Reviewed by Darin Adler.
2342 - fixed <rdar://problem/6234347> Add/change conditional key
2343 bindings for changing paragraph- and character-level writing
2344 direction (to match NSTextView)
2346 * WebView/WebHTMLView.mm:
2347 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
2348 code to validate makeBaseWritingDirectionLeftToRight: and
2349 makeBaseWritingDirectionRightToLeft:.
2350 (writingDirectionKeyBindingsEnabled): Changed this function to
2351 always return YES, except on Tiger and Leopard.
2352 (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
2353 changeBaseWritingDirectionToLTR: to this.
2354 (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
2355 changeBaseWritingDirectionToRTL: to this.
2356 (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
2357 makeBaseWritingDirectionLeftToRight:.
2358 (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
2359 makeBaseWritingDirectionRightToLeft:.
2360 * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
2361 and makeBaseWritingDirectionRightToLeft to
2362 FOR_EACH_RESPONDER_SELECTOR.
2364 2009-01-08 Anders Carlsson <andersca@apple.com>
2366 Reviewed by Sam Weinig.
2368 Add and implement WKPCGetStringIdentifier.
2370 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2371 (WKPCGetStringIdentifier):
2372 * Plugins/Hosted/WebKitPluginClient.defs:
2374 2009-01-08 Stephanie Lewis <slewis@gmail.com>
2378 * WebView/WebTextIterator.mm:
2380 2009-01-08 Anders Carlsson <andersca@apple.com>
2382 Reviewed by Sam Weinig.
2384 Add basic support for evaluating scripts.
2386 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2387 (WebKit::fromUTF8WithLatin1Fallback):
2388 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2389 (WKPCReleaseObject):
2392 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2393 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2394 (WebKit::NetscapePluginInstanceProxy::releaseObject):
2395 (WebKit::NetscapePluginInstanceProxy::evaluate):
2396 * Plugins/Hosted/WebKitPluginClient.defs:
2397 * Plugins/Hosted/WebKitPluginHostTypes.h:
2399 2009-01-08 David Hyatt <hyatt@apple.com>
2401 Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2403 Add a new ChromeClient method for handling exposure of scrolled rects.
2405 Reviewed by Oliver Hunt
2407 * WebCoreSupport/WebChromeClient.h:
2408 * WebCoreSupport/WebChromeClient.mm:
2409 (WebChromeClient::scrollRectIntoView):
2411 2009-01-08 Darin Adler <darin@apple.com>
2413 Reviewed by Tim Hatcher.
2415 Bug 23185: add a currentRange method to the WebTextIterator SPI
2416 https://bugs.webkit.org/show_bug.cgi?id=23185
2417 rdar://problem/6455834
2419 I also noticed a garbage-collection-related threading issue that I fixed, and
2420 that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
2422 * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
2423 category. Added currentTextPointer and currentTextLength.
2425 * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
2426 used _textIterator to be consistent with ObjC rather than C++ naming.
2427 (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
2428 since the finalize method here works with main-thread only WebCore objects.
2429 (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
2430 (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
2431 since I don't think it provides much value.
2432 (-[WebTextIterator atEnd]): Ditto.
2433 (-[WebTextIterator currentRange]): Added.
2434 (-[WebTextIterator currentTextPointer]): Added.
2435 (-[WebTextIterator currentTextLength]): Added.
2436 (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
2437 (-[WebTextIterator currentText]): Ditto.
2439 2009-01-08 Eric Carlson <eric.carlson@apple.com>
2441 Reviewed by Adele Peterson.
2443 Simplify Mac interfaces for drawing media controller elements
2445 <rdar://problem/6293969>
2447 * WebCoreSupport/WebSystemInterface.m:
2448 (InitWebCoreSystemInterface): Update for changes to media controller functions
2450 2009-01-07 Anders Carlsson <andersca@apple.com>
2452 Reviewed by Dan Bernstein.
2456 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2457 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2458 (WebKit::NetscapePluginInstanceProxy::idForObject):
2460 2009-01-07 Anders Carlsson <andersca@apple.com>
2462 Reviewed by Dan Bernstein.
2464 Add a way for a plug-in to get a reference to the Window JS object.
2466 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2467 (WKPCGetWindowNPObject):
2468 Call the appropriate instance.
2470 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2471 Add object ID counter.
2473 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2474 (WebKit::NetscapePluginInstanceProxy::destroy):
2475 Clear the object ID map.
2477 (WebKit::NetscapePluginInstanceProxy::idForObject):
2478 New method that returns a unique ID for a given JS object.
2480 (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2481 Return the object ID for the window JS object.
2483 * Plugins/Hosted/WebKitPluginClient.defs:
2484 Add GetWindowNPObject.
2486 2009-01-07 Darin Adler <darin@apple.com>
2488 Reviewed by Oliver Hunt.
2490 Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
2491 https://bugs.webkit.org/show_bug.cgi?id=23160
2493 * WebView/WebView.mm:
2494 (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
2495 (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
2496 * WebView/WebViewPrivate.h: Ditto.
2498 2009-01-05 Gavin Barraclough <baraclough@apple.com>
2500 Rubber Stamped by Oliver Hunt.
2502 Replace all uses of JSValue* with new wrapper class, JSValuePtr.
2503 See JavaScriptCore/ChangeLog for more detailed description.
2505 * WebView/WebFrame.mm:
2506 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2507 * WebView/WebScriptDebugDelegate.mm:
2508 (-[WebScriptCallFrame _convertValueToObjcValue:]):
2509 (-[WebScriptCallFrame exception]):
2510 (-[WebScriptCallFrame evaluateWebScript:]):
2511 * WebView/WebView.mm:
2512 (aeDescFromJSValue):
2513 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2515 2009-01-06 Pierre-Olivier Latour <pol@apple.com>
2517 Reviewed by Darin Adler.
2519 Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
2521 https://bugs.webkit.org/show_bug.cgi?id=23126
2523 * WebView/WebFrame.mm:
2524 (-[WebFrame _numberOfActiveAnimations]):
2525 * WebView/WebFramePrivate.h:
2527 2009-01-05 David Kilzer <ddkilzer@apple.com>
2529 Add SPI to enable, disable and check state of WebIconDatabase
2531 Reviewed by Darin Adler & Timothy Hatcher.
2533 Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
2534 SPI to make it possible to enable, disable and check the state of
2537 * Misc/WebIconDatabase.mm:
2538 (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
2539 (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
2540 -isEnabled instead of -_isEnabled.
2541 (-[WebIconDatabase iconURLForURL:]): Ditto.
2542 (-[WebIconDatabase retainIconForURL:]): Ditto.
2543 (-[WebIconDatabase releaseIconForURL:]): Ditto.
2544 (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
2545 WebInternal category.
2546 (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
2547 the enabled/disabled state of the icon database.
2548 (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
2549 instead of -_isEnabled.
2550 (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
2552 (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
2553 observers when the icon database is disabled.
2554 * Misc/WebIconDatabaseInternal.h: Added declarations for
2555 -_startUpIconDatabase and -_shutDownIconDatabase.
2556 * Misc/WebIconDatabasePrivate.h: Added declarations for
2557 -isEnabled and -setEnabled:.
2559 2009-01-05 Brady Eidson <beidson@apple.com>
2561 Reviewed by Jon Honeycutt
2563 Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
2565 * History/WebHistoryItem.mm:
2566 (-[WebHistoryItem _setLastVisitWasFailure:]):
2567 * History/WebHistoryItemPrivate.h:
2569 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2571 Another blind mac build fix
2573 * WebCoreSupport/WebChromeClient.mm:
2574 (WebChromeClient::contentsSizeChanged):
2576 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2580 * WebCoreSupport/WebChromeClient.mm:
2582 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2586 * WebCoreSupport/WebChromeClient.h:
2588 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
2590 Reviewed by George Staikos.
2592 Build fix for contentsSizeChanged
2594 * WebCoreSupport/WebChromeClient.h:
2595 * WebCoreSupport/WebChromeClient.mm:
2596 (WebChromeClient::contentsSizeChanged):
2598 2009-01-02 Darin Adler <darin@apple.com>
2600 Reviewed by Sam Weinig.
2602 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2603 inside its web view when resizing its window
2604 https://bugs.webkit.org/show_bug.cgi?id=23072
2605 rdar://problem/6368028
2607 The first attempt at fixing this did not work.
2608 This time I was able to reproduce the bug and test the fix.
2610 * WebCoreSupport/WebFrameLoaderClient.mm:
2611 (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
2612 function names around a bit to make even less code at the call site.
2613 (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
2614 Dictionary application in here.
2615 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
2616 applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
2617 when the script is cached. This fixes one of the two problems with the initial
2618 patch; the other fix is in WebCore.
2619 (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
2620 applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
2622 * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
2624 2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2626 Reviewed by Darin Adler.
2628 Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
2629 <https://bugs.webkit.org/show_bug.cgi?id=23060>
2630 <rdar://problem/6467830>
2632 After r38629, all keyboard events get sent by Editor to the EditorClient, even
2633 if the selection is not editable. If the event's command is unsupported by
2634 WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
2635 was not. When using the page up / page down keys, the events generated are of
2636 the form scrollPageUp rather than movePageUp, so they are unsupported by
2637 WebHTMLView and cause this bug to occur.
2639 * WebView/WebHTMLView.mm:
2640 (-[WebHTMLView doCommandBySelector:]):
2642 2009-01-02 Darin Adler <darin@apple.com>
2644 Reviewed by Oliver Hunt.
2646 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2647 https://bugs.webkit.org/show_bug.cgi?id=23072
2648 rdar://problem/6368028
2650 * WebCoreSupport/WebFrameLoaderClient.mm:
2651 (isAppleDictionaryApplication): Added.
2652 (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
2653 a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
2654 (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
2655 apply the quirk when the relevant script is loaded.
2657 2008-12-26 Dan Bernstein <mitz@apple.com>
2659 Reviewed by Sam Weinig.
2661 - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
2662 global history after a successful visit
2664 * History/WebHistory.mm:
2665 (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
2666 update the wasFailure flag on the HistoryItem.
2668 2008-12-23 Darin Adler <darin@apple.com>
2670 Reviewed by Alexey Proskuryakov (a slightly earlier version).
2672 - fix https://bugs.webkit.org/show_bug.cgi?id=22976
2673 crash due to Mail's use of WebArchive and WebResource on non-main thread
2675 * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
2676 WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
2677 * Misc/WebKitLogging.m: Ditto.
2679 * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
2680 main thread workaround.
2682 * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
2683 which performs a selector on the main thread, waits for it to complete, and then
2684 returns the value on the caller thread.
2685 * Misc/WebNSObjectExtras.mm: Added.
2687 * WebView/WebArchive.mm:
2688 (-[WebArchive init]): Added WebCoreThreadViolationCheck.
2689 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
2690 initialization on main thread if needMailThreadWorkaround is true.
2691 Also added WebCoreThreadViolationCheck.
2692 (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
2693 (-[WebArchive mainResource]): Get property on main thread if
2694 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2695 (-[WebArchive subresources]): Ditto.
2696 (-[WebArchive subframeArchives]): Ditto.
2697 (-[WebArchive data]): Ditto.
2698 (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
2699 (-[WebArchive _coreLegacyWebArchive]): Ditto.
2700 (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
2701 version of initWithMainResource above.
2703 * WebView/WebResource.mm:
2704 (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
2705 (-[WebResource data]): Get property on main thread if
2706 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2707 (-[WebResource URL]): Ditto.
2708 (-[WebResource MIMEType]): Ditto.
2709 (-[WebResource textEncodingName]): Ditto.
2710 (-[WebResource frameName]): Ditto.
2711 (-[WebResource _ignoreWhenUnarchiving]): Ditto.
2712 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2713 Perform initialization on main thread if needMailThreadWorkaround is true.
2714 Also added WebCoreThreadViolationCheck.
2715 (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
2716 (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
2717 getting at coreResource directly.
2718 (-[WebResource _response]): Get property on main thread if
2719 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2720 (-[WebResource _stringValue]): Ditto.
2721 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
2722 (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
2723 version of _initWithData above.
2725 * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
2726 clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
2727 and the needMainThreadWorkaround helper function.
2729 * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
2730 file. This probably fixes clean builds.
2731 * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
2733 * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
2734 since it's not actually used.
2735 * WebView/WebDataSource.mm: Ditto.
2736 * WebView/WebHTMLRepresentation.mm: Ditto.
2738 2008-12-23 Darin Adler <darin@apple.com>
2740 Reviewed by Dan Bernstein.
2742 - fix https://bugs.webkit.org/show_bug.cgi?id=22979
2743 crash seen in -[WebView drawsBackground] when quitting
2744 <rdar://problem/6464601>
2746 * WebView/WebView.mm:
2747 (-[WebView drawsBackground]): Added comment and a null check for _private.
2749 2008-12-22 Kevin Decker <kdecker@apple.com>
2751 Reviewed by Anders Carlsson.
2753 <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
2755 * Plugins/WebBaseNetscapePluginView.mm:
2756 (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
2758 2008-12-19 Geoffrey Garen <ggaren@apple.com>
2760 Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
2762 Added SPI for getting an unsorted vector of all items in history.
2764 * History/WebHistory.h:
2765 * History/WebHistory.mm:
2766 (-[WebHistory allItems]):
2768 2008-12-18 Dan Bernstein <mitz@apple.com>
2770 Reviewed by Sam Weinig.
2772 - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
2773 a new resource load delegae method.
2775 * WebCoreSupport/WebFrameLoaderClient.h:
2776 * WebCoreSupport/WebFrameLoaderClient.mm:
2777 (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
2778 delegate method. If the method is unimplemented, returns true for
2779 backwards compatibility.
2780 * WebView/WebView.mm:
2781 (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
2782 shouldUseCredentialStorageFunc member.
2783 (CallResourceLoadDelegateReturningBoolean): Added.
2784 * WebView/WebViewInternal.h:
2785 * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
2786 -webView:resource:shouldUseCredentialStorageForDataSource:.
2788 2008-12-18 Cameron Zwarich <zwarich@apple.com>
2790 Reviewed by Jonathan Honeycutt.
2792 Fix an apparent typo in r39385 that is causing lots of crashes.
2794 * WebCoreSupport/WebFrameLoaderClient.mm:
2795 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2797 2008-12-18 Brady Eidson <beidson@apple.com>
2799 Reviewed by John Sullivan
2801 Initial visit to a website creates history items that start with a visit count of
2804 * History/WebHistory.mm:
2805 (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
2807 * History/WebHistoryItem.mm:
2808 (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
2809 * History/WebHistoryItemInternal.h:
2811 2008-12-18 Sam Weinig <sam@webkit.org>
2813 Reviewed by John Sullivan.
2815 Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
2816 a new private frame load delegate method.
2818 * WebCoreSupport/WebFrameLoaderClient.h:
2819 * WebCoreSupport/WebFrameLoaderClient.mm:
2820 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2821 * WebView/WebView.mm:
2822 (-[WebView _cacheFrameLoadDelegateImplementations]):
2823 * WebView/WebViewInternal.h:
2824 * WebView/WebViewPrivate.h:
2826 2008-12-16 Antti Koivisto <antti@apple.com>
2828 Reviewed by John Sullivan.
2830 Add version check for shift-reload behavior.
2832 * Misc/WebKitVersionChecks.h:
2833 * WebView/WebFrame.mm:
2834 (-[WebFrame reload]):
2836 2008-12-16 Anders Carlsson <andersca@apple.com>
2838 Reviewed by Dan Bernstein.
2840 Start sending keyboard events to the plug-in host.
2842 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2843 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2844 (WebKit::NetscapePluginInstanceProxy::keyEvent):
2845 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2846 (-[WebHostedNetscapePluginView keyDown:]):
2847 (-[WebHostedNetscapePluginView keyUp:]):
2848 * Plugins/Hosted/WebKitPluginHost.defs:
2850 2008-12-16 Anders Carlsson <andersca@apple.com>
2852 Reviewed by Kevin Decker.
2854 <rdar://problem/6450538>
2856 Fix flag enumeration.
2858 * Plugins/Hosted/WebKitPluginHostTypes.h:
2860 2008-12-16 Anders Carlsson <andersca@apple.com>
2862 Reviewed by Kevin Decker.
2864 Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
2866 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2868 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2869 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2870 (WebKit::NetscapePluginInstanceProxy::loadURL):
2871 * Plugins/Hosted/WebKitPluginClient.defs:
2872 * Plugins/Hosted/WebKitPluginHostTypes.h:
2874 2008-12-16 Anders Carlsson <andersca@apple.com>
2876 Reviewed by Kevin Decker.
2878 Add trailing null to headers to avoid a crash in the plug-in host.
2880 * Plugins/Hosted/HostedNetscapePluginStream.mm:
2881 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
2883 2008-12-15 Mark Rowe <mrowe@apple.com>
2885 Rubber-stamped by Cameron Zwarich.
2887 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2889 * Configurations/Base.xcconfig:
2890 * Configurations/DebugRelease.xcconfig:
2892 2008-12-15 Stephanie Lewis <slewis@apple.com>
2896 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2898 2008-12-15 Anders Carlsson <andersca@apple.com>
2900 Reviewed by Sam Weinig.
2902 Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
2903 back into us while it's being instantiated.
2905 * Plugins/Hosted/NetscapePluginHostManager.mm:
2906 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2907 * Plugins/Hosted/NetscapePluginHostProxy.h:
2908 (WebKit::NetscapePluginHostProxy::clientPort):
2909 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2910 (WKPCInstantiatePluginReply):
2911 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2912 (WebKit::NetscapePluginInstanceProxy::Reply::):
2913 (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
2914 (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
2915 (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
2916 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
2917 (WebKit::NetscapePluginInstanceProxy::waitForReply):
2918 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2919 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2920 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2921 * Plugins/Hosted/WebKitPluginClient.defs:
2922 * Plugins/Hosted/WebKitPluginHost.defs:
2924 2008-12-15 Anders Carlsson <andersca@apple.com>
2926 Reviewed by Darin Adler.
2928 Let WebKit generate a plug-in ID instead of having the plug-in host do it.
2930 * Plugins/Hosted/NetscapePluginHostManager.mm:
2931 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2932 Create the plug-in proxy before instantiating the plug-in.
2934 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2935 (WebKit::NetscapePluginInstanceProxy::create):
2936 (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
2937 (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
2938 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2939 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2940 * Plugins/Hosted/WebKitPluginHost.defs:
2942 2008-12-15 Anders Carlsson <andersca@apple.com>
2944 Reviewed by Sam Weinig.
2946 LoadURL doesn't need to be asynchronous.
2948 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2950 * Plugins/Hosted/WebKitPluginClient.defs:
2951 * Plugins/Hosted/WebKitPluginHost.defs:
2953 2008-12-15 Antti Koivisto <antti@apple.com>
2955 Reviewed by Darin Adler.
2957 - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
2958 - Add corresponding IBAction to WebView.
2959 - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
2961 * WebView/WebFrame.h:
2962 * WebView/WebFrame.mm:
2963 (-[WebFrame reload]):
2964 (-[WebFrame reloadFromOrigin]):
2965 * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
2966 * WebView/WebView.h:
2967 * WebView/WebView.mm:
2968 (-[WebView reloadFromOrigin:]):
2970 2008-12-14 Dan Bernstein <mitz@apple.com>
2972 Reviewed by Darin Adler.
2974 - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
2975 should add items to userInfo
2977 * History/WebHistory.mm:
2978 (-[WebHistoryPrivate allItems]): Added this helper method, which returns
2979 all values in the _entriesByURL dictionary.
2980 (-[WebHistory removeAllItems]): Changed to send the array of all items
2981 in the notification.
2983 2008-12-13 Darin Adler <darin@apple.com>
2985 - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
2987 * WebKit.exp: Added the class. We forgot to export it when we added
2988 the WebTextIterator SPI.
2990 2008-12-12 Darin Adler <darin@apple.com>
2992 Rubber stamped by Adam Roben.
2994 - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
2995 login sheet after clicking static text, due to AppKit key loop change
2997 * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
2998 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
2999 * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3000 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3001 Set nextKeyView of the selectable static texts to the editable text.
3004 2008-12-12 Stephanie Lewis <slewis@apple.com>
3006 Reviewed by Geoff Garen.
3010 * WebView/WebView.mm:
3011 (+[WebView _setCacheModel:]):
3013 2008-12-12 Anders Carlsson <andersca@apple.com>
3015 Reviewed by Tim Hatcher.
3017 Don't try to free the dummy "1" port state.
3019 * Plugins/WebNetscapePluginView.mm:
3020 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3021 (-[WebNetscapePluginView updateAndSetWindow]):
3023 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3025 Rubber-stamped by Mark Rowe.
3027 Roll out r39212 due to assertion failures during layout tests, multiple
3028 layout test failures, memory leaks, and obvious incorrectness.
3030 * WebView/WebPreferenceKeysPrivate.h:
3031 * WebView/WebPreferences.mm:
3032 (-[WebPreferences fullDocumentTeardownEnabled]):
3033 * WebView/WebPreferencesPrivate.h:
3035 2008-12-11 Stephanie Lewis <slewis@apple.com>
3039 * WebView/WebView.mm:
3041 2008-12-11 Stephanie Lewis <slewis@apple.com>
3043 Reviewed by Oliver Hunt.
3045 Empty Web cache before quitting a debug build in order
3046 to report accurate CachedResource leaks.
3048 * WebView/WebView.mm:
3049 (-[WebView _close]):
3051 2008-12-11 Anders Carlsson <andersca@apple.com>
3055 * Misc/WebNSDataExtras.h:
3057 2008-12-11 Anders Carlsson <andersca@apple.com>
3059 Reviewed by Cameron Zwarich.
3061 https://bugs.webkit.org/show_bug.cgi?id=22797
3062 REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3064 Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3066 * Plugins/WebBaseNetscapePluginStream.mm:
3067 (WebNetscapePluginStream::destroyStreamWithReason):
3069 2008-12-10 Glenn Wilson <gwilson@google.com>
3071 Reviewed by Adam Roben.
3073 Added new methods for overriding default WebPreference values
3074 and for resetting preferences to their defaults.
3075 https://bugs.webkit.org/show_bug.cgi?id=20534
3077 * WebView/WebPreferenceKeysPrivate.h:
3078 * WebView/WebPreferences.mm:
3079 (-[WebPreferences resetToDefaults]): new method
3080 (-[WebPreferences overridePreference:flag:]): new method
3081 * WebView/WebPreferencesPrivate.h: new method signatures
3083 2008-12-10 Anders Carlsson <andersca@apple.com>
3085 Reviewed by Darin Adler.
3087 Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3089 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3092 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3093 (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3094 Factored out this from ::destroy.
3096 (WebKit::NetscapePluginInstanceProxy::destroy):
3097 Call stopAllStreams().
3099 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3102 (WebKit::NetscapePluginInstanceProxy::loadURL):
3103 Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3105 2008-12-10 Anders Carlsson <andersca@apple.com>
3107 Reviewed by Darin Adler.
3109 Move two NSData category methods to WebNSDataExtras.m.
3111 * Misc/WebNSDataExtras.h:
3112 * Misc/WebNSDataExtras.m:
3113 (-[NSData _web_startsWithBlankLine]):
3114 (-[NSData _web_locationAfterFirstBlankLine]):
3115 * Plugins/WebNetscapePluginView.mm:
3117 2008-12-10 Alice Liu <alice.liu@apple.com>
3119 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3121 Reviewed by Darin Adler.
3123 * Misc/WebNSPasteboardExtras.mm:
3124 Ask image for its file extension instead of falling back on MIME type and file path.
3125 Also moved this code to before setting the pasteboard data so as not to set any if
3126 no extension can be determined.
3127 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3129 * WebView/WebHTMLView.mm:
3130 Fixed a separate but related long-standing bug of how the filename for the promised
3131 drag data is determined by asking the image for a proper file extension.
3132 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3134 2008-12-09 Anders Carlsson <andersca@apple.com>
3136 Reviewed by Darin Adler.
3140 * WebView/WebHTMLView.mm:
3141 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3143 2008-12-09 Anders Carlsson <andersca@apple.com>
3145 Reviewed by Darin Adler.
3147 Implement software rendering of hosted plug-ins.
3149 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3150 (WKPCInvalidateRect):
3151 New MiG function. This is called by the plug-in host when it has drawn something.
3153 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3154 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3155 (-[WebHostedNetscapePluginView createPlugin]):
3156 Create a software renderer.
3158 (-[WebHostedNetscapePluginView destroyPlugin]):
3159 Destroy the software renderer.
3161 (-[WebHostedNetscapePluginView drawRect:]):
3162 Draw using the software renderer.
3164 * Plugins/Hosted/WebKitPluginClient.defs:
3167 2008-12-09 Brett Wilson <brettw@chromium.org>
3169 Reviewed by Dave Hyatt.
3171 https://bugs.webkit.org/show_bug.cgi?id=22177
3173 Add a callback on ChromeClient that the state of form elements on
3174 the page has changed. This is to allow clients implementing session
3175 saving to know when the current state is dirty.
3177 * WebCoreSupport/WebChromeClient.h:
3178 (WebChromeClient::formStateDidChange):
3180 2008-12-09 Anders Carlsson <andersca@apple.com>
3182 Reviewed by Dan Bernstein.
3184 Make sure to pause null events for hosted plug-ins as well.
3186 * WebView/WebHTMLView.mm:
3187 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3189 2008-12-09 Anders Carlsson <andersca@apple.com>
3191 Reviewed by Darin Adler.
3193 * Plugins/Hosted/NetscapePluginHostProxy.h:
3194 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3195 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3196 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3197 Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3199 2008-12-09 Timothy Hatcher <timothy@apple.com>
3201 Implement a few methods needed to keep Dictionary.app working on Leopard.
3203 <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3204 Developer Preview might break Dictionary
3206 Reviewed by Dan Bernstein.
3208 * WebView/WebFrame.mm:
3209 (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3210 (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3211 * WebView/WebHTMLView.mm:
3212 (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3213 that Dictionary.app is using.
3215 2008-12-08 Anders Carlsson <andersca@apple.com>
3217 Reviewed by Darin Adler.
3219 More work towards getting NPN_GetURL working.
3221 * Plugins/Hosted/HostedNetscapePluginStream.h:
3222 Inherit from NetscapePlugInStreamLoaderClient.
3224 (WebKit::HostedNetscapePluginStream::streamID):
3225 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3226 (WebKit::HostedNetscapePluginStream::startStream):
3227 Keep track of the resposne URL and the MIME type. Pass the response URL to the
3230 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3231 Disconnect the stream.
3233 (WebKit::HostedNetscapePluginStream::start):
3234 Create a plug-in stream loader and start loading.
3236 (WebKit::HostedNetscapePluginStream::stop):
3239 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3241 Fix the parameter order.
3243 (WKPCCancelLoadURL):
3244 New function that cancels a load of a stream with a given reason.
3246 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3247 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3248 (WebKit::NetscapePluginInstanceProxy::destroy):
3251 (WebKit::NetscapePluginInstanceProxy::pluginStream):
3252 Return a plug-in stream given a stream ID.
3254 (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3255 Remove the stream from the streams map.
3257 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3258 Create a stream and load it.
3260 * Plugins/Hosted/WebKitPluginClient.defs:
3263 * Plugins/Hosted/WebKitPluginHost.defs:
3264 Add responseURL to StartStream.
3266 * Plugins/WebBaseNetscapePluginView.h:
3267 * Plugins/WebBaseNetscapePluginView.mm:
3268 (-[WebBaseNetscapePluginView pluginPackage]):
3269 Move this down to the base class from WebNetscapePluginView.
3271 * Plugins/WebNetscapePluginView.h:
3272 * Plugins/WebNetscapePluginView.mm:
3274 2008-12-08 Dan Bernstein <mitz@apple.com>
3276 Reviewed by John Sullivan.
3278 - WebKit/mac part of tracking the global history item for a WebView
3280 * WebView/WebView.mm:
3281 (-[WebView _globalHistoryItem]): Added. Returns the page's global
3283 * WebView/WebViewPrivate.h:
3285 2008-12-06 Simon Fraser <simon.fraser@apple.com>
3287 Reviewed by Dave Hyatt
3289 https://bugs.webkit.org/show_bug.cgi?id=15671
3291 VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3293 * WebView/WebFrame.mm:
3294 (-[WebFrame _caretRectAtNode:offset:affinity:]):
3296 2008-12-06 David Kilzer <ddkilzer@apple.com>
3298 Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3300 <https://bugs.webkit.org/show_bug.cgi?id=22666>
3302 Reviewed by Darin Adler.
3304 * DOM/WebDOMOperations.mm:
3305 (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3306 ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3308 2008-12-05 Alexey Proskuryakov <ap@webkit.org>
3310 Reviewed by Darin Adler.
3312 <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3313 in Safari before opening a mail message in Mail
3315 * Carbon/CarbonWindowAdapter.m: Removed.
3316 * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3317 (+[CarbonWindowAdapter initialize]):
3318 * History/WebBackForwardList.mm:
3319 (+[WebBackForwardList initialize]):
3320 * History/WebHistoryItem.mm:
3321 (+[WebHistoryItem initialize]):
3322 * Misc/WebElementDictionary.mm:
3323 (+[WebElementDictionary initialize]):
3324 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3325 (+[WebHostedNetscapePluginView initialize]):
3326 * Plugins/WebBaseNetscapePluginView.mm:
3327 * Plugins/WebBasePluginPackage.m: Removed.
3328 * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3329 (+[WebBasePluginPackage initialize]):
3330 * Plugins/WebNetscapePluginView.mm:
3331 (+[WebNetscapePluginView initialize]):
3332 * WebCoreSupport/WebEditorClient.mm:
3333 (+[WebEditCommand initialize]):
3334 * WebCoreSupport/WebFrameLoaderClient.mm:
3335 * WebView/WebArchive.mm:
3336 (+[WebArchivePrivate initialize]):
3337 * WebView/WebDataSource.mm:
3338 (+[WebDataSourcePrivate initialize]):
3339 * WebView/WebHTMLView.mm:
3340 (+[WebHTMLViewPrivate initialize]):
3341 (+[WebHTMLView initialize]):
3342 * WebView/WebResource.mm:
3343 (+[WebResourcePrivate initialize]):
3344 * WebView/WebView.mm:
3345 (+[WebViewPrivate initialize]):
3346 Call JSC::initializeThreading();
3348 2008-12-04 Stephanie Lewis <slewis@apple.com>
3352 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3355 2008-12-04 Anders Carlsson <andersca@apple.com>
3357 Reviewed by Sam Weinig.
3359 More work on streams.
3361 * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
3362 (WebKit::HostedNetscapePluginStream::create):
3363 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
3364 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3365 (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
3366 (WebKit::HostedNetscapePluginStream::startStream):
3367 (WebKit::HostedNetscapePluginStream::didReceiveData):
3368 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3369 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3370 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3371 (WebKit::NetscapePluginInstanceProxy::pluginView):
3372 (WebKit::NetscapePluginInstanceProxy::hostProxy):
3373 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3374 (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
3375 (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
3376 (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
3377 (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
3378 (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
3379 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3380 (WebKit::NetscapePluginInstanceProxy::performRequest):
3381 (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3382 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3383 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3384 * Plugins/Hosted/WebKitPluginHost.defs:
3386 2008-12-04 Anders Carlsson <andersca@apple.com>
3388 Reviewed by Sam Weinig.
3390 Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3391 but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3392 implementations can share more code.
3394 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3396 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3397 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3398 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3399 (WebKit::NetscapePluginInstanceProxy::loadURL):
3400 (WebKit::NetscapePluginInstanceProxy::performRequest):
3401 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3402 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3403 * Plugins/Hosted/WebKitPluginClient.defs:
3404 * Plugins/Hosted/WebKitPluginHost.defs:
3406 2008-12-04 Anders Carlsson <andersca@apple.com>
3408 Reviewed by Dan Bernstein.
3410 Move requestWithURLCString to WebBaseNetscapePluginView.
3412 * Plugins/WebBaseNetscapePluginView.h:
3413 * Plugins/WebBaseNetscapePluginView.mm:
3414 (-[WebBaseNetscapePluginView requestWithURLCString:]):
3415 * Plugins/WebNetscapePluginView.mm:
3417 2008-12-03 Anders Carlsson <andersca@apple.com>
3419 Reviewed by Sam Weinig.
3421 Move WebPluginRequest to its own file.
3423 * Plugins/WebNetscapePluginView.mm:
3424 * Plugins/WebPluginRequest.h: Added.
3425 * Plugins/WebPluginRequest.m: Added.
3426 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3427 (-[WebPluginRequest dealloc]):
3428 (-[WebPluginRequest request]):
3429 (-[WebPluginRequest frameName]):
3430 (-[WebPluginRequest isCurrentEventUserGesture]):
3431 (-[WebPluginRequest sendNotification]):
3432 (-[WebPluginRequest notifyData]):
3434 2008-12-03 Anders Carlsson <andersca@apple.com>
3436 Handle the CA model.
3438 * Plugins/WebNetscapePluginView.mm:
3439 (-[WebNetscapePluginView setWindowIfNecessary]):
3441 2008-12-03 Anders Carlsson <andersca@apple.com>
3443 Reviewed by Kevin Decker.
3445 <rdar://problem/6412293>
3446 Call NPP_SetWindow for CA plug-ins.
3448 * Plugins/WebNetscapePluginView.mm:
3449 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3450 (-[WebNetscapePluginView restorePortState:]):
3451 (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
3452 (-[WebNetscapePluginView updateAndSetWindow]):
3453 (-[WebNetscapePluginView setWindowIfNecessary]):
3455 2008-12-03 Anders Carlsson <andersca@apple.com>
3457 Fix the release build.
3459 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3460 (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
3462 2008-12-03 Anders Carlsson <andersca@apple.com>
3464 Reviewed by Dan Bernstein.
3466 <rdar://problem/6412234>
3467 Don't crash if we can't launch the plug-in host.
3469 * Plugins/Hosted/NetscapePluginHostManager.mm:
3470 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3472 2008-12-02 Anders Carlsson <andersca@apple.com>
3474 Reviewed by Dan Bernstein.
3476 Start processing messages sent to the client port.
3478 * Plugins/Hosted/NetscapePluginHostProxy.h:
3479 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3480 Add a map from ports to plug-in proxies. Turn the set of instances into a map from
3481 pluginID to instance proxy.
3484 Look up the right instance proxy and call status().
3486 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3487 (WebKit::NetscapePluginInstanceProxy::pluginID):
3488 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3489 (WebKit::NetscapePluginInstanceProxy::status):
3492 * Plugins/Hosted/WebKitPluginClient.defs:
3493 Add the plug-in ID to StatusText.
3495 2008-12-02 Gregory Hughes <ghughes@apple.com>
3497 Reviewed by Beth Dakin.
3499 Bug 22513: ZOOM: text selection does not send correct zoom bounds
3501 When zoomed, text selection must send the zoom bounds in flipped
3504 * WebCoreSupport/WebViewFactory.mm:
3505 (-[WebViewFactory accessibilityConvertScreenRect:]):
3507 2008-12-02 Anders Carlsson <andersca@apple.com>
3509 Reviewed by Dan Bernstein.
3511 Create a client mach port and pass it to the plug-in host.
3513 * Plugins/Hosted/NetscapePluginHostManager.h:
3514 * Plugins/Hosted/NetscapePluginHostManager.mm:
3515 (WebKit::NetscapePluginHostManager::hostForPackage):
3516 (WebKit::NetscapePluginHostManager::spawnPluginHost):
3517 * Plugins/Hosted/NetscapePluginHostProxy.h:
3518 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3519 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3520 * Plugins/Hosted/WebKitPluginHost.defs:
3522 2008-12-02 Anders Carlsson <andersca@apple.com>
3524 Reviewed by Sam Weinig.
3526 Let the plug-in views know if the plug-in host crashes.
3528 * Plugins/Hosted/NetscapePluginHostManager.h:
3529 * Plugins/Hosted/NetscapePluginHostManager.mm:
3530 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3531 * Plugins/Hosted/NetscapePluginHostProxy.h:
3532 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3533 (WebKit::NetscapePluginHostProxy::pluginHostDied):
3534 (WebKit::NetscapePluginHostProxy::addPluginInstance):
3535 (WebKit::NetscapePluginHostProxy::removePluginInstance):
3537 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3538 (WebKit::NetscapePluginInstanceProxy::create):
3539 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3540 Keep a pointer to the host proxy.
3542 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3543 Add the instance to the host set.
3545 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3546 Remove the instance form the host set.
3548 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3549 Tell the plug-in view that the plug-in died.
3551 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3552 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3553 (-[WebHostedNetscapePluginView createPlugin]):
3554 Pass the plug-in view to the instantiatePlugin.
3556 (-[WebHostedNetscapePluginView pluginHostDied]):
3557 Handle the plug-in host crashing.
3559 (-[WebHostedNetscapePluginView drawRect:]):
3560 Fill the plug-in view with a nice red shade if the plug-in crashes.
3562 2008-12-01 Anders Carlsson <andersca@apple.com>
3564 Reviewed by Dan Bernstein.
3566 Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
3568 * Plugins/Hosted/NetscapePluginHostManager.h:
3569 * Plugins/Hosted/NetscapePluginHostManager.mm:
3570 (WebKit::NetscapePluginHostManager::pluginHostDied):
3571 Remove the plug-in host from the map.
3573 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3574 NetscapePluginHostProxy is no longer refcounted.
3576 * Plugins/Hosted/NetscapePluginHostProxy.h:
3577 This is no longer refcounted. Add a set of plug-in instances (unused for now).
3579 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3580 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3581 Create a death notification port.
3583 (WebKit::NetscapePluginHostProxy::pluginHostDied):
3584 Tell the manager that we're gone and delete ourselves.
3586 (WebKit::NetscapePluginHostProxy::deathPortCallback):
3587 New CFMachPort callback.
3589 2008-12-01 Anders Carlsson <andersca@apple.com>
3591 Reviewed by Dan Bernstein.
3593 Move instantiatePlugin to NetscapePluginHostManager.
3595 * Plugins/Hosted/NetscapePluginHostManager.h:
3596 * Plugins/Hosted/NetscapePluginHostManager.mm:
3597 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3598 * Plugins/Hosted/NetscapePluginHostProxy.h:
3599 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3600 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3601 (-[WebHostedNetscapePluginView createPlugin]):