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