371baf24cd023a4f61bbd8b4c46777777f8afc2a
[WebKit-https.git] / WebKit / ChangeLog
1 2006-12-18  Alice Liu  <alice.liu@apple.com>
2
3         Reviewed by Adam.
4
5         Have the Editor handle deletion instead of WebHTMLView
6
7         * WebKitPrefix.h:
8         Turned on WebCore deletion
9
10         * WebView/WebHTMLViewInternal.h:
11         Moved ownership of startNewKillRingSequence to the WebCore::Editor
12
13         * WebView/WebHTMLView.m:
14         (-[NSArray becomeFirstResponder]):
15         Use the Editor's startNewKillRingSequence flag
16
17         (-[NSArray deleteForward:]):
18         (-[NSArray deleteBackward:]):
19         (-[NSArray deleteWordForward:]):
20         (-[NSArray deleteWordBackward:]):
21         (-[NSArray deleteToBeginningOfLine:]):
22         (-[NSArray deleteToEndOfLine:]):
23         (-[NSArray deleteToBeginningOfParagraph:]):
24         (-[NSArray deleteToEndOfParagraph:]):
25         (-[NSArray deleteToMark:]):
26         use Editor::deleteWithDirection instead of WebHTMLView's
27
28 2006-12-16  Adele Peterson  <adele@apple.com>
29
30         Reviewed by Adam.
31
32         WebKit part of fix for:
33         <rdar://problem/4463829> Switch to use new search field implementation for <input type="search">
34
35         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Initialize WKDrawTextFieldCellFocusRing.
36         * WebInspector/webInspector/inspector.css: Set -webkit-user-select:text and text-shadow:none on the search field.
37           These are both properties that we didn't honor in the old control, and the inherited values didn't work or look right.
38
39 2006-12-16  Beth Dakin  <bdakin@apple.com>
40
41         Reviewed by Adam.
42
43         WebKit side of making WebCore context menus support state and
44         enabled/disabled.
45
46         * WebCoreSupport/WebContextMenuClient.h: contextMenuItemSelected
47         takes a pointer to the parentMenu now since menu items no longer
48         hold onto it.
49         * WebCoreSupport/WebContextMenuClient.mm: Same.
50         (WebContextMenuClient::contextMenuItemSelected): Same.
51         * WebView/WebHTMLView.m: Must call setAutoenablesItems:NO on our
52         menu.
53         (-[NSArray menuForEvent:]):
54         * WebView/WebUIDelegatePrivate.h: No need for if-def.
55
56 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
57
58         Reviewed by Geoff.
59
60         Update for WebCore changes.
61         
62         * WebCoreSupport/WebFrameLoaderClient.h:
63         * WebCoreSupport/WebFrameLoaderClient.mm:
64         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
65         * WebView/WebDataSource.mm:
66         (-[WebDataSource response]):
67
68 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
69
70         Reviewed by Darin.
71
72         Update for WebCore changes.
73         
74         * WebCoreSupport/WebFrameLoaderClient.h:
75         * WebCoreSupport/WebFrameLoaderClient.mm:
76         (WebFrameLoaderClient::willUseArchive):
77         * WebView/WebDataSource.mm:
78         (-[WebDataSource _URLForHistory]):
79
80 2006-12-15  Marvin Decker  <marv.decker@gmail.com>
81
82         Reviewed by Darin and Alexey.
83
84         Fix the Windows build, move various Client implementations out of
85         WebCore and into WebKit.
86
87         * COM/ChromeClientWin.cpp: Added.
88         (ChromeClientWin::~ChromeClientWin):
89         (ChromeClientWin::chromeDestroyed):
90         (ChromeClientWin::setWindowRect):
91         (ChromeClientWin::windowRect):
92         (ChromeClientWin::pageRect):
93         (ChromeClientWin::scaleFactor):
94         (ChromeClientWin::focus):
95         (ChromeClientWin::unfocus):
96         (ChromeClientWin::createWindow):
97         (ChromeClientWin::createModalDialog):
98         (ChromeClientWin::show):
99         (ChromeClientWin::canRunModal):
100         (ChromeClientWin::runModal):
101         (ChromeClientWin::setToolbarsVisible):
102         (ChromeClientWin::toolbarsVisible):
103         (ChromeClientWin::setStatusbarVisible):
104         (ChromeClientWin::statusbarVisible):
105         (ChromeClientWin::setScrollbarsVisible):
106         (ChromeClientWin::scrollbarsVisible):
107         (ChromeClientWin::setMenubarVisible):
108         (ChromeClientWin::menubarVisible):
109         (ChromeClientWin::setResizable):
110         (ChromeClientWin::addMessageToConsole):
111         * COM/ChromeClientWin.h: Added.
112         * COM/ContextMenuClientWin.cpp: Added.
113         (ContextMenuClientWin::~ContextMenuClientWin):
114         (ContextMenuClientWin::contextMenuDestroyed):
115         (ContextMenuClientWin::addCustomContextMenuItems):
116         (ContextMenuClientWin::contextMenuItemSelected):
117         (ContextMenuClientWin::copyLinkToClipboard):
118         (ContextMenuClientWin::downloadURL):
119         (ContextMenuClientWin::copyImageToClipboard):
120         (ContextMenuClientWin::lookUpInDictionary):
121         (ContextMenuClientWin::speak):
122         (ContextMenuClientWin::stopSpeaking):
123         * COM/ContextMenuClientWin.h: Added.
124         * COM/EditorClientWin.cpp: Added.
125         (EditorClientWin::~EditorClientWin):
126         (EditorClientWin::pageDestroyed):
127         (EditorClientWin::shouldDeleteRange):
128         (EditorClientWin::shouldShowDeleteInterface):
129         (EditorClientWin::smartInsertDeleteEnabled):
130         (EditorClientWin::isContinuousSpellCheckingEnabled):
131         (EditorClientWin::toggleContinuousSpellChecking):
132         (EditorClientWin::isGrammarCheckingEnabled):
133         (EditorClientWin::toggleGrammarChecking):
134         (EditorClientWin::spellCheckerDocumentTag):
135         (EditorClientWin::selectWordBeforeMenuEvent):
136         (EditorClientWin::isEditable):
137         (EditorClientWin::shouldBeginEditing):
138         (EditorClientWin::shouldEndEditing):
139         (EditorClientWin::shouldInsertNode):
140         (EditorClientWin::shouldInsertText):
141         (EditorClientWin::shouldApplyStyle):
142         (EditorClientWin::didBeginEditing):
143         (EditorClientWin::respondToChangedContents):
144         (EditorClientWin::didEndEditing):
145         (EditorClientWin::registerCommandForUndo):
146         (EditorClientWin::registerCommandForRedo):
147         (EditorClientWin::clearUndoRedoOperations):
148         (EditorClientWin::canUndo):
149         (EditorClientWin::canRedo):
150         (EditorClientWin::undo):
151         (EditorClientWin::redo):
152         * COM/EditorClientWin.h: Added.
153         * COM/WebFrame.cpp:
154         (WebFrame::WebFrame):
155         (WebFrame::initWithName):
156         * COM/WebFrame.h:
157         * COM/WebFrameLoaderClient.cpp: Added.
158         (WebFrameLoaderClient::WebFrameLoaderClient):
159         (WebFrameLoaderClient::~WebFrameLoaderClient):
160         (WebFrameLoaderClient::frameLoaderDestroyed):
161         (WebFrameLoaderClient::hasWebView):
162         (WebFrameLoaderClient::hasFrameView):
163         (WebFrameLoaderClient::hasBackForwardList):
164         (WebFrameLoaderClient::resetBackForwardList):
165         (WebFrameLoaderClient::provisionalItemIsTarget):
166         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
167         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
168         (WebFrameLoaderClient::privateBrowsingEnabled):
169         (WebFrameLoaderClient::makeDocumentView):
170         (WebFrameLoaderClient::makeRepresentation):
171         (WebFrameLoaderClient::forceLayout):
172         (WebFrameLoaderClient::forceLayoutForNonHTML):
173         (WebFrameLoaderClient::updateHistoryForCommit):
174         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
175         (WebFrameLoaderClient::updateHistoryForReload):
176         (WebFrameLoaderClient::updateHistoryForStandardLoad):
177         (WebFrameLoaderClient::updateHistoryForInternalLoad):
178         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
179         (WebFrameLoaderClient::setCopiesOnScroll):
180         (WebFrameLoaderClient::tokenForLoadErrorReset):
181         (WebFrameLoaderClient::resetAfterLoadError):
182         (WebFrameLoaderClient::doNotResetAfterLoadError):
183         (WebFrameLoaderClient::willCloseDocument):
184         (WebFrameLoaderClient::detachedFromParent1):
185         (WebFrameLoaderClient::detachedFromParent2):
186         (WebFrameLoaderClient::detachedFromParent3):
187         (WebFrameLoaderClient::detachedFromParent4):
188         (WebFrameLoaderClient::loadedFromPageCache):
189         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
190         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
191         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
192         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
193         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
194         (WebFrameLoaderClient::dispatchWillClose):
195         (WebFrameLoaderClient::dispatchDidReceiveIcon):
196         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
197         (WebFrameLoaderClient::dispatchDidReceiveTitle):
198         (WebFrameLoaderClient::dispatchDidCommitLoad):
199         (WebFrameLoaderClient::dispatchDidFinishLoad):
200         (WebFrameLoaderClient::dispatchDidFirstLayout):
201         (WebFrameLoaderClient::dispatchShow):
202         (WebFrameLoaderClient::cancelPolicyCheck):
203         (WebFrameLoaderClient::dispatchWillSubmitForm):
204         (WebFrameLoaderClient::dispatchDidLoadMainResource):
205         (WebFrameLoaderClient::clearLoadingFromPageCache):
206         (WebFrameLoaderClient::isLoadingFromPageCache):
207         (WebFrameLoaderClient::revertToProvisionalState):
208         (WebFrameLoaderClient::clearUnarchivingState):
209         (WebFrameLoaderClient::progressStarted):
210         (WebFrameLoaderClient::progressCompleted):
211         (WebFrameLoaderClient::setMainFrameDocumentReady):
212         (WebFrameLoaderClient::willChangeTitle):
213         (WebFrameLoaderClient::didChangeTitle):
214         (WebFrameLoaderClient::finishedLoading):
215         (WebFrameLoaderClient::finalSetupForReplace):
216         (WebFrameLoaderClient::setDefersLoading):
217         (WebFrameLoaderClient::isArchiveLoadPending):
218         (WebFrameLoaderClient::cancelPendingArchiveLoad):
219         (WebFrameLoaderClient::clearArchivedResources):
220         (WebFrameLoaderClient::canHandleRequest):
221         (WebFrameLoaderClient::canShowMIMEType):
222         (WebFrameLoaderClient::representationExistsForURLScheme):
223         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
224         (WebFrameLoaderClient::frameLoadCompleted):
225         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
226         (WebFrameLoaderClient::provisionalLoadStarted):
227         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
228         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
229         (WebFrameLoaderClient::didFinishLoad):
230         (WebFrameLoaderClient::prepareForDataSourceReplacement):
231         (WebFrameLoaderClient::setTitle):
232         (WebFrameLoaderClient::userAgent):
233         * COM/WebFrameLoaderClient.h: Added.
234         * COM/WebKitDLL.h:
235         * WebKit.vcproj/WebKit.vcproj:
236
237 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
238
239         Reviewed by Darin.
240
241         Include ResourceError.h.
242         
243         * Plugins/WebNetscapePluginStream.mm:
244         * WebKit.xcodeproj/project.pbxproj:
245
246 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
247
248         Reviewed by Maciej.
249
250         Update for WebCore changes.
251         
252         * WebCoreSupport/WebFrameLoaderClient.h:
253         * WebCoreSupport/WebFrameLoaderClient.mm:
254         (WebFrameLoaderClient::incrementProgress):
255         (WebFrameLoaderClient::committedLoad):
256         (WebFrameLoaderClient::deliverArchivedResources):
257         * WebView/WebView.mm:
258         (-[WebView _incrementProgressForIdentifier:length:]):
259         * WebView/WebViewInternal.h:
260
261 2006-12-14  Timothy Hatcher  <timothy@apple.com>
262
263         Reviewed by Darin.
264
265         <rdar://problem/4827549> need NSRange-based selection support exposed.
266
267         * WebView/WebFrame.mm:
268         (-[WebFrame _selectedNSRange]):
269         (-[WebFrame _selectNSRange:]):
270         * WebView/WebFramePrivate.h:
271
272 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
273
274         Reviewed by John.
275
276         Update for WebCore changes.
277         
278         * WebCoreSupport/WebFrameLoaderClient.h:
279         * WebCoreSupport/WebFrameLoaderClient.mm:
280         (WebFrameLoaderClient::dispatchDidFailLoading):
281         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
282         (WebFrameLoaderClient::dispatchDidFailLoad):
283         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
284         (WebFrameLoaderClient::setMainDocumentError):
285         (WebFrameLoaderClient::cancelledError):
286         (WebFrameLoaderClient::cannotShowURLError):
287         (WebFrameLoaderClient::interruptForPolicyChangeError):
288         (WebFrameLoaderClient::cannotShowMIMETypeError):
289         (WebFrameLoaderClient::fileDoesNotExistError):
290         (WebFrameLoaderClient::shouldFallBack):
291
292 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
293
294         Reviewed by Anders.
295         
296         - adjusted for changes from NSURLRequest to ResourceRequest
297
298         * Plugins/WebPluginController.mm:
299         * WebCoreSupport/WebFrameLoaderClient.h:
300         * WebCoreSupport/WebFrameLoaderClient.mm:
301         (WebFrameLoaderClient::updateHistoryForReload):
302         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
303         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
304         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
305         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
306         (WebFrameLoaderClient::startDownload):
307         (WebFrameLoaderClient::cannotShowURLError):
308         (WebFrameLoaderClient::createDocumentLoader):
309         * WebView/WebDataSource.mm:
310         (-[WebDataSource _initWithDocumentLoader:]):
311         (-[WebDataSource initialRequest]):
312         (-[WebDataSource request]):
313         * WebView/WebDocumentLoaderMac.h:
314         * WebView/WebDocumentLoaderMac.mm:
315         (WebDocumentLoaderMac::WebDocumentLoaderMac):
316         * WebView/WebFrame.mm:
317         (-[WebFrame _createItem:]):
318         (-[WebFrame _loadItem:withLoadType:]):
319         (-[WebFrame loadArchive:]):
320
321 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
322
323         Reviewed by Darin.
324
325         * WebCoreSupport/WebFrameLoaderClient.h:
326         * WebCoreSupport/WebFrameLoaderClient.mm:
327         (WebFrameLoaderClient::download):
328         Get the handle and proxy from the ResourceHandle now that they aren't passed to us.
329         
330 2006-12-11  Darin Adler  <darin@apple.com>
331
332         Reviewed by Brady.
333
334         - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
335
336         * WebCoreSupport/WebFrameBridge.h: Updated for change to WebCoreKeyboardAccess.
337         * WebCoreSupport/WebFrameBridge.mm:
338         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Ditto.
339         (-[WebFrameBridge keyboardUIMode]): Ditto.
340
341 2006-12-11  Beth Dakin  <bdakin@apple.com>
342
343         Reviewed by Adam.
344
345         WebKit support for editing sub-menu actions.
346
347         * WebCoreSupport/WebContextMenuClient.h: New functions for the
348         speech sub-menu.
349         * WebCoreSupport/WebContextMenuClient.mm:
350         (WebContextMenuClient::speak):
351         (WebContextMenuClient::stopSpeaking):
352         * WebCoreSupport/WebEditorClient.h: New functions to toggle
353         spelling/grammar checking.
354         * WebCoreSupport/WebEditorClient.mm:
355         (WebEditorClient::toggleContinuousSpellChecking):
356         (WebEditorClient::toggleGrammarChecking):
357         * WebView/WebUIDelegatePrivate.h: Re-named some of the spelling
358         sub-menu tags.
359
360 2006-12-11  Alice Liu  <alice.liu@apple.com>
361
362         Reviewed by Geoff, Adam.
363         
364         switch to use the Editor for copying URLs
365
366         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
367         (-[WebDefaultUIDelegate copyLinkToClipboard:]):
368         Call down to the editor for this. 
369         * WebCoreSupport/WebSystemInterface.m:
370         (InitWebCoreSystemInterface):
371         Add some calls necessary for Pasteboard::writeURL to work
372
373 2006-12-11  Darin Adler  <darin@apple.com>
374
375         Reviewed by Brady.
376
377         - http://bugs.webkit.org/show_bug.cgi?id=11794
378           fix lifetime problems affecting Frame's ownerElement pointer
379
380         * WebCoreSupport/WebFrameBridge.mm:
381         (-[WebFrameBridge finishInitializingWithPage:WebCore::frameName:frameView:ownerElement:]):
382         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:frameView:]):
383         (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
384         Use HTMLFrameOwnerElement.
385
386         * WebCoreSupport/WebFrameLoaderClient.mm: Include the relevant headers for the
387         HTMLFormElement class.
388
389         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way.
390
391         * WebView/WebFrame.mm: (-[WebFrame frameElement]): Update includes and types for the
392         change in return type of ownerElement.
393
394 2006-12-11  David Harrison  <harrison@apple.com>
395
396         Fix previous checkin where I committed the wrong file.
397
398         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
399
400         * WebView/WebFrame.mm:
401         (-[WebFrame frameElement]):
402         Add nil check.
403         
404         * WebView/WebPreferences.m:
405         (-[WebPreferences editableLinkBehavior]):
406         Reverted to previous.
407
408 2006-12-08  David Hyatt  <hyatt@apple.com>
409
410         Land new ICU abstraction layer.  Patch by Lars.
411
412         Reviewed by me
413
414         * ForwardingHeaders/wtf/icu/UnicodeIcu.h: Added.
415         * ForwardingHeaders/wtf/unicode/Unicode.h: Added.
416         * WebKit.xcodeproj/project.pbxproj:
417
418 === Safari-521.32 ===
419
420 2006-12-08  Timothy Hatcher  <timothy@apple.com>
421
422         Rolling out a change that broke Mail stationary.
423         <rdar://problem/4699166> REGRESSION: Background images in Mail stationery do not load
424
425         * WebView/WebUnarchivingState.m:
426         (-[WebUnarchivingState archivedResourceForURL:]):
427
428 2006-12-08  Don Gibson  <dgibson77@gmail.com>
429
430         Reviewed and landed by Alexey.
431
432         http://bugs.webkit.org/show_bug.cgi?id=11759:
433         Windows build bustage
434
435         * COM/WebFrame.cpp:
436         (WebFrame::loadDataSource):
437         * COM/WebFrame.h:
438
439 2006-12-08  David Harrison  <harrison@apple.com>
440
441         Reviewed by Brady.
442
443         <rdar://problem/4863611> Xyle Scope crashes at launch due to WebCore-521.29.3
444
445         * WebView/WebPreferences.m:
446         (-[WebPreferences editableLinkBehavior]):
447         Add nil check.
448
449 2006-12-07  Beth Dakin  <bdakin@apple.com>
450
451         Reviewed by Brady.
452
453         Build fix for WebCore ContextMenus. It got broken by r18046.
454
455         * WebView/WebHTMLView.m:
456         (-[NSArray menuForEvent:]):
457
458 2006-12-07  Beth Dakin  <bdakin@apple.com>
459
460         Reviewed by Brady.
461
462         Make some parameters const and const references.
463
464         * WebCoreSupport/WebContextMenuClient.h:
465         * WebCoreSupport/WebContextMenuClient.mm:
466         (WebContextMenuClient::contextMenuItemSelected):
467         (WebContextMenuClient::copyLinkToClipboard):
468         (WebContextMenuClient::downloadURL):
469         (WebContextMenuClient::copyImageToClipboard):
470
471 2006-12-06  Brady Eidson  <beidson@apple.com>
472
473         Reviewed by John Sullivan
474
475         Fixes http://bugs.webkit.org/show_bug.cgi?id=11675 and <rdar://4857669>
476         Now we need to explicitly set the data source when loading from a page cache
477
478         * History/WebHistoryItem.mm:
479         (-[WebHistoryItem _scheduleRelease]): Enhanced a logging message
480         (+[WebHistoryItem _releasePageCache:]): Ditto
481         (+[WebHistoryItem _releaseAllPendingPageCaches]): Ditto
482         * WebCoreSupport/WebFrameLoaderClient.mm:
483         (WebFrameLoaderClient::setDocumentViewFromPageCache): Reset the View's DataSource from the cache, effectively reopening it
484         * WebView/WebHTMLView.m:
485         (-[NSArray setDataSource:]): Properly Handle resetting the DataSource and "reopening" the view
486
487 2006-12-06  Brady Eidson  <beidson@apple.com>
488
489         Reviewed by Adam and Oliver
490
491         While working on http://bugs.webkit.org/show_bug.cgi?id=11675 I
492         decided to fix much of the null-deref problems that creeped in via 
493         the loader refactoring.  This isn't changing behavior, just reintroducing
494         the free nil checking we used to have with pure ObjC
495
496         * WebView/WebHTMLView.m:
497         (-[NSArray menuForEvent:]):  Explicitly check for null frames
498         (-[NSArray mouseDown:]):  Ditto
499         (-[NSArray mouseDragged:]):  Ditto
500         (-[NSArray mouseUp:]):  Ditto
501         (-[NSArray performKeyEquivalent:]):  Ditto
502         (-[WebHTMLView elementAtPoint:allowShadowContent:]):  Ditto
503
504 2006-12-05  John Sullivan  <sullivan@apple.com>
505
506         Reviewed by Beth
507
508         Updated to match Frame -> Editor changes in WebCore
509
510         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
511         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
512         guessesForUngrammaticalSelection() is now in Editor
513
514         * WebView/WebHTMLView.m:
515         (-[WebHTMLView _isSelectionUngrammatical]):
516         isSelectionUngrammatical() is now in Editor
517         (-[WebHTMLView _isSelectionMisspelled]):
518         isSelectionMisspelled() is now in Editor
519
520         (-[WebHTMLView checkSpelling:]):
521         advanceToNextMisspelling() is now in Editor
522         (-[WebHTMLView showGuessPanel:]):
523         ditto
524
525 2006-12-05  John Sullivan  <sullivan@apple.com>
526
527         Reviewed by Adam
528         
529         Old context-menu mechanism fix for:
530         <rdar://problem/4864351> Should leave out "No Guesses Found" from context menu for bad grammar
531
532         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
533         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
534         Leave out "No Guesses Found" and separator for grammar-checking case.
535
536 2006-12-05  John Sullivan  <sullivan@apple.com>
537
538         build fix
539
540         * WebView/WebViewPrivate.h:
541         * WebView/WebView.mm:
542         (-[WebView isGrammarCheckingEnabled]):
543         define isGrammarCheckingEnabled whether on Tiger or not (just return NO on Tiger)
544
545 2006-12-04  John Sullivan  <sullivan@apple.com>
546
547         Reviewed by Darin
548
549         WebKit part of fix for:
550         <rdar://problem/4817188> Context menu for bad grammar should include suggestions and "Ignore Grammar"
551
552         The context menu mechanism is currently in flux; the old mechanism is still in place, but an
553         up-and-coming new mechanism is waiting in the wings. I updated both of them, but couldn't
554         test the new mechanism because it doesn't work well enough yet. Most of this WebKit code
555         can be deleted when the new mechanism is in place.
556
557         * WebView/WebUIDelegatePrivate.h:
558         added WebMenuItemTagIgnoreGrammar
559
560         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
561         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
562         added case for WebMenuItemTagIgnoreGrammar
563         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
564         now considers adding grammar-related items as well as spelling-related items
565         
566         * WebView/WebHTMLViewPrivate.h:
567         declared _isSelectionUngrammatical
568
569         * WebView/WebHTMLView.m:
570         (-[WebHTMLView _isSelectionUngrammatical]):
571         new method, calls through to WebCore
572         (-[WebHTMLView _ignoreGrammarFromMenu:]):
573         new method, calls _ignoreSpellingFromMenu: since NSSpellChecker has one method for both
574
575         * English.lproj/Localizable.strings:
576         updated for "Ignore Grammar" menu item title
577
578 2006-12-04  Darin Adler  <darin@apple.com>
579
580         Reviewed by Adele.
581
582         * WebCoreSupport/WebFrameLoaderClient.mm:
583         (WebFrameLoaderClient::actionDictionary): Changed to use the new
584         findEventWithKeyState function in WebCore instead of a local function
585         in this file.
586
587 2006-12-04  Geoffrey Garen  <ggaren@apple.com>
588
589         Rolled out the WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
590         part of my last checkin.
591         
592         We have to turn on support for backward compatibility mode to avoid Dashboard
593         regressions in the short term.
594
595         * WebView/WebView.mm:
596         (-[WebView _setDashboardBehavior:to:]):
597
598 2006-12-02  Geoffrey Garen  <ggaren@apple.com>
599
600         Reviewed by Darin Adler.
601         
602         Added SPI for enabling Dashboard backward compatibility mode. For now,
603         we enable it unconditionally for Dashboard and Dashcode. Once they 
604         implement specific support for the backward compatibility mode behavior,
605         we can change that.
606         
607         Set the default WebDashboardBehaviorUseBackwardCompatibilityModeEnabled
608         to YES in order to turn this code on.
609
610         * WebView/WebView.mm:
611         (-[WebView _setDashboardBehavior:to:]):
612         (-[WebView _dashboardBehavior:]):
613         * WebView/WebViewPrivate.h:
614
615 2006-12-04  Darin Adler  <darin@apple.com>
616
617         Reviewed by Alice.
618
619         * WebCoreSupport/WebEditorClient.h: Removed "_web_" prefix from
620         C++ userVisibleString member function.
621         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::userVisibleString):
622         Ditto.
623
624         * WebView/WebView.mm: (-[WebView selectedFrame]): Removed extra return statement.
625
626 2006-12-04  Don Gibson  <dgibson77@gmail.com>
627
628         Reviewed and landed by Alexey.
629
630         http://bugs.webkit.org/show_bug.cgi?id=11738:
631         Make link clicking work again on Windows.
632
633         The WebKit changes are to ignore WM_MOUSEMOVED messages when the mouse
634         hasn't actually moved, which were preventing clicks from actually
635         getting dispatched in many cases.  It's a peculiarity of Windows mouse
636         handling that we receive these at all.
637
638         * COM/WebView.cpp:
639         (WebView::WebView):
640         (WebView::mouseMoved):
641         * COM/WebView.h:
642
643 2006-12-04  John Sullivan  <sullivan@apple.com>
644
645         Reviewed by Anders
646
647         - fixed <rdar://problem/4857833> REGRESSION: When ctrl-clicking on a misspelled word, "Ignore Spelling" and "Learn Spelling" 
648           menu items not displayed in the contextual menu
649
650         * WebView/WebHTMLView.m:
651         (-[WebHTMLView _isSelectionMisspelled]):
652         We were computing isSelectionMisspelled by calling WebCore, but then ignoring the result and always
653         returning NO. D'oh!
654
655 2006-12-01  Beth Dakin  <bdakin@apple.com>
656
657         Reviewed by Adam.
658
659         Changes to support sub-menus in WebCore ContextMenus.
660
661         * WebCoreSupport/WebContextMenuClient.mm:
662         (WebContextMenuClient::contextMenuItemSelected): 
663         ContextMenuItem::menu() is now called parentMenu()
664         * WebView/WebUIDelegatePrivate.h: New not-yet-API tags.
665
666 2006-12-01  Darin Adler  <darin@apple.com>
667
668         Reviewed by Mitz.
669
670         - fix http://bugs.webkit.org/show_bug.cgi?id=11628
671           REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window
672
673         * WebCoreSupport/WebFrameLoaderClient.mm:
674         (findKeyStateEvent): Added. Helper that finds the mouse or keyboard event in a chain
675         of events and their underlying events.
676         (findMouseEvent): Added. Same, but specifically for mouse events.
677         (WebFrameLoaderClient::actionDictionary): Rewrote to use the above functions. This means we
678         use the modifiers from the underlying events rather than just the one from the event itself.
679         So if the event is a DOM activate event, we can still see the modifiers from the original
680         keyboard event that triggered it. Has no effect if the event is already the right type or
681         if there is no underlying event.
682
683         * WebView/WebFrame.mm: Added a newly-needed include.
684
685         * WebKit.xcodeproj/project.pbxproj: Xcode wants what it wants.
686
687 2006-12-01  Don Gibson  <dgibson77@gmail.com>
688
689         Reviewed by Mitz.
690
691         http://bugs.webkit.org/show_bug.cgi?id=11732:
692         Windows build bustage.
693
694         * COM/WebFrame.cpp:
695         (WebFrame::initWithName):
696
697 2006-12-01  Timothy Hatcher  <timothy@apple.com>
698
699         Reviewed by Adam.
700
701         <rdar://problem/4841432> 9A312: iWeb crashes on launch; _WebReportError missing from WebKit
702
703         Added back WebReportAssertionFailure and WebReportError for apps that still need these symbols.
704
705         * Misc/OldWebAssertions.c: Added.
706         (WebReportAssertionFailure):
707         (WebReportError):
708         * WebKit.LP64.exp: added the new symbols, and sorted the file
709         * WebKit.exp: added the new symbols, and sorted the file
710         * WebKit.xcodeproj/project.pbxproj:
711
712 2006-11-30  Geoffrey Garen  <ggaren@apple.com>
713
714         Rubber Stamped by Anders Carlsson.
715
716         Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
717         suggested a command, and conflicted with a different meaning for 'focusNode'
718         in the Mozilla selection API.
719
720         * WebView/WebHTMLView.m:
721         (-[NSArray clearFocus]):
722
723 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
724
725         Reviewed by Mitz.
726
727         Bug 10698: Scroll wheel causes inspector to shift up
728         http://bugs.webkit.org/show_bug.cgi?id=10698
729
730         Remove size attribute from the tree popup as a workaround for
731         http://bugs.webkit.org/show_bug.cgi?id=11362 Bug 11362: Native popup with size="1" wraps options
732
733         * WebInspector/webInspector/inspector.css:
734         * WebInspector/webInspector/inspector.html:
735
736 2006-11-30  Matt Lilek  <pewtermoose@gmail.com>
737
738         Reviewed by Tim H.
739
740         Move web inspector style markup to javascript to fix http://bugs.webkit.org/show_bug.cgi?id=6724
741         Bug 6724: Text copied from Web Inspector is different from actual text
742
743         * WebInspector/webInspector/inspector.css:
744         * WebInspector/webInspector/inspector.js:
745
746 2006-11-30  Adam Roben  <aroben@apple.com>
747
748         Reviewed by Beth.
749
750         Put code in place to use WebCore context menus when they are turned
751         on.
752
753         * WebView/WebHTMLView.m:
754         (-[NSArray menuForEvent:]):
755
756 2006-11-29  Timothy Hatcher  <timothy@apple.com>
757
758         Reviewed by Oliver.
759
760         Keep preferences separate from the rest of the client, making sure we are using expected preference values.
761         This lets the inspector work when plugins are disabled for the WebView.
762
763         * WebInspector/WebInspector.m:
764         (-[NSWindow window]):
765
766 2006-11-29  Anders Carlsson  <acarlsson@apple.com>
767
768         Reviewed by Tim.
769
770         Add back methods in WebCoreStatistics that are still used by Tiger Safari.
771         
772         * Misc/WebCoreStatistics.h:
773         * Misc/WebCoreStatistics.m:
774         (+[WebCoreStatistics emptyCache]):
775         (+[WebCoreStatistics setCacheDisabled:]):
776
777 2006-11-28  Alice Liu  <alice.liu@apple.com>
778
779         Reviewed by Maciej.
780
781         A fix for a couple failing layout tests involving copy/cut in iframes.
782
783         * WebCoreSupport/WebEditorClient.h:
784         * WebCoreSupport/WebEditorClient.mm:
785         (WebEditorClient::dataForArchivedSelection):
786         Use the frame parameter instead of using the webview's selectedFrame. 
787
788 2006-11-28  Beth Dakin  <bdakin@apple.com>
789
790         Reviewed by Geoffff.
791
792         Fix for http://bugs.webkit.org/show_bug.cgi?id=11691 REGRESSION 
793         (r17399, r17511): WebElementDictionary no longer returns nil 
794         NSStrings
795
796         String's NSString* operator converts null Strings to empty 
797         NSStrings for compatibility with AppKit. We need to work around 
798         that here.
799
800         * Misc/WebElementDictionary.m:
801         (NSStringOrNil):
802         (-[WebElementDictionary _altDisplayString]):
803         (-[WebElementDictionary _spellingToolTip]):
804         (-[WebElementDictionary _title]):
805         (-[WebElementDictionary _titleDisplayString]):
806         (-[WebElementDictionary _textContent]):
807
808 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
809
810         Reviewed by Beth Dakin.
811
812         Fixed <rdar://problem/4844855> Should clarify when to create clients in 
813         the WebCore client API
814         
815         All clients must now be supplied as constructor arguments. This clarifies 
816         when you need to create clients, and also guarantees that objects can't 
817         (for the most part) be in a clientless state.
818
819         Layout tests pass. No leaks reported.
820         
821         * WebCoreSupport/WebFrameBridge.mm: Shuffled around initialization and changed
822         some arguments to resolve ciruclar dependencies at init time.
823         (-[WebFrame _initWithWebFrameView:webView:bridge:]): We no longer call setClient
824         here, because the client is set up at construction time.
825
826 2006-11-28  Anders Carlsson  <acarlsson@apple.com>
827
828         Reviewed by Maciej.
829
830         Update for changes to ResourceRequest.
831         
832         * WebCoreSupport/WebChromeClient.mm:
833         (WebChromeClient::createWindow):
834         (WebChromeClient::createModalDialog):
835         * WebCoreSupport/WebFrameLoaderClient.mm:
836         (WebFrameLoaderClient::canHandleRequest):
837
838 2006-11-28  Adam Roben  <aroben@apple.com>
839
840         Reviewed by Beth.
841
842         More WebCore context menu work.
843
844         * DefaultDelegates/WebDefaultUIDelegate.m: New stub delegate method implementation.
845         (-[NSApplication webView:contextMenuItemSelected:forElement:]):
846         * WebCoreSupport/WebContextMenuClient.h: Updated to match ContextMenuClient.h changes.
847         * WebCoreSupport/WebContextMenuClient.mm:
848         (WebContextMenuClient::addCustomContextMenuItems): Updated for method name changes.
849         (WebContextMenuClient::contextMenuItemSelected): Added new client method.
850         * WebView/WebUIDelegatePrivate.h: New private delegate method declaration.
851
852 2006-11-28  Alice Liu  <alice.liu@apple.com>
853
854         Reviewed by Justin and Adam.
855
856         * WebCoreSupport/WebEditorClient.h:
857         * WebCoreSupport/WebEditorClient.mm:
858         added the following        
859         (WebEditorClient::smartInsertDeleteEnabled):
860         (WebEditorClient::dataForArchivedSelectionInFrame):
861         (WebEditorClient::_web_userVisibleString):
862         (WebEditorClient::shouldInsertNode):
863         
864         * WebKitPrefix.h:
865         Added flags to control whether WebCore cut/copy/paste is enabled.
866         Turned on Cut and Copy, left Paste and Delete off
867         
868         * WebView/WebHTMLViewPrivate.h:
869         * WebView/WebHTMLView.m:
870         removed _can[Cut|Copy|Paste|Delete]
871         (-[NSArray validateUserInterfaceItem:]):
872         call the editor for canDHTML[C|C|P|D] and _can[C|C|P|D] instead 
873         (-[NSArray delete:]):
874         added code to call the editor's delete instead (not turned on)
875         (-[WebHTMLView copy:]):
876         added code to call the editor's copy (turned on)
877         (-[WebHTMLView cut:]):
878         added code to call the editor's cut (turned on)
879         (-[WebHTMLView paste:]):
880         added code to call the editor's paste (not turned on)
881
882 2006-11-28  Geoffrey Garen  <ggaren@apple.com>
883
884         Reviewed by Adam.
885
886         Fixed <rdar://problem/4844848> REGRESSION: extra cross-library ref/deref 
887         calls cause .5% PLT regression.
888         
889         Changed ref/deref calls to a single 'xxxDestroyed' call. Moved EditorClient
890         from the Frame to the Page, since it's only responsible for
891         Webview-level delegate calls.
892         
893         I don't really love this design, but it fixes the regression and allows
894         a single WebKit object to implement multiple client interfaces.
895         
896         Layout tests pass.
897
898 2006-11-27  Beth Dakin  <bdakin@apple.com>
899
900         Reviewed by Adam.
901
902         WebKit half of getting rid of the FixMes in ContextMenu.cpp
903
904         * WebCoreSupport/WebFrameLoaderClient.h: canHandleRequest takes a 
905         ResourceRequest now.
906         * WebCoreSupport/WebFrameLoaderClient.mm:
907         (WebFrameLoaderClient::canHandleRequest): Same.
908         * WebView/WebHTMLView.m:
909         (-[WebHTMLView _isSelectionMisspelled]): Call into WebCore.
910
911 2006-11-27  Ada Chan  <adachan@apple.com>
912
913         Reviewed by Adam.
914
915         Part of the change to move WebCoreCache into WebKit:
916         Added WebCache which handles emptying and enable/disabling the cache.
917         emptyCache and setCacheDisabled have been removed from WebCoreStatistics.
918
919         * Misc/WebCache.h: Added.
920         * Misc/WebCache.mm: Added.
921         * Misc/WebCoreStatistics.h:
922         * Misc/WebCoreStatistics.m:
923         (+[WebCoreStatistics statistics]):
924         * WebKit.exp:
925         * WebKit.xcodeproj/project.pbxproj:
926
927 2006-11-27  Anders Carlsson  <acarlsson@apple.com>
928
929         Reviewed by Adam.
930
931         Move addMessageToConsole to Chrome.
932
933         * WebCoreSupport/WebChromeClient.h:
934         * WebCoreSupport/WebChromeClient.mm:
935         (WebChromeClient::addMessageToConsole):
936         * WebCoreSupport/WebFrameBridge.mm:
937
938 2006-11-27  Brady Eidson  <beidson@apple.com>
939
940         Reviewed by Anders
941
942         Moved unused Private SPI to Internal and pruned other unused code
943
944         * Misc/WebIconDatabase.m:
945         * Misc/WebIconDatabasePrivate.h:
946
947 2006-11-21  Darin Adler  <darin@apple.com>
948
949         Reviewed by Maciej.
950
951         - make the close method do a more-complete job to prevent world leaks seen when
952           running some of the layout tests
953
954         * WebView/WebHTMLViewInternal.h: Added declaration of -[WebHTMLViewPrivate clear].
955         * WebView/WebHTMLView.m:
956         (-[WebHTMLViewPrivate clear]): Added method to drop references to other objects.
957         We want to do this at "close" time, rather than waiting for deallocation time.
958         This is especially important for the data source, which indirectly keeps a number of
959         objects alive.
960         (-[WebHTMLView close]): Added an explicit call to clear out the data source on the
961         plug-in controller. Without this, we'd see the plug-in controller making calls to
962         a deallocated data source during the layout tests. Added a call to the new clear method
963         on the private object so that we release the objects at close time instead of waiting
964         for deallocation time.
965
966         * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with the project file,
967         because I can't fight the power.
968
969 2006-11-20  Samuel Weinig  <sam@webkit.org>
970
971         Reviewed by Alexey.
972
973         Fix for http://bugs.webkit.org/show_bug.cgi?id=11656
974         Fix Windows build
975
976         * WebKit.vcproj/WebKit.vcproj: don't include directories that no
977         longer exist.
978
979 2006-11-19  Beth Dakin  <bdakin@apple.com>
980
981         Reviewed by Adam.
982
983         WebKit side of new context menu actions.
984
985         * WebCoreSupport/WebContextMenuClient.h: These are for the 
986         currently-WebKit-dependent menu actions.
987         * WebCoreSupport/WebContextMenuClient.mm:
988         (WebContextMenuClient::copyLinkToClipboard):
989         (WebContextMenuClient::downloadURL):
990         (WebContextMenuClient::copyImageToClipboard):
991         (WebContextMenuClient::searchWithSpotlight):
992         (WebContextMenuClient::lookUpInDictionary):
993         * WebCoreSupport/WebEditorClient.h:
994         * WebCoreSupport/WebEditorClient.mm:
995         (core): These are to convert between WebViewInsertAction and 
996         EditorInsertAction.
997         (kit):
998         (WebEditorClient::shouldInsertText): Added implementation for 
999         shouldInsertText.
1000         * WebKit.xcodeproj/project.pbxproj:
1001         * WebView/WebHTMLView.m:
1002         (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Moved 
1003         _lookUpInDictionary to be within the implementation of WebHTMLView 
1004         internal.
1005         * WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
1006         * WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu
1007
1008 2006-11-18  Don Gibson  <dgibson77@gmail.com>
1009
1010         Reviewed by Sam Weinig.
1011
1012         http://bugs.webkit.org/show_bug.cgi?id=11634:
1013         Fix segfault on startup for Windows build.  Also fix segfault when
1014         typing in a URL.
1015
1016         * COM/WebFrame.cpp:
1017         (WebFrame::initWithName):
1018
1019 === Safari-521.31 ===
1020
1021 2006-11-17  Timothy Hatcher  <timothy@apple.com>
1022
1023         Reviewed by Geoff.
1024
1025         <rdar://problem/4841044> Temporarily default Mail.app editable link clicking behavior, until they do it themselves
1026
1027         * WebKit.xcodeproj/project.pbxproj:
1028         * WebView/WebView.mm:
1029         (+[WebView initialize]):
1030         (-[WebView setPreferences:]):
1031
1032 2006-11-16  Don Gibson  <dgibson77@gmail.com>
1033
1034         Reviewed and landed by ap.
1035
1036         http://bugs.webkit.org/show_bug.cgi?id=11509:
1037         Windows build bustage.
1038
1039         * COM/WebFrame.cpp:
1040         (WebFrame::initWithName):
1041         (WebFrame::loadHTMLString):
1042         (WebFrame::stopLoading):
1043         (WebFrame::reload):
1044         (WebFrame::loadDataSource):
1045         (WebFrame::didReceiveData):
1046         (WebFrame::receivedResponse):
1047         (WebFrame::receivedAllData):
1048         * COM/WebFrame.h:
1049         * COM/WebView.cpp:
1050         (WebView::mouseMoved):
1051         (WebView::mouseDown):
1052         (WebView::mouseUp):
1053         (WebView::mouseDoubleClick):
1054         * WebKit.vcproj/WebKit.vcproj:
1055
1056 2006-11-16  Anders Carlsson  <acarlsson@apple.com>
1057
1058         Reviewed by Tim.
1059
1060         <rdar://problem/4841123>
1061         REGRESSION: Crash in WebCore::Range::boundaryPointsValid when replying to a mail Message
1062         
1063         * Misc/WebNSAttributedStringExtras.m:
1064         (+[NSAttributedString _web_attributedStringFromRange:]):
1065         If the range passed in is null, return null. When this function was in the bridge, it would never get called
1066         with a null range when nothing was selected. Instead, the range would just have invalid boundary points.
1067
1068 2006-11-15  Adam Roben  <aroben@apple.com>
1069
1070         Reviewed by Anders.
1071
1072         Added new WebContextMenuClient class to act as WebCore's ChromeClient,
1073         and moved context menu-related code there from WebChromeClient.
1074
1075         * WebCoreSupport/WebChromeClient.h:
1076         * WebCoreSupport/WebChromeClient.mm:
1077         * WebCoreSupport/WebContextMenuClient.h: Added.
1078         (WebContextMenuClient::webView):
1079         * WebCoreSupport/WebContextMenuClient.mm: Added.
1080         (WebContextMenuClient::create):
1081         (WebContextMenuClient::WebContextMenuClient):
1082         (WebContextMenuClient::ref):
1083         (WebContextMenuClient::deref):
1084         (WebContextMenuClient::addCustomContextMenuItems):
1085         * WebKit.xcodeproj/project.pbxproj: Added new files.
1086         * WebView/WebView.mm:
1087         (-[WebView _commonInitializationWithFrameName:groupName:]):
1088
1089 2006-11-15  Beth Dakin  <bdakin@apple.com>
1090         &   Adam Roben  <aroben@apple.com>
1091
1092         Reviewed by Adam & Beth.
1093
1094         WebKit side of first cut at engine context menus. Use the client to 
1095         call into the UIDelegate.
1096
1097         * WebCoreSupport/WebChromeClient.h:
1098         * WebCoreSupport/WebChromeClient.mm:
1099         (WebChromeClient::addCustomContextMenuItems):
1100         * WebKit.xcodeproj/project.pbxproj:
1101
1102 2006-11-15  Brady Eidson  <beidson@apple.com>
1103
1104         Reviewed by Maciej
1105
1106         Quick change of files to ObjC++ for BF cache re-write
1107
1108         * History/WebBackForwardList.m: Removed.
1109         * History/WebBackForwardList.mm: Added.
1110         * History/WebHistoryItem.m: Removed.
1111         * History/WebHistoryItem.mm: Added.
1112         * WebKit.xcodeproj/project.pbxproj:
1113
1114 2006-11-15  Brady Eidson  <beidson@apple.com>
1115
1116         Reviewed by Sarge
1117
1118         SPI addition
1119
1120         * WebView/WebFrame.mm:
1121         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
1122         * WebView/WebFrameInternal.h:
1123         * WebView/WebFramePrivate.h:
1124
1125 2006-11-15  Brady Eidson  <beidson@apple.com>
1126
1127         Reviewed by Adele
1128
1129         <rdar://problem/4838729> - Replace mistakenly removed SPI
1130
1131         * WebView/WebHTMLView.m:
1132         (-[WebHTMLView _handleAutoscrollForMouseDragged:]):
1133         * WebView/WebHTMLViewPrivate.h:
1134
1135 2006-11-15  Anders Carlsson  <acarlsson@apple.com>
1136
1137         Reviewed by Adele.
1138
1139         isTargetItem is used by DRT, so make it private instead of internal.
1140         
1141         * History/WebHistoryItem.m:
1142         (-[WebHistoryItem isTargetItem]):
1143         * History/WebHistoryItemInternal.h:
1144         * History/WebHistoryItemPrivate.h:
1145         * WebCoreSupport/WebFrameLoaderClient.mm:
1146
1147 2006-11-15  Brady Eidson  <beidson@apple.com>
1148
1149         Reviewed by Maciej
1150
1151         Split much of unused WebHistoryItemPrivate.h SPI into WebHistoryItemInternal.h
1152
1153         * History/WebBackForwardList.m:
1154         * History/WebHistory.m:
1155         * History/WebHistoryItem.m:
1156         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
1157         (-[WebHistoryItem initWithURL:title:]):
1158         (-[WebHistoryItem visitCount]):
1159         (-[WebHistoryItem RSSFeedReferrer]):
1160         (-[WebHistoryItem setRSSFeedReferrer:]):
1161         (-[WebHistoryItem children]):
1162         (-[WebHistoryItem dictionaryRepresentation]):
1163         (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
1164         (+[WebHistoryItem _releaseAllPendingPageCaches]):
1165         (-[WebHistoryItem URL]):
1166         (-[WebHistoryItem target]):
1167         (-[WebHistoryItem _setLastVisitedTimeInterval:]):
1168         (-[WebHistoryItem _lastVisitedDate]):
1169         (-[WebHistoryItem targetItem]):
1170         * History/WebHistoryItemInternal.h: Added.
1171         * History/WebHistoryItemPrivate.h:
1172         * WebCoreSupport/WebFrameBridge.mm:
1173         * WebCoreSupport/WebFrameLoaderClient.mm:
1174         * WebKit.xcodeproj/project.pbxproj:
1175         * WebView/WebFrame.mm:
1176         * WebView/WebView.mm:
1177
1178 2006-11-14  Beth Dakin  <bdakin@apple.com>
1179
1180         Reviewed by Geoff.
1181
1182         Moving things off the bridge and onto clients.
1183
1184         * WebCoreSupport/WebEditorClient.h:
1185         * WebCoreSupport/WebEditorClient.mm:
1186         (WebEditorClient::selectWordBeforeMenuEvent):
1187         (WebEditorClient::isEditable):
1188         * WebCoreSupport/WebFrameBridge.mm:
1189         * WebKit.xcodeproj/project.pbxproj:
1190
1191 2006-11-14  Timothy Hatcher  <timothy@apple.com>
1192
1193         Reviewed by Harrison.
1194
1195         <rdar://problem/4766635> Safari should never follow links in editable areas (add a WebKitEditableLinkNeverLive option)
1196
1197         Adds an Open Link, Open Link in New Window and Copy Link to the editing context menu.
1198         Adds a new WebKitEditableLinkNeverLive preference value that maps to WebCore's EditableLinkNeverLive.
1199
1200         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
1201         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
1202         (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1203         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1204         (-[WebDefaultUIDelegate requestWithURL:includingReferrerFromFrame:]):
1205         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
1206         (-[WebDefaultUIDelegate openLink:]):
1207         * English.lproj/Localizable.strings:
1208         * WebKit.exp:
1209         * WebView/WebPreferences.m:
1210         (-[WebPreferences editableLinkBehavior]):
1211         * WebView/WebPreferencesPrivate.h:
1212         * WebView/WebUIDelegatePrivate.h:
1213
1214 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
1215
1216         Turns out I wasn't forcing DWARF on the world at all, 
1217         it's now the default!
1218
1219         * WebKit.xcodeproj/project.pbxproj:
1220
1221 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
1222
1223         I must stop trying to force DWARF on the world.
1224
1225         * WebKit.xcodeproj/project.pbxproj:
1226
1227 2006-11-14  Darin Adler  <darin@apple.com>
1228
1229         Reviewed by Anders.
1230
1231         - update for creation of EventHandler
1232
1233         * WebCoreSupport/WebFrameLoaderClient.mm:
1234         (WebFrameLoaderClient::actionDictionary):
1235         * WebView/WebHTMLView.m:
1236         (-[WebHTMLView _updateMouseoverWithEvent:]):
1237         (-[NSArray menuForEvent:]):
1238         (-[NSArray scrollWheel:]):
1239         (-[NSArray acceptsFirstMouse:]):
1240         (-[NSArray shouldDelayWindowOrderingForEvent:]):
1241         (-[NSArray mouseDown:]):
1242         (-[NSArray mouseDragged:]):
1243         (-[NSArray mouseUp:]):
1244         (-[NSArray keyDown:]):
1245         (-[NSArray keyUp:]):
1246         (-[NSArray performKeyEquivalent:]):
1247         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1248
1249 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
1250
1251         Fix build for real this time.
1252         
1253         * WebCoreSupport/WebEditorClient.mm:
1254         (-[WebEditCommand initWithEditCommand:WebCore::]):
1255         (-[WebEditCommand dealloc]):
1256         (-[WebEditCommand finalize]):
1257         (+[WebEditCommand commandWithEditCommand:]):
1258         (-[WebEditCommand command]):
1259
1260 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
1261
1262         Try fixing the build.
1263         
1264         * WebCoreSupport/WebEditorClient.mm:
1265         (-[WebEditorUndoTarget undoEditing:]):
1266         (-[WebEditorUndoTarget redoEditing:]):
1267
1268 2006-11-14  Anders Carlsson  <acarlsson@apple.com>
1269
1270         Reviewed by Darin.
1271
1272         Move undo/redo handling into WebEditorClient.
1273         
1274         * WebCoreSupport/WebEditorClient.h:
1275         * WebCoreSupport/WebEditorClient.mm:
1276         (WebEditorClient::WebEditorClient):
1277         (WebEditorClient::~WebEditorClient):
1278         (-[WebEditCommand initWithEditCommand:WebCore::]):
1279         (-[WebEditCommand dealloc]):
1280         (-[WebEditCommand finalize]):
1281         (+[WebEditCommand commandWithEditCommand:]):
1282         (-[WebEditCommand command]):
1283         (-[WebEditorUndoTarget undoEditing:]):
1284         (-[WebEditorUndoTarget redoEditing:]):
1285         (undoNameForEditAction):
1286         (WebEditorClient::registerCommandForUndoOrRedo):
1287         (WebEditorClient::registerCommandForUndo):
1288         (WebEditorClient::registerCommandForRedo):
1289         (WebEditorClient::clearUndoRedoOperations):
1290         (WebEditorClient::canUndo):
1291         (WebEditorClient::canRedo):
1292         (WebEditorClient::undo):
1293         (WebEditorClient::redo):
1294         * WebCoreSupport/WebFrameBridge.mm:
1295         * WebKit.xcodeproj/project.pbxproj:
1296
1297 2006-11-14  Alexey Proskuryakov  <ap@webkit.org>
1298
1299         Reviewed by Tim H.
1300
1301         http://bugs.webkit.org/show_bug.cgi?id=3387
1302         Redundant keydown, keypress, keyup events sent for arrow keys
1303
1304         Added another layer of ugly hacks around AppKit event dispatching.
1305
1306         1. For arrow keys, keyDown: is invoked after performKeyEquivalent:, so had to store
1307         _private->keyDownEvent in both methods, and make it persist after leaving them.
1308
1309         2. For Esc, AppKit calls performKeyEquivalent: with a fake event of some kind,
1310         use [NSApp currentEvent] to check for this to prevent it from being passed to  WebCore.
1311
1312         Test: manual-tests/arrow-key-events.html
1313
1314         * WebView/WebHTMLView.m:
1315         (-[NSMutableDictionary dealloc]):
1316         (-[NSArray keyDown:]):
1317         (-[NSArray keyUp:]):
1318         (-[NSArray performKeyEquivalent:]):
1319         * WebView/WebHTMLViewInternal.h:
1320
1321 2006-11-12  Brady Eidson <beidson@apple.com>
1322
1323         Rubberstamped by Anders
1324
1325         Changed some #includes from <WebKit/foo.h> to "foo.h"
1326
1327         * History/WebBackForwardList.m:
1328         * History/WebHistory.m:
1329
1330 2006-11-11  Geoffrey Garen  <ggaren@apple.com>
1331
1332         Reviewed by Maciej Stachowiak.
1333         
1334         - Fixed loader crash by clarifying ownership of WebKit client objects. 
1335         WebCore objects own their WebKit clients, and ref and deref through 
1336         virtual methods, leaving WebKit free to use whatever client / reference-counting 
1337         implementation it likes.
1338         
1339         WebKit on Mac just uses the same refcounting class that WebCore uses (Shared),
1340         but other platforms may choose to do other things.
1341
1342         * WebCoreSupport/WebChromeClient.h:
1343         (WebChromeClient::ref):
1344         (WebChromeClient::deref):
1345         (WebChromeClient::refCount):
1346         * WebCoreSupport/WebEditorClient.h: Nixed commented-out function prototypes.
1347         The ones in WebCore make clear what remains to be implemented. Replaced constructor
1348         with factory function to avoid leaks.
1349         * WebCoreSupport/WebEditorClient.mm:
1350         (WebEditorClient::create):
1351         (WebEditorClient::WebEditorClient):
1352         (WebEditorClient::setWebFrame):
1353         * WebCoreSupport/WebFrameBridge.mm:
1354         (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]):
1355         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
1356         * WebCoreSupport/WebFrameLoaderClient.h: Replaced constructor with factory
1357         function to avoid leaks.
1358         (WebFrameLoaderClient::ref):
1359         (WebFrameLoaderClient::deref):
1360         (WebFrameLoaderClient::refCount):
1361         * WebCoreSupport/WebFrameLoaderClient.mm:
1362         (WebFrameLoaderClient::create):
1363         * WebView/WebFrame.mm:
1364         (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
1365
1366 === Safari-521.30 ===
1367
1368 2006-11-10  Maciej Stachowiak  <mjs@apple.com>
1369
1370         Reviewed by Anders.
1371         
1372         - remove some unnecessary uses of WebDataProtocol
1373
1374         * WebView/WebDataSource.mm: Remove the unneeded include.
1375         * WebView/WebView.mm:
1376         (+[WebView _canHandleRequest:]): Don't bother to check for unreachable URL here.
1377         Any request that has one will be an applewebdata: request, which will pass the check anyway.
1378
1379 2006-11-10  Anders Carlsson  <acarlsson@apple.com>
1380
1381         Reviewed by Geoff.
1382
1383         Update for changes to WebCore
1384         * WebView/WebHTMLView.m:
1385         (-[NSArray _applyStyleToSelection:withUndoAction:]):
1386         (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
1387         (-[NSArray _toggleBold]):
1388         (-[NSArray _toggleItalic]):
1389
1390 2006-11-09  Anders Carlsson  <acarlsson@apple.com>
1391
1392         Reviewed by Maciej, Geoff.
1393
1394         Call execCommand directly here instead of going through the bridge.
1395         
1396         * WebView/WebHTMLView.m:
1397         (-[NSArray moveBackward:]):
1398         (-[NSArray moveBackwardAndModifySelection:]):
1399         (-[NSArray moveDown:]):
1400         (-[NSArray moveDownAndModifySelection:]):
1401         (-[NSArray moveForward:]):
1402         (-[NSArray moveForwardAndModifySelection:]):
1403         (-[NSArray moveLeft:]):
1404         (-[NSArray moveLeftAndModifySelection:]):
1405         (-[NSArray moveRight:]):
1406         (-[NSArray moveRightAndModifySelection:]):
1407         (-[NSArray moveToBeginningOfDocument:]):
1408         (-[NSArray moveToBeginningOfDocumentAndModifySelection:]):
1409         (-[NSArray moveToBeginningOfSentence:]):
1410         (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
1411         (-[NSArray moveToBeginningOfLine:]):
1412         (-[NSArray moveToBeginningOfLineAndModifySelection:]):
1413         (-[NSArray moveToBeginningOfParagraph:]):
1414         (-[NSArray moveToBeginningOfParagraphAndModifySelection:]):
1415         (-[NSArray moveToEndOfDocument:]):
1416         (-[NSArray moveToEndOfDocumentAndModifySelection:]):
1417         (-[NSArray moveToEndOfSentence:]):
1418         (-[NSArray moveToEndOfSentenceAndModifySelection:]):
1419         (-[NSArray moveToEndOfLine:]):
1420         (-[NSArray moveToEndOfLineAndModifySelection:]):
1421         (-[NSArray moveToEndOfParagraph:]):
1422         (-[NSArray moveToEndOfParagraphAndModifySelection:]):
1423         (-[NSArray moveParagraphBackwardAndModifySelection:]):
1424         (-[NSArray moveParagraphForwardAndModifySelection:]):
1425         (-[NSArray moveUp:]):
1426         (-[NSArray moveUpAndModifySelection:]):
1427         (-[NSArray moveWordBackward:]):
1428         (-[NSArray moveWordBackwardAndModifySelection:]):
1429         (-[NSArray moveWordForward:]):
1430         (-[NSArray moveWordForwardAndModifySelection:]):
1431         (-[NSArray moveWordLeft:]):
1432         (-[NSArray moveWordLeftAndModifySelection:]):
1433         (-[NSArray moveWordRight:]):
1434         (-[NSArray moveWordRightAndModifySelection:]):
1435
1436 2006-11-10  Brady Eidson  <beidson@apple.com>
1437
1438         Reviewed by Darin
1439   
1440         Took out WebIconDatabaseBridge and made WebKit call IconDatabase directly
1441
1442         * Misc/WebIconDatabase.m:
1443         (-[WebIconDatabase init]):
1444         (-[WebIconDatabase iconForURL:withSize:cache:]):
1445         (-[WebIconDatabase iconURLForURL:]):
1446         (-[WebIconDatabase defaultIconWithSize:]):
1447         (-[WebIconDatabase defaultIconForURL:withSize:]):
1448         (-[WebIconDatabase retainIconForURL:]):
1449         (-[WebIconDatabase releaseIconForURL:]):
1450         (-[WebIconDatabase setDelegate:]):
1451         (-[WebIconDatabase removeAllIcons]):
1452         (-[WebIconDatabase isIconExpiredForIconURL:]):
1453         (-[WebIconDatabase _isEnabled]):
1454         (-[WebIconDatabase _setIconData:forIconURL:]):
1455         (-[WebIconDatabase _setHaveNoIconForIconURL:]):
1456         (-[WebIconDatabase _setIconURL:forURL:]):
1457         (-[WebIconDatabase _hasEntryForIconURL:]):
1458         (-[WebIconDatabase _applicationWillTerminate:]):
1459         (-[WebIconDatabase _resetCachedWebPreferences:]):
1460         (-[WebIconDatabase _convertToWebCoreFormat]):
1461         (webGetNSImage):
1462         * Misc/WebIconDatabaseInternal.h: Added.
1463         * Misc/WebIconDatabasePrivate.h:
1464         * WebCoreSupport/WebFrameLoaderClient.h:
1465         * WebCoreSupport/WebFrameLoaderClient.mm:
1466         (WebFrameLoaderClient::dispatchDidReceiveIcon):
1467         * WebCoreSupport/WebIconDatabaseBridge.h: Removed.
1468         * WebCoreSupport/WebIconDatabaseBridge.m: Removed.
1469         * WebKit.xcodeproj/project.pbxproj:
1470
1471 2006-11-09  Oliver Hunt  <oliver@apple.com>
1472
1473         Reviewed by Brady.
1474         
1475         Updated to make use of MimeTypeRegistry/bridge
1476
1477         * Misc/WebNSPasteboardExtras.m:
1478         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
1479         * WebCoreSupport/WebFrameBridge.mm:
1480         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
1481         * WebView/WebDataSource.mm:
1482         (-[WebDataSource _documentFragmentWithArchive:]):
1483         * WebView/WebHTMLRepresentation.m:
1484         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
1485         (+[WebHTMLRepresentation supportedImageMIMETypes]):
1486         * WebView/WebHTMLView.m:
1487         (-[WebHTMLView _imageExistsAtPaths:]):
1488         (-[WebHTMLView _documentFragmentWithPaths:]):
1489
1490 2006-11-09  Brady Eidson  <beidson@apple.com>
1491
1492         Reviewed by Darin
1493
1494         <rdar://problem/4829080>
1495         More loader re-factoring cleanup - WebFramePolicyListener was over-released
1496
1497         * WebCoreSupport/WebFrameLoaderClient.h: Changed vanilla ptr to a RetainPtr<> 
1498         * WebCoreSupport/WebFrameLoaderClient.mm:
1499         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): Ditto
1500         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto
1501         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto
1502         (WebFrameLoaderClient::dispatchWillSubmitForm): Ditto
1503         (WebFrameLoaderClient::setUpPolicyListener): Ditto
1504         (-[WebFramePolicyListener receivedPolicyDecision:]): Ditto 
1505
1506 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1507
1508         Reviewed by Adam, Oliver.
1509
1510         Update for changes to WebCore. Pass a specific WebFrame to WebEditorClient
1511         instead of just passing the WebView.
1512         
1513         * WebCoreSupport/WebEditorClient.h:
1514         * WebCoreSupport/WebEditorClient.mm:
1515         (WebEditorClient::WebEditorClient):
1516         (WebEditorClient::setWebFrame):
1517         (WebEditorClient::isContinuousSpellCheckingEnabled):
1518         (WebEditorClient::spellCheckerDocumentTag):
1519         (WebEditorClient::shouldDeleteRange):
1520         (WebEditorClient::shouldShowDeleteInterface):
1521         (WebEditorClient::shouldApplyStyle):
1522         (WebEditorClient::shouldBeginEditing):
1523         (WebEditorClient::shouldEndEditing):
1524         (WebEditorClient::didBeginEditing):
1525         (WebEditorClient::respondToChangedContents):
1526         (WebEditorClient::didEndEditing):
1527         * WebCoreSupport/WebFrameBridge.mm:
1528         (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]):
1529         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
1530
1531 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1532
1533         Reviewed by Adam.
1534
1535         Move more code into editor.
1536
1537         * WebCoreSupport/WebEditorClient.h:
1538         * WebCoreSupport/WebEditorClient.mm:
1539         (WebEditorClient::shouldBeginEditing):
1540         (WebEditorClient::shouldEndEditing):
1541         (WebEditorClient::didBeginEditing):
1542         (WebEditorClient::didEndEditing):
1543         * WebCoreSupport/WebFrameBridge.mm:
1544         * WebView/WebHTMLView.m:
1545         (-[NSArray indent:]):
1546         (-[NSArray outdent:]):
1547         * WebView/WebView.mm:
1548         * WebView/WebViewInternal.h:
1549
1550 2006-11-08  Beth Dakin  <bdakin@apple.com>
1551
1552         Reviewed by Adam.
1553
1554         Add WebElementIsContentEditableKey to the WebElementDictionary, and 
1555         use it!
1556
1557         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
1558         (-[WebDefaultUIDelegate 
1559         webView:contextMenuItemsForElement:defaultMenuItems:]): Use new 
1560         WebElementIsContentEditableKey.
1561         * Misc/WebElementDictionary.m:
1562         (+[WebElementDictionary initializeLookupTable]):
1563         (-[WebElementDictionary _isContentEditable]): Call into 
1564         HitTestResult::isContentEditable()
1565         * WebView/WebView.mm: Add new key.
1566         * WebView/WebViewPrivate.h: Add new key.
1567
1568 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1569
1570         Reviewed by Oliver.
1571
1572         Call into the WebCore editor object directly.
1573         
1574         * MigrateHeaders.make:
1575         * WebCoreSupport/WebEditorClient.h:
1576         * WebCoreSupport/WebEditorClient.mm:
1577         (WebEditorClient::shouldDeleteRange):
1578         (WebEditorClient::shouldShowDeleteInterface):
1579         (WebEditorClient::shouldApplyStyle):
1580         * WebView/WebFrame.mm:
1581         (core):
1582         (kit):
1583         * WebView/WebFrameInternal.h:
1584         * WebView/WebHTMLView.m:
1585         (-[NSArray _applyStyleToSelection:withUndoAction:]):
1586         (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
1587         (-[NSArray _toggleBold]):
1588         (-[NSArray _toggleItalic]):
1589         (-[NSArray _changeCSSColorUsingSelector:inRange:]):
1590         (-[NSArray underline:]):
1591         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
1592         * WebView/WebView.mm:
1593         (-[WebView applyStyle:]):
1594
1595 2006-11-08  Anders Carlsson  <acarlsson@apple.com>
1596
1597         Reviewed by Oliver.
1598
1599         <rdar://problem/4825370>
1600         REGRESSION: Selecting "Look Up In Dictionary" from contextual menu fails to open the Dictionary app
1601         
1602         * WebView/WebHTMLView.m:
1603         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1604         Initialize the framework pointer to 0.
1605         
1606 2006-11-07  Darin Adler  <darin@apple.com>
1607
1608         Reviewed by Geoff.
1609
1610         - udpated for changes to move from Frame/FrameMac to FrameLoader
1611
1612         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
1613         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
1614         * Misc/WebNSAttributedStringExtras.m:
1615         (+[NSAttributedString _web_attributedStringFromRange:]):
1616         * Plugins/WebBaseNetscapePluginView.mm:
1617         (-[WebBaseNetscapePluginView requestWithURLCString:]):
1618         * Plugins/WebNetscapePluginEmbeddedView.m:
1619         (-[WebNetscapePluginEmbeddedView didStart]):
1620         * Plugins/WebNetscapePluginStream.mm:
1621         * Plugins/WebPluginController.mm:
1622         (-[WebPluginController pluginView:receivedResponse:]):
1623         * WebCoreSupport/WebFrameBridge.mm:
1624         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1625         * WebCoreSupport/WebFrameLoaderClient.mm:
1626         (WebFrameLoaderClient::provisionalLoadStarted):
1627         * WebView/WebFrame.mm:
1628         (-[WebFrame _canCachePage]):
1629         (+[WebFrame _timeOfLastCompletedLoad]):
1630         (-[WebFrame _loadItem:withLoadType:]):
1631         (-[WebFrame _reloadForPluginChanges]):
1632         (-[WebFrame stopLoading]):
1633
1634 2006-11-07  Anders Carlsson  <acarlsson@apple.com>
1635
1636         Reviewed by Geoff.
1637
1638         Use the WebCore editing enums.
1639         
1640         * WebCoreSupport/WebFrameBridge.mm:
1641         (-[WebFrameBridge undoNameForEditAction:]):
1642         * WebView/WebHTMLView.m:
1643         (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]):
1644         (-[WebHTMLView _deleteSelection]):
1645         (-[WebHTMLView moveBackward:]):
1646         (-[WebHTMLView moveBackwardAndModifySelection:]):
1647         (-[WebHTMLView moveDown:]):
1648         (-[WebHTMLView moveDownAndModifySelection:]):
1649         (-[WebHTMLView moveForward:]):
1650         (-[WebHTMLView moveForwardAndModifySelection:]):
1651         (-[WebHTMLView moveLeft:]):
1652         (-[WebHTMLView moveLeftAndModifySelection:]):
1653         (-[WebHTMLView moveRight:]):
1654         (-[WebHTMLView moveRightAndModifySelection:]):
1655         (-[WebHTMLView moveToBeginningOfDocument:]):
1656         (-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]):
1657         (-[WebHTMLView moveToBeginningOfSentence:]):
1658         (-[WebHTMLView moveToBeginningOfSentenceAndModifySelection:]):
1659         (-[WebHTMLView moveToBeginningOfLine:]):
1660         (-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
1661         (-[WebHTMLView moveToBeginningOfParagraph:]):
1662         (-[WebHTMLView moveToBeginningOfParagraphAndModifySelection:]):
1663         (-[WebHTMLView moveToEndOfDocument:]):
1664         (-[WebHTMLView moveToEndOfDocumentAndModifySelection:]):
1665         (-[WebHTMLView moveToEndOfSentence:]):
1666         (-[WebHTMLView moveToEndOfSentenceAndModifySelection:]):
1667         (-[WebHTMLView moveToEndOfLine:]):
1668         (-[WebHTMLView moveToEndOfLineAndModifySelection:]):
1669         (-[WebHTMLView moveToEndOfParagraph:]):
1670         (-[WebHTMLView moveToEndOfParagraphAndModifySelection:]):
1671         (-[WebHTMLView moveParagraphBackwardAndModifySelection:]):
1672         (-[WebHTMLView moveParagraphForwardAndModifySelection:]):
1673         (-[WebHTMLView moveUp:]):
1674         (-[WebHTMLView moveUpAndModifySelection:]):
1675         (-[WebHTMLView moveWordBackward:]):
1676         (-[WebHTMLView moveWordBackwardAndModifySelection:]):
1677         (-[WebHTMLView moveWordForward:]):
1678         (-[WebHTMLView moveWordForwardAndModifySelection:]):
1679         (-[WebHTMLView moveWordLeft:]):
1680         (-[WebHTMLView moveWordLeftAndModifySelection:]):
1681         (-[WebHTMLView moveWordRight:]):
1682         (-[WebHTMLView moveWordRightAndModifySelection:]):
1683         (-[WebHTMLView pageUp:]):
1684         (-[WebHTMLView pageDown:]):
1685         (-[WebHTMLView pageUpAndModifySelection:]):
1686         (-[WebHTMLView pageDownAndModifySelection:]):
1687         (-[WebHTMLView _expandSelectionToGranularity:]):
1688         (-[WebHTMLView selectParagraph:]):
1689         (-[WebHTMLView selectLine:]):
1690         (-[WebHTMLView selectSentence:]):
1691         (-[WebHTMLView selectWord:]):
1692         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
1693         (-[WebHTMLView _applyParagraphStyleToSelection:withUndoAction:]):
1694         (-[WebHTMLView _toggleBold]):
1695         (-[WebHTMLView _toggleItalic]):
1696         (-[WebHTMLView pasteFont:]):
1697         (-[WebHTMLView changeFont:]):
1698         (-[WebHTMLView changeAttributes:]):
1699         (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
1700         (-[WebHTMLView changeColor:]):
1701         (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
1702         (-[WebHTMLView alignCenter:]):
1703         (-[WebHTMLView alignJustified:]):
1704         (-[WebHTMLView alignLeft:]):
1705         (-[WebHTMLView alignRight:]):
1706         (-[WebHTMLView _deleteWithDirection:SelectionController::granularity:killRing:isTypingAction:]):
1707         (-[WebHTMLView deleteForward:]):
1708         (-[WebHTMLView deleteBackward:]):
1709         (-[WebHTMLView deleteWordForward:]):
1710         (-[WebHTMLView deleteWordBackward:]):
1711         (-[WebHTMLView deleteToBeginningOfLine:]):
1712         (-[WebHTMLView deleteToEndOfLine:]):
1713         (-[WebHTMLView deleteToBeginningOfParagraph:]):
1714         (-[WebHTMLView deleteToEndOfParagraph:]):
1715         (-[WebHTMLView subscript:]):
1716         (-[WebHTMLView superscript:]):
1717         (-[WebHTMLView unscript:]):
1718         (-[WebHTMLView underline:]):
1719         (-[WebHTMLView deleteToMark:]):
1720         (-[WebHTMLView toggleBaseWritingDirection:]):
1721         (-[WebHTMLView changeBaseWritingDirection:]):
1722         (-[WebHTMLView _canSmartCopyOrDelete]):
1723         (-[WebTextCompleteController doCompletion]):
1724         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
1725         * WebView/WebView.mm:
1726         (-[WebView setTypingStyle:]):
1727         (-[WebView applyStyle:]):
1728
1729 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
1730
1731         Reviewed by Tim Hatcher.
1732
1733         Removed ScreenClient. It was highly unpopular, risking my midterm re-election.
1734         
1735         None of Screen's responsibilities require up-calls to WebKit or delegates, 
1736         so WebCore can handle it all.
1737
1738         * WebCoreSupport/WebChromeClient.mm:
1739         (WebChromeClient::setWindowRect):
1740         (WebChromeClient::windowRect):
1741         * WebCoreSupport/WebScreenClient.h: Removed.
1742         * WebCoreSupport/WebScreenClient.mm: Removed.
1743         * WebKit.xcodeproj/project.pbxproj:
1744         * WebView/WebView.mm:
1745         (-[WebView _commonInitializationWithFrameName:groupName:]):
1746
1747 2006-11-06  Geoffrey Garen  <ggaren@apple.com>
1748
1749         Reviewed by Darin.
1750         
1751         Accidentally rolled out this change when removing the WebPageBridge. Now
1752         putting it back.
1753
1754         * WebView/WebView.mm:
1755         (-[WebView _commonInitializationWithFrameName:groupName:]):
1756
1757 2006-11-05  Geoffrey Garen  <ggaren@apple.com>
1758
1759         Reviewed by Maciej, Darin, Anders.
1760
1761         Removed the Page bridge. Beefed up Chrome. Added Screen and ScreenClient.
1762         
1763         (WebChromeClient::pageRect): It may seem weird for the page to ask the Chrome/ChromeClient
1764         about its own dimensions. The idea here is that we're asking the Chrome how
1765         much space it has devoted to the page. We have API for this (-webViewContentRect), but 
1766         it was documented incorrectly (even Safari used it wrong), so we don't use 
1767         it anymore. Once we fix our API/documentation, we can return to making a
1768         delegate callback to ask for the page's size.
1769         (WebChromeClient::createWindow): Changed to take a FrameLoadRequest with
1770         an appropriate referrer, instead of making up its own.
1771         (WebChromeClient::createModalDialog): Changed to take a FrameLoadRequest with
1772         an appropriate referrer, instead of broken out parcels.
1773         * WebCoreSupport/WebPageBridge.h: Removed. Dead Code.
1774         * WebCoreSupport/WebPageBridge.mm: Removed. Dead Code.
1775         * WebCoreSupport/WebScreenClient.h: Added.
1776         * WebCoreSupport/WebScreenClient.mm: Added.
1777         * WebView/WebView.mm: Added NULL checks for new _private->page, since
1778         it's not NULL-safe like the bridge was, and it gets cleared before
1779         dealloc.
1780
1781 2006-11-06  Graham Dennis  <graham.dennis@gmail.com>
1782
1783         Reviewed by Tim Hatcher.
1784
1785         Part of patch for http://bugs.webkit.org/show_bug.cgi?id=11323
1786         Link dragging behaviour does not obey WebKitEditableLinkBehavior WebPref
1787
1788         * DefaultDelegates/WebDefaultUIDelegate.m:
1789         (-[NSApplication webView:dragSourceActionMaskForPoint:]): Logic moved to 
1790         WebHTMLView's _mayStartDragAtEventLocation
1791         * Misc/WebElementDictionary.m: added isLiveLink
1792         (+[WebElementDictionary initializeLookupTable]):
1793         (-[WebElementDictionary _isLiveLink]):
1794         * WebView/WebHTMLView.m: 
1795         (-[WebHTMLView _mayStartDragAtEventLocation:]): Editable links should
1796         only be followed if isLiveLink is true
1797         (-[WebHTMLView _isMoveDrag:]): A drag of a live editable link is not
1798         a move
1799         (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]):
1800         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
1801         * WebView/WebView.mm: added WebElementLinkIsLiveKey
1802         * WebView/WebViewPrivate.h: ditto
1803
1804 2006-11-04  Maciej Stachowiak  <mjs@apple.com>
1805
1806         Reviewed by Oliver.
1807         
1808         - removed unneeded (and obsolete) header includes
1809
1810         * WebCoreSupport/WebFrameBridge.mm:
1811         * WebView/WebFrame.mm:
1812
1813 2006-11-05  Darin Adler  <darin@apple.com>
1814
1815         - WebKit part of Frame.h check-in (forgot to land it)
1816
1817         * WebCoreSupport/WebFrameBridge.h:
1818         * WebCoreSupport/WebFrameBridge.mm:
1819         (-[WebFrameBridge textViewWasFirstResponderAtMouseDownTime:]):
1820         (-[WebFrameBridge shouldInterruptJavaScript]):
1821         (-[WebFrameBridge saveDocumentState:]):
1822         (-[WebFrameBridge previousKeyViewOutsideWebFrameViews]):
1823         (-[WebFrameBridge valueForKey:keys:values:]):
1824         (-[WebFrameBridge getObjectCacheSize]):
1825         (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1826         (-[WebFrameBridge mayStartDragAtEventLocation:]):
1827         (-[WebFrameBridge canGoBackOrForward:]):
1828         (-[WebFrameBridge goBackOrForward:]):
1829         (-[WebFrameBridge print]):
1830         (-[WebFrameBridge getAppletInView:]):
1831         (-[WebFrameBridge pollForAppletInView:]):
1832         (-[WebFrameBridge respondToChangedContents]):
1833         (-[WebFrameBridge respondToChangedSelection]):
1834         (-[WebFrameBridge setIsSelected:forView:]):
1835
1836 2006-11-04  Darin Adler  <darin@apple.com>
1837
1838         Reviewed by Maciej.
1839
1840         - converted more of the loader machinery to work with cross-platform
1841           data structures instead of Macintosh-specific ones
1842
1843           store the computed user agent string as a WebCore::String instead
1844           of an NSString to avoid overhead converting it every time we get it
1845
1846         * COM/WebFrame.cpp:
1847         (WebFrame::initWithName):
1848         * ChangeLog:
1849         * Misc/WebElementDictionary.m:
1850         (-[WebElementDictionary _image]):
1851         (-[WebElementDictionary _targetWebFrame]):
1852         * WebCoreSupport/WebFrameLoaderClient.h:
1853         * WebCoreSupport/WebFrameLoaderClient.mm:
1854         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
1855         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
1856         (WebFrameLoaderClient::setTitle):
1857         (WebFrameLoaderClient::userAgent):
1858         (WebFrameLoaderClient::actionDictionary):
1859         * WebCoreSupport/WebPageBridge.mm:
1860         (WebCore::if):
1861         * WebView/WebDataSource.mm:
1862         (-[WebDataSource _URL]):
1863         (-[WebDataSource _URLForHistory]):
1864         (-[WebDataSource unreachableURL]):
1865         * WebView/WebHTMLView.m:
1866         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
1867         * WebView/WebPDFView.mm:
1868         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1869         (-[WebPDFView _path]):
1870         * WebView/WebView.mm:
1871         (-[WebViewPrivate init]):
1872         (-[WebViewPrivate dealloc]):
1873         (-[WebViewPrivate finalize]):
1874         (-[WebView _preferencesChangedNotification:]):
1875         (-[WebView _cachedResponseForURL:]):
1876         (-[WebView setApplicationNameForUserAgent:]):
1877         (-[WebView setCustomUserAgent:]):
1878         (-[WebView customUserAgent]):
1879         (-[WebView userAgentForURL:]):
1880         (-[WebView _computeUserAgent]):
1881         (-[WebView WebCore::]):
1882         * WebView/WebViewInternal.h:
1883
1884 2006-11-04  Bertrand Guiheneuf <guiheneuf@gmail.com>
1885
1886         Reviewed by Maciej, tweaked and landed by Alexey (using a patch by Don Gibson).
1887
1888         http://bugs.webkit.org/show_bug.cgi?id=11433
1889         Fixes to get WebKit to run on Windows; implemented AffineTransformCairo.
1890
1891         * COM/WebFrame.cpp:
1892         (WebFrame::initWithName):
1893         (WebFrame::loadDataSource):
1894         (WebFrame::receivedRedirect):
1895         (WebFrame::receivedResponse):
1896         (WebFrame::didReceiveData):
1897         (WebFrame::receivedAllData):
1898         Use resource handles now. Do not start doc loader by hand anymore. 
1899         Handle didReceiveData() callback instead of receivedData() which 
1900         is deprecated in implementation of ResourceHandleClient        
1901
1902         * COM/WebFrame.h:
1903         * COM/WebView.cpp:
1904         Applied ResourceLoader --> ResourceHandle renaming
1905
1906         * WebKit.vcproj/WebKit.rc:
1907         Got rid of MFC dependencies (build fix for VCExpress).
1908
1909         * WebKit.vcproj/WebKit.vcproj:
1910         Added platform/graphics platform/network and platform/network/win 
1911         to headers search paths
1912
1913 2006-11-03  Geoffrey Garen  <ggaren@apple.com>
1914
1915         Forgot to add these two files. Oops.
1916
1917         * WebCoreSupport/WebChromeClient.h: Added.
1918         * WebCoreSupport/WebChromeClient.mm: Added.
1919
1920 2006-11-02  Geoffrey Garen  <ggaren@apple.com>
1921
1922         Reviewed by Darin, Beth.
1923
1924         First cut at factoring Page's UIDelegate-related functions into Chrome
1925         and ChromeClient.
1926
1927         Layout tests pass.
1928         
1929         * WebCoreSupport/WebEditorClient.h:
1930         * WebCoreSupport/WebPageBridge.mm:
1931         * WebKit.xcodeproj/project.pbxproj:
1932
1933 2006-11-02  Timothy Hatcher  <timothy@apple.com>
1934
1935         Reviewed by Brady.
1936
1937         Adding outdent to the WebView responder forwarding list.
1938         Also add outdent to WebHTMLView.h and WebViewPrivate.h.
1939
1940         * WebView/WebHTMLView.h:
1941         * WebView/WebViewPrivate.h:
1942         * WebView/WebView.mm:
1943
1944 2006-11-01  John Sullivan  <sullivan@apple.com>
1945
1946         Reviewed by Adam Roben
1947         
1948         - fixed <rdar://problem/4801351> Crash reloading PDF file in new Safari (or closing a window containing a PDF file)
1949
1950         * WebView/WebPDFView.mm:
1951         (-[WebPDFView initWithFrame:]):
1952         Retain the PDFSubview in the code path where we just obtain it by asking the PDFPreviewView for it. We were
1953         unconditionally releasing it in dealloc, but only retaining it in one of the two code paths.
1954
1955 2006-10-31  Mark Rowe  <bdash@webkit.org>
1956
1957         Reviewed by Maciej.
1958
1959         Fix null pointer dereference while running editing/pasteboard/drag-drop-modifies-page.html
1960
1961         * Misc/WebElementDictionary.m:
1962         (-[WebElementDictionary _image]): Add null check.
1963
1964 2006-10-31  Beth Dakin  <bdakin@apple.com>
1965
1966         Reviewed by Maciej.
1967
1968         This creates local functions for the remaining WebElementDictionary 
1969         members that calls into HitTestResult instead of doing magical 
1970         things with the Objective-C DOM classes.
1971
1972         * ChangeLog:
1973         * Misc/WebElementDictionary.m:
1974         (addLookupKey): The values of the dictionary are now just 
1975         selectors. They used to be WebElementMethods which were 
1976         WebElementTargetObjects associated with selectors, but none of that 
1977         is needed any more.
1978         (+[WebElementDictionary initializeLookupTable]): All selectors are 
1979         now local functions, no more WebElementTargetObjects.
1980         (-[WebElementDictionary objectForKey:]): No more target objects!
1981         (-[WebElementDictionary _domNode]): Call into HitTestResult member 
1982         variable.
1983         (-[WebElementDictionary _altDisplayString]): Same.
1984         (-[WebElementDictionary _image]): Same.
1985         (-[WebElementDictionary _absoluteImageURL]): Same.
1986         (-[WebElementDictionary _title]): Same.
1987         (-[WebElementDictionary _absoluteLinkURL]): Same.
1988         (-[WebElementDictionary _targetWebFrame]): Same.
1989         (-[WebElementDictionary _titleDisplayString]): Same.
1990         (-[WebElementDictionary _textContent]): Same.
1991
1992 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
1993
1994         Reviewed by Alice.
1995         
1996         Moved some Editing code from WebKit, the bridge, and WebCore::Frame down 
1997         to WebCore::Editor.
1998
1999         * WebCoreSupport/WebFrameBridge.mm:
2000         * WebView/WebHTMLView.m:
2001         (-[WebHTMLView _shouldDeleteRange:]):
2002         (-[WebHTMLView _canCopy]):
2003         (-[WebHTMLView _canCut]):
2004         (-[WebHTMLView _canDelete]):
2005         (-[WebHTMLView _canPaste]):
2006         (-[WebHTMLView _canEdit]):
2007         (-[WebHTMLView _canEditRichly]):
2008         (-[WebHTMLView _isEditable]):
2009         (-[WebHTMLView _isSelectionInPasswordField]):
2010         (-[NSArray validateUserInterfaceItem:]):
2011         (-[NSArray _expandSelectionToGranularity:]):
2012
2013 2006-10-31  John Sullivan  <sullivan@apple.com>
2014
2015         Reviewed by Beth and Adam
2016         
2017         Display a tooltip when hovering over marked bad grammar.
2018
2019         * Misc/WebElementDictionary.m:
2020         (+[WebElementDictionary initializeLookupTable]):
2021         support spelling tool tip
2022         (-[WebElementDictionary _spellingToolTip]):
2023         new method, calls through to HitTestResult
2024         
2025         * WebView/WebHTMLView.m:
2026         (-[WebHTMLView _updateMouseoverWithEvent:]):
2027         Check for a spelling tool tip; if found, prefer it over the other possible tool tips.
2028         Check for empty strings instead of just nil strings being, since values from 
2029         WebElementDictionary are empty strings.
2030         
2031         * WebView/WebViewPrivate.h:
2032         declare new string constant WebElementSpellingToolTipKey
2033         * WebView/WebView.mm:
2034         define new string constant WebElementSpellingToolTipKey
2035         
2036 2006-10-31  Beth Dakin  <bdakin@apple.com>
2037
2038         Reviewed by Maciej.
2039
2040         Small tweaks to WebKit because of http://bugs.webkit.org/
2041         show_bug.cgi?id=11461 HitTestResult should be split into 
2042         HitTestRequest and HitTestResult
2043
2044         * WebKit.xcodeproj/project.pbxproj:
2045         * WebView/WebHTMLView.m:
2046         (-[WebHTMLView elementAtPoint:allowShadowContent:]): The 
2047         HitTestResult initializer now just takes a point.
2048
2049 2006-10-31  Darin Adler  <darin@apple.com>
2050
2051         Reviewed by Brady.
2052
2053         - got "action dictionary" code out of FrameLoader,
2054           replacing with a class called NavigationAction
2055
2056         * WebCoreSupport/WebFrameLoaderClient.h: Changed parameter types to NavigationAction.
2057         Made elementForEvent non-virtual. Added actionDictionary function.
2058         * WebCoreSupport/WebFrameLoaderClient.mm:
2059         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Changed parameter type,
2060         and used actionDictionary to make the action dictionary.
2061         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
2062         (WebFrameLoaderClient::actionDictionary): Added. Code that was originally in WebCore
2063         that creates the action dictionary (from a NavigationAction).
2064
2065         * WebView/WebFrame.mm: (-[WebFrame _loadItem:withLoadType:]): Use NavigationAction
2066         instead of a dictionary for the action parameters.
2067
2068 2006-10-31  Marvin Decker  <marv.decker@gmail.com>
2069
2070         Reviewed by Maciej.
2071         
2072         - fixed "Stop and reload don't work on the WebView"
2073         http://bugs.webkit.org/show_bug.cgi?id=11285
2074
2075         * COM/WebFrame.cpp:
2076         (WebFrame::stopLoading): Implement.
2077         * COM/WebView.cpp:
2078         (WebView::stopLoading): ditto
2079         (WebView::reload): ditto
2080
2081 2006-10-30  Darin Adler  <darin@apple.com>
2082
2083         * Plugins/WebBaseNetscapePluginView.mm:
2084         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
2085         Fix comment.
2086
2087 2006-10-30  John Sullivan  <sullivan@apple.com>
2088
2089         Reviewed by Geoff Garen
2090
2091         * WebView/WebHTMLView.m:
2092         (-[NSArray checkSpelling:]):
2093         removed code to update spelling panel; WebCore handles that now
2094         (-[NSArray showGuessPanel:]):
2095         ditto
2096
2097 2006-10-30  John Sullivan  <sullivan@apple.com>
2098
2099         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
2100         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
2101         Another wording change to match framework, post-Tiger:
2102         "Check Spelling" -> "Check Document Now"
2103
2104 2006-10-30  John Sullivan  <sullivan@apple.com>
2105
2106         Reviewed by Geoff Garen.
2107         
2108         Moved spelling-related methods from bridge to EditorClient. Added one not-yet-used
2109         grammar-related method.
2110
2111         * WebCoreSupport/WebEditorClient.h:
2112         declare overrides of isContinuousSpellCheckingEnabled(), spellCheckerDocumentTag(), and new
2113         isGrammarCheckingEnabled()
2114         * WebCoreSupport/WebEditorClient.mm:
2115         (WebEditorClient::isContinuousSpellCheckingEnabled):
2116         implement by calling through to WebView
2117         (WebEditorClient::isGrammarCheckingEnabled):
2118         ditto
2119         (WebEditorClient::spellCheckerDocumentTag):
2120         ditto
2121         
2122         * WebCoreSupport/WebFrameBridge.mm:
2123         removed bridge equivalents of these methods
2124
2125 2006-10-30  Geoffrey Garen  <ggaren@apple.com>
2126
2127         Reviewed by Beth.
2128         
2129         Fixed nil-deref crash that I saw while using TOT (not sure how to repro,
2130         but the debugger confirmed the cause).
2131
2132         * WebView/WebFrame.mm:
2133         (core): Added check for NULL bridge.
2134
2135 2006-10-30  Geoffrey Garen  <ggaren@apple.com>
2136
2137         Reviewed by Darin.
2138
2139         Removed a number of editing and selection methods from the bridge.
2140         
2141         I moved cross-platform editing and selection code into WebCore::Editor and 
2142         WebCore::SelectionController, respecitvely.
2143         
2144         All of the seemingly new code here is just code grabbed from WebCore or
2145         merged from WebCoreFrameBridge.
2146         
2147         I changed one piece of internal API: we now pass around Ranges in places
2148         where we used to pass around broken out components of Ranges.
2149         
2150         I also added WebCore XPATH_SUPPORT AND SVG_SUPPORT #defines to the project.
2151         Since we now include WebCore headers that depend on these #defines, we need
2152         to keep in sync with them, to avoid binary incompatibility.
2153
2154 2006-10-30  Darin Adler  <darin@apple.com>
2155
2156         Reviewed by John Sullivan.
2157
2158         - work toward removing Objective-C data types from FrameLoader.h:
2159           removed NSDate, NSString, WebCorePageState, WebCoreResourceLoader,
2160           and WebCoreResourceHandle
2161         - moved bodyBackgroundColor function here from Frame
2162
2163         * History/WebHistoryItem.m: (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
2164         Updated for change in WebCorePageState.
2165
2166         * WebCoreSupport/WebFrameBridge.mm: Removed saveDocumentToPageCache method.
2167
2168         * WebCoreSupport/WebFrameLoaderClient.h: Changed NSDate to double.
2169         * WebCoreSupport/WebFrameLoaderClient.mm:
2170         (WebFrameLoaderClient::invalidateCurrentItemPageCache): Moved the code that was
2171         formerly in invalidatePageCache: on the bridge here.
2172         (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Added code to make the
2173         NSDate here.
2174         (WebFrameLoaderClient::createPageCache): Restructured code to create the
2175         WebCorePageState object directly instead of calling saveDocumentToPageCache on
2176         the bridge.
2177
2178         * WebView/WebFrame.mm: (-[WebFrame _bodyBackgroundColor]): Rewrote this to work
2179         directly with the DOM and renderers rather than using a function on Frame.
2180
2181 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
2182
2183         Reviewed by Anders.
2184
2185         - added ResourceResponse class and didReceiveResponse delegate call
2186
2187         * WebCoreSupport/WebFrameBridge.mm: Removed no longer needed
2188         expiresTimeForResponse: method.
2189
2190 2006-10-29  Darin Adler  <darin@apple.com>
2191
2192         - update for the WebCore rename
2193
2194         * WebCoreSupport/WebFrameLoaderClient.mm:
2195         * WebView/WebFrame.mm:
2196
2197 2006-10-29  Darin Adler  <darin@apple.com>
2198
2199         - update for the WebCore renames
2200
2201         * Plugins/WebNetscapePluginStream.mm:
2202         * Plugins/WebPluginController.mm:
2203         * WebCoreSupport/WebFrameBridge.mm:
2204         * WebCoreSupport/WebFrameLoaderClient.h:
2205         * WebCoreSupport/WebFrameLoaderClient.mm:
2206         (WebFrameLoaderClient::willUseArchive):
2207         (WebFrameLoaderClient::isArchiveLoadPending):
2208         (WebFrameLoaderClient::cancelPendingArchiveLoad):
2209         (WebFrameLoaderClient::deliverArchivedResources):
2210         * WebCoreSupport/WebPageBridge.mm:
2211         (-[WebPageBridge canRunModalNow]):
2212         * WebView/WebDocumentLoaderMac.h:
2213         * WebView/WebFrame.mm:
2214         * WebView/WebHTMLRepresentation.m:
2215         * WebView/WebView.mm:
2216
2217 2006-10-29  Darin Adler  <darin@apple.com>
2218
2219         Rubber stamped by Adam Roben.
2220
2221         - renamed WebCore's WebFrameLoaderClient to match the class name inside it
2222
2223         * WebCoreSupport/WebFrameBridge.mm: Update include.
2224         * WebCoreSupport/WebFrameLoaderClient.h: Ditto.
2225
2226 2006-10-29  Darin Adler  <darin@apple.com>
2227
2228         Reviewed by Maciej.
2229
2230         - eliminate use of NSArray to carry form data around
2231           (the code in this framework was actually using the NSArray to hold a single
2232            NSData anyway, so I just went back to an NSData for now)
2233
2234         - also fixed http://bugs.webkit.org/show_bug.cgi?id=11444
2235           REGRESSION (r17378): Exception (-[NSCFDictionary setObject:forKey:]:
2236           attempt to insert nil value) when submitting a form with an empty
2237           uninitialized field
2238
2239         * History/WebHistoryItem.m:
2240         (-[WebHistoryItem _setFormInfoFromRequest:]):
2241         (-[WebHistoryItem formData]):
2242         * History/WebHistoryItemPrivate.h:
2243         * WebCoreSupport/WebFrameLoaderClient.mm:
2244         (WebFrameLoaderClient::dispatchWillSubmitForm):
2245         * WebView/WebFrame.mm:
2246         (-[WebFrame _loadItem:withLoadType:]):
2247
2248 2006-10-28  Darin Adler  <darin@apple.com>
2249
2250         Reviewed by Maciej.
2251
2252         - eliminated the use of Objective-C for the policy decider
2253           machinery, obviating the need for WebPolicyDeciderMac
2254
2255         - moved the defersLoading flag from WebView to WebCore::Page
2256
2257         - removed unused copies of four methods that in the frame bridge;
2258           the actually-used copies are in the page bridge
2259
2260         - updated for rename of PassRefPtr::release to releaseRef
2261
2262         * WebView/WebPolicyDeciderMac.h: Removed.
2263         * WebView/WebPolicyDeciderMac.m: Removed.
2264         * WebKit.xcodeproj/project.pbxproj: Updated for removal.
2265
2266         * Plugins/WebBaseNetscapePluginView.mm:
2267         (-[WebBaseNetscapePluginView sendEvent:]):
2268         * Plugins/WebNetscapePluginStream.mm:
2269         * WebCoreSupport/WebFrameBridge.mm:
2270         * WebCoreSupport/WebFrameLoaderClient.h:
2271         * WebCoreSupport/WebFrameLoaderClient.mm:
2272         (getWebView):
2273         (WebFrameLoaderClient::WebFrameLoaderClient):
2274         (WebFrameLoaderClient::willCloseDocument):
2275         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2276         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2277         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2278         (WebFrameLoaderClient::cancelPolicyCheck):
2279         (WebFrameLoaderClient::dispatchWillSubmitForm):
2280         (WebFrameLoaderClient::setDefersLoading):
2281         (WebFrameLoaderClient::setTitle):
2282         (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay):
2283         (WebFrameLoaderClient::deliverArchivedResources):
2284         (WebFrameLoaderClient::setUpPolicyListener):
2285         (WebFrameLoaderClient::receivedPolicyDecison):
2286         (WebFrameLoaderClient::userAgent):
2287         (-[WebFramePolicyListener initWithWebCoreFrame:]):
2288         (-[WebFramePolicyListener invalidate]):
2289         (-[WebFramePolicyListener dealloc]):
2290         (-[WebFramePolicyListener finalize]):
2291         (-[WebFramePolicyListener receivedPolicyDecision:]):
2292         (-[WebFramePolicyListener ignore]):
2293         (-[WebFramePolicyListener download]):
2294         (-[WebFramePolicyListener use]):
2295         (-[WebFramePolicyListener continue]):
2296         * WebCoreSupport/WebPageBridge.mm:
2297         (-[WebPageBridge runModal]):
2298         * WebView/WebArchiver.m:
2299         (+[WebArchiver archiveSelectionInFrame:]):
2300         * WebView/WebFormDelegate.h:
2301         * WebView/WebFormDelegate.m:
2302         (+[WebFormDelegate _sharedWebFormDelegate]):
2303         (-[WebFormDelegate textFieldDidBeginEditing:inFrame:]):
2304         (-[WebFormDelegate textFieldDidEndEditing:inFrame:]):
2305         (-[WebFormDelegate textDidChangeInTextField:inFrame:]):
2306         (-[WebFormDelegate textDidChangeInTextArea:inFrame:]):
2307         (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:]):
2308         * WebView/WebFrame.mm:
2309         (-[WebFrame _loadURL:referrer:intoChild:]):
2310         (-[WebFrame _isFrameSet]):
2311         * WebView/WebFrameInternal.h:
2312         * WebView/WebFrameView.mm:
2313         (-[WebFrameView _shouldDrawBorder]):
2314         * WebView/WebHTMLView.m:
2315         (-[NSArray knowsPageRange:]):
2316         * WebView/WebView.mm:
2317         (-[WebView _formDelegate]):
2318         * WebView/WebViewInternal.h:
2319         * WebView/WebViewPrivate.h:
2320
2321 2006-10-28  Adam Roben  <aroben@apple.com>
2322
2323         Reviewed by Maciej.
2324
2325         Fix layout tests that broke after r17399. Mitz discovered that the
2326         failures were caused by HitTestResult::m_point being uninitialized
2327         much of the time. HitTestResults are now always constructed with a
2328         point.
2329
2330         * WebView/WebHTMLView.m:
2331         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Pass point to
2332         HitTestResult constructor.
2333
2334 2006-10-28  Beth Dakin  <bdakin@apple.com>
2335
2336         Reviewed by Darin.
2337
2338         This is the WebKit half of pushing the guts of elementAtPoint and 
2339         WebElementDictionary into WebCore. Among other things, this patch 
2340         makes WebElementDictionary.m and WebHTMLView.m Objective-C++
2341
2342         * MigrateHeaders.make: Add DOMElementInternal.h to the list of 
2343         headers to migrate.
2344         * Misc/WebElementDictionary.h: Replaced DOMNode, DOMElement, and 
2345         NSPoint member variables with a HitTestResult member variable.
2346         * Misc/WebElementDictionary.m:
2347         (addLookupKey): Formatting.
2348         (-[WebElementDictionary initWithHitTestResult:]): Constructor just 
2349         takes a HitTestResult now and sets the member variable.
2350         (-[WebElementDictionary dealloc]): delete HitTestResult.
2351         (-[WebElementDictionary finalize]): Address HitTestResult.
2352         (-[WebElementDictionary _domNode]): Use HitTestResult and call into 
2353         WebCore.
2354         (-[WebElementDictionary objectForKey:]): Same.
2355         (-[WebElementDictionary _webFrame]): Same.
2356         (-[WebElementDictionary _targetWebFrame]): Same.
2357         (-[WebElementDictionary _title]): Same.
2358         (-[WebElementDictionary _imageRect]): Same.
2359         (-[WebElementDictionary _isSelected]): Same.
2360         * WebKit.xcodeproj/project.pbxproj:
2361         * WebView/WebFrame.mm:
2362         (core): Convert from DOMNode* to Node*
2363         (kit): Convert from Node* to DOMNode*
2364         * WebView/WebFrameInternal.h: Support for the above.
2365         * WebView/WebHTMLView.m:
2366         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Call directly 
2367         into Frame.cpp to get HitTestResult.
2368
2369 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
2370
2371         Reviewed by John & Adam.
2372         
2373         - various performance improvements for resource delegate dispatch.
2374         
2375         - avoid any ObjC messaging when fetching the WebView
2376         - avoid ObjC calls to WebView to get resource load delegate and impl cache
2377         - cache actual method pointers, not just the fact that the method is present
2378         - added a new SPI resource load delegate method which allows clients to get
2379           just one message in case of synchronously loading from memory cache; if this
2380           is implemented you don't get the normal delegate calls in that case.
2381         - various other minor tweaks
2382
2383         * WebCoreSupport/WebFrameBridge.h:
2384         * WebCoreSupport/WebFrameLoaderClient.h:
2385         * WebCoreSupport/WebFrameLoaderClient.mm:
2386         (getWebView):
2387         (WebFrameLoaderClient::hasBackForwardList):
2388         (WebFrameLoaderClient::resetBackForwardList):
2389         (WebFrameLoaderClient::privateBrowsingEnabled):
2390         (WebFrameLoaderClient::updateHistoryForStandardLoad):
2391         (WebFrameLoaderClient::resetAfterLoadError):
2392         (WebFrameLoaderClient::download):
2393         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
2394         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
2395         (WebFrameLoaderClient::dispatchWillSendRequest):
2396         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2397         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2398         (WebFrameLoaderClient::dispatchDidReceiveResponse):
2399         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2400         (WebFrameLoaderClient::dispatchDidFinishLoading):
2401         (WebFrameLoaderClient::dispatchDidFailLoading):
2402         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
2403         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2404         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
2405         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
2406         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
2407         (WebFrameLoaderClient::dispatchWillClose):
2408         (WebFrameLoaderClient::dispatchDidReceiveIcon):
2409         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2410         (WebFrameLoaderClient::dispatchDidReceiveTitle):
2411         (WebFrameLoaderClient::dispatchDidCommitLoad):
2412         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2413         (WebFrameLoaderClient::dispatchDidFailLoad):
2414         (WebFrameLoaderClient::dispatchDidFinishLoad):
2415         (WebFrameLoaderClient::dispatchDidFirstLayout):
2416         (WebFrameLoaderClient::dispatchCreatePage):
2417         (WebFrameLoaderClient::dispatchShow):
2418         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2419         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2420         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2421         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
2422         (WebFrameLoaderClient::dispatchWillSubmitForm):
2423         (WebFrameLoaderClient::dispatchDidLoadMainResource):
2424         (WebFrameLoaderClient::progressStarted):
2425         (WebFrameLoaderClient::progressCompleted):
2426         (WebFrameLoaderClient::incrementProgress):
2427         (WebFrameLoaderClient::completeProgress):
2428         (WebFrameLoaderClient::setMainFrameDocumentReady):
2429         (WebFrameLoaderClient::startDownload):
2430         (WebFrameLoaderClient::willChangeTitle):
2431         (WebFrameLoaderClient::didChangeTitle):
2432         (WebFrameLoaderClient::mainFrameURL):
2433         (WebFrameLoaderClient::frameLoadCompleted):
2434         * WebCoreSupport/WebPageBridge.h:
2435         * WebKit.xcodeproj/project.pbxproj:
2436         * WebView/WebFrame.mm:
2437         (frame):
2438         (core):
2439         (kit):
2440         (getWebView):
2441         (-[WebFrame _addBackForwardItemClippedAtTarget:]):
2442         (-[WebFrame _canCachePage]):
2443         (-[WebFrame _purgePageCache]):
2444         (-[WebFrame _loadItem:withLoadType:]):
2445         (-[WebFrame _goToItem:withLoadType:]):
2446         (-[WebFrame _updateBackground]):
2447         (-[WebFrame _clearSelectionInOtherFrames]):
2448         (-[WebFrame _isMainFrame]):
2449         (-[WebFrame webView]):
2450         * WebView/WebResourceLoadDelegatePrivate.h: Added.
2451         * WebView/WebView.mm:
2452         (-[WebView _cacheResourceLoadDelegateImplementations]):
2453         (WebViewGetResourceLoadDelegate):
2454         (WebViewGetResourceLoadDelegateImplementations):
2455         * WebView/WebViewInternal.h:
2456         * WebView/WebViewPrivate.h:
2457
2458 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
2459
2460         Reviewed by Maciej.
2461         
2462         Moved some WebCoreFrameBridge functions into FrameLoader.
2463
2464         * WebView/WebFrame.mm:
2465         (-[WebFrame _numPendingOrLoadingRequests:]):
2466
2467 2006-10-27  Timothy Hatcher  <timothy@apple.com>
2468
2469         Reviewed by Beth.
2470
2471         Make a DerivedSource/Webkit directory to store migrated
2472         internal headers from WebCore.
2473
2474         * MigrateHeaders.make:
2475         * WebKit.xcodeproj/project.pbxproj:
2476         * WebView/WebFrame.mm: import the new migrated DOM*Internal.h headers
2477
2478 2006-10-27  John Sullivan  <sullivan@apple.com>
2479
2480         Reviewed by Anders
2481         
2482         - fixed http://bugs.webkit.org/show_bug.cgi?id=11439 
2483           REGRESSION: Another page loading crash
2484
2485         * WebView/WebFrame.mm:
2486         (-[WebFrame _createItem:]):
2487         Handle nil documentLoader the way we did before ObjC->C++ changes
2488
2489 2006-10-27  John Sullivan  <sullivan@apple.com>
2490
2491         Reviewed by Anders
2492
2493         * WebView/WebHTMLView.m:
2494         (-[NSArray checkSpelling:]):
2495         call advanceToNextMisspelling directly on FrameMac, bypassing bridge
2496         (-[NSArray showGuessPanel:]):
2497         ditto
2498
2499 2006-10-27  Darin Adler  <darin@apple.com>
2500
2501         - build fix
2502
2503         * WebCoreSupport/WebFrameLoaderClient.mm: Corrected header file name.
2504
2505 2006-10-27  Darin Adler  <darin@apple.com>
2506
2507         Reviewed by Maciej.
2508
2509         - moved methods that are there just to be called by the frame loader client into the client
2510           in an attempt to get back some of the speed we lost yesterday
2511
2512         * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
2513         (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
2514         (-[WebDefaultResourceLoadDelegate webView:resource:didCancelAuthenticationChallenge:fromDataSource:]):
2515         * WebCoreSupport/WebFrameLoaderClient.h:
2516         * WebCoreSupport/WebFrameLoaderClient.mm:
2517         (dataSource):
2518         (decisionListener):
2519         (WebFrameLoaderClient::WebFrameLoaderClient):
2520         (WebFrameLoaderClient::hasWebView):
2521         (WebFrameLoaderClient::hasFrameView):
2522         (WebFrameLoaderClient::hasBackForwardList):
2523         (WebFrameLoaderClient::resetBackForwardList):
2524         (WebFrameLoaderClient::provisionalItemIsTarget):
2525         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
2526         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
2527         (WebFrameLoaderClient::privateBrowsingEnabled):
2528         (WebFrameLoaderClient::makeDocumentView):
2529         (WebFrameLoaderClient::makeRepresentation):
2530         (WebFrameLoaderClient::setDocumentViewFromPageCache):
2531         (WebFrameLoaderClient::forceLayout):
2532         (WebFrameLoaderClient::forceLayoutForNonHTML):
2533         (WebFrameLoaderClient::updateHistoryForCommit):
2534         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
2535         (WebFrameLoaderClient::updateHistoryForReload):
2536         (WebFrameLoaderClient::updateHistoryForStandardLoad):
2537         (WebFrameLoaderClient::updateHistoryForInternalLoad):
2538         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
2539         (WebFrameLoaderClient::setCopiesOnScroll):
2540         (WebFrameLoaderClient::tokenForLoadErrorReset):
2541         (WebFrameLoaderClient::resetAfterLoadError):
2542         (WebFrameLoaderClient::doNotResetAfterLoadError):
2543         (WebFrameLoaderClient::detachedFromParent1):
2544         (WebFrameLoaderClient::detachedFromParent2):
2545         (WebFrameLoaderClient::detachedFromParent3):
2546         (WebFrameLoaderClient::detachedFromParent4):
2547         (WebFrameLoaderClient::loadedFromPageCache):
2548         (WebFrameLoaderClient::download):
2549         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
2550         (WebFrameLoaderClient::dispatchWillSendRequest):
2551         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2552         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2553         (WebFrameLoaderClient::dispatchDidReceiveResponse):
2554         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2555         (WebFrameLoaderClient::dispatchDidFinishLoading):
2556         (WebFrameLoaderClient::dispatchDidFailLoading):
2557         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
2558         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2559         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
2560         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
2561         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
2562         (WebFrameLoaderClient::dispatchWillClose):
2563         (WebFrameLoaderClient::dispatchDidReceiveIcon):
2564         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2565         (WebFrameLoaderClient::dispatchDidReceiveTitle):
2566         (WebFrameLoaderClient::dispatchDidCommitLoad):
2567         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2568         (WebFrameLoaderClient::dispatchDidFailLoad):
2569         (WebFrameLoaderClient::dispatchDidFinishLoad):
2570         (WebFrameLoaderClient::dispatchDidFirstLayout):
2571         (WebFrameLoaderClient::dispatchCreatePage):
2572         (WebFrameLoaderClient::dispatchShow):
2573         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2574         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2575         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2576         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
2577         (WebFrameLoaderClient::dispatchWillSubmitForm):
2578         (WebFrameLoaderClient::dispatchDidLoadMainResource):
2579         (WebFrameLoaderClient::clearLoadingFromPageCache):
2580         (WebFrameLoaderClient::isLoadingFromPageCache):
2581         (WebFrameLoaderClient::revertToProvisionalState):
2582         (WebFrameLoaderClient::setMainDocumentError):
2583         (WebFrameLoaderClient::clearUnarchivingState):
2584         (WebFrameLoaderClient::progressStarted):
2585         (WebFrameLoaderClient::progressCompleted):
2586         (WebFrameLoaderClient::incrementProgress):
2587         (WebFrameLoaderClient::completeProgress):
2588         (WebFrameLoaderClient::setMainFrameDocumentReady):
2589         (WebFrameLoaderClient::startDownload):
2590         (WebFrameLoaderClient::willChangeTitle):
2591         (WebFrameLoaderClient::didChangeTitle):
2592         (WebFrameLoaderClient::committedLoad):
2593         (WebFrameLoaderClient::finishedLoading):
2594         (WebFrameLoaderClient::finalSetupForReplace):
2595         (WebFrameLoaderClient::cancelledError):
2596         (WebFrameLoaderClient::cannotShowURLError):
2597         (WebFrameLoaderClient::interruptForPolicyChangeError):
2598         (WebFrameLoaderClient::cannotShowMIMETypeError):
2599         (WebFrameLoaderClient::fileDoesNotExistError):
2600         (WebFrameLoaderClient::shouldFallBack):
2601         (WebFrameLoaderClient::mainFrameURL):
2602         (WebFrameLoaderClient::setDefersCallbacks):
2603         (WebFrameLoaderClient::willUseArchive):
2604         (WebFrameLoaderClient::isArchiveLoadPending):
2605         (WebFrameLoaderClient::cancelPendingArchiveLoad):
2606         (WebFrameLoaderClient::clearArchivedResources):
2607         (WebFrameLoaderClient::canHandleRequest):
2608         (WebFrameLoaderClient::canShowMIMEType):
2609         (WebFrameLoaderClient::representationExistsForURLScheme):
2610         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
2611         (WebFrameLoaderClient::elementForEvent):
2612         (WebFrameLoaderClient::createPolicyDecider):
2613         (WebFrameLoaderClient::frameLoadCompleted):
2614         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
2615         (WebFrameLoaderClient::provisionalLoadStarted):
2616         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
2617         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
2618         (WebFrameLoaderClient::didFinishLoad):
2619         (WebFrameLoaderClient::prepareForDataSourceReplacement):
2620         (WebFrameLoaderClient::createDocumentLoader):
2621         (WebFrameLoaderClient::setTitle):
2622         (WebFrameLoaderClient::canUseArchivedResource):
2623         (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay):
2624         (WebFrameLoaderClient::deliverArchivedResources):
2625         (WebFrameLoaderClient::createPageCache):
2626         * WebView/WebFrame.mm:
2627         (-[NSView setWebFrame:]):
2628         (-[WebFrame _createItem:]):
2629         (-[WebFrame _loadItem:withLoadType:]):
2630         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
2631         (-[WebFrame _loadURL:referrer:intoChild:]):
2632         (-[WebFrame _saveScrollPositionAndViewStateToItem:]):
2633         (-[WebFrame _hasSelection]):
2634         (-[WebFrame _clearSelection]):
2635         (-[WebFrame _setProvisionalItem:]):
2636         (-[WebFrame _setPreviousItem:]):
2637         (-[WebFrame _setCurrentItem:]):
2638         (-[WebFrame loadArchive:]):
2639         * WebView/WebFrameInternal.h:
2640         * WebView/WebHTMLView.m:
2641         (-[WebHTMLView _topHTMLView]):
2642         * WebView/WebHTMLViewPrivate.h:
2643
2644 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
2645
2646         Reviewed by Darin, Maciej.
2647
2648         Removed many uses of NSString * from WebCore.
2649         
2650         Changed a few files to ObjC++ for compatiblity with new WebCore methods
2651         taking WebCore::Strings as arguments.
2652         
2653         Added a static_cast to make the c++ compiler happy.
2654
2655 2006-10-26  John Sullivan  <sullivan@apple.com>
2656
2657         Reviewed by Anders
2658
2659         * WebView/WebFrame.mm:
2660         now includes <WebCore/Document.h> and <WebCore/DocumentMarker.h>
2661         (-[WebFrame _unmarkAllBadGrammar]):
2662         filled in guts
2663         (-[WebFrame _unmarkAllMisspellings]):
2664         rewrote to call Document directly, bypassing bridge
2665
2666 2006-10-26  John Sullivan  <sullivan@apple.com>
2667
2668         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
2669         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
2670         
2671         Changed "Spelling" to "Spelling and Grammar" in context menu for post-Tiger.
2672
2673 === Safari-521.29 ===
2674
2675 2006-10-26  John Sullivan  <sullivan@apple.com>
2676
2677         No review, just two localized string changes.
2678         
2679         * WebView/WebHTMLView.m:
2680         (-[NSArray validateUserInterfaceItem:]):
2681         changed "Show/Hide Spelling" to "Show/Hide Spelling and Grammar" post-Tiger to match framework change
2682
2683         * English.lproj/Localizable.strings:
2684         updated for these changes
2685
2686 2006-10-25  Darin Adler  <darin@apple.com>
2687
2688         Reviewed by Anders.
2689
2690         - removed 55 methods from WebCoreFrameBridge
2691         - changed callers to use Frame directly instead
2692         - put FrameLoaderTypes.h types into the WebCore namespace
2693         - first steps to get FrameLoader.h ready for cross-platform duty
2694
2695         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
2696         (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
2697         * Plugins/WebBaseNetscapePluginView.mm:
2698         (-[WebBaseNetscapePluginView requestWithURLCString:]):
2699         (-[WebBaseNetscapePluginView loadPluginRequest:]):
2700         (-[WebBaseNetscapePluginView getVariable:value:]):
2701         * Plugins/WebNetscapePluginEmbeddedView.m:
2702         (-[WebNetscapePluginEmbeddedView didStart]):
2703         * Plugins/WebNetscapePluginStream.mm:
2704         * Plugins/WebPluginContainerCheck.m:
2705         (-[WebPluginContainerCheck _continueWithPolicy:]):
2706         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
2707         * WebCoreSupport/WebEditorClient.mm:
2708         (WebEditorClient::shouldDeleteRange):
2709         (WebEditorClient::shouldShowDeleteInterface):
2710         * WebCoreSupport/WebFrameBridge.mm:
2711         (-[WebFrameBridge webView]):
2712         (-[WebFrameBridge finishInitializingWithFrameName:view:]):
2713         (-[WebFrameBridge createWindowWithURL:]):
2714         (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
2715         (-[WebFrameBridge windowObjectCleared]):
2716         (-[WebFrameBridge createModalDialogWithURL:]):
2717         * WebCoreSupport/WebFrameLoaderClient.mm:
2718         (WebFrameLoaderClient::dispatchCreatePage):
2719         (WebFrameLoaderClient::dispatchWillSubmitForm):
2720         * WebKit.xcodeproj/project.pbxproj:
2721         * WebView/WebArchiver.m:
2722         (+[WebArchiver archiveSelectionInFrame:]):
2723         * WebView/WebDataSource.mm:
2724         (-[WebDataSource _documentFragmentWithImageResource:]):
2725         (-[WebDataSource _imageElementWithImageResource:]):
2726         * WebView/WebEditingDelegatePrivate.h:
2727         * WebView/WebFrame.mm:
2728         (core):
2729         (kit):
2730         (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
2731         (-[WebFrame _canCachePage]):
2732         (-[WebFrame _childFramesMatchItem:]):
2733         (-[WebFrame _URLsMatchItem:]):
2734         (-[WebFrame _loadItem:withLoadType:]):
2735         (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
2736         (-[WebFrame _viewWillMoveToHostWindow:]):
2737         (-[WebFrame _viewDidMoveToHostWindow]):
2738         (-[WebFrame _addChild:]):
2739         (-[WebFrame _saveDocumentAndScrollState]):
2740         (-[WebFrame _numPendingOrLoadingRequests:]):
2741         (-[WebFrame _reloadForPluginChanges]):
2742         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
2743         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
2744         (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
2745         (-[WebFrame _documentViews]):
2746         (-[WebFrame _updateBackground]):
2747         (-[WebFrame _unmarkAllMisspellings]):
2748         (-[WebFrame _hasSelection]):
2749         (-[WebFrame _atMostOneFrameHasSelection]):
2750         (-[WebFrame _findFrameWithSelection]):
2751         (-[WebFrame _frameLoader]):
2752         (-[WebFrame _isDescendantOfFrame:]):
2753         (-[WebFrame _setShouldCreateRenderers:]):
2754         (-[WebFrame _bodyBackgroundColor]):
2755         (-[WebFrame init]):
2756         (-[WebFrame initWithName:webFrameView:webView:]):
2757         (-[WebFrame dealloc]):
2758         (-[WebFrame finalize]):
2759         (-[WebFrame name]):
2760         (-[WebFrame webView]):
2761         (-[WebFrame DOMDocument]):
2762         (-[WebFrame frameElement]):
2763         (-[WebFrame findFrameNamed:]):
2764         (-[WebFrame parentFrame]):
2765         (-[WebFrame childFrames]):
2766         (-[WebFrame _invalidateCurrentItemPageCache]):
2767         (-[WebFrame _dispatchCreateWebViewWithRequest:]):
2768         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
2769         (-[WebFrame _prepareForDataSourceReplacement]):
2770         (-[WebFrame _provisionalLoadStarted]):
2771         * WebView/WebFrameInternal.h:
2772         * WebView/WebHTMLRepresentation.m:
2773         (-[WebHTMLRepresentation DOMDocument]):
2774         (-[WebHTMLRepresentation attributedText]):
2775         * WebView/WebHTMLView.m:
2776         (-[WebHTMLView _documentRange]):
2777         (-[WebHTMLView _documentFragmentWithPaths:]):
2778         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
2779         (-[WebHTMLView _selectedRange]):
2780         (-[WebHTMLView _updateMouseoverWithEvent:]):
2781         (-[WebHTMLView _canEditRichly]):
2782         (-[WebHTMLView _hasSelection]):
2783         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
2784         (-[WebHTMLView _hasInsertionPoint]):
2785         (-[WebHTMLView _isEditable]):
2786         (-[WebHTMLView _isSelectionInPasswordField]):
2787         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
2788         (-[WebHTMLView _selectionDraggingImage]):
2789         (-[WebHTMLView _canIncreaseSelectionListLevel]):
2790         (-[WebHTMLView _canDecreaseSelectionListLevel]):
2791         (-[WebHTMLView _updateActiveState]):
2792         (-[NSArray readSelectionFromPasteboard:]):
2793         (-[NSArray validateUserInterfaceItem:]):
2794         (-[NSArray maintainsInactiveSelection]):
2795         (-[NSArray menuForEvent:]):
2796         (-[NSArray scrollWheel:]):
2797         (-[NSArray acceptsFirstMouse:]):
2798         (-[NSArray shouldDelayWindowOrderingForEvent:]):
2799         (-[NSArray mouseDown:]):
2800         (-[NSArray mouseDragged:]):
2801         (-[NSArray mouseUp:]):
2802         (-[NSArray keyDown:]):
2803         (-[NSArray keyUp:]):
2804         (-[NSArray centerSelectionInVisibleArea:]):
2805         (-[NSArray _selectionStartFontAttributesAsRTF]):
2806         (-[NSArray _emptyStyle]):
2807         (-[NSArray performKeyEquivalent:]):
2808         (-[NSArray indent:]):
2809         (-[NSArray outdent:]):
2810         (-[WebHTMLView cut:]):
2811         (-[WebHTMLView paste:]):
2812         (-[WebHTMLView _selectRangeInMarkedText:]):
2813         (-[WebTextCompleteController doCompletion]):
2814         (-[WebHTMLView selectionRect]):
2815         (-[WebHTMLView selectionImageForcingWhiteText:]):
2816         (-[WebHTMLView selectionImageRect]):
2817         (-[WebHTMLView attributedString]):
2818         (-[WebHTMLView _isMoveDrag]):
2819         (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
2820         * WebView/WebPolicyDelegate.mm:
2821         (-[WebPolicyDecisionListener _usePolicy:]):
2822         (-[WebPolicyDecisionListener use]):
2823         (-[WebPolicyDecisionListener ignore]):
2824         (-[WebPolicyDecisionListener download]):
2825         (-[WebPolicyDecisionListener continue]):
2826         * WebView/WebScriptDebugDelegate.m:
2827         (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
2828         (-[WebScriptCallFrame globalObject]):
2829         * WebView/WebView.mm:
2830         (-[WebView _attachScriptDebuggerToAllFrames]):
2831         (-[WebView _detachScriptDebuggerFromAllFrames]):
2832         (-[WebView windowScriptObject]):
2833         (incrementFrame):
2834         (-[WebView searchFor:direction:caseSensitive:wrap:]):
2835         (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
2836         (-[WebView removeDragCaret]):
2837         (-[WebView setScriptDebugDelegate:]):
2838         (-[WebView scriptDebugDelegate]):
2839         (-[WebView shouldClose]):
2840         (-[WebView selectedDOMRange]):
2841         (-[WebView styleDeclarationWithText:]):
2842
2843 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
2844
2845         Reviewed by Adam.
2846
2847         Renamed WebFrameLoader to FrameLoader, to match class name.
2848
2849         * Plugins/WebBaseNetscapePluginView.mm:
2850         * Plugins/WebNetscapePluginStream.mm:
2851         * Plugins/WebPluginController.mm:
2852         * WebCoreSupport/WebFrameBridge.mm:
2853         * WebView/WebDataSource.mm:
2854         * WebView/WebFrame.mm:
2855         * WebView/WebPDFView.mm:
2856         * WebView/WebPolicyDelegate.mm:
2857         * WebView/WebView.mm:
2858
2859 2006-10-25  Mark Rowe  <bdash@webkit.org>
2860
2861         Reviewed by Anders.
2862
2863         Build fix for the Buildbot.
2864
2865         * WebView/WebHTMLView.m:
2866         (-[NSArray _addToStyle:fontA:fontB:]): Explicit cast.
2867
2868 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
2869
2870         Reviewed by Anders.
2871         
2872         <rdar://problem/4785575> REGRESSION: form resubmission warning occurs twice, then Safari crashes in autorelease pool
2873         <rdar://problem/4799383> REGRESSION: Crash occurs when dismissing the "Would you like to save this password" sheet
2874
2875         * WebView/WebPolicyDeciderMac.m:
2876         (-[WebPolicyDeciderMac dealloc]): release the listener, don't dealloc it
2877
2878 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
2879
2880         Reviewed by Darin.
2881
2882         * WebKitPrefix.h:
2883         Include FastMalloc.h from C++ code.
2884
2885 2006-10-24  Darin Adler  <darin@apple.com>
2886
2887         Reviewed by Anders.
2888
2889         - converted WebFrameLoaderClient to C++
2890         - renamed frame->frameLoader() function to frame->loader()
2891         - renamed [bridge impl] to [bridge _frame]
2892         - removed some bridge methods
2893
2894         * Plugins/WebNetscapePluginStream.mm:
2895         * WebCoreSupport/WebEditorClient.mm:
2896         * WebCoreSupport/WebFrameLoaderClient.h: Added.
2897         (WebFrameLoaderClient::webFrame):
2898         * WebCoreSupport/WebFrameLoaderClient.mm: Added.
2899         (WebFrameLoaderClient::detachFrameLoader):
2900         (WebFrameLoaderClient::hasWebView):
2901         (WebFrameLoaderClient::hasFrameView):
2902         (WebFrameLoaderClient::hasBackForwardList):
2903         (WebFrameLoaderClient::resetBackForwardList):
2904         (WebFrameLoaderClient::provisionalItemIsTarget):
2905         (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
2906         (WebFrameLoaderClient::invalidateCurrentItemPageCache):
2907         (WebFrameLoaderClient::privateBrowsingEnabled):
2908         (WebFrameLoaderClient::makeDocumentView):
2909         (WebFrameLoaderClient::makeRepresentation):
2910         (WebFrameLoaderClient::setDocumentViewFromPageCache):
2911         (WebFrameLoaderClient::forceLayout):
2912         (WebFrameLoaderClient::forceLayoutForNonHTML):
2913         (WebFrameLoaderClient::updateHistoryForCommit):
2914         (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
2915         (WebFrameLoaderClient::updateHistoryForReload):
2916         (WebFrameLoaderClient::updateHistoryForStandardLoad):
2917         (WebFrameLoaderClient::updateHistoryForInternalLoad):
2918         (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
2919         (WebFrameLoaderClient::setCopiesOnScroll):
2920         (WebFrameLoaderClient::tokenForLoadErrorReset):
2921         (WebFrameLoaderClient::resetAfterLoadError):
2922         (WebFrameLoaderClient::doNotResetAfterLoadError):
2923         (WebFrameLoaderClient::detachedFromParent1):
2924         (WebFrameLoaderClient::detachedFromParent2):
2925         (WebFrameLoaderClient::detachedFromParent3):
2926         (WebFrameLoaderClient::detachedFromParent4):
2927         (WebFrameLoaderClient::loadedFromPageCache):
2928         (WebFrameLoaderClient::download):
2929         (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
2930         (WebFrameLoaderClient::dispatchWillSendRequest):
2931         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2932         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2933         (WebFrameLoaderClient::dispatchDidReceiveResponse):
2934         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2935         (WebFrameLoaderClient::dispatchDidFinishLoading):
2936         (WebFrameLoaderClient::dispatchDidFailLoading):
2937         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
2938         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2939         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
2940         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
2941         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
2942         (WebFrameLoaderClient::dispatchWillClose):
2943         (WebFrameLoaderClient::dispatchDidReceiveIcon):
2944         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2945         (WebFrameLoaderClient::dispatchDidReceiveTitle):
2946         (WebFrameLoaderClient::dispatchDidCommitLoad):
2947         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2948         (WebFrameLoaderClient::dispatchDidFailLoad):
2949         (WebFrameLoaderClient::dispatchDidFinishLoad):
2950         (WebFrameLoaderClient::dispatchDidFirstLayout):
2951         (WebFrameLoaderClient::dispatchCreatePage):
2952         (WebFrameLoaderClient::dispatchShow):
2953         (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2954         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2955         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2956         (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
2957         (WebFrameLoaderClient::dispatchWillSubmitForm):
2958         (WebFrameLoaderClient::dispatchDidLoadMainResource):
2959         (WebFrameLoaderClient::clearLoadingFromPageCache):
2960         (WebFrameLoaderClient::isLoadingFromPageCache):
2961         (WebFrameLoaderClient::revertToProvisionalState):
2962         (WebFrameLoaderClient::setMainDocumentError):
2963         (WebFrameLoaderClient::clearUnarchivingState):
2964         (WebFrameLoaderClient::progressStarted):
2965         (WebFrameLoaderClient::progressCompleted):
2966         (WebFrameLoaderClient::incrementProgress):
2967         (WebFrameLoaderClient::completeProgress):
2968         (WebFrameLoaderClient::setMainFrameDocumentReady):
2969         (WebFrameLoaderClient::startDownload):
2970         (WebFrameLoaderClient::willChangeTitle):
2971         (WebFrameLoaderClient::didChangeTitle):
2972         (WebFrameLoaderClient::committedLoad):
2973         (WebFrameLoaderClient::finishedLoading):
2974         (WebFrameLoaderClient::finalSetupForReplace):
2975         (WebFrameLoaderClient::cancelledError):
2976         (WebFrameLoaderClient::cannotShowURLError):
2977         (WebFrameLoaderClient::interruptForPolicyChangeError):
2978         (WebFrameLoaderClient::cannotShowMIMETypeError):
2979         (WebFrameLoaderClient::fileDoesNotExistError):
2980         (WebFrameLoaderClient::shouldFallBack):
2981         (WebFrameLoaderClient::mainFrameURL):
2982         (WebFrameLoaderClient::setDefersCallbacks):
2983         (WebFrameLoaderClient::willUseArchive):
2984         (WebFrameLoaderClient::isArchiveLoadPending):
2985         (WebFrameLoaderClient::cancelPendingArchiveLoad):
2986         (WebFrameLoaderClient::clearArchivedResources):
2987         (WebFrameLoaderClient::canHandleRequest):
2988         (WebFrameLoaderClient::canShowMIMEType):
2989         (WebFrameLoaderClient::representationExistsForURLScheme):
2990         (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
2991         (WebFrameLoaderClient::elementForEvent):
2992         (WebFrameLoaderClient::createPolicyDecider):
2993         (WebFrameLoaderClient::frameLoadCompleted):
2994         (WebFrameLoaderClient::restoreScrollPositionAndViewState):
2995         (WebFrameLoaderClient::provisionalLoadStarted):
2996         (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
2997         (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
2998         (WebFrameLoaderClient::didFinishLoad):
2999         (WebFrameLoaderClient::prepareForDataSourceReplacement):
3000         (WebFrameLoaderClient::createDocumentLoader):
3001         (WebFrameLoaderClient::setTitle):
3002         * WebKit.xcodeproj/project.pbxproj:
3003         * WebView/WebDataSource.mm:
3004         (-[WebDataSource webFrame]):
3005         * WebView/WebFrame.mm:
3006         (frame):
3007         (-[WebFrame _loadItem:withLoadType:]):
3008         (-[WebFrame _reloadForPluginChanges]):
3009         (-[WebFrame _initWithWebFrameView:webView:bridge:]):
3010         (-[WebFrame _frameLoader]):
3011         (-[WebFrame provisionalDataSource]):
3012         (-[WebFrame dataSource]):
3013         (-[WebFrame parentFrame]):
3014         (-[WebFrame _provisionalLoadStarted]):
3015         * WebView/WebFrameInternal.h:
3016         * WebView/WebHTMLRepresentation.m:
3017         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
3018         * WebView/WebHTMLView.m:
3019         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
3020         (-[NSArray validateUserInterfaceItem:]):
3021         (-[NSArray scrollWheel:]):
3022         (-[NSArray acceptsFirstMouse:]):
3023         (-[NSArray shouldDelayWindowOrderingForEvent:]):
3024         (-[NSArray _selectionStartFontAttributesAsRTF]):
3025         (-[NSArray changeBaseWritingDirection:]):
3026         (-[NSArray indent:]):
3027         (-[NSArray outdent:]):
3028         (-[WebHTMLView copy:]):
3029         (-[WebHTMLView cut:]):
3030         (-[WebHTMLView paste:]):
3031         * WebView/WebView.mm:
3032         (-[WebView _dashboardRegions]):
3033         (-[WebView setProhibitsMainFrameScrolling:]):
3034         (-[WebView _setInViewSourceMode:]):
3035         (-[WebView _inViewSourceMode]):
3036         (-[WebView setEditable:]):
3037
3038 2006-10-24  John Sullivan  <sullivan@apple.com>
3039
3040         Reviewed by Kevin Decker
3041         
3042         - fixed <rdar://problem/4801331> "Spelling..." menu item should be "Show/Hide Spelling" post-Tiger, to match AppKit
3043
3044         * WebView/WebHTMLView.m:
3045         (-[NSArray validateUserInterfaceItem:]):
3046         post-Tiger, update the menu item text to "Show Spelling"/"Hide Spelling" based on whether
3047         the spelling panel is already showing. Also, removed else's after returns, and removed
3048         braces around one-line if clauses.
3049         (-[NSArray showGuessPanel:]):
3050         post-Tiger, make this item hide the spelling panel if it's already showing
3051
3052         * English.lproj/Localizable.strings:
3053         updated for this change
3054         
3055 2006-10-24  Timothy Hatcher  <timothy@apple.com>
3056
3057         Reviewed by Anders.
3058
3059         <rdar://problem/4588878> 'WebHTMLView' may not respond to '-_webView'
3060
3061         * Misc/WebNSViewExtras.h:
3062         * Misc/WebNSViewExtras.m:
3063         (-[NSView _webView]):
3064
3065 2006-10-24  Brady Eidson  <beidson@apple.com>
3066
3067         Reviewed by Anders
3068
3069         http://bugs.webkit.org/show_bug.cgi?id=11406 - Crash in [WebFrame dataSource]
3070         In the transition to ObjC++ we lost alot of our free nil checking that we must now do manually
3071         to prevent null dereferencing.
3072
3073         * WebView/WebFrame.mm:
3074         (-[WebFrame provisionalDataSource]):
3075         (-[WebFrame dataSource]):
3076
3077 2006-10-24  John Sullivan  <sullivan@apple.com>
3078
3079         Reviewed by Darin
3080         
3081         Initial plumbing for grammar checking. No actual grammar are checked at this time.
3082
3083         * English.lproj/WebViewEditingContextMenu.nib/classes.nib:
3084         * English.lproj/WebViewEditingContextMenu.nib/info.nib:
3085         * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
3086         Added grammar-checking item, reworded to match changes in framework. This will be used
3087         post-Tiger.
3088
3089         * English.lproj/WebViewEditingContextMenuOld.nib/classes.nib: Added.
3090         * English.lproj/WebViewEditingContextMenuOld.nib/info.nib: Added.
3091         * English.lproj/WebViewEditingContextMenuOld.nib/objects.nib: Added.
3092         Copy of WebViewEditingContextMenu.nib, unchanged. This will be used on Tiger.
3093
3094         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3095         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
3096         Choose the right context menu based on BUILDING_ON_TIGER.
3097         
3098         * WebView/WebPreferenceKeysPrivate.h:
3099         declare grammar-related NSUserDefault value
3100
3101         * WebView/WebViewPrivate.h:
3102         declare grammar-related methods
3103
3104         * WebView/WebView.mm:
3105         declare static BOOL grammarCheckingEnabled
3106         (-[WebViewPrivate init]):
3107         initialize grammarCheckingEnabled to NSUserDefaults value
3108         (-[WebView validateUserInterfaceItem:]):
3109         validate toggleGrammarChecking: menu item
3110         (-[WebView isGrammarCheckingEnabled]):
3111         return value of grammarCheckingEnabled
3112         (-[WebView setGrammarCheckingEnabled:]):
3113         set value of grammarCheckingEnabled, call frame to remove existing bad grammar markers
3114         (-[WebView toggleGrammarChecking:]):
3115         flip the value
3116         
3117         * WebView/WebFrameInternal.h:
3118         * WebView/WebFrame.mm:
3119         (-[WebFrame _unmarkAllBadGrammar]):
3120         new placeholder method, does nothing yet
3121         
3122         * WebView/WebHTMLViewInternal.h:
3123         declare grammar-related methods
3124
3125         * WebView/WebHTMLView.m:
3126         (-[NSArray validateUserInterfaceItem:]):
3127         validate toggleGrammarChecking: menu item
3128         (-[WebHTMLView isGrammarCheckingEnabled]):
3129         new method, calls through to WebView
3130         (-[WebHTMLView setGrammarCheckingEnabled:]):
3131         ditto
3132         (-[WebHTMLView toggleGrammarChecking:]):
3133         ditto
3134                 
3135         * English.lproj/StringsNotToBeLocalized.txt:
3136         Updated for these changes
3137         
3138         * WebKit.xcodeproj/project.pbxproj:
3139         updated for new files        
3140
3141 2006-10-23  Darin Adler  <darin@apple.com>
3142
3143         Reviewed by Geoff.
3144
3145         - converted WebDocumentLoader to C++
3146
3147         * Plugins/WebPluginController.mm:
3148         (-[WebPluginController pluginView:receivedResponse:]):
3149         * WebKit.xcodeproj/project.pbxproj:
3150         * WebView/WebDataSource.mm:
3151         (-[WebDataSourcePrivate dealloc]):
3152         (-[WebDataSource _mainDocumentError]):
3153         (-[WebDataSource _URL]):
3154         (-[WebDataSource _loadFromPageCache:]):
3155         (-[WebDataSource _bridge]):
3156         (-[WebDataSource _URLForHistory]):
3157         (-[WebDataSource _documentLoader]):
3158         (-[WebDataSource _initWithDocumentLoader:]):
3159         (-[WebDataSource initWithRequest:]):
3160         (-[WebDataSource data]):
3161         (-[WebDataSource webFrame]):
3162         (-[WebDataSource initialRequest]):
3163         (-[WebDataSource request]):
3164         (-[WebDataSource response]):
3165         (-[WebDataSource textEncodingName]):
3166         (-[WebDataSource isLoading]):
3167         (-[WebDataSource unreachableURL]):
3168         (-[WebDataSource webArchive]):
3169         * WebView/WebDataSourceInternal.h:
3170         * WebView/WebDocumentLoaderMac.h:
3171         * WebView/WebDocumentLoaderMac.mm:
3172         (WebDocumentLoaderMac::WebDocumentLoaderMac):
3173         (WebDocumentLoaderMac::setDataSource):
3174         (WebDocumentLoaderMac::dataSource):
3175         (WebDocumentLoaderMac::attachToFrame):
3176         (WebDocumentLoaderMac::detachFromFrame):
3177         * WebView/WebFrame.mm:
3178         (-[WebFrame _createItem:]):
3179         (-[WebFrame _loadItem:withLoadType:]):
3180         (-[WebFrame _addChild:]):
3181         (dataSource):
3182         (-[WebFrame _dataSourceForDocumentLoader:]):
3183         (-[WebFrame _addDocumentLoader:toUnarchiveState:]):
3184         (-[WebFrame loadArchive:]):
3185         (-[WebFrame _updateHistoryForReload]):
3186         (-[WebFrame _updateHistoryForStandardLoad]):
3187         (-[WebFrame _updateHistoryForInternalLoad]):
3188         (-[WebFrame _dispatchIdentifierForInitialRequest:fromDocumentLoader:]):
3189         (-[WebFrame _dispatchResource:willSendRequest:redirectResponse:fromDocumentLoader:]):
3190         (-[WebFrame _dispatchDidReceiveAuthenticationChallenge:forResource:fromDocumentLoader:]):
3191         (-[WebFrame _dispatchDidCancelAuthenticationChallenge:forResource:fromDocumentLoader:]):
3192         (-[WebFrame _dispatchResource:didReceiveResponse:fromDocumentLoader:]):
3193         (-[WebFrame _dispatchResource:didReceiveContentLength:fromDocumentLoader:]):
3194         (-[WebFrame _dispatchResource:didFinishLoadingFromDocumentLoader:]):
3195         (-[WebFrame _dispatchResource:didFailLoadingWithError:fromDocumentLoader:]):
3196         (-[WebFrame _dispatchDidLoadMainResourceForDocumentLoader:]):
3197         (-[WebFrame _clearLoadingFromPageCacheForDocumentLoader:]):
3198         (-[WebFrame _isDocumentLoaderLoadingFromPageCache:]):
3199         (-[WebFrame _makeRepresentationForDocumentLoader:]):
3200         (-[WebFrame _revertToProvisionalStateForDocumentLoader:]):
3201         (-[WebFrame _setMainDocumentError:forDocumentLoader:]):
3202         (-[WebFrame _clearUnarchivingStateForLoader:]):
3203         (-[WebFrame _willChangeTitleForDocument:]):
3204         (-[WebFrame _didChangeTitleForDocument:]):
3205         (-[WebFrame _finishedLoadingDocument:]):
3206         (-[WebFrame _committedLoadWithDocumentLoader:data:]):
3207         (-[WebFrame _documentLoader:setMainDocumentError:]):
3208         (-[WebFrame _finalSetupForReplaceWithDocumentLoader:]):
3209         (-[WebFrame _createDocumentLoaderWithRequest:]):
3210         (-[WebFrame _provisionalLoadStarted]):
3211         * WebView/WebFrameInternal.h:
3212         * WebView/WebHTMLRepresentation.m:
3213         (-[WebHTMLRepresentation title]):
3214         * WebView/WebView.mm:
3215         (-[WebView _mainFrameOverrideEncoding]):
3216
3217 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
3218
3219         RS by Maciej.
3220         
3221         Gave ObjC++ files .mm extension instead of .m.
3222
3223         * WebCoreSupport/WebPageBridge.m: Removed.
3224         * WebKit.xcodeproj/project.pbxproj:
3225         * WebView/WebDocumentLoaderMac.m: Removed.
3226
3227 2006-10-23  Darin Adler  <darin@apple.com>
3228
3229         Reviewed by Maciej.
3230
3231         - converted WebFrameLoader to C++
3232
3233         * History/WebHistoryItem.m:
3234         (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
3235         * Plugins/WebBaseNetscapePluginView.mm:
3236         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
3237         * Plugins/WebNetscapePluginStream.mm:
3238         (-[WebNetscapePluginStream start]):
3239         (-[WebNetscapePluginStream stop]):
3240         * Plugins/WebPluginController.mm:
3241         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
3242         (-[WebPluginController pluginView:receivedResponse:]):
3243         * WebCoreSupport/WebFrameBridge.h:
3244         * WebKit.xcodeproj/project.pbxproj:
3245         * WebView/WebDataSource.mm:
3246         (-[WebDataSource _loadFromPageCache:]):
3247         (-[WebDataSource _webView]):
3248         (-[WebDataSource webFrame]):
3249         * WebView/WebDocumentLoaderMac.h:
3250         * WebView/WebDocumentLoaderMac.m:
3251         (-[WebDocumentLoaderMac dealloc]):
3252         (-[WebDocumentLoaderMac attachToFrame]):
3253         (-[WebDocumentLoaderMac detachFromFrame]):
3254         * WebView/WebFrame.mm:
3255         (+[WebFrame _timeOfLastCompletedLoad]):
3256         (-[WebFrame _loadItem:withLoadType:]):
3257         (-[WebFrame _loadURL:referrer:intoChild:]):
3258         (-[WebFrame _currentBackForwardListItemToResetTo]):
3259         (-[WebFrame _itemForRestoringDocState]):
3260         (-[WebFrame _frameLoader]):
3261         (-[WebFrame _firstLayoutDone]):
3262         (-[WebFrame _loadType]):
3263         (-[WebFrame provisionalDataSource]):
3264         (-[WebFrame dataSource]):
3265         (-[WebFrame loadRequest:]):
3266         (-[WebFrame loadArchive:]):
3267         (-[WebFrame stopLoading]):
3268         (-[WebFrame reload]):
3269         (-[WebFrame _updateHistoryForCommit]):
3270         (-[WebFrame _updateHistoryForReload]):
3271         (-[WebFrame _updateHistoryForInternalLoad]):
3272         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
3273         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
3274         (-[WebFrame _deliverArchivedResources]):
3275         (-[WebFrame _prepareForDataSourceReplacement]):
3276         (-[WebFrame _provisionalLoadStarted]):
3277         * WebView/WebFrameInternal.h:
3278         * WebView/WebHTMLView.m:
3279         (-[WebHTMLView _clearLastHitViewIfSelf]):
3280         (-[WebHTMLView _updateMouseoverWithEvent:]):
3281         (-[NSArray removeMouseMovedObserverUnconditionally]):
3282         (-[NSArray removeMouseMovedObserver]):
3283         (-[NSArray viewWillMoveToWindow:]):
3284         (-[NSArray viewDidMoveToWindow]):
3285         (-[WebHTMLView _canMakeTextSmaller]):
3286         (-[WebHTMLView _canMakeTextLarger]):
3287         (-[WebHTMLView _canMakeTextStandardSize]):
3288         * WebView/WebPDFView.mm:
3289         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
3290         * WebView/WebView.mm:
3291         (-[WebView _close]):
3292         (-[WebView setDefersCallbacks:]):
3293         (-[WebView setCustomTextEncodingName:]):
3294
3295 2006-10-23  Geoffrey Garen  <ggaren@apple.com>
3296
3297         Reviewed by Bradee.
3298
3299         Moved some page-level operations from WebFrameBridge to WebPageBridge.
3300
3301         * WebCoreSupport/WebFrameBridge.m:
3302         * WebCoreSupport/WebPageBridge.m:
3303         (-[WebPageBridge createModalDialogWithURL:referrer:]):
3304         (-[WebPageBridge canRunModal]):
3305         (-[WebPageBridge canRunModalNow]):
3306         (-[WebPageBridge runModal]):
3307         * WebKit.xcodeproj/project.pbxproj: Made WebPageBridge.m ObjC++ to support
3308         WebCore #includes.
3309
3310 2006-10-23  John Sullivan  <sullivan@apple.com>
3311
3312         * WebKitPrefix.h:
3313         Removed redundant definition of BUILDING_ON_TIGER that I just added. It turns out this had
3314         already been added between the last time I updated in this tree and when I needed it locally.
3315
3316 2006-10-23  John Sullivan  <sullivan@apple.com>
3317
3318         Reviewed by Anders
3319
3320         * WebKit.xcodeproj/project.pbxproj:
3321         Move WebKitPrefix.h from Misc group to top level, to match WebCore
3322         
3323         * WebKitPrefix.h:
3324         defined BUILDING_ON_TIGER a la WebCore, in preparation for future use of post-Tiger API
3325
3326 2006-10-23  Timothy Hatcher  <timothy@apple.com>
3327
3328         Reviewed by Darin.
3329
3330         Rename the now ObjC++ files to be .mm and remove the explicit file types.
3331
3332         * DefaultDelegates/WebDefaultContextMenuDelegate.m:
3333         (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
3334         * English.lproj/StringsNotToBeLocalized.txt:
3335         * Plugins/WebBaseNetscapePluginView.m: Removed.
3336         * Plugins/WebNetscapePluginStream.m: Removed.
3337         * Plugins/WebPluginController.m: Removed.
3338         * WebCoreSupport/WebFrameBridge.m: Removed.
3339         * WebKit.xcodeproj/project.pbxproj:
3340         * WebView/WebDataSource.m: Removed.
3341         * WebView/WebFrame.m: Removed.
3342         * WebView/WebFrameView.m: Removed.
3343         * WebView/WebPDFView.m: Removed.
3344         * WebView/WebPolicyDelegate.m: Removed.
3345         * WebView/WebView.m: Removed.
3346
3347 2006-10-23  Timothy Hatcher  <timothy@apple.com>
3348
3349         Reviewed by Darin.
3350
3351         Move the undef try/catch to WebKitPrefix.h and include algorithm so we get
3352         exception_defines.h and so the undef of try/catch works.
3353
3354         Break off the BGRA to ARGB code into WebGraphicsExtras.c, this lets
3355         WebBaseNetscapePluginView.m safely compile as ObjC++ and not cause the Accelerate
3356         framework to complain about C++ exceptions being disabled.
3357
3358         * Misc/WebGraphicsExtras.c: Added.
3359         (WebConvertBGRAToARGB):
3360         * Misc/WebGraphicsExtras.h: Added.
3361         * Plugins/WebBaseNetscapePluginView.m:
3362         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
3363         * WebKit.xcodeproj/project.pbxproj:
3364         * WebKitPrefix.h:
3365         * WebView/WebView.m:
3366
3367 2006-10-22  Sam Weinig  <sam.weinig@gmail.com>
3368
3369         Reviewed by Tim H.
3370
3371         - Add DOMHTMLFormElementPrivate.h to the project.
3372
3373         * MigrateHeaders.make:
3374
3375 2006-10-21  Darin Adler  <darin@apple.com>
3376
3377         Reviewed by Adele.
3378
3379         - convert WebLoader and its 3 subclasses to C++
3380
3381         * Plugins/WebNetscapePluginStream.h:
3382         * Plugins/WebNetscapePluginStream.m:
3383         (-[WebNetscapePluginStream dealloc]):
3384         (-[WebNetscapePluginStream finalize]):
3385         (-[WebNetscapePluginStream start]):
3386         (-[WebNetscapePluginStream cancelLoadWithError:]):
3387         (-[WebNetscapePluginStream stop]):
3388         * WebCoreSupport/WebFrameBridge.m:
3389         (-[WebFrameBridge canRunModalNow]):
3390         * WebView/WebFrame.m:
3391         (-[WebFramePrivate dealloc]):
3392         (-[WebFramePrivate finalize]):
3393         (frame): Changed from uppercase to lowercase so that it won't conflict
3394         with the WebCore class named Frame.
3395         (-[WebFrame _firstChildFrame]):
3396         (-[WebFrame _lastChildFrame]):
3397         (-[WebFrame _previousSiblingFrame]):
3398         (-[WebFrame _nextSiblingFrame]):
3399         (-[WebFrame _traverseNextFrameStayWithin:]):
3400         (-[WebFrame _immediateChildFrameNamed:]):
3401         (-[WebFrame _nextFrameWithWrap:]):
3402         (-[WebFrame _previousFrameWithWrap:]):
3403         (-[WebFrame findFrameNamed:]):
3404         (-[WebFrame parentFrame]):
3405         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
3406         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
3407         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
3408         (-[WebFrame _archiveLoadPendingForLoader:]):
3409         (-[WebFrame _cancelPendingArchiveLoadForLoader:]):
3410         (-[WebFrame _clearArchivedResources]):
3411         (-[WebFrame _deliverArchivedResources]):
3412
3413 2006-10-21  Darin Adler  <darin@apple.com>
3414
3415         Reviewed by Anders.
3416
3417         - fix http://bugs.webkit.org/show_bug.cgi?id=10328
3418           REGRESSION: frame leak reported by buildbot
3419
3420         * WebCoreSupport/WebEditorClient.mm:
3421         (WebEditorClient::WebEditorClient): Don't retain the web view.
3422         (WebEditorClient::~WebEditorClient): Don't release the web view.
3423         (WebEditorClient::setWebView): Ditto.
3424
3425         * WebCoreSupport/WebFrameBridge.m:
3426         (-[WebFrameBridge finishInitializingWithFrameName:view:]): Added. Common code for use by both
3427         init methods below.
3428         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): Changed to use new method.
3429         Also added comment pointing out design flaw -- we attach the client to the web view here,
3430         but we need to be sure to detach in case the web view is deallocated first.
3431         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): Ditto.
3432
3433 2006-10-21  Darin Adler  <darin@apple.com>
3434
3435         Reviewed by Adam.
3436
3437         - http://bugs.webkit.org/show_bug.cgi?id=11376
3438           build scripts should invoke make with "-j" option for multiple processors
3439
3440         * WebKit.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make.
3441
3442 2006-10-21  Timothy Hatcher  <timothy@apple.com>
3443
3444         Reviewed by Geoff.
3445
3446         <rdar://problem/4478625> HTML Editing: Basic table editing and culling
3447
3448         Initial implementaltion of table deletion user interface:
3449         * Adds a new editing delegate method, webView:shouldShowDeleteInterfaceForElement:.
3450         * The new delegate method is called from the new shouldShowDeleteInterface EditorClient function.
3451
3452         * DefaultDelegates/WebDefaultEditingDelegate.m:
3453         (-[WebDefaultEditingDelegate webView:shouldShowDeleteInterfaceForElement:]):
3454         * WebCoreSupport/WebEditorClient.h:
3455         * WebCoreSupport/WebEditorClient.mm:
3456         (WebEditorClient::WebEditorClient):
3457         (WebEditorClient::shouldDeleteRange):
3458         (WebEditorClient::shouldShowDeleteInterface):
3459         * WebKit.xcodeproj/project.pbxproj:
3460         * WebView/WebEditingDelegatePrivate.h: Added.
3461
3462 2006-10-21  Alice Liu  <alice.liu@apple.com>
3463
3464         Reviewed by Maciej.
3465
3466         fix leaks.
3467
3468         * WebCoreSupport/WebEditorClient.mm:
3469         (WebEditorClient::setWebView):
3470         only change webview if its different
3471
3472         * WebCoreSupport/WebFrameBridge.m:
3473         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
3474         actually use the client allocated in the line above instead of
3475         allocation again, duh. 
3476
3477 2006-10-21  Alice Liu  <alice.liu@apple.com>
3478
3479         Build fix.
3480
3481         * WebCoreSupport/WebEditorClient.h:
3482         * WebCoreSupport/WebEditorClient.mm:
3483         (WebEditorClient::setWebView):
3484
3485 2006-10-20  Alice Liu  <alice.liu@apple.com>
3486
3487         Reviewed by Tim Hatcher.
3488
3489         Fixed a problem where the webview passed to the EditorClient wasn't valid yet.  
3490
3491         * WebCoreSupport/WebEditorClient.h:
3492         (WebEditorClient::setWebView):
3493         added webview setter
3494
3495         * WebCoreSupport/WebEditorClient.mm:
3496         (WebEditorClient::WebEditorClient):
3497         add default constructor
3498
3499         * WebCoreSupport/WebFrameBridge.m:
3500         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
3501         use [page webView] since _webview isn't valid yet
3502         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
3503         use webview setter on editorclient
3504
3505 2006-10-20  David Hyatt  <hyatt@apple.com>
3506
3507         Tweak cache sizes so that they are back to the way they were,
3508         except for < 512, which will stay doubled.
3509
3510         Reviewed by Tim H.
3511
3512         * WebCoreSupport/WebFrameBridge.m:
3513         (-[WebFrameBridge getObjectCacheSize]):
3514
3515 2006-10-20  Alice Liu  <alice.liu@apple.com>
3516
3517         Reviewed by Maciej.
3518
3519         Adding knowledge of EditorClient to WebKit
3520
3521         * WebCoreSupport/WebEditorClient.h: Added.
3522
3523         * WebCoreSupport/WebEditorClient.mm: Added.
3524         (WebEditorClient::WebEditorClient):
3525         (WebEditorClient::~WebEditorClient):
3526         (WebEditorClient::shouldDeleteRange):
3527         Implementation of mac EditorClient
3528
3529         * WebCoreSupport/WebFrameBridge.m:
3530         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
3531         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
3532         create an editor client to pass down the chain of constructors
3533
3534         * WebKit.xcodeproj/project.pbxproj:
3535         Added related EditorClient files
3536
3537         * WebKitPrefix.h:
3538         Added tiger build flag in order to make certain private headers from webcore compile successfully
3539
3540 2006-10-20  Darin Adler  <darin@apple.com>
3541
3542         - rolled out my loader change; caused world leak and possibly a plug-in crash
3543
3544 2006-10-20  Darin Adler  <darin@apple.com>
3545
3546         Reviewed by Adele.
3547
3548         - convert WebLoader and its 3 subclasses to C++
3549
3550         * Plugins/WebNetscapePluginStream.h:
3551         * Plugins/WebNetscapePluginStream.m:
3552         (-[WebNetscapePluginStream dealloc]):
3553         (-[WebNetscapePluginStream finalize]):
3554         (-[WebNetscapePluginStream start]):
3555         (-[WebNetscapePluginStream cancelLoadWithError:]):
3556         (-[WebNetscapePluginStream stop]):
3557         * WebCoreSupport/WebFrameBridge.m:
3558         (-[WebFrameBridge canRunModalNow]):
3559         * WebView/WebFrame.m:
3560         (-[WebFramePrivate dealloc]):
3561         (-[WebFramePrivate finalize]):
3562         (frame): Changed from uppercase to lowercase so that it won't conflict
3563         with the WebCore class named Frame.
3564         (-[WebFrame _firstChildFrame]):
3565         (-[WebFrame _lastChildFrame]):
3566         (-[WebFrame _previousSiblingFrame]):
3567         (-[WebFrame _nextSiblingFrame]):
3568         (-[WebFrame _traverseNextFrameStayWithin:]):
3569         (-[WebFrame _immediateChildFrameNamed:]):
3570         (-[WebFrame _nextFrameWithWrap:]):
3571         (-[WebFrame _previousFrameWithWrap:]):
3572         (-[WebFrame findFrameNamed:]):
3573         (-[WebFrame parentFrame]):
3574         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
3575         (-[WebFrame _deliverArchivedResourcesAfterDelay]):
3576         (-[WebFrame _willUseArchiveForRequest:originalURL:loader:]):
3577         (-[WebFrame _archiveLoadPendingForLoader:]):
3578         (-[WebFrame _cancelPendingArchiveLoadForLoader:]):
3579         (-[WebFrame _clearArchivedResources]):
3580         (-[WebFrame _deliverArchivedResources]):
3581
3582 2006-10-20  John Sullivan  <sullivan@apple.com>
3583
3584         Reviewed by Darin
3585         
3586         - fixed <rdar://problem/4794935> setAcceptsMouseMovedEvents: is called for every layout, 
3587           taking ~1% on the PLT test
3588
3589         * WebView/WebHTMLView.m:
3590         (-[NSArray layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
3591         Don't call setAcceptsMouseMovedEvents: and WKSetNSWindowShouldPostEventNotifications() here
3592         because this is called too often.
3593         
3594         * WebView/WebView.m:
3595         (-[WebView viewWillMoveToWindow:]):
3596         Do call them here, because this is guaranteed to be called at least once for each window
3597         containing a webview, but isn't called too often. Also restructured this method a little.
3598
3599 2006-10-19  Timothy Hatcher  <timothy@apple.com>
3600
3601         Reviewed by Anders.
3602
3603         Bug 11366: Web Inspector should show user agent style rules
3604         http://bugs.webkit.org/show_bug.cgi?id=11366
3605
3606         * WebInspector/WebInspector.m:
3607         (-[WebInspector init]):
3608         (-[WebInspector showOptionsMenu]):
3609         (-[WebInspector _toggleShowUserAgentStyles:]):
3610         * WebInspector/WebInspectorInternal.h:
3611         * WebInspector/webInspector/inspector.js:
3612
3613 2006-10-19  Brady Eidson <beidson@apple.com>
3614
3615         Build fix - 2gig is on that pesky signed/unsigned limit...
3616
3617         * WebCoreSupport/WebFrameBridge.m:
3618         (-[WebFrameBridge getObjectCacheSize]):
3619
3620 2006-10-19  Brady Eidson  <beidson@apple.com>
3621
3622         Reviewed by Hyatt.
3623
3624         Death to 16777216.  Long live 33554432.
3625         (Cache size changed needs to be reflected in localization file)
3626
3627         * English.lproj/StringsNotToBeLocalized.txt:
3628
3629 2006-10-19  Brady Eidson  <beidson@apple.com>
3630
3631         Reviewed by Hyatt
3632
3633         Added an larger in-memory level of cache for machines with 2+gb ram
3634
3635         * WebCoreSupport/WebFrameBridge.m:
3636         (-[WebFrameBridge getObjectCacheSize]):
3637
3638 2006-10-19  Brady Eidson  <beidson@apple.com>
3639
3640         Reviewed by Hyatt
3641
3642         Double the default memory cache size
3643
3644         * WebView/WebPreferences.m:
3645         (+[WebPreferences initialize]):
3646
3647 2006-10-19  John Sullivan  <sullivan@apple.com>
3648
3649         Reviewed by Kevin D and Geoff
3650
3651         * WebKit.xcodeproj/project.pbxproj:
3652         version wars
3653         
3654         Cleaned up this file, as follows:
3655         - renamed all file-internal methods to start with underscores
3656         - moved all file-internal methods into a FileInternal category block, and alphabetized them
3657         - grouped all other methods by where/how they were defined (delegate methods, protocol methods, overrides, etc.)
3658         - removed unstylish braces around one-line clauses
3659         
3660         * WebView/WebPDFView.m:
3661         (_applicationInfoForMIMEType):
3662         (_PDFSelectionsAreEqual):
3663         (+[WebPDFView supportedMIMETypes]):
3664         (-[WebPDFView setPDFDocument:]):
3665         (-[WebPDFView dealloc]):
3666         (-[WebPDFView centerSelectionInVisibleArea:]):
3667         (-[WebPDFView scrollPageDown:]):
3668         (-[WebPDFView scrollPageUp:]):
3669         (-[WebPDFView scrollLineDown:]):
3670         (-[WebPDFView scrollLineUp:]):
3671         (-[WebPDFView scrollToBeginningOfDocument:]):
3672         (-[WebPDFView scrollToEndOfDocument:]):
3673         (-[WebPDFView jumpToSelection:]):
3674         (-[WebPDFView acceptsFirstResponder]):
3675         (-[WebPDFView becomeFirstResponder]):
3676         (-[WebPDFView hitTest:]):
3677         (-[WebPDFView initWithFrame:]):
3678         (-[WebPDFView menuForEvent:]):
3679         (-[WebPDFView setNextKeyView:]):
3680         (-[WebPDFView viewDidMoveToWindow]):
3681         (-[WebPDFView viewWillMoveToWindow:]):
3682         (-[WebPDFView validateUserInterfaceItem:]):
3683         (-[WebPDFView copy:]):
3684         (-[WebPDFView takeFindStringFromSelection:]):
3685         (-[WebPDFView canPrintHeadersAndFooters]):
3686         (-[WebPDFView printOperationWithPrintInfo:]):
3687         (-[WebPDFView viewWillMoveToHostWindow:]):
3688         (-[WebPDFView viewDidMoveToHostWindow]):
3689         (-[WebPDFView elementAtPoint:]):
3690         (-[WebPDFView elementAtPoint:allowShadowContent:]):
3691         (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
3692         (-[WebPDFView viewState]):
3693         (-[WebPDFView setViewState:]):
3694         (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
3695         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
3696         (+[WebPDFView _PDFPreviewViewClass]):
3697         (+[WebPDFView _PDFViewClass]):
3698         (-[WebPDFView _anyPDFTagsFoundInMenu:]):
3699         (-[WebPDFView _applyPDFDefaults]):
3700         (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
3701         (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
3702         (-[WebPDFView _openWithFinder:]):
3703         (-[WebPDFView _path]):
3704         (-[WebPDFView _PDFSubview]):
3705         (-[WebPDFView _pointIsInSelection:]):
3706         (-[WebPDFView _receivedPDFKitLaunchNotification:]):
3707         (-[WebPDFView _scaledAttributedString:]):
3708         (-[WebPDFView _trackFirstResponder]):
3709         (-[PDFPrefUpdatingProxy forwardInvocation:]):
3710         (-[PDFPrefUpdatingProxy methodSignatureForSelector:]):
3711
3712 2006-10-19  John Sullivan  <sullivan@apple.com>
3713
3714         Reviewed by Kevin Decker
3715         
3716         - fixed <rdar://problem/4792761> Safari should use fancier embedded PDFKit stuff when it's available
3717
3718         * WebKit.xcodeproj/project.pbxproj:
3719         version wars
3720         
3721         * WebView/WebFrameView.m:
3722         (-[WebFrameView _makeDocumentViewForDataSource:]):
3723         initialize document view with frame view's rect instead of empty rect. This avoids some problems when 
3724         constructing view hierarchies from nibs
3725         
3726         * WebView/WebPreferencesPrivate.h:
3727         declare new _usePDFPreviewView and _setUsePDFPreviewView:, used for debugging
3728         * WebView/WebPreferenceKeysPrivate.h:
3729         declare new preference key string
3730         * WebView/WebPreferences.m:
3731         (+[WebPreferences initialize]):
3732         initialize new preference to true (we will by default use the new view if it's available)
3733         (-[WebPreferences _usePDFPreviewView]):
3734         new accessor for new pref
3735         (-[WebPreferences _setUsePDFPreviewView:]):
3736         ditto
3737
3738         * WebView/WebPDFView.h:
3739         new previewView ivar
3740         
3741         * WebView/WebPDFView.m:
3742         (+[WebPDFView PDFPreviewViewClass]):
3743         new method, returns class to use for fancier embedded PDFKit stuff, or nil if fancy stuff isn't available
3744         (-[WebPDFView initWithFrame:]):
3745         now tries to use fancier embedded PDFKit stuff if it's available and the pref is set to use it; falls back
3746         to old behavior otherwise
3747         (-[WebPDFView dealloc]):
3748         release new previewView ivar (retained in initWithFrame:)
3749         (-[WebPDFView viewWillMoveToWindow:]):
3750         stop observing PDFKit notification when we're removed from window
3751         (-[WebPDFView viewDidMoveToWindow]):
3752         start observing PDFKit notification when we're added to window
3753         (-[WebPDFView _receivedPDFKitLaunchNotification:]):
3754         respond to this new PDFKit notification by opening the document via NSWorkspace
3755         
3756         * English.lproj/StringsNotToBeLocalized.txt:
3757         updated for lots of recent changes
3758         
3759 2006-10-19  Sam Weinig  <sam.weinig@gmail.com>
3760
3761         Reviewed by ap.
3762
3763         Win32 build fix.
3764
3765         * COM/WebFrame.cpp:
3766         (WebFrame::initWithName):
3767         (WebFrame::createNewWindow):
3768
3769 2006-10-19  Mitz Pettel  <mitz@webkit.org>
3770
3771         Reviewed and landed by ap.
3772
3773         - fixed the inspector's tree popup
3774
3775         * WebInspector/webInspector/inspector.html:
3776
3777 2006-10-18  Sam Weinig  <sam.weinig@gmail.com>
3778
3779         Reviewed by Maciej.
3780
3781         Win32 build fix.
3782
3783         * COM/WebFrame.cpp:
3784         (WebFrame::createNewWindow):
3785         * COM/WebFrame.h:
3786
3787 2006-10-18  Anders Carlsson  <acarlsson@apple.com>
3788
3789         Reviewed by Adam.
3790
3791         http://bugs.webkit.org/show_bug.cgi?id=11000
3792         REGRESSION (r16101): css2.1/t0801-c412-hz-box-00-b-a is failing because the QuickTime plugin is taking over but not rendering the png
3793         
3794         * WebCoreSupport/WebFrameBridge.m:
3795         (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
3796         Return ObjectElementFrame if the MIME type is one of the image ones we support.
3797
3798 2006-10-17  Justin Garcia  <justin.garcia@apple.com>
3799
3800         Reviewed by harrison
3801         
3802         <rdar://problem/4765600>
3803         REGRESSION: Mail.app: smart deletion of words does not work
3804         
3805         Regressed when we pushed selecion expansion down into WebCore.  It's OK
3806         to try a smart delete from _deleteWithDirection:, which is called by
3807         deleteFoward: and deleteBackward: if the current selection is a 
3808         range.
3809     
3810         * WebView/WebHTMLView.m:
3811         (-[NSArray _deleteWithDirection:granularity:killRing:isTypingAction:]):
3812
3813 2006-10-13  Justin Garcia  <justin.garcia@apple.com>
3814
3815         Reviewed by harrison
3816         
3817         <rdar://problem/3655385>
3818         Editing: -indent: method unimplemented
3819
3820         * WebView/WebHTMLView.m:
3821         (-[NSArray validateUserInterfaceItem:]): Only allow indent:/outdent: in
3822         richly editable areas.
3823         (-[NSArray indent:]):
3824         (-[NSArray outdent:]):
3825
3826 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
3827
3828         Not reviewed, build fix.
3829         
3830         * icu/unicode/putil.h: Added - needed for build if you don't have apple internal headers.
3831
3832 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
3833
3834         Not reviewed, build fix.
3835         
3836         * icu/unicode/ustring.h: Added - needed for build if you don't have apple internal headers.
3837
3838 2006-10-13  Maciej Stachowiak  <mjs@apple.com>
3839
3840         Reviewed by Anders.
3841         
3842         - add a bunch of casts to get this compiling with older Xcode versions
3843         
3844         (I used static_cast so it will be easier to find and remove these once we have completely moved
3845         on to a new enough compiler version.)
3846
3847         * Plugins/WebBaseNetscapePluginView.m:
3848         (+[WebBaseNetscapePluginView getCarbonEvent:]):
3849         (-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]):
3850         (-[WebBaseNetscapePluginView fixWindowPort]):
3851         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3852         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]):
3853         (-[WebBaseNetscapePluginView _reshapeAGLWindow]):
3854         (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]):
3855         * WebKit.xcodeproj/project.pbxproj:
3856
3857 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
3858
3859         Changed by Darin, reviewed by me.
3860
3861         * Plugins/WebNetscapePluginStream.m: Fixed case of import so we can compile on
3862         case-sensitive file system.
3863
3864 2006-10-13  Darin Adler  <darin@apple.com>
3865
3866         Reviewed by Adele.
3867
3868         - converted WebFormState from Objective-C to C++
3869
3870         * ForwardingHeaders: Added an entire copy of WebCore's forwarding headers here.
3871         We should eventually come up with a more-elegant solution.
3872
3873         * WebKit.xcodeproj/project.pbxproj: Added ForwardingHeaders to the include paths.
3874         Converted many files from Objective-C to Objective-C++. In a later check-in, I'll
3875         rename them to .mm instead of .m. Removed C-only warning options for now. In a
3876         later check-in I will add these back in a way that omits them for C++.
3877
3878         * Plugins/WebPluginContainerCheck.m: Updated for header changes.
3879
3880         * WebView/WebFrameInternal.h: Updated for header changes. Removed WebFrameLoaderClient category
3881         so this file can still be used by Objective-C code (not just Objective-C++).
3882
3883         * WebView/WebFrame.m: Put WebFrameLoaderClient category in here.
3884         (-[WebFrame _loadItem:withLoadType:]): Changed to use 0 instead of nil for FormState and fixed
3885         enum code for C++ compatibility.
3886         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added call to setFrameLoaderClient: here.
3887         (-[WebFrame _updateHistoryForCommit]): Fixed enum code for C++ compatibility.
3888         (-[WebFrame _updateHistoryForReload]): Ditto.
3889
3890         * WebCoreSupport/WebFrameBridge.m:
3891         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): Removed call to setFrameLoaderClient:.
3892         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): Ditto.
3893         (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Fixed enum code for C++ compatibility.
3894         (-[WebFrameBridge runModal]): Changed code to not use "namespace" as a local variable name.
3895
3896         * WebView/WebPDFView.m: Added extern "C" so this can compile as Objective-C++.
3897
3898 2006-10-12  Maciej Stachowiak  <mjs@apple.com>
3899
3900         Reviewed by Oliver.
3901         
3902         - liberate more WebKit code down to WebCore
3903
3904         * WebCoreSupport/WebFrameBridge.h:
3905         * WebCoreSupport/WebFrameBridge.m:
3906
3907 2006-10-12  Adele Peterson  <adele@apple.com>
3908
3909         Reviewed by Maciej.
3910
3911         WebKit part of fix for <rdar://problem/4450613> need a means to attach user data to any menu that is popuped up in HTML
3912
3913         Added private delegate method for clients that want access to a PopupMenu's NSMenu.
3914
3915         * DefaultDelegates/WebDefaultUIDelegate.m: (-[NSApplication webView:willPopupMenu:]):
3916         * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge willPopupMenu:]):
3917         * WebView/WebUIDelegatePrivate.h:
3918
3919 2006-10-12  MorganL  <morganl.webkit@yahoo.com>
3920
3921         Reviewed/landed by Adam.
3922
3923         Fixes http://bugs.webkit.org/show_bug.cgi?id=11264
3924         Windows build busted
3925
3926         * COM/WebFrame.cpp:
3927         (WebFrame::receivedResponse):
3928
3929 2006-10-11  Darin Adler  <darin@apple.com>
3930
3931         Reviewed by Adele.
3932
3933         - preparations for making more code C++
3934
3935         * WebKitPrefix.h: Fixed ifdef so that C++ files get all the precompiled stuff
3936         that non-C++ files get.
3937
3938         * Misc/WebKitLogging.h:
3939         * Misc/WebKitSystemBits.h:
3940         * Misc/WebLocalizableStrings.h:
3941         * WebCoreSupport/WebSystemInterface.h:
3942         Added extern "C".
3943
3944         * Misc/WebNSViewExtras.h:
3945         * WebView/WebDataSource.m: (addTypesFromClass):
3946         * WebView/WebFrameView.m: (addTypesFromClass):
3947         Eliminated use of the identifier "class".
3948
3949         * WebView/WebView.m: (-[WebView _goToItem:withLoadType:]): Added a type cast.
3950
3951         * Plugins/WebBaseNetscapePluginView.m: Added lots of type casts.
3952
3953 2006-10-10  Brady Eidson  <beidson@apple.com>
3954
3955         Reviewed by Maciej.
3956
3957         Moved WebFrameLoader into WebCoreFrameBridge
3958
3959         * WebCoreSupport/WebFrameBridge.h:
3960         * WebCoreSupport/WebFrameBridge.m:
3961         (-[WebFrameBridge initMainFrameWithPage:frameName:view:]):
3962         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
3963         (-[WebFrameBridge dealloc]):
3964         (-[WebFrameBridge setTitle:]):
3965         (-[WebFrameBridge receivedData:textEncodingName:]):
3966         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
3967         (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
3968         (-[WebFrameBridge objectLoadedFromCacheWithURL:response:data:]):
3969         (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3970         (-[WebFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
3971         (-[WebFrameBridge reportClientRedirectCancelled:]):
3972         (-[WebFrameBridge close]):
3973         (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
3974         (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
3975         (-[WebFrameBridge tokenizerProcessedData]):
3976         (-[WebFrameBridge frameDetached]):
3977         (-[WebFrameBridge didFirstLayout]):
3978         (-[WebFrameBridge notifyIconChanged:]):
3979         (-[WebFrameBridge originalRequestURL]):
3980         (-[WebFrameBridge isLoadTypeReload]):
3981
3982 2006-10-10  Adele Peterson  <adele@apple.com>
3983
3984         Reviewed by Beth.
3985
3986         Removed handleAutoscrollForMouseDragged.  Except for autoscroll caused by drag and drop, all other
3987         autoscrolling should be done in WebCore instead of in AppKit.
3988
3989         * WebCoreSupport/WebFrameBridge.m:
3990         * WebView/WebHTMLView.m:
3991         * WebView/WebHTMLViewPrivate.h:
3992
3993 2006-10-10  Darin Adler  <darin@apple.com>
3994
3995         - corrected an archive regression caused by loader refactoring
3996           (pointed out by Graham Dennis)
3997
3998         * WebView/WebFrame.m: (-[WebFrame _deliverArchivedResourcesAfterDelay]):
3999         Fix selector name.
4000
4001 2006-10-10  Maciej Stachowiak  <mjs@apple.com>
4002
4003         Rubber stamped by Eric.
4004         
4005         - moved a whole bunch of stuff over to WebCore - updated includes appropriately
4006
4007         * Loader/LoaderNSURLExtras.h: Removed.
4008         * Loader/LoaderNSURLExtras.m: Removed.
4009         * Loader/WebDataProtocol.h: Removed.
4010         * Loader/WebDataProtocol.m: Removed.
4011         * Loader/WebDocumentLoader.h: Removed.
4012         * Loader/WebDocumentLoader.m: Removed.
4013         * Loader/WebFormDataStream.h: Removed.
4014         * Loader/WebFormDataStream.m: Removed.
4015         * Loader/WebFormState.h: Removed.
4016         * Loader/WebFormState.m: Removed.
4017         * Loader/WebFrameLoader.h: Removed.
4018         * Loader/WebFrameLoader.m: Removed.
4019         * Loader/WebFrameLoaderClient.h: Removed.
4020         * Loader/WebLoader.h: Removed.
4021         * Loader/WebLoader.m: Removed.
4022         * Loader/WebMainResourceLoader.h: Removed.
4023         * Loader/WebMainResourceLoader.m: Removed.
4024         * Loader/WebNetscapePlugInStreamLoader.h: Removed.
4025         * Loader/WebNetscapePlugInStreamLoader.m: Removed.
4026         * Loader/WebPlugInStreamLoaderDelegate.h: Removed.
4027         * Loader/WebPolicyDecider.h: Removed.
4028         * Loader/WebPolicyDecider.m: Removed.
4029         * Loader/WebSubresourceLoader.h: Removed.
4030         * Loader/WebSubresourceLoader.m: Removed.
4031         * Misc/WebNSURLExtras.m:
4032         * Plugins/WebBaseNetscapePluginStream.h:
4033         * Plugins/WebBaseNetscapePluginView.m:
4034         * Plugins/WebNetscapePluginStream.m:
4035         * Plugins/WebPluginContainerCheck.m:
4036         * Plugins/WebPluginController.m:
4037         * WebCoreSupport/WebFrameBridge.m:
4038         * WebKit.xcodeproj/project.pbxproj:
4039         * WebView/WebDataSource.m:
4040         * WebView/WebDocumentLoaderMac.h:
4041         * WebView/WebFrame.m:
4042         * WebView/WebFrameInternal.h:
4043         * WebView/WebHTMLView.m:
4044         * WebView/WebPolicyDeciderMac.h:
4045         * WebView/WebPolicyDelegate.m:
4046         * WebView/WebView.m:
4047
4048 2006-10-10  Mark Rowe  <bdash@webkit.org>
4049
4050         Reviewed by Maciej.
4051
4052         Fix crash on launch in nightly builds after r16965.
4053
4054         Safari will sometimes call through to -[NSURL _webkit_canonicalize] before creating a WebView.  If this happens,
4055         InitWebCoreSystemInterface has not yet been called so the call to wkNSURLProtocolClassForReqest is via a garbage
4056         pointer.
4057
4058         * Misc/WebNSURLExtras.m:
4059         (-[NSURL _webkit_canonicalize]): Ensure InitWebCoreSystemInterface is called prior to canonicalURL.
4060
4061 2006-10-10  Maciej Stachowiak  <mjs@apple.com>
4062
4063         Reviewed by Oliver.
4064         
4065         - split out some NSURL extras to be moved to WebCore
4066
4067         * Loader/LoaderNSURLExtras.h: Added.
4068         * Loader/LoaderNSURLExtras.m: Added.
4069         (urlByRemovingComponent):
4070         (urlByRemovingFragment):
4071         (urlOriginalDataAsString):
4072         (urlOriginalData):
4073         (urlWithData):
4074         (WebCFAutorelease):
4075         (urlWithDataRelativeToURL):
4076         (urlByRemovingResourceSpecifier):
4077         (urlIsFileURL):
4078         (stringIsFileURL):
4079         (urlIsEmpty):
4080         (canonicalURL):
4081         * Loader/WebFrameLoader.m:
4082         (-[WebFrameLoader shouldReloadForCurrent:andDestination:]):
4083         (setHTTPReferrer):
4084         (-[WebFrameLoader commitProvisionalLoad:]):
4085         (-[WebFrameLoader _notifyIconChanged:]):
4086         (-[WebFrameLoader didChangeTitleForDocument:]):
4087         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
4088         (-[WebFrameLoader safeLoadURL:]):
4089         * Misc/WebNSURLExtras.m:
4090         (+[NSURL _web_URLWithData:]):
4091         (+[NSURL _web_URLWithData:relativeToURL:]):
4092         (-[NSURL _web_originalData]):
4093         (-[NSURL _web_originalDataAsString]):
4094         (-[NSURL _web_isEmpty]):
4095         (-[NSURL _webkit_canonicalize]):
4096         (-[NSURL _webkit_URLByRemovingComponent:]):
4097         (-[NSURL _webkit_URLByRemovingFragment]):
4098         (-[NSURL _webkit_URLByRemovingResourceSpecifier]):
4099         (-[NSURL _webkit_isFileURL]):
4100         (-[NSString _webkit_isFileURL]):
4101         * WebCoreSupport/WebSystemInterface.m:
4102         (InitWebCoreSystemInterface):
4103         * WebKit.xcodeproj/project.pbxproj:
4104
4105 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
4106
4107         Reviewed by Anders.
4108         
4109         - sever final WebFrame dependencies
4110
4111         * Loader/WebFrameLoader.h:
4112         * Loader/WebFrameLoader.m:
4113         (-[WebFrameLoader initWithFrame:client:]):
4114         (-[WebFrameLoader defersCallbacksChanged]):
4115         (-[WebFrameLoader subframeIsLoading]):
4116         (-[WebFrameLoader transitionToCommitted:]):
4117         (-[WebFrameLoader detachChildren]):
4118         (-[WebFrameLoader checkLoadComplete]):
4119
4120 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
4121
4122         Reviewed by Brady.
4123         
4124         - convert more WebFrameLoader stuff to be independent of WebFrame
4125
4126         * Loader/WebFrameLoader.h:
4127         * Loader/WebFrameLoader.m:
4128         (-[WebFrameLoader stopLoadingSubframes]):
4129         (-[WebFrameLoader _receivedMainResourceError:complete:]):
4130         (-[WebFrameLoader loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
4131         (-[WebFrameLoader closeOldDataSources]):
4132         (-[WebFrameLoader isHostedByObjectElement]):
4133         (-[WebFrameLoader isLoadingMainFrame]):
4134         (-[WebFrameLoader loadDocumentLoader:withLoadType:formState:]):
4135         (-[WebFrameLoader transitionToCommitted:]):
4136         (-[WebFrameLoader checkLoadCompleteForThisFrame]):
4137         (-[WebFrameLoader continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
4138         (-[WebFrameLoader loadRequest:inFrameNamed:]):
4139         (-[WebFrameLoader postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
4140         (-[WebFrameLoader actionInformationForNavigationType:event:originalURL:]):
4141         (-[WebFrameLoader client]):
4142         * Loader/WebFrameLoaderClient.h:
4143         * WebView/WebDataSource.m:
4144         (-[WebDataSource _webView]):
4145         (-[WebDataSource webFrame]):
4146         * WebView/WebFrame.m:
4147         (-[WebFrame _dispatchCreateWebViewWithRequest:]):
4148
4149 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
4150
4151         Reviewed by Anders and Oliver.
4152         
4153         - move a bunch of WebFrame methods from the Internal category to the WebFrameLoader protocol
4154
4155         * Loader/WebFrameLoader.h:
4156         * Loader/WebFrameLoader.m:
4157         (-[WebFrameLoader loadRequest:]):
4158         (-[WebFrameLoader loadRequest:inFrameNamed:]):
4159         * Loader/WebFrameLoaderClient.h:
4160         * WebView/WebFrame.m:
4161         (-[WebFrame loadRequest:]):
4162         (-[WebFrame _dispatchDidCommitLoadForFrame]):
4163         (-[WebFrame _hasFrameView]):
4164         (-[WebFrame _frameLoadCompleted]):
4165         (-[WebFrame _restoreScrollPositionAndViewState]):
4166         (-[WebFrame _setTitle:forURL:]):
4167         (-[WebFrame _createDocumentLoaderWithRequest:]):
4168         (-[WebFrame _prepareForDataSourceReplacement]):
4169         (-[WebFrame _didFinishLoad]):
4170         (-[WebFrame _addHistoryItemForFragmentScroll]):
4171         (-[WebFrame _shouldTreatURLAsSameAsCurrent:]):
4172         (-[WebFrame _provisionalLoadStarted]):
4173         * WebView/WebFrameInternal.h:
4174
4175 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
4176
4177         Not reviewed, build fix.
4178         
4179         - added forgotten files
4180
4181         * Loader/WebPolicyDecider.h: Added.
4182         * Loader/WebPolicyDecider.m: Added.
4183         (-[WebPolicyDecider invalidate]):
4184
4185 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
4186
4187         Reviewed by Brady.
4188         
4189         - add wrapper for WebPolicyDecisionListener so we can remove the dependency from WebFrameLoader.
4190
4191         * Loader/WebFrameLoader.h:
4192         * Loader/WebFrameLoader.m:
4193         (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
4194         (-[WebFrameLoader cancelContentPolicy]):
4195         (-[WebFrameLoader invalidatePendingPolicyDecisionCallingDefaultAction:]):
4196         (-[WebFrameLoader checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]):
4197         (-[WebFrameLoader checkNavigationPolicyForRequest:documentLoader:formState:andCall:withSelector:]):
4198         (-[WebFrameLoader continueAfterWillSubmitForm:]):
4199         (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
4200         * Loader/WebFrameLoaderClient.h:
4201         * WebKit.xcodeproj/project.pbxproj:
4202         * WebView/WebFrame.m:
4203         (-[WebFrame _createPolicyDeciderWithTarget:action:]):
4204         (decisionListener):
4205         (-[WebFrame _dispatchDecidePolicyForMIMEType:request:decider:]):
4206         (-[WebFrame _dispatchDecidePolicyForNewWindowAction:request:newFrameName:decider:]):
4207         (-[WebFrame _dispatchDecidePolicyForNavigationAction:request:decider:]):
4208         (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
4209         * WebView/WebPolicyDeciderMac.h: Added.
4210         * WebView/WebPolicyDeciderMac.m: Added.
4211         (-[WebPolicyDeciderMac initWithTarget:action:]):
4212         (-[WebPolicyDeciderMac dealloc]):
4213         (-[WebPolicyDeciderMac decisionListener]):
4214         (-[WebPolicyDeciderMac invalidate]):
4215
4216 2006-10-09  Brady Eidson  <beidson@apple.com>
4217
4218         Reviewed by John
4219
4220         http://bugs.webkit.org/show_bug.cgi?id=11195
4221         Added the WebIconDatabaseDelegate.  This allows the ability to allow customization of 
4222         IconDatabase behavior in the future, starting now with the ability to override the 
4223         default icon fairly flexibly
4224
4225         * Misc/WebIconDatabase.h: Added setIconDatabaseDelegate:
4226         * Misc/WebIconDatabase.m:
4227         (-[WebIconDatabase iconForURL:withSize:cache:]): Call the delegate for the default icon if delegate is set
4228         (-[WebIconDatabase defaultIconForURL:withSize:]): Get the default icon through the delegate if available, built-in if not
4229         (-[WebIconDatabase setDelegate:]):
4230         (-[WebIconDatabase delegate]):
4231         * Misc/WebIconDatabaseDelegate.h: Added.
4232         * Misc/WebIconDatabasePrivate.h: Added the delegate, nuked an unused class definition
4233         * WebKit.xcodeproj/project.pbxproj:
4234
4235 2006-10-09  Darin Adler  <darin@apple.com>
4236
4237         Reviewed by Maciej.
4238
4239         - eliminated uses of WebResource and WebView from WebFrameLoader
4240
4241         * Loader/WebFrameLoader.h:
4242         * Loader/WebFrameLoader.m:
4243         (-[WebFrameLoader setDefersCallbacks:]):
4244         (-[WebFrameLoader stopLoading]):
4245         (-[WebFrameLoader willUseArchiveForRequest:originalURL:loader:]):
4246         (-[WebFrameLoader archiveLoadPendingForLoader:]):
4247         (-[WebFrameLoader cancelPendingArchiveLoadForLoader:]):
4248         (-[WebFrameLoader _canShowMIMEType:]):
4249         (-[WebFrameLoader _representationExistsForURLScheme:]):
4250         (-[WebFrameLoader _generatedMIMETypeForURLScheme:]):
4251         (-[WebFrameLoader loadDocumentLoader:]):
4252         (-[WebFrameLoader continueAfterNavigationPolicy:]):
4253         (-[WebFrameLoader sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
4254         (-[WebFrameLoader actionInformationForNavigationType:event:originalURL:]):
4255         * Loader/WebFrameLoaderClient.h:
4256         * Loader/WebMainResourceLoader.m:
4257         (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
4258         (-[WebMainResourceLoader loadWithRequestNow:]):
4259         * WebView/WebFrame.m:
4260         (-[WebFramePrivate dealloc]):
4261         (-[WebFrame loadRequest:]):
4262         (-[WebFrame loadArchive:]):
4263         (-[WebFrame _canUseResourceForRequest:]):