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