fdaccab11b9fb96751bb0903057af6dfdf6b20c1
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2009-02-22  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Darin Adler.
4
5         - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
6
7         * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
8         in r30741, and assign the height value, rather than the width, to the
9         "height" parameter.
10
11 2009-02-21  Anders Carlsson  <andersca@apple.com>
12
13         Fix build.
14         
15         * Plugins/Hosted/WebTextInputWindowController.m:
16
17 2009-02-20  Anders Carlsson  <andersca@apple.com>
18
19         Reviewed by Dan Bernstein.
20
21         Add a shared floating text input window implementation, to be used by the hosted plug-in view.
22         
23         * Plugins/Hosted/WebTextInputWindowController.h: Added.
24         * Plugins/Hosted/WebTextInputWindowController.m: Added.
25
26 2009-02-20  Kevin Decker  <kdecker@apple.com>
27
28         Reviewed by andersca.
29     
30         <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
31          
32          Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
33          we are trying to set. Depending on what other I/O is going on, it can take some time. 
34
35         * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
36         (setMetaData): Added. Calls WKSetMetadataURL().
37         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread 
38  
39 2009-02-19  Dan Bernstein  <mitz@apple.com>
40
41         Reviewed by Sam Weinig.
42
43         - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
44           Do not send loader callbacks during CSS styling
45
46         * WebView/WebView.mm:
47         (-[WebView _preferencesChangedNotification:]): Reverted the
48         iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
49
50 2009-02-18  Dan Bernstein  <mitz@apple.com>
51
52         Reviewed by Brady Eidson.
53
54         - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
55
56         * WebView/WebView.mm:
57         (-[WebView _preferencesChangedNotification:]): Activate the WebCore
58         workaround for this crash in iChat.
59
60 2009-02-18  Anders Carlsson  <andersca@apple.com>
61
62         Reviewed by Sam Weinig.
63
64         Fix for <rdar://problem/6542390>
65         
66         There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
67         would cause a load to begin.
68         
69         * Plugins/WebNetscapePluginView.mm:
70         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
71
72 2009-02-18  Adam Roben  <aroben@apple.com>
73
74         Add SPI to get WebKit's custom pointing-hand cursor
75
76         Reviewed by John Sullivan.
77
78         * WebView/WebView.mm:
79         (+[WebView _pointingHandCursor]): Added. Returns the custom
80         pointing-hand cursor that WebKit uses.
81         * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
82
83 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
84
85         Reviewed by Antti Koivisto.
86
87         https://bugs.webkit.org/show_bug.cgi?id=23917
88         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
89         element.
90
91         * Plugins/WebPluginContainerPrivate.h:
92         * Plugins/WebPluginController.mm:
93         (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
94         (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
95         (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
96
97         * WebCoreSupport/WebFrameLoaderClient.mm:
98         (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
99         file extension, only want a match for the new MIME type proxy plug-ins should have.
100
101 2009-02-13  Anders Carlsson  <andersca@apple.com>
102
103         Reviewed by Kevin Decker.
104
105         <rdar://problem/6584834> ESPN radio live stream link hangs Safari 
106
107         When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
108         defer destruction until we're done executing the script.
109         
110         * Plugins/Hosted/NetscapePluginHostProxy.mm:
111         (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
112         (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
113         Add a simple RAII object for deferring destruction of the plug-in instance.
114         
115         (WKPCEvaluate):
116         (WKPCInvoke):
117         (WKPCInvokeDefault):
118         (WKPCConstruct):
119         (WKPCGetProperty):
120         (WKPCSetProperty):
121         (WKPCRemoveProperty):
122         (WKPCHasProperty):
123         (WKPCHasMethod):
124         Use the PluginDestroyDeferrer.
125         
126         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
127         (WebKit::NetscapePluginInstanceProxy::pluginID):
128         Assert that the plug-in ID is not 0 here.
129         
130         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
131         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
132         Initialize the call depth.
133         
134         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
135         Set the plug-in ID to 0 to aid debugging.
136         
137         (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
138         Increment the call depth.
139         
140         (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
141         Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
142         
143         (WebKit::NetscapePluginInstanceProxy::shouldStop):
144         If we're called this with a non-zero call depth, set shouldStopSoon to true.
145         
146         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
147         (-[WebHostedNetscapePluginView shouldStop]):
148         Call the proxy.
149
150 2009-02-12  Brady Eidson  <beidson@apple.com>
151
152         Reviewed by Kevin Decker
153
154         <rdar://problem/6582180> - Wrong HTTP method applied to history item.
155
156         * WebCoreSupport/WebFrameLoaderClient.mm:
157         (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
158           redirected request.
159
160 2009-02-12  Anders Carlsson  <andersca@apple.com>
161
162         Reviewed by Kevin Decker.
163
164         <rdar://problem/6579412> 
165         REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
166         
167         * Plugins/WebNetscapePluginView.h:
168         * Plugins/WebNetscapePluginView.mm:
169         (-[WebNetscapePluginView userAgent]):
170         Apply workaround for Silverlight workaround.
171         
172         (-[WebNetscapePluginView _createPlugin]):
173         Check if the plug-in that we're creating is the silverlight plug-in.
174
175 2009-02-12  Brady Eidson  <beidson@apple.com>
176
177         Reviewed by Darin Adler
178
179         Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
180
181         * History/WebBackForwardList.mm:
182         (-[WebBackForwardList dealloc]): Null check before deref()'ing.
183         (-[WebBackForwardList finalize]): Ditto.
184
185         * Misc/WebIconFetcher.mm:
186         (-[WebIconFetcher dealloc]): Null check before deref()'ing.
187         (-[WebIconFetcher finalize]): Ditto.
188
189         * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
190         (-[WebEditCommand initWithEditCommand:]):
191         (-[WebEditCommand dealloc]):
192         (-[WebEditCommand finalize]):
193         (-[WebEditCommand command]):
194
195         * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
196         (-[WebArchivePrivate init]):
197         (-[WebArchivePrivate initWithCoreArchive:]):
198         (-[WebArchivePrivate coreArchive]):
199         (-[WebArchivePrivate setCoreArchive:]):
200         (-[WebArchivePrivate dealloc]):
201         (-[WebArchivePrivate finalize]):
202
203         * WebView/WebDataSource.mm: 
204         (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
205         (-[WebDataSourcePrivate finalize]): Ditto.
206
207 2009-02-12  Brady Eidson  <beidson@apple.com>
208
209         Reviewed by Kevin Decker
210
211         <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
212
213         NSHTMLReader tries to create a WebArchive from a random chunk of data.  Previously, WebArchive creation would
214         fail and return nil and NSHTMLReader would try something else.  When we changed the behavior to return an invalid
215         WebArchive object, things started getting weird.
216
217         * WebView/WebArchive.mm:
218         (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
219         (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
220         (-[WebArchivePrivate finalize]): Ditto
221         (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
222
223 2009-02-11  Mark Rowe  <mrowe@apple.com>
224
225         Fix the build.
226
227         * History/WebHistory.mm:
228         (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
229
230 2009-02-11  Brady Eidson  <beidson@apple.com>
231
232         Reviewed by Mark Rowe
233
234         <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
235
236         Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
237         and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
238         which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
239
240         * History/WebHistory.mm:
241         (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
242         (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
243           if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
244           recent entry for a given URL will be used.
245         (-[WebHistoryPrivate addItems:]):
246         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): 
247
248 2009-02-11  Dimitri Dupuis-latour  <dupuislatour@apple.com>
249
250         Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
251         This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
252
253         Reviewed by Timothy Hatcher.
254
255         * WebCoreSupport/WebInspectorClient.h:
256         * WebCoreSupport/WebInspectorClient.mm:
257         (WebInspectorClient::hiddenPanels):
258
259 2009-02-11  Alexey Proskuryakov  <ap@webkit.org>
260
261         Reviewed by Darin Adler.
262
263         <rdar://problem/6562920> Pasted text should be normalized to NFC
264
265         * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
266         -[NSString precomposedStringWithCanonicalMapping].
267
268         * WebCoreSupport/WebPasteboardHelper.mm:
269         (WebPasteboardHelper::plainTextFromPasteboard): Ditto. 
270
271         * WebView/WebHTMLView.mm:
272         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
273         Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
274         precomposed already, and the conversion is performed outside WebKit for those anyway.
275
276 2009-02-10  John Sullivan  <sullivan@apple.com>
277
278         Reviewed by Dan Bernstein
279         
280         <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
281         Negative visit counts stored in History.plist aren't corrected.
282         
283         It's not clear how a huge negative visit count ended up in History.plist, but we can't
284         trust data read from disk so we can at least reset this to something sane. WebCore has
285         no guard against a visit count overflowing an int, but that seems very unlikely to have
286         caused this.
287
288         * History/WebHistoryItem.mm:
289         (-[WebHistoryItem initFromDictionaryRepresentation:]):
290         If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
291         weekly visit count is in the dictionary, replace it with 0. 
292
293 2009-02-10  John Sullivan  <sullivan@apple.com>
294
295         Reviewed by Dan Bernstein
296         
297         <https://bugs.webkit.org/show_bug.cgi?id=23891>
298         [WebHistoryItem _setVisitCount:] is unused and should be removed
299
300         * History/WebHistoryItem.mm:
301         (-[WebHistoryItem _setVisitCount:]):
302         removed this unused method, which is a synonym for setVisitCount: that was introduced
303         recently and abandoned even more recently
304
305         * History/WebHistoryItemInternal.h:
306         removed declaration of _setVisitCount:
307
308 2009-02-10  Anders Carlsson  <andersca@apple.com>
309
310         Reviewed by Mark Rowe.
311
312         <rdar://problem/6573916> 
313         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
314         
315         * Plugins/Hosted/NetscapePluginHostManager.mm:
316         (WebKit::NetscapePluginHostManager::instantiatePlugin):
317         If we failed to instantiate the plug-in, invalidate the instance proxy.
318         
319         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
320         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
321         (WebKit::NetscapePluginInstanceProxy::invalidate):
322         Remove the instance from the plug-in host's set.
323         
324         (WebKit::NetscapePluginInstanceProxy::destroy):
325         Call invalidate().
326
327 2009-02-09  Mark Rowe  <mrowe@apple.com>
328
329         Reviewed by Dan Bernstein.
330
331         Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
332         Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
333
334         * WebView/WebHTMLView.mm:
335         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
336         yet been initialized if this WebHTMLView was loaded from a nib.
337         (-[WebHTMLView _removeSuperviewObservers]): Ditto.
338
339 2009-02-09  Eric Seidel  <eric@webkit.org>
340
341         Reviewed by Dave Hyatt.
342
343         Rename Selection to VisibleSelection to allow us to separate
344         the selections the user works with from the ones used by
345         the JS editing APIs.
346         https://bugs.webkit.org/show_bug.cgi?id=23852
347
348         * WebView/WebFrame.mm:
349         (-[WebFrame _selectNSRange:]):
350         * WebView/WebView.mm:
351         (-[WebView textIteratorForRect:]):
352
353 2009-02-06  Anders Carlsson  <andersca@apple.com>
354
355         Reviewed by Kevin Decker.
356         
357         Fix crash when plug-in host dies.
358         
359         * Plugins/Hosted/HostedNetscapePluginStream.mm:
360         (WebKit::HostedNetscapePluginStream::didFail):
361
362 2009-02-05  Eric Seidel  <eric@webkit.org>
363
364         Reviewed by Justin Garcia.
365
366         DOMSelection.getRangeAt() returns a different range than the selection
367         https://bugs.webkit.org/show_bug.cgi?id=23601
368
369         Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
370
371         * WebView/WebFrame.mm:
372         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
373         (-[WebFrame _markDOMRange]):
374         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
375         (-[WebFrame _selectedNSRange]):
376         * WebView/WebHTMLView.mm:
377         (-[WebHTMLView _selectedRange]):
378         (-[WebTextCompleteController doCompletion]):
379         (-[WebHTMLView selectedAttributedString]):
380         * WebView/WebView.mm:
381         (-[WebView textIteratorForRect:]):
382         (-[WebView selectedDOMRange]):
383
384 2009-02-06  Geoffrey Garen  <ggaren@apple.com>
385
386         Reviewed by Sam Weinig.
387
388         Part III of <rdar://problem/6552272>.
389         
390         Refactored to use the redirect data WebCore makes available, instead of
391         tracking loading state in WebKit.
392         
393         * History/WebHistory.mm:
394         (-[WebHistoryPrivate dealloc]):
395         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
396         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
397         * History/WebHistoryInternal.h:
398         * WebCoreSupport/WebFrameLoaderClient.h:
399         * WebCoreSupport/WebFrameLoaderClient.mm:
400         (WebFrameLoaderClient::updateGlobalHistory):
401         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
402
403 2009-02-06  Anders Carlsson  <andersca@apple.com>
404
405         Reviewed by Sam Weinig.
406
407         <rdar://problem/6562220> 
408         CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
409         
410         Make the handling of crashes in the plug-in host more robust.
411         
412         * Plugins/Hosted/NetscapePluginHostProxy.h:
413         Add m_portSet.
414         
415         * Plugins/Hosted/NetscapePluginHostProxy.mm:
416         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
417         Initialize m_portSet.
418         
419         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
420         Free m_portSet.
421         
422         (WebKit::NetscapePluginHostProxy::processRequests):
423         Listen for messages on the port set. If we get a message to the port death notification port,
424         then call pluginHostDied. Otherwise, process the message.
425         
426         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
427         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
428         (WebKit::NetscapePluginInstanceProxy::cleanup):
429         Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
430         
431         (WebKit::NetscapePluginInstanceProxy::destroy):
432         Call cleanup().
433         
434         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
435         Call cleanup().
436         
437         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
438         Call NetscapePluginHostProxy::processRequests.
439         
440         * Plugins/Hosted/ProxyInstance.mm:
441         (WebKit::ProxyInstance::invalidate):
442         Add a null check for the host proxy.
443
444 2009-02-06  Dan Bernstein  <mitz@apple.com>
445
446         - try to fix the Tiger build
447
448         * Misc/WebNSArrayExtras.h:
449
450 2009-02-06  Anders Carlsson  <andersca@apple.com>
451
452         Reviewed by Dan Bernstein.
453
454         <rdar://problem/6563650> 
455         Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
456                 
457         * Plugins/WebNetscapePluginView.mm:
458         (-[WebNetscapePluginView loadStream]):
459         (-[WebNetscapePluginView pluginView:receivedData:]):
460         (-[WebNetscapePluginView _shouldCancelSrcStream]):
461
462 2009-02-05  Maciej Stachowiak  <mjs@apple.com> and Brady Eidson  <beidson@apple.com>
463
464         Reviewed by Dan Bernstein and Geoff Garen.
465
466         - WebKit code to track per-day and per-week visit counts in history
467
468         For now this data is only exposed via SPI for performance reasons.
469         
470         * History/WebHistoryItem.mm:
471         (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
472         for new data.
473         (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
474         (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
475         (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
476         (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
477         * History/WebHistoryItemInternal.h: Declare new methods.
478         * History/WebHistoryItemPrivate.h: Ditto.
479
480         * History/WebHistory.mm:
481         (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
482         the new _recordInitialVisit method instead of setting visit count to 1.
483
484         * Misc/WebNSArrayExtras.h:
485         * Misc/WebNSArrayExtras.m:
486         (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
487         (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
488         
489 2009-02-05  Aaron Boodman  <aa@chromium.org>
490
491         Reviewed by Dave Hyatt.
492
493         https://bugs.webkit.org/show_bug.cgi?id=23708
494         Adds documentElementAvailable() callback to FrameLoaderClient.
495
496         * WebCoreSupport/WebFrameLoaderClient.h:
497         Stub out documentElementAvailable().
498         * WebCoreSupport/WebFrameLoaderClient.mm:
499         Ditto.
500
501 2009-02-05  Dan Bernstein  <mitz@apple.com>
502
503         - build fix
504
505         * WebView/WebScriptDebugger.mm:
506         (WebScriptDebugger::initGlobalCallFrame):
507
508 2009-02-05  Beth Dakin  <bdakin@apple.com>
509
510         Reviewed by John Sullivan and Brady Eidson.
511
512         Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a 
513         mail note message doesn't display it in Mail's preview pane
514
515         This was failing because revision 36962 removed a version of 
516         setVerticalScrollingMode that mail calls. This patch simply adds 
517         that method back.
518
519         * WebView/WebDynamicScrollBarsView.m:
520         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
521
522 2009-02-04  Anders Carlsson  <andersca@apple.com>
523
524         Build fix fix.
525
526         * WebView/WebScriptDebugger.mm:
527         (WebScriptDebugger::initGlobalCallFrame):
528
529 2009-02-04  Anders Carlsson  <andersca@apple.com>
530
531         Reviewed by Sam Weinig.
532         
533         Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
534         
535         Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
536         
537         * Plugins/Hosted/NetscapePluginHostProxy.mm:
538         (WKPCEvaluate):
539         (WKPCInvoke):
540         (WKPCGetProperty):
541         (WKPCHasProperty):
542         (WKPCHasMethod):
543         * Plugins/Hosted/WebKitPluginClient.defs:
544         * Plugins/Hosted/WebKitPluginHost.defs:
545
546 2009-02-04  Anders Carlsson  <andersca@apple.com>
547
548         Reviewed by Mark Rowe.
549
550         Fix 64-bit build.
551         
552         * WebView/WebScriptDebugger.mm:
553         (WebScriptDebugger::initGlobalCallFrame):
554
555 2009-02-04  Geoffrey Garen  <ggaren@apple.com>
556
557         Reviewed by Mark Rowe.
558         
559         Part I of <rdar://problem/6552272>.
560
561         Clear the redirectURLs entry when first visiting a site, so sites that
562         only redirect you the first time you visit them can later learn that
563         they don't redirect.
564
565         * History/WebHistory.mm:
566         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
567
568 2009-02-04  Timothy Hatcher  <timothy@apple.com>
569
570         Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
571
572         <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
573
574         Reviewed by Oliver Hunt.
575
576         * WebView/WebScriptDebugDelegate.h:
577
578 2009-02-04  Timothy Hatcher  <timothy@apple.com>
579
580         Switched over from using the WebSafeForwarder for the Script Debug
581         delegate and added high performance CallScriptDebugDelegate functions.
582
583         <rdar://problem/6508457> Launching widget in Dashcode debugger is
584         super-slow due forwardInvocation: calling debug delegate
585
586         Reviewed by Oliver Hunt.
587
588         * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
589         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
590         * WebView/WebScriptDebugger.mm:
591         (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
592         (WebScriptDebugger::sourceParsed): Ditto.
593         (WebScriptDebugger::callEvent): Ditto.
594         (WebScriptDebugger::atStatement): Ditto.
595         (WebScriptDebugger::returnEvent): Ditto.
596         (WebScriptDebugger::exception): Ditto.
597         * WebView/WebView.mm:
598         (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
599         (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
600         method implementations for the script debug delegate. Also caches what
601         didParseSource method to use.
602         (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
603         WebScriptDebugDelegateImplementations structure.
604         (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
605         (CallDelegate): Added more overloaded versions that take different arguments.
606         (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
607         * WebView/WebViewInternal.h:
608
609 2009-02-03  Simon Fraser  <simon.fraser@apple.com>
610
611         Reviewed by Dave Hyatt
612
613         https://bugs.webkit.org/show_bug.cgi?id=23365
614         
615         Hook up accelerated compositing layers the native
616         view system on Mac.
617
618         * WebCoreSupport/WebChromeClient.h:
619         * WebCoreSupport/WebChromeClient.mm:
620         (WebChromeClient::attachRootGraphicsLayer):
621         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
622         New methods to hook up the root GraphicsLayer to the native
623         view system, and to synchronize layer changes with view-based
624         drawing when layers come and go.
625
626         * WebView/WebHTMLView.mm:
627         (-[WebHTMLViewPrivate clear]):
628         Clear the pointer to layerHostingView.
629
630         (-[WebHTMLView _setAsideSubviews]):
631         (-[WebHTMLView willRemoveSubview:]):
632         Keep the special layer-hosting view in the subviews even 
633         when the rest of the subviews are ripped out for
634         painting.
635
636         (-[WebHTMLView _isUsingAcceleratedCompositing]):
637         New utility method for DumpRenderTree to know if we're
638         hosting layers.
639
640         (-[WebHTMLView drawRect:]):
641         Call -disableScreenUpdatesUntilFlush if we have to
642         synchronize layer changes with painting.
643
644         (-[WebHTMLView attachRootLayer:]):
645         (-[WebHTMLView detachRootLayer]):
646         Attach and detach the root GraphicsLayer.
647
648         * WebView/WebViewInternal.h:
649         * WebView/WebHTMLViewInternal.h:
650         * WebView/WebHTMLViewPrivate.h:
651         New method declarations.
652         
653         * WebView/WebView.mm:
654         (-[WebView _needsOneShotDrawingSynchronization]):
655         (-[WebView _setNeedsOneShotDrawingSynchronization:]):
656         Set the flag to say if we need to synchronize layer
657         changes and painting on the next -drawRect: call.
658
659         (-[WebView viewWillMoveToWindow:]):
660         (-[WebView viewDidMoveToWindow]):
661         Call new notifications that the view was added to or removed from
662         the window, which are required by the layer hosting mechanism.
663
664 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
665
666         Build fix.
667
668         * Plugins/WebPluginController.mm:
669         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
670
671 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
672
673         Reviewed by Sam Weinig.
674
675         Track redirects in global history.
676
677         * History/WebHistory.mm:
678         (-[WebHistoryPrivate dealloc]):
679         (-[WebHistoryPrivate lastVisitedEntry]):
680         (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
681         entry in case we're asked to add redirect information to it later.
682
683         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
684         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
685         information in global history.
686
687         * History/WebHistoryInternal.h:
688         * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
689
690         * WebCoreSupport/WebFrameLoaderClient.mm:
691         (WebFrameLoaderClient::updateGlobalHistory):
692         (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
693         information in global history.
694
695         * WebView/WebFrame.mm:
696         (-[WebFrame loadRequest:]):
697         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
698         * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
699
700 2009-02-02  Anders Carlsson  <andersca@apple.com>
701
702         Reviewed by Dan Bernstein.
703
704         Work around a limitation in MIG where two functions can't have the same name even if they're
705         not in the same subsystem.
706         
707         * Plugins/Hosted/NetscapePluginHostProxy.mm:
708         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
709         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
710         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
711         * Plugins/Hosted/WebKitPluginClient.defs:
712         * Plugins/Hosted/WebKitPluginHost.defs:
713
714 2009-02-02  Anders Carlsson  <andersca@apple.com>
715
716         Reviewed by Sam Weinig.
717
718         Implement WKPCGetPluginElementObject.
719         
720         * Plugins/Hosted/NetscapePluginHostProxy.mm:
721         (WKPCGetPluginElementNPObject):
722         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
723         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
724         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
725         * Plugins/Hosted/WebKitPluginClient.defs:
726         * Plugins/WebBaseNetscapePluginView.h:
727         * Plugins/WebBaseNetscapePluginView.mm:
728         (-[WebBaseNetscapePluginView WebCore::]):
729
730 2009-02-02  Anders Carlsson  <andersca@apple.com>
731
732         Build fix.
733         
734         * WebView/WebHTMLView.mm:
735
736 2009-02-02  Anders Carlsson  <andersca@apple.com>
737
738         Reviewed by Dan Bernstein.
739
740         Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
741         
742         * Plugins/Hosted/WebHostedNetscapePluginView.h:
743         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
744         (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
745         * Plugins/WebBaseNetscapePluginView.h:
746         * Plugins/WebBaseNetscapePluginView.mm:
747         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
748         (-[WebBaseNetscapePluginView _windowClipRect]):        
749         (-[WebBaseNetscapePluginView visibleRect]):
750         (-[WebBaseNetscapePluginView dataSource]):
751         * Plugins/WebKitPluginContainerView.h: Removed.
752         * Plugins/WebKitPluginContainerView.mm: Removed.
753         * Plugins/WebNetscapePluginView.h:
754         * Plugins/WebNetscapePluginView.mm:
755         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
756         (-[WebNetscapePluginView getVariable:value:]):
757         * WebCoreSupport/WebFrameLoaderClient.mm:
758         (WebFrameLoaderClient::createPlugin):
759
760 2009-02-02  Anders Carlsson  <andersca@apple.com>
761
762         Reviewed by Dan Bernstein.
763
764         Update for changes to WebCore.
765         
766         * WebCoreSupport/WebFrameLoaderClient.h:
767         * WebCoreSupport/WebFrameLoaderClient.mm:
768         (WebFrameLoaderClient::createPlugin):
769
770 2009-02-02  Anders Carlsson  <andersca@apple.com>
771
772         Reviewed by Oliver Hunt.
773
774         When a new Web View was not created, report back to the plug-in host.
775         
776         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
777         (WebKit::NetscapePluginInstanceProxy::performRequest):
778         * Plugins/Hosted/WebKitPluginHost.defs:
779
780 2009-02-02  Anders Carlsson  <andersca@apple.com>
781
782         Reviewed by Kevin Decker.
783
784         Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
785         
786         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
787         (-[WebHostedNetscapePluginView drawRect:]):
788
789 2009-02-02  Holger Hans Peter Freyther  <zecke@selfish.org>
790
791         Reviewed by Darin Adler.
792
793         Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
794
795         https://bugs.webkit.org/show_bug.cgi?id=23428
796
797         FrameView::forceLayout could be killed but the comment might
798         contain a value over the the plain FrameView::layout...
799
800         Adjust the WebCore/WebKit consumers of these methods.
801
802         * WebView/WebFrame.mm:
803         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
804         * WebView/WebHTMLView.mm:
805         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
806         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
807
808 2009-01-31  John Sullivan  <sullivan@apple.com>
809
810         https://bugs.webkit.org/show_bug.cgi?id=23665
811
812         Cleaned up code to add/remove NSNotification observers, to avoid performance hit
813         of calling removeObserver with unspecified notifications, or calling removeObserver
814         multiple times for the same notification.
815
816         Reviewed by Darin Adler
817
818         * WebView/WebHTMLView.mm:
819         added observingMouseMovedNotifications, observingSuperviewNotifications, and 
820         observingWindowNotifications as BOOL ivars of _private object
821         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
822         moved to file-internal section of file, added leading underscore, now bails out
823         if we aren't observing the relevant notifications, now records that we are no longer
824         observing the relevant notifications
825         (-[WebHTMLView _removeSuperviewObservers]):
826         ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
827         (-[WebHTMLView _removeWindowObservers]):
828         ditto
829         (-[WebHTMLView close]):
830         replace general removeObserver: call with three specific calls for all the notifications
831         that this class actually observes
832         (-[WebHTMLView addMouseMovedObserver]):
833         bail out if already observing relevant notifications, now records that we are observing
834         the relevant notifications
835         (-[WebHTMLView removeMouseMovedObserver]):
836         updated for name change
837         (-[WebHTMLView addSuperviewObservers]):
838         bail out if already observing relevant notifications, now records that we are observing
839         the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var 
840         to avoid objc dispatch
841         (-[WebHTMLView addWindowObservers]):
842         ditto
843         (-[WebHTMLView viewWillMoveToSuperview:]):
844         updated for name change
845         (-[WebHTMLView viewWillMoveToWindow:]):
846         updated for name changes
847
848 2009-01-31  Darin Adler  <darin@apple.com>
849
850         Reviewed by Mark Rowe.
851
852         Fix code that assumes all command selectors end in colons.
853         rdar://problem/6545874
854
855         * WebView/WebHTMLView.mm:
856         (commandNameForSelector): Don't assert, just return a null string, when
857         the selector doesn't end in a colon.
858
859 2009-01-30  Adam Barth  <abarth@webkit.org>
860
861         Reviewed by Sam Weinig.
862
863         Add a pref to disable web security.
864
865         * WebView/WebPreferenceKeysPrivate.h:
866         * WebView/WebPreferencesPrivate.h:
867         * WebView/WebPreferences.mm:
868         (+[WebPreferences initialize]):
869         (-[WebPreferences isWebSecurityEnabled]):
870         (-[WebPreferences setWebSecurityEnabled:]):
871         * WebView/WebView.mm:
872         (-[WebView _preferencesChangedNotification:]):
873
874 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
875
876         Reviewed by Darin Adler.
877
878         Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
879
880         Carry out the move and catch up in two call sites.
881
882         * WebView/WebHTMLView.mm:
883         (-[WebHTMLView _frameOrBoundsChanged]):
884
885 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
886
887         Reviewed by Darin Adler.
888
889         isFrameSet was moved from Frame to Document. Update the
890         WebKit usage.
891
892         * WebView/WebFrame.mm:
893         (-[WebFrame _isFrameSet]):
894         * WebView/WebHTMLView.mm:
895         (-[WebHTMLView knowsPageRange:]):
896
897 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
898
899         Build fix.
900
901         * WebView/WebFramePrivate.h:
902
903 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
904
905         Reviewed by Sam Weinig.
906
907         Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
908         preparation for setting them differently during a redirect.
909
910         * WebView/WebPDFView.mm:
911         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
912
913 2009-01-30  Anders Carlsson  <andersca@apple.com>
914
915         Reviewed by Sam Weinig.
916
917         Fix <rdar://problem/6544048>
918         
919         Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
920         
921         When the plug-in instance is destroyed, invalidate all proxy instances.
922         
923         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
924         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
925         (WebKit::NetscapePluginInstanceProxy::destroy):
926         (WebKit::NetscapePluginInstanceProxy::addInstance):
927         (WebKit::NetscapePluginInstanceProxy::removeInstance):
928         * Plugins/Hosted/ProxyInstance.h:
929         * Plugins/Hosted/ProxyInstance.mm:
930         (WebKit::ProxyInstance::ProxyInstance):
931         (WebKit::ProxyInstance::~ProxyInstance):
932         (WebKit::ProxyInstance::invalidate):
933
934 2009-01-30  Anders Carlsson  <andersca@apple.com>
935
936         Reviewed by Sam Weinig.
937
938         Fix <rdar://problem/6490778>.
939         
940         Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
941         validate IdentifierReps before dereferencing them.
942         
943         * Plugins/Hosted/NetscapePluginHostProxy.mm:
944         (WKPCEvaluate):
945         (WKPCGetStringIdentifier):
946         (WKPCGetIntIdentifier):
947         (identifierFromIdentifierRep):
948         (WKPCInvoke):
949         (WKPCGetProperty):
950         (WKPCSetProperty):
951         (WKPCRemoveProperty):
952         (WKPCHasProperty):
953         (WKPCHasMethod):
954         (WKPCIdentifierInfo):
955
956 2009-01-30  Brady Eidson  <beidson@apple.com>
957
958         Reviewed by Sam Weinig
959
960         Remove FrameLoaderClient code that is now handled by FrameLoader itself
961
962         * WebCoreSupport/WebFrameLoaderClient.mm:
963         (WebFrameLoaderClient::frameLoadCompleted):
964
965 2009-01-29  Stephanie Lewis <slewis@apple.com>
966
967         RS by Oliver Hunt.
968
969         Update the order files.
970
971         * WebKit.order:
972
973 2009-01-29  Sam Weinig  <sam@webkit.org>
974
975         Reviewed by Anders Carlsson.
976
977         Second step in tracking the urls a HistoryItem was redirected through
978         Add SPI to access the array of redirect urls associated with a HistoryItem.
979
980         * History/WebHistoryItem.mm:
981         (-[WebHistoryItem dictionaryRepresentation]):
982         (-[WebHistoryItem _redirectURLs]):
983         * History/WebHistoryItemPrivate.h:
984
985 2009-01-29  Anders Carlsson  <andersca@apple.com>
986
987         Reviewed by Dan Bernstein.
988
989         Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
990         
991         * Plugins/Hosted/NetscapePluginHostProxy.h:
992         * Plugins/Hosted/NetscapePluginHostProxy.mm:
993         (WebKit::NetscapePluginHostProxy::pluginHostDied):
994         Call endModal here.
995         
996         (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
997         If we're modal, we should always bring the plug-in host process to the front.
998         
999         (WebKit::NetscapePluginHostProxy::beginModal):
1000         Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1001         
1002         (WebKit::NetscapePluginHostProxy::endModal):
1003         Remove the observer.
1004
1005 2009-01-29  Sam Weinig  <sam@webkit.org>
1006
1007         Reviewed by Mark Rowe.
1008
1009         First step in tracking the urls a HistoryItem was redirected through.
1010
1011         * History/WebHistoryItem.mm:
1012         (-[WebHistoryItem initFromDictionaryRepresentation:]):
1013         (-[WebHistoryItem dictionaryRepresentation]):
1014         * Misc/WebNSDictionaryExtras.h:
1015         * Misc/WebNSDictionaryExtras.m:
1016         (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1017
1018 2009-01-29  Anders Carlsson  <andersca@apple.com>
1019
1020         Reviewed by Sam Weinig.
1021
1022         Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1023         
1024         * Plugins/Hosted/NetscapePluginHostManager.h:
1025         * Plugins/Hosted/NetscapePluginHostManager.mm:
1026         (WebKit::NetscapePluginHostManager::hostForPackage):
1027         Get the current PSN and pass it to spawnPluginHost.
1028         
1029         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1030         Pass the PSN to the "check in" function.
1031         
1032         * Plugins/Hosted/NetscapePluginHostProxy.h:
1033         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1034         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1035         
1036         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1037         Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
1038         
1039         (WebKit::NetscapePluginHostProxy::beginModal):
1040         (WebKit::NetscapePluginHostProxy::endModal):
1041         (WebKit::NetscapePluginHostProxy::setModal):
1042         Split out the code that does all of the work into beginModal and endModal methods.
1043         
1044         * Plugins/Hosted/WebKitPluginHost.defs:
1045         * Plugins/WebNetscapePluginView.mm:
1046         (-[WebNetscapePluginView loadStream]):
1047
1048 2009-01-29  David Kilzer  <ddkilzer@apple.com>
1049
1050         Remove semi-colons from the end of ObjC method implementations
1051
1052         Rubber-stamped by Adam Roben.
1053
1054         $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
1055
1056         * DefaultDelegates/WebDefaultUIDelegate.m:
1057         (-[WebDefaultUIDelegate webView:setResizable:]):
1058         (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
1059         (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
1060         (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
1061         * History/WebBackForwardList.mm:
1062         (-[WebBackForwardList addItem:]):
1063         (-[WebBackForwardList backListWithLimit:]):
1064         (-[WebBackForwardList forwardListWithLimit:]):
1065         * History/WebHistoryItem.mm:
1066         (-[WebHistoryItem alternateTitle]):
1067         (-[WebHistoryItem setViewState:]):
1068         * Misc/WebCoreStatistics.mm:
1069         (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
1070         * Misc/WebKitNSStringExtras.m:
1071         (-[NSString _web_drawAtPoint:font:textColor:]):
1072         * Plugins/WebNetscapePluginView.mm:
1073         (-[WebNetscapePluginView setAttributeKeys:andValues:]):
1074         * WebCoreSupport/WebEditorClient.mm:
1075         (-[WebEditCommand command]):
1076         * WebView/WebFrame.mm:
1077         (-[WebFrame _getVisibleRect:]):
1078         * WebView/WebHTMLRepresentation.mm:
1079         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
1080         * WebView/WebHTMLView.mm:
1081         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1082         * WebView/WebPreferences.mm:
1083         (-[WebPreferences setAllowsAnimatedImages:]):
1084         (-[WebPreferences setAutosaves:]):
1085         (-[WebPreferences PDFDisplayMode]):
1086         * WebView/WebView.mm:
1087         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1088         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
1089         (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1090         (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1091         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1092         (-[WebView _insertNewlineInQuotedContent]):
1093
1094 2009-01-28  Geoffrey Garen  <ggaren@apple.com>
1095
1096         Reviewed by Sam Weinig.
1097
1098         Updated for WebCore rename.
1099         
1100         * WebView/WebView.mm:
1101         (-[WebView setCustomTextEncodingName:]):
1102
1103 2009-01-28  David Kilzer  <ddkilzer@apple.com>
1104
1105         Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
1106
1107         Reviewed by Dan Bernstein.
1108
1109         * Misc/WebNSURLExtras.h:
1110         (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
1111         declaration after the implementation was added in r9258.
1112
1113 2009-01-28  Sam Weinig  <sam@webkit.org>
1114
1115         Reviewed by Geoff Garen.
1116
1117         Fix for <rdar://problem/6129678>
1118         REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
1119
1120         * WebView/WebScriptDebugDelegate.mm:
1121         (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
1122
1123 2009-01-27  Anders Carlsson  <andersca@apple.com>
1124
1125         Reviewed by Oliver Hunt.
1126
1127         Fix two bugs with Core Animation based plug-ins.
1128         
1129         1. The plug-in view was marked as opaque even though it's not. 
1130            (This would leave garbage in the plug-in view).
1131         2. The plug-in layer needs to have autoresizing turned on.
1132         
1133         * Plugins/WebNetscapePluginView.mm:
1134         (-[WebNetscapePluginView setLayer:]):
1135
1136 2009-01-27  Brady Eidson  <beidson@apple.com>
1137
1138         Reviewed by Dan Bernstein
1139
1140         Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
1141
1142         * History/WebHistoryItem.mm:
1143
1144         * WebCoreSupport/WebFrameLoaderClient.h:
1145         * WebCoreSupport/WebFrameLoaderClient.mm:
1146         (WebFrameLoaderClient::savePlatformDataToCachedFrame):
1147         (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1148         * WebKit.order:
1149
1150 2009-01-26  Anders Carlsson  <andersca@apple.com>
1151
1152         Reviewed by Dan Bernstein.
1153
1154         Add the ability for plug-ins to make WebKit operate in "modal mode"
1155         
1156         * Plugins/Hosted/NetscapePluginHostProxy.h:
1157         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1158         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1159         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1160         If the plug-in crashes while we're modal, make sure to leave the modal mode.
1161         
1162         (WebKit::NetscapePluginHostProxy::setModal):
1163         (WKPCSetModal):
1164         * Plugins/Hosted/WebKitPluginClient.defs:
1165
1166 2009-01-26  John Sullivan  <sullivan@apple.com>
1167
1168         fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets 
1169         stuck in the Name field rather than cycling around
1170
1171         Reviewed by Dan Bernstein
1172
1173         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
1174         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
1175         The two static text fields and the last button all had their "next key view" outlets set to the
1176         name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
1177         selectable view have exactly one "next key view" set to it.
1178
1179 2009-01-26  Anders Carlsson  <andersca@apple.com>
1180
1181         Reviewed by Sam Weinig.
1182
1183         Add the ability for a plug-in to show or hide the menu bar.
1184         
1185         * Plugins/Hosted/NetscapePluginHostProxy.h:
1186         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1187         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1188         (WebKit::NetscapePluginHostProxy::pluginHostDied):
1189         (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
1190         (WKPCSetMenuBarVisible):
1191         * Plugins/Hosted/WebKitPluginClient.defs:
1192
1193 2009-01-26  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1194
1195         Reviewed by Gavin Barraclough.
1196
1197         Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
1198         <https://bugs.webkit.org/show_bug.cgi?id=23552>
1199         <rdar://problem/6398839>
1200
1201         Dashcode will crash when using the evaluator because it saves a global call
1202         frame, even after global code has finished executing, and then uses this as
1203         a launching pad to execute new JS in the evaluator. The fix is to detect
1204         when Dashcode is attempting to do this and execute code from a global call
1205         frame instead.        
1206
1207         * ForwardingHeaders/runtime/Protect.h: Added.
1208         * WebView/WebScriptDebugDelegate.mm:
1209         (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
1210         Added debugger, a WebScriptDebugger* argument.
1211         (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
1212         a stale WebScriptCallFrame to execute new JS and evaluate it starting from
1213         the global object's global call frame instead.
1214         * WebView/WebScriptDebugger.h:
1215         (WebScriptDebugger::globalObject): Added.
1216         (WebScriptDebugger::globalCallFrame): Added.
1217         * WebView/WebScriptDebugger.mm:
1218         (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
1219         (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
1220         so that the global call frame can be saved immediately after being created.
1221         (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
1222         WebScriptCallFrame's _initWithGlobalObject method.
1223
1224 2009-01-26  Anders Carlsson  <andersca@apple.com>
1225
1226         Reviewed by Oliver Hunt.
1227
1228         Make WKPCInvoke a simpleroutine.
1229         
1230         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1231         (WKPCInvoke):
1232         * Plugins/Hosted/WebKitPluginClient.defs:
1233
1234 2009-01-26  Anders Carlsson  <andersca@apple.com>
1235
1236         Reviewed by Sam Weinig.
1237
1238         Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
1239         
1240         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1241         (WKPCBooleanAndDataReply):
1242         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1243         (WebKit::NetscapePluginInstanceProxy::Reply::):
1244         (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
1245         Rename NPObjectInvokeReply to BooleanAndDataReply.
1246         
1247         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1248         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1249         Fix a cut and paste error.
1250         
1251         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1252         Handle NPObjects.
1253         
1254         * Plugins/Hosted/ProxyInstance.h:
1255         * Plugins/Hosted/ProxyInstance.mm:
1256         (WebKit::ProxyField::valueFromInstance):
1257         (WebKit::ProxyField::setValueToInstance):
1258         Call the ProxyInstance method.
1259         
1260         (WebKit::ProxyInstance::~ProxyInstance):
1261         Release the NPObject.
1262         
1263         (WebKit::ProxyInstance::supportsConstruct):
1264         Ask the plug-in host if an instance supports construct.
1265         
1266         (WebKit::ProxyInstance::fieldValue):
1267         (WebKit::ProxyInstance::setFieldValue):
1268         Call the plug-in host methods.
1269         
1270         * Plugins/Hosted/WebKitPluginHostTypes.h:
1271         Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
1272
1273 2009-01-26  Mark Rowe  <mrowe@apple.com>
1274
1275         Fix the build.
1276
1277         Remove -Wformat=2 from the warning flags as newer versions of GCC emit
1278         warnings about non-literal format strings for uses of our UI_STRING macro.
1279
1280         * Configurations/Base.xcconfig:
1281
1282 2009-01-26  Mark Rowe  <mrowe@apple.com>
1283
1284         Rubber-stamped by Sam Weinig.
1285
1286         Clean up after r40240.
1287
1288         * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
1289         * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
1290         is back in the build.
1291
1292 2009-01-25  Darin Adler  <darin@apple.com>
1293
1294         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
1295
1296 2009-01-25  Darin Adler  <darin@apple.com>
1297
1298         Discussed with Mark Rowe; not sure he reviewed it.
1299
1300         * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
1301         -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
1302
1303 2009-01-25  Mark Rowe  <mrowe@apple.com>
1304
1305         Rubber-stamped by Dan Bernstein.
1306
1307         Improve the consistency of settings in our .xcconfig files.
1308
1309         * Configurations/Base.xcconfig: Only dead code strip the normal variant.
1310         Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
1311
1312 2009-01-25  Darin Adler  <darin@apple.com>
1313
1314         Reviewed by Sam Weinig.
1315
1316         Bug 23522: use checked casts for render tree
1317         https://bugs.webkit.org/show_bug.cgi?id=23522
1318
1319         Step one: RenderText.
1320
1321         * WebView/WebRenderNode.mm:
1322         (copyRenderNode): Use toRenderText.
1323
1324 2009-01-23  Brady Eidson  <beidson@apple.com>
1325
1326         Rubberstamped by Darin Adler
1327
1328         Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
1329
1330         * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
1331         (WebCachedFramePlatformData::WebCachedFramePlatformData):
1332         * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
1333
1334         * WebCoreSupport/WebFrameLoaderClient.mm:
1335         (WebFrameLoaderClient::savePlatformDataToCachedPage):
1336         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
1337
1338         * WebKit.order:
1339
1340 2009-01-23  Adele Peterson  <adele@apple.com>
1341
1342         Build fix.
1343
1344         Use new linesBoundingBox method instead of
1345         boundingBoxWidth and boundingBoxHeight for RenderText objects.
1346
1347         * WebView/WebRenderNode.mm: (copyRenderNode):
1348
1349 2009-01-23  Anders Carlsson  <andersca@apple.com>
1350
1351         Fix 64-bit build.
1352         
1353         * Plugins/Hosted/ProxyInstance.mm:
1354         (WebKit::proxyClass):
1355
1356 2009-01-23  Anders Carlsson  <andersca@apple.com>
1357
1358         Fix GCC 4.0 build.
1359         
1360         * Configurations/Base.xcconfig:
1361
1362 2009-01-23  Anders Carlsson  <andersca@apple.com>
1363
1364         Reviewed by Sam Weinig.
1365
1366         Turn on -Wmissing-prototypes and fix the resulting warnings.
1367
1368         * Configurations/Base.xcconfig:
1369         * History/WebHistory.mm:
1370         (timeIntervalForBeginningOfDay):
1371         * History/WebHistoryItem.mm:
1372         (historyItemWrappers):
1373         * Misc/WebNSPasteboardExtras.mm:
1374         (imageFromElement):
1375         * WebView/WebFrame.mm:
1376         * WebView/WebScriptDebugger.mm:
1377         (toNSString):
1378
1379 2009-01-22  Mark Rowe  <mrowe@apple.com>
1380
1381         Rubber-stamped by Anders Carlsson.
1382
1383         Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
1384
1385         Current versions of Xcode only respect it for C and Objective-C files,
1386         and our code doesn't currently compile if it is applied to C++ and
1387         Objective-C++ files.
1388
1389         * Configurations/Base.xcconfig:
1390
1391 2009-01-22  Anders Carlsson  <andersca@apple.com>
1392
1393         Reviewed by Sam Weinig.
1394
1395         Add support for Invoke and InvokeDefault. Clean up code.
1396         
1397         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1398         (WKPCBooleanReply):
1399         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1400         (WebKit::NetscapePluginInstanceProxy::Reply::):
1401         (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
1402         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1403         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1404         * Plugins/Hosted/ProxyInstance.h:
1405         * Plugins/Hosted/ProxyInstance.mm:
1406         (WebKit::ProxyInstance::invoke):
1407         (WebKit::ProxyInstance::invokeMethod):
1408         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
1409         (WebKit::ProxyInstance::invokeDefaultMethod):
1410         (WebKit::ProxyInstance::methodsNamed):
1411         (WebKit::ProxyInstance::fieldNamed):
1412         * Plugins/Hosted/WebKitPluginClient.defs:
1413         * Plugins/Hosted/WebKitPluginHost.defs:
1414         * Plugins/Hosted/WebKitPluginHostTypes.h:
1415
1416 2009-01-22  Eric Roman  <eroman@chromium.og>
1417
1418         Reviewed by Eric Seidel.
1419
1420         https://bugs.webkit.org/show_bug.cgi?id=20806
1421         Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
1422
1423         * History/WebHistoryItem.mm:
1424         (-[WebHistoryItem RSSFeedReferrer]):
1425         (-[WebHistoryItem setRSSFeedReferrer:]):
1426
1427 2009-01-22  Anders Carlsson  <andersca@apple.com>
1428
1429         Reviewed by Kevin Decker.
1430
1431         Don't crash or hang when we fail to instantiate a plug-in.
1432         
1433         * Plugins/Hosted/NetscapePluginHostManager.mm:
1434         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1435         Return 0 on failure.
1436         
1437         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1438         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1439         Null check for the proxy member.
1440
1441 2009-01-21  David Hyatt  <hyatt@apple.com>
1442
1443         Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
1444
1445         Reviewed by Eric Seidel and Darin Adler
1446
1447         * WebView/WebRenderNode.mm:
1448         (copyRenderNode):
1449
1450 2009-01-21  Anders Carlsson  <andersca@apple.com>
1451
1452         Reviewed by Sam Weinig.
1453
1454         More browser->plug-in scripting support.
1455         
1456         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1457         (WKPCNPObjectHasPropertyReply):
1458         (WKPCNPObjectHasMethodReply):
1459         (WKPCNPObjectInvokeReply):
1460         MIG reply functions.
1461         
1462         (WKPCIdentifierInfo):
1463         Return information about an identifier given its 64-bit value.
1464         
1465         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1466         Add new reply structs.
1467         
1468         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1469         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1470         Split out code that adds values to the arrays from marshalValue.
1471         
1472         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1473         Call addValueToArray.
1474     
1475         (WebKit::NetscapePluginInstanceProxy::marshalValues):
1476         Marshal a list of values.
1477         
1478         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1479         Actually create a proxy instance.
1480         
1481         * Plugins/Hosted/ProxyInstance.h:
1482         * Plugins/Hosted/ProxyInstance.mm:
1483         (WebKit::ProxyClass::methodsNamed):
1484         (WebKit::ProxyClass::fieldNamed):
1485         Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
1486         
1487         (WebKit::proxyClass):
1488         Shared proxyClass getter.
1489         
1490         (WebKit::ProxyField::ProxyField):
1491         (WebKit::ProxyField::valueFromInstance):
1492         (WebKit::ProxyField::setValueToInstance):
1493         Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
1494         
1495         (WebKit::ProxyMethod::ProxyMethod):
1496         (WebKit::ProxyMethod::serverIdentifier):
1497         (WebKit::ProxyMethod::numParameters):
1498         Add a dummy ProxyMethod class.
1499         
1500         (WebKit::ProxyInstance::invokeMethod):
1501         Call _WKPHNPObjectInvoke.
1502         
1503         (WebKit::ProxyInstance::defaultValue):
1504         (WebKit::ProxyInstance::stringValue):
1505         (WebKit::ProxyInstance::numberValue):
1506         (WebKit::ProxyInstance::booleanValue):
1507         (WebKit::ProxyInstance::valueOf):
1508         Add dummy implementations (taken from CInstance).
1509         
1510         (WebKit::ProxyInstance::methodsNamed):
1511         Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
1512         
1513         (WebKit::ProxyInstance::fieldNamed):
1514         Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
1515         
1516         * Plugins/Hosted/WebKitPluginClient.defs:
1517         * Plugins/Hosted/WebKitPluginHost.defs:
1518         Add new MIG definitions.
1519
1520 2009-01-21  Mark Rowe  <mrowe@apple.com>
1521
1522         Reviewed by Tim Hatcher.
1523
1524         Clean up how we force invocations of API that happened on background threads over to the main thread.
1525
1526         This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
1527         and return values back from the function.  The new approach is to use a proxy object that forwards an
1528         NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
1529         call site.
1530
1531         * Misc/WebNSObjectExtras.h:
1532         * Misc/WebNSObjectExtras.mm:
1533         (-[WebMainThreadInvoker initWithTarget:]):
1534         (-[WebMainThreadInvoker forwardInvocation:]):
1535         (-[WebMainThreadInvoker methodSignatureForSelector:]):
1536         (-[WebMainThreadInvoker handleException:]):
1537         (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
1538         raised back to the WebMainThreadInvoker.
1539         (-[NSObject _webkit_invokeOnMainThread]):
1540
1541         The following methods are updated to use the proxy object to forward methods to the main thread:
1542
1543         * WebView/WebArchive.mm:
1544         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1545         (-[WebArchive mainResource]):
1546         (-[WebArchive subresources]):
1547         (-[WebArchive subframeArchives]):
1548         * WebView/WebResource.mm:
1549         (-[WebResource data]):
1550         (-[WebResource URL]):
1551         (-[WebResource MIMEType]):
1552         (-[WebResource textEncodingName]):
1553         (-[WebResource frameName]):
1554         (-[WebResource _ignoreWhenUnarchiving]):
1555         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1556         (-[WebResource _initWithData:URL:response:]):
1557         (-[WebResource _suggestedFilename]):
1558         (-[WebResource _response]):
1559         (-[WebResource _stringValue]):
1560         * WebView/WebView.mm:
1561         (-[WebView initWithFrame:frameName:groupName:]):
1562         (-[WebView initWithCoder:]):
1563
1564 2009-01-20  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1565
1566         Reviewed by George Staikos.
1567
1568         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
1569
1570         Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
1571         WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
1572
1573         * WebCoreSupport/WebEditorClient.mm:
1574         (WebEditorClient::textFieldDidBeginEditing):
1575         (WebEditorClient::textFieldDidEndEditing):
1576         (WebEditorClient::textDidChangeInTextField):
1577         (WebEditorClient::doTextFieldCommandFromEvent):
1578         (WebEditorClient::textWillBeDeletedInTextField):
1579         (WebEditorClient::textDidChangeInTextArea):
1580
1581 2009-01-19  Anders Carlsson  <andersca@apple.com>
1582
1583         Reviewed by Sam Weinig.
1584
1585         Add and implement GetScriptableNPObject.
1586         
1587         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1588         (WKPCGetScriptableNPObjectReply):
1589         Create a new reply struct and set it as the current reply.
1590         
1591         (WKPCEvaluate):
1592         Get rid of an unused variable.
1593         
1594         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1595         (WebKit::NetscapePluginInstanceProxy::Reply::):
1596         (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
1597         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1598         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1599         Call _WKPHGetScriptableNPObject and wait for a reply.
1600         
1601         * Plugins/Hosted/ProxyInstance.h: Added.
1602         * Plugins/Hosted/ProxyInstance.mm: Added.
1603         Add empty files.
1604         
1605         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1606         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
1607         Call NetscapePluginInstanceProxy::createBindingsInstance.
1608         
1609         * Plugins/Hosted/WebKitPluginClient.defs:
1610         * Plugins/Hosted/WebKitPluginHost.defs:
1611         Add new declarations.
1612
1613 2009-01-19  Sam Weinig  <sam@webkit.org>
1614
1615         Rubber-stamped by Gavin Barraclough.
1616
1617         Remove temporary operator-> from JSValuePtr.
1618
1619         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1620         (WebKit::NetscapePluginInstanceProxy::invoke):
1621         (WebKit::NetscapePluginInstanceProxy::hasMethod):
1622         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1623         * WebView/WebFrame.mm:
1624         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1625         * WebView/WebView.mm:
1626         (aeDescFromJSValue):
1627
1628 2009-01-19  Anders Carlsson  <andersca@apple.com>
1629
1630         Reviewed by Sam Weinig.
1631
1632         Make Evaluate an asynchronous method that has a reply method.
1633         
1634         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1635         (WKPCEvaluate):
1636         * Plugins/Hosted/WebKitPluginClient.defs:
1637         * Plugins/Hosted/WebKitPluginHost.defs:
1638
1639 2009-01-19  Brady Eidson  <beidson@apple.com>
1640
1641         Rubberstamped by Tim Hatcher
1642
1643         Fix long standing typo.
1644
1645         * History/WebBackForwardList.h:
1646
1647 2009-01-19  Mark Rowe  <mrowe@apple.com>
1648
1649         Fix the build!
1650
1651         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1652         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
1653         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
1654
1655 2009-01-18  Mark Rowe  <mrowe@apple.com>
1656
1657         Reviewed by Anders Carlsson.
1658
1659         Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
1660         Bug 23414: Reproducible crash accessing View menu with plugins disabled
1661
1662         * WebView/WebFrame.mm:
1663         (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
1664
1665 2009-01-17  David Hyatt  <hyatt@apple.com>
1666
1667         Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
1668         are done in WebCore instead.
1669
1670         Reviewed by Oliver Hunt
1671
1672         * WebView/WebFrame.mm:
1673         (-[WebFrame _selectedString]):
1674         (-[WebFrame _stringForRange:]):
1675
1676 2009-01-17  Eric Carlson  <eric.carlson@apple.com>
1677
1678         Reviewed by Adele Peterson
1679
1680         Complete <rdar://problem/6293969>
1681
1682         * WebCoreSupport/WebSystemInterface.m:
1683         (InitWebCoreSystemInterface): Remove UseSharedMediaUI
1684
1685 2009-01-15  Brady Eidson  <beidson@apple.com>
1686
1687         Reviewed by Dan Bernstein
1688
1689         Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
1690
1691         * History/WebHistory.mm:
1692         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
1693           flag for all loads with an HTTP Method
1694
1695 2009-01-14  Anders Carlsson  <andersca@apple.com>
1696
1697         Reviewed by Sam Weinig.
1698
1699         Implement InvokeDefault, Construct, GetProperty and SetProperty.
1700         
1701         Fully implement marshalValue.
1702         
1703         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1704         (WKPCInvokeDefault):
1705         (WKPCConstruct):
1706         (WKPCGetProperty):
1707         (WKPCSetProperty):
1708         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1709         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1710         (WebKit::NetscapePluginInstanceProxy::evaluate):
1711         (WebKit::NetscapePluginInstanceProxy::invoke):
1712         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
1713         (WebKit::NetscapePluginInstanceProxy::construct):
1714         (WebKit::NetscapePluginInstanceProxy::getProperty):
1715         (WebKit::NetscapePluginInstanceProxy::setProperty):
1716         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1717         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
1718         * Plugins/Hosted/WebKitPluginClient.defs:
1719
1720 2009-01-14  Anders Carlsson  <andersca@apple.com>
1721
1722         Reviewed by Sam Weinig.
1723
1724         Demarshal arguments and pass them to the JS call.
1725         
1726         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1727         (WKPCInvoke):
1728         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1729         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1730         (WebKit::NetscapePluginInstanceProxy::invoke):
1731         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1732         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
1733
1734 2009-01-14  Mark Rowe  <mrowe@apple.com>
1735
1736         Reviewed by Timothy Hatcher.
1737
1738         <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
1739
1740         Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
1741         that WebView uses.
1742
1743         * WebView/WebArchive.mm:
1744         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
1745         (-[WebArchive _initWithArguments:]):
1746         * WebView/WebResource.mm:
1747         (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
1748
1749 2009-01-14  Darin Adler  <darin@apple.com>
1750
1751         Reviewed by Oliver Hunt.
1752
1753         Fix crash I ran into while printing. I was unable to reproduce it, but also,
1754         it's clear there's no guarantee that the frame will be non-zero in this case,
1755         so it seems fine to check it.
1756
1757         * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
1758         and don't do anything with it if it's zero.
1759
1760 2009-01-14  Dan Bernstein  <mitz@apple.com>
1761
1762         Reviewed by John Sullivan.
1763
1764         - update copyright
1765
1766         * Info.plist:
1767
1768 2009-01-12  Anders Carlsson  <andersca@apple.com>
1769
1770         Reviewed by Darin Adler.
1771
1772         Add a bunch of methods to WebKitPluginClient.defs, and implement them.
1773         
1774         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1775         (WebKit::fromUTF8WithLatin1Fallback):
1776         If the length isn't specified, get it by calling strlen.
1777         
1778         (WKPCEvaluate):
1779         Evaluate doesn't take any arguments.
1780         
1781         (WKPCGetIntIdentifier):
1782         Call _NPN_GetIntIdentifier.
1783         
1784         (identifierFromServerIdentifier):
1785         New helper function that returns a JSC Identifier from an NPIdentifier.
1786         
1787         (WKPCInvoke):
1788         Call identifierFromServerIdentifier.
1789         
1790         (WKPCRemoveProperty):
1791         (WKPCHasProperty):
1792         (WKPCHasMethod):
1793         Call NetscapePluginInstanceProxy.
1794
1795         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1796         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1797         (WebKit::NetscapePluginInstanceProxy::removeProperty):
1798         (WebKit::NetscapePluginInstanceProxy::hasProperty):
1799         (WebKit::NetscapePluginInstanceProxy::hasMethod):
1800
1801         * Plugins/Hosted/WebKitPluginClient.defs:
1802         Add new definitions.
1803
1804 2009-01-13  Anders Carlsson  <andersca@apple.com>
1805
1806         Fix build.
1807
1808         * WebView/WebView.mm:
1809         (-[WebView _initWithArguments:]):
1810
1811 2009-01-13  Timothy Hatcher  <timothy@apple.com>
1812
1813         Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
1814
1815         <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
1816
1817         Reviewed by Darin Adler.
1818
1819         * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
1820         * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
1821         * Misc/WebNSObjectExtras.mm:
1822         (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
1823         Passes the optional object to the selector.
1824         (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
1825         Put the optional object into the arguments dictionary.
1826         (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
1827         * WebView/WebResource.mm:
1828         (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
1829         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
1830         _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
1831         * WebView/WebView.mm:
1832         (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
1833         (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
1834         (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
1835         to call _initWithArguments: passing the frame, frameName and groupName.
1836         (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
1837
1838 2009-01-12  Gavin Barraclough  <barraclough@apple.com>
1839
1840         Reviewed by Oliver Hunt.
1841
1842         Deprecate JSValuePtr::getNumber() - two ways to get a number should  be enough.
1843
1844         * WebView/WebView.mm:
1845         (aeDescFromJSValue):
1846
1847 2009-01-12  Brady Eidson  <beidson@apple.com>
1848
1849         Reviewed by Darin Adler
1850
1851         <rdar://problem/6468274> - Track Non-get requests in global history
1852
1853         * History/WebHistory.mm:
1854         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
1855         * History/WebHistoryInternal.h:
1856
1857         * History/WebHistoryItem.mm:
1858         (-[WebHistoryItem initFromDictionaryRepresentation:]):
1859         (-[WebHistoryItem dictionaryRepresentation]):
1860         (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
1861         * History/WebHistoryItemPrivate.h:
1862
1863         * WebCoreSupport/WebFrameLoaderClient.mm:
1864         (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
1865
1866 2009-01-12  Anders Carlsson  <andersca@apple.com>
1867
1868         Reviewed by Sam Weinig.
1869
1870         Move marshalling into NetscapePluginInstanceProxy.
1871         
1872         Add support for marshallin strings.
1873         
1874         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1875         (WKPCEvaluate):
1876         (WKPCInvoke):
1877         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1878         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1879         (WebKit::NetscapePluginInstanceProxy::evaluate):
1880         (WebKit::NetscapePluginInstanceProxy::invoke):
1881         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1882         * Plugins/Hosted/WebKitPluginHostTypes.h:
1883
1884 2009-01-12  Anders Carlsson  <andersca@apple.com>
1885
1886         Reviewed by Sam Weinig.
1887
1888         Implement WKPCInvoke.
1889         
1890         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1891         (WKPCEvaluate):
1892         (WKPCInvoke):
1893         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1894         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1895         (WebKit::NetscapePluginInstanceProxy::idForObject):
1896         (WebKit::NetscapePluginInstanceProxy::invoke):
1897         * Plugins/Hosted/WebKitPluginClient.defs:
1898
1899 2009-01-12  Anders Carlsson  <andersca@apple.com>
1900
1901         Reviewed by Sam Weinig.
1902
1903         Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
1904         
1905         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1906         (WKPCEvaluate):
1907         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1908         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1909         (WebKit::NetscapePluginInstanceProxy::marshalValue):
1910         * Plugins/Hosted/WebKitPluginHostTypes.h:
1911
1912 2009-01-12  Julien Chaffraix  <jchaffraix@pleyo.com>
1913
1914         Reviewed by Darin Adler.
1915
1916         Bug 22861: Turn the FontCache into a singleton
1917         https://bugs.webkit.org/show_bug.cgi?id=22861
1918
1919         * Misc/WebCoreStatistics.mm:
1920         (+[WebCoreStatistics cachedFontDataCount]):
1921         (+[WebCoreStatistics cachedFontDataInactiveCount]):
1922         (+[WebCoreStatistics purgeInactiveFontData]):
1923         Redirected all the static calls to the global FontCache
1924         instance.
1925
1926 2009-01-11  Dmitry Titov  <dimich@chromium.org>
1927
1928         Reviewed by Darin Adler.
1929
1930         https://bugs.webkit.org/show_bug.cgi?id=23207
1931         Moved currentTime() to from WebCore to WTF.
1932
1933         * WebView/WebFrame.mm: a different header file included.
1934
1935 2009-01-10  Darin Adler  <darin@apple.com>
1936
1937         Reviewed by Sam Weinig.
1938
1939         <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
1940         because of change to -[HTMLObjectElement data]
1941
1942         * WebView/WebView.mm:
1943         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
1944         violation check because I saw this being done off the main thread while testing Mail, and it
1945         caused problems. Put all the one time initialization under a single guard to make things just
1946         a little faster other times, and to make it clearer which things are one-time. Added a call to
1947         the new patchMailRemoveAttributesMethod function.
1948         (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
1949         because I assumed it would be slightly better to have a public method name in the violation
1950         message. This calls commonInitialization later, so it will hit that one eventually.
1951         (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
1952         (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
1953         a WebKit method and removes the patch again on the way out.
1954         (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
1955         applies the patch that fixes this bug.
1956
1957 2009-01-09  Dan Bernstein  <mitz@apple.com>
1958
1959         Reviewed by Darin Adler.
1960
1961         - fixed <rdar://problem/6234347> Add/change conditional key
1962           bindings for changing paragraph- and character-level writing
1963           direction (to match NSTextView)
1964
1965         * WebView/WebHTMLView.mm:
1966         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
1967         code to validate makeBaseWritingDirectionLeftToRight: and
1968         makeBaseWritingDirectionRightToLeft:.
1969         (writingDirectionKeyBindingsEnabled): Changed this function to
1970         always return YES, except on Tiger and Leopard.
1971         (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
1972         changeBaseWritingDirectionToLTR: to this.
1973         (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
1974         changeBaseWritingDirectionToRTL: to this.
1975         (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
1976         makeBaseWritingDirectionLeftToRight:.
1977         (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
1978         makeBaseWritingDirectionRightToLeft:.
1979         * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
1980         and makeBaseWritingDirectionRightToLeft to
1981         FOR_EACH_RESPONDER_SELECTOR.
1982
1983 2009-01-08  Anders Carlsson  <andersca@apple.com>
1984
1985         Reviewed by Sam Weinig.
1986
1987         Add and implement WKPCGetStringIdentifier.
1988         
1989         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1990         (WKPCGetStringIdentifier):
1991         * Plugins/Hosted/WebKitPluginClient.defs:
1992
1993 2009-01-08  Stephanie Lewis  <slewis@gmail.com>
1994
1995         Fix Tiger build.        
1996
1997         * WebView/WebTextIterator.mm:
1998
1999 2009-01-08  Anders Carlsson  <andersca@apple.com>
2000
2001         Reviewed by Sam Weinig.
2002
2003         Add basic support for evaluating scripts.
2004         
2005         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2006         (WebKit::fromUTF8WithLatin1Fallback):
2007         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2008         (WKPCReleaseObject):
2009         (marshalValue):
2010         (WKPCEvaluate):
2011         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2012         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2013         (WebKit::NetscapePluginInstanceProxy::releaseObject):
2014         (WebKit::NetscapePluginInstanceProxy::evaluate):
2015         * Plugins/Hosted/WebKitPluginClient.defs:
2016         * Plugins/Hosted/WebKitPluginHostTypes.h:
2017
2018 2009-01-08  David Hyatt  <hyatt@apple.com>
2019
2020         Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2021
2022         Add a new ChromeClient method for handling exposure of scrolled rects.
2023
2024         Reviewed by Oliver Hunt
2025
2026         * WebCoreSupport/WebChromeClient.h:
2027         * WebCoreSupport/WebChromeClient.mm:
2028         (WebChromeClient::scrollRectIntoView):
2029
2030 2009-01-08  Darin Adler  <darin@apple.com>
2031
2032         Reviewed by Tim Hatcher.
2033
2034         Bug 23185: add a currentRange method to the WebTextIterator SPI
2035         https://bugs.webkit.org/show_bug.cgi?id=23185
2036         rdar://problem/6455834
2037
2038         I also noticed a garbage-collection-related threading issue that I fixed, and
2039         that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
2040
2041         * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
2042         category. Added currentTextPointer and currentTextLength.
2043
2044         * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
2045         used _textIterator to be consistent with ObjC rather than C++ naming.
2046         (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
2047         since the finalize method here works with main-thread only WebCore objects. 
2048         (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
2049         (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
2050         since I don't think it provides much value.
2051         (-[WebTextIterator atEnd]): Ditto.
2052         (-[WebTextIterator currentRange]): Added.
2053         (-[WebTextIterator currentTextPointer]): Added.
2054         (-[WebTextIterator currentTextLength]): Added.
2055         (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
2056         (-[WebTextIterator currentText]): Ditto.
2057
2058 2009-01-08  Eric Carlson  <eric.carlson@apple.com>
2059
2060         Reviewed by Adele Peterson.
2061
2062         Simplify Mac interfaces for drawing media controller elements
2063
2064         <rdar://problem/6293969>
2065
2066         * WebCoreSupport/WebSystemInterface.m:
2067         (InitWebCoreSystemInterface): Update for changes to media controller functions
2068
2069 2009-01-07  Anders Carlsson  <andersca@apple.com>
2070
2071         Reviewed by Dan Bernstein.
2072
2073         Fix build.
2074         
2075         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2076         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2077         (WebKit::NetscapePluginInstanceProxy::idForObject):
2078
2079 2009-01-07  Anders Carlsson  <andersca@apple.com>
2080
2081         Reviewed by Dan Bernstein.
2082
2083         Add a way for a plug-in to get a reference to the Window JS object.
2084
2085         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2086         (WKPCGetWindowNPObject):
2087         Call the appropriate instance.
2088         
2089         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2090         Add object ID counter.
2091         
2092         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2093         (WebKit::NetscapePluginInstanceProxy::destroy):
2094         Clear the object ID map.
2095         
2096         (WebKit::NetscapePluginInstanceProxy::idForObject):
2097         New method that returns a unique ID for a given JS object.
2098         
2099         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2100         Return the object ID for the window JS object.
2101         
2102         * Plugins/Hosted/WebKitPluginClient.defs:
2103         Add GetWindowNPObject.
2104
2105 2009-01-07  Darin Adler  <darin@apple.com>
2106
2107         Reviewed by Oliver Hunt.
2108
2109         Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
2110         https://bugs.webkit.org/show_bug.cgi?id=23160
2111
2112         * WebView/WebView.mm:
2113         (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
2114         (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
2115         * WebView/WebViewPrivate.h: Ditto.
2116
2117 2009-01-05  Gavin Barraclough  <baraclough@apple.com>
2118
2119         Rubber Stamped by Oliver Hunt.
2120
2121         Replace all uses of JSValue* with new wrapper class, JSValuePtr.
2122         See JavaScriptCore/ChangeLog for more detailed description.
2123
2124         * WebView/WebFrame.mm:
2125         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2126         * WebView/WebScriptDebugDelegate.mm:
2127         (-[WebScriptCallFrame _convertValueToObjcValue:]):
2128         (-[WebScriptCallFrame exception]):
2129         (-[WebScriptCallFrame evaluateWebScript:]):
2130         * WebView/WebView.mm:
2131         (aeDescFromJSValue):
2132         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2133
2134 2009-01-06  Pierre-Olivier Latour  <pol@apple.com>
2135
2136         Reviewed by Darin Adler.
2137
2138         Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
2139
2140         https://bugs.webkit.org/show_bug.cgi?id=23126
2141
2142         * WebView/WebFrame.mm:
2143         (-[WebFrame _numberOfActiveAnimations]):
2144         * WebView/WebFramePrivate.h:
2145
2146 2009-01-05  David Kilzer  <ddkilzer@apple.com>
2147
2148         Add SPI to enable, disable and check state of WebIconDatabase
2149
2150         Reviewed by Darin Adler & Timothy Hatcher.
2151
2152         Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
2153         SPI to make it possible to enable, disable and check the state of
2154         the icon database.
2155
2156         * Misc/WebIconDatabase.mm:
2157         (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
2158         (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
2159         -isEnabled instead of -_isEnabled.
2160         (-[WebIconDatabase iconURLForURL:]): Ditto.
2161         (-[WebIconDatabase retainIconForURL:]): Ditto.
2162         (-[WebIconDatabase releaseIconForURL:]): Ditto.
2163         (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
2164         WebInternal category.
2165         (-[WebIconDatabase setEnabled:]): Added.  Takes care of changing
2166         the enabled/disabled state of the icon database.
2167         (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
2168         instead of -_isEnabled.
2169         (-[WebIconDatabase _startUpIconDatabase]): Added.  Extrated from
2170         -init.
2171         (-[WebIconDatabase _shutDownIconDatabase]): Added.  Remove
2172         observers when the icon database is disabled.
2173         * Misc/WebIconDatabaseInternal.h: Added declarations for
2174         -_startUpIconDatabase and -_shutDownIconDatabase.
2175         * Misc/WebIconDatabasePrivate.h: Added declarations for
2176         -isEnabled and -setEnabled:.
2177
2178 2009-01-05  Brady Eidson  <beidson@apple.com>
2179
2180         Reviewed by Jon Honeycutt
2181
2182         Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
2183
2184         * History/WebHistoryItem.mm:
2185         (-[WebHistoryItem _setLastVisitWasFailure:]):
2186         * History/WebHistoryItemPrivate.h:
2187
2188 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2189
2190         Another blind mac build fix
2191
2192         * WebCoreSupport/WebChromeClient.mm:
2193         (WebChromeClient::contentsSizeChanged):
2194
2195 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2196
2197         Blind mac build fix
2198
2199         * WebCoreSupport/WebChromeClient.mm:
2200
2201 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2202
2203         Fix mac build
2204
2205         * WebCoreSupport/WebChromeClient.h:
2206
2207 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2208
2209         Reviewed by George Staikos.
2210
2211         Build fix for contentsSizeChanged
2212
2213         * WebCoreSupport/WebChromeClient.h:
2214         * WebCoreSupport/WebChromeClient.mm:
2215         (WebChromeClient::contentsSizeChanged):
2216
2217 2009-01-02  Darin Adler  <darin@apple.com>
2218
2219         Reviewed by Sam Weinig.
2220
2221         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2222         inside its web view when resizing its window
2223         https://bugs.webkit.org/show_bug.cgi?id=23072
2224         rdar://problem/6368028
2225
2226         The first attempt at fixing this did not work.
2227         This time I was able to reproduce the bug and test the fix.
2228
2229         * WebCoreSupport/WebFrameLoaderClient.mm:
2230         (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
2231         function names around a bit to make even less code at the call site.
2232         (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
2233         Dictionary application in here.
2234         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
2235         applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
2236         when the script is cached. This fixes one of the two problems with the initial
2237         patch; the other fix is in WebCore.
2238         (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
2239         applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
2240
2241         * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
2242
2243 2009-01-02  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2244
2245         Reviewed by Darin Adler.
2246
2247         Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
2248         <https://bugs.webkit.org/show_bug.cgi?id=23060>
2249         <rdar://problem/6467830>
2250
2251         After r38629, all keyboard events get sent by Editor to the EditorClient, even
2252         if the selection is not editable. If the event's command is unsupported by
2253         WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
2254         was not. When using the page up / page down keys, the events generated are of
2255         the form scrollPageUp rather than movePageUp, so they are unsupported by
2256         WebHTMLView and cause this bug to occur.
2257
2258         * WebView/WebHTMLView.mm:
2259         (-[WebHTMLView doCommandBySelector:]):
2260
2261 2009-01-02  Darin Adler  <darin@apple.com>
2262
2263         Reviewed by Oliver Hunt.
2264
2265         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2266         https://bugs.webkit.org/show_bug.cgi?id=23072
2267         rdar://problem/6368028
2268
2269         * WebCoreSupport/WebFrameLoaderClient.mm:
2270         (isAppleDictionaryApplication): Added.
2271         (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
2272         a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
2273         (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
2274         apply the quirk when the relevant script is loaded.
2275
2276 2008-12-26  Dan Bernstein  <mitz@apple.com>
2277
2278         Reviewed by Sam Weinig.
2279
2280         - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
2281           global history after a successful visit
2282
2283         * History/WebHistory.mm:
2284         (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
2285         update the wasFailure flag on the HistoryItem.
2286
2287 2008-12-23  Darin Adler  <darin@apple.com>
2288
2289         Reviewed by Alexey Proskuryakov (a slightly earlier version).
2290
2291         - fix https://bugs.webkit.org/show_bug.cgi?id=22976
2292           crash due to Mail's use of WebArchive and WebResource on non-main thread
2293
2294         * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
2295         WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
2296         * Misc/WebKitLogging.m: Ditto.
2297
2298         * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
2299         main thread workaround.
2300
2301         * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
2302         which performs a selector on the main thread, waits for it to complete, and then
2303         returns the value on the caller thread.
2304         * Misc/WebNSObjectExtras.mm: Added.
2305
2306         * WebView/WebArchive.mm:
2307         (-[WebArchive init]): Added WebCoreThreadViolationCheck.
2308         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
2309         initialization on main thread if needMailThreadWorkaround is true.
2310         Also added WebCoreThreadViolationCheck.
2311         (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
2312         (-[WebArchive mainResource]): Get property on main thread if
2313         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2314         (-[WebArchive subresources]): Ditto.
2315         (-[WebArchive subframeArchives]): Ditto.
2316         (-[WebArchive data]): Ditto.
2317         (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
2318         (-[WebArchive _coreLegacyWebArchive]): Ditto.
2319         (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
2320         version of initWithMainResource above.
2321
2322         * WebView/WebResource.mm:
2323         (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
2324         (-[WebResource data]): Get property on main thread if
2325         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2326         (-[WebResource URL]): Ditto.
2327         (-[WebResource MIMEType]): Ditto.
2328         (-[WebResource textEncodingName]): Ditto.
2329         (-[WebResource frameName]): Ditto.
2330         (-[WebResource _ignoreWhenUnarchiving]): Ditto.
2331         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2332         Perform initialization on main thread if needMailThreadWorkaround is true.
2333         Also added WebCoreThreadViolationCheck.
2334         (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
2335         (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
2336         getting at coreResource directly.
2337         (-[WebResource _response]): Get property on main thread if
2338         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
2339         (-[WebResource _stringValue]): Ditto.
2340         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
2341         (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
2342         version of _initWithData above.
2343
2344         * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
2345         clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
2346         and the needMainThreadWorkaround helper function.
2347
2348         * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
2349         file. This probably fixes clean builds.
2350         * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
2351
2352         * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
2353         since it's not actually used.
2354         * WebView/WebDataSource.mm: Ditto.
2355         * WebView/WebHTMLRepresentation.mm: Ditto.
2356
2357 2008-12-23  Darin Adler  <darin@apple.com>
2358
2359         Reviewed by Dan Bernstein.
2360
2361         - fix https://bugs.webkit.org/show_bug.cgi?id=22979
2362           crash seen in -[WebView drawsBackground] when quitting
2363           <rdar://problem/6464601>
2364
2365         * WebView/WebView.mm:
2366         (-[WebView drawsBackground]): Added comment and a null check for _private.
2367
2368 2008-12-22  Kevin Decker  <kdecker@apple.com>
2369
2370         Reviewed by Anders Carlsson.
2371
2372         <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
2373         
2374         * Plugins/WebBaseNetscapePluginView.mm:
2375         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
2376
2377 2008-12-19  Geoffrey Garen  <ggaren@apple.com>
2378
2379         Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
2380         
2381         Added SPI for getting an unsorted vector of all items in history.
2382         
2383         * History/WebHistory.h:
2384         * History/WebHistory.mm:
2385         (-[WebHistory allItems]):
2386
2387 2008-12-18  Dan Bernstein  <mitz@apple.com>
2388
2389         Reviewed by Sam Weinig.
2390
2391         - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
2392           a new resource load delegae method.
2393
2394         * WebCoreSupport/WebFrameLoaderClient.h:
2395         * WebCoreSupport/WebFrameLoaderClient.mm:
2396         (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
2397         delegate method. If the method is unimplemented, returns true for
2398         backwards compatibility.
2399         * WebView/WebView.mm: 
2400         (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
2401         shouldUseCredentialStorageFunc member.
2402         (CallResourceLoadDelegateReturningBoolean): Added.
2403         * WebView/WebViewInternal.h:
2404         * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
2405         -webView:resource:shouldUseCredentialStorageForDataSource:.
2406
2407 2008-12-18  Cameron Zwarich  <zwarich@apple.com>
2408
2409         Reviewed by Jonathan Honeycutt.
2410
2411         Fix an apparent typo in r39385 that is causing lots of crashes.
2412
2413         * WebCoreSupport/WebFrameLoaderClient.mm:
2414         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2415
2416 2008-12-18  Brady Eidson  <beidson@apple.com>
2417
2418         Reviewed by John Sullivan
2419
2420         Initial visit to a website creates history items that start with a visit count of
2421         zero instead of one
2422
2423         * History/WebHistory.mm:
2424         (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
2425
2426         * History/WebHistoryItem.mm:
2427         (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
2428         * History/WebHistoryItemInternal.h:
2429
2430 2008-12-18  Sam Weinig  <sam@webkit.org>
2431
2432         Reviewed by John Sullivan.
2433
2434         Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
2435         a new private frame load delegate method.
2436
2437         * WebCoreSupport/WebFrameLoaderClient.h:
2438         * WebCoreSupport/WebFrameLoaderClient.mm:
2439         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
2440         * WebView/WebView.mm:
2441         (-[WebView _cacheFrameLoadDelegateImplementations]):
2442         * WebView/WebViewInternal.h:
2443         * WebView/WebViewPrivate.h:
2444
2445 2008-12-16  Antti Koivisto  <antti@apple.com>
2446
2447         Reviewed by John Sullivan.
2448         
2449         Add version check for shift-reload behavior.
2450
2451         * Misc/WebKitVersionChecks.h:
2452         * WebView/WebFrame.mm:
2453         (-[WebFrame reload]):
2454
2455 2008-12-16  Anders Carlsson  <andersca@apple.com>
2456
2457         Reviewed by Dan Bernstein.
2458
2459         Start sending keyboard events to the plug-in host.
2460         
2461         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2462         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2463         (WebKit::NetscapePluginInstanceProxy::keyEvent):
2464         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2465         (-[WebHostedNetscapePluginView keyDown:]):
2466         (-[WebHostedNetscapePluginView keyUp:]):
2467         * Plugins/Hosted/WebKitPluginHost.defs:
2468
2469 2008-12-16  Anders Carlsson  <andersca@apple.com>
2470
2471         Reviewed by Kevin Decker.
2472
2473         <rdar://problem/6450538>
2474         
2475         Fix flag enumeration.
2476         
2477         * Plugins/Hosted/WebKitPluginHostTypes.h:
2478
2479 2008-12-16  Anders Carlsson  <andersca@apple.com>
2480
2481         Reviewed by Kevin Decker.
2482
2483         Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
2484         
2485         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2486         (WKPCLoadURL):
2487         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2488         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2489         (WebKit::NetscapePluginInstanceProxy::loadURL):
2490         * Plugins/Hosted/WebKitPluginClient.defs:
2491         * Plugins/Hosted/WebKitPluginHostTypes.h:
2492
2493 2008-12-16  Anders Carlsson  <andersca@apple.com>
2494
2495         Reviewed by Kevin Decker.
2496
2497         Add trailing null to headers to avoid a crash in the plug-in host.
2498         
2499         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2500         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
2501
2502 2008-12-15  Mark Rowe  <mrowe@apple.com>
2503
2504         Rubber-stamped by Cameron Zwarich.
2505
2506         <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2507
2508         * Configurations/Base.xcconfig:
2509         * Configurations/DebugRelease.xcconfig:
2510
2511 2008-12-15  Stephanie Lewis  <slewis@apple.com>
2512
2513         Fix build.
2514
2515         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2516
2517 2008-12-15  Anders Carlsson  <andersca@apple.com>
2518
2519         Reviewed by Sam Weinig.
2520
2521         Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
2522         back into us while it's being instantiated.
2523         
2524         * Plugins/Hosted/NetscapePluginHostManager.mm:
2525         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2526         * Plugins/Hosted/NetscapePluginHostProxy.h:
2527         (WebKit::NetscapePluginHostProxy::clientPort):
2528         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2529         (WKPCInstantiatePluginReply):
2530         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2531         (WebKit::NetscapePluginInstanceProxy::Reply::):
2532         (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
2533         (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
2534         (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
2535         (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
2536         (WebKit::NetscapePluginInstanceProxy::waitForReply):
2537         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2538         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2539         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2540         * Plugins/Hosted/WebKitPluginClient.defs:
2541         * Plugins/Hosted/WebKitPluginHost.defs:
2542
2543 2008-12-15  Anders Carlsson  <andersca@apple.com>
2544
2545         Reviewed by Darin Adler.
2546
2547         Let WebKit generate a plug-in ID instead of having the plug-in host do it.
2548
2549         * Plugins/Hosted/NetscapePluginHostManager.mm:
2550         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2551         Create the plug-in proxy before instantiating the plug-in.
2552         
2553         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2554         (WebKit::NetscapePluginInstanceProxy::create):
2555         (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
2556         (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
2557         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2558         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2559         * Plugins/Hosted/WebKitPluginHost.defs:
2560
2561 2008-12-15  Anders Carlsson  <andersca@apple.com>
2562
2563         Reviewed by Sam Weinig.
2564
2565         LoadURL doesn't need to be asynchronous.
2566         
2567         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2568         (WKPCLoadURL):
2569         * Plugins/Hosted/WebKitPluginClient.defs:
2570         * Plugins/Hosted/WebKitPluginHost.defs:
2571
2572 2008-12-15  Antti Koivisto  <antti@apple.com>
2573
2574         Reviewed by Darin Adler.
2575         
2576         - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
2577         - Add corresponding IBAction to WebView.
2578         - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
2579
2580         * WebView/WebFrame.h:
2581         * WebView/WebFrame.mm:
2582         (-[WebFrame reload]):
2583         (-[WebFrame reloadFromOrigin]): 
2584         * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
2585         * WebView/WebView.h:
2586         * WebView/WebView.mm:
2587         (-[WebView reloadFromOrigin:]):
2588
2589 2008-12-14  Dan Bernstein  <mitz@apple.com>
2590
2591         Reviewed by Darin Adler.
2592
2593         - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
2594           should add items to userInfo
2595
2596         * History/WebHistory.mm:
2597         (-[WebHistoryPrivate allItems]): Added this helper method, which returns
2598         all values in the _entriesByURL dictionary.
2599         (-[WebHistory removeAllItems]): Changed to send the array of all items
2600         in the notification.
2601
2602 2008-12-13  Darin Adler  <darin@apple.com>
2603
2604         - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
2605
2606         * WebKit.exp: Added the class. We forgot to export it when we added
2607         the WebTextIterator SPI.
2608
2609 2008-12-12  Darin Adler  <darin@apple.com>
2610
2611         Rubber stamped by Adam Roben.
2612
2613         - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
2614           login sheet after clicking static text, due to AppKit key loop change
2615
2616         * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
2617         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
2618         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
2619         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
2620         Set nextKeyView of the selectable static texts to the editable text.
2621         Updated nib format.
2622
2623 2008-12-12  Stephanie Lewis  <slewis@apple.com>
2624
2625         Reviewed by Geoff Garen.
2626
2627         Shrink Cache Sizes.
2628
2629         * WebView/WebView.mm:
2630         (+[WebView _setCacheModel:]):
2631
2632 2008-12-12  Anders Carlsson  <andersca@apple.com>
2633
2634         Reviewed by Tim Hatcher.
2635
2636         Don't try to free the dummy "1" port state.
2637         
2638         * Plugins/WebNetscapePluginView.mm:
2639         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
2640         (-[WebNetscapePluginView updateAndSetWindow]):
2641
2642 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
2643
2644         Rubber-stamped by Mark Rowe.
2645
2646         Roll out r39212 due to assertion failures during layout tests, multiple
2647         layout test failures, memory leaks, and obvious incorrectness.
2648
2649         * WebView/WebPreferenceKeysPrivate.h:
2650         * WebView/WebPreferences.mm:
2651         (-[WebPreferences fullDocumentTeardownEnabled]):
2652         * WebView/WebPreferencesPrivate.h:
2653
2654 2008-12-11  Stephanie Lewis  <slewis@apple.com>
2655
2656         Fix build.
2657
2658         * WebView/WebView.mm:
2659
2660 2008-12-11  Stephanie Lewis  <slewis@apple.com>
2661
2662         Reviewed by Oliver Hunt.
2663
2664         Empty Web cache before quitting a debug build in order
2665         to report accurate CachedResource leaks.
2666
2667         * WebView/WebView.mm:
2668         (-[WebView _close]):
2669
2670 2008-12-11  Anders Carlsson  <andersca@apple.com>
2671
2672         Fix Tiger build.
2673
2674         * Misc/WebNSDataExtras.h:
2675
2676 2008-12-11  Anders Carlsson  <andersca@apple.com>
2677
2678         Reviewed by Cameron Zwarich.
2679
2680         https://bugs.webkit.org/show_bug.cgi?id=22797
2681         REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
2682
2683         Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
2684         
2685         * Plugins/WebBaseNetscapePluginStream.mm:
2686         (WebNetscapePluginStream::destroyStreamWithReason):
2687
2688 2008-12-10  Glenn Wilson  <gwilson@google.com>
2689
2690         Reviewed by Adam Roben.
2691
2692         Added new methods for overriding default WebPreference values
2693         and for resetting preferences to their defaults.
2694         https://bugs.webkit.org/show_bug.cgi?id=20534
2695
2696         * WebView/WebPreferenceKeysPrivate.h:
2697         * WebView/WebPreferences.mm:
2698         (-[WebPreferences resetToDefaults]): new method
2699         (-[WebPreferences overridePreference:flag:]): new method
2700         * WebView/WebPreferencesPrivate.h: new method signatures
2701
2702 2008-12-10  Anders Carlsson  <andersca@apple.com>
2703
2704         Reviewed by Darin Adler.
2705
2706         Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
2707         
2708         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2709         Add stopAllStreams.
2710         
2711         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2712         (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
2713         Factored out this from ::destroy.
2714         
2715         (WebKit::NetscapePluginInstanceProxy::destroy):
2716         Call stopAllStreams().
2717         
2718         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
2719         Ditto.
2720         
2721         (WebKit::NetscapePluginInstanceProxy::loadURL):
2722         Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
2723
2724 2008-12-10  Anders Carlsson  <andersca@apple.com>
2725
2726         Reviewed by Darin Adler.
2727
2728         Move two NSData category methods to WebNSDataExtras.m.
2729         
2730         * Misc/WebNSDataExtras.h:
2731         * Misc/WebNSDataExtras.m:
2732         (-[NSData _web_startsWithBlankLine]):
2733         (-[NSData _web_locationAfterFirstBlankLine]):
2734         * Plugins/WebNetscapePluginView.mm:
2735
2736 2008-12-10  Alice Liu  <alice.liu@apple.com>
2737
2738         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
2739
2740         Reviewed by Darin Adler.
2741
2742         * Misc/WebNSPasteboardExtras.mm:
2743         Ask image for its file extension instead of falling back on MIME type and file path.
2744         Also moved this code to before setting the pasteboard data so as not to set any if
2745         no extension can be determined.
2746         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
2747
2748         * WebView/WebHTMLView.mm:
2749         Fixed a separate but related long-standing bug of how the filename for the promised
2750         drag data is determined by asking the image for a proper file extension. 
2751         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
2752
2753 2008-12-09  Anders Carlsson  <andersca@apple.com>
2754
2755         Reviewed by Darin Adler.
2756
2757         Fix typecast.
2758
2759         * WebView/WebHTMLView.mm:
2760         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
2761
2762 2008-12-09  Anders Carlsson  <andersca@apple.com>
2763
2764         Reviewed by Darin Adler.
2765
2766         Implement software rendering of hosted plug-ins.
2767         
2768         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2769         (WKPCInvalidateRect):
2770         New MiG function. This is called by the plug-in host when it has drawn something.
2771         
2772         * Plugins/Hosted/WebHostedNetscapePluginView.h:
2773         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2774         (-[WebHostedNetscapePluginView createPlugin]):
2775         Create a software renderer.
2776         
2777         (-[WebHostedNetscapePluginView destroyPlugin]):
2778         Destroy the software renderer.
2779         
2780         (-[WebHostedNetscapePluginView drawRect:]):
2781         Draw using the software renderer.
2782         
2783         * Plugins/Hosted/WebKitPluginClient.defs:
2784         Add InvalidateRect.
2785
2786 2008-12-09  Brett Wilson  <brettw@chromium.org>
2787
2788         Reviewed by Dave Hyatt.
2789
2790         https://bugs.webkit.org/show_bug.cgi?id=22177
2791
2792         Add a callback on ChromeClient that the state of form elements on
2793         the page has changed. This is to allow clients implementing session
2794         saving to know when the current state is dirty.
2795
2796         * WebCoreSupport/WebChromeClient.h:
2797         (WebChromeClient::formStateDidChange):
2798
2799 2008-12-09  Anders Carlsson  <andersca@apple.com>
2800
2801         Reviewed by Dan Bernstein.
2802
2803         Make sure to pause null events for hosted plug-ins as well.
2804
2805         * WebView/WebHTMLView.mm:
2806         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
2807
2808 2008-12-09  Anders Carlsson  <andersca@apple.com>
2809
2810         Reviewed by Darin Adler.
2811
2812         * Plugins/Hosted/NetscapePluginHostProxy.h:
2813         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2814         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2815         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2816         Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
2817
2818 2008-12-09  Timothy Hatcher  <timothy@apple.com>
2819
2820         Implement a few methods needed to keep Dictionary.app working on Leopard.
2821
2822         <rdar://problem/6002160> Internal changes to WebKit in Safari 4
2823         Developer Preview might break Dictionary
2824
2825         Reviewed by Dan Bernstein.
2826
2827         * WebView/WebFrame.mm:
2828         (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
2829         (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
2830         * WebView/WebHTMLView.mm:
2831         (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
2832         that Dictionary.app is using.
2833
2834 2008-12-08  Anders Carlsson  <andersca@apple.com>
2835
2836         Reviewed by Darin Adler.
2837
2838         More work towards getting NPN_GetURL working.
2839         
2840         * Plugins/Hosted/HostedNetscapePluginStream.h:
2841         Inherit from NetscapePlugInStreamLoaderClient.
2842         
2843         (WebKit::HostedNetscapePluginStream::streamID):
2844         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2845         (WebKit::HostedNetscapePluginStream::startStream):
2846         Keep track of the resposne URL and the MIME type. Pass the response URL to the 
2847         plug-in host.
2848         
2849         (WebKit::HostedNetscapePluginStream::didFinishLoading):
2850         Disconnect the stream.
2851         
2852         (WebKit::HostedNetscapePluginStream::start):
2853         Create a plug-in stream loader and start loading.
2854         
2855         (WebKit::HostedNetscapePluginStream::stop):
2856         Cancel the load.
2857         
2858         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2859         (WKPCLoadURL):
2860         Fix the parameter order.
2861         
2862         (WKPCCancelLoadURL):
2863         New function that cancels a load of a stream with a given reason.
2864         
2865         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2866         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2867         (WebKit::NetscapePluginInstanceProxy::destroy):
2868         Stop the streams.
2869         
2870         (WebKit::NetscapePluginInstanceProxy::pluginStream):
2871         Return a plug-in stream given a stream ID.
2872         
2873         (WebKit::NetscapePluginInstanceProxy::disconnectStream):
2874         Remove the stream from the streams map.
2875         
2876         (WebKit::NetscapePluginInstanceProxy::loadRequest):
2877         Create a stream and load it.
2878         
2879         * Plugins/Hosted/WebKitPluginClient.defs:
2880         Add CancelLoadURL.
2881         
2882         * Plugins/Hosted/WebKitPluginHost.defs:
2883         Add responseURL to StartStream.
2884         
2885         * Plugins/WebBaseNetscapePluginView.h:
2886         * Plugins/WebBaseNetscapePluginView.mm:
2887         (-[WebBaseNetscapePluginView pluginPackage]):
2888         Move this down to the base class from WebNetscapePluginView.
2889         
2890         * Plugins/WebNetscapePluginView.h:
2891         * Plugins/WebNetscapePluginView.mm:
2892
2893 2008-12-08  Dan Bernstein  <mitz@apple.com>
2894
2895         Reviewed by John Sullivan.
2896
2897         - WebKit/mac part of tracking the global history item for a WebView
2898
2899         * WebView/WebView.mm:
2900         (-[WebView _globalHistoryItem]): Added. Returns the page's global
2901         history item.
2902         * WebView/WebViewPrivate.h:
2903
2904 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
2905
2906         Reviewed by Dave Hyatt
2907
2908         https://bugs.webkit.org/show_bug.cgi?id=15671
2909
2910         VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
2911         
2912         * WebView/WebFrame.mm:
2913         (-[WebFrame _caretRectAtNode:offset:affinity:]):
2914
2915 2008-12-06  David Kilzer  <ddkilzer@apple.com>
2916
2917         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
2918
2919         <https://bugs.webkit.org/show_bug.cgi?id=22666>
2920
2921         Reviewed by Darin Adler.
2922
2923         * DOM/WebDOMOperations.mm:
2924         (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
2925         ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
2926
2927 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
2928
2929         Reviewed by Darin Adler.
2930
2931         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
2932         in Safari before opening a mail message in Mail
2933
2934         * Carbon/CarbonWindowAdapter.m: Removed.
2935         * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
2936         (+[CarbonWindowAdapter initialize]):
2937         * History/WebBackForwardList.mm:
2938         (+[WebBackForwardList initialize]):
2939         * History/WebHistoryItem.mm:
2940         (+[WebHistoryItem initialize]):
2941         * Misc/WebElementDictionary.mm:
2942         (+[WebElementDictionary initialize]):
2943         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2944         (+[WebHostedNetscapePluginView initialize]):
2945         * Plugins/WebBaseNetscapePluginView.mm:
2946         * Plugins/WebBasePluginPackage.m: Removed.
2947         * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
2948         (+[WebBasePluginPackage initialize]):
2949         * Plugins/WebNetscapePluginView.mm:
2950         (+[WebNetscapePluginView initialize]):
2951         * WebCoreSupport/WebEditorClient.mm:
2952         (+[WebEditCommand initialize]):
2953         * WebCoreSupport/WebFrameLoaderClient.mm:
2954         * WebView/WebArchive.mm:
2955         (+[WebArchivePrivate initialize]):
2956         * WebView/WebDataSource.mm:
2957         (+[WebDataSourcePrivate initialize]):
2958         * WebView/WebHTMLView.mm:
2959         (+[WebHTMLViewPrivate initialize]):
2960         (+[WebHTMLView initialize]):
2961         * WebView/WebResource.mm:
2962         (+[WebResourcePrivate initialize]):
2963         * WebView/WebView.mm:
2964         (+[WebViewPrivate initialize]):
2965         Call JSC::initializeThreading();
2966
2967 2008-12-04  Stephanie Lewis  <slewis@apple.com>
2968
2969         Fix build.
2970
2971         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2972         (WKPCLoadURL):
2973
2974 2008-12-04  Anders Carlsson  <andersca@apple.com>
2975
2976         Reviewed by Sam Weinig.
2977
2978         More work on streams.
2979         
2980         * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
2981         (WebKit::HostedNetscapePluginStream::create):
2982         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
2983         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
2984         (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
2985         (WebKit::HostedNetscapePluginStream::startStream):
2986         (WebKit::HostedNetscapePluginStream::didReceiveData):
2987         (WebKit::HostedNetscapePluginStream::didFinishLoading):
2988         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
2989         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2990         (WebKit::NetscapePluginInstanceProxy::pluginView):
2991         (WebKit::NetscapePluginInstanceProxy::hostProxy):
2992         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2993         (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
2994         (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
2995         (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
2996         (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
2997         (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
2998         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2999         (WebKit::NetscapePluginInstanceProxy::performRequest):
3000         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3001         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3002         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3003         * Plugins/Hosted/WebKitPluginHost.defs:
3004
3005 2008-12-04  Anders Carlsson  <andersca@apple.com>
3006
3007         Reviewed by Sam Weinig.
3008
3009         Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3010         but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3011         implementations can share more code.
3012         
3013         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3014         (WKPCLoadURL):
3015         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3016         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3017         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3018         (WebKit::NetscapePluginInstanceProxy::loadURL):
3019         (WebKit::NetscapePluginInstanceProxy::performRequest):
3020         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3021         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3022         * Plugins/Hosted/WebKitPluginClient.defs:
3023         * Plugins/Hosted/WebKitPluginHost.defs:
3024
3025 2008-12-04  Anders Carlsson  <andersca@apple.com>
3026
3027         Reviewed by Dan Bernstein.
3028         
3029         Move requestWithURLCString to WebBaseNetscapePluginView.
3030         
3031         * Plugins/WebBaseNetscapePluginView.h:
3032         * Plugins/WebBaseNetscapePluginView.mm:
3033         (-[WebBaseNetscapePluginView requestWithURLCString:]):
3034         * Plugins/WebNetscapePluginView.mm:
3035
3036 2008-12-03  Anders Carlsson  <andersca@apple.com>
3037
3038         Reviewed by Sam Weinig.
3039
3040         Move WebPluginRequest to its own file.
3041         
3042         * Plugins/WebNetscapePluginView.mm:
3043         * Plugins/WebPluginRequest.h: Added.
3044         * Plugins/WebPluginRequest.m: Added.
3045         (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3046         (-[WebPluginRequest dealloc]):
3047         (-[WebPluginRequest request]):
3048         (-[WebPluginRequest frameName]):
3049         (-[WebPluginRequest isCurrentEventUserGesture]):
3050         (-[WebPluginRequest sendNotification]):
3051         (-[WebPluginRequest notifyData]):
3052
3053 2008-12-03  Anders Carlsson  <andersca@apple.com>
3054
3055         Handle the CA model.
3056
3057         * Plugins/WebNetscapePluginView.mm:
3058         (-[WebNetscapePluginView setWindowIfNecessary]):
3059
3060 2008-12-03  Anders Carlsson  <andersca@apple.com>
3061
3062         Reviewed by Kevin Decker.
3063         
3064         <rdar://problem/6412293>
3065         Call NPP_SetWindow for CA plug-ins.
3066         
3067         * Plugins/WebNetscapePluginView.mm:
3068         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3069         (-[WebNetscapePluginView restorePortState:]):
3070         (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
3071         (-[WebNetscapePluginView updateAndSetWindow]):
3072         (-[WebNetscapePluginView setWindowIfNecessary]):
3073
3074 2008-12-03  Anders Carlsson  <andersca@apple.com>
3075
3076         Fix the release build.
3077
3078         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3079         (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
3080
3081 2008-12-03  Anders Carlsson  <andersca@apple.com>
3082
3083         Reviewed by Dan Bernstein.
3084
3085         <rdar://problem/6412234>
3086         Don't crash if we can't launch the plug-in host.
3087
3088         * Plugins/Hosted/NetscapePluginHostManager.mm:
3089         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3090
3091 2008-12-02  Anders Carlsson  <andersca@apple.com>
3092
3093         Reviewed by Dan Bernstein.
3094
3095         Start processing messages sent to the client port.
3096         
3097         * Plugins/Hosted/NetscapePluginHostProxy.h:
3098         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3099         Add a map from ports to plug-in proxies. Turn the set of instances into a map from
3100         pluginID to instance proxy.
3101         
3102         (WKPCStatusText):
3103         Look up the right instance proxy and call status().
3104         
3105         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3106         (WebKit::NetscapePluginInstanceProxy::pluginID):
3107         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3108         (WebKit::NetscapePluginInstanceProxy::status):
3109         Implement this.
3110         
3111         * Plugins/Hosted/WebKitPluginClient.defs:
3112         Add the plug-in ID to StatusText.
3113
3114 2008-12-02  Gregory Hughes  <ghughes@apple.com>
3115
3116         Reviewed by Beth Dakin.
3117
3118         Bug 22513: ZOOM: text selection does not send correct zoom bounds
3119
3120         When zoomed, text selection must send the zoom bounds in flipped
3121         screen coordinates.
3122
3123         * WebCoreSupport/WebViewFactory.mm:
3124         (-[WebViewFactory accessibilityConvertScreenRect:]):
3125
3126 2008-12-02  Anders Carlsson  <andersca@apple.com>
3127
3128         Reviewed by Dan Bernstein.
3129
3130         Create a client mach port and pass it to the plug-in host.
3131         
3132         * Plugins/Hosted/NetscapePluginHostManager.h:
3133         * Plugins/Hosted/NetscapePluginHostManager.mm:
3134         (WebKit::NetscapePluginHostManager::hostForPackage):
3135         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3136         * Plugins/Hosted/NetscapePluginHostProxy.h:
3137         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3138         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3139         * Plugins/Hosted/WebKitPluginHost.defs:
3140
3141 2008-12-02  Anders Carlsson  <andersca@apple.com>
3142
3143         Reviewed by Sam Weinig.
3144
3145         Let the plug-in views know if the plug-in host crashes.
3146         
3147         * Plugins/Hosted/NetscapePluginHostManager.h:
3148         * Plugins/Hosted/NetscapePluginHostManager.mm:
3149         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3150         * Plugins/Hosted/NetscapePluginHostProxy.h:
3151         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3152         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3153         (WebKit::NetscapePluginHostProxy::addPluginInstance):
3154         (WebKit::NetscapePluginHostProxy::removePluginInstance):
3155         
3156         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3157         (WebKit::NetscapePluginInstanceProxy::create):
3158         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3159         Keep a pointer to the host proxy.
3160         
3161         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3162         Add the instance to the host set.
3163         
3164         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3165         Remove the instance form the host set.
3166         
3167         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3168         Tell the plug-in view that the plug-in died.
3169
3170         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3171         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3172         (-[WebHostedNetscapePluginView createPlugin]):
3173         Pass the plug-in view to the instantiatePlugin.
3174         
3175         (-[WebHostedNetscapePluginView pluginHostDied]):
3176         Handle the plug-in host crashing.
3177         
3178         (-[WebHostedNetscapePluginView drawRect:]):
3179         Fill the plug-in view with a nice red shade if the plug-in crashes.
3180
3181 2008-12-01  Anders Carlsson  <andersca@apple.com>
3182
3183         Reviewed by Dan Bernstein.
3184
3185         Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
3186         
3187         * Plugins/Hosted/NetscapePluginHostManager.h:
3188         * Plugins/Hosted/NetscapePluginHostManager.mm:
3189         (WebKit::NetscapePluginHostManager::pluginHostDied):
3190         Remove the plug-in host from the map.
3191         
3192         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3193         NetscapePluginHostProxy is no longer refcounted.
3194
3195         * Plugins/Hosted/NetscapePluginHostProxy.h:
3196         This is no longer refcounted. Add a set of plug-in instances (unused for now).
3197         
3198         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3199         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3200         Create a death notification port.
3201         
3202         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3203         Tell the manager that we're gone and delete ourselves.
3204         
3205         (WebKit::NetscapePluginHostProxy::deathPortCallback):
3206         New CFMachPort callback.
3207
3208 2008-12-01  Anders Carlsson  <andersca@apple.com>
3209
3210         Reviewed by Dan Bernstein.
3211
3212         Move instantiatePlugin to NetscapePluginHostManager.
3213         
3214         * Plugins/Hosted/NetscapePluginHostManager.h:
3215         * Plugins/Hosted/NetscapePluginHostManager.mm:
3216         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3217         * Plugins/Hosted/NetscapePluginHostProxy.h:
3218         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3219         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3220         (-[WebHostedNetscapePluginView createPlugin]):
3221
3222 2008-12-01  Anders Carlsson  <andersca@apple.com>
3223
3224         Reviewed by Dan Bernstein.
3225
3226         Pass the plug-in host port directly to the instance proxy.
3227         
3228         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3229         (WebKit::NetscapePluginHostProxy::instantiatePlugin):
3230         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3231         (WebKit::NetscapePluginInstanceProxy::create):
3232         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3233         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3234         (WebKit::NetscapePluginInstanceProxy::resize):
3235         (WebKit::NetscapePluginInstanceProxy::destroy):
3236         (WebKit::NetscapePluginInstanceProxy::focusChanged):
3237         (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
3238         (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
3239         (WebKit::NetscapePluginInstanceProxy::startTimers):
3240         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
3241         (WebKit::NetscapePluginInstanceProxy::stopTimers):
3242
3243 2008-12-01  Anders Carlsson  <andersca@apple.com>
3244
3245         Try to fix the Tiger build.
3246
3247         * Plugins/WebNetscapePluginView.mm:
3248
3249 2008-12-01  Anders Carlsson  <andersca@apple.com>
3250
3251         Rename _layer to _pluginLayer where I forgot to do so.
3252         
3253         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3254         (-[WebHostedNetscapePluginView destroyPlugin]):
3255         * Plugins/WebNetscapePluginView.h:
3256         * Plugins/WebNetscapePluginView.mm:
3257         (-[WebNetscapePluginView createPlugin]):
3258         (-[WebNetscapePluginView setLayer:]):
3259         (-[WebNetscapePluginView destroyPlugin]):
3260
3261 2008-12-01  Anders Carlsson  <andersca@apple.com>
3262
3263         Reviewed by Adam Roben.
3264
3265         Make sure to re-insert layers as needed so they won't be lost when the layer backed
3266         view is removed from the view hierarchy.
3267
3268         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3269         Add _pluginLayer ivar.
3270         
3271         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3272         (-[WebHostedNetscapePluginView createPlugin]):
3273         Don't add the layer here.
3274         
3275         (-[WebHostedNetscapePluginView setLayer:]):
3276         Instead, add it here.
3277         
3278         (-[WebHostedNetscapePluginView destroyPlugin]):
3279         Set _pluginLayer to 0.
3280         
3281         * Plugins/WebNetscapePluginView.mm:        
3282         (-[WebNetscapePluginView createPlugin]):
3283         Don't add the layer here.
3284         
3285         (-[WebNetscapePluginView setLayer:]):
3286         Do it here.
3287
3288 2008-11-30  Antti Koivisto  <antti@apple.com>
3289
3290         Reviewed by Mark Rowe.
3291         
3292         https://bugs.webkit.org/show_bug.cgi?id=22557
3293         
3294         Report free size in central and thread caches too.
3295
3296         * Misc/WebCoreStatistics.mm:
3297         (+[WebCoreStatistics memoryStatistics]):
3298
3299 2008-11-29  Antti Koivisto  <antti@apple.com>
3300
3301         Reviewed by Dan Bernstein.
3302
3303         https://bugs.webkit.org/show_bug.cgi?id=22557
3304         Add statistics for JavaScript GC heap.
3305
3306         * Misc/WebCoreStatistics.mm:
3307         (+[WebCoreStatistics javaScriptObjectsCount]):
3308         (+[WebCoreStatistics memoryStatistics]):
3309
3310 2008-11-29  Antti Koivisto  <antti@apple.com>
3311
3312         Reviewed by Alexey Proskuryakov.
3313         
3314         https://bugs.webkit.org/show_bug.cgi?id=22557
3315         
3316         - Add purgeable memory statistics to cache statistics.
3317         - Add method for getting fastMalloc statistics.
3318         - Add method to force returning free memory back to system.
3319
3320         * Misc/WebCache.mm:
3321         (+[WebCache statistics]):
3322         * Misc/WebCoreStatistics.h:
3323         * Misc/WebCoreStatistics.mm:
3324         (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
3325         (+[WebCoreStatistics memoryStatistics]):
3326         (+[WebCoreStatistics returnFreeMemoryToSystem]):
3327
3328 2008-11-26  Mark Rowe  <mrowe@apple.com>
3329
3330         Fix the Tiger build.
3331
3332         mig.h does not always define __MigTypeCheck on Tiger, which leads to problems when the generated
3333         code is built with -Wundef.
3334
3335         * Plugins/Hosted/WebKitPluginHostTypes.h:
3336
3337 2008-11-26  Anders Carlsson  <andersca@apple.com>
3338
3339         Fix build.
3340
3341         * Configurations/Base.xcconfig:
3342
3343 2008-11-26  Anders Carlsson  <andersca@apple.com>
3344
3345         Reviewed by Mark Rowe.
3346
3347         Move WebHostedNetscapePluginView.{h|mm} to Plugins/Hosted.
3348         
3349         (-[WebHostedNetscapePluginView handleMouseMoved:]):
3350         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
3351         Fix a leak.
3352         
3353         (-[WebHostedNetscapePluginView createPlugin]):
3354         Instantiate the plug-in, store the plug-in proxy in the _proxy ivar.
3355         
3356         (-[WebHostedNetscapePluginView loadStream]):
3357         (-[WebHostedNetscapePluginView shouldStop]):
3358         Add stubs for these.
3359         
3360         (-[WebHostedNetscapePluginView updateAndSetWindow]):
3361         (-[WebHostedNetscapePluginView windowFocusChanged:]):
3362         (-[WebHostedNetscapePluginView destroyPlugin]):
3363         (-[WebHostedNetscapePluginView startTimers]):
3364         (-[WebHostedNetscapePluginView stopTimers]):
3365         (-[WebHostedNetscapePluginView focusChanged]):
3366         (-[WebHostedNetscapePluginView windowFrameDidChange:]):
3367         (-[WebHostedNetscapePluginView mouseDown:]):
3368         (-[WebHostedNetscapePluginView mouseUp:]):
3369         (-[WebHostedNetscapePluginView mouseDragged:]):
3370         (-[WebHostedNetscapePluginView mouseEntered:]):
3371         (-[WebHostedNetscapePluginView mouseExited:]):
3372         Call the proxy.
3373         
3374         (-[WebHostedNetscapePluginView addWindowObservers]):
3375         (-[WebHostedNetscapePluginView removeWindowObservers]):
3376         Add/remove observers for when the window frame changes.
3377         
3378         * Plugins/WebHostedNetscapePluginView.h: Removed.
3379         * Plugins/WebHostedNetscapePluginView.mm: Removed.
3380
3381 2008-11-26  Anders Carlsson  <andersca@apple.com>
3382
3383         Reviewed by Mark Rowe.
3384
3385         Add the plug-in host proxy and plug-in instance proxy objects.
3386
3387         These are just simple objects that forward their calls to the plug-in host.
3388         
3389         * Plugins/Hosted/NetscapePluginHostProxy.h: Added.
3390         (WebKit::NetscapePluginHostProxy::create):
3391         (WebKit::NetscapePluginHostProxy::port):
3392         * Plugins/Hosted/NetscapePluginHostProxy.mm: Added.
3393         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3394         (WebKit::NetscapePluginHostProxy::instantiatePlugin):
3395         * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added.
3396         (WebKit::NetscapePluginInstanceProxy::create):
3397         (WebKit::NetscapePluginInstanceProxy::renderContextID):
3398         (WebKit::NetscapePluginInstanceProxy::useSoftwareRenderer):
3399         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Added.
3400         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3401         (WebKit::NetscapePluginInstanceProxy::resize):
3402         (WebKit::NetscapePluginInstanceProxy::destroy):
3403         (WebKit::NetscapePluginInstanceProxy::focusChanged):
3404         (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
3405         (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
3406         (WebKit::NetscapePluginInstanceProxy::startTimers):
3407         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
3408         (WebKit::NetscapePluginInstanceProxy::stopTimers):
3409
3410 2008-11-26  Anders Carlsson  <andersca@apple.com>
3411
3412         Reviewed by Dan Bernstein, Mark Rowe and Kevin Decker.
3413
3414         Add the plug-in host manager singleton.
3415         
3416         * Plugins/Hosted/NetscapePluginHostManager.h: Added.
3417         * Plugins/Hosted/NetscapePluginHostManager.mm: Added.
3418         
3419         (WebKit::NetscapePluginHostManager::hostForPackage):
3420         If there's an existing host proxy available, just return it. Otherwise spawn a new plug-in host and
3421         create a new plug-in host proxy from the new plug-in host port.
3422         
3423         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3424         Pass the plug-in host path and the preferred CPU type to the plug-in agent. When the plug-in host has
3425         finished launching, pass it the path to the plug-in bundle.
3426         
3427         (WebKit::NetscapePluginHostManager::initializeVendorPort):
3428         Check in with the plug-in agent and get the new plug-in vendor port back.
3429
3430 2008-11-26  Anders Carlsson  <andersca@apple.com>
3431
3432         Reviewed by Mark Rowe.
3433
3434         * Plugins/Hosted/WebKitPluginHostTypes.h:
3435         Add copyright headers and fix the spacing around the *'s.
3436
3437 2008-11-26  Anders Carlsson  <andersca@apple.com>
3438
3439         Reviewed by Dan Bernstein.
3440         
3441         * Plugins/Hosted/WebKitPluginHost.defs:
3442         Add copyright headers.
3443         
3444         * Plugins/Hosted/WebKitPluginHostTypes.h: Added.
3445         Forgot to add this.
3446
3447 2008-11-26  Anders Carlsson  <andersca@apple.com>
3448
3449         Reviewed by Dan Bernstein.
3450
3451         Add plug-in host .defs.
3452
3453         * Plugins/Hosted/WebKitPluginAgent.defs: Added.
3454         * Plugins/Hosted/WebKitPluginAgentReply.defs: Added.
3455         * Plugins/Hosted/WebKitPluginClient.defs: Added.
3456         * Plugins/Hosted/WebKitPluginHost.defs: Added.
3457         * Plugins/Hosted/WebKitPluginHostTypes.defs: Added.
3458
3459 2008-11-26  Anders Carlsson  <andersca@apple.com>
3460
3461         Reviewed by Mark Rowe and Kevin Decker.
3462
3463         Minor plug-in changes.
3464         
3465         * Plugins/WebBaseNetscapePluginView.h:
3466         Add add/remove observer method declarations.
3467         
3468         * Plugins/WebBaseNetscapePluginView.mm:
3469         (-[WebBaseNetscapePluginView isFlipped]):
3470         Move this down from WebNetscapePluginView.
3471         
3472         * Plugins/WebNetscapePluginPackage.h:
3473         * Plugins/WebNetscapePluginPackage.m:
3474         (-[WebNetscapePluginPackage pluginHostArchitecture]):
3475         Getter for the plug-in host architecture.
3476         
3477         * Plugins/WebNetscapePluginView.mm:
3478
3479 2008-11-25  Dan Bernstein  <mitz@apple.com>
3480
3481         Reviewed by Mark Rowe.
3482
3483         - include the text direction submenu in context menus when appropriate
3484
3485         * WebView/WebPreferences.mm:
3486         (+[WebPreferences initialize]): Changed the default
3487         textDirectionSubmenuInclusionBehavior to "automatically", which includes
3488         the menu when the selection is confined to a single paragraph the either
3489         has right-to-left base writing direction or contains right-to-left or
3490         embedded text. Left the default for Tiger and Leopard to be "never".
3491
3492 2008-11-24  Darin Fisher  <darin@chromium.org>
3493
3494         Fix bustage.
3495
3496         * History/WebHistory.mm:
3497
3498 2008-11-24  Glenn Wilson  <gwilson@chromium.org>
3499
3500         Reviewed by Alexey Proskuryakov.
3501
3502         http://bugs.webkit.org/show_bug.cgi?id=15643
3503
3504         Added API support for the "trailing whitespace" work-around.  This includes an APIs
3505         to get and set the state of this configuration variable.
3506
3507         * WebCoreSupport/WebEditorClient.h:
3508         * WebCoreSupport/WebEditorClient.mm:
3509         (WebEditorClient::selectTrailingWhitespaceEnabled):
3510         * WebView/WebView.mm:
3511         (-[WebView setSelectTrailingWhitespaceEnabled:]):
3512         (-[WebView isSelectTrailingWhitespaceEnabled]):
3513         (-[WebView setSmartInsertDeleteEnabled:]):
3514         * WebView/WebViewPrivate.h:
3515
3516 2008-11-24  Darin Adler  <darin@apple.com>
3517
3518         Reviewed by Dan Bernstein.
3519
3520         - https://bugs.webkit.org/show_bug.cgi?id=22470
3521           remove unneeded URL argument from FrameLoaderClient::updateGlobalHistory
3522
3523         * WebCoreSupport/WebFrameLoaderClient.h: Remove argument.
3524         * WebCoreSupport/WebFrameLoaderClient.mm:
3525         (WebFrameLoaderClient::updateGlobalHistory): Get the URL from the
3526         DocumentLoader, just as we do the title and the failure flag.
3527
3528 2008-11-24  Darin Adler  <darin@apple.com>
3529
3530         Reviewed by Dan Bernstein.
3531
3532         - finish https://bugs.webkit.org/show_bug.cgi?id=22295
3533           track which history items are from page load failures
3534
3535         Last time around I did this only for the back/forward list and missed the
3536         global history list.
3537
3538         * History/WebHistory.mm:
3539         (-[WebHistory _visitedURL:withTitle:wasFailure:]): Added wasFailure argument.
3540         Set the flag on the newly created history item. Also eliminated the use of
3541         autorelease on the added-items array.
3542         * History/WebHistoryInternal.h: Ditto.
3543
3544         * WebCoreSupport/WebFrameLoaderClient.mm:
3545         (WebFrameLoaderClient::updateGlobalHistory): Added code to check for failure
3546         and pass the argument in to WebHistory. Given that this function gets other
3547         data from the DocumentLoader, I think we should get rid of the KURL argument,
3548         but that's a separate issue so I don't do it in this patch.
3549
3550 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
3551
3552         Fix call to Frame::selectionBounds in Tiger build.
3553         
3554         * WebView/WebHTMLView.mm:
3555         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
3556
3557 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
3558
3559         Reviewed by Dan Bernstein
3560
3561         Via: https://bugs.webkit.org/show_bug.cgi?id=22433
3562         
3563         Rename RenderView::selectionRect() to selectionBounds(), to remove
3564         longstanding ambiguity with the base class selectionRect() method.
3565         Do the same on Frame for consistency with RenderView.
3566
3567         * WebView/WebHTMLView.mm:
3568         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
3569         (-[WebHTMLView selectionRect]):
3570         (-[WebHTMLView selectionImageRect]):
3571
3572 2008-11-20  Pierre-Olivier Latour  <pol@apple.com>
3573
3574         Reviewed by Dan Bernstein.
3575
3576         WebKit should be using Device RGB colorspace everywhere for
3577         consistency.
3578
3579         https://bugs.webkit.org/show_bug.cgi?id=22300
3580
3581         * WebView/WebHTMLView.mm:
3582         (-[WebHTMLView _dragImageForURL:withLabel:]):
3583         (-[WebHTMLView _colorAsString:]):
3584
3585 2008-11-20  Darin Adler  <darin@apple.com>
3586
3587         Earlier version reviewed by Justin Garcia.
3588
3589         - part of fix for <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode
3590           Also resolves <rdar://problem/5000134>.
3591
3592         * WebView/WebHTMLView.mm: Removed some unused code, and made the Tiger workaround for bug 3789278
3593         be Tiger-only.
3594         (-[WebHTMLView resignFirstResponder]): Removed code setting unused resigningFirstResponder flag.
3595         (-[WebHTMLView _wantsKeyDownForEvent:]): Added. Returns YES.
3596         (-[WebHTMLView insertText:]): Don't try to insert text if the selection is not editable. We used
3597         to prevent even processing the input, but that's not practical since some commands need to work
3598         even in non-editable regions.
3599
3600 2008-11-20  Anders Carlsson  <andersca@apple.com>
3601
3602         Reviewed by Jon Honeycutt.
3603
3604         Move some frame/page checking code down to the base class.
3605         
3606         * Plugins/WebBaseNetscapePluginView.mm:
3607         (-[WebBaseNetscapePluginView start]):
3608         * Plugins/WebNetscapePluginView.mm:
3609         (-[WebNetscapePluginView _createPlugin]):
3610
3611 2008-11-19  Anders Carlsson  <andersca@apple.com>
3612
3613         Reviewed by Dan Bernstein.
3614
3615         Test: plugins/netscape-plugin-setwindow-size-2.html
3616         
3617         Fix bug where NPP_SetWindow wasn't getting called for some plug-ins.
3618         
3619         * Plugins/WebNetscapePluginView.mm:
3620         (-[WebNetscapePluginView updateAndSetWindow]):
3621         Don't bail if the drawing model is not the CA drawing model. Remove some code 
3622         that was doing the wrong thing.
3623
3624 2008-11-19  Darin Fisher  <darin@chromium.org>
3625
3626         Reviewed by Geoff Garen.
3627
3628         https://bugs.webkit.org/show_bug.cgi?id=22345
3629         Define ScriptValue as a thin container for a JSC::Value*.
3630
3631         * WebView/WebFrame.mm:
3632         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3633         * WebView/WebView.mm:
3634         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
3635
3636 2008-11-19  Anders Carlsson  <andersca@apple.com>
3637
3638         Reviewed by Sam Weinig.
3639
3640         <rdar://problem/6383762> WebKit r38340 crash on key press in plugin
3641         
3642         Set the value to 0 before calling NPP_GetValue, in case the plug-in returns NPERR_NO_ERROR but does not 
3643         update the value.
3644         
3645         * Plugins/WebNetscapePluginView.mm:
3646         (-[WebNetscapePluginView createPlugin]):
3647
3648 2008-11-19  Anders Carlsson  <andersca@apple.com>
3649
3650         Reviewed by Sam Weinig.
3651
3652         Make sure to copy the MIME type.
3653         
3654         * Plugins/WebBaseNetscapePluginView.mm:
3655         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
3656
3657 2008-11-19  Geoffrey Garen  <ggaren@apple.com>
3658
3659         Reviewed by Darin Adler.
3660         
3661         First step toward fixing <rdar://problem/6263293> WebScriptDebugDelegate
3662         should use intptr_t for sourceId, not int
3663         
3664         Added a conditional typedef (currently disabled) to switch sourceId to
3665         intptr_t in non-Tiger, non-Leopard builds.
3666
3667         * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
3668         (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]):
3669         (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
3670         (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
3671         (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]):
3672         (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
3673         (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
3674         * WebView/WebScriptDebugDelegate.h:
3675         * WebView/WebScriptDebugger.mm:
3676         (WebScriptDebugger::sourceParsed):
3677         (WebScriptDebugger::callEvent):
3678         (WebScriptDebugger::atStatement):
3679         (WebScriptDebugger::returnEvent):
3680         (WebScriptDebugger::exception):
3681
3682 2008-11-18  Dan Bernstein  <mitz@apple.com>
3683
3684         Reviewed by Mark Rowe.
3685
3686         - fix https://bugs.webkit.org/show_bug.cgi?id=22331
3687           <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item
3688
3689         * WebView/WebUIDelegatePrivate.h: Reorder new enum values after existing
3690         ones.
3691
3692 2008-11-17  Beth Dakin  <bdakin@apple.com>
3693
3694         Reviewed by Adele Peterson.
3695
3696         Fix for <rdar://problem/6373102> REGRESSION (r36919): In a new mail 
3697         message, the caret appears in message body by default
3698
3699         This fixes a regression caused by http://trac.webkit.org/changeset/36919. 
3700         That change was too sweeping; we do not want to 
3701         unconditionally set the page to be active, but we can be looser 
3702         than the original constraints. This patch set the window active if 
3703         the first responder is or is a descendant of the main frame's frame 
3704         view.
3705
3706         * WebView/WebView.mm:
3707         (-[WebView _updateFocusedAndActiveStateForFrame:]):
3708
3709 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
3710
3711         Reviewed by Darin Adler.
3712
3713         https://bugs.webkit.org/show_bug.cgi?id=22337
3714         Enable workers by default
3715
3716         * Configurations/WebKit.xcconfig: Define ENABLE_WORKERS (change from ENABLE_WORKER_THREADS,
3717         which was accidentally committed before).
3718
3719 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3720
3721         Not reviewed.
3722         
3723         Try to fix Mac build.
3724
3725         * WebView/WebScriptDebugDelegate.mm:
3726
3727 2008-11-17  Pierre-Olivier Latour  <pol@apple.com>
3728
3729         Reviewed by Sam Weinig.
3730
3731         Added SPI to allow pausing a running CSS transition or animation
3732         at a given time for testing purposes.
3733
3734         https://bugs.webkit.org/show_bug.cgi?id=21261
3735
3736         * WebView/WebFrame.mm:
3737         (-[WebFrame _pauseAnimation:onNode:atTime:]):
3738         (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]):
3739         * WebView/WebFramePrivate.h:
3740
3741 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3742
3743         Reviewed by Sam Weinig.
3744
3745         Updated for JavaScriptCore renames.
3746
3747         * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/runtime/Interpreter.h.
3748         * ForwardingHeaders/runtime/Interpreter.h: Removed.
3749         * WebView/WebScriptDebugDelegate.mm:
3750
3751 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
3752
3753         Reviewed by Darin Adler.
3754
3755         https://bugs.webkit.org/show_bug.cgi?id=21810
3756         Remove use of static C++ objects that are destroyed at exit time (destructors)
3757
3758         Use DEFINE_STATIC_LOCAL for static RetainPtr<T>
3759
3760         * Misc/WebNSPasteboardExtras.mm: Use DEFINE_STATIC_LOCAL
3761         (+[NSPasteboard _web_writableTypesForURL]):
3762         (_createWritableTypesForImageWithoutArchive): Created so accessor has one line initialization
3763         (_writableTypesForImageWithoutArchive): Use create function for one line initialization
3764         (_createWritableTypesForImageWithArchive): Created so accessor has one line initialization
3765         (_writableTypesForImageWithArchive): Use create function for one line initialization
3766         * WebCoreSupport/WebPasteboardHelper.mm: Use DEFINE_STATIC_LOCAL
3767         (WebPasteboardHelper::insertablePasteboardTypes):
3768         * WebView/WebHTMLRepresentation.mm: Use DEFINE_STATIC_LOCAL
3769         (+[WebHTMLRepresentation supportedMIMETypes]):
3770         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
3771         (+[WebHTMLRepresentation supportedImageMIMETypes]):
3772
3773 2008-11-16  Darin Adler  <darin@apple.com>
3774
3775         Reviewed by Dan Bernstein.
3776
3777         - https://bugs.webkit.org/show_bug.cgi?id=22295
3778           track which history items are from page load failures
3779
3780         * History/WebHistoryItem.mm: Added lastVisitWasFailureKey.
3781         (-[WebHistoryItem initFromDictionaryRepresentation:]): Set the lastVisitWasFailure
3782         flag in the history item if the dictionary had lastVisitWasFailureKey true.
3783         (-[WebHistoryItem dictionaryRepresentation]): Set the lastVisitWasFailureKey boolean
3784         in the dictionary if the history item had the lastVisitWasFailure flag.
3785         (-[WebHistoryItem lastVisitWasFailure]): Added.
3786
3787         * History/WebHistoryItemInternal.h: Moved include of WebBackForwardList here from
3788         WebHistoryItemPrivate.h; removed other unneeded includes.
3789
3790         * History/WebHistoryItemPrivate.h: Added lastVisitWasFailure method.
3791         Removed unneeded includes.
3792
3793         * Misc/WebNSDictionaryExtras.h: Added _webkit_boolForKey.
3794         * Misc/WebNSDictionaryExtras.m:
3795         (-[NSDictionary _webkit_boolForKey:]): Added.
3796
3797 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
3798
3799         Reviewed by Darin Adler.
3800         
3801         https://bugs.webkit.org/show_bug.cgi?id=21810
3802         Remove use of static C++ objects that are destroyed at exit time (destructors)
3803
3804         Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
3805         exit-time destructor. Update code that was changed to fix this issue that ran 
3806         into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
3807         in gcc build 5465). Also typdefs for template types needed to be added in some 
3808         cases so the type could make it through the macro successfully.
3809
3810         Basically code of the form:
3811         static T m;
3812         becomes:
3813         DEFINE_STATIC_LOCAL(T, m, ());
3814
3815         Also any code of the form:
3816         static T& m = *new T;
3817         also becomes:
3818         DEFINE_STATIC_LOCAL(T, m, ());
3819
3820         * ForwardingHeaders/wtf/StdLibExtras.h: Added.
3821         * History/WebBackForwardList.mm:
3822         (backForwardLists):
3823         * History/WebHistoryItem.mm:
3824         (historyItemWrappers):
3825         * Misc/WebStringTruncator.m:
3826         (fontFromNSFont):
3827         * Plugins/WebBaseNetscapePluginStream.mm:
3828         (streams):
3829         * WebView/WebView.mm:
3830         (aeDescFromJSValue):
3831
3832 2008-11-14  Dan Bernstein  <mitz@apple.com>
3833
3834         Reviewed by Darin Adler.
3835
3836         - <rdar://problem/6234333> Implement action methods for setting and clearing character-level directionality
3837         - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
3838
3839         * WebCoreSupport/WebViewFactory.mm:
3840         (-[WebViewFactory contextMenuItemTagTextDirectionMenu]): Added.
3841         * WebView/WebFrame.mm:
3842         (core): Added a convertor from WebTextDirectionSubmenuInclusionBehavior
3843         to WebCore::TextDirectionSubmenuInclusionBehavior.
3844         * WebView/WebFrameInternal.h:
3845         * WebView/WebHTMLView.mm:
3846         Added makeTextWritingDirectionLeftToRight:,
3847         makeTextWritingDirectionNatural: and
3848         makeTextWritingDirectionRightToLeft: using the WEBCORE_COMMAND macro.
3849         * WebView/WebPreferenceKeysPrivate.h:
3850         Added WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey.
3851         * WebView/WebPreferences.mm:
3852         (+[WebPreferences initialize]): Set the default Text Direction
3853         submenu inclusion behavior to never include.
3854         (-[WebPreferences textDirectionSubmenuInclusionBehavior]): Added this
3855         accessor.
3856         (-[WebPreferences setTextDirectionSubmenuInclusionBehavior:]): Ditto.
3857         * WebView/WebPreferencesPrivate.h: Defined the
3858         WebTextDirectionSubmenuInclusionBehavior enum and declared
3859         accessors.
3860         * WebView/WebUIDelegatePrivate.h:
3861         * WebView/WebView.mm:
3862         (-[WebView _preferencesChangedNotification:]): Added code to transfer
3863         the Text Direction submenu inclusion behavior preference to WebCore
3864         settings.
3865
3866 2008-11-14  Darin Adler  <darin@apple.com>
3867
3868         Reviewed by Mark Rowe.
3869
3870         - fix https://bugs.webkit.org/show_bug.cgi?id=22222
3871           selectKeyViewPrecedingView: with document view that can't be first responder
3872           makes WebFrameView be first responder
3873
3874         * WebView/WebFrameView.mm: (-[WebFrameView becomeFirstResponder]):
3875         Moved the acceptsFirstResponder special case inside the if statement so it won't
3876         run in the "selecting previous" case. Also removed the "just before shipping Tiger"
3877         code that doesn't need to be here any more.
3878
3879 2008-11-13  Mark Rowe  <mrowe@apple.com>
3880
3881         Fix the build.
3882
3883         Don't use NSPICTPboardType on systems where it is deprecated.  The system will take care of converting
3884         from this format to a format that we can understand.
3885
3886         * WebCoreSupport/WebPasteboardHelper.mm:
3887         (WebPasteboardHelper::insertablePasteboardTypes):
3888         * WebView/WebHTMLView.mm:
3889         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
3890         (+[WebHTMLView _insertablePasteboardTypes]):
3891         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
3892
3893 2008-11-13  John Sullivan  <sullivan@apple.com>
3894
3895         fixed <rdar://problem/6361578> Web Kit UI strings: a few edits
3896
3897         Reviewed by Tim Hatcher
3898
3899         * Misc/WebKitErrors.m:
3900         "Cannot show content with specified mime type" -> "Content with specified MIME type can't be shown"
3901         "Cannot show URL" -> "The URL can't be shown"
3902         "Cannot find plug-in" -> "The plug-in can't be found"
3903         "Cannot load plug-in" -> "The plug-in can't be loaded"
3904         
3905         * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib:
3906         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib:
3907         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: Added.
3908         * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Removed.
3909         Changed placeholder fine print in the nib to match one of the two strings it might be replaced by.
3910         This automagically updated the nib to a newer format, hence the objects -> keyedobjects change.
3911         I could have changed the placeholder fine print to be empty but this lets localizers understand
3912         the dialog layout better.
3913         
3914         * Panels/WebAuthenticationPanel.m:
3915         (-[WebAuthenticationPanel setUpForChallenge:]):
3916         "you need to log in" -> "you must log in"
3917         "Your log-in information" -> "Your login information"
3918         "The name or password entered" -> "The user name or password you entered"
3919         "Please try again." -> "Make sure you're entering them correctly, and then try again."        
3920
3921 2008-11-12  Stephanie Lewis  <slewis@apple.com>
3922
3923         Fix Mac build.        
3924
3925         * Panels/WebAuthenticationPanel.m:
3926
3927 2008-11-12  John Sullivan  <sullivan@apple.com>
3928
3929         fixed <rdar://problem/3839110> Authentication dialogs talk about passwords being sent "in the clear"
3930
3931         Reviewed by Tim Hatcher
3932
3933         * Panels/WebAuthenticationPanel.m:
3934         (-[WebAuthenticationPanel setUpForChallenge:]):
3935         use "unencrypted" instead of "in the clear". Also, use the "Your log-in information
3936         will be sent securely" version when the receiving server is https, regardless of
3937         whether it uses basic or digest authentication.
3938
3939 2008-11-12  Darin Adler  <darin@apple.com>
3940
3941         Reviewed by Mark Rowe.
3942
3943         - fix https://bugs.webkit.org/show_bug.cgi?id=22223
3944           <rdar://problem/6366864> REGRESSION(r38245): "View Source" crashes the browser
3945
3946         * WebView/WebFrameView.mm: (-[WebFrameView viewDidMoveToWindow]):
3947         Add missing null check.
3948
3949 2008-11-12  Anders Carlsson  <andersca@apple.com>
3950
3951         Reviewed by Kevin Decker.
3952
3953         Fix stupid bug.
3954         
3955         * Plugins/WebNetscapePluginView.mm:
3956         (-[WebNetscapePluginView createPlugin]):
3957
3958 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
3959
3960         Reviewed by Simon Hausmann.
3961
3962         Move _web_encodingForResource from WebKit into WebCore and change return type
3963
3964         This change is needed to implement NSAPI in WebCore for Mac, see:
3965
3966         https://bugs.webkit.org/show_bug.cgi?id=21427
3967
3968
3969         * Misc/WebKitNSStringExtras.m:
3970         (+[NSString _web_encodingForResource:]):
3971
3972 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
3973
3974         Reviewed by Simon Hausmann.
3975
3976         Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
3977         WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
3978
3979         This change is needed to implement NSAPI in WebCore for Mac, see:
3980
3981         https://bugs.webkit.org/show_bug.cgi?id=21427
3982
3983         * Misc/WebKitNSStringExtras.m:
3984         (-[NSString _webkit_isCaseInsensitiveEqualToString:]):
3985
3986 2008-11-11  Dan Bernstein  <mitz@apple.com>
3987
3988         Reviewed by Adam Roben.
3989
3990         WebKit/mac part of adding a master volume control for media elements in a WebView
3991
3992         * WebView/WebView.mm:
3993         (-[WebView setMediaVolume:]): Added.
3994         (-[WebView mediaVolume]): Added.
3995         * WebView/WebViewPrivate.h:
3996
3997 2008-11-11  Aaron Golden  <agolden@apple.com>
3998
3999         Bug 22134: -[WebHistoryItem dictionaryRepresentation] accesses past the end of a vector
4000
4001         <https://bugs.webkit.org/show_bug.cgi?id=22134>
4002
4003         Reviewed by Geoff Garen.
4004
4005         * History/WebHistoryItem.mm:
4006         (-[WebHistoryItem initFromDictionaryRepresentation:]):
4007         (-[WebHistoryItem dictionaryRepresentation]):
4008
4009 2008-11-10  Anders Carlsson  <andersca@apple.com>
4010
4011         Reviewed by Kevin Decker.
4012
4013         Move renewGState to the base class.
4014         
4015         * Plugins/WebBaseNetscapePluginView.mm:
4016         (-[WebBaseNetscapePluginView renewGState]):
4017         * Plugins/WebNetscapePluginView.mm:
4018
4019 2008-11-10  Anders Carlsson  <andersca@apple.com>
4020
4021         Reviewed by Kevin Decker.
4022
4023         Move start, stop and all the related methods down to WebBaseNetscapePluginView.
4024         
4025         * Plugins/WebBaseNetscapePluginView.h:
4026         * Plugins/WebBaseNetscapePluginView.mm:
4027         (-[WebBaseNetscapePluginView updateAndSetWindow]):
4028         (-[WebBaseNetscapePluginView addWindowObservers]):
4029         (-[WebBaseNetscapePluginView removeWindowObservers]):
4030         (-[WebBaseNetscapePluginView start]):
4031         (-[WebBaseNetscapePluginView stop]):
4032         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
4033         (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
4034         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
4035         (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]):
4036         (-[WebBaseNetscapePluginView viewDidMoveToHostWindow]):
4037         (-[WebBaseNetscapePluginView windowWillClose:]):
4038         (-[WebBaseNetscapePluginView windowBecameKey:]):
4039         (-[WebBaseNetscapePluginView windowResignedKey:]):
4040         (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
4041         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
4042         (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
4043         (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
4044         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
4045         * Plugins/WebNetscapePluginView.h:
4046         * Plugins/WebNetscapePluginView.mm:
4047
4048 2008-11-10  Anders Carlsson  <andersca@apple.com>
4049
4050         Reviewed by Kevin Decker.
4051
4052         Move rightMouseDown, rightMouseUp and sendActivateEvent to the base plugin view. 
4053         Add stubs for createPlugin, loadStream, shouldStop and destroyPlugin.
4054         
4055         * Plugins/WebBaseNetscapePluginView.h:
4056         * Plugins/WebBaseNetscapePluginView.mm:
4057         (-[WebBaseNetscapePluginView windowFocusChanged:]):
4058         (-[WebBaseNetscapePluginView createPlugin]):
4059         (-[WebBaseNetscapePluginView loadStream]):
4060         (-[WebBaseNetscapePluginView destroyPlugin]):
4061         (-[WebBaseNetscapePluginView sendActivateEvent:]):
4062         (-[WebBaseNetscapePluginView rightMouseDown:]):
4063         (-[WebBaseNetscapePluginView rightMouseUp:]):
4064         * Plugins/WebNetscapePluginView.mm:
4065         (-[WebNetscapePluginView windowFocusChanged:]):
4066
4067 2008-11-10  Anders Carlsson  <andersca@apple.com>
4068
4069         Reviewed by Kevin Decker.
4070
4071         Factor plug-in type specific code out to three new methods, createPlugin, destroyPlugin and loadStream.
4072         
4073         * Plugins/WebNetscapePluginView.mm:
4074         (-[WebNetscapePluginView createPlugin]):
4075         (-[WebNetscapePluginView loadStream]):
4076         (-[WebNetscapePluginView start]):
4077         (-[WebNetscapePluginView shouldStop]):
4078         (-[WebNetscapePluginView destroyPlugin]):
4079         (-[WebNetscapePluginView stop]):
4080
4081 2008-11-10  Anders Carlsson  <andersca@apple.com>
4082
4083         Fix Tiger build.
4084         
4085         * Plugins/WebNetscapePluginPackage.m:
4086         (-[WebNetscapePluginPackage load]):
4087
4088 2008-11-10  Anders Carlsson  <andersca@apple.com>
4089
4090         Reviewed by Sam Weinig.
4091
4092         Move even more code down to WebBaseNetscapePluginView, get rid of some unnecessary methods.
4093         
4094         * Plugins/WebBaseNetscapePluginView.h:
4095         * Plugins/WebBaseNetscapePluginView.mm:
4096         (-[WebBaseNetscapePluginView focusChanged]):
4097         (-[WebBaseNetscapePluginView visibleRect]):
4098         (-[WebBaseNetscapePluginView acceptsFirstResponder]):
4099         (-[WebBaseNetscapePluginView setHasFocus:]):
4100         (-[WebBaseNetscapePluginView becomeFirstResponder]):
4101         (-[WebBaseNetscapePluginView resignFirstResponder]):
4102         * Plugins/WebNetscapePluginView.h:
4103         * Plugins/WebNetscapePluginView.mm:
4104         (-[WebNetscapePluginView focusChanged]):
4105         (-[WebNetscapePluginView tellQuickTimeToChill]):
4106         (-[WebNetscapePluginView updateAndSetWindow]):
4107         (-[WebNetscapePluginView start]):
4108         (-[WebNetscapePluginView stop]):
4109         (-[WebNetscapePluginView viewWillMoveToWindow:]):
4110         (-[WebNetscapePluginView createPluginScriptableObject]):
4111         (-[WebNetscapePluginView pluginView:receivedData:]):
4112         (-[WebNetscapePluginView pluginView:receivedError:]):
4113         (-[WebNetscapePluginView pluginViewFinishedLoading:]):
4114         (-[WebNetscapePluginView inputContext]):
4115         (-[WebNetscapePluginView hasMarkedText]):
4116         (-[WebNetscapePluginView insertText:]):
4117         (-[WebNetscapePluginView markedRange]):
4118         (-[WebNetscapePluginView selectedRange]):
4119         (-[WebNetscapePluginView setMarkedText:selectedRange:]):
4120         (-[WebNetscapePluginView unmarkText]):
4121         (-[WebNetscapePluginView validAttributesForMarkedText]):
4122         (-[WebNetscapePluginView attributedSubstringFromRange:]):
4123         (-[WebNetscapePluginView characterIndexForPoint:]):
4124         (-[WebNetscapePluginView doCommandBySelector:]):
4125         (-[WebNetscapePluginView firstRectForCharacterRange:]):
4126         (-[WebNetscapePluginView _viewHasMoved]):
4127         (-[WebNetscapePluginView _redeliverStream]):
4128
4129 2008-11-10  Anders Carlsson  <andersca@apple.com>
4130
4131         Reviewed by Kevin Decker.
4132
4133         Move timer handling code down to WebBaseNetscapePluginView.
4134         
4135         * Plugins/WebBaseNetscapePluginView.h:
4136         * Plugins/WebBaseNetscapePluginView.mm:
4137         (-[WebBaseNetscapePluginView stopTimers]):
4138         (-[WebBaseNetscapePluginView startTimers]):
4139         (-[WebBaseNetscapePluginView restartTimers]):
4140         * Plugins/WebNetscapePluginView.h:
4141         * Plugins/WebNetscapePluginView.mm:
4142         (-[WebNetscapePluginView stopTimers]):
4143         (-[WebNetscapePluginView startTimers]):
4144         (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
4145         * WebView/WebHTMLView.mm:
4146         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
4147
4148 2008-11-10  Anders Carlsson  <andersca@apple.com>
4149
4150         Reviewed by Kevin Decker.
4151
4152         Move a bunch of methods and ivars up to WebBaseNetscapePluginView.
4153         
4154         * Plugins/WebBaseNetscapePluginView.h:
4155         * Plugins/WebBaseNetscapePluginView.mm:
4156         (-[WebBaseNetscapePluginView dealloc]):
4157         (-[WebBaseNetscapePluginView finalize]):
4158         (-[WebBaseNetscapePluginView removeTrackingRect]):
4159         (-[WebBaseNetscapePluginView resetTrackingRect]):
4160         (-[WebBaseNetscapePluginView dataSource]):
4161         (-[WebBaseNetscapePluginView webFrame]):
4162         (-[WebBaseNetscapePluginView webView]):
4163         (-[WebBaseNetscapePluginView currentWindow]):
4164         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
4165         (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
4166         * Plugins/WebNetscapePluginView.h:
4167         * Plugins/WebNetscapePluginView.mm:
4168         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
4169         (-[WebNetscapePluginView sendActivateEvent:]):
4170         (-[WebNetscapePluginView restartTimers]):
4171         (-[WebNetscapePluginView setHasFocus:]):
4172         (-[WebNetscapePluginView mouseDown:]):
4173         (-[WebNetscapePluginView mouseUp:]):
4174         (-[WebNetscapePluginView mouseEntered:]):
4175         (-[WebNetscapePluginView mouseExited:]):
4176         (-[WebNetscapePluginView handleMouseMoved:]):
4177         (-[WebNetscapePluginView mouseDragged:]):
4178         (-[WebNetscapePluginView scrollWheel:]):
4179         (-[WebNetscapePluginView keyUp:]):
4180         (-[WebNetscapePluginView keyDown:]):
4181         (-[WebNetscapePluginView flagsChanged:]):
4182         (-[WebNetscapePluginView updateAndSetWindow]):
4183         (-[WebNetscapePluginView setWindowIfNecessary]):
4184         (-[WebNetscapePluginView start]):
4185         (-[WebNetscapePluginView stop]):
4186         (-[WebNetscapePluginView isStarted]):
4187         (-[WebNetscapePluginView dealloc]):
4188         (-[WebNetscapePluginView finalize]):
4189         (-[WebNetscapePluginView drawRect:]):
4190         (-[WebNetscapePluginView windowBecameKey:]):
4191         (-[WebNetscapePluginView preferencesHaveChanged:]):
4192         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
4193         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
4194         (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
4195         (-[WebNetscapePluginView _viewHasMoved]):
4196
4197 2008-11-10  Anders Carlsson  <andersca@apple.com>
4198
4199         Reviewed by Kevin Decker and Mark Rowe.
4200
4201         Add a WebHostedNetscapePluginView class.
4202         
4203         * Plugins/WebHostedNetscapePluginView.h: Added.
4204         * Plugins/WebHostedNetscapePluginView.mm: Added.
4205
4206         * Plugins/WebNetscapePluginPackage.h:
4207         Use the right define.
4208         
4209         * Plugins/WebPluginDatabase.mm:
4210         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
4211         Check for WebBaseNetscapePluginView.
4212         
4213         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
4214         Check for WebBaseNetscapePluginView.
4215         
4216         * WebCoreSupport/WebFrameLoaderClient.mm:
4217         (NetscapePluginWidget::NetscapePluginWidget):
4218         (NetscapePluginWidget::handleEvent):
4219         Use WebBaseNetscapePluginView.
4220         
4221         (netscapePluginViewClass):
4222         New function that returns the right netscape plugin view type to use.
4223         
4224         (WebFrameLoaderClient::createPlugin):
4225         Get the right class.
4226         
4227         * WebKitPrefix.h:
4228    &