2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
2
3         Reviewed by Mark Rowe.
4
5         <rdar://problem/6781295> video.buffered and video.seekable are not
6         the same. video.buffered should return only what is buffered and
7         not what is seekable
8
9         * WebCoreSupport/WebSystemInterface.m:
10         (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable.
11
12 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
13
14         Reviewed by Adele Peterson.
15
16         <rdar://problem/6747241> work around QTKit no longer reaching
17         QTMovieLoadStateComplete
18
19         * WebCoreSupport/WebSystemInterface.m:
20         (InitWebCoreSystemInterface): Init the new WKSI exported symbol.
21
22 2009-04-17  Anders Carlsson  <andersca@apple.com>
23
24         Reviewed by Dan Bernstein.
25
26         <rdar://problem/6714488>
27         REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content
28         
29         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
30         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
31         (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
32         Send a keyDown event to the plug-in host.
33         
34         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
35         (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]):
36         Call the plug-in instance proxy.
37         
38         * Plugins/WebBaseNetscapePluginView.mm:
39         (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]):
40         Add this. Subclasses are required to override it.
41         
42         (-[WebBaseNetscapePluginView cut:]):
43         (-[WebBaseNetscapePluginView copy:]):
44         (-[WebBaseNetscapePluginView paste:]):
45         (-[WebBaseNetscapePluginView selectAll:]):
46         Call sendModifierEventWithKeyCode.
47         
48         * Plugins/WebNetscapePluginEventHandler.h:
49         Add syntheticKeyDownWithCommandModifier.
50         
51         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
52         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
53         (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier):
54         Send the synthetic event.
55         
56         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
57         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
58         (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
59         Send the synthetic event.
60         
61         * Plugins/WebNetscapePluginView.mm:
62         (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]):
63         Call the event handler.
64
65 2009-04-17  David Kilzer  <ddkilzer@apple.com>
66
67         Simplify FEATURE_DEFINES definition
68
69         Reviewed by Darin Adler.
70
71         This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
72         variables to their own FeatureDefines.xcconfig file.  It also
73         extracts a new ENABLE_GEOLOCATION variable so that
74         FEATURE_DEFINES only needs to be defined once.
75
76         * Configurations/FeatureDefines.xcconfig: Added.
77         * Configurations/WebKit.xcconfig: Removed definition of
78         ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES.  Added include
79         of FeatureDefines.xcconfig.
80
81 2009-04-17  Anders Carlsson  <andersca@apple.com>
82
83         Reviewed by Darin Adler.
84
85         Fix crashes seen in regression tests with hosted plug-ins.
86
87         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
88         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0,
89         not the stream ID.
90
91 2009-04-17  Darin Adler  <darin@apple.com>
92
93         Reviewed by Antti Koivisto.
94
95         Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
96         https://bugs.webkit.org/show_bug.cgi?id=25210
97
98         * DOM/WebDOMOperations.mm:
99         (-[DOMNode markupString]): Use the core function instead of an Objective-C method.
100         (-[DOMNode _subresourceURLs]): Ditto.
101         (-[DOMDocument _focusableNodes]): Ditto.
102         (-[DOMRange webArchive]): Ditto.
103         (-[DOMRange markupString]): Ditto.
104
105         * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit
106         functions now come from the internal headers from DOM bindings.
107         * Misc/WebNSPasteboardExtras.mm: Ditto.
108         * Plugins/WebNullPluginView.mm: Ditto.
109         * Plugins/WebPluginController.mm: Ditto.
110         * WebCoreSupport/WebChromeClient.mm: Ditto.
111         * WebCoreSupport/WebInspectorClient.mm: Ditto.
112         * WebCoreSupport/WebPasteboardHelper.mm: Ditto.
113         * WebView/WebHTMLView.mm: Ditto.
114
115         * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage
116         since it's only used in this file. Someone had instead added a declaration to
117         suppress the warning you would otherwise get. Removed the core function.
118         (WebEditorClient::textFieldDidBeginEditing): Added correct type checking.
119         Previously the function would check only that something was an HTMLElement,
120         but then cast it to HTMLInputElement. Also call kit instead of old wrap method.
121         (WebEditorClient::textFieldDidEndEditing): Ditto.
122         (WebEditorClient::textDidChangeInTextField): Ditto.
123         (WebEditorClient::doTextFieldCommandFromEvent): Ditto.
124         (WebEditorClient::textWillBeDeletedInTextField): Ditto.
125         (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement.
126
127         * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer
128         needed since they're automatically generated now.
129         (-[WebFrame _nodesFromList:]): Use kit.
130         (-[WebFrame _markupStringFromRange:nodes:]): Use core.
131         (-[WebFrame _stringForRange:]): More of the same.
132         (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
133         (-[WebFrame _firstRectForDOMRange:]): Ditto.
134         (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
135         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
136         Ditto.
137         (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
138         (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
139         (-[WebFrame _markDOMRange]): Ditto.
140         (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
141         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
142         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
143         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
144         (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
145         (-[WebFrame _characterRangeAtPoint:]): Ditto.
146         (-[WebFrame _typingStyle]): Ditto.
147         (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
148         (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto.
149         (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto.
150         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
151
152         * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer
153         needed since they're automatically generated now.
154
155         * WebView/WebHTMLRepresentation.mm:
156         (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core.
157         (formElementFromDOMElement): Ditto.
158         (inputElementFromDOMElement): Ditto.
159         * WebView/WebTextIterator.mm:
160         (-[WebTextIterator initWithRange:]): Ditto.
161         (-[WebTextIterator currentRange]): Ditto.
162         (-[WebTextIterator currentNode]): Ditto.
163         * WebView/WebView.mm:
164         (-[WebView textIteratorForRect:]): Ditto.
165         (-[WebView setSelectedDOMRange:affinity:]): Ditto.
166
167 2009-04-17  Anders Carlsson  <andersca@apple.com>
168
169         Reviewed by Sam Weinig.
170
171         WebKit side of <rdar://problem/6449642>.
172         
173         * Plugins/Hosted/HostedNetscapePluginStream.h:
174         (WebKit::HostedNetscapePluginStream::create):
175         New function that creates a stream from a frame loader.
176         
177         * Plugins/Hosted/HostedNetscapePluginStream.mm:
178         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
179         Add the constructor that takes a frame loader.
180         
181         * Plugins/Hosted/NetscapePluginHostManager.h:
182         * Plugins/Hosted/NetscapePluginHostManager.mm:
183         (WebKit::NetscapePluginHostManager::instantiatePlugin):
184         Pass "fullFrame" to the plug-in host.
185         
186         * Plugins/Hosted/NetscapePluginHostProxy.mm:
187         (WKPCCancelLoadURL):
188         Call NetscapePluginInstanceProxy::cancelStreamLoad.
189         
190         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
191         (WebKit::NetscapePluginInstanceProxy::create):
192         Pass "fullFrame" to the constructor.
193         
194         (WebKit::NetscapePluginInstanceProxy::manualStream):
195         New getter for the manual stream.
196         
197         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
198         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
199         Take the implicit request into account if we have a full frame plug-in.
200         
201         (WebKit::NetscapePluginInstanceProxy::setManualStream):
202         Setter for the manual stream.
203         
204         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
205         Cancel the manual stream if necessary.
206         
207         * Plugins/Hosted/WebHostedNetscapePluginView.h:
208         WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol.
209         
210         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
211         (-[WebHostedNetscapePluginView createPlugin]):
212         Pass "fullFrame" to instantiatePlugin.
213         
214         (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
215         (-[WebHostedNetscapePluginView pluginView:receivedData:]):
216         (-[WebHostedNetscapePluginView pluginView:receivedError:]):
217         (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]):
218         Call the equivalent manual stream functions.
219         
220         * WebCoreSupport/WebFrameLoaderClient.mm:
221         (WebFrameLoaderClient::createPlugin):
222         Use a macro for getting the plug-in view type.
223
224 2009-04-14  Simon Fraser  <simon.fraser@apple.com>
225
226         Reviewed by Dan Bernstein
227
228         https://bugs.webkit.org/show_bug.cgi?id=25157
229         
230         Move the run loop observer cleanup from -close
231         to -_close.
232
233         * WebView/WebView.mm:
234         (-[WebView _close]):
235         (-[WebView close]):
236
237 2009-04-14  Anders Carlsson  <andersca@apple.com>
238
239         Reviewed by Sam Weinig.
240
241         - Speculative fix for <rdar://problem/6781422> 
242
243         Protect the plug-in instance proxy in case it's deleted while waiting for a reply.
244
245         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
246         (WebKit::NetscapePluginInstanceProxy::wheelEvent):
247
248 2009-04-14  Adele Peterson  <adele@apple.com>
249
250         Reviewed by Darin.
251
252         Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up.  This was causing Mail to crash on launch.
253
254         * Misc/WebCache.mm: (+[WebCache initialize]):
255         * WebView/WebView.mm: (+[WebView initialize]):
256
257 2009-04-13  Kevin Decker  <kdecker@apple.com>
258
259         Reviewed by Darin.
260
261         <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks
262         
263         Simplify the _trackFirstResponder method by just caching the value instead of retaining
264         a Cocoa object.
265         
266         * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with
267         a firstResponderIsPDFDocumentView boolean.
268         * WebView/WebPDFView.mm: 
269         (-[WebPDFView dealloc]): Removed no longer necessary ASSERT.
270         (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder,
271         which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO.
272         (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead
273         of retaining an object.
274
275 2009-04-13  David Hyatt  <hyatt@apple.com>
276
277         Reviewed by Sam Weinig.
278
279         Fix for https://bugs.webkit.org/show_bug.cgi?id=25125.  Rework scrolling so that a layout happens first when
280         it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
281
282         This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with
283         WebCore's notion of needing layout.
284
285         * WebView/WebDynamicScrollBarsView.m:
286         (-[WebDynamicScrollBarsView updateScrollers]):
287         * WebView/WebHTMLView.mm:
288         (-[WebHTMLView _frameOrBoundsChanged]):
289         (-[WebHTMLView initWithFrame:]):
290         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
291         (-[WebHTMLView setNeedsLayout:]):
292         (-[WebHTMLView _layoutIfNeeded]):
293         (-[WebHTMLView _needsLayout]):
294         * WebView/WebHTMLViewInternal.h:
295
296 2009-04-13  Darin Adler  <darin@apple.com>
297
298         * WebView/WebViewPrivate.h: Updated comments.
299
300 2009-04-13  Antti Koivisto  <antti@apple.com>
301
302         Reviewed by Darin Adler.
303         
304         <rdar://problem/6740294> Increase the connection count per host
305
306         * WebCoreSupport/WebSystemInterface.m:
307         (InitWebCoreSystemInterface):
308
309 2009-04-13  Brady Eidson  <beidson@apple.com>
310
311         Reviewed by Tim Hatcher
312
313         Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
314         useful to developers/users.
315
316         * WebView/WebFrame.mm:
317         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
318           perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
319         (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
320           is more meaningful.
321         (-[WebFrame loadHTMLString:baseURL:]): Ditto.
322         (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
323
324 2009-04-13  Brady Eidson  <beidson@apple.com>
325
326         Reviewed by Kevin Decker
327
328         <rdar://problem/6712063> Garmin WebUpdater crashes
329
330         * WebView/WebFrame.mm:
331         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):  If not called on the main thread,
332           add a ThreadViolationCheckRoundTwo() call to either log or raise an exception.  In the case where it's
333           only a log, reschedule the _loadData call to occur on the main thread.
334
335 2009-04-10  Dan Bernstein  <mitz@apple.com>
336
337         Reviewed by Jon Honeycutt.
338
339         - fix <rdar://problem/6752340> Light blue-green background in content
340           area in Mail
341
342         * WebView/WebView.mm:
343         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
344         Use device white, rather than calibrated white, as the default
345         background color.
346
347 2009-04-10  Darin Adler  <darin@apple.com>
348
349         Reviewed by Brady Eidson.
350
351         <rdar://problem/6773515> crash in push_heap inside WebCore when printing
352
353         The crash was due to manipulating a timer on a different thread than the one it was created on.
354
355         * History/WebHistoryItem.mm:
356         (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
357         * WebView/WebHTMLView.mm:
358         (-[WebHTMLView windowDidBecomeKey:]): Ditto.
359         (-[WebHTMLView windowDidResignKey:]): Ditto.
360         (-[WebHTMLView windowWillClose:]): Ditto.
361         (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
362         our override of _windowChangedKeyState.
363         (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
364         called on non-main thread.
365         * WebView/WebPreferences.mm:
366         (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
367         on non-main thread
368
369 2009-04-10  Timothy Hatcher  <timothy@apple.com>
370
371         Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
372
373         Rubber-stamped by Mark Rowe.
374
375         * Misc/DOMDocumentPrivate.h: Removed.
376
377 2009-04-10  Pierre d'Herbemont  <pdherbemont@apple.com>
378
379         Reviewed by Adele Peterson.
380
381         <rdar://problem/6646998> Avoid starting QTKitServer if possible
382         Add the requires symbol in the WebSystemInterface. It is used by
383         WebCore.
384
385         * WebCoreSupport/WebSystemInterface.m:
386         (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes.
387
388 2009-04-09  Kevin Decker  <kdecker@apple.com>
389
390         Reviewed by Hyatt.
391
392         <rdar://problem/4680397> tearing seen because deferred updates are disabled
393         
394         * WebView/WebFrameView.mm:
395         (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if 
396         NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined.
397
398 2009-04-09  John Sullivan  <sullivan@apple.com>
399
400         <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for 
401         downloads is broken and should be removed
402
403         Reviewed by Darin Adler
404
405         * Misc/WebDownload.m:
406         (-[WebDownloadInternal downloadDidBegin:]):
407         remove disableSuddenTermination call
408         (-[WebDownloadInternal downloadDidFinish:]):
409         remove enableSuddenTermination call
410         (-[WebDownloadInternal download:didFailWithError:]):
411         remove enableSuddenTermination call
412
413 2009-04-09  Darin Adler  <darin@apple.com>
414
415         Reviewed by Anders Carlsson and Sam Weinig.
416
417         Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
418
419         Longer term solution is to change the design so Safari doesn't read and write all of history.
420         This patch is step one: Do the serializing, which is done on the main thread, much faster.
421
422         * History/WebHistory.mm:
423         (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history.
424         For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter.
425         (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data
426         (-[WebHistory _data]): Added.
427         (WebHistoryWriter::WebHistoryWriter): Added.
428         (WebHistoryWriter::writeHistoryItems): Added.
429
430         * History/WebHistoryPrivate.h: Added a new _data method.
431
432 2009-04-09  Mike Thole  <mthole@apple.com>
433
434         Rubber-stamped by Mark Rowe.
435
436         Fix 64-bit build
437
438         * Panels/WebAuthenticationPanel.h:
439             Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'.
440             This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer)
441
442 2009-04-09  Mike Thole  <mthole@apple.com>
443
444         Reviewed by Ada Chan.
445
446         <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability
447
448         * Panels/WebAuthenticationPanel.h:
449             Added IBOutlet for separateRealmLabel
450         * Panels/WebAuthenticationPanel.m:
451         (-[WebAuthenticationPanel setUpForChallenge:]):
452             In the realm case, decide if it is a simple or complex realm name.  A realm name
453             is considered complex if it has any whitespace or newline characters.  Present
454             alternative text and layout for the complex case, where the realm name isn't inline
455             with the rest of the sheet's text.
456         
457         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
458         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
459             Updated the nib with a new 'separateRealmLabel' outlet. 
460             Updated the File's Owner to correctly be WebAuthenticationPanel.  
461             Fixed springs on the sheet's icon to keep it from moving during a resize.
462
463 2009-04-09  David Kilzer  <ddkilzer@apple.com>
464
465         Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
466
467         Rolled r42345 back in.  The build failure was caused by an
468         internal script which had not been updated the same way that
469         build-webkit was updated.
470
471         * Configurations/WebKit.xcconfig:
472         * DOM/WebDOMOperations.mm:
473         * MigrateHeaders.make:
474
475 2009-04-09  Alexey Proskuryakov  <ap@webkit.org>
476
477         Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
478         It broke Mac build, and I don't know how to fix it.
479
480         * Configurations/WebKit.xcconfig:
481         * DOM/WebDOMOperations.mm:
482         * MigrateHeaders.make:
483
484 2009-04-08  David Kilzer  <ddkilzer@apple.com>
485
486         <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
487
488         Reviewed by Darin Adler and Maciej Stachowiak.
489
490         Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
491         that SVG DOM Objective-C bindings may be optionally disabled.
492
493         * Configurations/WebKit.xcconfig: Added
494         ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
495         FEATURE_DEFINES.
496         * DOM/WebDOMOperations.mm: Removed unused header.
497         * MigrateHeaders.make: Switched from using ENABLE_SVG to using
498         ENABLE_SVG_DOM_OBJC_BINDINGS.
499
500 2009-04-08  David Hyatt  <hyatt@apple.com>
501
502         Reviewed by Adam Roben and Darin Adler
503
504         Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in
505         inconsistent positions.  Rewrite updateScrollers to improve the correctness.
506
507         * WebView/WebDynamicScrollBarsView.h:
508         * WebView/WebDynamicScrollBarsView.m:
509         (-[WebDynamicScrollBarsView updateScrollers]):
510
511 2009-04-07  Anders Carlsson  <andersca@apple.com>
512
513         Fix Tiger build for real this time.
514
515         * Plugins/WebNetscapePluginView.h:
516         * Plugins/WebNetscapePluginView.mm:
517         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
518         (-[WebNetscapePluginView setVariable:forURL:value:length:]):
519         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
520         * Plugins/npapi.mm:
521         (NPN_GetValueForURL):
522         (NPN_SetValueForURL):
523
524 2009-04-07  David Hyatt  <hyatt@apple.com>
525
526         Reviewed by Adam Roben
527
528         Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results.  Change
529         updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView.
530
531         * WebView/WebDynamicScrollBarsView.m:
532         (-[WebDynamicScrollBarsView updateScrollers]):
533
534 2009-04-07  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
535
536         Reviewed by Anders Carlsson.
537
538         Trying to fix Tiger build.
539
540         * Plugins/WebNetscapePluginView.h:
541         * Plugins/WebNetscapePluginView.mm:
542         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
543
544 2009-04-07  Anders Carlsson  <andersca@apple.com>
545
546         Try to fix the Leopard build once more.
547         
548         * Plugins/WebBaseNetscapePluginView.h:
549         * Plugins/WebBaseNetscapePluginView.mm:
550         * Plugins/WebNetscapePluginView.mm:
551         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
552
553 2009-04-07  Anders Carlsson  <andersca@apple.com>
554
555         ...and try to fix the Leopard build.
556         
557         * Plugins/npapi.mm:
558         (NPN_GetAuthenticationInfo):
559
560 2009-04-07  Anders Carlsson  <andersca@apple.com>
561
562         Try to fix the Tiger build.
563
564         * Plugins/WebBaseNetscapePluginView.mm:
565
566 2009-04-07  Anders Carlsson  <andersca@apple.com>
567
568         Reviewed by Sam Weinig.
569
570         <rdar://problem/6667001>
571         NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
572         
573         * Plugins/Hosted/NetscapePluginHostProxy.mm:
574         (WKPCGetCookies):
575         (WKPCGetProxy):
576         (WKPCSetCookies):
577         (WKPCGetAuthenticationInfo):
578         New MIG functions to be used by the plug-in host.
579         
580         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
581         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
582         (WebKit::NetscapePluginInstanceProxy::getCookies):
583         (WebKit::NetscapePluginInstanceProxy::setCookies):
584         (WebKit::NetscapePluginInstanceProxy::getProxy):
585         (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
586         Implement these.
587         
588         * Plugins/Hosted/WebKitPluginClient.defs:
589         Add callbacks.
590         
591         * Plugins/WebBaseNetscapePluginView.h:
592         * Plugins/WebBaseNetscapePluginView.mm:
593         (-[WebBaseNetscapePluginView URLWithCString:]):
594         Factor this out of URLWithCString.
595         
596         (-[WebBaseNetscapePluginView requestWithURLCString:]):
597         Call URLWithCString.
598         
599         (WebKit::proxiesForURL):
600         Return a string representation of proxies for a given URL.
601         
602         (WebKit::getAuthenticationInfo):
603         Get the authentication info for a given host/protocol/scheme/realm/port combination.
604         
605         * Plugins/WebNetscapePluginPackage.mm:
606         (-[WebNetscapePluginPackage _tryLoad]):
607         Initialize the new vtable functions.
608         
609         * Plugins/WebNetscapePluginView.h:
610         * Plugins/WebNetscapePluginView.mm:
611         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
612         (-[WebNetscapePluginView setVariable:forURL:value:length:]):
613         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
614         Implement these.
615         
616         * Plugins/npapi.mm:
617         (NPN_GetValueForURL):
618         (NPN_SetValueForURL):
619         (NPN_GetAuthenticationInfo):
620         Call the plug-in view functions.
621
622 2009-04-03  Kevin Decker  <kdecker@apple.com>
623
624         Reviewed by Anders Carlsson.
625
626         <rdar://problem/6756512>
627         
628         * Plugins/Hosted/NetscapePluginHostManager.mm:
629         (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property.
630
631 2009-04-03  John Sullivan  <sullivan@apple.com>
632
633         Reviewed by Ada Chan
634         
635         <rdar://problem/6755838> Removing all icons can delete other items from disk.
636
637         * Misc/WebIconDatabase.mm:
638         (importToWebCoreFormat):
639         When snooping around in various directories looking for a directory full of Safari-2-style
640         icon database information to convert and delete, bail out without doing the delete part if
641         we didn't actually find any Safari-2-style icon database information.
642
643 2009-04-03  John Sullivan  <sullivan@apple.com>
644
645         fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory
646
647         Reviewed by Adam Roben
648
649         * WebView/WebView.mm:
650         (+[WebView _setCacheModel:]):
651         use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef
652
653 2009-04-03  Chris Marrin  <cmarrin@apple.com>
654
655         Reviewed by David Hyatt.
656
657         Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
658
659         This fix essentially does a -viewWillDraw call for layout. It adds 
660         a CFRunLoopObserver which performs layout just before drawing on the 
661         Mac platform. This makes sure layout is complete before rendering and 
662         avoids a flash.
663
664         * WebCoreSupport/WebChromeClient.h:
665         * WebCoreSupport/WebChromeClient.mm:
666         (WebChromeClient::attachRootGraphicsLayer):
667         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
668         (WebChromeClient::scheduleViewUpdate):
669         * WebView/WebView.mm:
670         (-[WebViewPrivate _clearViewUpdateRunLoopObserver]):
671         (-[WebView _viewWillDrawInternal]):
672         (-[WebView viewWillDraw]):
673         (-[WebView close]):
674         (viewUpdateRunLoopObserverCallBack):
675         (-[WebView _scheduleViewUpdate]):
676         * WebView/WebViewInternal.h:
677
678 2009-04-03  Anders Carlsson  <andersca@apple.com>
679
680         Reviewed by Kevin Decker.
681
682         WebKit side of <rdar://problem/6752953>.
683         
684         Pass the clip rect to the plug-in host.
685         
686         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
687         (WebKit::NetscapePluginInstanceProxy::resize):
688         * Plugins/Hosted/WebKitPluginHost.defs:
689
690 2009-04-02  Mark Rowe  <mrowe@apple.com>
691
692         Reviewed by Dan Bernstein and Timothy Hatcher.
693
694         <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file
695
696         The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
697         our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
698         methods.
699
700         * WebView/WebView.mm:
701         (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
702         (-[WebView addSizeObservers]): Ditto.
703
704 2009-04-02  Adele Peterson  <adele@apple.com>
705
706         Reviewed by Darin Adler.
707
708         Add a way to get a list of focusable nodes.
709
710         * DOM/WebDOMOperations.mm:
711         (-[DOMDocument _focusableNodes]):
712         * DOM/WebDOMOperationsInternal.h: Added.
713         * DOM/WebDOMOperationsPrivate.h: Make this a private header.
714         Move old methods to WebDOMOperationsInternal.h
715         * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h
716
717 2009-04-01  Darin Adler  <darin@apple.com>
718
719         Reviewed by Geoff Garen.
720
721         Bug 22378: Crash submitting a form when parsing an XHTML document
722         https://bugs.webkit.org/show_bug.cgi?id=22378
723         rdar://problem/6388377
724
725         * History/WebHistoryItem.mm:
726         (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling
727         isTargetItem, hasChildren, and recurseToFindTargetItem.
728
729         * WebCoreSupport/WebFrameLoaderClient.mm:
730         (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new
731         textFieldValues function in FormState.
732
733         * WebView/WebPDFView.mm:
734         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and
735         argument change of loadFrameRequest.
736
737 2009-04-01  Greg Bolsinga  <bolsinga@apple.com>
738
739         Reviewed by Mark Rowe.
740         
741         https://bugs.webkit.org/show_bug.cgi?id=24990
742         Put SECTORDER_FLAGS into xcconfig files.
743
744         * Configurations/Base.xcconfig:
745         * Configurations/DebugRelease.xcconfig:
746
747 2009-03-31  Anders Carlsson  <andersca@apple.com>
748
749         Reviewed by Adam Roben.
750
751         WebKit side of <rdar://problem/6500266>.
752         
753         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
754         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
755         (WebKit::NetscapePluginInstanceProxy::wheelEvent):
756         Send the event.
757         
758         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
759         (-[WebHostedNetscapePluginView scrollWheel:]):
760         Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't
761         call super.
762         
763         * Plugins/Hosted/WebKitPluginHost.defs:
764         Add definition.
765
766 2009-03-31  Darin Adler  <darin@apple.com>
767
768         Reviewed by Adele Peterson.
769
770         <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail
771
772         * WebView/WebHTMLView.mm:
773         (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had
774         handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:]
775         calls tryToPerform on the next responder.
776
777 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
778
779         Reviewed by Simon Fraser.
780         
781         https://bugs.webkit.org/show_bug.cgi?id=24938
782         
783         Build fixes when building --no-svg
784         
785         DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG.
786
787         * MigrateHeaders.make:
788
789 2009-03-29  Darin Adler  <darin@apple.com>
790
791         Reviewed by Cameron Zwarich.
792
793         * Plugins/WebNullPluginView.mm: Added now-needed includes.
794         * WebView/WebHTMLRepresentation.mm: Ditto.
795         * WebView/WebHTMLView.mm: Ditto.
796
797 2009-03-27  Timothy Hatcher  <timothy@apple.com>
798
799         * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it
800         is not generated anymore.
801
802 2009-03-27  Adam Roben  <aroben@apple.com>
803
804         Don't include substitute data URLs in global history redirect chains
805
806         <rdar://6690169>
807
808         Reviewed by Darin Adler.
809
810         * WebCoreSupport/WebFrameLoaderClient.mm:
811         (WebFrameLoaderClient::updateGlobalHistory): Don't call
812         updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
813         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
814         Added an assertion to help catch cases where we might be adding a
815         substitute data URL into a redirect chain.
816
817 2009-03-27  Darin Adler  <darin@apple.com>
818
819         Reviewed by Adam Roben.
820
821         <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken
822
823         * WebView/WebHTMLView.mm:
824         (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame.
825
826 2009-03-27  Darin Adler  <darin@apple.com>
827
828         Reviewed by John Sullivan and Anders Carlsson.
829
830         <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services)
831
832         Added SPI to tell which pasteboard is currently being inserted.
833         I chose to put it on WebView to be forward-looking since we're migrating things
834         from WebHTMLView to WebView in the future.
835
836         * WebView/WebHTMLView.mm:
837         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard.
838         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
839         * WebView/WebView.mm:
840         (-[WebViewPrivate dealloc]): Assert the pasteboard is nil.
841         (-[WebViewPrivate finalize]): Ditto.
842         (-[WebView _insertionPasteboard]): Return the pastebaord.
843         (-[WebView _setInsertionPasteboard:]): Set the pasteboard.
844         * WebView/WebViewInternal.h: Added _setInsertionPasteboard.
845         * WebView/WebViewPrivate.h: Added _insertionPasteboard.
846
847 2009-03-25  Timothy Hatcher  <timothy@apple.com>
848
849         Expose new DOM methods as public Objective-C API.
850
851         <rdar://problem/5837350> Expose new DOM classes and methods
852         as public API (match the additions to the JavaScript DOM)
853
854         Reviewed by Mark Rowe and Darin Adler.
855
856         * MigrateHeaders.make:
857         * Misc/DOMDocumentPrivate.h: Added. Forwarding header for
858         <rdar://problem/6730996>.
859
860 2009-03-26  Jungshik Shin  <jshin@chromium.org>
861
862         Reviewed by Alexey Proskuryakov.
863
864         Add WebPreferences for encoding autodetection on Mac.
865   
866         http://bugs.webkit.org/show_bug.cgi?id=16482
867
868         * WebView/WebPreferenceKeysPrivate.h:
869         * WebView/WebPreferences.mm:
870         (+[WebPreferences initialize]):
871         (-[WebPreferences usesEncodingDetector]):
872         (-[WebPreferences setUsesEncodingDetector:]):
873         * WebView/WebPreferencesPrivate.h:
874         * WebView/WebView.mm:
875         (-[WebView _preferencesChangedNotification:]):
876
877 2009-03-26  Anders Carlsson  <andersca@apple.com>
878
879         Reviewed by Dan Bernstein.
880
881         - Fix <rdar://problem/6687055> and <rdar://problem/6713639>.
882         
883         * Plugins/Hosted/NetscapePluginHostProxy.mm:
884         (WKPCInvalidateRect):
885         Call NetscapePluginInstanceProxy::invalidateRect.
886         
887         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
888         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
889         (WebKit::NetscapePluginInstanceProxy::cleanup):
890         Stop the request timer, set m_pluginView to nil.
891         
892         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
893         No need to set m_pluginView to nil here anymore, it's now done in cleanup().
894         
895         (WebKit::NetscapePluginInstanceProxy::performRequest):
896         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
897         Assert that the plug-in view is not nil.
898         
899         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
900         Call setNeedsDisplayInRect here.
901
902 2009-03-25  Anders Carlsson  <andersca@apple.com>
903
904         Reviewed by Darin Adler.
905
906         <rdar://problem/6714964>
907         CrashTracer: [REGRESSION] 51 crashes in Safari at com.apple.WebKit • WebNetscapePluginStream::deliverData + 775
908         
909         Don't release m_deliveryData since it's a RetainPtr. Also, use adoptNS instead of releasing newDeliveryData manually.
910         
911         * Plugins/WebBaseNetscapePluginStream.mm:
912         (WebNetscapePluginStream::deliverData):
913
914 2009-03-25  Mike Thole  <mthole@apple.com>
915
916         Reviewed by Kevin Decker.
917         
918         <rdar://problem/6453738> call SetWindow when user creates a new tab
919         
920         CoreGraphics plug-ins now receive an NPP_SetWindow call when moving to a background tab.
921         Flash is excluded from this change in behavior, as it has historical WebKit-specific code
922         that isn't compatible with this change.
923
924         * Plugins/WebNetscapePluginView.h:
925             Added an _isFlash ivar.
926         * Plugins/WebNetscapePluginView.mm:
927         (-[WebNetscapePluginView _createPlugin]):
928             Set the new _isFlash ivar based on the bundle identifier.
929         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
930             When using the CG drawing model and in a non-drawable state,  set the portState
931             to NULL and return early.
932         (-[WebNetscapePluginView updateAndSetWindow]):
933             When using the CG drawing model, call -setWindowIfNecessary even if the portState is NULL.
934             Flash is an exception to this, due to its historical behavior.
935         (-[WebNetscapePluginView setWindowIfNecessary]):
936             Removed an assertion that was no longer true.  The [NSView focus] view
937             is no longer guaranteed to be 'self' at this point.
938             Also modified the debug logging for CG plug-ins to include the size of the 
939             window's clipRect, which was useful in verifying the correct behavior of this patch.
940
941 2009-03-24  Dan Bernstein  <mitz@apple.com>
942
943         Reviewed by Oliver Hunt.
944
945         - speculative fix for <rdar://problem/6630134> Crash at
946           Editor::compositionRange()
947
948         * WebView/WebHTMLView.mm:
949         (-[WebHTMLView markedRange]): Null-check the Frame like most other
950         methods in this class.
951
952 2009-03-23  Sam Weinig  <sam@webkit.org>
953
954         Reviewed by Dan Bernstein.
955
956         Fix for <rdar://problem/6140966>
957         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
958
959         * Misc/WebCache.mm:
960         (+[WebCache empty]):
961
962 2009-03-23  Adele Peterson  <adele@apple.com>
963
964         Reviewed by Mark Rowe & Dave Hyatt.
965
966         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
967
968         * WebView/WebView.mm:
969         (runningLeopardMail):
970         (runningTigerMail):
971         (-[WebView _preferencesChangedNotification:]):
972
973 2009-03-23  Darin Adler  <darin@apple.com>
974
975         * WebView/WebTextIterator.h: Fixed a spelling error in a comment.
976
977 2009-03-22  Dan Bernstein  <mitz@apple.com>
978
979         Reviewed by John Sullivan.
980
981         - fix <rdar://problem/6640741> Messages not displaying after the
982           Safari 4 beta was installed
983
984         Mail assumes that if -[WebArchive subresources] is not nil, then it
985         contains at least one object.
986
987         * WebView/WebArchive.mm:
988         (-[WebArchive subresources]): Preserve the behavior of returning nil
989         if there are no subresources.
990
991 2009-03-20  Adele Peterson  <adele@apple.com>
992
993         Build fix.
994
995         Reviewed by Darin Adler.
996
997         * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):
998
999 2009-03-20  Timothy Hatcher  <timothy@apple.com>
1000
1001         Change how threading exceptions are checked so they are reported
1002         by what round they were added. That way WebKit can decided the
1003         behavior per-round based on linked-on-or-after checks.
1004
1005         <rdar://problem/6626741&6648478&6635474&6674079>
1006
1007         Reviewed by Darin Adler.
1008
1009         * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
1010         * History/WebHistoryItem.mm: Ditto.
1011         * Misc/WebIconDatabase.mm: Ditto.
1012
1013         * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
1014         * WebView/WebResource.mm: Ditto.
1015         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
1016         to truly decide if it is an old Mail client.
1017         * WebView/WebView.mm: Ditto.
1018
1019         * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
1020         * WebView/WebFrameView.mm:
1021         (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
1022         based on difference version checks and the Mail workaround check.
1023
1024 2009-03-20  Darin Adler  <darin@apple.com>
1025
1026         Reviewed by Timothy Hatcher.
1027
1028         * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
1029         of this SPI.
1030
1031 2009-03-20  Darin Adler  <darin@apple.com>
1032
1033         Reviewed by Adele Peterson.
1034
1035         Use a better technique to handle finding out if something responds to a selector
1036         in WebHTMLView's doCommandBySelector method.
1037
1038         * WebView/WebHTMLView.mm:
1039         (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
1040         this is already handled by coreCommandBySelector: so doesn't need to be checked
1041         twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
1042         Use WebResponderChainSink to find out if a command is handled rather than walking
1043         the responder chain explicitly.
1044         (-[WebResponderChainSink initWithResponderChain:]): Added.
1045         (-[WebResponderChainSink detach]): Added.
1046         (-[WebResponderChainSink receivedUnhandledCommand]): Added.
1047         (-[WebResponderChainSink noResponderFor:]): Added.
1048         (-[WebResponderChainSink doCommandBySelector:]): Added.
1049
1050 2009-03-19  Timothy Hatcher  <timothy@apple.com>
1051
1052         Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
1053         for Page, so the new RunLoopTimer in WebCore always gets a default mode.
1054         Fixes the layout test failures on the Tiger build bots.
1055
1056         Reviewed by Mark Rowe.
1057
1058         * WebView/WebView.mm:
1059         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1060         (-[WebView scheduleInRunLoop:forMode:]):
1061         (-[WebView unscheduleFromRunLoop:forMode:]):
1062
1063 2009-03-18  Anders Carlsson  <andersca@apple.com>
1064
1065         Reviewed by Oliver Hunt.
1066
1067         WebKit side of <rdar://problem/6688244>.
1068         
1069         Try reinitializing the vendor port if it's invalid.
1070         
1071         * Plugins/Hosted/NetscapePluginHostManager.mm:
1072         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1073
1074 2009-03-18  Anders Carlsson  <andersca@apple.com>
1075
1076         Reviewed by Darin Adler.
1077
1078         <rdar://problem/6504776> 
1079         CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
1080         
1081         If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
1082         causing the plug-in never to be stopped. Simplify the code by using a RAII object.
1083
1084         * Plugins/WebBaseNetscapePluginStream.mm:
1085         (PluginStopDeferrer::PluginStopDeferrer):
1086         (PluginStopDeferrer::~PluginStopDeferrer):
1087         (WebNetscapePluginStream::startStream):
1088         (WebNetscapePluginStream::wantsAllStreams):
1089         (WebNetscapePluginStream::destroyStream):
1090
1091 2009-03-17  Darin Adler  <darin@apple.com>
1092
1093         Reviewed by Adele Peterson.
1094
1095         <rdar://problem/6687005> Need support for new move-left/right selectors.
1096
1097         * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
1098         * WebView/WebView.mm: Ditto.
1099
1100 2009-03-17  Darin Adler  <darin@apple.com>
1101
1102         Reviewed by Adele Peterson.
1103
1104         Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
1105         https://bugs.webkit.org/show_bug.cgi?id=24477
1106         rdar://problem/6674184
1107
1108         * WebView/WebHTMLView.mm:
1109         (responderChainRespondsToSelector): Added.
1110         (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
1111         can find a responder that responds to this selector rather than always assuming
1112         the selector will not be handled.
1113
1114 2009-03-17  Mark Rowe  <mrowe@apple.com>
1115
1116         Fix the build.
1117
1118         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1119
1120 2009-03-17  David Kilzer  <ddkilzer@apple.com>
1121
1122         Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
1123
1124         Reviewed by Darin Adler.
1125
1126         WebKit r30323 added -_webcore_MIMEType to fix issues with
1127         incorrect MIME types in NS[HTTP]URLResponse objects.  However,
1128         uses of -[NSURLResponse MIMEType] still persist in WebKit that
1129         should be switched to use -_webcore_MIMEType.  Note that
1130         -[WebDataSource _responseMIMEType] calls back into WebCore to
1131         get the MIME type from the ResourceResponse object, which has
1132         already retrieved it via -_webcore_MIMEType.
1133
1134         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1135         (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
1136         -_webcore_MIMEType.
1137         * Plugins/WebBaseNetscapePluginStream.mm:
1138         (WebNetscapePluginStream::didReceiveResponse): Ditto.
1139         * Plugins/WebNetscapePluginView.mm:
1140         (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
1141         * Plugins/WebPluginController.mm:
1142         (-[WebPluginController pluginView:receivedResponse:]): Ditto.
1143         * WebView/WebHTMLRepresentation.mm:
1144         (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
1145         -[WebDataSource _responseMIMEType] instead.
1146         * WebView/WebPDFRepresentation.m:
1147         (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
1148         * WebView/WebPDFView.mm:
1149         (-[WebPDFView menuForEvent:]): Ditto.
1150
1151 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
1152
1153         Reviewed by Darin Adler
1154
1155         https://bugs.webkit.org/show_bug.cgi?id=24396
1156         
1157         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
1158
1159         * WebKitPrefix.h:
1160
1161 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
1162
1163         Reviewed by Mark Rowe.
1164
1165         Get BUILDING_ON_* defines from Platform.h.
1166         
1167         https://bugs.webkit.org/show_bug.cgi?id=24630
1168
1169         * WebKitPrefix.h:
1170
1171 2009-03-16  Darin Adler  <darin@apple.com>
1172
1173         Reviewed by Dan Bernstein.
1174
1175         <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
1176
1177         * WebCoreSupport/WebViewFactory.mm:
1178         (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
1179         post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
1180         (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
1181
1182 2009-03-16  Anders Carlsson  <andersca@apple.com>
1183
1184         Reviewed by Oliver Hunt.
1185
1186         Don't mig_deallocate random data in case an instance proxy method returns false.
1187         
1188         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1189         (WKPCEvaluate):
1190         (WKPCInvoke):
1191         (WKPCInvokeDefault):
1192         (WKPCGetProperty):
1193         (WKPCEnumerate):
1194
1195 2009-03-16  Anders Carlsson  <andersca@apple.com>
1196
1197         Reviewed by Oliver Hunt.
1198
1199         <rdar://problem/6633944> 
1200         REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
1201         
1202         Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
1203         
1204         * Plugins/WebPluginController.mm:
1205         (-[WebPluginController addPlugin:]):
1206
1207 2009-03-16  Anders Carlsson  <andersca@apple.com>
1208
1209         Reviewed by Sam Weinig.
1210
1211         Fix <rdar://problem/6622601>
1212         
1213         Make sure to update both the window frame and the plug-in frame.
1214         
1215         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1216         (-[WebHostedNetscapePluginView addWindowObservers]):
1217
1218 2009-03-15  Dan Bernstein  <mitz@apple.com>
1219
1220         Reviewed by Adele Peterson.
1221
1222         - fix <rdar://problem/6607773> WebKit should support the "Default"
1223           paragraph writing direction -- or at least validate the menu item
1224           appropriately
1225
1226         Made WebHTMLView validate user interface items with the selector
1227         -makeBaseWritingDirectionNatural: by returning NO and, if the item is
1228         a menu item, setting its state to "off".
1229
1230         Strictly speaking, since -makeBaseWritingDirectionNatural: is never
1231         valid for WebViews, WebHTMLView should not need to respond to it and
1232         validate it, however because other responders respond to all three
1233         -makeBaseWritingDirection*: messages and set the menu item state, having
1234         WebHTMLView do the same makes application developers' lives easier.
1235
1236         * WebView/WebHTMLView.mm:
1237         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
1238         (-[WebHTMLView makeBaseWritingDirectionNatural:]):
1239
1240 2009-03-13  Mark Rowe  <mrowe@apple.com>
1241
1242         Rubber-stamped by Dan Bernstein.
1243
1244         Take advantage of the ability of recent versions of Xcode to easily switch the active
1245         architecture.
1246
1247         * Configurations/DebugRelease.xcconfig:
1248
1249 2009-03-13  Anders Carlsson  <andersca@apple.com>
1250
1251         Reviewed by Kevin Decker and Geoffrey Garen.
1252
1253         <rdar://problem/6590384>
1254         REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
1255         
1256         When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call, 
1257         and thus calling -[WebView hostWindow] will crash since _private is nil.
1258         
1259         * WebView/WebView.mm:
1260         (-[WebView hostWindow]):
1261
1262 2009-03-13  Anders Carlsson  <andersca@apple.com>
1263
1264         And yet another attempt...
1265         
1266         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1267         (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
1268         (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
1269         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1270
1271 2009-03-13  Anders Carlsson  <andersca@apple.com>
1272
1273         Another attempt at fixing the build.
1274         
1275         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1276         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
1277
1278 2009-03-13  Anders Carlsson  <andersca@apple.com>
1279
1280         Try to fix the SL build.
1281
1282         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1283         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1284         (WebNetscapePluginEventHandlerCocoa::keyDown):
1285
1286 2009-03-13  Greg Bolsinga  <bolsinga@apple.com>
1287
1288         Reviewed by Simon Fraser.
1289
1290         Update Geolocation perimission dialogs to be asynchronous.
1291         https://bugs.webkit.org/show_bug.cgi?id=24505
1292
1293         WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
1294         coding style set by WebSecurityOrigin.
1295         
1296         WebChromeClient now calls the private UI delegate method 
1297         -webView:frame:requestGeolocationPermission:securityOrigin:
1298
1299         * WebCoreSupport/WebChromeClient.h:
1300         * WebCoreSupport/WebChromeClient.mm:
1301         (WebChromeClient::requestGeolocationPermissionForFrame):
1302         * WebCoreSupport/WebGeolocation.mm: Added.
1303         (WebCore::if):
1304         (-[WebGeolocation shouldClearCache]):
1305         (-[WebGeolocation setIsAllowed:]):
1306         (-[WebGeolocation dealloc]):
1307         * WebCoreSupport/WebGeolocationInternal.h: Added.
1308         * WebCoreSupport/WebGeolocationPrivate.h: Added.
1309         * WebView/WebUIDelegatePrivate.h:
1310
1311 2009-03-13  Anders Carlsson  <andersca@apple.com>
1312
1313         Reviewed by Dan Bernstein.
1314
1315         <rdar://problem/6610666> Revise the Cocoa event model text API
1316
1317         Replace the text input API with a simpler API that uses a separate text input window.
1318         
1319         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1320         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1321         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
1322         Initialize m_keyEventHandler to 0.
1323         
1324         (WebNetscapePluginEventHandlerCocoa::keyDown):
1325         If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
1326         
1327         (WebNetscapePluginEventHandlerCocoa::focusChanged):
1328         Install/remove the key event handler as needed.
1329         
1330         (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
1331         Get the text and send a TextInput event.
1332         
1333         * Plugins/WebNetscapePluginView.h:
1334         * Plugins/WebNetscapePluginView.mm:
1335         Remove the old text input API.
1336         
1337         (-[WebNetscapePluginView inputContext]):
1338         Always return nil here.
1339         
1340         * Plugins/npapi.mm:
1341         * Plugins/nptextinput.h: Removed.
1342
1343 2009-03-12  Anders Carlsson  <andersca@apple.com>
1344
1345         Reviewed by Mike Thole and Mark Rowe.
1346
1347         Fix <rdar://problem/6624105>.
1348         
1349         Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
1350         
1351         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1352         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1353
1354 2009-03-12  Anders Carlsson  <andersca@apple.com>
1355
1356         Reviewed by Geoffrey Garen.
1357
1358         WebKit side of <rdar://problem/6607801>
1359         
1360         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1361         (WebKit::NetscapePluginInstanceProxy::destroy):
1362         Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
1363         
1364         * Plugins/Hosted/WebKitPluginHost.defs:
1365         Add requestID parameter.
1366
1367 2009-03-12  Kevin Decker  <kdecker@apple.com>
1368
1369         Reviewed by Anders Carlsson.
1370
1371         * Plugins/WebNetscapePluginPackage.mm:
1372         (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
1373
1374 2009-03-12  Kevin Decker  <kdecker@apple.com>
1375
1376         Reviewed by Anders Carlsson.
1377
1378         Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
1379         
1380         This fix addresses crashes in both Silverlight and ChemDraw.  This type of crash would occur because AppKit still
1381         had a reference to open windows that the plugin created (which no longer exist). 
1382         
1383         * Plugins/WebNetscapePluginPackage.mm:
1384         (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown. 
1385         
1386 2009-03-11  David Kilzer  <ddkilzer@apple.com>
1387
1388         Remove duplicate header include
1389
1390         Rubber-stamped by Mark Rowe.
1391
1392         * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
1393         Also realphabetized lowercase #include statements.
1394
1395 2009-03-11  David Kilzer  <ddkilzer@apple.com>
1396
1397         Clarify comments regarding order of FEATURE_DEFINES
1398
1399         Rubber-stamped by Mark Rowe.
1400
1401         * Configurations/WebKit.xcconfig: Added warning about the
1402         consequences when FEATURE_DEFINES are not kept in sync.
1403
1404 2009-03-11  Anders Carlsson  <andersca@apple.com>
1405
1406         Reviewed by Sam Weinig.
1407
1408         WebKit side of <rdar://problem/6656147>.
1409         
1410         * Plugins/Hosted/NetscapePluginHostManager.mm:
1411         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1412         Pass the requestID to _WKPHInstantiatePlugin.
1413         
1414         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1415         Pass the requestID to setCurrentReply.
1416         
1417         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1418         (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
1419         Store the reply in a map with the requestID as the key.
1420         
1421         (WebKit::NetscapePluginInstanceProxy::waitForReply):
1422         Wait for a reply that matches the given requestID.
1423         
1424         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1425         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1426         Initialize member variables.
1427         
1428         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
1429         Delete all requests.
1430         
1431         (WebKit::NetscapePluginInstanceProxy::print):
1432         Pass the requestID to _WKPHPluginInstancePrint.
1433         
1434         (WebKit::NetscapePluginInstanceProxy::loadRequest):
1435         Rename m_currentRequestID to m_currentURLRequestID.
1436         
1437         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1438         Process requests until we find a reply with the right requestID.
1439         
1440         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
1441         Pass a requestID to the _WKPH function.
1442         
1443         (WebKit::NetscapePluginInstanceProxy::nextRequestID):
1444         Ditto.
1445         
1446         * Plugins/Hosted/ProxyInstance.mm:
1447         Pass a requestID to the _WKPH functions.
1448         
1449         * Plugins/Hosted/WebKitPluginClient.defs:
1450         * Plugins/Hosted/WebKitPluginHost.defs:
1451         Add requestID parameters.
1452
1453 2009-03-11  Anders Carlsson  <andersca@apple.com>
1454
1455         Reviewed by Darin Adler.
1456
1457         Fix <rdar://problem/6620064>.
1458         
1459         * Plugins/WebPluginContainerPrivate.h:
1460
1461 2009-03-10  Xan Lopez  <xlopez@igalia.com>
1462
1463         Build fix, no review.
1464
1465         * WebView/WebFrame.mm:
1466         (-[WebFrame _smartDeleteRangeForProposedRange:]):
1467
1468 2009-03-09  Anders Carlsson  <andersca@apple.com>
1469
1470         Reviewed by Kevin Decker.
1471
1472         WebKit side of <rdar://problem/6530007>
1473         
1474         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1475         (WKPCEnumerate):
1476         Call NetscapePluginInstanceProxy::enumerate.
1477         
1478         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1479         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1480         (WebKit::NetscapePluginInstanceProxy::enumerate):
1481         Enumerate the JS object and serialize its values.
1482         
1483         * Plugins/Hosted/ProxyInstance.h:
1484         * Plugins/Hosted/ProxyInstance.mm:
1485         (WebKit::ProxyInstance::getPropertyNames):
1486         Ask the plug-in host to get the property names and deserialize them.
1487         
1488         * Plugins/Hosted/WebKitPluginClient.defs:
1489         * Plugins/Hosted/WebKitPluginHost.defs:
1490
1491 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1492
1493         Reviewed by Oliver Hunt and Cameron Zwarich
1494
1495         https://bugs.webkit.org/show_bug.cgi?id=24440
1496         
1497         The sublayer added to WebHTMLView to host accelerated compositing layers needs to
1498         be a subclass of NSView which allows context menu clicks through.
1499
1500         * WebView/WebHTMLView.mm:
1501         (-[WebLayerHostingView rightMouseDown:]):
1502         (-[WebHTMLView attachRootLayer:]):
1503
1504 2009-03-08  Mark Rowe  <mrowe@apple.com>
1505
1506         Reviewed by Oliver Hunt.
1507
1508         Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
1509         Frame.h no longer needs to include it.  This cuts the size of the symbols
1510         for a debug build by around 3%.
1511
1512         * Plugins/WebNetscapePluginView.mm:
1513         * WebView/WebFrame.mm:
1514         (-[WebFrame _scrollDOMRangeToVisible:]):
1515         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
1516         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
1517         * WebView/WebHTMLView.mm:
1518         (-[WebHTMLView jumpToSelection:]):
1519         (-[WebHTMLView centerSelectionInVisibleArea:]):
1520
1521 2009-03-07  Dan Bernstein  <mitz@apple.com>
1522
1523         Reviewed by Alexey Proskuryakov.
1524
1525         - fix a bug where debug builds were clearing the HTML5 application cache
1526           on application termination
1527
1528         * WebView/WebView.mm:
1529         (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
1530         -[WebCache empty].
1531
1532 2009-03-06  Douglas R. Davidson  <ddavidso@apple.com>
1533
1534         Reviewed by Justin Garcia.
1535
1536         https://bugs.webkit.org/show_bug.cgi?id=24108
1537
1538         Update spelling and grammar checking to use the new combined text 
1539         checking (with automatic language identification) on Snow Leopard. 
1540
1541         * WebCoreSupport/WebEditorClient.h:
1542         * WebCoreSupport/WebEditorClient.mm:
1543         (WebEditorClient::checkSpellingAndGrammarOfParagraph):
1544
1545 2009-03-05  Adele Peterson  <adele@apple.com>
1546
1547         Reviewed by Darin Adler.
1548
1549         Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
1550         <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
1551         <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
1552        
1553         * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
1554         If WebKit does not support the command, we need to pass the selector to super.  In this case,
1555         we'll consider the event not to be handled.  This is not perfect because in theory, [super doCommandBySelector:] 
1556         can do some action that would cause WebKit to need to consider the event handled.  But in practice, I've found no
1557         example of that happening and causing broken behavior.
1558
1559 2009-03-04  Mark Rowe  <mrowe@apple.com>
1560
1561         Reviewed by Dan Bernstein.
1562
1563         <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
1564
1565         * WebView/WebHTMLView.mm:
1566         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1567
1568 2009-03-04  Adam Barth  <abath@webkit.org>
1569
1570         Reviewed by Alexey Proskuryakov.
1571
1572         https://bugs.webkit.org/show_bug.cgi?id=24356
1573
1574         Fix WebKit style for allowUniversalAccessFromFileURLs.
1575
1576         * WebView/WebPreferenceKeysPrivate.h:
1577         * WebView/WebPreferences.mm:
1578         (+[WebPreferences initialize]):
1579         (-[WebPreferences allowUniversalAccessFromFileURLs]):
1580         (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
1581         * WebView/WebPreferencesPrivate.h:
1582         * WebView/WebView.mm:
1583         (-[WebView _preferencesChangedNotification:]):
1584
1585 2009-03-03  David Kilzer  <ddkilzer@apple.com>
1586
1587         <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
1588
1589         Reviewed by Mark Rowe.
1590
1591         The fix is to add INSTALLHDRS_COPY_PHASE = YES and
1592         INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
1593         make sure various build phase scripts work with the installhdrs
1594         build phase.
1595
1596         * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
1597         based on PLATFORM_NAME to work around the missing definition on
1598         Tiger.
1599         * Configurations/WebKit.xcconfig: Added
1600         WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
1601         UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
1602         Xcode project file.  Added INSTALLHDRS_COPY_PHASE = YES and
1603         INSTALLHDRS_SCRIPT_PHASE = YES.
1604
1605 2009-03-03  David Kilzer  <ddkilzer@apple.com>
1606
1607         Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
1608
1609         Reviewed by Adam Roben.
1610
1611         Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
1612         since NPAPI headers had migrated from JavaScriptCore to WebCore
1613         before that.
1614
1615         * Configurations/WebKit.xcconfig: Removed definition of
1616         JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
1617
1618 2009-03-03  Anders Carlsson  <andersca@apple.com>
1619
1620         Reviewed by Darin Adler.
1621
1622         Fix <rdar://problem/6633834>.
1623         
1624         * Plugins/Hosted/NetscapePluginHostManager.mm:
1625         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1626         Create a new plug-in instance if the plug-in host has crashed.
1627         
1628         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1629         (WebKit::NetscapePluginInstanceProxy::invalidate):
1630         Add a null check for the plug-in host proxy.
1631
1632 2009-03-02  Sam Weinig  <sam@webkit.org>
1633
1634         Reviewed by Mark Rowe.
1635
1636         Enable Geolocation (except on Tiger and Leopard).
1637
1638         * Configurations/WebKit.xcconfig:
1639
1640 2009-03-02  Anders Carlsson  <andersca@apple.com>
1641
1642         Reviewed by Dan Bernstein.
1643
1644         WebKit part of <rdar://problem/6638658>.
1645         
1646         * Plugins/Hosted/NetscapePluginHostManager.h:
1647         * Plugins/Hosted/NetscapePluginHostManager.mm:
1648         (WebKit::NetscapePluginHostManager::createPropertyListFile):
1649         Spawn the plug-in host and wait for it to create the property list.
1650         
1651         * Plugins/WebBasePluginPackage.mm:
1652         (-[WebBasePluginPackage createPropertyListFile]):
1653         Factor code out into a new method.
1654         
1655         (-[WebBasePluginPackage pListForPath:createFile:]):
1656         Call the newly added createPropertyListFile method.
1657         
1658         * Plugins/WebNetscapePluginPackage.mm:
1659         (-[WebNetscapePluginPackage createPropertyListFile]):
1660         Tell the plug-in host manager to create a property list file for us.
1661
1662 2009-03-02  Sam Weinig  <sam@webkit.org>
1663
1664         Reviewed by Geoffrey Garen.
1665
1666         Fix for <rdar://problem/6507404> Add Geolocation support.
1667
1668         This is not yet turned on for any Mac platform.
1669
1670         Add SPI to ask the embedding application whether to allow
1671         Geolocation for an origin.
1672
1673         * WebCoreSupport/WebChromeClient.h:
1674         * WebCoreSupport/WebChromeClient.mm:
1675         (WebChromeClient::shouldAllowGeolocationForFrame):
1676         * WebView/WebUIDelegatePrivate.h:
1677
1678 2009-03-02  Anders Carlsson  <andersca@apple.com>
1679
1680         Fix PowerPC build.
1681
1682         * Plugins/WebNetscapePluginPackage.mm:
1683         (-[WebNetscapePluginPackage _tryLoad]):
1684
1685 2009-03-02  Anders Carlsson  <andersca@apple.com>
1686
1687         Reviewed by John Sullivan, Ada Chan.
1688
1689         Factor loading code out into its own method and get rid of a bunch of gotos.
1690         
1691         * Plugins/WebNetscapePluginPackage.mm:
1692         (-[WebNetscapePluginPackage _tryLoad]):
1693         (-[WebNetscapePluginPackage load]):
1694
1695 2009-03-02  Anders Carlsson  <andersca@apple.com>
1696
1697         Build fix.
1698
1699         * Plugins/WebNetscapeDeprecatedFunctions.h:
1700
1701 2009-03-02  Anders Carlsson  <andersca@apple.com>
1702
1703         Reviewed by John Sullivan.
1704
1705         Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
1706
1707         * Plugins/WebNetscapePluginPackage.m: Removed.
1708         * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
1709
1710 2009-03-01  Anders Carlsson  <andersca@apple.com>
1711
1712         Reviewed by Sam Weinig.
1713
1714         WebKit side of <rdar://problem/6449689>
1715
1716         Pass the visible name to the plug-in host.
1717         
1718         * Plugins/Hosted/NetscapePluginHostManager.mm:
1719         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1720
1721 2009-02-27  Alice Liu  <alice.liu@apple.com>
1722
1723         Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
1724         extension to images that already have .jpg extension
1725
1726         Reviewed by Oliver Hunt.
1727
1728         * WebView/WebHTMLView.mm:
1729         (-[NSString matchesExtensionEquivalent:]):
1730         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1731         Relax the check for the proper extension to allow for known
1732         equivalents, special-cased in matchesExtensionEquivalent function.
1733
1734 2009-02-27  Anders Carlsson  <andersca@apple.com>
1735
1736         Reviewed by Geoffrey Garen.
1737
1738         <rdar://problem/6631436>
1739         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
1740         
1741         Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
1742         
1743         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1744         (WebKit::NetscapePluginInstanceProxy::evaluate):
1745
1746 2009-02-27  Anders Carlsson  <andersca@apple.com>
1747
1748         Reviewed by Geoffrey Garen.
1749
1750         WebKit side of <rdar://problem/6626814>.
1751         
1752         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1753         (WKPCInvokeDefault):
1754         Make InvokeDefault async.
1755         
1756         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1757         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
1758         Handle passing NPObjects back to the plug-in host.
1759         
1760         * Plugins/Hosted/ProxyInstance.h:
1761         (WebKit::ProxyInstance::objectID):
1762         Add objectID getter.
1763         
1764         * Plugins/Hosted/WebKitPluginClient.defs:
1765         Make InvokeDefault a simpleroutine.
1766
1767 2009-02-27  Timothy Hatcher  <timothy@apple.com>
1768
1769         Fixes an exception by null checking the WebResource before adding it to
1770         the subresources array.
1771
1772         <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
1773
1774         Reviewed by Geoff Garen and Anders Carlsson.
1775
1776         * WebView/WebDataSource.mm:
1777         (-[WebDataSource subresources]): Null check the WebResource before adding it.
1778
1779 2009-02-27  Timothy Hatcher  <timothy@apple.com>
1780
1781         Adds a workaround for Automator creating a WebView from a secondary thread.
1782
1783         <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
1784         secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
1785
1786         Reviewed by Geoff Garen.
1787
1788         * WebView/WebView.mm:
1789         (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
1790
1791 2009-02-27  Adam Barth  <abarth@webkit.org>
1792
1793         Reviewed by Eric Seidel.
1794
1795         Add a preference to reduce the power of file:// URLs.
1796
1797         * WebView/WebPreferenceKeysPrivate.h:
1798         * WebView/WebPreferences.mm:
1799         (+[WebPreferences initialize]):
1800         (-[WebPreferences allowUniversalAccessFromFileUrls]):
1801         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
1802         * WebView/WebPreferencesPrivate.h:
1803         * WebView/WebView.mm:
1804         (-[WebView _preferencesChangedNotification:]):
1805
1806 2009-02-27  Simon Fraser  <simon.fraser@apple.com>
1807
1808         Reviewed by Anders Carlsson
1809
1810         https://bugs.webkit.org/show_bug.cgi?id=24242
1811         
1812         setCursor(), and resetCursorRects() on Tiger, were using global, not local
1813         coordinates for elementAtPoint:
1814         
1815         * WebView/WebHTMLView.mm:
1816         (resetCursorRects):
1817         (setCursor):
1818
1819 2009-02-27  Adam Barth  <abarth@webkit.org>
1820
1821         Reviewed by Eric Seidel.
1822
1823         Add a preference to reduce the power of file:// URLs.
1824
1825         * WebView/WebPreferenceKeysPrivate.h:
1826         * WebView/WebPreferences.mm:
1827         (+[WebPreferences initialize]):
1828         (-[WebPreferences allowUniversalAccessFromFileUrls]):
1829         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
1830         * WebView/WebPreferencesPrivate.h:
1831         * WebView/WebView.mm:
1832         (-[WebView _preferencesChangedNotification:]):
1833
1834 2009-02-26  Adele Peterson  <adele@apple.com>
1835
1836         Reviewed by Geoff Garen.
1837
1838         Fix for <rdar://problem/6618166>
1839         https://bugs.webkit.org/show_bug.cgi?id=24216
1840         (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
1841
1842         During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
1843         we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
1844         This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
1845
1846         In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were 
1847         fixed in r36919 and r38570 are still fixed.
1848
1849         * WebView/WebHTMLView.mm:
1850         (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
1851         (-[WebHTMLView _isResigningFirstResponder]): Added.
1852         * WebView/WebHTMLViewInternal.h:
1853         * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
1854         if the document view is currently resigning first responder.
1855
1856 2009-02-25  Anders Carlsson  <andersca@apple.com>
1857
1858         Reviewed by Kevin Decker.
1859
1860         Fix <rdar://problem/6623697>.
1861         
1862         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1863         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1864         (WebKit::NetscapePluginInstanceProxy::print):
1865         Ask the plug-in host to print, create a CGImage of the returned bytes and draw
1866         the image into the passed in context.
1867         
1868         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1869         (-[WebHostedNetscapePluginView drawRect:]):
1870         When printing, call NetscapePluginInstanceProxy::print.
1871         
1872         * Plugins/Hosted/WebKitPluginHost.defs:
1873
1874 2009-02-19  Alexey Proskuryakov  <ap@webkit.org>
1875
1876         Reviewed by Darin Adler.
1877
1878         https://bugs.webkit.org/show_bug.cgi?id=24024
1879         REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
1880         archiving a submission to about:blank
1881
1882         I don't know how to make an automated test for this bug.
1883
1884         * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
1885         Account for the fact that HTTP method may be non-empty for non-HTTP requests.
1886
1887 2009-02-25  Chris Fleizach  <cfleizach@apple.com>
1888
1889         Reviewed by Beth Dakin.
1890
1891         Naming change from
1892         Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
1893         https://bugs.webkit.org/show_bug.cgi?id=24143
1894
1895         * WebView/WebFrame.mm:
1896         (-[WebFrame _accessibilityTree]):
1897
1898 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
1899
1900         Build fix with ACCELERATED_COMPOSITING turned on.
1901         
1902         I missed a spot in my last commit in renaming to
1903         _stoppedAcceleratedCompositingForFrame:
1904         
1905         * WebView/WebHTMLView.mm:
1906         (-[WebHTMLView close]):
1907
1908 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
1909
1910         Reviewed by Dan Bernstein
1911
1912         https://bugs.webkit.org/show_bug.cgi?id=23854
1913
1914         Make an observable property, _isUsingAcceleratedCompositing, on
1915         WebView that DumpRenderTree can use to specialize behavior.
1916         
1917         This is implemented via a count of Frames that are using
1918         accelerated compositing.
1919
1920         * WebView/WebHTMLView.mm:
1921         (-[WebHTMLViewPrivate clear]):
1922         (-[WebHTMLView close]):
1923         (-[WebHTMLView attachRootLayer:]):
1924         (-[WebHTMLView detachRootLayer]):
1925         * WebView/WebView.mm:
1926         (+[WebView automaticallyNotifiesObserversForKey:]):
1927         (-[WebView _startedAcceleratedCompositingForFrame:]):
1928         (-[WebView _stoppedAcceleratedCompositingForFrame:]):
1929         (-[WebView _isUsingAcceleratedCompositing]):
1930         * WebView/WebViewInternal.h:
1931         * WebView/WebViewPrivate.h:
1932
1933 2009-02-24  Sam Weinig  <sam@webkit.org>
1934
1935         Reviewed by Geoffrey Garen.
1936
1937         Related to <rdar://problem/6590295>
1938         Allow disabling javascript: urls.
1939
1940         * WebView/WebView.mm:
1941         (-[WebView _setJavaScriptURLsAreAllowed:]):
1942         * WebView/WebViewPrivate.h:
1943
1944 2009-02-24  Mark Rowe  <mrowe@apple.com>
1945
1946         Reviewed by Oliver Hunt.
1947
1948         <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
1949
1950         * Carbon/CarbonUtils.h:
1951         * Carbon/HIWebView.h:
1952         * Plugins/WebPlugin.h:
1953         * Plugins/WebPluginViewFactory.h:
1954         * WebView/WebUIDelegate.h:
1955
1956 2009-02-24  Peter Ammon  <pammon@apple.com>
1957
1958         Reviewed by Mark Rowe.
1959
1960         Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
1961
1962         * WebView/WebHTMLView.mm:
1963         (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
1964         both the send and return type.  We should also handle a nil send or return type by ignoring
1965         the argument and returning whether we can handle the other type passed in.
1966
1967 2009-02-23  Anders Carlsson  <andersca@apple.com>
1968
1969         Reviewed by Geoffrey Garen and Darin Adler.
1970
1971         WebKit side of <rdar://problem/6613151>.
1972         
1973         Make sure to vm_deallocate all memory we get from MIG callbacks.
1974         
1975         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1976         (DataDeallocator::DataDeallocator):
1977         (DataDeallocator::~DataDeallocator):
1978         Add a simple deallocator class.
1979         
1980         (WKPCStatusText):
1981         (WKPCLoadURL):
1982         (WKPCBooleanAndDataReply):
1983         (WKPCEvaluate):
1984         (WKPCGetStringIdentifier):
1985         (WKPCInvoke):
1986         (WKPCInvokeDefault):
1987         (WKPCConstruct):
1988         (WKPCSetProperty):
1989         Use the new deallocator class.
1990
1991 2009-02-23  Anders Carlsson  <andersca@apple.com>
1992
1993         Reviewed by Darin Adler.
1994
1995         Fix <rdar://problem/6450656>.
1996         
1997         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1998         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1999         (WebKit::NetscapePluginInstanceProxy::insertText):
2000         Add insert text which just calls the new WKPH function.
2001         
2002         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2003         (-[WebHostedNetscapePluginView inputContext]):
2004         Get the input context from the shared input panel.
2005         
2006         (-[WebHostedNetscapePluginView keyDown:]):
2007         Let the shared input panel have a go at the event first.
2008         
2009         * Plugins/Hosted/WebKitPluginHost.defs:
2010         Add new InsertText function.
2011
2012 2009-02-23  Mark Rowe  <mrowe@apple.com>
2013
2014         Fix the build after r41126.
2015
2016         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2017         (WebKit::NetscapePluginInstanceProxy::invoke):
2018         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2019         (WebKit::NetscapePluginInstanceProxy::construct):
2020
2021 2009-02-22  Dan Bernstein  <mitz@apple.com>
2022
2023         Reviewed by Darin Adler.
2024
2025         - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
2026
2027         * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
2028         in r30741, and assign the height value, rather than the width, to the
2029         "height" parameter.
2030
2031 2009-02-21  Anders Carlsson  <andersca@apple.com>
2032
2033         Fix build.
2034         
2035         * Plugins/Hosted/WebTextInputWindowController.m:
2036
2037 2009-02-20  Anders Carlsson  <andersca@apple.com>
2038
2039         Reviewed by Dan Bernstein.
2040
2041         Add a shared floating text input window implementation, to be used by the hosted plug-in view.
2042         
2043         * Plugins/Hosted/WebTextInputWindowController.h: Added.
2044         * Plugins/Hosted/WebTextInputWindowController.m: Added.
2045
2046 2009-02-20  Kevin Decker  <kdecker@apple.com>
2047
2048         Reviewed by andersca.
2049     
2050         <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
2051          
2052          Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
2053          we are trying to set. Depending on what other I/O is going on, it can take some time. 
2054
2055         * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
2056         (setMetaData): Added. Calls WKSetMetadataURL().
2057         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread 
2058  
2059 2009-02-19  Dan Bernstein  <mitz@apple.com>
2060
2061         Reviewed by Sam Weinig.
2062
2063         - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
2064           Do not send loader callbacks during CSS styling
2065
2066         * WebView/WebView.mm:
2067         (-[WebView _preferencesChangedNotification:]): Reverted the
2068         iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
2069
2070 2009-02-18  Dan Bernstein  <mitz@apple.com>
2071
2072         Reviewed by Brady Eidson.
2073
2074         - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
2075
2076         * WebView/WebView.mm:
2077         (-[WebView _preferencesChangedNotification:]): Activate the WebCore
2078         workaround for this crash in iChat.
2079
2080 2009-02-18  Anders Carlsson  <andersca@apple.com>
2081
2082         Reviewed by Sam Weinig.
2083
2084         Fix for <rdar://problem/6542390>
2085         
2086         There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
2087         would cause a load to begin.
2088         
2089         * Plugins/WebNetscapePluginView.mm:
2090         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
2091
2092 2009-02-18  Adam Roben  <aroben@apple.com>
2093
2094         Add SPI to get WebKit's custom pointing-hand cursor
2095
2096         Reviewed by John Sullivan.
2097
2098         * WebView/WebView.mm:
2099         (+[WebView _pointingHandCursor]): Added. Returns the custom
2100         pointing-hand cursor that WebKit uses.
2101         * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
2102
2103 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
2104
2105         Reviewed by Antti Koivisto.
2106
2107         https://bugs.webkit.org/show_bug.cgi?id=23917
2108         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
2109         element.
2110
2111         * Plugins/WebPluginContainerPrivate.h:
2112         * Plugins/WebPluginController.mm:
2113         (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
2114         (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
2115         (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
2116
2117         * WebCoreSupport/WebFrameLoaderClient.mm:
2118         (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
2119         file extension, only want a match for the new MIME type proxy plug-ins should have.
2120
2121 2009-02-13  Anders Carlsson  <andersca@apple.com>
2122
2123         Reviewed by Kevin Decker.
2124
2125         <rdar://problem/6584834> ESPN radio live stream link hangs Safari 
2126
2127         When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
2128         defer destruction until we're done executing the script.
2129         
2130         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2131         (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
2132         (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
2133         Add a simple RAII object for deferring destruction of the plug-in instance.
2134         
2135         (WKPCEvaluate):
2136         (WKPCInvoke):
2137         (WKPCInvokeDefault):
2138         (WKPCConstruct):
2139         (WKPCGetProperty):
2140         (WKPCSetProperty):
2141         (WKPCRemoveProperty):
2142         (WKPCHasProperty):
2143         (WKPCHasMethod):
2144         Use the PluginDestroyDeferrer.
2145         
2146         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2147         (WebKit::NetscapePluginInstanceProxy::pluginID):
2148         Assert that the plug-in ID is not 0 here.
2149         
2150         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2151         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2152         Initialize the call depth.
2153         
2154         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
2155         Set the plug-in ID to 0 to aid debugging.
2156         
2157         (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
2158         Increment the call depth.
2159         
2160         (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
2161         Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
2162         
2163         (WebKit::NetscapePluginInstanceProxy::shouldStop):
2164         If we're called this with a non-zero call depth, set shouldStopSoon to true.
2165         
2166         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2167         (-[WebHostedNetscapePluginView shouldStop]):
2168         Call the proxy.
2169
2170 2009-02-12  Brady Eidson  <beidson@apple.com>
2171
2172         Reviewed by Kevin Decker
2173
2174         <rdar://problem/6582180> - Wrong HTTP method applied to history item.
2175
2176         * WebCoreSupport/WebFrameLoaderClient.mm:
2177         (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
2178           redirected request.
2179
2180 2009-02-12  Anders Carlsson  <andersca@apple.com>
2181
2182         Reviewed by Kevin Decker.
2183
2184         <rdar://problem/6579412> 
2185         REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
2186         
2187         * Plugins/WebNetscapePluginView.h:
2188         * Plugins/WebNetscapePluginView.mm:
2189         (-[WebNetscapePluginView userAgent]):
2190         Apply workaround for Silverlight workaround.
2191         
2192         (-[WebNetscapePluginView _createPlugin]):
2193         Check if the plug-in that we're creating is the silverlight plug-in.
2194
2195 2009-02-12  Brady Eidson  <beidson@apple.com>
2196
2197         Reviewed by Darin Adler
2198
2199         Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
2200
2201         * History/WebBackForwardList.mm:
2202         (-[WebBackForwardList dealloc]): Null check before deref()'ing.
2203         (-[WebBackForwardList finalize]): Ditto.
2204
2205         * Misc/WebIconFetcher.mm:
2206         (-[WebIconFetcher dealloc]): Null check before deref()'ing.
2207         (-[WebIconFetcher finalize]): Ditto.
2208
2209         * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
2210         (-[WebEditCommand initWithEditCommand:]):
2211         (-[WebEditCommand dealloc]):
2212         (-[WebEditCommand finalize]):
2213         (-[WebEditCommand command]):
2214
2215         * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
2216         (-[WebArchivePrivate init]):
2217         (-[WebArchivePrivate initWithCoreArchive:]):
2218         (-[WebArchivePrivate coreArchive]):
2219         (-[WebArchivePrivate setCoreArchive:]):
2220         (-[WebArchivePrivate dealloc]):
2221         (-[WebArchivePrivate finalize]):
2222
2223         * WebView/WebDataSource.mm: 
2224         (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
2225         (-[WebDataSourcePrivate finalize]): Ditto.
2226
2227 2009-02-12  Brady Eidson  <beidson@apple.com>
2228
2229         Reviewed by Kevin Decker
2230
2231         <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
2232
2233         NSHTMLReader tries to create a WebArchive from a random chunk of data.  Previously, WebArchive creation would
2234         fail and return nil and NSHTMLReader would try something else.  When we changed the behavior to return an invalid
2235         WebArchive object, things started getting weird.
2236
2237         * WebView/WebArchive.mm:
2238         (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
2239         (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
2240         (-[WebArchivePrivate finalize]): Ditto
2241         (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
2242
2243 2009-02-11  Mark Rowe  <mrowe@apple.com>
2244
2245         Fix the build.
2246
2247         * History/WebHistory.mm:
2248         (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
2249
2250 2009-02-11  Brady Eidson  <beidson@apple.com>
2251
2252         Reviewed by Mark Rowe
2253
2254         <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
2255
2256         Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
2257         and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
2258         which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
2259
2260         * History/WebHistory.mm:
2261         (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
2262         (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
2263           if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
2264           recent entry for a given URL will be used.
2265         (-[WebHistoryPrivate addItems:]):
2266         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): 
2267
2268 2009-02-11  Dimitri Dupuis-latour  <dupuislatour@apple.com>
2269
2270         Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
2271         This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
2272
2273         Reviewed by Timothy Hatcher.
2274
2275         * WebCoreSupport/WebInspectorClient.h:
2276         * WebCoreSupport/WebInspectorClient.mm:
2277         (WebInspectorClient::hiddenPanels):
2278
2279 2009-02-11  Alexey Proskuryakov  <ap@webkit.org>
2280
2281         Reviewed by Darin Adler.
2282
2283         <rdar://problem/6562920> Pasted text should be normalized to NFC
2284
2285         * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
2286         -[NSString precomposedStringWithCanonicalMapping].
2287
2288         * WebCoreSupport/WebPasteboardHelper.mm:
2289         (WebPasteboardHelper::plainTextFromPasteboard): Ditto. 
2290
2291         * WebView/WebHTMLView.mm:
2292         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
2293         Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
2294         precomposed already, and the conversion is performed outside WebKit for those anyway.
2295
2296 2009-02-10  John Sullivan  <sullivan@apple.com>
2297
2298         Reviewed by Dan Bernstein
2299         
2300         <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
2301         Negative visit counts stored in History.plist aren't corrected.
2302         
2303         It's not clear how a huge negative visit count ended up in History.plist, but we can't
2304         trust data read from disk so we can at least reset this to something sane. WebCore has
2305         no guard against a visit count overflowing an int, but that seems very unlikely to have
2306         caused this.
2307
2308         * History/WebHistoryItem.mm:
2309         (-[WebHistoryItem initFromDictionaryRepresentation:]):
2310         If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
2311         weekly visit count is in the dictionary, replace it with 0. 
2312
2313 2009-02-10  John Sullivan  <sullivan@apple.com>
2314
2315         Reviewed by Dan Bernstein
2316         
2317         <https://bugs.webkit.org/show_bug.cgi?id=23891>
2318         [WebHistoryItem _setVisitCount:] is unused and should be removed
2319
2320         * History/WebHistoryItem.mm:
2321         (-[WebHistoryItem _setVisitCount:]):
2322         removed this unused method, which is a synonym for setVisitCount: that was introduced
2323         recently and abandoned even more recently
2324
2325         * History/WebHistoryItemInternal.h:
2326         removed declaration of _setVisitCount:
2327
2328 2009-02-10  Anders Carlsson  <andersca@apple.com>
2329
2330         Reviewed by Mark Rowe.
2331
2332         <rdar://problem/6573916> 
2333         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
2334         
2335         * Plugins/Hosted/NetscapePluginHostManager.mm:
2336         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2337         If we failed to instantiate the plug-in, invalidate the instance proxy.
2338         
2339         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2340         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2341         (WebKit::NetscapePluginInstanceProxy::invalidate):
2342         Remove the instance from the plug-in host's set.
2343         
2344         (WebKit::NetscapePluginInstanceProxy::destroy):
2345         Call invalidate().
2346
2347 2009-02-09  Mark Rowe  <mrowe@apple.com>
2348
2349         Reviewed by Dan Bernstein.
2350
2351         Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
2352         Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
2353
2354         * WebView/WebHTMLView.mm:
2355         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
2356         yet been initialized if this WebHTMLView was loaded from a nib.
2357         (-[WebHTMLView _removeSuperviewObservers]): Ditto.
2358
2359 2009-02-09  Eric Seidel  <eric@webkit.org>
2360
2361         Reviewed by Dave Hyatt.
2362
2363         Rename Selection to VisibleSelection to allow us to separate
2364         the selections the user works with from the ones used by
2365         the JS editing APIs.
2366         https://bugs.webkit.org/show_bug.cgi?id=23852
2367
2368         * WebView/WebFrame.mm:
2369         (-[WebFrame _selectNSRange:]):
2370         * WebView/WebView.mm:
2371         (-[WebView textIteratorForRect:]):
2372
2373 2009-02-06  Anders Carlsson  <andersca@apple.com>
2374
2375         Reviewed by Kevin Decker.
2376         
2377         Fix crash when plug-in host dies.
2378         
2379         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2380         (WebKit::HostedNetscapePluginStream::didFail):
2381
2382 2009-02-05  Eric Seidel  <eric@webkit.org>
2383
2384         Reviewed by Justin Garcia.
2385
2386         DOMSelection.getRangeAt() returns a different range than the selection
2387         https://bugs.webkit.org/show_bug.cgi?id=23601
2388
2389         Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
2390
2391         * WebView/WebFrame.mm:
2392         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
2393         (-[WebFrame _markDOMRange]):
2394         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
2395         (-[WebFrame _selectedNSRange]):
2396         * WebView/WebHTMLView.mm:
2397         (-[WebHTMLView _selectedRange]):
2398         (-[WebTextCompleteController doCompletion]):
2399         (-[WebHTMLView selectedAttributedString]):
2400         * WebView/WebView.mm:
2401         (-[WebView textIteratorForRect:]):
2402         (-[WebView selectedDOMRange]):
2403
2404 2009-02-06  Geoffrey Garen  <ggaren@apple.com>
2405
2406         Reviewed by Sam Weinig.
2407
2408         Part III of <rdar://problem/6552272>.
2409         
2410         Refactored to use the redirect data WebCore makes available, instead of
2411         tracking loading state in WebKit.
2412         
2413         * History/WebHistory.mm:
2414         (-[WebHistoryPrivate dealloc]):
2415         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2416         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
2417         * History/WebHistoryInternal.h:
2418         * WebCoreSupport/WebFrameLoaderClient.h:
2419         * WebCoreSupport/WebFrameLoaderClient.mm:
2420         (WebFrameLoaderClient::updateGlobalHistory):
2421         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2422
2423 2009-02-06  Anders Carlsson  <andersca@apple.com>
2424
2425         Reviewed by Sam Weinig.
2426
2427         <rdar://problem/6562220> 
2428         CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
2429         
2430         Make the handling of crashes in the plug-in host more robust.
2431         
2432         * Plugins/Hosted/NetscapePluginHostProxy.h:
2433         Add m_portSet.
2434         
2435         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2436         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2437         Initialize m_portSet.
2438         
2439         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2440         Free m_portSet.
2441         
2442         (WebKit::NetscapePluginHostProxy::processRequests):
2443         Listen for messages on the port set. If we get a message to the port death notification port,
2444         then call pluginHostDied. Otherwise, process the message.
2445         
2446         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2447         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2448         (WebKit::NetscapePluginInstanceProxy::cleanup):
2449         Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
2450         
2451         (WebKit::NetscapePluginInstanceProxy::destroy):
2452         Call cleanup().
2453         
2454         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
2455         Call cleanup().
2456         
2457         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2458         Call NetscapePluginHostProxy::processRequests.
2459         
2460         * Plugins/Hosted/ProxyInstance.mm:
2461         (WebKit::ProxyInstance::invalidate):
2462         Add a null check for the host proxy.
2463
2464 2009-02-06  Dan Bernstein  <mitz@apple.com>
2465
2466         - try to fix the Tiger build
2467
2468         * Misc/WebNSArrayExtras.h:
2469
2470 2009-02-06  Anders Carlsson  <andersca@apple.com>
2471
2472         Reviewed by Dan Bernstein.
2473
2474         <rdar://problem/6563650> 
2475         Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
2476                 
2477         * Plugins/WebNetscapePluginView.mm:
2478         (-[WebNetscapePluginView loadStream]):
2479         (-[WebNetscapePluginView pluginView:receivedData:]):
2480         (-[WebNetscapePluginView _shouldCancelSrcStream]):
2481
2482 2009-02-05  Maciej Stachowiak  <mjs@apple.com> and Brady Eidson  <beidson@apple.com>
2483
2484         Reviewed by Dan Bernstein and Geoff Garen.
2485
2486         - WebKit code to track per-day and per-week visit counts in history
2487
2488         For now this data is only exposed via SPI for performance reasons.
2489         
2490         * History/WebHistoryItem.mm:
2491         (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
2492         for new data.
2493         (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
2494         (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
2495         (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
2496         (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
2497         * History/WebHistoryItemInternal.h: Declare new methods.
2498         * History/WebHistoryItemPrivate.h: Ditto.
2499
2500         * History/WebHistory.mm:
2501         (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
2502         the new _recordInitialVisit method instead of setting visit count to 1.
2503
2504         * Misc/WebNSArrayExtras.h:
2505         * Misc/WebNSArrayExtras.m:
2506         (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
2507         (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
2508         
2509 2009-02-05  Aaron Boodman  <aa@chromium.org>
2510
2511         Reviewed by Dave Hyatt.
2512
2513         https://bugs.webkit.org/show_bug.cgi?id=23708
2514         Adds documentElementAvailable() callback to FrameLoaderClient.
2515
2516         * WebCoreSupport/WebFrameLoaderClient.h:
2517         Stub out documentElementAvailable().
2518         * WebCoreSupport/WebFrameLoaderClient.mm:
2519         Ditto.
2520
2521 2009-02-05  Dan Bernstein  <mitz@apple.com>
2522
2523         - build fix
2524
2525         * WebView/WebScriptDebugger.mm:
2526         (WebScriptDebugger::initGlobalCallFrame):
2527
2528 2009-02-05  Beth Dakin  <bdakin@apple.com>
2529
2530         Reviewed by John Sullivan and Brady Eidson.
2531
2532         Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a 
2533         mail note message doesn't display it in Mail's preview pane
2534
2535         This was failing because revision 36962 removed a version of 
2536         setVerticalScrollingMode that mail calls. This patch simply adds 
2537         that method back.
2538
2539         * WebView/WebDynamicScrollBarsView.m:
2540         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
2541
2542 2009-02-04  Anders Carlsson  <andersca@apple.com>
2543
2544         Build fix fix.
2545
2546         * WebView/WebScriptDebugger.mm:
2547         (WebScriptDebugger::initGlobalCallFrame):
2548
2549 2009-02-04  Anders Carlsson  <andersca@apple.com>
2550
2551         Reviewed by Sam Weinig.
2552         
2553         Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
2554         
2555         Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
2556         
2557         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2558         (WKPCEvaluate):
2559         (WKPCInvoke):
2560         (WKPCGetProperty):
2561         (WKPCHasProperty):
2562         (WKPCHasMethod):
2563         * Plugins/Hosted/WebKitPluginClient.defs:
2564         * Plugins/Hosted/WebKitPluginHost.defs:
2565
2566 2009-02-04  Anders Carlsson  <andersca@apple.com>
2567
2568         Reviewed by Mark Rowe.
2569
2570         Fix 64-bit build.
2571         
2572         * WebView/WebScriptDebugger.mm:
2573         (WebScriptDebugger::initGlobalCallFrame):
2574
2575 2009-02-04  Geoffrey Garen  <ggaren@apple.com>
2576
2577         Reviewed by Mark Rowe.
2578         
2579         Part I of <rdar://problem/6552272>.
2580
2581         Clear the redirectURLs entry when first visiting a site, so sites that
2582         only redirect you the first time you visit them can later learn that
2583         they don't redirect.
2584
2585         * History/WebHistory.mm:
2586         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
2587
2588 2009-02-04  Timothy Hatcher  <timothy@apple.com>
2589
2590         Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
2591
2592         <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
2593
2594         Reviewed by Oliver Hunt.
2595
2596         * WebView/WebScriptDebugDelegate.h:
2597
2598 2009-02-04  Timothy Hatcher  <timothy@apple.com>
2599
2600         Switched over from using the WebSafeForwarder for the Script Debug
2601         delegate and added high performance CallScriptDebugDelegate functions.
2602
2603         <rdar://problem/6508457> Launching widget in Dashcode debugger is
2604         super-slow due forwardInvocation: calling debug delegate
2605
2606         Reviewed by Oliver Hunt.
2607
2608         * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
2609         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
2610         * WebView/WebScriptDebugger.mm:
2611         (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
2612         (WebScriptDebugger::sourceParsed): Ditto.
2613         (WebScriptDebugger::callEvent): Ditto.
2614         (WebScriptDebugger::atStatement): Ditto.
2615         (WebScriptDebugger::returnEvent): Ditto.
2616         (WebScriptDebugger::exception): Ditto.
2617         * WebView/WebView.mm:
2618         (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
2619         (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
2620         method implementations for the script debug delegate. Also caches what
2621         didParseSource method to use.
2622         (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
2623         WebScriptDebugDelegateImplementations structure.
2624         (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
2625         (CallDelegate): Added more overloaded versions that take different arguments.
2626         (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
2627         * WebView/WebViewInternal.h:
2628
2629 2009-02-03  Simon Fraser  <simon.fraser@apple.com>
2630
2631         Reviewed by Dave Hyatt
2632
2633         https://bugs.webkit.org/show_bug.cgi?id=23365
2634         
2635         Hook up accelerated compositing layers the native
2636         view system on Mac.
2637
2638         * WebCoreSupport/WebChromeClient.h:
2639         * WebCoreSupport/WebChromeClient.mm:
2640         (WebChromeClient::attachRootGraphicsLayer):
2641         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
2642         New methods to hook up the root GraphicsLayer to the native
2643         view system, and to synchronize layer changes with view-based
2644         drawing when layers come and go.
2645
2646         * WebView/WebHTMLView.mm:
2647         (-[WebHTMLViewPrivate clear]):
2648         Clear the pointer to layerHostingView.
2649
2650         (-[WebHTMLView _setAsideSubviews]):
2651         (-[WebHTMLView willRemoveSubview:]):
2652         Keep the special layer-hosting view in the subviews even 
2653         when the rest of the subviews are ripped out for
2654         painting.
2655
2656         (-[WebHTMLView _isUsingAcceleratedCompositing]):
2657         New utility method for DumpRenderTree to know if we're
2658         hosting layers.
2659
2660         (-[WebHTMLView drawRect:]):
2661         Call -disableScreenUpdatesUntilFlush if we have to
2662         synchronize layer changes with painting.
2663
2664         (-[WebHTMLView attachRootLayer:]):
2665         (-[WebHTMLView detachRootLayer]):
2666         Attach and detach the root GraphicsLayer.
2667
2668         * WebView/WebViewInternal.h:
2669         * WebView/WebHTMLViewInternal.h:
2670         * WebView/WebHTMLViewPrivate.h:
2671         New method declarations.
2672         
2673         * WebView/WebView.mm:
2674         (-[WebView _needsOneShotDrawingSynchronization]):
2675         (-[WebView _setNeedsOneShotDrawingSynchronization:]):
2676         Set the flag to say if we need to synchronize layer
2677         changes and painting on the next -drawRect: call.
2678
2679         (-[WebView viewWillMoveToWindow:]):
2680         (-[WebView viewDidMoveToWindow]):
2681         Call new notifications that the view was added to or removed from
2682         the window, which are required by the layer hosting mechanism.
2683
2684 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
2685
2686         Build fix.
2687
2688         * Plugins/WebPluginController.mm:
2689         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
2690
2691 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
2692
2693         Reviewed by Sam Weinig.
2694
2695         Track redirects in global history.
2696
2697         * History/WebHistory.mm:
2698         (-[WebHistoryPrivate dealloc]):
2699         (-[WebHistoryPrivate lastVisitedEntry]):
2700         (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
2701         entry in case we're asked to add redirect information to it later.
2702
2703         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
2704         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
2705         information in global history.
2706
2707         * History/WebHistoryInternal.h:
2708         * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
2709
2710         * WebCoreSupport/WebFrameLoaderClient.mm:
2711         (WebFrameLoaderClient::updateGlobalHistory):
2712         (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
2713         information in global history.
2714
2715         * WebView/WebFrame.mm:
2716         (-[WebFrame loadRequest:]):
2717         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
2718         * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
2719
2720 2009-02-02  Anders Carlsson  <andersca@apple.com>
2721
2722         Reviewed by Dan Bernstein.
2723
2724         Work around a limitation in MIG where two functions can't have the same name even if they're
2725         not in the same subsystem.
2726         
2727         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2728         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2729         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2730         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2731         * Plugins/Hosted/WebKitPluginClient.defs:
2732         * Plugins/Hosted/WebKitPluginHost.defs:
2733
2734 2009-02-02  Anders Carlsson  <andersca@apple.com>
2735
2736         Reviewed by Sam Weinig.
2737
2738         Implement WKPCGetPluginElementObject.
2739         
2740         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2741         (WKPCGetPluginElementNPObject):
2742         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2743         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2744         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
2745         * Plugins/Hosted/WebKitPluginClient.defs:
2746         * Plugins/WebBaseNetscapePluginView.h:
2747         * Plugins/WebBaseNetscapePluginView.mm:
2748         (-[WebBaseNetscapePluginView WebCore::]):
2749
2750 2009-02-02  Anders Carlsson  <andersca@apple.com>
2751
2752         Build fix.
2753         
2754         * WebView/WebHTMLView.mm:
2755
2756 2009-02-02  Anders Carlsson  <andersca@apple.com>
2757
2758         Reviewed by Dan Bernstein.
2759
2760         Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
2761         
2762         * Plugins/Hosted/WebHostedNetscapePluginView.h:
2763         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2764         (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
2765         * Plugins/WebBaseNetscapePluginView.h:
2766         * Plugins/WebBaseNetscapePluginView.mm:
2767         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
2768         (-[WebBaseNetscapePluginView _windowClipRect]):        
2769         (-[WebBaseNetscapePluginView visibleRect]):
2770         (-[WebBaseNetscapePluginView dataSource]):
2771         * Plugins/WebKitPluginContainerView.h: Removed.
2772         * Plugins/WebKitPluginContainerView.mm: Removed.
2773         * Plugins/WebNetscapePluginView.h:
2774         * Plugins/WebNetscapePluginView.mm:
2775         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
2776         (-[WebNetscapePluginView getVariable:value:]):
2777         * WebCoreSupport/WebFrameLoaderClient.mm:
2778         (WebFrameLoaderClient::createPlugin):
2779
2780 2009-02-02  Anders Carlsson  <andersca@apple.com>
2781
2782         Reviewed by Dan Bernstein.
2783
2784         Update for changes to WebCore.
2785         
2786         * WebCoreSupport/WebFrameLoaderClient.h:
2787         * WebCoreSupport/WebFrameLoaderClient.mm:
2788         (WebFrameLoaderClient::createPlugin):
2789
2790 2009-02-02  Anders Carlsson  <andersca@apple.com>
2791
2792         Reviewed by Oliver Hunt.
2793
2794         When a new Web View was not created, report back to the plug-in host.
2795         
2796         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2797         (WebKit::NetscapePluginInstanceProxy::performRequest):
2798         * Plugins/Hosted/WebKitPluginHost.defs:
2799
2800 2009-02-02  Anders Carlsson  <andersca@apple.com>
2801
2802         Reviewed by Kevin Decker.
2803
2804         Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
2805         
2806         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2807         (-[WebHostedNetscapePluginView drawRect:]):
2808
2809 2009-02-02  Holger Hans Peter Freyther  <zecke@selfish.org>
2810
2811         Reviewed by Darin Adler.
2812
2813         Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
2814
2815         https://bugs.webkit.org/show_bug.cgi?id=23428
2816
2817         FrameView::forceLayout could be killed but the comment might
2818         contain a value over the the plain FrameView::layout...
2819
2820         Adjust the WebCore/WebKit consumers of these methods.
2821
2822         * WebView/WebFrame.mm:
2823         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
2824         * WebView/WebHTMLView.mm:
2825         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2826         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
2827
2828 2009-01-31  John Sullivan  <sullivan@apple.com>
2829
2830         https://bugs.webkit.org/show_bug.cgi?id=23665
2831
2832         Cleaned up code to add/remove NSNotification observers, to avoid performance hit
2833         of calling removeObserver with unspecified notifications, or calling removeObserver
2834         multiple times for the same notification.
2835
2836         Reviewed by Darin Adler
2837
2838         * WebView/WebHTMLView.mm:
2839         added observingMouseMovedNotifications, observingSuperviewNotifications, and 
2840         observingWindowNotifications as BOOL ivars of _private object
2841         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
2842         moved to file-internal section of file, added leading underscore, now bails out
2843         if we aren't observing the relevant notifications, now records that we are no longer
2844         observing the relevant notifications
2845         (-[WebHTMLView _removeSuperviewObservers]):
2846         ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
2847         (-[WebHTMLView _removeWindowObservers]):
2848         ditto
2849         (-[WebHTMLView close]):
2850         replace general removeObserver: call with three specific calls for all the notifications
2851         that this class actually observes
2852         (-[WebHTMLView addMouseMovedObserver]):
2853         bail out if already observing relevant notifications, now records that we are observing
2854         the relevant notifications
2855         (-[WebHTMLView removeMouseMovedObserver]):
2856         updated for name change
2857         (-[WebHTMLView addSuperviewObservers]):
2858         bail out if already observing relevant notifications, now records that we are observing
2859         the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var 
2860         to avoid objc dispatch
2861         (-[WebHTMLView addWindowObservers]):
2862         ditto
2863         (-[WebHTMLView viewWillMoveToSuperview:]):
2864         updated for name change
2865         (-[WebHTMLView viewWillMoveToWindow:]):
2866         updated for name changes
2867
2868 2009-01-31  Darin Adler  <darin@apple.com>
2869
2870         Reviewed by Mark Rowe.
2871
2872         Fix code that assumes all command selectors end in colons.
2873         rdar://problem/6545874
2874
2875         * WebView/WebHTMLView.mm:
2876         (commandNameForSelector): Don't assert, just return a null string, when
2877         the selector doesn't end in a colon.
2878
2879 2009-01-30  Adam Barth  <abarth@webkit.org>
2880
2881         Reviewed by Sam Weinig.
2882
2883         Add a pref to disable web security.
2884
2885         * WebView/WebPreferenceKeysPrivate.h:
2886         * WebView/WebPreferencesPrivate.h:
2887         * WebView/WebPreferences.mm:
2888         (+[WebPreferences initialize]):
2889         (-[WebPreferences isWebSecurityEnabled]):
2890         (-[WebPreferences setWebSecurityEnabled:]):
2891         * WebView/WebView.mm:
2892         (-[WebView _preferencesChangedNotification:]):
2893
2894 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
2895
2896         Reviewed by Darin Adler.
2897
2898         Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
2899
2900         Carry out the move and catch up in two call sites.
2901
2902         * WebView/WebHTMLView.mm:
2903         (-[WebHTMLView _frameOrBoundsChanged]):
2904
2905 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
2906
2907         Reviewed by Darin Adler.
2908
2909         isFrameSet was moved from Frame to Document. Update the
2910         WebKit usage.
2911
2912         * WebView/WebFrame.mm:
2913         (-[WebFrame _isFrameSet]):
2914         * WebView/WebHTMLView.mm:
2915         (-[WebHTMLView knowsPageRange:]):
2916
2917 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
2918
2919         Build fix.
2920
2921         * WebView/WebFramePrivate.h:
2922
2923 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
2924
2925         Reviewed by Sam Weinig.
2926
2927         Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
2928         preparation for setting them differently during a redirect.
2929
2930         * WebView/WebPDFView.mm:
2931         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
2932
2933 2009-01-30  Anders Carlsson  <andersca@apple.com>
2934
2935         Reviewed by Sam Weinig.
2936
2937         Fix <rdar://problem/6544048>
2938         
2939         Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
2940         
2941         When the plug-in instance is destroyed, invalidate all proxy instances.
2942         
2943         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2944         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2945         (WebKit::NetscapePluginInstanceProxy::destroy):
2946         (WebKit::NetscapePluginInstanceProxy::addInstance):
2947         (WebKit::NetscapePluginInstanceProxy::removeInstance):
2948         * Plugins/Hosted/ProxyInstance.h:
2949         * Plugins/Hosted/ProxyInstance.mm:
2950         (WebKit::ProxyInstance::ProxyInstance):
2951         (WebKit::ProxyInstance::~ProxyInstance):
2952         (WebKit::ProxyInstance::invalidate):
2953
2954 2009-01-30  Anders Carlsson  <andersca@apple.com>
2955
2956         Reviewed by Sam Weinig.
2957
2958         Fix <rdar://problem/6490778>.
2959         
2960         Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
2961         validate IdentifierReps before dereferencing them.
2962         
2963         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2964         (WKPCEvaluate):
2965         (WKPCGetStringIdentifier):
2966         (WKPCGetIntIdentifier):
2967         (identifierFromIdentifierRep):
2968         (WKPCInvoke):
2969         (WKPCGetProperty):
2970         (WKPCSetProperty):
2971         (WKPCRemoveProperty):
2972         (WKPCHasProperty):
2973         (WKPCHasMethod):
2974         (WKPCIdentifierInfo):
2975
2976 2009-01-30  Brady Eidson  <beidson@apple.com>
2977
2978         Reviewed by Sam Weinig
2979
2980         Remove FrameLoaderClient code that is now handled by FrameLoader itself
2981
2982         * WebCoreSupport/WebFrameLoaderClient.mm:
2983         (WebFrameLoaderClient::frameLoadCompleted):
2984
2985 2009-01-29  Stephanie Lewis <slewis@apple.com>
2986
2987         RS by Oliver Hunt.
2988
2989         Update the order files.
2990
2991         * WebKit.order:
2992
2993 2009-01-29  Sam Weinig  <sam@webkit.org>
2994
2995         Reviewed by Anders Carlsson.
2996
2997         Second step in tracking the urls a HistoryItem was redirected through
2998         Add SPI to access the array of redirect urls associated with a HistoryItem.
2999
3000         * History/WebHistoryItem.mm:
3001         (-[WebHistoryItem dictionaryRepresentation]):
3002         (-[WebHistoryItem _redirectURLs]):
3003         * History/WebHistoryItemPrivate.h:
3004
3005 2009-01-29  Anders Carlsson  <andersca@apple.com>
3006
3007         Reviewed by Dan Bernstein.
3008
3009         Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
3010         
3011         * Plugins/Hosted/NetscapePluginHostProxy.h:
3012         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3013         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3014         Call endModal here.
3015         
3016         (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
3017         If we're modal, we should always bring the plug-in host process to the front.
3018         
3019         (WebKit::NetscapePluginHostProxy::beginModal):
3020         Add an observer for the NSApplicationWillBecomeActiveNotification callback.
3021         
3022         (WebKit::NetscapePluginHostProxy::endModal):
3023         Remove the observer.
3024
3025 2009-01-29  Sam Weinig  <sam@webkit.org>
3026
3027         Reviewed by Mark Rowe.
3028
3029         First step in tracking the urls a HistoryItem was redirected through.
3030
3031         * History/WebHistoryItem.mm:
3032         (-[WebHistoryItem initFromDictionaryRepresentation:]):
3033         (-[WebHistoryItem dictionaryRepresentation]):
3034         * Misc/WebNSDictionaryExtras.h:
3035         * Misc/WebNSDictionaryExtras.m:
3036         (-[NSDictionary _webkit_arrayForKey:]): Add helper.
3037
3038 2009-01-29  Anders Carlsson  <andersca@apple.com>
3039
3040         Reviewed by Sam Weinig.
3041
3042         Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
3043         
3044         * Plugins/Hosted/NetscapePluginHostManager.h:
3045         * Plugins/Hosted/NetscapePluginHostManager.mm:
3046         (WebKit::NetscapePluginHostManager::hostForPackage):
3047         Get the current PSN and pass it to spawnPluginHost.
3048         
3049         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3050         Pass the PSN to the "check in" function.
3051         
3052         * Plugins/Hosted/NetscapePluginHostProxy.h:
3053         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3054         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3055         
3056         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3057         Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
3058         
3059         (WebKit::NetscapePluginHostProxy::beginModal):
3060         (WebKit::NetscapePluginHostProxy::endModal):
3061         (WebKit::NetscapePluginHostProxy::setModal):
3062         Split out the code that does all of the work into beginModal and endModal methods.
3063         
3064         * Plugins/Hosted/WebKitPluginHost.defs:
3065         * Plugins/WebNetscapePluginView.mm:
3066         (-[WebNetscapePluginView loadStream]):
3067
3068 2009-01-29  David Kilzer  <ddkilzer@apple.com>
3069
3070         Remove semi-colons from the end of ObjC method implementations
3071
3072         Rubber-stamped by Adam Roben.
3073
3074         $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
3075
3076         * DefaultDelegates/WebDefaultUIDelegate.m:
3077         (-[WebDefaultUIDelegate webView:setResizable:]):
3078         (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
3079         (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
3080         (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
3081         * History/WebBackForwardList.mm:
3082         (-[WebBackForwardList addItem:]):
3083         (-[WebBackForwardList backListWithLimit:]):
3084         (-[WebBackForwardList forwardListWithLimit:]):
3085         * History/WebHistoryItem.mm:
3086         (-[WebHistoryItem alternateTitle]):
3087         (-[WebHistoryItem setViewState:]):
3088         * Misc/WebCoreStatistics.mm:
3089         (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
3090         * Misc/WebKitNSStringExtras.m:
3091         (-[NSString _web_drawAtPoint:font:textColor:]):
3092         * Plugins/WebNetscapePluginView.mm:
3093         (-[WebNetscapePluginView setAttributeKeys:andValues:]):
3094         * WebCoreSupport/WebEditorClient.mm:
3095         (-[WebEditCommand command]):
3096         * WebView/WebFrame.mm:
3097         (-[WebFrame _getVisibleRect:]):
3098         * WebView/WebHTMLRepresentation.mm:
3099         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
3100         * WebView/WebHTMLView.mm:
3101         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
3102         * WebView/WebPreferences.mm:
3103         (-[WebPreferences setAllowsAnimatedImages:]):
3104         (-[WebPreferences setAutosaves:]):
3105         (-[WebPreferences PDFDisplayMode]):
3106         * WebView/WebView.mm:
3107         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
3108         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
3109         (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
3110         (+[WebView _registerViewClass:representationClass:forURLScheme:]):
3111         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
3112         (-[WebView _insertNewlineInQuotedContent]):
3113
3114 2009-01-28  Geoffrey Garen  <ggaren@apple.com>
3115
3116         Reviewed by Sam Weinig.
3117
3118         Updated for WebCore rename.
3119         
3120         * WebView/WebView.mm:
3121         (-[WebView setCustomTextEncodingName:]):
3122
3123 2009-01-28  David Kilzer  <ddkilzer@apple.com>
3124
3125         Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
3126
3127         Reviewed by Dan Bernstein.
3128
3129         * Misc/WebNSURLExtras.h:
3130         (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
3131         declaration after the implementation was added in r9258.
3132
3133 2009-01-28  Sam Weinig  <sam@webkit.org>
3134
3135         Reviewed by Geoff Garen.
3136
3137         Fix for <rdar://problem/6129678>
3138         REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
3139
3140         * WebView/WebScriptDebugDelegate.mm:
3141         (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
3142
3143 2009-01-27  Anders Carlsson  <andersca@apple.com>
3144
3145         Reviewed by Oliver Hunt.
3146
3147         Fix two bugs with Core Animation based plug-ins.
3148         
3149         1. The plug-in view was marked as opaque even though it's not. 
3150            (This would leave garbage in the plug-in view).
3151         2. The plug-in layer needs to have autoresizing turned on.
3152         
3153         * Plugins/WebNetscapePluginView.mm:
3154         (-[WebNetscapePluginView setLayer:]):
3155
3156 2009-01-27  Brady Eidson  <beidson@apple.com>
3157
3158         Reviewed by Dan Bernstein
3159
3160         Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
3161
3162         * History/WebHistoryItem.mm:
3163
3164         * WebCoreSupport/WebFrameLoaderClient.h:
3165         * WebCoreSupport/WebFrameLoaderClient.mm:
3166         (WebFrameLoaderClient::savePlatformDataToCachedFrame):
3167         (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
3168         * WebKit.order:
3169
3170 2009-01-26  Anders Carlsson  <andersca@apple.com>
3171
3172         Reviewed by Dan Bernstein.
3173
3174         Add the ability for plug-ins to make WebKit operate in "modal mode"
3175         
3176         * Plugins/Hosted/NetscapePluginHostProxy.h:
3177         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3178         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3179         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3180         If the plug-in crashes while we're modal, make sure to leave the modal mode.
3181         
3182         (WebKit::NetscapePluginHostProxy::setModal):
3183         (WKPCSetModal):
3184         * Plugins/Hosted/WebKitPluginClient.defs:
3185
3186 2009-01-26  John Sullivan  <sullivan@apple.com>
3187
3188         fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets 
3189         stuck in the Name field rather than cycling around
3190
3191         Reviewed by Dan Bernstein
3192
3193         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
3194         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3195         The two static text fields and the last button all had their "next key view" outlets set to the
3196         name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
3197         selectable view have exactly one "next key view" set to it.
3198
3199 2009-01-26  Anders Carlsson  <andersca@apple.com>
3200
3201         Reviewed by Sam Weinig.
3202
3203         Add the ability for a plug-in to show or hide the menu bar.
3204         
3205         * Plugins/Hosted/NetscapePluginHostProxy.h:
3206         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3207         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3208         (WebKit::NetscapePluginHostProxy::pluginHostDied):
3209         (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
3210         (WKPCSetMenuBarVisible):
3211         * Plugins/Hosted/WebKitPluginClient.defs:
3212
3213 2009-01-26  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3214
3215         Reviewed by Gavin Barraclough.
3216
3217         Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
3218         <https://bugs.webkit.org/show_bug.cgi?id=23552>
3219         <rdar://problem/6398839>
3220
3221         Dashcode will crash when using the evaluator because it saves a global call
3222         frame, even after global code has finished executing, and then uses this as
3223         a launching pad to execute new JS in the evaluator. The fix is to detect
3224         when Dashcode is attempting to do this and execute code from a global call
3225         frame instead.        
3226
3227         * ForwardingHeaders/runtime/Protect.h: Added.
3228         * WebView/WebScriptDebugDelegate.mm:
3229         (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
3230         Added debugger, a WebScriptDebugger* argument.
3231         (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
3232         a stale WebScriptCallFrame to execute new JS and evaluate it starting from
3233         the global object's global call frame instead.
3234         * WebView/WebScriptDebugger.h:
3235         (WebScriptDebugger::globalObject): Added.
3236         (WebScriptDebugger::globalCallFrame): Added.
3237         * WebView/WebScriptDebugger.mm:
3238         (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
3239         (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
3240         so that the global call frame can be saved immediately after being created.
3241         (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
3242         WebScriptCallFrame's _initWithGlobalObject method.
3243
3244 2009-01-26  Anders Carlsson  <andersca@apple.com>
3245
3246         Reviewed by Oliver Hunt.
3247
3248         Make WKPCInvoke a simpleroutine.
3249         
3250         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3251         (WKPCInvoke):
3252         * Plugins/Hosted/WebKitPluginClient.defs:
3253
3254 2009-01-26  Anders Carlsson  <andersca@apple.com>
3255
3256         Reviewed by Sam Weinig.
3257
3258         Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
3259         
3260         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3261         (WKPCBooleanAndDataReply):
3262         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3263         (WebKit::NetscapePluginInstanceProxy::Reply::):
3264         (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
3265         Rename NPObjectInvokeReply to BooleanAndDataReply.
3266         
3267         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3268         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
3269         Fix a cut and paste error.
3270         
3271         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
3272         Handle NPObjects.
3273         
3274         * Plugins/Hosted/ProxyInstance.h:
3275         * Plugins/Hosted/ProxyInstance.mm:
3276         (WebKit::ProxyField::valueFromInstance):
3277         (WebKit::ProxyField::setValueToInstance):
3278         Call the ProxyInstance method.
3279         
3280         (WebKit::ProxyInstance::~ProxyInstance):
3281         Release the NPObject.
3282         
3283         (WebKit::ProxyInstance::supportsConstruct):
3284         Ask the plug-in host if an instance supports construct.
3285         
3286         (WebKit::ProxyInstance::fieldValue):
3287         (WebKit::ProxyInstance::setFieldValue):
3288         Call the plug-in host methods.
3289         
3290         * Plugins/Hosted/WebKitPluginHostTypes.h:
3291         Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
3292
3293 2009-01-26  Mark Rowe  <mrowe@apple.com>
3294
3295         Fix the build.
3296
3297         Remove -Wformat=2 from the warning flags as newer versions of GCC emit
3298         warnings about non-literal format strings for uses of our UI_STRING macro.
3299
3300         * Configurations/Base.xcconfig:
3301
3302 2009-01-26  Mark Rowe  <mrowe@apple.com>
3303
3304         Rubber-stamped by Sam Weinig.
3305
3306         Clean up after r40240.
3307
3308         * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
3309         * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
3310         is back in the build.
3311
3312 2009-01-25  Darin Adler  <darin@apple.com>
3313
3314         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
3315
3316 2009-01-25  Darin Adler  <darin@apple.com>
3317
3318         Discussed with Mark Rowe; not sure he reviewed it.
3319
3320         * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
3321         -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
3322
3323 2009-01-25  Mark Rowe  <mrowe@apple.com>
3324
3325         Rubber-stamped by Dan Bernstein.
3326
3327         Improve the consistency of settings in our .xcconfig files.
3328
3329         * Configurations/Base.xcconfig: Only dead code strip the normal variant.
3330         Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
3331
3332 2009-01-25  Darin Adler  <darin@apple.com>
3333
3334         Reviewed by Sam Weinig.
3335
3336         Bug 23522: use checked casts for render tree
3337         https://bugs.webkit.org/show_bug.cgi?id=23522
3338
3339         Step one: RenderText.
3340
3341         * WebView/WebRenderNode.mm:
3342         (copyRenderNode): Use toRenderText.
3343
3344 2009-01-23  Brady Eidson  <beidson@apple.com>
3345
3346         Rubberstamped by Darin Adler
3347
3348         Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
3349
3350         * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
3351         (WebCachedFramePlatformData::WebCachedFramePlatformData):
3352         * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
3353
3354         * WebCoreSupport/WebFrameLoaderClient.mm:
3355         (WebFrameLoaderClient::savePlatformDataToCachedPage):
3356         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
3357
3358         * WebKit.order:
3359
3360 2009-01-23  Adele Peterson  <adele@apple.com>
3361
3362         Build fix.
3363
3364         Use new linesBoundingBox method instead of
3365         boundingBoxWidth and boundingBoxHeight for RenderText objects.
3366
3367         * WebView/WebRenderNode.mm: (copyRenderNode):
3368
3369 2009-01-23  Anders Carlsson  <andersca@apple.com>
3370
3371         Fix 64-bit build.
3372         
3373         * Plugins/Hosted/ProxyInstance.mm:
3374         (WebKit::proxyClass):
3375
3376 2009-01-23  Anders Carlsson  <andersca@apple.com>
3377
3378         Fix GCC 4.0 build.
3379         
3380         * Configurations/Base.xcconfig:
3381
3382 2009-01-23  Anders Carlsson  <andersca@apple.com>
3383
3384         Reviewed by Sam Weinig.
3385
3386         Turn on -Wmissing-prototypes and fix the resulting warnings.
3387
3388         * Configurations/Base.xcconfig:
3389         * History/WebHistory.mm:
3390         (timeIntervalForBeginningOfDay):
3391         * History/WebHistoryItem.mm:
3392         (historyItemWrappers):
3393         * Misc/WebNSPasteboardExtras.mm:
3394         (imageFromElement):
3395         * WebView/WebFrame.mm:
3396         * WebView/WebScriptDebugger.mm:
3397         (toNSString):
3398
3399 2009-01-22  Mark Rowe  <mrowe@apple.com>
3400
3401         Rubber-stamped by Anders Carlsson.
3402
3403         Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
3404
3405         Current versions of Xcode only respect it for C and Objective-C files,
3406         and our code doesn't currently compile if it is applied to C++ and
3407         Objective-C++ files.
3408
3409         * Configurations/Base.xcconfig:
3410
3411 2009-01-22  Anders Carlsson  <andersca@apple.com>
3412
3413         Reviewed by Sam Weinig.
3414
3415         Add support for Invoke and InvokeDefault. Clean up code.
3416         
3417         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3418         (WKPCBooleanReply):
3419         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3420         (WebKit::NetscapePluginInstanceProxy::Reply::):
3421         (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
3422         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3423         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
3424         * Plugins/Hosted/ProxyInstance.h:
3425         * Plugins/Hosted/ProxyInstance.mm:
3426         (WebKit::ProxyInstance::invoke):
3427         (WebKit::ProxyInstance::invokeMethod):
3428         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
3429         (WebKit::ProxyInstance::invokeDefaultMethod):
3430         (WebKit::ProxyInstance::methodsNamed):
3431         (WebKit::ProxyInstance::fieldNamed):
3432         * Plugins/Hosted/WebKitPluginClient.defs:
3433         * Plugins/Hosted/WebKitPluginHost.defs:
3434         * Plugins/Hosted/WebKitPluginHostTypes.h:
3435
3436 2009-01-22  Eric Roman  <eroman@chromium.og>
3437
3438         Reviewed by Eric Seidel.
3439
3440         https://bugs.webkit.org/show_bug.cgi?id=20806
3441         Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
3442
3443         * History/WebHistoryItem.mm:
3444         (-[WebHistoryItem RSSFeedReferrer]):
3445         (-[WebHistoryItem setRSSFeedReferrer:]):
3446
3447 2009-01-22  Anders Carlsson  <andersca@apple.com>
3448
3449         Reviewed by Kevin Decker.
3450
3451         Don't crash or hang when we fail to instantiate a plug-in.
3452         
3453         * Plugins/Hosted/NetscapePluginHostManager.mm:
3454         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3455         Return 0 on failure.
3456         
3457         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3458         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
3459         Null check for the proxy member.
3460
3461 2009-01-21  David Hyatt  <hyatt@apple.com>
3462
3463         Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
3464
3465         Reviewed by Eric Seidel and Darin Adler
3466
3467         * WebView/WebRenderNode.mm:
3468         (copyRenderNode):
3469
3470 2009-01-21  Anders Carlsson  <andersca@apple.com>
3471
3472         Reviewed by Sam Weinig.
3473
3474         More browser->plug-in scripting support.
3475         
3476         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3477         (WKPCNPObjectHasPropertyReply):
3478         (WKPCNPObjectHasMethodReply):
3479         (WKPCNPObjectInvokeReply):
3480         MIG reply functions.
3481         
3482         (WKPCIdentifierInfo):
3483         Return information about an identifier given its 64-bit value.
3484         
3485         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3486         Add new reply structs.
3487         
3488         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3489         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
3490         Split out code that adds values to the arrays from marshalValue.
3491         
3492         (WebKit::NetscapePluginInstanceProxy::marshalValue):
3493         Call addValueToArray.
3494     
3495         (WebKit::NetscapePluginInstanceProxy::marshalValues):
3496         Marshal a list of values.
3497         
3498         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
3499         Actually create a proxy instance.
3500         
3501         * Plugins/Hosted/ProxyInstance.h:
3502         * Plugins/Hosted/ProxyInstance.mm:
3503         (WebKit::ProxyClass::methodsNamed):
3504         (WebKit::ProxyClass::fieldNamed):
3505         Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
3506         
3507         (WebKit::proxyClass):
3508         Shared proxyClass getter.
3509         
3510         (WebKit::ProxyField::ProxyField):
3511         (WebKit::ProxyField::valueFromInstance):
3512         (WebKit::ProxyField::setValueToInstance):
3513         Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
3514         
3515         (WebKit::ProxyMethod::ProxyMethod):
3516         (WebKit::ProxyMethod::serverIdentifier):
3517         (WebKit::ProxyMethod::numParameters):
3518         Add a dummy ProxyMethod class.
3519         
3520         (WebKit::ProxyInstance::invokeMethod):
3521         Call _WKPHNPObjectInvoke.
3522         
3523         (WebKit::ProxyInstance::defaultValue):
3524         (WebKit::ProxyInstance::stringValue):
3525         (WebKit::ProxyInstance::numberValue):
3526         (WebKit::ProxyInstance::booleanValue):
3527         (WebKit::ProxyInstance::valueOf):
3528         Add dummy implementations (taken from CInstance).
3529         
3530         (WebKit::ProxyInstance::methodsNamed):
3531         Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
3532         
3533         (WebKit::ProxyInstance::fieldNamed):
3534         Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
3535         
3536         * Plugins/Hosted/WebKitPluginClient.defs:
3537         * Plugins/Hosted/WebKitPluginHost.defs:
3538         Add new MIG definitions.
3539
3540 2009-01-21  Mark Rowe  <mrowe@apple.com>
3541
3542         Reviewed by Tim Hatcher.
3543
3544         Clean up how we force invocations of API that happened on background threads over to the main thread.
3545
3546         This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
3547         and return values back from the function.  The new approach is to use a proxy object that forwards an
3548         NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
3549         call site.
3550
3551         * Misc/WebNSObjectExtras.h:
3552         * Misc/WebNSObjectExtras.mm:
3553         (-[WebMainThreadInvoker initWithTarget:]):
3554         (-[WebMainThreadInvoker forwardInvocation:]):
3555         (-[WebMainThreadInvoker methodSignatureForSelector:]):
3556         (-[WebMainThreadInvoker handleException:]):
3557         (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
3558         raised back to the WebMainThreadInvoker.
3559         (-[NSObject _webkit_invokeOnMainThread]):
3560
3561         The following methods are updated to use the proxy object to forward methods to the main thread:
3562
3563         * WebView/WebArchive.mm:
3564         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
3565         (-[WebArchive mainResource]):
3566         (-[WebArchive subresources]):
3567         (-[WebArchive subframeArchives]):
3568         * WebView/WebResource.mm:
3569         (-[WebResource data]):
3570         (-[WebResource URL]):
3571         (-[WebResource MIMEType]):
3572         (-[WebResource textEncodingName]):
3573         (-[WebResource frameName]):
3574         (-[WebResource _ignoreWhenUnarchiving]):
3575         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
3576         (-[WebResource _initWithData:URL:response:]):
3577         (-[WebResource _suggestedFilename]):
3578         (-[WebResource _response]):
3579         (-[WebResource _stringValue]):
3580         * WebView/WebView.mm:
3581         (-[WebView initWithFrame:frameName:groupName:]):
3582         (-[WebView initWithCoder:]):
3583
3584 2009-01-20  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3585
3586         Reviewed&nbs