2f199afbd2c9b2bfcdadacdde12f71a937e8f503
[WebKit-https.git] / WebKit / ChangeLog
1 2007-02-20  Beth Dakin  <bdakin@apple.com>
2
3         Reviewed by Maciej.
4
5         WebKit changes needed to implement writeImage() in WebCore's 
6         Pasteboard class.
7
8         * Misc/WebKitNSStringExtras.m: Call into WebCore for these 
9         implementations.
10         (-[NSString _webkit_hasCaseInsensitiveSuffix:]):
11         (-[NSString _webkit_hasCaseInsensitiveSubstring:]):
12         (-[NSString _webkit_filenameByFixingIllegalCharacters]):
13         * Misc/WebNSURLExtras.m: Same.
14         (-[NSURL _webkit_suggestedFilenameWithMIMEType:]):
15         * WebCoreSupport/WebContextMenuClient.h: Remove 
16         copyImageToClipboard()
17         * WebCoreSupport/WebContextMenuClient.mm:
18         * WebCoreSupport/WebSystemInterface.m: Expose 
19         GetExtensionsForMIMEType and GetPreferredExtensionForMIMEType to 
20         WebCore.
21         (InitWebCoreSystemInterface):
22         * WebCoreSupport/WebViewFactory.mm: New localized string for 
23         WebCore. 
24         (-[WebViewFactory copyImageUnknownFileLabel]):
25
26 2007-02-20  Adam Roben  <aroben@apple.com>
27
28         Reviewed by Darin and Anders.
29
30         Update WebKit for WebCore fix for <rdar://problem/4736215> Make
31         WebCoreStringTruncator use WebCore types.
32
33         * Misc/WebStringTruncator.m:
34         (defaultMenuFont): Moved from WebCoreStringTruncator.mm.
35         (core): Added.
36         (+[WebStringTruncator centerTruncateString:toWidth:]):
37         (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
38         (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
39         (+[WebStringTruncator widthOfString:font:]):
40         * WebKit.xcodeproj/project.pbxproj: Changed WebStringTruncator to ObjC++.
41
42 2007-02-20  Timothy Hatcher  <timothy@apple.com>
43
44         Reviewed by John.
45
46         Fixes the version number returned when using a CFBundleVersion of "420+".
47
48         * WebView/WebView.mm:
49         (-[WebView _userVisibleBundleVersionFromFullVersion:]): Check the length up to the first
50         non-decimal digit, so this works with versions that have "." and "+".
51
52 2007-02-20  John Sullivan  <sullivan@apple.com>
53
54         Reviewed by Kevin Decker
55         
56         - fixed <rdar://problem/4989344> REGRESSION: After clicking on page, Find
57         won't find anything if all hits are before the clicked point
58         
59         This was caused by a mismatch between WebCore's search code's notion of "selection" and
60         WebView's search code's notion of "selection". WebCore's search code was starting 
61         just before or just after the "selection", which included collapsed, zero-length
62         selections. WebKit's search code was only considering non-zero-length selections,
63         and would not search all of the content when there was a zero-length selection.
64         The fix was to make WebKit ignore the selection. This has a side effect of increasing 
65         the amount of redundantly-searched content in the case where no matches are found. To
66         compensate for that, I special-cased the most common case of WebViews with a single frame, 
67         to avoid ever searching redundantly in those.
68
69         * WebView/WebView.mm:
70         (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]):
71         remove startHasSelection ivar; special-case WebViews with only one frame; clarify the
72         code that leads to redundant searching with comments.
73
74 2007-02-20  Timothy Hatcher  <timothy@apple.com>
75
76         Reviewed by Darin.
77
78         <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed
79
80         Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
81         that have a finalizer that needs called on the main thread. Assert in finalize that we
82         are on the main thread.
83
84         * Carbon/CarbonWindowAdapter.m:
85         (+[CarbonWindowAdapter initialize]):
86         (-[CarbonWindowAdapter finalize]):
87         * History/WebBackForwardList.mm:
88         (+[WebBackForwardList initialize]):
89         (-[WebBackForwardList finalize]):
90         * History/WebHistoryItem.mm:
91         (+[WebHistoryItem initialize]):
92         * Misc/WebElementDictionary.mm:
93         (+[WebElementDictionary initialize]):
94         (-[WebElementDictionary finalize]):
95         * Plugins/WebBaseNetscapePluginStream.m:
96         (+[WebBaseNetscapePluginStream initialize]):
97         (-[WebBaseNetscapePluginStream finalize]):
98         * Plugins/WebBaseNetscapePluginView.mm:
99         (+[WebBaseNetscapePluginView initialize]):
100         (-[WebBaseNetscapePluginView finalize]):
101         * Plugins/WebBasePluginPackage.m:
102         (+[WebBasePluginPackage initialize]):
103         (-[WebBasePluginPackage finalize]):
104         * Plugins/WebNetscapePluginStream.mm:
105         (-[WebNetscapePluginStream finalize]):
106         * WebCoreSupport/WebEditorClient.mm:
107         (+[WebEditCommand initialize]):
108         (-[WebEditCommand finalize]):
109         * WebCoreSupport/WebFrameBridge.mm:
110         (+[WebFrameBridge initialize]):
111         (-[WebFrameBridge finalize]):
112         * WebCoreSupport/WebFrameLoaderClient.mm:
113         (+[WebFramePolicyListener initialize]):
114         (-[WebFramePolicyListener finalize]):
115         * WebView/WebHTMLView.mm:
116         (+[WebHTMLView initialize]):
117         (-[WebHTMLView finalize]):
118         * WebView/WebView.mm:
119         (+[WebViewPrivate initialize]):
120         (-[WebViewPrivate finalize]):
121
122 2007-02-20  Justin Garcia  <justin.garcia@apple.com>
123
124         Reviewed by darin
125         
126         <rdar://problem/4838199>
127         Integrate Mail and WebKit paste operations
128         
129         Mail overrides paste: because it has different
130         preferred pasteboard types, but it should use our
131         fragment creation code.
132
133         * WebView/WebHTMLView.mm:
134         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
135         Moved fragment creation code into a new method.
136         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:]):
137         Moved fragment creation code here.
138         * WebView/WebHTMLViewPrivate.h: Exposed 
139         _documentFragmentFromPasteboard:forType:inContext: as SPI.
140
141 2007-02-20  John Sullivan  <sullivan@apple.com>
142
143         Reviewed by Tim Hatcher
144
145         * Misc/WebKitNSStringExtras.h:
146         * Misc/WebKitNSStringExtras.m:
147         removed _webkit_userVisibleBundleVersionFromFullVersion; we decided to do this without
148         adding SPI for it.
149
150         * WebView/WebView.mm:
151         (-[WebView _userVisibleBundleVersionFromFullVersion:]):
152         new method, moved here from WebKitNSStringExtras, and is now a WebView method rather than
153         an NSString method
154         (-[WebView _computeUserAgent]):
155         updated for method signature change
156
157 2007-02-20  Timothy Hatcher  <timothy@apple.com>
158
159         Reviewed by John.
160
161         * Misc/WebKitNSStringExtras.h: Added _webkit_userVisibleBundleVersionFromFullVersion.
162         * Misc/WebKitNSStringExtras.m:
163         (-[NSString _webkit_userVisibleBundleVersionFromFullVersion]): If the version is 4 digits long or longer,
164         then the first digit represents the version of the OS. Our user agent string should not
165         include this first digit, so strip it off and report the rest as the version.
166         * WebView/WebView.mm:
167         (-[WebView _computeUserAgent]): Call _webkit_userVisibleBundleVersionFromFullVersion on the CFBundleVersion.
168
169 2007-02-20  Darin Adler  <darin@apple.com>
170
171         Reviewed by Anders.
172
173         * Plugins/WebPluginController.mm: (-[WebPluginController pluginView:receivedResponse:]):
174         Call cancelMainResourceLoad on the document loader instead of the frame loader.
175
176 2007-02-20  Anders Carlsson  <acarlsson@apple.com>
177
178         Reviewed by Mitz.
179
180         <rdar://problem/5009627> REGRESSION: Repro overrelease of WebView in failed load, seen in DumpRenderTree
181         
182         * WebView/WebView.mm:
183         (-[WebView _removeObjectForIdentifier:]):
184         Return early if the identifier can't be found in the map.
185
186 2007-02-19  Timothy Hatcher  <timothy@apple.com>
187
188         Reviewed by Darin Adler.
189
190         <rdar://problem/4841078> Remove the Mail.app editable link clicking behavior workaround when it is no longer needed
191
192         * WebKit.xcodeproj/project.pbxproj:
193         * WebView/WebView.mm:
194         (-[WebView setPreferences:]):
195
196 2007-02-19  Anders Carlsson  <acarlsson@apple.com>
197
198         Reviewed by Adam.
199
200         <rdar://problem/4868242>
201         http://bugs.webkit.org/show_bug.cgi?id=12670
202         REGRESSION: Many 3rd Party Apps crash in WebCore::DocumentLoader::frameLoader() (12670)
203         
204         Bring back the semantic we had that a web view should be retained for as long as something is loading. Use the identifier
205         to object hash map for this.
206
207         * WebView/WebView.mm:
208         (-[WebView _addObject:forIdentifier:]):
209         (-[WebView _removeObjectForIdentifier:]):
210
211 2007-02-18  Brady Eidson  <beidson@apple.com>
212
213         Reviewed by Oliver
214
215         <rdar://problem/4985321> - Can't edit templates for Web Gallery/Web Page Export in Aperture
216
217         * Misc/WebKitVersionChecks.h: Add a #define for this APERTURE quirk
218         * WebView/WebView.mm:
219         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
220          If the current app is Aperture and it was linked against Tiger WebKit, always allow selection change
221
222 2007-02-17  Lars Knoll <lars@trolltech.com>
223
224         Reviewed by Maciej.
225
226         Additional coding by Maciej, additional review by Oliver.
227
228         Added implementations for the new callbacks in EditorClient
229         and ChromeClient (basically moved from WebFrameBridge).
230         Cleaned up some code paths that are not called anymore
231         and done fully inside WebCore now.
232
233         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
234         * Misc/WebElementDictionary.mm:
235         * Misc/WebNSAttributedStringExtras.mm:
236         * Plugins/WebBaseNetscapePluginView.mm:
237         (-[WebBaseNetscapePluginView getVariable:value:]):
238         * Plugins/WebNetscapePluginEmbeddedView.mm:
239         * Plugins/WebNetscapePluginStream.mm:
240         * Plugins/WebPluginContainerCheck.mm:
241         * WebCoreSupport/WebChromeClient.h:
242         * WebCoreSupport/WebChromeClient.mm:
243         (WebChromeClient::shouldInterruptJavaScript):
244         * WebCoreSupport/WebEditorClient.h:
245         * WebCoreSupport/WebEditorClient.mm:
246         (WebEditorClient::shouldChangeSelectedRange):
247         * WebCoreSupport/WebFrameBridge.mm:
248         (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
249         (-[WebFrameBridge fini]):
250         * WebCoreSupport/WebFrameLoaderClient.mm:
251         * WebView/WebArchiver.mm:
252         * WebView/WebFrame.mm:
253         (core):
254         (kit):
255         (-[WebFrame _updateBackground]):
256         * WebView/WebFrameInternal.h:
257         * WebView/WebFrameView.mm:
258         * WebView/WebHTMLRepresentation.mm:
259         * WebView/WebHTMLView.mm:
260         (-[WebHTMLView _updateMouseoverWithEvent:]):
261         (-[WebHTMLView _isEditable]):
262         (-[WebHTMLView validateUserInterfaceItem:]):
263         (-[WebHTMLView maintainsInactiveSelection]):
264         (-[WebHTMLView scrollWheel:]):
265         (-[WebHTMLView acceptsFirstMouse:]):
266         (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
267         (-[WebHTMLView cut:]):
268         (-[WebHTMLView paste:]):
269         (-[WebHTMLView selectedAttributedString]):
270         * WebView/WebScriptDebugDelegate.mm:
271         * WebView/WebView.mm:
272         (-[WebView _dashboardRegions]):
273         (-[WebView setProhibitsMainFrameScrolling:]):
274         (-[WebView _setInViewSourceMode:]):
275         (-[WebView _inViewSourceMode]):
276         (-[WebView shouldClose]):
277         (-[WebView setEditable:]):
278
279 2007-02-18  Oliver Hunt  <oliver@apple.com>
280
281         Reviewed by Adam.
282
283         Moving the drag initiation logic to WebCore.
284         The redundant code in webkit will be moved out in a later patch.
285
286         * WebCoreSupport/WebDragClient.h:
287         * WebCoreSupport/WebDragClient.mm:
288         (getTopHTMLView):
289           Helper function
290         (WebDragClient::willPerformDragSourceAction):
291         (WebDragClient::startDrag):
292         (WebDragClient::createDragImageForLink):
293           Implemented new DragClient methods
294         (WebDragClient::declareAndWriteDragImage):
295           Helper function for the Mac to allow new drag and drop
296           code to match behaviour
297           
298         * WebView/WebHTMLView.mm:
299         (-[WebHTMLView _dragImageForURL:withLabel:]):
300         (-[WebHTMLView _dragImageForLinkElement:]):
301           Refactoring old _dragImageForLinkElement function so that 
302           the link drag image can be created with just a URL and label, 
303           rather than requiring the original element
304         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
305           Removed logic that is no longer necessary                 
306         (-[WebHTMLView _mouseDownEvent]):
307           The WebDragClient may need the original mouseDownEvent of a drag when initiating
308           a drag
309         * WebView/WebHTMLViewInternal.h:
310           Declaring _mouseDownEvent
311
312         * WebView/WebHTMLViewPrivate.h:
313           Declaring _dragImageForURL
314
315 2007-02-16  John Sullivan  <sullivan@apple.com>
316
317         Reviewed by Tim Hatcher
318
319         - fixed <rdar://problem/4811446> "Check Grammar" checkbox in Spelling+Grammar window doesn't 
320         live update with menu change in WebKit
321
322         * WebView/WebView.mm:
323         (-[WebView setGrammarCheckingEnabled:]):
324         Use sekrit AppKit knowledge to tell NSSpellChecker about the change, since there's no API
325         for this yet. Also restructured a little to avoid extra work when the value hasn't changed.
326
327 2007-02-15  Brady Eidson  <beidson@apple.com>
328
329         Reviewed by Adam
330
331         Save scroll state for back/forward navigation in FrameLoader, not the client
332
333         * WebCoreSupport/WebFrameLoaderClient.h: Renamed the save/restore methods
334         * WebCoreSupport/WebFrameLoaderClient.mm:
335         (WebFrameLoaderClient::saveViewStateToItem): Save viewstate only
336         (WebFrameLoaderClient::restoreViewState): Restore viewstate only
337
338 2007-02-14  Alexey Proskuryakov  <ap@webkit.org>
339
340         Reviewed by Darin.
341
342         http://bugs.webkit.org/show_bug.cgi?id=12643
343         NPN_Status is using latin-1 encoding for the message instead of UTF-8
344
345         * Plugins/WebBaseNetscapePluginView.mm:
346         (-[WebBaseNetscapePluginView status:]): Check for possible conversion failure.
347
348 2007-02-13  Oliver Hunt  <oliver@apple.com>
349
350         Reviewed by John.
351
352         Modify entry point ASSERTs for dragging functions to allow for the case
353         where a load has occurred mid-drag.  The load may detach the HTMLView 
354         from the WebView so it is no longer possible to check _isTopHTMLView.
355
356         The assertion changes match that of revision 14897 which fixed the 
357         more common case ([WebHTMLView draggedImage:endedAt:operation:])
358
359         It's also necessary to check for a null Page now prior to accessing 
360         the DragController, which is necessary in all of these methods.
361
362         See rdar://problem/4994870
363                                              
364         * WebView/WebHTMLView.mm:
365         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
366         (-[WebHTMLView draggedImage:movedTo:]):
367         (-[WebHTMLView draggedImage:endedAt:operation:]):
368         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
369
370 2007-02-13  Alexey Proskuryakov  <ap@webkit.org>
371
372         Reviewed by Maciej.
373
374         http://bugs.webkit.org/show_bug.cgi?id=12643
375         NPN_Status is using latin-1 encoding for the message instead of UTF-8
376
377         * Plugins/WebBaseNetscapePluginView.mm:
378         (-[WebBaseNetscapePluginView status:]): Use kCFStringEncodingUTF8.
379
380 2007-02-13  Mark Rowe  <mrowe@apple.com>
381
382         Reviewed by Timothy Hatcher.
383
384         Fix http://bugs.webkit.org/show_bug.cgi?id=12745
385         Bug 12745: REGRESSION: Webkit will not load a plugin that Safari can load (symbol missing _objc_msgSend_fpret)
386
387         Treat libobjc as a sub-library of WebKit in Debug/Release so that plugins and applications linked against an
388         umbrella framework version of WebKit that expect to find libobjc symbols in WebKit can do so.
389
390         * WebKit.xcodeproj/project.pbxproj:
391
392 2007-02-12  Kevin McCullough  <kmccullough@apple.com>
393
394         Reviewed by .
395
396         - reverting change to not cause regressions and performance problems.
397
398         * Misc/WebNSAttributedStringExtras.mm:
399         (fileWrapperForElement):
400
401 2007-02-12  Darin Adler  <darin@apple.com>
402
403         Reviewed by Oliver.
404
405         - fix http://bugs.webkit.org/show_bug.cgi?id=12677
406           <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
407           a clause in kotoeri (12677)
408
409         - fix http://bugs.webkit.org/show_bug.cgi?id=12596
410           <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
411           navigating prediction window (12596)
412
413         - fix http://bugs.webkit.org/show_bug.cgi?id=10010
414           <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
415           Hangul inserts carriage return (10010)
416
417         - fix http://bugs.webkit.org/show_bug.cgi?id=12531
418           <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
419           latest nightly (r19336) (12531)
420
421         - fix http://bugs.webkit.org/show_bug.cgi?id=12539
422           <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
423           area moves to the previous page in history (12539)
424
425         * WebCoreSupport/WebEditorClient.h:
426         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::markedTextAbandoned):
427         Added.
428
429         * WebView/WebHTMLView.mm:
430         (-[WebHTMLView menuForEvent:]): Added explicit constructor needed now that the
431         function takes a const&.
432         (-[WebHTMLView becomeFirstResponder]): Removed fake event code, no longer needed
433         since advanceFocus now works fine with 0 for a DOM event.
434         (-[WebHTMLView _expandSelectionToGranularity:]): Changed to use the normal
435         selection controller function instead of selectRange.
436         (-[WebHTMLView insertTab:]): Changed to call bottleneck that receives the DOM
437         event.
438         (-[WebHTMLView insertBacktab:]): Ditto.
439         (-[WebHTMLView insertNewline:]): Ditto.
440         (-[WebHTMLView insertLineBreak:]): Ditto.
441         (-[WebHTMLView insertParagraphSeparator:]): Ditto.
442         (-[WebHTMLView insertNewlineIgnoringFieldEditor:]): Ditto.
443         (-[WebHTMLView insertTabIgnoringFieldEditor:]): Ditto.
444         (-[WebHTMLView yank:]): Updated to call Editor directly since the insertText
445         code now works via a text input event which is not what we want for paste-like
446         things such as yank.
447         (-[WebHTMLView yankAndSelect:]): Ditto.
448         (-[WebHTMLView selectToMark:]): Changed to use the normal selection controller
449         function instead of selectRange, which also allows us to remove the ObjC exception
450         handling code.
451         (-[WebHTMLView swapWithMark:]): Ditto.
452         (-[WebHTMLView transpose:]): Ditto.
453         (-[WebHTMLView unmarkText]): Since this is one of the calls back from the input
454         manager, added code to set the "event was handled" flag. Moved the actual work
455         into the Editor class in WebCore and just call that from here.
456         (-[WebHTMLView _selectRangeInMarkedText:]): Changed to use the normal selection
457         controller function instead of selectRange.
458         (-[WebHTMLView setMarkedText:selectedRange:]): Since this is one of the calls
459         back from the input manager, added code to set the "event was handled" flag.
460         Also changed the ignoreMarkedTextSelectionChange to use the flag over on the
461         WebCore side, since we moved it there and to call selectMarkedText over on
462         the WebCore side too.
463         (-[WebHTMLView doCommandBySelector:]): Added special cases for newline and tab
464         selectors so that the event is passed along. These selectors are special because
465         they are ones that turn into text input events.
466         (-[WebHTMLView _discardMarkedText]): Moved the body of this function into the
467         Editor class in WebCore and just call that from here.
468         (-[WebHTMLView insertText:]): Added code to send a text input event instead of
469         calling the editor to do text insertion. The insertion is then done in the
470         default handler for the text input event.
471         (-[WebHTMLView _insertNewlineWithEvent:isLineBreak:]): Added. Sends a text
472         input event.
473         (-[WebHTMLView _insertTabWithEvent:isBackTab:]): Ditto.
474         (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
475         ignoreMarkedTextSelectionChange flag in Editor now that the one here is gone.
476
477         * WebView/WebHTMLViewInternal.h: Remove ignoreMarkedTextSelectionChange field.
478
479         * WebView/WebView.mm: (-[WebView setSelectedDOMRange:affinity:]): Changed to
480         use the normal selection controller function instead of selectRange.
481
482 2007-02-11  Sam Weinig  <sam@webkit.org>
483
484         Reviewed by Mark.
485
486         Switch the initial value of box-sizing property from "border-box" to "content-box".
487
488         * WebInspector/webInspector/inspector.js:
489
490 2007-02-10  Mitz Pettel  <mitz@webkit.org>
491
492         Reviewed by Maciej.
493
494         - fix http://bugs.webkit.org/show_bug.cgi?id=11847
495           REGRESSION (SearchField): Dragging to select in the Web Inspector's search fields drags the inspector window
496
497         * WebInspector/webInspector/inspector.css: Added the search field to the
498         undraggable dashboard-region.
499
500 2007-02-09  Kevin Decker <kdecker@apple.com>
501
502         Reviewed by Darin & Maciej.
503
504         Fixed: <rdar://problem/4930688> REGRESSION: missing images when reloading webarchives (11962)
505         
506         * WebCoreSupport/WebFrameLoaderClient.mm:
507         (WebFrameLoaderClient::canUseArchivedResource): The bug here is that because a reload sets a cache
508         policy of NSURLRequestReloadIgnoringCacheData (rightfully so), this method was refusing to load
509         subresources in WebArchives. It's OK to use archive subresources for the NSURLRequestReloadIgnoringCacheData
510         cache policy because we're not worried about the actual contents of a WebArchive changing on disk. 
511
512 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
513
514         Reviewed by darin
515         
516         <rdar://problem/4975120>
517         REGRESSION: double-cursor after switching window away/back (11770)
518         <http://bugs.webkit.org/show_bug.cgi?id=11328>
519         Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
520
521         * WebCoreSupport/WebFrameBridge.mm: Removed unused methods.
522         * WebView/WebHTMLView.mm: Ditto.
523         (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Don't 
524         appear focused if a descendant view is firstResponder.
525         (-[WebHTMLView _updateActiveState]): Removed the check for a BOOL
526         that was always false.
527         * WebView/WebHTMLViewInternal.h: Removed a BOOL that's always false.
528
529 2007-02-09  Beth Dakin  <bdakin@apple.com>
530
531         Reviewed by Darin.
532
533         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
534         blinks when mouse is moved, and is invisible otherwise
535
536         Allow quirk if the Application was linked before 3.0 and if the 
537         application is Adobe Acrobat.
538
539         * Misc/WebKitVersionChecks.h:
540         * WebView/WebView.mm:
541         (-[WebView _updateWebCoreSettingsFromPreferences:]):
542
543 2007-02-09  Timothy Hatcher  <timothy@apple.com>
544
545         Reviewed by Brady.
546
547         * WebKit.exp: Add WebBaseNetscapePluginView to the export list.
548
549 2007-02-09  John Sullivan  <sullivan@apple.com>
550
551         Reviewed by Beth
552
553         - WebKit part of fix for radar 4939636, problems with context menu items and binaries linked
554           against WebKit 2.0.
555
556         * WebKit.xcodeproj/project.pbxproj:
557         Changed DYLIB_CURRENT_VERSION to 2 (was 1)
558
559         * Misc/WebKitVersionChecks.h:
560         Added constant WEBKIT_FIRST_VERSION_WITH_3_0_CONTEXT_MENU_TAGS, which is 2 but in the weird
561         format that these version checks use.
562
563         * WebView/WebUIDelegatePrivate.h:
564         Tweaked comments; included the old values for three tags for context menu items that changed
565         from SPI to API in 3.0; renamed WEBMENUITEMTAG_SPI_START to WEBMENUITEMTAG_WEBKIT_3_0_SPI_START 
566         for clarity, and bumped its value to avoid conflict with the three old values
567
568         * WebCoreSupport/WebContextMenuClient.mm:
569         (isAppleMail):
570         new helper function that checks the bundle identifier
571         (fixMenusToSendToOldClients):
572         Removed return value for clarity; now checks linked-on version and also makes special case
573         for Mail; now replaces three API tags with their old SPI values for clients that linked
574         against old WebKit version, in addition to replacing new API with WebMenuItemTagOther for
575         items that had no specific tag before.
576         (fixMenusReceivedFromOldClients):
577         Removed return value for clarity; removed defaultMenuItems parameter because it's no longer 
578         necessary; removed code that tried to recognize menus that got confused by the SPI -> API 
579         change (we now pass the old SPI values to these clients to avoid confusing them); now 
580         restores the tags for the items whose tags were replaced in fixMenusToSendToOldClients 
581         (this used to restore the tags of the default items rather than the new items, which was 
582         incorrect but happened to work since the clients we tested were using the objects from the
583         default items array in their new items array)
584         (WebContextMenuClient::getCustomMenuFromDefaultItems):
585         Updated to account for the removed return values for the two fix-up methods; moved the
586         autorelease of newItems here, which is clearer and was the source of a leak before.
587
588 2007-02-08  Kevin McCullough  <KMcCullough@apple.com>
589
590         Reviewed by
591
592         - fixing a build breakage. 
593
594         * Misc/WebNSAttributedStringExtras.mm:
595         (fileWrapperForElement):
596
597 2007-02-07  Charles Ying  <charles_ying@yahoo.com>
598
599         Reviewed by Adam.
600
601         Code suggestion by aroben
602         
603         Fix http://bugs.webkit.org/show_bug.cgi?id=12688
604
605         REGRESSION (r19469): ASSERT when right clicking on hyperlinks! in TOT webkit
606         
607         * WebCoreSupport/WebContextMenuClient.mm:
608         (fixMenusReceivedFromOldClients):
609
610         - fixMenusReceivedFromOldClients was hitting an ASSERT incorrectly
611         because it could not match [item title] to any of the contentMenuItemTags
612         using pointer comparison ==. Instead, it needs to do a string comparison
613         between [item title] and the various contentMenuItemTags using
614         isEqualToString instead of ==. You would encounter this whenever the
615         context menu was activated, e.g., from a hyperlink right click (or
616         control click).
617
618
619 2007-02-07  Anders Carlsson  <acarlsson@apple.com>
620
621         Reviewed by Maciej.
622
623         Move shouldInterruptJavaScript to the Chrome.
624         
625         * WebCoreSupport/WebChromeClient.h:
626         * WebCoreSupport/WebChromeClient.mm:
627         (WebChromeClient::shouldInterruptJavaScript):
628         * WebCoreSupport/WebFrameBridge.mm:
629
630 2007-02-07  John Sullivan  <sullivan@apple.com>
631
632         Reviewed by Kevin Decker
633
634         - fixed all places in WebKit where _web_userVisibleString was used where
635         _web_originalDataAsString should have been used instead.
636
637         * History/WebURLsWithTitles.m:
638         (+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]):
639         use _web_originalDataAsString when writing since these aren't displayed to the user
640         (+[WebURLsWithTitles URLsFromPasteboard:]):
641         use _web_URLWithDataAsString when reading, to match what we used when writing
642
643         * Misc/WebNSPasteboardExtras.mm:
644         (-[NSPasteboard _web_writeURL:andTitle:types:]):
645         use _web_originalDataAsString when writing the NSURL type; continue using
646         _web_userVisibleString when writing the plain text type
647
648         * WebView/WebHTMLView.mm:
649         (-[WebHTMLView _documentFragmentWithPaths:]):
650         added comment about why _web_userVisibleString is appropriate here
651         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
652         use _web_originalDataAsString when setting the href attribute of an anchor tag
653
654 2007-02-07  David Harrison  <harrison@apple.com>
655
656         Reviewed by Adam.
657
658         <rdar://problem/4943650> REGRESSION: insertion point blink redraws entire web page, making everything slow
659
660         Problem is that AppKit recently changed NSControl to trigger a full redraw if the control has a focus ring.
661         WebHTMLView is a subclass of NSControl, but the focus ring type was the default value, though we actually
662         draw no focus ring. Fix is to formally set our focus ring type.
663
664         * WebView/WebHTMLView.mm:
665         (-[WebHTMLView initWithFrame:]):
666         Send [self setFocusRingType:NSFocusRingTypeNone].
667
668 2007-02-07  John Sullivan  <sullivan@apple.com>
669
670         Undid changes that I hadn't intended to check in
671
672         * WebView/WebHTMLView.mm:
673         (-[WebHTMLView _documentFragmentWithPaths:]):
674         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
675
676 2007-02-07  John Sullivan  <sullivan@apple.com>
677
678         Reviewed by Ollie and Geoff
679
680         - fixed <rdar://problem/4982345> KURL::createCFURL leak inside -[WebFrameBridge startDraggingImage...] 
681         reported by buildbot
682
683         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
684         don't retain the imageURL we pass to the drag controller -- it's just automagically
685         converted to a KURL anyway
686
687 2007-02-07  John Sullivan  <sullivan@apple.com>
688
689         Reviewed by Darin
690
691         - fixed <rdar://problem/4974420> REGRESSION: Dragging a saved image into the browser window 
692         displays a error (No File exists at the address "null") (12662)
693
694         * WebCoreSupport/WebPasteboardHelper.mm:
695         (WebPasteboardHelper::urlFromPasteboard):
696         use _web_originalDataAsString instead of _web_userVisibleString, since _web_userVisibleString
697         can return a string with non-ASCII characters -- suitable for display but not for code
698
699 2007-02-07  John Sullivan  <sullivan@apple.com>
700
701         Reviewed by Darin
702
703         - added some clarity to some menu-handling shenanigans
704
705         * WebCoreSupport/WebContextMenuClient.mm:
706         (fixMenusToSendToOldClients):
707         renamed from fixMenusForOldClients; added comments, FIXME, and assertion
708         (fixMenusReceivedFromOldClients):
709         renamed from fixMenusFromOldClients; added comments, FIXME, and assertion
710         (WebContextMenuClient::getCustomMenuFromDefaultItems):
711         updated for name changes
712
713 2007-02-06  Kevin Decker <kdecker@apple.com>
714
715         Fixed: <rdar://problem/4976681> ASSERTION failure on quit @ talkcrunch.com in _NPN_ReleaseObject
716         
717         Reviewed by Anders.
718
719         * Plugins/WebPluginDatabase.m:
720         (+[WebPluginDatabase sharedDatabase]): Removed NSApplicationWillTerminateNotification observer and thus
721         also removed code that would unload the entire plug-in database when receiving that notification. 
722         
723         The bug here was that this notification callback would happen first before anything else thus unloading
724         plug-ins and releasing plug-in memory. That was crash prone because the JavaScriptCore collector would at
725         a later time attempt to release its CInstance references (references that point to plug-in memory)
726         without knowing WebKit already unloaded the plug-in out from underneath it. The WebPluginDatabase simply
727         does not have enough context to make this decision.
728         
729         * WebView/WebView.mm: Added two statics: applicationIsTerminating, pluginDatabaseClientCount.
730         (+[WebView initialize]): Added NSApplicationWillTerminateNotification observer.
731         (+[WebView _applicationWillTerminate]): Added. 
732         (-[WebView _close]): WebKit has both a global plug-in database and a separate, per WebView plug-in database. 
733          We need to release both sets of plug-ins because Netscape plug-ins have "destructor functions" that should be
734          called when the browser unloads the plug-in.  These functions can do important things, such as closing/deleting
735          files so it is important to ensure that they are properly called when the application terminates.
736          
737          The new change is that on app shutdown, we unload WebKit's global plug-in database if and only if the last WebView
738          was closed. To do so otherwise would unload plug-ins out from underneath other WebViews.
739          
740 2007-02-06  Darin Adler  <darin@apple.com>
741
742         Reviewed by John Sullivan.
743
744         - fix http://bugs.webkit.org/show_bug.cgi?id=11080
745           <rdar://problem/4826648> REGRESSION: Incorrect vertical positioning of Safari
746           status bar text containing @ character (11080)
747
748         * Misc/WebKitNSStringExtras.m:
749         (canUseFastRenderer): Fix code that mistakenly used the slow renderer for strings
750         that have a direction of "other neutral", which includes the "@" character.
751         (-[NSString _web_drawAtPoint:font:textColor:]): Add code to make the baseline of
752         the text in the status bar right. AppKit's rule for rounding is complicated enough
753         that this is obviously not perfectly correct, but it does make both code paths
754         use the same baseline in all the places this is currently used in AppKit.
755
756 2007-02-06  Darin Adler  <darin@apple.com>
757
758         Spotted by Steve F.
759
760         * Misc/WebNSURLExtras.m:
761         (-[NSString _web_mapHostNameWithRange:encode:makeString:]):
762         Fix obvious logic mistake I introduced back in revision 8255.
763         I can't see how to exercise this code path, but I also can't
764         bear to leave this obviously-broken code as-is.
765
766 2007-02-05  David Kilzer  <ddkilzer@webkit.org>
767
768         Reviewed by Darin.
769
770         http://bugs.webkit.org/show_bug.cgi?id=7266
771         Webarchive format saves duplicate WebSubresources to .webarchive file
772
773         Tests: webarchive/test-duplicate-resources.html
774                webarchive/test-frameset.html
775
776         * WebView/WebArchiver.mm:
777         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]): Use an NSMutableSet to prevent
778         duplicate subresources from being added to the webarchive.
779
780 2007-02-06  Mark Rowe  <mrowe@apple.com>
781
782         Roll out incomplete support for font-stretch (r19350) at Dave Hyatt's request.
783         See http://bugs.webkit.org/show_bug.cgi?id=12530#c9 for more info.
784
785         * WebInspector/webInspector/inspector.js:
786         * WebView/WebHTMLView.mm:
787         (-[WebHTMLView _addToStyle:fontA:fontB:]):
788
789 2007-02-05  Beth Dakin  <bdakin@apple.com>
790
791         Reviewed by Adam.
792
793         Fix for <rdar://problem/4975161> REGRESSION: With BumperCar 2.1.1, 
794         the contextual menu fails to appear when I ctrl-click on page
795
796         * WebCoreSupport/WebContextMenuClient.mm:
797         (WebContextMenuClient::getCustomMenuFromDefaultItems): If the 
798         delegate does not respond to contextMenuItemsForElement, return the 
799         default menu instead of nil.
800
801 2007-02-01  Geoffrey Garen  <ggaren@apple.com>
802
803         Reviewed by Maciej Stachowiak.
804         
805         Added support for selectively ignoring WebCore::Node leaks during layout
806         tests, so that we can ignore known leaks in other components.
807
808         * Misc/WebCoreStatistics.h:
809         * Misc/WebCoreStatistics.mm:
810         (+[WebCoreStatistics startIgnoringWebCoreNodeLeaks]):
811         (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
812
813 2007-02-01  Nicholas Shanks  <webkit@nickshanks.com>
814
815         Reviewed by Mark.
816
817         Add support for CSS2 font-stretch property.
818
819         * WebInspector/webInspector/inspector.js:
820         * WebView/WebHTMLView.mm:
821         (-[WebHTMLView _addToStyle:fontA:fontB:]):
822
823 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
824
825         Reviewed by Adam.
826         
827         <rdar://problem/4730469> REGRESSION: Assertion failure in -[WebDataSource(WebInternal) _bridge] when forwarding message
828
829         * WebView/WebDataSource.mm:
830         (-[WebDataSource subresources]): Check for being uncommitted and return emtpy result.
831         (-[WebDataSource subresourceForURL:]): ditto
832
833 2007-01-31  Oliver Hunt  <oliver@apple.com>
834
835         Reviewed by Adam.     
836
837         Migrating methods to WebCore
838
839         * WebCoreSupport/WebFrameBridge.mm:
840         * WebView/WebHTMLView.mm:
841         * WebView/WebHTMLViewPrivate.h:
842
843 2007-01-31  Anders Carlsson  <acarlsson@apple.com>
844
845         Reviewed by Maciej.
846
847         <rdar://problem/4886776>
848         REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file
849         
850         "Revert" the change done in 13734.
851         
852         * WebView/WebHTMLRepresentation.mm:
853         (-[WebHTMLRepresentation loadArchive]):
854         Don't do a new load here, as this would cancel the current load and call the resource load
855         delegate's didFailLoadingWithError: method. Instead, call continueLoadWithData.
856
857 2007-02-01  Nikolas Zimmermann  <zimmermann@kde.org>
858
859         Reviewed by Maciej.
860
861         Fix run-pageloadtest to actually work again.
862
863         * Misc/WebNSWindowExtras.m:
864         (+[NSWindow _webkit_displayThrottledWindows]):
865
866 2007-01-31  Adele Peterson  <adele@apple.com>
867
868         Reviewed by Darin.
869
870         WebKit part of fix for <rdar://problem/4521461> REGRESSION: when keyPress event changes form focus, inserted key goes to wrong control
871
872         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): Instead of using the selected frame, use the
873           frame for the target of the keyboard event.  Also, don't do the canEdit check here, since the target's frame might not
874           have a selection at this point.  Do the canEdit check within Editor::insertText, where we determine which selection to use
875           for inserting text.
876         * WebView/WebEditingDelegatePrivate.h: Added forward declaration of DOMHTMLElement. This is needed after reordering includes in WebEditorClient.mm.
877
878 2007-01-31  Alice Liu  <alice.liu@apple.com>
879
880         Reviewed by Tim Hatcher.
881
882         Turning an accidental API change to an SPI change
883
884         * WebView/WebEditingDelegate.h:
885         * WebView/WebEditingDelegatePrivate.h:
886         move some declarations into private header.  
887
888 2007-01-31  Darin Adler  <darin@apple.com>
889
890         - fix build
891
892         * ForwardingHeaders/wtf/ListHashSet.h: Added.
893
894 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
895
896         Reviewed by Anders.
897
898         - related fix for <rdar://problem/4964407> REGRESSION: Mail hangs when replying, forwarding , or creating a new message
899         
900         * WebView/WebFrame.mm:
901         (-[WebFrame loadArchive:]): This method also needs to add the lame WebDataRequest property or other things, like
902         Mail Contents of Page, break.
903
904 2007-01-31  Maciej Stachowiak  <mjs@apple.com>
905
906         Reviewed by Eric.
907         
908         - add back no-op version of silly method so that shipping Safari can still run the PLT
909
910         * Misc/WebNSWindowExtras.m:
911         (-[NSWindow _webkit_displayThrottledWindows]):
912
913 2007-01-31  Mark Rowe  <mrowe@apple.com>
914
915         More build fixing.
916
917         * Misc/WebKitLogging.h: Use !defined() rather than !.
918         * Plugins/WebNetscapePluginStream.h: Remove #if __cplusplus as this file is only included from Obj-C++ files.
919         * WebView/WebHTMLView.mm:
920         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Use #ifdef rather than #if.
921         * WebView/WebView.mm:
922         (-[WebView isGrammarCheckingEnabled]): Ditto.
923
924 2007-01-31  Mark Rowe  <mrowe@apple.com>
925
926         Build fix.
927
928         * WebView/WebView.mm:
929         (-[WebView initWithFrame:frameName:groupName:]):
930
931 2007-01-31  Mark Rowe  <mrowe@apple.com>
932
933         Reviewed by Oliver.
934
935         Enable -Wundef in WebKit, and change misuses of #if to #ifdef or #ifndef as appropriate.
936
937         * Misc/WebKitLogging.h:
938         * WebKit.xcodeproj/project.pbxproj:
939         * WebView/WebFrame.mm:
940         * WebView/WebFrameInternal.h:
941         * WebView/WebHTMLView.mm:
942         (-[WebHTMLView validateUserInterfaceItem:]):
943         (-[WebHTMLView delete:]):
944         (-[WebHTMLView showGuessPanel:]):
945         (-[WebHTMLView copy:]):
946         (-[WebHTMLView cut:]):
947         (-[WebHTMLView paste:]):
948         * WebView/WebHTMLViewInternal.h:
949         * WebView/WebView.mm:
950         (-[WebViewPrivate init]):
951         (-[WebView validateUserInterfaceItem:]):
952         * WebView/WebViewPrivate.h:
953
954 2007-01-30  Brady Eidson  <beidson@apple.com>
955
956         Reviewed by Oliver
957
958         This is a corollary to <rdar://problem/4944887> where certain things happened on an alternate thread.
959         To help catch such behavior in the future, add ASSERT_MAIN_THREAD() to key WebKit API points
960
961         * History/WebHistoryItem.mm: Added ASSERT_MAIN_THREAD() to suspected API entry points
962         (-[WebHistoryItem dealloc]):
963         (-[WebHistoryItem finalize]):
964         (-[WebHistoryItem copyWithZone:]):
965         (-[WebHistoryItem URLString]):
966         (-[WebHistoryItem originalURLString]):
967         (-[WebHistoryItem title]):
968         (-[WebHistoryItem lastVisitedTimeInterval]):
969         (-[WebHistoryItem isEqual:]):
970         (-[WebHistoryItem description]):
971         (-[WebHistoryItem initWithWebCoreHistoryItem:]):
972         (-[WebHistoryItem initFromDictionaryRepresentation:]):
973         (-[WebHistoryItem scrollPoint]):
974         (-[WebHistoryItem dictionaryRepresentation]):
975         (-[WebHistoryItem target]):
976         (-[WebHistoryItem visitCount]):
977         (-[WebHistoryItem children]):
978         (-[WebHistoryItem URL]):
979         (-[WebHistoryItem _lastVisitedDate]):
980         (-[WebHistoryItem targetItem]):
981
982         * Misc/WebIconDatabase.mm: Added ASSERT_MAIN_THREAD() to suspected API entry points
983         (-[WebIconDatabase iconForURL:withSize:cache:]):
984         (-[WebIconDatabase iconURLForURL:]):
985         (-[WebIconDatabase defaultIconWithSize:]):
986         (-[WebIconDatabase retainIconForURL:]):
987         (-[WebIconDatabase releaseIconForURL:]):
988         (-[WebIconDatabase removeAllIcons]):
989         (-[WebIconDatabase _iconForFileURL:withSize:]):
990         (webGetNSImage):
991
992         * Misc/WebKitLogging.h: Added ASSERT_MAIN_THREAD()
993         * Misc/WebKitLogging.m:
994         (WebKitRunningOnMainThread): Added
995
996         * WebKit.xcodeproj/project.pbxproj: Define DISABLE_THREAD_CHECK until it is
997           safe to run with ASSERT_MAIN_THREAD() active
998
999 2007-01-30  Timothy Hatcher  <timothy@apple.com>
1000
1001         Reviewed by Darin.
1002
1003         <rdar://problem/4961953> Stop using NSString deprecated methods like initWithCString:
1004
1005         * Misc/WebNSImageExtras.m:
1006         (-[NSImage _web_saveAndOpen]):
1007         * WebKit.xcodeproj/project.pbxproj:
1008
1009 2007-01-30  Mitz Pettel  <mitz@webkit.org>
1010
1011         Reviewed by Geoff.
1012
1013         - fix http://bugs.webkit.org/show_bug.cgi?id=12050
1014           REGRESSION: Assertion failure in -[WebBaseNetscapePluginView willCallPlugInFunction] (plugin)
1015
1016         Test: plugins/createScriptableObject-before-start.html
1017
1018         * Plugins/WebBaseNetscapePluginView.mm:
1019         (-[WebBaseNetscapePluginView createPluginScriptableObject]): Return NULL if
1020         the plugin is not started.
1021
1022 2007-01-30  Maciej Stachowiak  <mjs@apple.com>
1023
1024         Reviewed by Anders.
1025         
1026         <rdar://problem/4964407> REGRESSION: Mail hangs when replying, forwarding , or creating a new message
1027         
1028         * WebView/WebFrame.mm:
1029         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Set WebDataRequest property on data
1030         load requests since Mail specifically checks for this.
1031
1032 2007-01-30  Graham Dennis  <graham.dennis@gmail.com>
1033
1034         Reviewed by Maciej.
1035
1036         Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
1037         Image data in from RTFD clipboard data thrown away
1038         
1039         The URLs for images in RTFD data must not be loaded until the resources
1040         have been added to the WebUnarchivingState. This can't happen until
1041         after the RTFD data has been parsed, so we must delay loading while this
1042         RTFD data is being parsed to a document fragment.
1043
1044         * WebView/WebHTMLView.mm:
1045         (uniqueURLWithRelativePart):
1046         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]): defer loading the resources while RTFD data is being parsed.
1047         (+[NSURL _web_uniqueWebDataURL]): Added this back because AppKit uses it.
1048         * WebView/WebUnarchivingState.m:
1049         (-[WebUnarchivingState archivedResourceForURL:]): orkaround for workaround for rdar://problem/4699166 so that other people can use archivedResourceForURL: too.
1050
1051 2007-01-29  Jim Correia  <jim.correia@pobox.com>
1052
1053         Reviewed by Mark.
1054
1055         Added support for -allowsUndo/-setAllowsUndo: to allow editable WebView
1056         clients to completely disable undo registration. This is functionally
1057         equivalent to the methods with the same names on NSTextView.
1058
1059         * WebView/WebView.mm:
1060         (-[WebViewPrivate init]):
1061         (-[WebView initWithCoder:]):
1062         (-[WebView encodeWithCoder:]):
1063         (-[WebView allowsUndo]):
1064         (-[WebView setAllowsUndo:]):
1065         (-[WebView undoManager]):
1066         * WebView/WebViewPrivate.h:
1067
1068 2007-01-29  Ada Chan  <adachan@apple.com>
1069
1070         Reviewed by Brady.
1071
1072         Moved the update of the title of the current entry in the backforward list to WebCore.
1073
1074         * WebCoreSupport/WebFrameLoaderClient.mm:
1075         (WebFrameLoaderClient::setTitle):
1076
1077 2007-01-29  Adele Peterson  <adele@apple.com>
1078
1079         Reviewed by Darin.
1080
1081         More preparation for event handling fixes.
1082
1083         * WebCoreSupport/WebEditorClient.h: Removed EventTargetNode parameter, since you can
1084           just get this from the KeyboardEvent.
1085         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): ditto.
1086
1087         * WebView/WebHTMLViewInternal.h: Added interpretKeyEventsParameters struct.
1088         * WebView/WebViewInternal.h: Changed parameter from NSEvent to WebCoreKeyboardEvent in _interceptEditingKeyEvent.
1089         * WebView/WebHTMLView.mm:
1090         (-[WebHTMLView yankAndSelect:]): Updated for new triggeringEvent parameter.
1091         (-[WebHTMLView _interceptEditingKeyEvent:]): Set the WebHTMLViewInterpretKeyEventsParameters.
1092         (-[WebHTMLView doCommandBySelector:]): Access WebHTMLViewInterpretKeyEventsParameters.
1093         (-[WebHTMLView insertText:]): ditto.
1094         (-[WebHTMLView _insertText:selectInsertedText:triggeringEvent:]): Added parameter for triggeringEvent.
1095
1096 2007-01-29  Oliver Hunt  <oliver@apple.com>
1097
1098         build fix  
1099
1100         * WebView/WebHTMLView.mm:
1101         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1102
1103 2007-01-25  Oliver Hunt  <oliver@apple.com>
1104
1105         Reviewed by Adam.
1106
1107         Migrated drag state and logic to WebCore, removed superfluous methods
1108
1109         * ChangeLog:
1110         * WebCoreSupport/WebDragClient.h:
1111         * WebCoreSupport/WebDragClient.mm:
1112         (WebDragClient::dragSourceActionMaskForPoint):
1113         * WebCoreSupport/WebFrameBridge.mm:
1114            allowDHTMLDrag move to WebCore::EventHandler
1115         * WebView/WebHTMLView.mm:
1116         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1117         (-[WebHTMLView draggedImage:movedTo:]):
1118         (-[WebHTMLView draggedImage:endedAt:operation:]):
1119           dragOffset and dragSourecAction is now stored in WebCore::DragController
1120           migrated _delegateDragSourceActionMask to WebCore::DragController
1121         * WebView/WebHTMLViewInternal.h:
1122           Removed dragOffset declaration, migrated to WebCore::DragController
1123         * WebView/WebView.mm:
1124           removed unnecessary method, _loadingDragOperationForDraggingInfo
1125
1126 2007-01-29  Maciej Stachowiak  <mjs@apple.com>
1127
1128         Reviewed by Mark.
1129
1130         - updated for cross-platform data loading support
1131         
1132         * WebCoreSupport/WebFrameLoaderClient.h:
1133         * WebCoreSupport/WebFrameLoaderClient.mm:
1134         (WebFrameLoaderClient::createDocumentLoader):
1135         * WebView/WebDataSource.mm:
1136         (-[WebDataSource initWithRequest:]):
1137         * WebView/WebDocumentLoaderMac.h:
1138         * WebView/WebDocumentLoaderMac.mm:
1139         (WebDocumentLoaderMac::WebDocumentLoaderMac):
1140         * WebView/WebFrame.mm:
1141         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1142         (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]):
1143         (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]):
1144         (-[WebFrame loadArchive:]):
1145         * WebView/WebFrameInternal.h:
1146         * WebView/WebHTMLView.mm:
1147         (uniqueURLWithRelativePart):
1148         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
1149
1150 2007-01-27  David Kilzer  <ddkilzer@webkit.org>
1151
1152         Reviewed by Adam.
1153
1154         - fix http://bugs.webkit.org/show_bug.cgi?id=12260
1155           Windows platform build is not maintained
1156
1157         * COM/ChromeClientWin.cpp:
1158         (ChromeClientWin::canTakeFocus):
1159         (ChromeClientWin::takeFocus):
1160         * COM/ChromeClientWin.h:
1161         * COM/ContextMenuClientWin.cpp:
1162         (ContextMenuClientWin::getCustomMenuFromDefaultItems):
1163         (ContextMenuClientWin::searchWithGoogle):
1164         * COM/ContextMenuClientWin.h:
1165         * COM/WebFrameLoaderClient.cpp:
1166         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
1167         (WebFrameLoaderClient::dispatchWillSendRequest):
1168         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
1169         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
1170         (WebFrameLoaderClient::dispatchDidReceiveResponse):
1171         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
1172         (WebFrameLoaderClient::dispatchDidFinishLoading):
1173         (WebFrameLoaderClient::dispatchDidFailLoading):
1174         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
1175         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1176         (WebFrameLoaderClient::dispatchDidFailLoad):
1177         (WebFrameLoaderClient::dispatchCreatePage):
1178         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1179         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1180         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1181         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
1182         (WebFrameLoaderClient::setMainDocumentError):
1183         (WebFrameLoaderClient::incrementProgress):
1184         (WebFrameLoaderClient::completeProgress):
1185         (WebFrameLoaderClient::startDownload):
1186         (WebFrameLoaderClient::committedLoad):
1187         (WebFrameLoaderClient::cancelledError):
1188         (WebFrameLoaderClient::cannotShowURLError):
1189         (WebFrameLoaderClient::interruptForPolicyChangeError):
1190         (WebFrameLoaderClient::cannotShowMIMETypeError):
1191         (WebFrameLoaderClient::fileDoesNotExistError):
1192         (WebFrameLoaderClient::shouldFallBack):
1193         (WebFrameLoaderClient::willUseArchive):
1194         (WebFrameLoaderClient::createDocumentLoader):
1195         (WebFrameLoaderClient::download):
1196         * COM/WebFrameLoaderClient.h:
1197
1198 2007-01-27  David Harrison  <harrison@apple.com>
1199
1200         Reviewed by Kevin.
1201
1202         <rdar://problem/4958902> REGRESSION: Dashboard widgets fail to load
1203         
1204         This was caused by the WebView preferences rework in r18417. Specifically, in
1205         _updateWebCoreSettingsFromPreferences when calling setUserStyleSheetLocation,
1206         [NSURL URLWithString:] is now messaged directly with the result of
1207         [[preferences userStyleSheetLocation] _web_originalDataAsString]], which will
1208         be nil if the userStyleSheetLocation has not been set yet. [NSURL URLWithString:]
1209         throws an exception when the string is nil. DashboardClient.app calls
1210         setUserStyleSheetEnabled *before* calling setUserStyleSheetLocation.
1211
1212         * WebView/WebView.mm:
1213         (-[WebView _updateWebCoreSettingsFromPreferences:]):
1214         Pass empty string instead of nil string to [NSURL URLWithString:].
1215
1216 2007-01-26  Darin Adler  <darin@apple.com>
1217
1218         Reviewed by Timothy.
1219
1220         Fixes crash drawing avatar on mail.yahoo.com.
1221
1222         * Plugins/WebBaseNetscapePluginStream.m: Retain the object since destroyStreamWithError: might
1223         release the last reference to it.
1224
1225 2007-01-26  Darin Adler  <darin@apple.com>
1226
1227         Reviewed by Beth.
1228
1229         * WebInspector/webInspector/inspector.js: Updated for new computed style properties.
1230
1231 2007-01-26  Kevin Decker <kdecker@apple.com>
1232
1233         Reviewed by andersca.
1234
1235         Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
1236         http://bugs.webkit.org/show_bug.cgi?id=11523
1237
1238         * Plugins/WebBaseNetscapePluginStream.m:
1239        (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView disconnectStream:]
1240         * Plugins/WebBaseNetscapePluginView.h: Added disconnectStream: to header.
1241         * Plugins/WebBaseNetscapePluginView.mm:
1242         (-[WebBaseNetscapePluginView stop]): Make a copy of the streams collection prior to calling stop all streams.
1243         This is necessary because calling stop has the side effect of removing the stream from this same collection.
1244         (-[WebBaseNetscapePluginView disconnectStream:]): Added. Removes the stream from the streams collection.
1245
1246 2007-01-25  Kevin Decker <kdecker@apple.com>
1247
1248         Backed out my last patch because it crashes espn.com. Stay tuned for a newer version..
1249
1250         * Plugins/WebBaseNetscapePluginStream.m:
1251         (-[WebBaseNetscapePluginStream setPlugin:]): Removed call to streamIsDead.
1252         * Plugins/WebBaseNetscapePluginView.h: Removed streamIsDead.
1253         * Plugins/WebBaseNetscapePluginView.mm: Ditto.
1254
1255 2007-01-25  Darin Adler  <darin@apple.com>
1256
1257         Reviewed by Beth.
1258
1259         - fix <rdar://problem/4952766> Safari has a top secret color picker that can be used to... uhh... I don't know
1260
1261         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Let Interface Builder have its way.
1262         * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Remove the NSColorWell that was
1263         in here (for no good reason).
1264
1265 2007-01-25  Kevin Decker  <kdecker@apple.com>
1266
1267         Reviewed by andersca.
1268
1269         A few tweaks with of a fix done by Steve Gehrman.
1270
1271         Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
1272                http://bugs.webkit.org/show_bug.cgi?id=11523
1273
1274         * Plugins/WebBaseNetscapePluginStream.m:
1275         (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView streamIsDead:]
1276         * Plugins/WebBaseNetscapePluginView.h: Added streamIsDead to header.
1277         * Plugins/WebBaseNetscapePluginView.mm:
1278         (-[WebBaseNetscapePluginView streamIsDead:]): Added. Removes the stream from the streams collection.
1279
1280 2007-01-25  John Sullivan  <sullivan@apple.com>
1281
1282         Reviewed by Kevin, Geoff, Brady, and Darin
1283         
1284         - fixed <rdar://problem/4918446> Safari's temp files (PDF's) should be in a sub-folder when calling Preview
1285         
1286         * WebView/WebPDFView.mm:
1287         (-[WebPDFView _path]):
1288         use _temporaryPDFDirectoryPath method instead of #defines for hardwiring strings; stop bad practice
1289         of modifying the const char* returned by fileSystemRepresentation
1290         (-[WebPDFView _temporaryPDFDirectoryPath]):
1291         new method, lazily creates and returns a secure temporary directory created with NSTemporaryDirectory()
1292         and mkdtemp
1293
1294         * English.lproj/StringsNotToBeLocalized.txt:
1295         Updated for these and other recent changes
1296
1297 2007-01-24  Oliver Hunt  <oliver@apple.com>
1298
1299         Build fix 
1300
1301         * WebView/WebHTMLView.mm:
1302         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1303         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1304
1305 2007-01-24  Oliver Hunt  <ioliver@apple.com>
1306
1307         Reviewed by Maciej.
1308
1309         Migrating more drag state information to WebCore
1310
1311         * WebKit.xcodeproj/project.pbxproj:
1312         * WebView/WebHTMLView.mm:
1313         (-[WebHTMLViewPrivate dealloc]):
1314         (-[WebHTMLViewPrivate clear]):
1315         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1316         (-[WebHTMLView _mayStartDragAtEventLocation:]):
1317         (-[WebHTMLView close]):
1318         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1319         (-[WebHTMLView _delegateDragSourceActionMask]):
1320         * WebView/WebHTMLViewInternal.h:
1321
1322 2007-01-24  Adele Peterson  <adele@apple.com>
1323
1324         Reviewed by Darin.
1325
1326         Small improvement to my last checkin to prevent the keyEventWasInterpreted bool from
1327         being overwritten by reentrancy.
1328
1329         * WebView/WebHTMLView.mm:
1330         (-[WebHTMLView _interceptEditingKeyEvent:]): Point keyEventWasInterpreted pointer to local variable.
1331         (-[WebHTMLView doCommandBySelector:]):
1332         (-[WebHTMLView insertText:]):
1333         * WebView/WebHTMLViewInternal.h: Added BOOL pointer that will point to the local variable on the stack in _interceptEditingKeyEvent
1334
1335 2007-01-24  Adele Peterson  <adele@apple.com>
1336
1337         Reviewed by Darin.
1338
1339         - Fix for <rdar://problem/4950527> REGRESSION: Can't use arrow keys (left/right) to navigate caret in input (type=text) or textarea fields
1340
1341         Keep track of whether interpretKeyEvents handles the key event based on whether or not we get
1342         called in insertText or doCommandBySelector.
1343
1344         Test: fast/events/arrow-navigation.html
1345
1346         * WebView/WebHTMLView.mm:
1347         (-[WebHTMLView performKeyEquivalent:]):
1348         (-[WebHTMLView _interceptEditingKeyEvent:]):
1349         (-[WebHTMLView doCommandBySelector:]):
1350         (-[WebHTMLView insertText:]):
1351         * WebView/WebHTMLViewInternal.h:
1352
1353 2007-01-25  Mark Rowe  <mrowe@apple.com>
1354
1355         Reviewed by Maciej.
1356
1357         * Info.plist: Update copyright string.
1358
1359 2007-01-24  Darin Adler  <darin@apple.com>
1360
1361         Reviewed by Mark Rowe.
1362
1363         * WebKit.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
1364         so we don't rely on people's paths.
1365
1366 2007-01-24  Darin Adler  <darin@apple.com>
1367
1368         Reviewed by Adele.
1369
1370         - fix small regression and GC problems noticed by code inspection
1371
1372         * WebView/WebHTMLView.mm: Move global declarations to the start of the file.
1373         (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
1374         Add a CFRetain here for GC compatibility.
1375         (+[WebHTMLView _insertablePasteboardTypes]): Ditto.
1376         (-[WebHTMLView performKeyEquivalent:]): Fix small logic mistake that prevents
1377         super from being called if EventHandler::keyEvent returns false. Reformatted
1378         the code a bit and added a local variable for the frame.
1379         (-[WebHTMLView _interceptEditingKeyEvent:]): Added some comments.
1380         (-[WebHTMLView validAttributesForMarkedText]): Add a CFRetain here for
1381         GC compatibility.
1382
1383 2007-01-23  Adele Peterson  <adele@apple.com>
1384
1385         Reviewed by Adam.
1386
1387         Fixed 2 layout tests that I broke with my last checkin.
1388
1389         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): Use the selected frame to get the WebHTMLView.
1390         * WebView/WebHTMLView.mm:
1391         (-[WebHTMLView performKeyEquivalent:]): Added global to keep track of NSEvent used here.
1392         (-[WebHTMLView _interceptEditingKeyEvent:]): Check NSEvent against the event used in performKeyEquivalent.
1393           We don't want to intercept these events.
1394
1395 2007-01-23  Adele Peterson  <adele@apple.com>
1396
1397         Reviewed by Darin.
1398
1399         WebKit part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
1400         
1401         In addition to this fix, I also reorganized some event handling code for keyPress events to
1402         prepare for another fix.
1403
1404         * WebCoreSupport/WebEditorClient.h: Added handleKeyPress method.
1405         * WebCoreSupport/WebEditorClient.mm:
1406         (WebEditorClient::handleKeyPress): Added.  Code moved from WebHTMLView keyDown method.
1407          This is called from the defaultEventHandler so that in the future, we can make the right 
1408          decision about which selection the keyPress should apply to.
1409         * WebView/WebHTMLView.mm:
1410         (-[WebHTMLView keyDown:]): Moved _interceptEditingKeyEvent call to handleKeyPress.
1411         (-[WebHTMLView _interceptEditingKeyEvent:]): Prevents intercepting keys for cmd-modified events. Removed tabCycling checks
1412          since this is now handled in WebCore.
1413         * WebView/WebHTMLViewInternal.h: Made _interceptEditingKeyEvent SPI.
1414         * WebView/WebView.mm: Use new tabKeyCyclesThroughElements methods on the page.
1415         (-[WebViewPrivate init]): ditto.
1416         (-[WebView setTabKeyCyclesThroughElements:]): ditto.
1417         (-[WebView tabKeyCyclesThroughElements]): ditto.
1418         (-[WebView setEditable:]): ditto
1419
1420 2007-01-23  Lars Knoll <lars@trolltech.com>
1421
1422         Reviewed by Maciej
1423
1424         Make the last remaining pieces of the FrameLoader platform 
1425         independent. Move most of the code over to WebFrameLoaderClient.
1426         Some smaller cleanups in the WebFrameBridge, and moved some
1427         platform independent functionality over to the shared code
1428         in WebCore.
1429
1430         * Webcoresupport/WebFrameBridge.mm:
1431         (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
1432         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
1433         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1434         * WebCoreSupport/WebFrameLoaderClient.h:
1435         * WebCoreSupport/WebFrameLoaderClient.mm:
1436         (WebFrameLoaderClient::setTitle):
1437         (WebFrameLoaderClient::createFrame):
1438         (WebFrameLoaderClient::objectContentType):
1439         (nsArray):
1440         (WebFrameLoaderClient::createPlugin):
1441         (WebFrameLoaderClient::redirectDataToPlugin):
1442         (nsMutableArray):
1443         (WebFrameLoaderClient::createJavaAppletWidget):
1444         (WebFrameLoaderClient::overrideMediaType):
1445         (WebFrameLoaderClient::windowObjectCleared):
1446
1447 2007-01-23  Oliver Hunt  <oliver@apple.com>
1448
1449         Reviewed by Adam.
1450
1451         Drop logic bindings for WebKit
1452
1453         * WebCoreSupport/WebDragClient.h: Added.
1454         * WebCoreSupport/WebDragClient.mm: Added.
1455         (WebDragClient::WebDragClient):
1456         (WebDragClient::actionMaskForDrag):
1457         (WebDragClient::willPerformDragDestinationAction):
1458           Standard client impl
1459         * WebCoreSupport/WebFrameBridge.mm:
1460         (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1461           Updated to use DragController to track drag state
1462     
1463         * WebCoreSupport/WebPasteboardHelper.h: Added.
1464         (WebPasteboardHelper::WebPasteboardHelper):
1465           A *temporary* Helper class to access NSPasteboard access and 
1466           manipulation functions present in WebKit
1467         * WebCoreSupport/WebPasteboardHelper.mm: Added.
1468         (WebPasteboardHelper::urlFromPasteboard):
1469         (WebPasteboardHelper::plainTextFromPasteboard):
1470         (WebPasteboardHelper::fragmentFromPasteboard):
1471         (WebPasteboardHelper::insertablePasteboardTypes):
1472           See header comment
1473         * WebKit.xcodeproj/project.pbxproj:
1474         * WebView/WebDocumentInternal.h:
1475           Remove unnecessary protocol
1476         * WebView/WebFrameView.mm:
1477         (-[WebFrameView _setDocumentView:]):
1478           Updating to use DragController to track drag state
1479         * WebView/WebHTMLView.mm:
1480         (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1481           ditto
1482         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
1483           ditto
1484         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
1485           ditto
1486         (-[WebHTMLView draggedImage:endedAt:operation:]):
1487           ditto          
1488         (-[WebHTMLView _documentFragmentForPasteboard:]):
1489           Helper method to generate DocumentFragment from NSPasteboard without regressing 
1490         (-[WebHTMLView _canProcessDragWithDraggingInfo:]):
1491           Updating to use DragController to track drag state
1492         (-[WebHTMLView _isMoveDrag:]):
1493         (-[WebHTMLView _isNSColorDrag:]):
1494         * WebView/WebHTMLViewInternal.h:
1495           Removing unnecessary fields and methods
1496         * WebView/WebView.mm:
1497         (-[WebViewPrivate dealloc]):
1498           Remove obsolete ASSERT
1499         (-[WebView _setInitiatedDrag:]):
1500           Now passes directly through to DragController
1501         (-[WebView _commonInitializationWithFrameName:groupName:]):
1502         (-[WebView _loadingDragOperationForDraggingInfo:]):
1503           Removed
1504         (-[WebView draggingEntered:]):
1505           Updated to use DragController
1506         (-[WebView draggingUpdated:]):
1507           ditto
1508         (-[WebView draggingExited:]):
1509           ditto
1510         (-[WebView performDragOperation:]):
1511           ditto
1512         (-[WebView _hitTest:dragTypes:]):
1513         * WebView/WebViewInternal.h:
1514           remove unnecessary method def
1515
1516 2007-01-22  John Sullivan  <sullivan@apple.com>
1517
1518         * WebView/WebHTMLView.mm:
1519         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1520         Tiger build fix: remove unused variable for return value of dictionaryServiceWindowShow
1521
1522 2007-01-22  John Sullivan  <sullivan@apple.com>
1523
1524         Reviewed by Adam and Darin
1525
1526         - fixed <rdar://problem/4794320> "Look Up in Dictionary" does nothing in WebKit 
1527         (need to adopt new API)
1528
1529         * Misc/WebNSURLExtras.m:
1530         (-[NSString _web_isUserVisibleURL]):
1531         random typo correction in comment
1532
1533         * English.lproj/StringsNotToBeLocalized.txt:
1534         updated for these changes
1535
1536         * WebView/WebHTMLView.mm:
1537         (coreGraphicsScreenPointForAppKitScreenPoint):
1538         new function to convert an AppKit screen point to a CG screen point
1539         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1540         on Leopard now uses new API. There's something of an impedance mismatch between
1541         this API and WebKit, but that was true for the SPI we were using in Tiger also.
1542         Bug 4945808 covers the ways in which this is not perfect.
1543
1544 2007-01-21  Darin Adler  <darin@apple.com>
1545
1546         Reviewed by Tim H.
1547
1548         * WebInspector/webInspector/inspector.css: Use row-resize for the splitter cursor
1549         instead of move. It's a horizontal splitter resizer.
1550
1551 2007-01-19  Adam Roben  <aroben@apple.com>
1552
1553         Reviewed by Beth.
1554
1555         Fix <rdar://problem/4942294> REGRESSION: "Spelling and Grammar",
1556         "Font", "Speech", and "Writing Direction" are missing from contextual
1557         menu
1558
1559         * WebCoreSupport/WebContextMenuClient.mm:
1560         (fixMenusForOldClients): Change our new SPI tags to
1561         WebMenuItemTagOther because old clients aren't expecting the new tags.
1562         (fixMenusFromOldClients): Use each menu item's title to figure out its
1563         correct tag again.
1564         (WebContextMenuClient::getCustomMenuFromDefaultItems): Call
1565         fixMenusForOldClients before calling up to the delegate.
1566         * WebView/WebUIDelegatePrivate.h: Define WEBMENUITEMTAG_SPI_START so
1567         that we can use it in WebContextMenuClient.
1568
1569 2007-01-19  John Sullivan  <sullivan@apple.com>
1570
1571         Reviewed by Darin
1572
1573         - WebKit part of fix for: <rdar://problem/4451715> REGRESSION: On some sites, have to 
1574           type a character before username/password autofill kicks in
1575           
1576         Added new webView:didFinishDocumentLoadForFrame: SPI and wired it up
1577
1578         * WebView/WebViewPrivate.h:
1579         declare new delegate method
1580
1581         * WebCoreSupport/WebFrameLoaderClient.h:
1582         declare dispatchDidFinishDocumentLoad()
1583
1584         * WebCoreSupport/WebFrameLoaderClient.mm:
1585         (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1586         new method, calls new delegate method
1587
1588         * DefaultDelegates/WebDefaultFrameLoadDelegate.m:
1589         (-[WebDefaultFrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
1590         empty default implementation of new delegate method
1591
1592 2007-01-19  Anders Carlsson  <acarlsson@apple.com>
1593
1594         Reviewed by John Sullivan.
1595
1596         http://bugs.webkit.org/show_bug.cgi?id=12308
1597         REGRESSION(r18910): Crash in WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError
1598         
1599         * Plugins/WebBaseNetscapePluginView.mm:
1600         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
1601         Move code from initWithFrame in here.
1602
1603 2007-01-19  Anders Carlsson  <acarlsson@apple.com>
1604
1605         Yet another build fix.
1606         
1607         * WebCoreSupport/WebChromeClient.h:
1608         * WebCoreSupport/WebChromeClient.mm:
1609         (WebChromeClient::setStatusbarText):
1610
1611 2007-01-18  Anders Carlsson  <acarlsson@apple.com>
1612
1613         Reviewed by Adam.
1614
1615         Move functions from the bridge to the chrome client.
1616         
1617         * WebCoreSupport/WebChromeClient.h:
1618         * WebCoreSupport/WebChromeClient.mm:
1619         (WebChromeClient::runJavaScriptAlert):
1620         (WebChromeClient::runJavaScriptConfirm):
1621         (WebChromeClient::runJavaScriptPrompt):
1622         (WebChromeClient::setStatusBarText):
1623         * WebCoreSupport/WebFrameBridge.mm:
1624
1625 2007-01-18  Adam Roben  <aroben@apple.com>
1626
1627         Reviewed by Beth.
1628
1629         Fix <rdar://problem/4939672> REGRESSION: With text selected that is
1630         not a link, the "Remove Link" contextual menu item remains active
1631
1632         * WebView/WebHTMLView.mm:
1633         (-[WebHTMLView menuForEvent:]): Leave autoenabling of menu items on so
1634         that clients can implement validateMenuItem:.
1635
1636 2007-01-18  Brady Eidson  <beidson@apple.com>
1637
1638         Reviewed by Adele
1639
1640         <rdar://problem/4917290> - 
1641         Null deref in WebFrameLoaderClient::restoreScrollPositionAndViewState() 
1642         after regaining network connection
1643
1644         * WebCoreSupport/WebFrameLoaderClient.mm:
1645         (WebFrameLoaderClient::restoreScrollPositionAndViewState): Bail early with a null currentItem, preventing 
1646         a crash in release builds.  Leave the ASSERT to help find other cases where this might happen in debug builds.
1647
1648 2007-01-18  Kevin Decker  <kdecker@apple.com>
1649
1650         Reviewed by John.
1651
1652         <rdar://problem/4939511> WebKit should set the CG clip path for plug-ins that draw using CoreGraphics
1653
1654         * Plugins/WebBaseNetscapePluginView.mm:
1655         (-[WebBaseNetscapePluginView drawRect:]):  Set the CG clip path to the plug-in dirty rect. This allows plug-ins to obtain their
1656         dirty rect using functions like CGContextGetClipBoundingBox().
1657
1658 2007-01-17  Alice Liu  <alice.liu@apple.com>
1659
1660         Reviewed by Harrison.
1661
1662         Fix for <rdar://problem/4894155> REGRESSION: Extra line break is pasted with content into message body after choosing File - Paste
1663
1664         Migration of some editing code from WebHTMView to WebCore::Editor
1665         resulted in not calling pasteboardTypesForSelection, which Mail was
1666         overriding for the special purpose of adding a type to the
1667         pasteboard after WebKit did.  This patch adds 2 separate code paths
1668         for Tiger and Leopard.  On Tiger we give in and call the WebView's
1669         pasteboardTypesForSelection.  On Leopard we call a delegate after
1670         the pasteboard types are set. 
1671
1672         * DefaultDelegates/WebDefaultEditingDelegate.m:
1673         (-[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]):
1674         * WebCoreSupport/WebEditorClient.h:
1675         * WebCoreSupport/WebEditorClient.mm:
1676         (WebEditorClient::didSetSelectionTypesForPasteboard):
1677         (WebEditorClient::pasteboardTypesForSelection):
1678         * WebView/WebEditingDelegate.h:
1679
1680 2007-01-17  John Sullivan  <sullivan@apple.com>
1681
1682         Reviewed by Darin
1683
1684         - WebKit part of fix for <rdar://problem/4462420> REGRESSION: Mail hangs during 
1685           Replace All if the replacement string contains the search string
1686
1687         * Misc/WebKitVersionChecks.h:
1688         Added extern "C" so this can be used from .mm files. I don't need this change anymore for
1689         this fix, but it's still worth fixing now so it doesn't bite anyone later.
1690
1691         * WebView/WebDocumentPrivate.h:
1692         Invented new private protocol WebDocumentIncrementalSearching, that has one method. The one
1693         method is just like the one WebDocumentSearching method, but with an additional parameter.
1694         We hope to eliminate this dependence on protocols someday, but adding another one as SPI
1695         seems like it won't make anything worse.
1696         
1697         * WebView/WebHTMLView.mm:
1698         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
1699         now calls through to new method that has one additional parameter, passing NO to match old behavior
1700         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
1701         pass new parameter to bridge
1702         
1703         * WebView/WebPDFView.h:
1704         Declare conformance to WebDocumentIncrementalSearching protocol
1705         
1706         * WebView/WebPDFView.mm:
1707         (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
1708         now calls through to new method that has one additional parameter, passing NO to match old behavior
1709         (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
1710         new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
1711         parameter
1712         
1713         * WebView/WebViewPrivate.h:
1714         Declare new searchFor:direction:caseSensitive:wrap:startInSelection: method, just like existing
1715         method but with one additional parameter
1716
1717         * WebView/WebView.mm:
1718         (-[WebView searchFor:direction:caseSensitive:wrap:]):
1719         now calls through to new method that has one additional parameter, passing NO to match old behavior
1720         (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]):
1721         new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
1722         parameter
1723         
1724 2007-01-17  Brady Eidson  <beidson@apple.com>
1725
1726         Reviewed by Deth Bakin and Brian Dash
1727
1728         Drop Panther Support (?!?) and change the comment explaining some SPI forward decls
1729
1730         * Misc/WebDownload.m:
1731
1732 2007-01-17  Darin Adler  <darin@apple.com>
1733
1734         Reviewed by Maciej.
1735
1736         - fix http://bugs.webkit.org/show_bug.cgi?id=12278
1737           <rdar://problem/4928705> REGRESSION(r13070): Dragged image size includes padding (12278)
1738
1739         * Misc/WebElementDictionary.mm: (-[WebElementDictionary _imageRect]):
1740         Call HitTestResult::imageRect, not HitTestResult::boundingBox.
1741
1742 2007-01-17  Anders Carlsson  <acarlsson@apple.com>
1743
1744         Reviewed by John Sullivan.
1745         
1746         Move all code in WebNetscapePluginEmbeddedView down to WebBaseNetscapePluginView.
1747         
1748         * Plugins/WebBaseNetscapePluginView.h:
1749         * Plugins/WebBaseNetscapePluginView.mm:
1750         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
1751         (-[WebBaseNetscapePluginView didStart]):
1752         (-[WebBaseNetscapePluginView dataSource]):
1753         (-[WebBaseNetscapePluginView dealloc]):
1754         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
1755         (-[WebBaseNetscapePluginView pluginView:receivedData:]):
1756         (-[WebBaseNetscapePluginView pluginView:receivedError:]):
1757         (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
1758         (-[WebBaseNetscapePluginView _redeliverStream]):
1759         * Plugins/WebNetscapePluginEmbeddedView.h:
1760         * Plugins/WebNetscapePluginEmbeddedView.mm:
1761
1762 2007-01-17  Maciej Stachowiak  <mjs@apple.com>
1763
1764         Reviewed by Eric.
1765         
1766         <rdar://problem/4887781> Seed: Repro Safari crash in -[WebHTMLRepresentation receivedData:withDataSource:] (music.aol.com)
1767
1768         * WebView/WebDataSource.mm:
1769         (-[WebDataSource _receivedData:]): Protect self against destruction partway through this method.
1770
1771 2007-01-16  Alice Liu  <alice.liu@apple.com>
1772
1773         Reviewed by harrison.
1774
1775         Fixed <rdar://problem/4921134> WebKit needs extensible cut/copy to allow additional types to be written to pasteboard
1776
1777         * DefaultDelegates/WebDefaultEditingDelegate.m:
1778         (-[WebDefaultEditingDelegate webView:didWriteSelectionToPasteboard:]):
1779         * WebCoreSupport/WebEditorClient.h:
1780         * WebCoreSupport/WebEditorClient.mm:
1781         (WebEditorClient::didWriteSelectionToPasteboard):
1782         * WebKit.xcodeproj/project.pbxproj:
1783         * WebView/WebEditingDelegate.h:
1784
1785 2007-01-15  Justin Garcia  <justin.garcia@apple.com>
1786
1787         Reviewed by mjs
1788
1789         <rdar://problem/4810960>
1790         Gmail Editor: window.focus() called on keyDown (9640)
1791
1792         The window's keydown event handler was being called
1793         instead of the editable subframe's if there was a key binding
1794         for the key event.
1795
1796         * WebView/WebHTMLView.mm:
1797         (-[WebHTMLView performKeyEquivalent:]): Don't send the event
1798         to WebCore unless this WebHTMLView is the firstResponder.
1799
1800 2007-01-15  Anders Carlsson  <acarlsson@apple.com>
1801
1802         Reviewed by Darin.
1803
1804         Update to match WebCore.
1805         
1806         * WebCoreSupport/WebFrameLoaderClient.h:
1807         * WebCoreSupport/WebFrameLoaderClient.mm:
1808         (WebFrameLoaderClient::willChangeEstimatedProgress):
1809         (WebFrameLoaderClient::didChangeEstimatedProgress):
1810         (WebFrameLoaderClient::postProgressStartedNotification):
1811         (WebFrameLoaderClient::postProgressEstimateChangedNotification):
1812         (WebFrameLoaderClient::postProgressFinishedNotification):
1813         Post the correct notifications.
1814         
1815         * WebView/WebView.mm:
1816         (-[WebViewPrivate init]):
1817         (-[WebViewPrivate dealloc]):
1818         Get rid of all progress tracking code.
1819         
1820         (-[WebView estimatedProgress]):
1821         Call ProgressTracker::estimatedProgress()
1822
1823 2007-01-15  Adam Roben  <aroben@apple.com>
1824
1825         Reviewed by Darin.
1826
1827         Fix: http://bugs.webkit.org/show_bug.cgi?id=12134
1828         REGRESSION: Assertion failure and crash when right clicking selection
1829         in forms
1830
1831         * WebCoreSupport/WebContextMenuClient.mm:
1832         (fixMenusFromOldApps): Static helper to fix up menus from applications
1833         compiled against Tiger WebKit.
1834         (WebContextMenuClient::getCustomMenuFromDefaultItems): Call helper to
1835         fix menus.
1836         * WebView/WebUIDelegatePrivate.h: Fixed typo.
1837
1838 2007-01-14  David Kilzer  <ddkilzer@kilzer.net>
1839
1840         Reviewed by Darin.
1841
1842         - fix http://bugs.webkit.org/show_bug.cgi?id=12251
1843           REGRESSION (r18822-r18823): Assertion failure opening document with non-existent resources
1844           (dom/xhtml/level2/html/HTMLIFrameElement11.xhtml)
1845
1846         * WebView/WebView.mm:
1847         (-[WebView _objectForIdentifier:]): Removed assertion.
1848         (-[WebView _removeObjectForIdentifier:]): Removed assertion.
1849
1850 2007-01-12  Anders Carlsson  <acarlsson@apple.com>
1851
1852         Reviewed by Darin.
1853
1854         Add a HashMap between unsigned longs and Objective-C objects and use it for
1855         the resource load delegate.
1856         
1857         * WebCoreSupport/WebFrameLoaderClient.h:
1858         * WebCoreSupport/WebFrameLoaderClient.mm:
1859         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
1860         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
1861         (WebFrameLoaderClient::dispatchWillSendRequest):
1862         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
1863         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
1864         (WebFrameLoaderClient::dispatchDidReceiveResponse):
1865         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
1866         (WebFrameLoaderClient::dispatchDidFinishLoading):
1867         (WebFrameLoaderClient::dispatchDidFailLoading):
1868         (WebFrameLoaderClient::incrementProgress):
1869         (WebFrameLoaderClient::completeProgress):
1870         * WebView/WebView.mm:
1871         (-[WebViewPrivate init]):
1872         (-[WebViewPrivate dealloc]):
1873         (-[WebView _addObject:forIdentifier:]):
1874         (-[WebView _objectForIdentifier:]):
1875         (-[WebView _removeObjectForIdentifier:]):
1876         * WebView/WebViewInternal.h:
1877
1878 2007-01-11  Brady Eidson  <beidson@apple.com>
1879
1880         Reviewed by Anders
1881
1882         Rewrites HTTP Authentication setting up a more platform-independent structure
1883
1884         * WebCoreSupport/WebFrameLoaderClient.h:
1885         * WebCoreSupport/WebFrameLoaderClient.mm:
1886         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
1887         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
1888         * WebKit.xcodeproj/project.pbxproj:
1889
1890 2007-01-11  Darin Adler  <darin@apple.com>
1891
1892         Reviewed by Mitz.
1893
1894         - fix http://bugs.webkit.org/show_bug.cgi?id=12180
1895           REGRESSION: Double-clicking on JS exception in JS log crashes in -[SharedBufferData initWithSharedBuffer:]
1896
1897         * WebView/WebDataSource.mm: (-[WebDataSource data]): Added null check.
1898
1899 2007-01-11  Darin Adler  <darin@apple.com>
1900
1901         Reviewed by Hyatt.
1902
1903         - moved code from a couple WebCore bridging classes here instead
1904
1905         * Misc/WebNSPasteboardExtras.mm:
1906         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
1907         Use MimeTypeRegistry instead of WebMimeTypeRegistryBridge.
1908
1909         * WebView/WebHTMLRepresentation.mm:
1910         (stringArray): Added. Helper to convert a HashSet to an NSArray.
1911         (concatenateArrays): Added. Helper to concatenate two NSArray objects.
1912         (+[WebHTMLRepresentation supportedMIMETypes]): Use MimeTypeRegistry instead of
1913         WebMimeTypeRegistryBridge. Also fix a potential GC problem by using a RetainPtr
1914         instead of a [retain] on a global variable.
1915         (+[WebHTMLRepresentation supportedNonImageMIMETypes]): Ditto.
1916         (+[WebHTMLRepresentation supportedImageMIMETypes]): Ditto.
1917
1918         * WebView/WebHTMLView.mm:
1919         (-[WebHTMLView _imageExistsAtPaths:]): Use MimeTypeRegistry instead of
1920         WebMimeTypeRegistryBridge.
1921         (-[WebHTMLView _documentFragmentWithPaths:]): Ditto.
1922
1923         * WebView/WebView.mm: (+[WebView _decodeData:]): Moved code here from
1924         the old WebCoreEncodings class.
1925
1926         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with this file.
1927         Moved WebRenderNode into the appropriate group.
1928
1929 2007-01-10  Mitz Pettel  <mitz@webkit.org>
1930
1931         Reviewed by Darin.
1932
1933         - fix http://bugs.webkit.org/show_bug.cgi?id=11775
1934           'Show URLs in Tool Tips' preference is ignored
1935
1936         * WebView/WebHTMLView.mm:
1937         (-[WebHTMLView _resetCachedWebPreferences:]):
1938         (-[WebHTMLView setDataSource:]): Added a call to _resetCachedWebPreferences:.
1939         Added an assertion that the view is not closed, instead of reopening it.
1940         Reopening should not occur, now that <http://bugs.webkit.org/show_bug.cgi?id=12087>
1941         is fixed.
1942
1943 2007-01-10  Beth Dakin  <bdakin@apple.com>
1944
1945         Reviewed by John.
1946
1947         Fix for <rdar://problem/4914258> REGRESSION: Search in Google now 
1948         operates on the current WebView instead of invoking Safari's 
1949         service
1950
1951         * WebCoreSupport/WebContextMenuClient.h:
1952         * WebCoreSupport/WebContextMenuClient.mm:
1953         (WebContextMenuClient::searchWithGoogle): Call into WebView to 
1954         search in Google.
1955         * WebView/WebViewInternal.h: Make _searchWithGoogleFromMenu 
1956         available.
1957
1958 2007-01-09  Timothy Hatcher  <timothy@apple.com>
1959
1960         Reviewed by Darin.
1961
1962         Rename the now ObjC++ files to be .mm and remove the explicit file types.
1963
1964         * DOM/WebDOMOperations.m: Removed.
1965         * DefaultDelegates/WebDefaultContextMenuDelegate.m: Removed.
1966         * English.lproj/StringsNotToBeLocalized.txt:
1967         * Misc/WebCoreStatistics.m: Removed.
1968         * Misc/WebElementDictionary.m: Removed.
1969         * Misc/WebIconDatabase.m: Removed.
1970         * Misc/WebNSAttributedStringExtras.m: Removed.
1971         * Misc/WebNSPasteboardExtras.m: Removed.
1972         * Plugins/WebNetscapePluginEmbeddedView.m: Removed.
1973         * Plugins/WebNullPluginView.m: Removed.
1974         * Plugins/WebPluginContainerCheck.m: Removed.
1975         * WebCoreSupport/WebViewFactory.m: Removed.
1976         * WebKit.xcodeproj/project.pbxproj:
1977         * WebView/WebArchiver.m: Removed.
1978         * WebView/WebHTMLRepresentation.m: Removed.
1979         * WebView/WebHTMLView.m: Removed.
1980         * WebView/WebRenderNode.m: Removed.
1981         * WebView/WebResource.m: Removed.
1982         * WebView/WebScriptDebugDelegate.m: Removed.
1983
1984 2007-01-09  Maciej Stachowiak  <mjs@apple.com>
1985
1986         Reviewed by Darin.
1987         
1988         - remove window display throttling code; no longer used
1989
1990         * Misc/WebNSWindowExtras.h:
1991         * Misc/WebNSWindowExtras.m:
1992         * WebView/WebFrameView.mm:
1993         (-[WebFrameView initWithFrame:]):
1994         * WebView/WebPreferenceKeysPrivate.h:
1995
1996 2007-01-08  Anders Carlsson  <acarlsson@apple.com>
1997
1998         Reviewed by Brady.
1999
2000         Remove bridge functions that are implemented directly in FrameLoader now.
2001         
2002         * WebCoreSupport/WebFrameBridge.mm:
2003
2004 2007-01-08  Sam Weinig  <sam@webkit.org>
2005
2006         Reviewed by Mark.
2007
2008         Adds default value for outline-color and fixes default
2009         values of the recently fixed *-color properties.
2010
2011         * WebInspector/webInspector/inspector.js:
2012
2013 2007-01-08  Beth Dakin  <bdakin@apple.com>
2014
2015         Reviewed by Adam.
2016
2017         Fix for http://bugs.webkit.org/show_bug.cgi?id=12161 REGRESSION: 
2018         Crash when control-clicking on an image for contextual menu
2019
2020         * WebView/WebHTMLView.m:
2021         (-[WebHTMLView menuForEvent:]): We need to nil-check coreMenu since 
2022         it will be nil if the DOM popped up a menu instead. I cleaned up 
2023         the function to make all the nil checks early returns instead of 
2024         nesting all of the content. Also moved the autorelease to be with 
2025         the creation of the menu instead of at the return.
2026
2027 2007-01-08  Sam Weinig  <sam@webkit.org>
2028
2029         Reviewed by Tim H.
2030
2031         Adds default value for -webkit-box-shadow and fixes default
2032         value of -webkit-column-count to be "auto".  Also sorts the
2033         list of defaults.
2034
2035         * WebInspector/webInspector/inspector.js:
2036
2037 2007-01-08  Andrew Wellington  <proton@wiretapped.net>
2038
2039         Reviewed by Mark.
2040
2041         * WebInspector/webInspector/inspector.js: Hide default values of
2042         -webkit-column styles in WebInspector.
2043
2044 2007-01-05  Darin Adler  <darin@apple.com>
2045
2046         Reviewed by Hyatt.
2047
2048         * Misc/WebNSAttributedStringExtras.m:
2049         (+[NSAttributedString _web_attributedStringFromRange:]):
2050         Updated to use new list marker text API that is String rather than
2051         DeprecatedString. Also removed code to do text form of non-text list
2052         markers since the list marker class now deals with that.
2053
2054 2007-01-05  Anders Carlsson  <acarlsson@apple.com>
2055
2056         Reviewed by Darin.
2057
2058         Fix build.
2059         
2060         * WebCoreSupport/WebFrameLoaderClient.h:
2061         * WebCoreSupport/WebFrameLoaderClient.mm:
2062         (WebFrameLoaderClient::dispatchCreatePage):
2063
2064 2007-01-05  Anders Carlsson  <acarlsson@apple.com>
2065
2066         Reviewed by Maciej.
2067
2068         The data returned is now a SharedBuffer so wrap it in an NSData object.
2069         
2070         * WebView/WebDataSource.mm:
2071         (-[WebDataSource data]):
2072
2073 2007-01-04  Adam Roben  <aroben@apple.com>
2074
2075         Reviewed by Geoff, cheered by others.
2076
2077         Dead code elimination.
2078
2079         * WebView/WebHTMLView.m:
2080
2081 2007-01-04  Adam Roben  <aroben@apple.com>
2082
2083         Boo on me for undoing Beth's hard work.
2084
2085         * WebView/WebHTMLView.m:
2086         (-[WebHTMLView menuForEvent:]): Undo a mistaken roll out of r18597.
2087
2088 2007-01-04  David Kilzer  <ddkilzer@webkit.org>
2089
2090         Reviewed by Brady.
2091
2092         - fix http://bugs.webkit.org/show_bug.cgi?id=12111
2093           Uninitialized variable in -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
2094
2095         * DefaultDelegates/WebDefaultPolicyDelegate.m: Initialize isDirectory.
2096
2097 2007-01-04  Adam Roben  <aroben@apple.com>
2098
2099         Reviewed by Geoff.
2100
2101         Remove WebKit/AppKit from handling tabbing between subframes.
2102
2103         * WebCoreSupport/WebChromeClient.h: Added new ChromeClient methods for
2104         moving focus out of the WebView.
2105         * WebCoreSupport/WebChromeClient.mm: Ditto.
2106         (WebChromeClient::canTakeFocus):
2107         (WebChromeClient::takeFocus):
2108         * WebCoreSupport/WebFrameBridge.mm:
2109         (-[WebFrameBridge webView]): Added null-check of m_frame.
2110         * WebView/WebHTMLView.m: Removed -[WebHTMLView nextValidKeyView].
2111         (-[WebHTMLView _updateActiveState]): Changed to focus the frame if
2112         WebCore believes it to be the focused frame.
2113         (-[WebHTMLView becomeFirstResponder]): Rewrote to call into
2114         FocusController to place focus correctly within the WebView.
2115
2116 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
2117
2118         Reviewed by Brady.
2119
2120         FrameLoaderClient changed yet again.
2121         
2122         * WebCoreSupport/WebFrameLoaderClient.h:
2123         * WebCoreSupport/WebFrameLoaderClient.mm:
2124         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
2125         (WebFrameLoaderClient::dispatchWillSendRequest):
2126
2127 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
2128
2129         Reviewed by Adam.
2130
2131         FrameLoaderClient changed again.
2132         
2133         * WebCoreSupport/WebFrameLoaderClient.h:
2134         * WebCoreSupport/WebFrameLoaderClient.mm:
2135         (WebFrameLoaderClient::download):
2136         (WebFrameLoaderClient::willUseArchive):
2137
2138 2007-01-04  Beth Dakin  <bdakin@apple.com>
2139
2140         Reviewed by Adam.
2141
2142         No need to hit test twice.
2143
2144         * WebView/WebHTMLView.m:
2145         (-[WebHTMLView menuForEvent:]):
2146
2147 2007-01-04  Beth Dakin  <bdakin@apple.com>
2148
2149         Reviewed by Adam.
2150
2151         Turn on WebCore context menus. Delete a bunch of WebKit context 
2152         menu code that is no longer needed.
2153
2154         * DefaultDelegates/WebDefaultContextMenuDelegate.m: Removed a lot 
2155         of code from this class. This class only still needs to exist for 
2156         PDF context menus, so we only need to deal with the menu items that 
2157         might possibly be added to a PDF context menu.
2158         (-[WebDefaultUIDelegate 
2159         menuItemWithTag:target:representedObject:]): Same.
2160         (-[WebDefaultUIDelegate 
2161         webView:contextMenuItemsForElement:defaultMenuItems:]): Same.
2162         * WebCoreSupport/WebContextMenuClient.h: Name change and have the 
2163         former getCustomMenuFromDefaultItems function return the 
2164         PlatformMenuDescription since it feels funny to have the client set 
2165         the new platform description.
2166         * WebCoreSupport/WebContextMenuClient.mm: Same.
2167         (WebContextMenuClient::getCustomMenuFromDefaultItems): Same. Also 
2168         move in some code that used to be in _menuForElement.
2169         * WebView/WebHTMLView.m: Deleted a bunch of un-used functions
2170         (-[WebHTMLView menuForEvent:]): Turn on menus, and append the 
2171         Inspect Element item. 
2172         * WebView/WebHTMLViewPrivate.h: Deleted a bunch of un-used 
2173         functions.
2174         * WebView/WebView.mm:
2175         (-[WebView _menuForElement:defaultItems:]): Removed a lot of code 
2176         from _menuForElement that now makes more sense elsewhere. Only PDF 
2177         context menus use this function now. Hopefully we can just get rid 
2178         of it soon, too.
2179
2180 2007-01-04  Anders Carlsson  <acarlsson@apple.com>
2181
2182         Reviewed by Brady.
2183
2184         Update for WebCore changes.
2185         
2186         * WebCoreSupport/WebFrameLoaderClient.h:
2187         * WebCoreSupport/WebFrameLoaderClient.mm:
2188         (WebFrameLoaderClient::download):
2189         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
2190         (WebFrameLoaderClient::dispatchWillSendRequest):
2191         (WebFrameLoaderClient::dispatchDidReceiveResponse):
2192         (WebFrameLoaderClient::incrementProgress):
2193
2194 2007-01-04  Don Gibson  <dgibson77@gmail.com>
2195
2196         Reviewed by Alexey.
2197
2198         http://bugs.webkit.org/show_bug.cgi?id=11900:
2199         Windows build bustage
2200
2201         * COM/ChromeClientWin.cpp:
2202         (ChromeClientWin::addMessageToConsole):
2203         (ChromeClientWin::runBeforeUnloadConfirmPanel):
2204         * COM/ChromeClientWin.h:
2205         * COM/ContextMenuClientWin.cpp:
2206         (ContextMenuClientWin::contextMenuItemSelected):
2207         * COM/ContextMenuClientWin.h:
2208         * COM/WebFrameLoaderClient.cpp:
2209         (WebFrameLoaderClient::setDocumentViewFromPageCache):
2210         (WebFrameLoaderClient::forceLayout):
2211         (WebFrameLoaderClient::forceLayoutForNonHTML):
2212         (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad):
2213         (WebFrameLoaderClient::updateGlobalHistoryForReload):
2214         (WebFrameLoaderClient::shouldGoToHistoryItem):
2215         (WebFrameLoaderClient::saveScrollPositionAndViewStateToItem):
2216         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
2217         (WebFrameLoaderClient::provisionalLoadStarted):
2218         (WebFrameLoaderClient::saveDocumentViewToPageCache):
2219         (WebFrameLoaderClient::canCachePage):
2220         * COM/WebFrameLoaderClient.h:
2221         * WebKit.vcproj/WebKit.vcproj:
2222
2223 2007-01-03  John Sullivan  <sullivan@apple.com>
2224
2225         * WebView/WebPDFView.mm:
2226         (-[WebPDFView _openWithFinder:]):
2227         Tiger build fix: use [NSNumber initWithInt:] rather than the new [NSNumber initWithInteger:]
2228
2229 2007-01-03  John Sullivan  <sullivan@apple.com>
2230
2231         Reviewed by Kevin Decker
2232
2233         - fixed <rdar://problem/4145714> WebKit's PDFView's "Open in Preview" puts the 
2234           PDF in /tmp, both group and world-readable
2235
2236         * WebView/WebPDFView.mm:
2237         (-[WebPDFView _openWithFinder:]):
2238         Make the file only readable by the current user
2239
2240 2007-01-03  Beth Dakin  <bdakin@apple.com>
2241
2242         Reviewed by John.
2243
2244         Make localized strings for all of the context menu item titles that 
2245         are accessible to WebCore.
2246
2247         * English.lproj/Localizable.strings:
2248         * WebCoreSupport/WebViewFactory.m:
2249         (-[WebViewFactory contextMenuItemTagOpenLinkInNewWindow]):
2250         (-[WebViewFactory contextMenuItemTagDownloadLinkToDisk]):
2251         (-[WebViewFactory contextMenuItemTagCopyLinkToClipboard]):
2252         (-[WebViewFactory contextMenuItemTagOpenImageInNewWindow]):
2253         (-[WebViewFactory contextMenuItemTagDownloadImageToDisk]):
2254         (-[WebViewFactory contextMenuItemTagCopyImageToClipboard]):
2255         (-[WebViewFactory contextMenuItemTagOpenFrameInNewWindow]):
2256         (-[WebViewFactory contextMenuItemTagCopy]):
2257         (-[WebViewFactory contextMenuItemTagGoBack]):
2258         (-[WebViewFactory contextMenuItemTagGoForward]):
2259         (-[WebViewFactory contextMenuItemTagStop]):
2260         (-[WebViewFactory contextMenuItemTagReload]):
2261         (-[WebViewFactory contextMenuItemTagCut]):
2262         (-[WebViewFactory contextMenuItemTagPaste]):
2263         (-[WebViewFactory contextMenuItemTagNoGuessesFound]):
2264         (-[WebViewFactory contextMenuItemTagIgnoreSpelling]):
2265         (-[WebViewFactory contextMenuItemTagLearnSpelling]):
2266         (-[WebViewFactory contextMenuItemTagSearchInSpotlight]):
2267         (-[WebViewFactory contextMenuItemTagSearchWeb]):
2268         (-[WebViewFactory contextMenuItemTagLookUpInDictionary]):
2269         (-[WebViewFactory contextMenuItemTagOpenLink]):
2270         (-[WebViewFactory contextMenuItemTagIgnoreGrammar]):
2271         (-[WebViewFactory contextMenuItemTagSpellingMenu]):
2272         (-[WebViewFactory contextMenuItemTagShowSpellingPanel:]):
2273         (-[WebViewFactory contextMenuItemTagCheckSpelling]):
2274         (-[WebViewFactory contextMenuItemTagCheckSpellingWhileTyping]):
2275         (-[WebViewFactory contextMenuItemTagCheckGrammarWithSpelling]):
2276         (-[WebViewFactory contextMenuItemTagFontMenu]):
2277         (-[WebViewFactory contextMenuItemTagShowFonts]):
2278         (-[WebViewFactory contextMenuItemTagBold]):
2279         (-[WebViewFactory contextMenuItemTagItalic]):
2280         (-[WebViewFactory contextMenuItemTagUnderline]):
2281         (-[WebViewFactory contextMenuItemTagOutline]):
2282         (-[WebViewFactory contextMenuItemTagStyles]):
2283         (-[WebViewFactory contextMenuItemTagShowColors]):
2284         (-[WebViewFactory contextMenuItemTagSpeechMenu]):
2285         (-[WebViewFactory contextMenuItemTagStartSpeaking]):
2286         (-[WebViewFactory contextMenuItemTagStopSpeaking]):
2287         (-[WebViewFactory contextMenuItemTagWritingDirectionMenu]):
2288         (-[WebViewFactory contextMenuItemTagDefaultDirection]):
2289         (-[WebViewFactory contextMenuItemTagLeftToRight]):
2290         (-[WebViewFactory contextMenuItemTagRightToLeft]):
2291
2292 2007-01-03  Brady Eidson  <beidson@apple.com>
2293
2294         Reviewed by John Sullivan
2295
2296         In the Bookmarks View/History View, favicon may be the incorrect size
2297
2298         * History/WebHistoryItem.mm:
2299         (-[WebHistoryItem icon]): Call to the WebIconDatabase until a WebCore issue is resolved
2300
2301 2007-01-03  Adele Peterson  <adele@apple.com>
2302
2303         Reviewed by Darin.
2304
2305         - Fix for <rdar://problem/4455147> Safari allows division slash character in URLs, which looks like slash character (not fixed by IDNScriptWhiteList.txt)
2306
2307         * Misc/WebNSURLExtras.m: (allCharactersInIDNScriptWhiteList): Always disallow the division slash character.
2308
2309 2007-01-02  Brady Eidson <beidson@apple.com>
2310
2311         Controversially reviewed by Tim H. and Maciej
2312
2313         Fixes http://bugs.webkit.org/show_bug.cgi?id=12086, http://bugs.webkit.org/show_bug.cgi?id=12088, 
2314         possibly http://bugs.webkit.org/show_bug.cgi?id=12087, and probably a slew of others
2315
2316         WebHistoryItems returned from the WebBackForwardList accessors were being release/retained out-of-order
2317         by the Safari app.  This bug never surfaced before because the WebBackForwardList had a retain on the 
2318         item, preventing deallocation. Since the items are now just temporary wrappers, the list 
2319         is no longer actually retaining them.
2320
2321         This solution is to simulate the ownership with a [[id retain] autorelease] - gross, but maybe the 
2322         only solution for now...  =/
2323
2324         We can possibly consider reverting this fix at a later date - that task is marked by
2325         <rdar://problem/4905705>
2326
2327         * History/WebBackForwardList.mm:
2328         (-[WebBackForwardList backItem]):
2329         (-[WebBackForwardList currentItem]):
2330         (-[WebBackForwardList forwardItem]):
2331         (-[WebBackForwardList itemAtIndex:]):
2332
2333 2007-01-02  Beth Dakin  <bdakin@apple.com>
2334
2335         Reviewed by Geoff.
2336
2337         Remove un-used function.
2338
2339         * WebCoreSupport/WebContextMenuClient.h:
2340         * WebCoreSupport/WebContextMenuClient.mm:
2341
2342 2007-01-02  Brady Eidson  <beidson@apple.com>
2343
2344         Reviewed extensively and repeatedly by Darin
2345
2346         <rdar://problem/4887137> - WebCore Back/Forward Cache 
2347         Most things not specifically commented on in the ChangeLog can be summed up as 
2348         "Do things exactly the same way as we used to, but just stick in WebCore-land as much as possible"
2349
2350         * History/WebBackForwardList.mm:
2351         (kitPrivate): Convenience functions to help with subbing "WebBackForwardListPrivate" for WebCore::BackForwardList
2352         (core):
2353         (backForwardListWrappers): A HashMap pattern used to map WebCore objects to their WebKit counterpart
2354         (kit):
2355         (+[WebBackForwardList setDefaultPageCacheSizeIfNecessary]):
2356         (-[WebBackForwardList initWithWebCoreBackForwardList:]):
2357         (-[WebBackForwardList init]):
2358         (-[WebBackForwardList dealloc]):
2359         (-[WebBackForwardList finalize]):
2360         (-[WebBackForwardList _close]):
2361         (-[WebBackForwardList addItem:]):
2362         (-[WebBackForwardList removeItem:]):
2363         (-[WebBackForwardList containsItem:]):
2364         (-[WebBackForwardList goBack]):
2365         (-[WebBackForwardList goForward]):
2366         (-[WebBackForwardList goToItem:]):
2367         (-[WebBackForwardList backItem]):
2368         (-[WebBackForwardList currentItem]):
2369         (-[WebBackForwardList forwardItem]):
2370         (vectorToNSArray):
2371         (-[WebBackForwardList backListWithLimit:]):
2372         (-[WebBackForwardList forwardListWithLimit:]):
2373         (-[WebBackForwardList capacity]):
2374         (-[WebBackForwardList setCapacity:]):
2375         (-[WebBackForwardList description]):
2376         (-[WebBackForwardList _clearPageCache]):
2377         (-[WebBackForwardList setPageCacheSize:]):
2378         (-[WebBackForwardList pageCacheSize]):
2379         (-[WebBackForwardList _usesPageCache]):
2380         (-[WebBackForwardList backListCount]):
2381         (-[WebBackForwardList forwardListCount]):
2382         (-[WebBackForwardList itemAtIndex:]):
2383         * History/WebBackForwardListInternal.h: Added.
2384
2385         * History/WebHistory.m: Removed.
2386         * History/WebHistory.mm: Added - Needed to be .mm to accept C++ header style
2387         (-[_WebCoreHistoryProvider containsItemForURLLatin1:length:]):
2388         (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]):
2389
2390         * History/WebHistoryItem.mm:
2391         (kitPrivate): Same pattern as WebBackForwardList
2392         (core):
2393         (historyItemWrappers):
2394         (WKNotifyHistoryItemChanged):
2395         (-[WebHistoryItem init]):
2396         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
2397         (-[WebHistoryItem dealloc]):
2398         (-[WebHistoryItem finalize]):
2399         (-[WebHistoryItem copyWithZone:]):
2400         (-[WebHistoryItem URLString]):
2401         (-[WebHistoryItem originalURLString]):
2402         (-[WebHistoryItem title]):
2403         (-[WebHistoryItem setAlternateTitle:]):
2404         (-[WebHistoryItem alternateTitle]):
2405         (-[WebHistoryItem icon]):
2406         (-[WebHistoryItem lastVisitedTimeInterval]):
2407         (-[WebHistoryItem hash]):
2408         (-[WebHistoryItem isEqual:]):
2409         (-[WebHistoryItem description]):
2410         (kit):
2411         (+[WebHistoryItem entryWithURL:]):
2412         (+[WebHistoryItem initWindowWatcherIfNecessary]):
2413         (-[WebHistoryItem initWithURL:target:parent:title:]):
2414         (-[WebHistoryItem initWithWebCoreHistoryItem:]):
2415         (-[WebHistoryItem setTitle:]):
2416         (-[WebHistoryItem setVisitCount:]):
2417         (-[WebHistoryItem setViewState:]):
2418         (-[WebHistoryItem _mergeAutoCompleteHints:]):
2419         (-[WebHistoryItem initFromDictionaryRepresentation:]):
2420         (-[WebHistoryItem scrollPoint]):
2421         (-[WebHistoryItem _transientPropertyForKey:]):
2422         (-[WebHistoryItem _setTransientProperty:forKey:]):
2423         (-[WebHistoryItem dictionaryRepresentation]):
2424         (-[WebHistoryItem target]):
2425         (-[WebHistoryItem isTargetItem]):
2426         (-[WebHistoryItem visitCount]):
2427         (-[WebHistoryItem RSSFeedReferrer]):
2428         (-[WebHistoryItem setRSSFeedReferrer:]):
2429         (-[WebHistoryItem children]):
2430         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
2431         (-[WebHistoryItem URL]):
2432         (-[WebHistoryItem _setLastVisitedTimeInterval:]):
2433         (-[WebHistoryItem _lastVisitedDate]):
2434         (-[WebHistoryItem targetItem]):
2435         (+[WebHistoryItem _releaseAllPendingPageCaches]):
2436         (-[WebWindowWatcher windowWillClose:]):
2437         * History/WebHistoryItemInternal.h:
2438         * History/WebHistoryItemPrivate.h:
2439
2440         * WebCoreSupport/WebFrameBridge.mm:
2441         * WebCoreSupport/WebFrameLoaderClient.h:
2442         * WebCoreSupport/WebFrameLoaderClient.mm:
2443         (WebFrameLoaderClient::setDocumentViewFromPageCache):
2444         (WebFrameLoaderClient::detachedFromParent1):
2445         (WebFrameLoaderClient::loadedFromPageCache):
2446         (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad):
2447         (WebFrameLoaderClient::updateGlobalHistoryForReload):
2448         (WebFrameLoaderClient::shouldGoToHistoryItem):
2449         (WebFrameLoaderClient::frameLoadCompleted):
2450         (WebFrameLoaderClient::saveScrollPositionAndViewStateToItem):
2451         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
2452         (WebFrameLoaderClient::provisionalLoadStarted):
2453         (WebFrameLoaderClient::setTitle):
2454         (WebFrameLoaderClient::saveDocumentViewToPageCache):
2455         (WebFrameLoaderClient::canCachePage):
2456
2457         * WebCoreSupport/WebSystemInterface.m:
2458         (InitWebCoreSystemInterface):
2459
2460         * WebKit.xcodeproj/project.pbxproj:
2461
2462         * WebView/WebDataSource.mm:
2463         * WebView/WebDataSourceInternal.h:
2464
2465         * WebView/WebFrame.mm:
2466         (-[WebFramePrivate dealloc]):
2467         (-[WebFrame _canCachePage]):
2468         (-[WebFrame _loadURL:referrer:intoChild:]):
2469         * WebView/WebFrameInternal.h:
2470
2471         * WebView/WebFrameView.mm:
2472         (-[WebFrameView initWithFrame:]):
2473         (-[WebFrameView keyDown:]):
2474
2475         * WebView/WebHTMLView.m:
2476         (-[WebHTMLView closeIfNotCurrentView]): Added for a dirty hack in WebCore that is marked with a FIXME Radar
2477         * WebView/WebHTMLViewInternal.h:
2478
2479         * WebView/WebView.mm:
2480         (-[WebViewPrivate init]):
2481         (-[WebViewPrivate dealloc]):
2482         (-[WebView _close]):
2483         (-[WebView _loadBackForwardListFromOtherView:]):
2484         (-[WebView _commonInitializationWithFrameName:groupName:]):
2485         (-[WebView initWithCoder:]):
2486         (-[WebView backForwardList]):
2487         (-[WebView goBack]):
2488         (-[WebView goForward]):
2489         (-[WebView goToBackForwardItem:]):
2490         (-[WebView canGoBack]):
2491         (-[WebView canGoForward]):
2492
2493 2007-01-02  John Sullivan  <sullivan@apple.com>
2494
2495         Reviewed by Kevin Decker
2496
2497         - fixed <rdar://problem/4892525> Cannot open PDF in Preview if you attempted to 
2498           open it in Preview while PDF was loading
2499
2500         * WebView/WebPDFView.mm:
2501         (-[WebPDFView menuForEvent:]):
2502         added comment
2503         (-[WebPDFView validateUserInterfaceItem:]):
2504         disable this menu item when there's no document yet
2505         (-[WebPDFView _openWithFinder:]):
2506         If this is invoked when there is no document yet (e.g. via the PDFKit delegate method), 
2507         just beep and return. I should make a nice error message here, but I'll do that separately.
2508
2509 2007-01-03  Nikolas Zimmermann  <zimmermann@kde.org>
2510
2511         Reviewed by Timothy.
2512
2513         Fix inspection of RenderSVGInlineText objects (#text nodes in SVG documents).
2514
2515         * WebInspector/WebInspector.m:
2516         (-[WebInspector _highlightNode:]):
2517
2518 2007-01-02  Beth Dakin  <bdakin@apple.com>
2519
2520         Reviewed by Darin.
2521
2522         Fix bug with WebCore context menu item "Copy Image."
2523
2524         * WebCoreSupport/WebContextMenuClient.mm:
2525         (WebContextMenuClient::copyImageToClipboard): We must call 
2526         declareTypes on the pasteboard.
2527
2528 2006-12-27  Mitz Pettel  <mitz@webkit.org>
2529
2530         Reviewed by Geoff.
2531
2532         - fix http://bugs.webkit.org/show_bug.cgi?id=9403
2533           Red outline from Web Inspector appears above all other OS X windows
2534
2535         Made the window containing the highlight a child window of the window
2536         containing the view.
2537
2538         * WebInspector/WebNodeHighlight.m:
2539         (-[WebNodeHighlight initWithBounds:andRects:forView:]):
2540         (-[WebNodeHighlight dealloc]):
2541         (-[WebNodeHighlight expire]):
2542
2543 2006-12-27  Matt Lilek  <pewtermoose@gmail.com>
2544
2545         Reviewed by Tim H.
2546         
2547         Bug 11993: REGRESSION(r18320): Web Inspector scroll bars not drawn
2548         http://bugs.webkit.org/show_bug.cgi?id=11993
2549         
2550         AppleVerticalScrollbar tries to set a NaN value as the scroll height which
2551         causes DOM Exceptions after r18320.  This overrides the _setObjectLength
2552         method and checks for NaN until a system update can fix this.  See rdar://4901491
2553
2554         * WebInspector/webInspector/inspector.html:
2555         * WebInspector/webInspector/inspector.js:
2556
2557 2006-12-27  Geoffrey Garen  <ggaren@apple.com>
2558
2559         Reviewed by Oliver Hunt.
2560         
2561         Fixed <rdar://problem/4901629> Crash occurs at WebCore::Frame::page() 
2562         after closing window containing flash content
2563         
2564         No testcase because we can't open and close windows in DRT.
2565         
2566         I can't reproduce this crash, but from the backtrace it's clear that it 
2567         occured because of a NULL frame object. Since it's valid for a frame to
2568         be NULL, I've added NULL checks.
2569
2570         * Plugins/WebBaseNetscapePluginView.mm:
2571         (-[WebBaseNetscapePluginView sendEvent:]):
2572         (-[WebBaseNetscapePluginView requestWithURLCString:]):
2573         (-[WebBaseNetscapePluginView getVariable:value:]):
2574
2575 2006-12-27  Geoffrey Garen  <ggaren@apple.com>
2576
2577         Reviewed by Darin Adler.
2578         
2579         Updated <rdar://problem/4871518> fix based on Darin's comments.
2580
2581         Instead of searching the frame tree to retrieve the new frame, put it in
2582         a RefPtr, and then explicitly check for its removal. This option is slightly
2583         more efficient, and it avoids problems that can occur due to frame name collision.
2584         
2585         * WebCoreSupport/WebFrameBridge.mm:
2586         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
2587
2588 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
2589
2590         Reviewed by Eric Seidel.
2591
2592         Fixed <rdar://problem/4740328> Safari crash on quit in _NPN_ReleaseObject 
2593         from KJS::Bindings::CInstance::~CInstance
2594         
2595         The essence of this change is that WebKit shouldn't meddle in plug-in
2596         lifetime, since WebCore already manages it. The rest is details.
2597         
2598         * Plugins/WebBaseNetscapePluginView.mm:
2599         (-[WebBaseNetscapePluginView removeTrackingRect]): Autorelease our window
2600         instead of releasing it, since we might hold the last reference to our window,
2601         and releasing it immediately would crash AppKit.
2602         (-[WebBaseNetscapePluginView resetTrackingRect]):
2603
2604         * Plugins/WebNetscapePluginEmbeddedView.h:
2605         * Plugins/WebNetscapePluginEmbeddedView.m:
2606         (-[WebNetscapePluginEmbeddedView dataSource]): Use our DOMElement to access
2607         our WebFrame, since we don't keep around a direct pointer to our WebFrame
2608         anymore.
2609
2610         * Plugins/WebNullPluginView.h:
2611         * Plugins/WebNullPluginView.m:
2612         (-[WebNullPluginView initWithFrame:error:DOMElement:]):
2613         (-[WebNullPluginView dealloc]):
2614         (-[WebNullPluginView viewDidMoveToWindow]): Use our DOMElement to access
2615         our WebFrame, as above.
2616
2617         * WebCoreSupport/WebFrameBridge.mm: Don't call _addPlugInView because it
2618         doesn't exist anymore. Do pass a DOMElement to WebNullPluginView's initializer,
2619         so it can access its frame like WebNetscapePluginEmbeddedView does.
2620         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
2621         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
2622
2623         * WebCoreSupport/WebFrameLoaderClient.h:
2624         * WebCoreSupport/WebFrameLoaderClient.mm: Removed didCloseDocument. It had
2625         two purposes -- one unnecessary, one harmful:
2626         (1) NULL out plug-ins' weak references to their frames. Unnecessary. Having 
2627         plug-ins access their frames through their DOM elements solves this problem.
2628         (2) Unload plug-ins. Harmful. If a plug-in unloads before WebCore is done
2629         with it, WebCore will access unmapped memory. Also unnecessary. WebCore
2630         Widgets take care of calling -removeFromSuperview on their NSViews, which
2631         is sufficient for stopping plug-ins.
2632
2633         * WebKit.xcodeproj/project.pbxproj: Made WebNullPluginView.m ObjC++.
2634
2635         * WebView/WebFrame.mm: Removed _addPlugInView, since it was only used to
2636         call -setWebFrame, which is gone.
2637         (-[WebFramePrivate dealloc]):
2638         * WebView/WebFrameInternal.h: Removed plugInViews, since it was only used
2639         by _addPlugInView, which is gone.
2640
2641 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
2642
2643         Reviewed by Eric Seidel.
2644
2645         Some cleanup in preparation for fixing <rdar://problem/4740328> Safari 
2646         crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance
2647         
2648         Renamed "installedPlugins" to "sharedDatabase." This better follows 
2649         the Cocoa naming scheme, and calls out the key attribute that produced this 
2650         crash -- namely, that the database is shared throughout the process.
2651         
2652         -installedPlugins is actually a part of SPI, but a global search showed
2653         that it had no users.
2654
2655         * Plugins/WebPluginDatabase.h:
2656         * Plugins/WebPluginDatabase.m:
2657         (+[WebPluginDatabase sharedDatabase]):
2658         (-[WebPluginDatabase refresh]):
2659         (-[WebPluginDatabase _plugInPaths]):
2660         (-[WebPluginDatabase _removePlugin:]):
2661         * WebCoreSupport/WebViewFactory.m:
2662         (-[WebViewFactory pluginsInfo]):
2663         (-[WebViewFactory refreshPlugins:]):
2664         (-[WebViewFactory pluginSupportsMIMEType:]):
2665         * WebView/WebView.mm:
2666         (+[WebView _supportedMIMETypes]):
2667         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2668         (-[WebView _close]):
2669         (-[WebView _pluginForMIMEType:]):
2670         (-[WebView _pluginForExtension:]):
2671         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
2672
2673 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
2674
2675         Reviewed by Adam Roben.
2676         
2677         Fixed <rdar://problem/4778898> REGRESSION: crash in getInstanceForView() 
2678         when quitting from kcbs.com
2679
2680         No testcase because we can't open and close windows in DRT.
2681
2682         The crash was caused by deallocating plug-ins that were later referenced
2683         in the unload event handler.
2684
2685         * Plugins/WebBaseNetscapePluginView.mm: Don't call stop on ourselves because
2686         we may destroy our plugin before the unload handler fires. Also, we don't
2687         need to, since didCloseDocument will do it for us.
2688
2689         (-[WebBaseNetscapePluginView addWindowObservers]): We don't need to listen
2690         for windowWillClose anymore, since we don't want to call -stop on ourselves.
2691         (-[WebBaseNetscapePluginView removeWindowObservers]): ditto.
2692
2693         * WebCoreSupport/WebFrameLoaderClient.h:
2694         * WebCoreSupport/WebFrameLoaderClient.mm:
2695         (WebFrameLoaderClient::didCloseDocument): Renamed from "willCloseDocument."
2696
2697 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
2698
2699         More "plugin" => "pluginPackage" renaming that I forgot to check in.
2700         
2701         * Plugins/WebBaseNetscapePluginView.h:
2702         * Plugins/WebBaseNetscapePluginView.mm:
2703         (-[WebBaseNetscapePluginView setPluginPackage:]):
2704         * Plugins/WebNetscapePluginEmbeddedView.h:
2705         * Plugins/WebNetscapePluginEmbeddedView.m:
2706         (-[WebNetscapePluginEmbeddedView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
2707         * WebCoreSupport/WebFrameBridge.mm:
2708         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
2709         (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
2710
2711 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
2712
2713         Reviewed by Eric Seidel.
2714         
2715         Fixed crash when opening view source window.
2716
2717         * WebView/WebView.mm:
2718         (-[WebView initWithCoder:]): Don't use the WebView until calling
2719         _commonInitialization...
2720
2721 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
2722
2723         Reviewed by Oliver Hunt.
2724         
2725         Removed WebCoreSettings, cleaned up WebCore::Settings.
2726
2727         * WebView/WebFrame.mm: Added helper functions for converting between
2728         WebKitEditableLinkBehavior and WebCore::EditableLinkBehavior. I'm not sure
2729         that this is the best place for these functions, but it's where all the
2730         other functions like them reside.
2731         (core):
2732         (kit):
2733         * WebView/WebFrameInternal.h:
2734
2735         * WebView/WebView.mm: Removed uses of WebCoreSettings. Replaced with direct
2736         use of underlying page's settings.
2737
2738 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
2739
2740         Reviewed by Oliver Hunt.
2741         
2742         Some refactoring in preparation for fixing <rdar://problem/4778898> 
2743         REGRESSION: crash in getInstanceForView() when quitting from kcbs.com
2744         
2745         Two renames:
2746             - "plugin" => "pluginPackage" (since the type is WebNetscapePluginPackage *)
2747             - "instance" and/or "pluginPointer" => plugin (since NPP is an opaque handle to a plug-in)
2748         
2749         Removed braces around single-line 'if' statements.
2750         
2751         Made plugin a pointer instead of an inline ivar. This allows us to NULL
2752         it out once we call NPP_Destroy on it.
2753         
2754         Added helper functions for creating and destroying plugin. The destroy function
2755         NULLs out plugin, which helps with debugging.
2756             
2757         (-[WebBaseNetscapePluginView willCallPlugInFunction]): Added an ASSERT
2758         to catch attempts to call functions on destroyed plug-ins.
2759
2760         (-[WebBaseNetscapePluginView _createPlugin]): New helper function.
2761         (-[WebBaseNetscapePluginView _destroyPlugin]): New helper function.
2762
2763 2006-12-24  David Kilzer  <ddkilzer@webkit.org>
2764
2765         Removed empty directory.
2766
2767         * WebKit/Loader: Removed.
2768
2769 2006-12-22  Geoffrey Garen  <ggaren@apple.com>
2770
2771         Reviewed by Brady Eidson.
2772         
2773         Fixed <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
2774         (WebCore::FrameLoader::loadSubframe)
2775
2776         * WebCoreSupport/WebFrameBridge.mm:
2777         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
2778         - The fix: 
2779             Changed to re-fetch the child frame we're trying to load before returning it,
2780             since its onload handler may have removed it from the document. This
2781             allows us to treat a removed frame like a frame that never loaded.
2782         
2783         - Plus some cleanup:
2784             - Changed to return a WebCore::Frame* instead of a WebFrameBridge *,
2785             to simplify some code.
2786             - Grouped ObjC objects by usage, and moved calls to -release so that they
2787             immediately follow the calls that retain.
2788
2789 2006-12-21  John Sullivan  <sullivan@apple.com>
2790
2791         Reviewed by Geoff Garen
2792
2793         - improved concept and implementation of my previous checkin after discussing with Darin
2794
2795         * WebView/WebViewPrivate.h:
2796         * WebView/WebView.mm:
2797         (-[WebView setHoverFeedbackSuspended:]):
2798         renamed from setIgnoresMouseMovedEvents, and now tells the main WebHTMLView (if any) that this state has
2799         changed. Telling just the main WebHTMLView is a bit of an implementation hack. Hopefully someday we can
2800         rework the document architecture and make this kind of thing less hacky (but this is following existing
2801         customs, so I don't feel too bad)
2802         (-[WebView isHoverFeedbackSuspended]):
2803         renamed from ignoresMouseMovedEvents
2804
2805         * WebView/WebHTMLViewInternal.h:
2806         declare _hoverFeedbackSuspendedChanged
2807
2808         * WebView/WebHTMLView.m:
2809         (-[WebHTMLView _updateMouseoverWithEvent:]):
2810         test the webView's state of the hit-tested WebHTMLView rather than self 
2811         (-[WebHTMLView _hoverFeedbackSuspendedChanged]):
2812         generate a fake mouse-moved event, which simulates the mouse moving away from
2813         the current element or back over it
2814
2815 2006-12-21  Darin Adler  <darin@apple.com>
2816
2817         Reviewed by Oliver.
2818
2819         * WebInspector/webInspector/inspector.js: Added default values for the new CSS
2820         properties so they don't appear in the inspector when their values are
2821         uninteresting.
2822
2823 2006-12-21  John Sullivan  <sullivan@apple.com>
2824
2825         Reviewed by Geoff Garen
2826
2827         - added WebKit support for making a web page temporarily ignore mouse movements
2828
2829         * WebView/WebViewPrivate.h:
2830         declare ignoresMouseMovedEvents and setIgnoresMouseMovedEvents:
2831
2832         * WebView/WebView.mm:
2833         added ignoresMouseMovedEvents boolean field to _private data structure
2834         (-[WebView setIgnoresMouseMovedEvents:]):
2835         set new boolean field
2836         (-[WebView ignoresMouseMovedEvents]):
2837         return new boolean field
2838
2839         * WebView/WebHTMLView.m:
2840         (-[WebHTMLView _updateMouseoverWithEvent:]):
2841         bail out right away if [[self _webView] ignoresMouseMovedEvents]
2842
2843 2006-12-21  Mark Rowe  <bdash@webkit.org>
2844
2845         Reviewed by Geoff.
2846
2847         http://bugs.webkit.org/show_bug.cgi?id=11888
2848         Bug 11888: REGRESSION (r18320): Web Inspector panes broken
2849
2850         * WebInspector/webInspector/inspector.js: Use removeProperty to reset a style property to its
2851         initial value.  Bail out early from updateNodePane if Inspector has not yet been set.
2852
2853 2006-12-19  John Sullivan  <sullivan@apple.com>
2854
2855         Reviewed by Darin
2856
2857         - fix for unrepro infinite recursion bug:
2858         <rdar://problem/4448181> CrashTracer: 154 crashes in Safari at com.apple.AppKit: 
2859         -[NSView isDescendantOf:] + 24; infinite recursion in makeFirstResponder logic
2860
2861         * WebView/WebView.mm:
2862         added becomingFirstResponder BOOL to private struct
2863         (-[WebView becomeFirstResponder]):
2864         use _private->becomingFirstResponder to guard against infinite recursion; complain on
2865         debug builds if we run into this problem
2866
2867 2006-12-19  Timothy Hatcher  <timothy@apple.com>
2868
2869         Reviewed by Darin.
2870
2871         <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features
2872
2873         * WebKit.xcodeproj/project.pbxproj:
2874
2875 2006-12-18  Ada Chan  <adachan@apple.com>
2876
2877         Reviewed by Adam.
2878         
2879         Moved canRunBeforeUnloadConfirmPanel, runBeforeUnloadConfirmPanel, and closeWindowSoon
2880         from WebCoreFrameBridge to Chrome.
2881
2882         * COM/ChromeClientWin.cpp:
2883         (ChromeClientWin::canRunBeforeUnloadConfirmPanel):
2884         (ChromeClientWin::runBeforeUnloadConfirmPanel):
2885         (ChromeClientWin::closeWindowSoon):
2886         * COM/ChromeClientWin.h:
2887         * WebCoreSupport/WebChromeClient.h:
2888         * WebCoreSupport/WebChromeClient.mm:
2889         (WebChromeClient::canRunBeforeUnloadConfirmPanel):
2890         (WebChromeClient::runBeforeUnloadConfirmPanel):
2891         (WebChromeClient::closeWindowSoon):
2892         * WebCoreSupport/WebFrameBridge.mm:
2893
2894 2006-12-18  Alice Liu  <alice.liu@apple.com>
2895
2896         Reviewed by Adam.
2897
2898         Have the Editor handle deletion instead of WebHTMLView
2899
2900         * WebKitPrefix.h:
2901         Turned on WebCore deletion
2902
2903         * WebView/WebHTMLViewInternal.h:
2904         Moved ownership of startNewKillRingSequence to the WebCore::Editor
2905
2906         * WebView/WebHTMLView.m:
2907         (-[NSArray becomeFirstResponder]):
2908         Use the Editor's startNewKillRingSequence flag
2909
2910         (-[NSArray deleteForward:]):
2911         (-[NSArray deleteBackward:]):
2912         (-[NSArray deleteWordForward:]):
2913         (-[NSArray deleteWordBackward:]):
2914         (-[NSArray deleteToBeginningOfLine:]):
2915         (-[NSArray deleteToEndOfLine:]):
2916         (-[NSArray deleteToBeginningOfParagraph:]):
2917         (-[NSArray deleteToEndOfParagraph:]):
2918         (-[NSArray deleteToMark:]):
2919         use Editor::deleteWithDirection instead of WebHTMLView's
2920
2921 2006-12-16  Adele Peterson  <adele@apple.com>
2922
2923         Reviewed by Adam.
2924
2925         WebKit part of fix for:
2926         <rdar://problem/4463829> Switch to use new search field implementation for <input type="search">
2927
2928         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Initialize WKDrawTextFieldCellFocusRing.
2929         * WebInspector/webInspector/inspector.css: Set -webkit-user-select:text and text-shadow:none on the search field.
2930           These are both properties that we didn't honor in the old control, and the inherited values didn't work or look right.
2931
2932 2006-12-16  Beth Dakin  <bdakin@apple.com>
2933
2934         Reviewed by Adam.
2935
2936         WebKit side of making WebCore context menus support state and
2937         enabled/disabled.
2938
2939         * WebCoreSupport/WebContextMenuClient.h: contextMenuItemSelected
2940         takes a pointer to the parentMenu now since menu items no longer
2941         hold onto it.
2942         * WebCoreSupport/WebContextMenuClient.mm: Same.
2943         (WebContextMenuClient::contextMenuItemSelected): Same.
2944         * WebView/WebHTMLView.m: Must call setAutoenablesItems:NO on our
2945         menu.
2946         (-[NSArray menuForEvent:]):
2947         * WebView/WebUIDelegatePrivate.h: No need for if-def.
2948
2949 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
2950
2951         Reviewed by Geoff.
2952
2953         Update for WebCore changes.
2954         
2955         * WebCoreSupport/WebFrameLoaderClient.h:
2956         * WebCoreSupport/WebFrameLoaderClient.mm:
2957         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
2958         * WebView/WebDataSource.mm:
2959         (-[WebDataSource response]):
2960
2961 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
2962
2963         Reviewed by Darin.
2964
2965         Update for WebCore changes.
2966         
2967         * WebCoreSupport/WebFrameLoaderClient.h:
2968         * WebCoreSupport/WebFrameLoaderClient.mm:
2969         (WebFrameLoaderClient::willUseArchive):
2970         * WebView/WebDataSource.mm:
2971         (-[WebDataSource _URLForHistory]):
2972
2973 2006-12-15  Marvin Decker  <marv.decker@gmail.com>
2974
2975         Reviewed by Darin and Alexey.
2976
2977         Fix the Windows build, move various Client implementations out of
2978         WebCore and into WebKit.
2979
2980         * COM/ChromeClientWin.cpp: Added.
2981         (ChromeClientWin::~ChromeClientWin):
2982         (ChromeClientWin::chromeDestroyed):
2983         (ChromeClientWin::setWindowRect):
2984         (ChromeClientWin::windowRect):
2985         (ChromeClientWin::pageRect):
2986         (ChromeClientWin::scaleFactor):
2987         (ChromeClientWin::focus):
2988         (ChromeClientWin::unfocus):
2989         (ChromeClientWin::createWindow):
2990         (ChromeClientWin::createModalDialog):
2991         (ChromeClientWin::show):
2992         (ChromeClientWin::canRunModal):
2993         (ChromeClientWin::runModal):
2994         (ChromeClientWin::setToolbarsVisible):
2995         (ChromeClientWin::toolbarsVisible):
2996         (ChromeClientWin::setStatusbarVisible):
2997         (ChromeClientWin::statusbarVisible):
2998         (ChromeClientWin::setScrollbarsVisible):
2999         (ChromeClientWin::scrollbarsVisible):
3000         (ChromeClientWin::setMenubarVisible):
3001         (ChromeClientWin::menubarVisible):
3002         (ChromeClientWin::setResizable):
3003         (ChromeClientWin::addMessageToConsole):
3004         * COM/ChromeClientWin.h: Added.
3005         * COM/ContextMenuClientWin.cpp: Added.
3006         (ContextMenuClientWin::~ContextMenuClientWin):
3007         (ContextMenuClientWin::contextMenuDestroyed):
3008         (ContextMenuClientWin::addCustomContextMenuItems):
3009         (ContextMenuClientWin::contextMenuItemSelected):
3010         (ContextMenuClientWin::copyLinkToClipboard):
3011         (ContextMenuClientWin::downloadURL):
3012         (ContextMenuClientWin::copyImageToClipboard):
3013         (ContextMenuClientWin::lookUpInDictionary):
3014         (ContextMenuClientWin::speak):
3015         (ContextMenuClientWin::stopSpeaking):
3016         * COM/ContextMenuClientWin.h: Added.
3017         * COM/EditorClientWin.cpp: Added.
3018         (EditorClientWin::~EditorClientWin):
3019         (EditorClientWin::pageDestroyed):
3020         (EditorClientWin::shouldDeleteRange):
3021         (EditorClientWin::shouldShowDeleteInterface):
3022         (EditorClientWin::smartInsertDeleteEnabled):
3023         (EditorClientWin::isContinuousSpellCheckingEnabled):
3024         (EditorClientWin::toggleContinuousSpellChecking):
3025         (EditorClientWin::isGrammarCheckingEnabled):
3026         (EditorClientWin::toggleGrammarChecking):
3027         (EditorClientWin::spellCheckerDocumentTag):
3028         (EditorClientWin::selectWordBeforeMenuEvent):
3029         (EditorClientWin::isEditable):
3030         (EditorClientWin::shouldBeginEditing):
3031         (EditorClientWin::shouldEndEditing):
3032         (EditorClientWin::shouldInsertNode):
3033         (EditorClientWin::shouldInsertText):
3034         (EditorClientWin::shouldApplyStyle):
3035         (EditorClientWin::didBeginEditing):
3036         (EditorClientWin::respondToChangedContents):
3037         (EditorClientWin::didEndEditing):
3038         (EditorClientWin::registerCommandForUndo):
3039         (EditorClientWin::registerCommandForRedo):
3040         (EditorClientWin::clearUndoRedoOperations):
3041         (EditorClientWin::canUndo):
3042         (EditorClientWin::canRedo):
3043         (EditorClientWin::undo):
3044         (EditorClientWin::redo):
3045         * COM/EditorClientWin.h: Added.
3046         * COM/WebFrame.cpp:
3047         (WebFrame::WebFrame):
3048         (WebFrame::initWithName):
3049         * COM/WebFrame.h:
3050         * COM/WebFrameLoaderClient.cpp: Added.
3051         (WebFrameLoaderClient::WebFrameLoaderClient):
3052         (WebFrameLoaderClient::~WebFrameLoaderClient):
3053         (WebFrameLoaderClient::frameLoaderDestroyed):
3054         (WebFrameLoaderClient::hasWebView):
3055         (WebFrameLoaderClient::hasFrameView):
3056         (WebFrameLoaderClient::hasBackForwardList):
3057         (WebFrameLoaderClient::resetBackForwardList):
3058         (WebFrameLoaderClient::provisionalItemIsTarget):
3059         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
3060         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
3061         (WebFrameLoaderClient::privateBrowsingEnabled):
3062         (WebFrameLoaderClient::makeDocumentView):
3063         (WebFrameLoaderClient::makeRepresentation):
3064         (WebFrameLoaderClient::forceLayout):
3065         (WebFrameLoaderClient::forceLayoutForNonHTML):
3066         (WebFrameLoaderClient::updateHistoryForCommit):
3067         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
3068         (WebFrameLoaderClient::updateHistoryForReload):
3069         (WebFrameLoaderClient::updateHistoryForStandardLoad):
3070         (WebFrameLoaderClient::updateHistoryForInternalLoad):
3071         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
3072         (WebFrameLoaderClient::setCopiesOnScroll):
3073         (WebFrameLoaderClient::tokenForLoadErrorReset):
3074         (WebFrameLoaderClient::resetAfterLoadError):
3075         (WebFrameLoaderClient::doNotResetAfterLoadError):
3076         (WebFrameLoaderClient::willCloseDocument):
3077         (WebFrameLoaderClient::detachedFromParent1):
3078         (WebFrameLoaderClient::detachedFromParent2):
3079         (WebFrameLoaderClient::detachedFromParent3):
3080         (WebFrameLoaderClient::detachedFromParent4):
3081         (WebFrameLoaderClient::loadedFromPageCache):
3082         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
3083         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3084         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
3085         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
3086         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3087         (WebFrameLoaderClient::dispatchWillClose):
3088         (WebFrameLoaderClient::dispatchDidReceiveIcon):
3089         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3090         (WebFrameLoaderClient::dispatchDidReceiveTitle):
3091         (WebFrameLoaderClient::dispatchDidCommitLoad):
3092         (WebFrameLoaderClient::dispatchDidFinishLoad):
3093         (WebFrameLoaderClient::dispatchDidFirstLayout):
3094         (WebFrameLoaderClient::dispatchShow):
3095         (WebFrameLoaderClient::cancelPolicyCheck):
3096         (WebFrameLoaderClient::dispatchWillSubmitForm):
3097         (WebFrameLoaderClient::dispatchDidLoadMainResource):
3098         (WebFrameLoaderClient::clearLoadingFromPageCache):
3099         (WebFrameLoaderClient::isLoadingFromPageCache):
3100         (WebFrameLoaderClient::revertToProvisionalState):
3101         (WebFrameLoaderClient::clearUnarchivingState):
3102         (WebFrameLoaderClient::progressStarted):
3103         (WebFrameLoaderClient::progressCompleted):
3104         (WebFrameLoaderClient::setMainFrameDocumentReady):
3105         (WebFrameLoaderClient::willChangeTitle):
3106         (WebFrameLoaderClient::didChangeTitle):
3107         (WebFrameLoaderClient::finishedLoading):
3108         (WebFrameLoaderClient::finalSetupForReplace):
3109         (WebFrameLoaderClient::setDefersLoading):
3110         (WebFrameLoaderClient::isArchiveLoadPending):
3111         (WebFrameLoaderClient::cancelPendingArchiveLoad):
3112         (WebFrameLoaderClient::clearArchivedResources):
3113         (WebFrameLoaderClient::canHandleRequest):
3114         (WebFrameLoaderClient::canShowMIMEType):
3115         (WebFrameLoaderClient::representationExistsForURLScheme):
3116         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
3117         (WebFrameLoaderClient::frameLoadCompleted):
3118         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
3119         (WebFrameLoaderClient::provisionalLoadStarted):
3120         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
3121         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
3122         (WebFrameLoaderClient::didFinishLoad):
3123         (WebFrameLoaderClient::prepareForDataSourceReplacement):
3124         (WebFrameLoaderClient::setTitle):
3125         (WebFrameLoaderClient::userAgent):
3126         * COM/WebFrameLoaderClient.h: Added.
3127         * COM/WebKitDLL.h:
3128         * WebKit.vcproj/WebKit.vcproj:
3129
3130 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3131
3132         Reviewed by Darin.
3133
3134         Include ResourceError.h.
3135         
3136         * Plugins/WebNetscapePluginStream.mm:
3137         * WebKit.xcodeproj/project.pbxproj:
3138
3139 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
3140
3141         Reviewed by Maciej.
3142
3143         Update for WebCore changes.
3144         
3145         * WebCoreSupport/WebFrameLoaderClient.h:
3146         * WebCoreSupport/WebFrameLoaderClient.mm:
3147         (WebFrameLoaderClient::incrementProgress):
3148         (WebFrameLoaderClient::committedLoad):
3149         (WebFrameLoaderClient::deliverArchivedResources):
3150         * WebView/WebView.mm:
3151         (-[WebView _incrementProgressForIdentifier:length:]):
3152         * WebView/WebViewInternal.h:
3153
3154 2006-12-14  Timothy Hatcher  <timothy@apple.com>
3155
3156         Reviewed by Darin.
3157
3158         <rdar://problem/4827549> need NSRange-based selection support exposed.
3159
3160         * WebView/WebFrame.mm:
3161         (-[WebFrame _selectedNSRange]):
3162         (-[WebFrame _selectNSRange:]):
3163         * WebView/WebFramePrivate.h:
3164
3165 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
3166
3167         Reviewed by John.
3168
3169         Update for WebCore changes.
3170         
3171         * WebCoreSupport/WebFrameLoaderClient.h:
3172         * WebCoreSupport/WebFrameLoaderClient.mm:
3173         (WebFrameLoaderClient::dispatchDidFailLoading):
3174         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
3175         (WebFrameLoaderClient::dispatchDidFailLoad):
3176         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
3177         (WebFrameLoaderClient::setMainDocumentError):
3178         (WebFrameLoaderClient::cancelledError):
3179         (WebFrameLoaderClient::cannotShowURLError):
3180         (WebFrameLoaderClient::interruptForPolicyChangeError):
3181         (WebFrameLoaderClient::cannotShowMIMETypeError):
3182         (WebFrameLoaderClient::fileDoesNotExistError):
3183         (WebFrameLoaderClient::shouldFallBack):
3184
3185 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
3186
3187         Reviewed by Anders.
3188         
3189         - adjusted for changes from NSURLRequest to ResourceRequest
3190
3191         * Plugins/WebPluginController.mm:
3192         * WebCoreSupport/WebFrameLoaderClient.h:
3193         * WebCoreSupport/WebFrameLoaderClient.mm:
3194         (WebFrameLoaderClient::updateHistoryForReload):
3195         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
3196         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
3197         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3198         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3199         (WebFrameLoaderClient::startDownload):
3200         (WebFrameLoaderClient::cannotShowURLError):
3201         (WebFrameLoaderClient::createDocumentLoader):
3202         * WebView/WebDataSource.mm:
3203         (-[WebDataSource _initWithDocumentLoader:]):
3204         (-[WebDataSource initialRequest]):
3205         (-[WebDataSource request]):
3206         * WebView/WebDocumentLoaderMac.h:
3207         * WebView/WebDocumentLoaderMac.mm:
3208         (WebDocumentLoaderMac::WebDocumentLoaderMac):
3209         * WebView/WebFrame.mm:
3210         (-[WebFrame _createItem:]):
3211         (-[WebFrame _loadItem:withLoadType:]):
3212         (-[WebFrame loadArchive:]):
3213
3214 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
3215
3216         Reviewed by Darin.
3217
3218         * WebCoreSupport/WebFrameLoaderClient.h:
3219         * WebCoreSupport/WebFrameLoaderClient.mm:
3220         (WebFrameLoaderClient::download):
3221         Get the handle and proxy from the ResourceHandle now that they aren't passed to us.
3222         
3223 2006-12-11  Darin Adler  <darin@apple.com>
3224
3225         Reviewed by Brady.
3226
3227         - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
3228
3229         * WebCoreSupport/WebFrameBridge.h: Updated for change to WebCoreKeyboardAccess.
3230         * WebCoreSupport/WebFrameBridge.mm:
3231         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Ditto.
3232         (-[WebFrameBridge keyboardUIMode]): Ditto.
3233
3234 2006-12-11  Beth Dakin  <bdakin@apple.com>
3235
3236         Reviewed by Adam.
3237
3238         WebKit support for editing sub-menu actions.
3239
3240         * WebCoreSupport/WebContextMenuClient.h: New functions for the
3241         speech sub-menu.
3242         * WebCoreSupport/WebContextMenuClient.mm:
3243         (WebContextMenuClient::speak):
3244         (WebContextMenuClient::stopSpeaking):
3245         * WebCoreSupport/WebEditorClient.h: New functions to toggle
3246         spelling/grammar checking.
3247         * WebCoreSupport/WebEditorClient.mm:
3248         (WebEditorClient::toggleContinuousSpellChecking):
3249         (WebEditorClient::toggleGrammarChecking):
3250         * WebView/WebUIDelegatePrivate.h: Re-named some of the spelling
3251         sub-menu tags.
3252
3253 2006-12-11  Alice Liu  <alice.liu@apple.com>
3254
3255         Reviewed by Geoff, Adam.
3256         
3257         switch to use the Editor for copying URLs
3258
3259         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3260         (-[WebDefaultUIDelegate copyLinkToClipboard:]):
3261         Call down to the editor for this. 
3262         * WebCoreSupport/WebSystemInterface.m:
3263         (InitWebCoreSystemInterface):
3264         Add some calls necessary for Pasteboard::writeURL to work
3265
3266 2006-12-11  Darin Adler  <darin@apple.com>
3267
3268         Reviewed by Brady.
3269
3270         - http://bugs.webkit.org/show_bug.cgi?id=11794
3271           fix lifetime problems affecting Frame's ownerElement pointer
3272
3273         * WebCoreSupport/WebFrameBridge.mm:
3274         (-[WebFrameBridge finishInitializingWithPage:WebCore::frameName:frameView:ownerElement:]):
3275         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:frameView:]):
3276         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
3277         Use HTMLFrameOwnerElement.
3278
3279         * WebCoreSupport/WebFrameLoaderClient.mm: Include the relevant headers for the
3280         HTMLFormElement class.
3281
3282         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way.
3283
3284         * WebView/WebFrame.mm: (-[WebFrame frameElement]): Update includes and types for the
3285         change in return type of ownerElement.
3286
3287 2006-12-11  David Harrison  <harrison@apple.com>
3288
3289         Fix previous checkin where I committed the wrong file.
3290
3291         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
3292
3293         * WebView/WebFrame.mm:
3294         (-[WebFrame frameElement]):
3295         Add nil check.
3296         
3297         * WebView/WebPreferences.m:
3298         (-[WebPreferences editableLinkBehavior]):
3299         Reverted to previous.
3300
3301 2006-12-08  David Hyatt  <hyatt@apple.com>
3302
3303         Land new ICU abstraction layer.  Patch by Lars.
3304
3305         Reviewed by me
3306
3307         * ForwardingHeaders/wtf/icu/UnicodeIcu.h: Added.
3308         * ForwardingHeaders/wtf/unicode/Unicode.h: Added.
3309         * WebKit.xcodeproj/project.pbxproj:
3310
3311 === Safari-521.32 ===
3312
3313 2006-12-08  Timothy Hatcher  <timothy@apple.com>
3314
3315         Rolling out a change that broke Mail stationary.
3316         <rdar://problem/4699166> REGRESSION: Background images in Mail stationery do not load
3317
3318         * WebView/WebUnarchivingState.m:
3319         (-[WebUnarchivingState archivedResourceForURL:]):
3320
3321 2006-12-08  Don Gibson  <dgibson77@gmail.com>
3322
3323         Reviewed and landed by Alexey.
3324
3325         http://bugs.webkit.org/show_bug.cgi?id=11759:
3326         Windows build bustage
3327
3328         * COM/WebFrame.cpp:
3329         (WebFrame::loadDataSource):
3330         * COM/WebFrame.h:
3331
3332 2006-12-08  David Harrison  <harrison@apple.com>
3333
3334         Reviewed by Brady.
3335
3336         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
3337
3338         * WebView/WebPreferences.m:
3339         (-[WebPreferences editableLinkBehavior]):
3340         Add nil check.
3341
3342 2006-12-07  Beth Dakin  <bdakin@apple.com>
3343
3344         Reviewed by Brady.
3345
3346         Build fix for WebCore ContextMenus. It got broken by r18046.
3347
3348         * WebView/WebHTMLView.m:
3349         (-[NSArray menuForEvent:]):
3350
3351 2006-12-07  Beth Dakin  <bdakin@apple.com>
3352
3353         Reviewed by Brady.
3354
3355         Make some parameters const and const references.
3356
3357         * WebCoreSupport/WebContextMenuClient.h:
3358         * WebCoreSupport/WebContextMenuClient.mm:
3359         (WebContextMenuClient::contextMenuItemSelected):
3360         (WebContextMenuClient::copyLinkToClipboard):
3361         (WebContextMenuClient::downloadURL):
3362         (WebContextMenuClient::copyImageToClipboard):
3363
3364 2006-12-06  Brady Eidson  <beidson@apple.com>
3365
3366         Reviewed by John Sullivan
3367
3368         Fixes http://bugs.webkit.org/show_bug.cgi?id=11675 and <rdar://4857669>
3369         Now we need to explicitly set the data source when loading from a page cache
3370
3371         * History/WebHistoryItem.mm:
3372         (-[WebHistoryItem _scheduleRelease]): Enhanced a logging message
3373         (+[WebHistoryItem _releasePageCache:]): Ditto
3374         (+[WebHistoryItem _releaseAllPendingPageCaches]): Ditto
3375         * WebCoreSupport/WebFrameLoaderClient.mm:
3376         (WebFrameLoaderClient::setDocumentViewFromPageCache): Reset the View's DataSource from the cache, effectively reopening it
3377         * WebView/WebHTMLView.m:
3378         (-[NSArray setDataSource:]): Properly Handle resetting the DataSource and "reopening" the view
3379
3380 2006-12-06  Brady Eidson  <beidson@apple.com>
3381
3382         Reviewed by Adam and Oliver
3383
3384         While working on http://bugs.webkit.org/show_bug.cgi?id=11675 I
3385         decided to fix much of the null-deref problems that creeped in via 
3386         the loader refactoring.  This isn't changing behavior, just reintroducing
3387         the free nil checking we used to have with pure ObjC
3388
3389         * WebView/WebHTMLView.m:
3390         (-[NSArray menuForEvent:]):  Explicitly check for null frames
3391         (-[NSArray mouseDown:]):  Ditto
3392         (-[NSArray mouseDragged:]):  Ditto
3393         (-[NSArray mouseUp:]):  Ditto
3394         (-[NSArray performKeyEquivalent:]):  Ditto
3395         (-[WebHTMLView elementAtPoint:allowShadowContent:]):  Ditto
3396
3397 2006-12-05  John Sullivan  <sullivan@apple.com>
3398
3399         Reviewed by Beth
3400
3401         Updated to match Frame -> Editor changes in WebCore
3402
3403         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3404         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
3405         guessesForUngrammaticalSelection() is now in Editor
3406
3407         * WebView/WebHTMLView.m:
3408         (-[WebHTMLView _isSelectionUngrammatical]):
3409         isSelectionUngrammatical() is now in Editor
3410         (-[WebHTMLView _isSelectionMisspelled]):
3411         isSelectionMisspelled() is now in Editor
3412
3413         (-[WebHTMLView checkSpelling:]):
3414         advanceToNextMisspelling() is now in Editor
3415         (-[WebHTMLView showGuessPanel:]):
3416         ditto
3417
3418 2006-12-05  John Sullivan  <sullivan@apple.com>
3419
3420         Reviewed by Adam
3421         
3422         Old context-menu mechanism fix for:
3423         <rdar://problem/4864351> Should leave out "No Guesses Found" from context menu for bad grammar
3424
3425         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3426         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
3427         Leave out "No Guesses Found" and separator for grammar-checking case.
3428
3429 2006-12-05  John Sullivan  <sullivan@apple.com>
3430
3431         build fix
3432
3433         * WebView/WebViewPrivate.h:
3434         * WebView/WebView.mm:
3435         (-[WebView isGrammarCheckingEnabled]):
3436         define isGrammarCheckingEnabled whether on Tiger or not (just return NO on Tiger)
3437
3438 2006-12-04  John Sullivan  <sullivan@apple.com>
3439
3440         Reviewed by Darin
3441
3442         WebKit part of fix for:
3443         <rdar://problem/4817188> Context menu for bad grammar should include suggestions and "Ignore Grammar"
3444
3445         The context menu mechanism is currently in flux; the old mechanism is still in place, but an
3446         up-and-coming new mechanism is waiting in the wings. I updated both of them, but couldn't
3447         test the new mechanism because it doesn't work well enough yet. Most of this WebKit code
3448         can be deleted when the new mechanism is in place.
3449
3450         * WebView/WebUIDelegatePrivate.h:
3451         added WebMenuItemTagIgnoreGrammar
3452
3453         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3454         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
3455         added case for WebMenuItemTagIgnoreGrammar
3456         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
3457         now considers adding grammar-related items as well as spelling-related items
3458         
3459         * WebView/WebHTMLViewPrivate.h:
3460         declared _isSelectionUngrammatical
3461
3462         * WebView/WebHTMLView.m:
3463         (-[WebHTMLView _isSelectionUngrammatical]):
3464         new method, calls through to WebCore
3465         (-[WebHTMLView _ignoreGrammarFromMenu:]):
3466         new method, calls _ignoreSpellingFromMenu: since NSSpellChecker has one method for both
3467
3468         * English.lproj/Localizable.strings:
3469         updated for "Ignore Grammar" menu item title
3470
3471 2006-12-04  Darin Adler  <darin@apple.com>
3472
3473         Reviewed by Adele.
3474
3475         * WebCoreSupport/WebFrameLoaderClient.mm:
3476         (WebFrameLoaderClient::actionDictionary): Changed to use the new
3477         findEventWithKeyState function in WebCore instead of a local function
3478         in this file.
3479
3480 2006-12-04  Geoffrey Garen  <ggaren@apple.com>
3481
3482         Rolled out the WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
3483         part of my last checkin.
3484         
3485         We have to turn on support for backward compatibility mode to avoid Dashboard
3486         regressions in the short term.
3487
3488         * WebView/WebView.mm:
3489         (-[WebView _setDashboardBehavior:to:]):
3490
3491 2006-12-02  Geoffrey Garen  <ggaren@apple.com>
3492
3493         Reviewed by Darin Adler.
3494         
3495         Added SPI for enabling Dashboard backward compatibility mode. For now,
3496         we enable it unconditionally for Dashboard and Dashcode. Once they 
3497         implement specific support for the backward compatibility mode behavior,
3498         we can change that.
3499         
3500         Set the default WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
3501         to YES in order to turn this code on.
3502
3503         * WebView/WebView.mm:
3504         (-[WebView _setDashboardBehavior:to:]):
3505         (-[WebView _dashboardBehavior:]):
3506         * WebView/WebViewPrivate.h:
3507
3508 2006-12-04  Darin Adler  <darin@apple.com>
3509
3510         Reviewed by Alice.
3511
3512         * WebCoreSupport/WebEditorClient.h: Removed "_web_" prefix from
3513         C++ userVisibleString member function.
3514         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::userVisibleString):
3515         Ditto.
3516
3517         * WebView/WebView.mm: (-[WebView selectedFrame]): Removed extra return statement.
3518
3519 2006-12-04  Don Gibson  <dgibson77@gmail.com>
3520
3521         Reviewed and landed by Alexey.
3522
3523         http://bugs.webkit.org/show_bug.cgi?id=11738:
3524         Make link clicking work again on Windows.
3525
3526         The WebKit changes are to ignore WM_MOUSEMOVED messages when the mouse
3527         hasn't actually moved, which were preventing clicks from actually
3528         getting dispatched in many cases.  It's a peculiarity of Windows mouse
3529         handling that we receive these at all.
3530
3531         * COM/WebView.cpp:
3532         (WebView::WebView):
3533         (WebView::mouseMoved):
3534         * COM/WebView.h:
3535
3536 2006-12-04  John Sullivan  <sullivan@apple.com>
3537
3538         Reviewed by Anders
3539
3540         - fixed <rdar://problem/4857833> REGRESSION: When ctrl-clicking on a misspelled word, "Ignore Spelling" and "Learn Spelling" 
3541           menu items not displayed in the contextual menu
3542
3543         * WebView/WebHTMLView.m:
3544         (-[WebHTMLView _isSelectionMisspelled]):
3545         We were computing isSelectionMisspelled by calling WebCore, but then ignoring the result and always
3546         returning NO. D'oh!
3547
3548 2006-12-01  Beth Dakin  <bdakin@apple.com>
3549
3550         Reviewed by Adam.
3551
3552         Changes to support sub-menus in WebCore ContextMenus.
3553
3554         * WebCoreSupport/WebContextMenuClient.mm:
3555         (WebContextMenuClient::contextMenuItemSelected): 
3556         ContextMenuItem::menu() is now called parentMenu()
3557         * WebView/WebUIDelegatePrivate.h: New not-yet-API tags.
3558
3559 2006-12-01  Darin Adler  <darin@apple.com>
3560
3561         Reviewed by Mitz.
3562
3563         - fix http://bugs.webkit.org/show_bug.cgi?id=11628
3564           REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window
3565
3566         * WebCoreSupport/WebFrameLoaderClient.mm:
3567         (findKeyStateEvent): Added. Helper that finds the mouse or keyboard event in a chain
3568         of events and their underlying events.
3569         (findMouseEvent): Added. Same, but specifically for mouse events.
3570         (WebFrameLoaderClient::actionDictionary): Rewrote to use the above functions. This means we
3571         use the modifiers from the underlying events rather than just the one from the event itself.
3572         So if the event is a DOM activate event, we can still see the modifiers from the original
3573         keyboard event that triggered it. Has no effect if the event is already the right type or
3574         if there is no underlying event.
3575
3576         * WebView/WebFrame.mm: Added a newly-needed include.
3577
3578         * WebKit.xcodeproj/project.pbxproj: Xcode wants what it wants.
3579
3580 2006-12-01  Don Gibson  <dgibson77@gmail.com>
3581
3582         Reviewed by Mitz.
3583
3584         http://bugs.webkit.org/show_bug.cgi?id=11732:
3585         Windows build bustage.
3586
3587         * COM/WebFrame.cpp:
3588         (WebFrame::initWithName):
3589
3590 2006-12-01  Timothy Hatcher  <timothy@apple.com>
3591
3592         Reviewed by Adam.
3593
3594         <rdar://problem/4841432> 9A312: iWeb crashes on launch; _WebReportError missing from WebKit
3595
3596         Added back WebReportAssertionFailure and WebReportError for apps that still need these symbols.
3597
3598         * Misc/OldWebAssertions.c: Added.
3599         (WebReportAssertionFailure):
3600         (WebReportError):
3601         * WebKit.LP64.exp: added the new symbols, and sorted the file
3602         * WebKit.exp: added the new symbols, and sorted the file
3603         * WebKit.xcodeproj/project.pbxproj:
3604
3605 2006-11-30  Geoffrey Garen  <ggaren@apple.com>
3606
3607         Rubber Stamped by Anders Carlsson.
3608
3609         Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
3610         suggested a command, and conflicted with a different meaning for 'focusNode'
3611         in the Mozilla selection API.
3612
3613         * WebView/WebHTMLView.m:
3614         (-[NSArray clearFocus]):
3615
3616 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
3617
3618         Reviewed by Mitz.
3619
3620         Bug 10698: Scroll wheel causes inspector to shift up
3621         http://bugs.webkit.org/show_bug.cgi?id=10698
3622
3623         Remove size attribute from the tree popup as a workaround for
3624         http://bugs.webkit.org/show_bug.cgi?id=11362 Bug 11362: Native popup with size="1" wraps options
3625
3626         * WebInspector/webInspector/inspector.css:
3627         * WebInspector/webInspector/inspector.html:
3628
3629 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
3630
3631         Reviewed by Tim H.
3632
3633         Move web inspector style markup to javascript to fix http://bugs.webkit.org/show_bug.cgi?id=6724
3634         Bug 6724: Text copied from Web Inspector is different from actual text
3635
3636         * WebInspector/webInspector/inspector.css:
3637         * WebInspector/webInspector/inspector.js:
3638
3639 2006-11-30  Adam Roben  <aroben@apple.com>
3640
3641         Reviewed by Beth.
3642
3643         Put code in place to use WebCore context menus when they are turned
3644         on.
3645
3646         * WebView/WebHTMLView.m:
3647         (-[NSArray menuForEvent:]):
3648
3649 2006-11-29  Timothy Hatcher  <timothy@apple.com>
3650
3651         Reviewed by Oliver.
3652
3653         Keep preferences separate from the rest of the client, making sure we are using expected preference values.
3654         This lets the inspector work when plugins are disabled for the WebView.
3655
3656         * WebInspector/WebInspector.m:
3657         (-[NSWindow window]):
3658
3659 2006-11-29  Anders Carlsson  <acarlsson@apple.com>
3660
3661         Reviewed by Tim.
3662
3663         Add back methods in WebCoreStatistics that are still used by Tiger Safari.
3664         
3665         * Misc/WebCoreStatistics.h:
3666         * Misc/WebCoreStatistics.m:
3667         (+[WebCoreStatistics emptyCache]):
3668         (+[WebCoreStatistics setCacheDisabled:]):
3669
3670 2006-11-28  Alice Liu  <alice.liu@apple.com>
3671
3672         Reviewed by Maciej.
3673
3674         A fix for a couple failing layout tests involving copy/cut in iframes.
3675
3676         * WebCoreSupport/WebEditorClient.h:
3677         * WebCoreSupport/WebEditorClient.mm:
3678         (WebEditorClient::dataForArchivedSelection):
3679         Use the frame parameter instead of using the webview's selectedFrame. 
3680
3681 2006-11-28  Beth Dakin  <bdakin@apple.com>
3682
3683         Reviewed by Geoffff.
3684
3685         Fix for http://bugs.webkit.org/show_bug.cgi?id=11691 REGRESSION 
3686         (r17399, r17511): WebElementDictionary no longer returns nil 
3687         NSStrings
3688
3689         String's NSString* operator converts null Strings to empty 
3690         NSStrings for compatibility with AppKit. We need to work around 
3691         that here.
3692
3693         * Misc/WebElementDictionary.m:
3694         (NSStringOrNil):
3695         (-[WebElementDictionary _altDisplayString]):
3696         (-[WebElementDictionary _spellingToolTip]):
3697         (-[WebElementDictionary _title]):
3698         (-[WebElementDictionary _titleDisplayString]):
3699         (-[WebElementDictionary _textContent]):
3700
3701 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
3702
3703         Reviewed by Beth Dakin.
3704
3705         Fixed <rdar://problem/4844855> Should clarify when to create clients in 
3706         the WebCore client API
3707         
3708         All clients must now be supplied as constructor arguments. This clarifies 
3709         when you need to create clients, and also guarantees that objects can't 
3710         (for the most part) be in a clientless state.
3711
3712         Layout tests pass. No leaks reported.
3713         
3714         * WebCoreSupport/WebFrameBridge.mm: Shuffled around initialization and changed
3715         some arguments to resolve ciruclar dependencies at init time.
3716         (-[WebFrame _initWithWebFrameView:webView:bridge:]): We no longer call setClient
3717         here, because the client is set up at construction time.
3718
3719 2006-11-28  Anders Carlsson  <acarlsson@apple.com>
3720
3721         Reviewed by Maciej.
3722
3723         Update for changes to ResourceRequest.
3724         
3725         * WebCoreSupport/WebChromeClient.mm:
3726         (WebChromeClient::createWindow):
3727         (WebChromeClient::createModalDialog):
3728         * WebCoreSupport/WebFrameLoaderClient.mm:
3729         (WebFrameLoaderClient::canHandleRequest):
3730
3731 2006-11-28  Adam Roben  <aroben@apple.com>
3732
3733         Reviewed by Beth.
3734
3735         More WebCore context menu work.
3736
3737         * DefaultDelegates/WebDefaultUIDelegate.m: New stub delegate method implementation.
3738         (-[NSApplication webView:contextMenuItemSelected:forElement:]):
3739         * WebCoreSupport/WebContextMenuClient.h: Updated to match ContextMenuClient.h changes.
3740         * WebCoreSupport/WebContextMenuClient.mm:
3741         (WebContextMenuClient::addCustomContextMenuItems): Updated for method name changes.
3742         (WebContextMenuClient::contextMenuItemSelected): Added new client method.
3743         * WebView/WebUIDelegatePrivate.h: New private delegate method declaration.
3744
3745 2006-11-28  Alice Liu  <alice.liu@apple.com>
3746
3747         Reviewed by Justin and Adam.
3748
3749         * WebCoreSupport/WebEditorClient.h:
3750         * WebCoreSupport/WebEditorClient.mm:
3751         added the following        
3752         (WebEditorClient::smartInsertDeleteEnabled):
3753         (WebEditorClient::dataForArchivedSelectionInFrame):
3754         (WebEditorClient::_web_userVisibleString):
3755         (WebEditorClient::shouldInsertNode):
3756         
3757         * WebKitPrefix.h:
3758         Added flags to control whether WebCore cut/copy/paste is enabled.
3759         Turned on Cut and Copy, left Paste and Delete off
3760         
3761         * WebView/WebHTMLViewPrivate.h:
3762         * WebView/WebHTMLView.m:
3763         removed _can[Cut|Copy|Paste|Delete]
3764         (-[NSArray validateUserInterfaceItem:]):
3765         call the editor for canDHTML[C|C|P|D] and _can[C|C|P|D] instead 
3766         (-[NSArray delete:]):
3767         added code to call the editor's delete instead (not turned on)
3768         (-[WebHTMLView copy:]):
3769         added code to call the editor's copy (turned on)
3770         (-[WebHTMLView cut:]):
3771         added code to call the editor's cut (turned on)
3772         (-[WebHTMLView paste:]):
3773         added code to call the editor's paste (not turned on)
3774
3775 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
3776
3777         Reviewed by Adam.
3778
3779         Fixed <rdar://problem/4844848> REGRESSION: extra cross-library ref/deref 
3780         calls cause .5% PLT regression.
3781         
3782         Changed ref/deref calls to a single 'xxxDestroyed' call. Moved EditorClient
3783         from the Frame to the Page, since it's only responsible for
3784         Webview-level delegate calls.
3785         
3786         I don't really love this design, but it fixes the regression and allows
3787         a single WebKit object to implement multiple client interfaces.
3788         
3789         Layout tests pass.
3790
3791 2006-11-27  Beth Dakin  <bdakin@apple.com>
3792
3793         Reviewed by Adam.
3794
3795         WebKit half of getting rid of the FixMes in ContextMenu.cpp
3796
3797         * WebCoreSupport/WebFrameLoaderClient.h: canHandleRequest takes a 
3798         ResourceRequest now.
3799         * WebCoreSupport/WebFrameLoaderClient.mm:
3800         (WebFrameLoaderClient::canHandleRequest): Same.
3801         * WebView/WebHTMLView.m:
3802         (-[WebHTMLView _isSelectionMisspelled]): Call into WebCore.
3803
3804 2006-11-27  Ada Chan  <adachan@apple.com>
3805
3806         Reviewed by Adam.
3807
3808         Part of the change to move WebCoreCache into WebKit:
3809         Added WebCache which handles emptying and enable/disabling the cache.
3810         emptyCache and setCacheDisabled have been removed from WebCoreStatistics.
3811
3812         * Misc/WebCache.h: Added.
3813         * Misc/WebCache.mm: Added.
3814         * Misc/WebCoreStatistics.h:
3815         * Misc/WebCoreStatistics.m:
3816         (+[WebCoreStatistics statistics]):
3817         * WebKit.exp:
3818         * WebKit.xcodeproj/project.pbxproj:
3819
3820 2006-11-27  Anders Carlsson  <acarlsson@apple.com>
3821
3822         Reviewed by Adam.
3823
3824         Move addMessageToConsole to Chrome.
3825
3826         * WebCoreSupport/WebChromeClient.h:
3827         * WebCoreSupport/WebChromeClient.mm:
3828         (WebChromeClient::addMessageToConsole):
3829         * WebCoreSupport/WebFrameBridge.mm:
3830
3831 2006-11-27  Brady Eidson  <beidson@apple.com>
3832
3833         Reviewed by Anders
3834
3835         Moved unused Private SPI to Internal and pruned other unused code
3836
3837         * Misc/WebIconDatabase.m:
3838         * Misc/WebIconDatabasePrivate.h:
3839
3840 2006-11-21  Darin Adler  <darin@apple.com>
3841
3842         Reviewed by Maciej.
3843
3844         - make the close method do a more-complete job to prevent world leaks seen when
3845           running some of the layout tests
3846
3847         * WebView/WebHTMLViewInternal.h: Added declaration of -[WebHTMLViewPrivate clear].
3848         * WebView/WebHTMLView.m:
3849         (-[WebHTMLViewPrivate clear]): Added method to drop references to other objects.
3850         We want to do this at "close" time, rather than waiting for deallocation time.
3851         This is especially important for the data source, which indirectly keeps a number of
3852         objects alive.
3853         (-[WebHTMLView close]): Added an explicit call to clear out the data source on the
3854         plug-in controller. Without this, we'd see the plug-in controller making calls to
3855         a deallocated data source during the layout tests. Added a call to the new clear method
3856         on the private object so that we release the objects at close time instead of waiting
3857         for deallocation time.
3858
3859         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with the project file,
3860         because I can't fight the power.
3861
3862 2006-11-20  Samuel Weinig  <sam@webkit.org>
3863
3864         Reviewed by Alexey.
3865
3866         Fix for http://bugs.webkit.org/show_bug.cgi?id=11656
3867         Fix Windows build
3868
3869         * WebKit.vcproj/WebKit.vcproj: don't include directories that no
3870         longer exist.
3871
3872 2006-11-19  Beth Dakin  <bdakin@apple.com>
3873
3874         Reviewed by Adam.
3875
3876         WebKit side of new context menu actions.
3877
3878         * WebCoreSupport/WebContextMenuClient.h: These are for the 
3879         currently-WebKit-dependent menu actions.
3880         * WebCoreSupport/WebContextMenuClient.mm:
3881         (WebContextMenuClient::copyLinkToClipboard):
3882         (WebContextMenuClient::downloadURL):
3883         (WebContextMenuClient::copyImageToClipboard):
3884         (WebContextMenuClient::searchWithSpotlight):
3885         (WebContextMenuClient::lookUpInDictionary):
3886         * WebCoreSupport/WebEditorClient.h:
3887         * WebCoreSupport/WebEditorClient.mm:
3888         (core): These are to convert between WebViewInsertAction and 
3889         EditorInsertAction.
3890         (kit):
3891         (WebEditorClient::shouldInsertText): Added implementation for 
3892         shouldInsertText.
3893         * WebKit.xcodeproj/project.pbxproj:
3894         * WebView/WebHTMLView.m:
3895         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Moved 
3896         _lookUpInDictionary to be within the implementation of WebHTMLView 
3897         internal.
3898         * WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
3899         * WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu
3900
3901 2006-11-18  Don Gibson  <dgibson77@gmail.com>
3902
3903         Reviewed by Sam Weinig.
3904
3905         http://bugs.webkit.org/show_bug.cgi?id=11634:
3906         Fix segfault on startup for Windows build.  Also fix segfault when
3907         typing in a URL.
3908
3909         * COM/WebFrame.cpp:
3910         (WebFrame::initWithName):
3911
3912 === Safari-521.31 ===
3913
3914 2006-11-17  Timothy Hatcher  <timothy@apple.com>
3915
3916         Reviewed by Geoff.
3917
3918         <rdar://problem/4841044> Temporarily default Mail.app editable link clicking behavior, until they do it themselves
3919
3920         * WebKit.xcodeproj/project.pbxproj:
3921         * WebView/WebView.mm:
3922         (+[WebView initialize]):
3923         (-[WebView setPreferences:]):
3924
3925 2006-11-16  Don Gibson  <dgibson77@gmail.com>
3926
3927         Reviewed and landed by ap.
3928
3929         http://bugs.webkit.org/show_bug.cgi?id=11509:
3930         Windows build bustage.
3931
3932         * COM/WebFrame.cpp:
3933         (WebFrame::initWithName):
3934         (WebFrame::loadHTMLString):
3935         (WebFrame::stopLoading):
3936         (WebFrame::reload):
3937         (WebFrame::loadDataSource):
3938         (WebFrame::didReceiveData):
3939         (WebFrame::receivedResponse):
3940         (WebFrame::receivedAllData):
3941         * COM/WebFrame.h:
3942         * COM/WebView.cpp:
3943         (WebView::mouseMoved):
3944         (WebView::mouseDown):
3945         (WebView::mouseUp):
3946         (WebView::mouseDoubleClick):
3947         * WebKit.vcproj/WebKit.vcproj:
3948
3949 2006-11-16  Anders Carlsson  <acarlsson@apple.com>
3950
3951         Reviewed by Tim.
3952
3953         <rdar://problem/4841123>
3954         REGRESSION: Crash in WebCore::Range::boundaryPointsValid when replying to a mail Message
3955         
3956         * Misc/WebNSAttributedStringExtras.m:
3957         (+[NSAttributedString _web_attributedStringFromRange:]):
3958         If the range passed in is null, return null. When this function was in the bridge, it would never get called
3959         with a null range when nothing was selected. Instead, the range would just have invalid boundary points.
3960
3961 2006-11-15  Adam Roben  <aroben@apple.com>
3962
3963         Reviewed by Anders.
3964
3965         Added new WebContextMenuClient class to act as WebCore's ChromeClient,
3966         and moved context menu-related code there from WebChromeClient.
3967
3968         * WebCoreSupport/WebChromeClient.h:
3969         * WebCoreSupport/WebChromeClient.mm:
3970         * WebCoreSupport/WebContextMenuClient.h: Added.
3971         (WebContextMenuClient::webView):
3972         * WebCoreSupport/WebContextMenuClient.mm: Added.
3973         (WebContextMenuClient::create):
3974         (WebContextMenuClient::WebContextMenuClient):
3975         (WebContextMenuClient::ref):
3976         (WebContextMenuClient::deref):
3977         (WebContextMenuClient::addCustomContextMenuItems):
3978         * WebKit.xcodeproj/project.pbxproj: Added new files.
3979         * WebView/WebView.mm:
3980         (-[WebView _commonInitializationWithFrameName:groupName:]):
3981
3982 2006-11-15  Beth Dakin  <bdakin@apple.com>
3983         &   Adam Roben  <aroben@apple.com>
3984
3985         Reviewed by Adam & Beth.
3986
3987         WebKit side of first cut at engine context menus. Use the client to 
3988         call into the UIDelegate.
3989
3990         * WebCoreSupport/WebChromeClient.h:
3991         * WebCoreSupport/WebChromeClient.mm:
3992         (WebChromeClient::addCustomContextMenuItems):
3993         * WebKit.xcodeproj/project.pbxproj:
3994
3995 2006-11-15  Brady Eidson  <beidson@apple.com>
3996
3997         Reviewed by Maciej
3998
3999         Quick change of files to ObjC++ for BF cache re-write
4000
4001         * History/WebBackForwardList.m: Removed.
4002         * History/WebBackForwardList.mm: Added.
4003         * History/WebHistoryItem.m: Removed.
4004         * History/WebHistoryItem.mm: Added.
4005         * WebKit.xcodeproj/project.pbxproj:
4006
4007 2006-11-15  Brady Eidson  <beidson@apple.com>
4008
4009         Reviewed by Sarge
4010
4011         SPI addition
4012
4013         * WebView/WebFrame.mm:
4014         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
4015         * WebView/WebFrameInternal.h:
4016         * WebView/WebFramePrivate.h:
4017
4018 2006-11-15  Brady Eidson  <beidson@apple.com>
4019
4020         Reviewed by Adele
4021
4022         <rdar://problem/4838729> - Replace mistakenly removed SPI
4023
4024         * WebView/WebHTMLView.m:
4025         (-[WebHTMLView _handleAutoscrollForMouseDragged:]):
4026         * WebView/WebHTMLViewPrivate.h:
4027
4028 2006-11-15  Anders Carlsson  <acarlsson@apple.com>
4029
4030         Reviewed by Adele.
4031
4032         isTargetItem is used by DRT, so make it private instead of internal.
4033         
4034         * History/WebHistoryItem.m:
4035         (-[WebHistoryItem isTargetItem]):
4036         * History/WebHistoryItemInternal.h:
4037         * History/WebHistoryItemPrivate.h:
4038         * WebCoreSupport/WebFrameLoaderClient.mm:
4039
4040 2006-11-15  Brady Eidson  <beidson@apple.com>
4041
4042         Reviewed by Maciej
4043
4044         Split much of unused WebHistoryItemPrivate.h SPI into WebHistoryItemInternal.h
4045
4046         * History/WebBackForwardList.m:
4047         * History/WebHistory.m:
4048         * History/WebHistoryItem.m:
4049         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
4050         (-[WebHistoryItem initWithURL:title:]):
4051         (-[WebHistoryItem visitCount]):
4052         (-[WebHistoryItem RSSFeedReferrer]):
4053         (-[WebHistoryItem setRSSFeedReferrer:]):
4054         (-[WebHistoryItem children]):
4055         (-[WebHistoryItem dictionaryRepresentation]):
4056         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
4057         (+[WebHistoryItem _releaseAllPendingPageCaches]):
4058         (-[WebHistoryItem URL]):
4059         (-[WebHistoryItem target]):
4060         (-[WebHistoryItem _setLastVisitedTimeInterval:]):
4061         (-[WebHistoryItem _lastVisitedDate]):
4062         (-[WebHistoryItem targetItem]):
4063         * History/WebHistoryItemInternal.h: Added.
4064         * History/WebHistoryItemPrivate.h:
4065         * WebCoreSupport/WebFrameBridge.mm:
4066         * WebCoreSupport/WebFrameLoaderClient.mm:
4067         * WebKit.xcodeproj/project.pbxproj:
4068         * WebView/WebFrame.mm:
4069         * WebView/WebView.mm:
4070
4071 2006-11-14  Beth Dakin  <bdakin@apple.com>
4072
4073         Reviewed by Geoff.
4074
4075         Moving things off the bridge and onto clients.
4076
4077         * WebCoreSupport/WebEditorClient.h:
4078         * WebCoreSupport/WebEditorClient.mm:
4079         (WebEditorClient::selectWordBeforeMenuEvent):
4080         (WebEditorClient::isEditable):
4081         * WebCoreSupport/WebFrameBridge.mm:
4082         * WebKit.xcodeproj/project.pbxproj:
4083
4084 2006-11-14  Timothy Hatcher  <timothy@apple.com>
4085
4086         Reviewed by Harrison.
4087
4088         <rdar://problem/4766635> Safari should never follow links in editable areas (add a WebKitEditableLinkNeverLive option)
4089
4090         Adds an Open Link, Open Link in New Window and Copy Link to the editing context menu.
4091         Adds a new WebKitEditableLinkNeverLive preference value that maps to WebCore's EditableLinkNeverLive.
4092
4093         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
4094         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
4095         (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
4096         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
4097         (-[WebDefaultUIDelegate requestWithURL:includingReferrerFromFrame:]):
4098         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
4099         (-[WebDefaultUIDelegate openLink:]):
4100         * English.lproj/Localizable.strings:
4101         * WebKit.exp:
4102         * WebView/WebPreferences.m:
4103         (-[WebPreferences editableLinkBehavior]):
4104         * WebView/WebPreferencesPrivate.h:
4105         * WebView/WebUIDelegatePrivate.h:
4106
4107 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
4108
4109         Turns out I wasn't forcing DWARF on the world at all, 
4110         it's now the default!
4111
4112         * WebKit.xcodeproj/project.pbxproj:
4113
4114 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
4115
4116         I must stop trying to force DWARF on the world.
4117
4118         * WebKit.xcodeproj/project.pbxproj:
4119
4120 2006-11-14  Darin Adler  <darin@apple.com>
4121
4122         Reviewed by Anders.
4123
4124         - update for creation of EventHandler
4125
4126         * WebCoreSupport/WebFrameLoaderClient.mm:
4127         (WebFrameLoaderClient::actionDictionary):
4128         * WebView/WebHTMLView.m:
4129         (-[WebHTMLView _updateMouseoverWithEvent:]):
4130         (-[NSArray menuForEvent:]):
4131         (-[NSArray scrollWheel:]):
4132         (-[NSArray acceptsFirstMouse:]):
4133         (-[NSArray shouldDelayWindowOrderingForEvent:]):
4134         (-[NSArray mouseDown:]):
4135         (-[NSArray mouseDragged:]):
4136         (-[NSArray mouseUp:]):
4137         (-[NSArray keyDown:]):
4138         (-[NSArray keyUp:]):
4139         (-[NSArray performKeyEquivalent:]):
4140         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
4141
4142 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
4143
4144         Fix build for real this time.
4145         
4146         * WebCoreSupport/WebEditorClient.mm:
4147         (-[WebEditCommand initWithEditCommand:WebCore::]):
4148         (-[WebEditCommand dealloc]):
4149         (-[WebEditCommand finalize]):
4150         (+[WebEditCommand commandWithEditCommand:]):
4151         (-[WebEditCommand command]):
4152
4153 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
4154
4155         Try fixing the build.
4156         
4157         * WebCoreSupport/WebEditorClient.mm:
4158         (-[WebEditorUndoTarget undoEditing:]):
4159         (-[WebEditorUndoTarget redoEditing:]):
4160
4161 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
4162
4163         Reviewed by Darin.
4164
4165         Move undo/redo handling into WebEditorClient.
4166         
4167         * WebCoreSupport/WebEditorClient.h:
4168         * WebCoreSupport/WebEditorClient.mm:
4169         (WebEditorClient::WebEditorClient):
4170         (WebEditorClient::~WebEditorClient):
4171         (-[WebEditCommand initWithEditCommand:WebCore::]):
4172         (-[WebEditCommand dealloc]):
4173         (-[WebEditCommand finalize]):
4174         (+[WebEditCommand commandWithEditCommand:]):
4175         (-[WebEditCommand command]):
4176         (-[WebEditorUndoTarget undoEditing:]):
4177         (-[WebEditorUndoTarget redoEditing:]):
4178         (undoNameForEditAction):
4179         (WebEditorClient::registerCommandForUndoOrRedo):
4180         (WebEditorClient::registerCommandForUndo):
4181         (WebEditorClient::registerCommandForRedo):
4182         (WebEditorClient::clearUndoRedoOperations):
4183         (WebEditorClient::canUndo):
4184         (WebEditorClient::canRedo):
4185         (WebEditorClient::undo):
4186         (WebEditorClient::redo):
4187         * WebCoreSupport/WebFrameBridge.mm:
4188         * WebKit.xcodeproj/project.pbxproj:
4189
4190 2006-11-14  Alexey Proskuryakov  <ap@webkit.org>
4191
4192         Reviewed by Tim H.
4193
4194         http://bugs.webkit.org/show_bug.cgi?id=3387
4195         Redundant keydown, keypress, keyup events sent for arrow keys
4196
4197         Added another layer of ugly hacks around AppKit event dispatching.
4198
4199         1. For arrow keys, keyDown: is invoked after performKeyEquivalent:, so had to store
4200         _private->keyDownEvent in both methods, and make it persist after leaving them.
4201
4202         2. For Esc, AppKit calls performKeyEquivalent: with a fake event of some kind,
4203         use [NSApp currentEvent] to check for this to prevent it from being passed to  WebCore.
4204
4205         Test: manual-tests/arrow-key-events.html
4206
4207         * WebView/WebHTMLView.m:
4208         (-[NSMutableDictionary dealloc]):
4209         (-[NSArray keyDown:]):
4210         (-[NSArray keyUp:]):
4211         (-[NSArray performKeyEquivalent:]):
4212         * WebView/WebHTMLViewInternal.h:
4213
4214 2006-11-12  Brady Eidson <beidson@apple.com>
4215
4216         Rubberstamped by Anders
4217
4218         Changed some #includes from <WebKit/foo.h> to "foo.h"
4219
4220         * History/WebBackForwardList.m:
4221         * History/WebHistory.m:
4222
4223 2006-11-11  Geoffrey Garen  <ggaren@apple.com>
4224
4225         Reviewed by Maciej Stachowiak.
4226         
4227         - Fixed loader crash by clarifying ownership of WebKit client objects. 
4228         WebCore objects own their WebKit clients, and ref and deref through 
4229         virtual methods, leaving WebKit free to use whatever client / reference-counting 
4230         implementation it likes.
4231         
4232         WebKit on Mac just uses the same refcounting class that WebCore uses (Shared),
4233         but other platforms may choose to do other things.
4234
4235         * WebCoreSupport/WebChromeClient.h:
4236         (WebChromeClient::ref):
4237         (WebChromeClient::deref):