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