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