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