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