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