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