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