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