WebCore:
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2008-07-01  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Darin Adler.
4
5         - WebKit part of moving the method to set the base writing direction from Frame to Editor
6
7         * WebView/WebHTMLView.mm:
8         (-[WebHTMLView toggleBaseWritingDirection:]): Changed back to call the
9         Editor method.
10         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
11         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
12
13 2008-07-01  Geoffrey Garen  <ggaren@apple.com>
14
15         Build fix: forgot to check in this file.
16
17         * WebView/WebScriptDebugger.mm:
18         (WebScriptDebugger::WebScriptDebugger):
19
20 2008-06-30  Dan Bernstein  <mitz@apple.com>
21
22         Reviewed by Adele Peterson.
23
24         - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
25
26         * WebView/WebHTMLView.mm:
27         (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
28         WebCore::Frame::setSelectionBaseWritingDirection() instead of
29         WebCore::Editor::setBaseWritingDirection().
30         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
31         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
32
33 2008-06-28  Darin Adler  <darin@apple.com>
34
35         - fix build
36
37         * WebView/WebView.mm:
38         (aeDescFromJSValue): Use get instead of getItem, which no longer exists.
39
40 2008-06-26  Anders Carlsson  <andersca@apple.com>
41
42         Reviewed by Darin.
43
44         Add a new MainThreadObjectDeallocator which can schedule dealloc calls on the main thread
45         if necessary. Use this for the WebView class. 
46                 
47         * WebView/MainThreadObjectDeallocator.h: Added.
48         * WebView/MainThreadObjectDeallocator.mm: Added.
49         (deallocCallback):
50         (scheduleDeallocateOnMainThread):
51         * WebView/WebView.mm:
52         (-[WebViewPrivate dealloc]):
53         (+[WebView initialize]):
54
55 2008-06-25  Anders Carlsson  <andersca@apple.com>
56
57         Reviewed by Mark.
58
59         <rdar://problem/5984270> 
60         REGRESSION (Tiger only) : Mail crashes because message load is being processed on a secondary thread
61         
62         * WebView/WebView.mm:
63         (tigerMailReleaseIMP):
64         New method that makes sure that the final release happens on the main thread.
65         
66         (-[WebView release]):
67         New method that just calls [super release];
68         
69         (+[WebView initialize]):
70         When running under Tiger mail, replace the release method with tigerMailReleaseIMP.
71
72 2008-06-19  Alexey Proskuryakov  <ap@webkit.org>
73
74         Reviewed by Geoff.
75
76         Make Machine per-JSGlobalData.
77
78         * WebView/WebScriptDebugger.mm:
79         (WebScriptDebugger::WebScriptDebugger):
80
81 2008-06-17  Alexey Proskuryakov  <ap@webkit.org>
82
83         Reviewed by Darin.
84
85         Prepare JavaScript heap for being per-thread.
86
87         * Misc/WebCoreStatistics.mm:
88         (+[WebCoreStatistics javaScriptObjectsCount]):
89         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
90         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
91         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
92         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
93         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
94         Use JSGlobalData::threadInstance()->heap instead of static Collector calls.
95
96 2008-06-17  Darin Adler  <darin@apple.com>
97
98         Reviewed by Sam.
99
100         * WebView/WebHTMLView.mm:
101         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Use create instead of new
102         to create a CSSMutableStyleDeclaration.
103
104 2008-06-16  Mark Rowe  <mrowe@apple.com>
105
106         Reviewed by Darin Adler.
107
108         <rdar://problem/5951874> WebHTMLHighlighter mistakenly gained two new methods, causing compile warnings
109
110         _pauseNullEventsForAllNetscapePlugins and _resumeNullEventsForAllNetscapePlugins ended up being declared both in
111         WebHTMLViewInternal.h and as members of the WebHTMLHighlighter protocol in WebHTMLViewPrivate.h.  They don't belong
112         in the protocol, but they do need to be available outside of WebKit so they're being moved to the correct location
113         in WebHTMLViewPrivate.h and removed from WebHTMLViewInternal.h.
114
115         * WebView/WebHTMLView.mm:
116         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
117         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
118         * WebView/WebHTMLViewInternal.h:
119         * WebView/WebHTMLViewPrivate.h:
120
121 2008-06-15  Darin Adler  <darin@apple.com>
122
123         - give Frame object functions shorter names: scriptProxy() -> script(),
124           selectionController() -> selection(), animationController() -> animation()
125
126         * Plugins/WebPluginController.mm:
127         (-[WebPluginController webPlugInContainerSelectionColor]):
128         * WebView/WebFrame.mm:
129         (-[WebFrame _attachScriptDebugger]):
130         (-[WebFrame _hasSelection]):
131         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
132         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
133         (-[WebFrame _convertToNSRange:]):
134         (-[WebFrame _convertToDOMRange:]):
135         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
136         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
137         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
138         (-[WebFrame _selectedNSRange]):
139         (-[WebFrame _selectNSRange:]):
140         (-[WebFrame globalContext]):
141         * WebView/WebHTMLView.mm:
142         (-[WebHTMLView _selectedRange]):
143         (-[WebHTMLView _hasSelection]):
144         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
145         (-[WebHTMLView _hasInsertionPoint]):
146         (-[WebHTMLView _isEditable]):
147         (-[WebHTMLView _updateFocusedAndActiveState]):
148         (-[WebHTMLView readSelectionFromPasteboard:]):
149         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
150         (-[WebHTMLView maintainsInactiveSelection]):
151         (-[WebHTMLView paste:]):
152         (isTextInput):
153         (-[WebHTMLView inputContext]):
154         (-[WebTextCompleteController doCompletion]):
155         (-[WebHTMLView selectAll]):
156         (-[WebHTMLView deselectAll]):
157         (-[WebHTMLView selectedAttributedString]):
158         * WebView/WebView.mm:
159         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
160         (-[WebView setSelectedDOMRange:affinity:]):
161         (-[WebView selectedDOMRange]):
162         (-[WebView selectionAffinity]):
163
164 2008-06-15  Darin Adler  <darin@apple.com>
165
166         - rename KJS::List to KJS::ArgList
167
168         * WebView/WebScriptDebugger.h:
169
170 2008-06-15  Darin Adler  <darin@apple.com>
171
172         - new names for more JavaScriptCore files
173
174         * WebView/WebView.mm:
175
176 2008-06-15  Darin Adler  <darin@apple.com>
177
178         - new names for a few key JavaScriptCore files
179
180         * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h.
181         * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h.
182         * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h.
183         * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h.
184         * ForwardingHeaders/kjs/function.h: Removed.
185         * ForwardingHeaders/kjs/internal.h: Removed.
186         * ForwardingHeaders/kjs/object.h: Removed.
187         * ForwardingHeaders/kjs/value.h: Removed.
188         * WebView/WebScriptDebugDelegate.mm:
189
190 2008-06-15  Darin Adler  <darin@apple.com>
191
192         Rubber stamped by Sam.
193
194         - use JS prefix and simpler names for basic JavaScriptCore types,
195           to complement JSValue and JSObject
196
197         * WebView/WebView.mm:
198         (aeDescFromJSValue):
199
200 2008-06-14  Darin Adler  <darin@apple.com>
201
202         Rubber stamped by Sam.
203
204         - new names for kjs_binding.h and kjs_proxy.h
205
206         * WebView/WebFrame.mm:
207         * WebView/WebScriptDebugDelegate.mm:
208         * WebView/WebView.mm:
209
210 2008-06-14  Darin Adler  <darin@apple.com>
211
212         Rubber stamped by Sam.
213
214         - renamed HTMLGenericFormElement to HTMLFormControlElement
215
216         * WebView/WebHTMLRepresentation.mm:
217         (-[WebHTMLRepresentation elementWithName:inForm:]):
218         (-[WebHTMLRepresentation controlsInForm:]):
219
220 2008-06-14  Darin Adler  <darin@apple.com>
221
222         Reviewed by Sam.
223
224         - more of https://bugs.webkit.org/show_bug.cgi?id=17257
225           start ref counts at 1 instead of 0 for speed
226
227         * WebCoreSupport/WebFrameLoaderClient.mm:
228         (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
229         (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
230         a ref call inside the Frame constructor. The lifetime rules for Frame are now the
231         conventional ones without a special case.
232
233         * WebView/WebDataSource.mm:
234         (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
235         this function takes ownership of the DocumentLoader.
236         (-[WebDataSource initWithRequest:]): Use create instead of new.
237         * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
238         PassRefPtr and also cleaned up the header a bit.
239
240         * WebView/WebDocumentLoaderMac.h:
241         (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
242         functions private.
243
244         * WebView/WebFrame.mm:
245         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
246         of new.
247
248 2008-06-14  Darin Adler  <darin@apple.com>
249
250         Reviewed by Sam.
251
252         - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
253           start ref counts at 1 instead of 0 for speed
254
255         * WebView/WebFrame.mm:
256         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
257         * WebView/WebPDFView.mm:
258         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
259
260 2008-06-13  Darin Adler  <darin@apple.com>
261
262         Reviewed by John Sullivan.
263
264         - updated for addition of FormState argument to action policy functions
265         - added WebActionFormKey
266
267         * WebCoreSupport/WebFrameLoaderClient.h:
268         * WebCoreSupport/WebFrameLoaderClient.mm:
269         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
270         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
271         (WebFrameLoaderClient::actionDictionary):
272         * WebKit.exp:
273         * WebView/WebPolicyDelegate.mm:
274         * WebView/WebPolicyDelegatePrivate.h:
275
276 2008-06-12  John Sullivan  <sullivan@apple.com>
277
278         Reviewed by Dan and Darin
279
280         Clear up the confusion about _close (older private method) vs -close (newer public method).
281
282         * WebView/WebView.mm:
283         (-[WebView _isClosed]):
284         simplified style
285         (-[WebView _close]):
286         added a comment about how clients and subclasses should use -close instead
287         (-[WebView dealloc]):
288         call -close instead of _close, so subclasses that override the public method will have the intended behavior
289         (-[WebView close]):
290         added a comment
291         (-[WebView _windowWillClose:]):
292         call -close instead of _close, so subclasses that override the public method will have the intended behavior
293
294         * WebView/WebViewPrivate.h:
295         added a comment about how clients and subclasses should use -close instead
296
297 2008-06-07  Darin Adler  <darin@apple.com>
298
299         Reviewed by Mitz.
300
301         - work on https://bugs.webkit.org/show_bug.cgi?id=17257
302           start ref counts at 1 instead of 0 for speed
303
304         * History/WebHistoryItem.mm:
305         (-[WebHistoryItem init]):
306         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
307         (-[WebHistoryItem initWithURL:target:parent:title:]):
308         (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
309         * WebView/WebView.mm:
310         (+[WebView _decodeData:]):
311
312 2008-06-03  Oliver Hunt  <oliver@apple.com>
313
314         Reviewed by Tim.
315
316         Bug 12983: Web Inspector break on the debugger keyword
317         <https://bugs.webkit.org/show_bug.cgi?id=12983>
318
319         Add stubs to allow old webkit debugger interface to build.
320
321         * WebView/WebScriptDebugger.h:
322         * WebView/WebScriptDebugger.mm:
323
324 2008-06-03  Anders Carlsson  <andersca@apple.com>
325
326         Reviewed by Darin.
327
328         <rdar://problem/5980961>
329         
330         In 64-bit Web Kit, converting between float and double, can cause rounding errors which in turn causes
331         newBottom to be larger than oldBottom which is illegal.
332         
333         * WebView/WebHTMLView.mm:
334         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
335
336 2008-06-02  Anders Carlsson  <andersca@apple.com>
337
338         Reviewed by Mitz.
339
340         Speculative fix for <rdar://problem/5661112> 
341         CrashTracer: [USER] 49 crashes in DashboardClient at com.apple.WebCore: WebCore::RenderPart::setWidget + 62
342         
343         Defer loads while calling NPP_New. Some plug-ins start a run-loop inside NPP_New and finished loads could cause
344         layouts to be triggered.
345         
346         * Plugins/WebBaseNetscapePluginView.mm:
347         (-[WebBaseNetscapePluginView _createPlugin]):
348
349 2008-05-29  Justin Garcia  <justin.garcia@apple.com>
350
351         Reviewed by Darin.
352         
353         <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail
354         
355         AppKit started putting PNG instead of PICT onto the pasteboard for screen 
356         captures.  Added support for PNG with kUTTypePNG.  Tiger doesn't support
357         setting and retrieving pasteboard types with UTIs, but we don't know of any
358         applications on Tiger that put only PNG on the pasteboard.
359
360         * WebView/WebHTMLView.mm:
361         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
362         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
363
364 2008-05-29  Anders Carlsson  <andersca@apple.com>
365
366         Reviewed by Brady.
367
368         <rdar://problem/5970312> 
369         icon file specified for stand alone web app causes crash if the icon can't be found
370         
371         Handle the case where iconData is null.
372         
373         * Misc/WebIconFetcher.mm:
374         (WebIconFetcherClient::finishedFetchingIcon):
375
376 2008-05-29  Anders Carlsson  <andersca@apple.com>
377
378         Reviewed by Mitz.
379
380         <rdar://problem/5971845>
381         https://bugs.webkit.org/show_bug.cgi?id=19313
382         Add version member to NPCocoaEvent
383
384         Initialize the version member to 0 for all events.
385         
386         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
387         (initializeEvent):
388         (WebNetscapePluginEventHandlerCocoa::drawRect):
389         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
390         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
391         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
392         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
393         (WebNetscapePluginEventHandlerCocoa::focusChanged):
394
395 2008-05-29  Dan Bernstein  <mitz@apple.com>
396
397         Reviewed by Jessica Kahn.
398
399         - fix <rdar://problem/5965013> Page 2 does not print correctly
400
401         When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and
402         _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without
403         -viewWillDraw being sent first, which could lead to painting without
404         valid layout. The fix is to ensure up-to-date layout in those methods
405         when printing.
406
407         * WebView/WebHTMLView.mm:
408         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
409         (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
410
411 2008-05-28  Anders Carlsson  <andersca@apple.com>
412
413         Reviewed by Jon.
414
415         Remove workaround, this is no longer a problem.
416         
417         * WebView/WebView.mm:
418         (-[WebView _removeObjectForIdentifier:]):
419
420 2008-05-27  Geoffrey Garen  <ggaren@apple.com>
421
422         Reviewed by Tim Hatcher.
423         
424         Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
425         REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
426         clicking button in returnEvent-crash.html
427         
428         Added implementations for willExecuteProgram and didExecuteProgram, which
429         take care of making sure we're not hanging on to stale data.
430
431 2008-05-27  Timothy Hatcher  <timothy@apple.com>
432
433         Fixes a bug where unplugging the monitor from a video card and
434         moving it to another video card would no longer show OpenGL plugins
435         until you relaunched Safari.
436
437         <rdar://problem/5790983> Add AllowOfflineDisplays pixel format
438         attribute to OpenGL contexts
439
440         Reviewed by Kevin Decker.
441
442         * Plugins/WebBaseNetscapePluginView.mm:
443         (-[WebBaseNetscapePluginView _createWindowedAGLContext]): Added
444         AGL_ALLOW_OFFLINE_RENDERERS for non-Tiger builds.
445         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): Ditto.
446
447 2008-05-25  Mark Rowe  <mrowe@apple.com>
448
449         Reviewed by Darin Adler.
450
451         <rdar://problem/5840884> _recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
452
453         Follow-up for r33052.  _recursive_resumeNullEventsForAllNetscapePlugins and _recursive_pauseNullEventsForAllNetscapePlugins
454         need to be declared in WebFramePrivate.h rather than WebFrameInternal.h so they can be used from outside of WebKit.
455
456         * WebView/WebFrame.mm:
457         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
458         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
459         * WebView/WebFrameInternal.h:
460         * WebView/WebFramePrivate.h:
461
462 2008-05-23  Timothy Hatcher  <timothy@apple.com>
463
464         Fix attaching and detaching the Web Inspector. This change removes
465         the clunky animation that never looked right and was causing issues
466         where the inspected WebView would get into a no useable state.
467
468         <rdar://problem/5958812> Attaching and Detaching the Web Inspector
469         can cause the inspected WebVIew to be unusable
470
471         Reviewed by Adam Roben.
472
473         * WebCoreSupport/WebInspectorClient.mm:
474         (-[WebInspectorWindowController close]): Removes animation code.
475         Sets the frame directly and does a displayIfNeeded to prevent
476         showing the Inspector in the page and in the Inspector window.
477         (-[WebInspectorWindowController showWindow:]): Removes animation code.
478         Sets the frame directly.
479         (-[WebInspectorWindowController attach]): Simplified.
480         (-[WebInspectorWindowController detach]): Ditto.
481
482 2008-05-22  Dan Bernstein  <mitz@apple.com>
483
484         Reviewed by Darin Adler.
485
486         - fix broken documentation of
487           webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
488
489         * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for
490         -webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
491
492 2008-05-22  Timothy Hatcher  <timothy@apple.com>
493
494         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
495
496         Reviewed by Adam Roben.
497
498         * WebCoreSupport/WebInspectorClient.mm:
499         (-[WebInspectorWindowController showWebInspector:]):
500         (-[WebInspectorWindowController showErrorConsole:]):
501         (-[WebInspectorWindowController toggleDebuggingJavaScript:]):
502         (-[WebInspectorWindowController toggleProfilingJavaScript:]):
503         (-[WebInspectorWindowController validateUserInterfaceItem:]):
504         * WebInspector/WebInspector.h:
505         * WebInspector/WebInspector.mm:
506         (-[WebInspector showConsole:]):
507         (-[WebInspector showTimeline:]):
508         (-[WebInspector isDebuggingJavaScript]):
509         (-[WebInspector toggleDebuggingJavaScript:]):
510         (-[WebInspector startDebuggingJavaScript:]):
511         (-[WebInspector stopDebuggingJavaScript:]):
512         (-[WebInspector isProfilingJavaScript]):
513         (-[WebInspector toggleProfilingJavaScript:]):
514         (-[WebInspector startProfilingJavaScript:]):
515         (-[WebInspector stopProfilingJavaScript:]):
516
517 2008-05-22  Josh Aas  <joshmoz@gmail.com>
518
519         Reviewed by Anders.
520
521         <rdar://problem/5956429> 
522         https://bugs.webkit.org/show_bug.cgi?id=19192
523         remove NPNVpluginEventModel, fix example plugin
524         
525         * Plugins/WebBaseNetscapePluginView.mm:
526         (-[WebBaseNetscapePluginView getVariable:value:]):
527
528 2008-05-21  Anders Carlsson  <andersca@apple.com>
529
530         Reviewed by Maciej.
531
532         Add WebIconFetcher.
533         
534         * Misc/WebIconFetcher.h: Added.
535         * Misc/WebIconFetcher.mm: Added.
536         (WebIconFetcherClient::WebIconFetcherClient):
537         (WebIconFetcherClient::finishedFetchingIcon):
538         (WebIconFetcherClient::setFetcher):
539         (-[WebIconFetcher init]):
540         (-[WebIconFetcher dealloc]):
541         (-[WebIconFetcher finalize]):
542         (-[WebIconFetcher cancel]):
543         (-[WebIconFetcher _initWithIconFetcher:client:]):
544         (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
545         * Misc/WebIconFetcherInternal.h: Added.
546         * WebView/WebFrame.mm:
547         (-[WebFrame fetchApplicationIcon:selector:]):
548         * WebView/WebFramePrivate.h:
549
550 === End merge of squirrelfish ===
551
552 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
553
554         Reviewed by Tim Hatcher.
555         
556         Updated for API changes from merging with trunk WebCore's new debugger.
557
558         * WebView/WebScriptDebugDelegate.mm:
559         (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an
560         exception return, since the DebuggerCallFrame no longer automatically
561         substitutes the exception for the return value.
562
563         * WebView/WebScriptDebugger.mm: Use the dynamic global object, not the
564         lexical global object, since the debugger attaches based on dynamic
565         global object.
566
567 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
568
569         Reviewed by Oliver Hunt.
570         
571         Re-enabled previously disabled debugging functionality.
572         
573         There are two major changes from how the WebKit debugger used to work:
574         
575         (1) All the interesting bits are implemented down in JavaScriptCore. The
576         debugger just calls through to KJS::DebuggerCallFrame for everything.
577         
578         (2) Instead of copyihng a pointer to an ExecState once, the debugger
579         copies the DebuggerCallFrame passed to it in each callback. This is
580         because the VM no longer maintains a fully transparent execution state
581         to which you can hold a pointer, and the DebuggerCallFrames it vends
582         are temporaries.
583         
584         Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
585         from its function. This is safer than the old method, which was to
586         hold a stale ExecState* and hope for the best.
587
588 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
589
590         Reviewed by Oliver Hunt.
591
592         Updated for API changes in KJS::Debugger.
593
594         * WebView/WebFrame.mm:
595         (-[WebFrame _attachScriptDebugger]): Changed the order of operations to
596         fix an ASSERT that can happen when re-entering _attachScriptDebugger.
597
598 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
599
600         Reviewed by Oliver Hunt.
601         
602         Updated WebScriptDebugger API to accept a SourceProvider instead
603         of a WebCore::String, to avoid copying.
604
605         (WebScriptDebugger::sourceParsed): Updated this function not to return
606         a value.
607
608 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
609
610         Build fix: #ifdef'd out some code that doesn't work anymore.
611
612 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
613
614         Reviewed by Oliver Hunt.
615         
616         #ifdef'd out some debugger code that doesn't work anymore.
617
618         * WebView/WebScriptDebugDelegate.mm:
619         (-[WebScriptCallFrame scopeChain]):
620
621 2008-04-21  Geoffrey Garen  <ggaren@apple.com>
622
623         Build fix.
624
625         * ChangeLog:
626         * WebView/WebScriptDebugDelegate.mm:
627         (-[WebScriptCallFrame scopeChain]):
628
629 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
630
631         Reviewed by Oliver Hunt.
632         
633         Build fix.
634
635 === Start merge of squirrelfish ===
636
637 2008-05-21  Darin Adler  <darin@apple.com>
638
639         - fix build
640
641         * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later
642         if we want, but if we do, we should probably make some refinements like checking _private->closed
643         and applicationIsTerminating.
644
645 2008-05-21  Darin Adler  <darin@apple.com>
646
647         Reviewed by Anders and Kevin Decker.
648
649         - fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session
650
651         * WebView/WebView.mm:
652         (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used.
653         (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close.
654         (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal.
655         Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix).
656         (-[WebView _close]): Changed for new method name and to use _closePluginDatabases.
657
658 2008-05-19  Stephanie Lewis  <slewis@apple.com>
659
660         Reviewed by Darin.
661     
662         more fast teardown performance work
663
664         * Misc/WebDownload.m:
665         (-[WebDownloadInternal downloadDidBegin:]):
666         (-[WebDownloadInternal downloadDidFinish:]):
667         (-[WebDownloadInternal download:didFailWithError:]):
668         * WebCoreSupport/WebChromeClient.h:
669         * WebCoreSupport/WebChromeClient.mm:
670         (WebChromeClient::disableSuddenTermination):
671         (WebChromeClient::enableSuddenTermination):
672
673 2008-05-18  Dan Bernstein  <mitz@apple.com>
674
675         Reviewed by Sam Weinig.
676
677         - fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
678
679         * Panels/WebAuthenticationPanel.m:
680         (-[WebAuthenticationPanel setUpForChallenge:]):
681
682 2008-05-16  Timothy Hatcher  <timothy@apple.com>
683
684         Removes WebScriptDebugServer files and related calls. This removes
685         the hooks that Drosera uses for debugging. Now that the Web Inspector
686         has a better debugger, we don't need these anymore.
687
688         Reviewed by Sam Weinig.
689
690         * DefaultDelegates/WebScriptDebugServer.h: Removed.
691         * DefaultDelegates/WebScriptDebugServer.m: Removed.
692         * DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
693         * WebCoreSupport/WebFrameLoaderClient.mm:
694         * WebKit.exp:
695         * WebView/WebScriptDebugDelegate.mm:
696         * WebView/WebScriptDebugger.mm:
697         (WebScriptDebugger::sourceParsed):
698         (WebScriptDebugger::callEvent):
699         (WebScriptDebugger::atStatement):
700         (WebScriptDebugger::returnEvent):
701         (WebScriptDebugger::exception):
702         * WebView/WebView.mm:
703         (-[WebView _commonInitializationWithFrameName:groupName:]):
704         * WebView/WebViewPrivate.h:
705
706 2008-05-16  Brady Eidson  <beidson@apple.com>
707
708         Reviewed by Anders
709
710         <rdar://problem/5942616> - Need to standardize LocalStorage persistence path
711
712         Took the opportunity to touch up another pref that needs the same standardization.
713         That pref is currently not in use on Mac.
714
715         * WebView/WebPreferences.m:
716         (-[WebPreferences _setFTPDirectoryTemplatePath:]):
717         (-[WebPreferences _localStorageDatabasePath]):
718         (-[WebPreferences _setLocalStorageDatabasePath:]):
719         (-[WebPreferences _ftpDirectoryTemplatePath]):
720
721 2008-05-16  Chris Fleizach  <cfleizach@apple.com>
722
723         Reviewed by Alice Liu
724
725         <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
726
727         * WebView/WebFrame.mm:
728         (-[WebFrame _accessibilityTree]):
729
730 2008-05-15  Stephanie Lewis  <slewis@apple.com>
731         
732         fix mac build
733
734         * WebView/WebView.mm:
735         (-[WebView closeWithFastTeardown]):
736
737 2008-05-15  Stephanie Lewis  <slewis@apple.com>
738
739         Reviewed by Anders.
740
741         Turn on fast teardown.  I added a preference for using full teardown because 
742         the LEAKS output will be useless without a full teardown.  
743
744         preference for fullteardown
745         * WebView/WebPreferenceKeysPrivate.h:
746         * WebView/WebPreferences.m:
747         (-[WebPreferences setFullDocumentTeardownEnabled:]):
748         (-[WebPreferences fullDocumentTeardownEnabled]):
749         * WebView/WebPreferencesPrivate.h:
750         
751         on application quit dispatch unload events and destroy plugins then exit
752         * WebView/WebView.mm:
753         (-[WebView closeWithFastTeardown]):
754         (-[WebView _close]):
755         * WebView/WebViewPrivate.h:
756
757 2008-05-15  Stephanie Lewis  <slewis@apple.com>
758
759         Reviewed by Anders.
760
761         get the pending frame unload count from WebCore
762
763         * WebView/WebFrame.mm:
764         (-[WebFrame _pendingFrameUnloadEventCount]):
765         * WebView/WebFramePrivate.h:
766
767 2008-05-15  John Sullivan  <sullivan@apple.com>
768
769         Reviewed by Kevin Decker
770         
771         - fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of 
772           screen when new tab appears
773           
774         The highlight should go away entirely, but this simple patch just makes it not jump away.
775         The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>
776
777         * WebInspector/WebNodeHighlight.m:
778         (-[WebNodeHighlight _repositionHighlightWindow]):
779         Bail out if target view isn't in a window
780
781 2008-05-15  Stephanie Lewis  <slewis@apple.com>
782
783         Reviewed by Anders.
784
785         Track views that contain plugin instances so that they can be destroyed at application
786         quit without walking the entire document tree.
787
788         Add/Remove Netscape plugin views from instance list.  Start/stop are when netscape
789         plugins are created and destroyed
790         * Plugins/WebBaseNetscapePluginView.mm:
791         (-[WebBaseNetscapePluginView start]):
792         (-[WebBaseNetscapePluginView stop]):
793  
794         Add/remove WebKit plugin views from instance list
795         * Plugins/WebPluginController.mm:
796         (-[WebPluginController addPlugin:]):
797         (-[WebPluginController destroyPlugin:]):
798         (-[WebPluginController destroyAllPlugins]):
799
800         Add a set of views with plugin instances to the WebPluginDatabase
801         * Plugins/WebPluginDatabase.h:
802         * Plugins/WebPluginDatabase.mm:
803         (-[WebPluginDatabase init]):
804         (-[WebPluginDatabase dealloc]):
805         (-[WebPluginDatabase addPluginInstanceView:]):
806         (-[WebPluginDatabase removePluginInstanceView:]):
807         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
808         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
809         
810         Handle cases where plugin views are detached before the plugin is destroyed.
811         * WebCoreSupport/WebFrameLoaderClient.mm:
812         (WebFrameLoaderClient::detachedFromParent2):
813         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
814         (WebFrameLoaderClient::transitionToCommittedForNewPage):
815
816         Add plugin instances to the set in the WebPluginDatabase by way of the WebView
817         * WebView/WebHTMLView.mm:
818         (-[WebHTMLView _destroyAllWebPlugins]):
819         * WebView/WebHTMLViewInternal.h:
820         * WebView/WebView.mm:
821         (-[WebView addPluginInstanceView:]):
822         (-[WebView removePluginInstanceView:]):
823         (-[WebView removePluginInstanceViewsFor:]):
824         * WebView/WebViewInternal.h:
825
826 2008-05-15  Brady Eidson  <beidson@apple.com>
827
828         Reviewed by Tim Hatcher
829
830         Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
831         before setting the page group of the new page.
832         
833         * WebView/WebView.mm:
834         (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path 
835           immediately after creating the page so it is in place for initializing the LocalStorageThread
836
837 2008-05-15  Timothy Hatcher  <timothy@apple.com>
838
839         Fixes the bug where the Web Inspector would flash white while resizing.
840         This was cause by deferring the window creation.
841
842         <rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)
843
844         Reviewed by Darin Adler.
845
846         * WebCoreSupport/WebInspectorClient.mm:
847         (-[WebInspectorWindowController window]): Don't defer the window creation.
848
849 2008-05-15  Alexey Proskuryakov  <ap@webkit.org>
850
851         Tiger build fix.
852
853         * Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
854
855 2008-05-15  Adele Peterson  <adele@apple.com>
856
857         Reviewed and landed by Alexey.
858
859         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
860
861         * Misc/WebNSAttributedStringExtras.mm:
862         (+[NSAttributedString _web_attributedStringFromRange:]):
863
864 2008-05-14  Eric Seidel  <eric@webkit.org>
865
866         Reviewed by Oliver.
867
868         Add missing NULL check to match rest of file, this was found by the editing fuzzer.
869
870         * WebView/WebResource.mm:
871         (-[WebResource data]):
872
873 2008-05-14  Alexey Proskuryakov  <ap@webkit.org>
874
875         Reviewed by Dan Bernstein.
876
877         NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray.
878
879         * Plugins/nptextinput.h:
880
881 2008-05-13  Anders Carlsson  <andersca@apple.com>
882
883         Reviewed by Sam.
884
885         Don't empty the application cache in _setCacheModel, since it will be called during initialization.
886         Instead, do it in [WebCache empty].
887         
888         * Misc/WebCache.mm:
889         (+[WebCache empty]):
890         * WebView/WebView.mm:
891         (+[WebView _setCacheModel:]):
892
893 2008-05-13  chris fleizach  <cfleizach@apple.com>
894
895         Reviewed by Beth Dakin
896
897         <rdar://problem/4780592> WebKit application has its window announced as HTML content
898
899         * WebCoreSupport/WebViewFactory.mm:
900         (-[WebViewFactory AXWebAreaText]):
901
902 2008-05-13  Timothy Hatcher  <timothy@apple.com>
903
904         Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean
905         was referencing a nil WebView under validateUserInterfaceItem.
906         The validateUserInterfaceItem methods was being called at a time
907         when the WebHTMLView is being torndown.
908
909         <rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean()
910         while mousing down on menu bar after Xcode News window is opened
911
912         Reviewed by Ada Chan.
913
914         * WebView/WebHTMLView.mm:
915         (-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and
916         return NO when it is nil. Adds a comment.
917         * WebView/WebPDFView.mm:
918         (-[WebPDFView validateUserInterfaceItem:]): Ditto.
919
920 2008-05-13  Mark Rowe  <mrowe@apple.com>
921
922         Reviewed by John Sullivan.
923
924         <rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework
925
926         * Carbon/HIWebView.h: Remove HIWebViewCreateWithClass.
927         * Carbon/HIWebView.m: Ditto.
928         (HIWebViewCreate):
929         (HIWebViewConstructor):
930
931 2008-05-12  Dan Bernstein  <mitz@apple.com>
932
933         Reviewed by Ada Chan.
934
935         - WebKit/mac changes for https://bugs.webkit.org/show_bug.cgi?id=17097
936           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
937
938         Added font cache statistics and a function to purge inactive font data.
939
940         * Misc/WebCoreStatistics.h:
941         * Misc/WebCoreStatistics.mm:
942         (+[WebCoreStatistics cachedFontDataCount]):
943         (+[WebCoreStatistics cachedFontDataInactiveCount]):
944         (+[WebCoreStatistics purgeInactiveFontData]):
945         (+[WebCoreStatistics glyphPageCount]):
946
947 2008-05-12  Mark Rowe  <mrowe@apple.com>
948
949         Reviewed by Tim Hatcher.
950
951         Decorate some deprecated delegate methods with the availability macros.
952
953         The compiler doesn't appear to warn if a delegate implements these methods, but using the availability
954         macros is good for consistency and documentation.
955
956         * WebView/WebFrameLoadDelegate.h:
957         * WebView/WebUIDelegate.h:
958
959 2008-05-12  Mark Rowe  <mrowe@apple.com>
960
961         Reviewed by Tim Hatcher.
962
963         <rdar://problem/5835604> Deprecate HIWebView
964
965         Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView.
966
967         * Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately.
968         * Carbon/HIWebView.h: Ditto.
969
970 2008-05-12  Kevin Decker  <kdecker@apple.com>
971
972         Reviewed by Anders.
973
974         Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
975         
976         Re-added these SPI methods because they are needed by some clients. They were accidentally removed
977         in changeset <http://trac.webkit.org/changeset/31028>
978         
979         * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
980         * WebView/WebFrame.mm:
981         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
982         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
983         * WebView/WebFrameInternal.h: Ditto.
984         * WebView/WebHTMLView.mm: Ditto.
985         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
986         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
987         * WebView/WebHTMLViewInternal.h: Ditto.
988         * WebView/WebHTMLViewPrivate.h: Ditto.
989
990 2008-05-12  Anders Carlsson  <andersca@apple.com>
991
992         Reviewed by Alexey.
993
994         Empty the application cache when changing the cache model.
995         
996         * WebView/WebView.mm:
997         (+[WebView _setCacheModel:]):
998
999 2008-05-12  Anders Carlsson  <andersca@apple.com>
1000
1001         Reviewed by Oliver.
1002
1003         <rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins
1004         
1005         * Plugins/WebBaseNetscapePluginView.h:
1006         * Plugins/WebBaseNetscapePluginView.mm:
1007         (-[WebBaseNetscapePluginView start]):
1008         Get the plug-in text input vtable pointer.
1009         
1010         (-[WebBaseNetscapePluginView stop]):
1011         Set the plug-in text input vtable pointer to 0.
1012         
1013         (-[WebBaseNetscapePluginView inputContext]):
1014         Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them.
1015         
1016         (-[WebBaseNetscapePluginView hasMarkedText]):        
1017         (-[WebBaseNetscapePluginView insertText:]):
1018         (-[WebBaseNetscapePluginView markedRange]):
1019         (-[WebBaseNetscapePluginView selectedRange]):
1020         (-[WebBaseNetscapePluginView setMarkedText:selectedRange:]):
1021         (-[WebBaseNetscapePluginView unmarkText]):
1022         (-[WebBaseNetscapePluginView validAttributesForMarkedText]):
1023         (-[WebBaseNetscapePluginView attributedSubstringFromRange:]):
1024         (-[WebBaseNetscapePluginView characterIndexForPoint:]):
1025         (-[WebBaseNetscapePluginView doCommandBySelector:]):
1026         (-[WebBaseNetscapePluginView firstRectForCharacterRange:]):
1027         (-[WebBaseNetscapePluginView conversationIdentifier]):
1028         Implement NSTextInput and call into the plug-in text input vtable.
1029         
1030         (browserTextInputFuncs):
1031         New method which returns the browser input vtable.
1032         
1033         (-[WebBaseNetscapePluginView getVariable:value:]):
1034         Support getting the browser input vtable pointer.
1035         
1036         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1037         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1038         (WebNetscapePluginEventHandlerCocoa::keyDown):
1039         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1040         If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent,
1041         it means that the event should be passed on to the input manager.
1042          
1043         * Plugins/npapi.mm:
1044         (NPN_MarkedTextAbandoned):
1045         (NPN_MarkedTextSelectionChanged):
1046         Add implementations of browser input method methods.
1047         
1048         * Plugins/nptextinput.h: Added.
1049         Add file with new text input API.
1050
1051 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
1052
1053         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
1054         SquirrelFish merging.
1055
1056         * Misc/WebCoreStatistics.mm:
1057         (+[WebCoreStatistics javaScriptObjectsCount]):
1058         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
1059         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
1060         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
1061         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
1062         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
1063         * WebView/WebScriptDebugDelegate.mm:
1064         (-[WebScriptCallFrame evaluateWebScript:]):
1065
1066 2008-05-07  Anders Carlsson  <andersca@apple.com>
1067
1068         Reviewed by Mitz.
1069
1070         REGRESSION (3.1.1-TOT): Arrow keys are sticky in Google Maps street view
1071         https://bugs.webkit.org/show_bug.cgi?id=18880
1072         <rdar://problem/5909513>
1073
1074         Stop suspending key up events before calling handleEvent.
1075         
1076         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1077         (WebNetscapePluginEventHandlerCarbon::sendEvent):
1078
1079 2008-05-06  Stephanie Lewis  <slewis@apple.com>
1080
1081         Reviewed by Andersca.
1082
1083         prepare for plugin fast teardown work - make WebPluginDatabase a objective C++ file.
1084
1085         * Plugins/WebPluginDatabase.m: Removed.
1086         * Plugins/WebPluginDatabase.mm: Copied from WebKit/mac/Plugins/WebPluginDatabase.m.
1087         * Plugins/npapi.m: Removed.
1088         * Plugins/npapi.mm: Copied from WebKit/mac/Plugins/npapi.m.
1089
1090 2008-05-06  Anders Carlsson  <andersca@apple.com>
1091
1092         Reviewed by Darin.
1093
1094         Initialize numArchs to 0.
1095         
1096         * Plugins/WebBasePluginPackage.m:
1097         (-[WebBasePluginPackage isNativeLibraryData:]):
1098
1099 2008-05-06  Anders Carlsson  <andersca@apple.com>
1100
1101         Reviewed by Darin.
1102
1103         Add implementation of NPN_PopUpContextMenu.
1104         
1105         * Plugins/WebBaseNetscapePluginView.mm:
1106         (-[WebBaseNetscapePluginView popUpContextMenu:]):
1107         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1108         * Plugins/WebNetscapePluginPackage.m:
1109         (-[WebNetscapePluginPackage load]):
1110         * Plugins/npapi.m:
1111         (NPN_PopUpContextMenu):
1112
1113 2008-05-06  Anders Carlsson  <andersca@apple.com>
1114
1115         Fix typo (don't read random memory).
1116         
1117         * Plugins/WebBasePluginPackage.m:
1118         (-[WebBasePluginPackage isNativeLibraryData:]):
1119
1120 2008-05-05  Anders Carlsson  <andersca@apple.com>
1121
1122         Reviewed by Darin.
1123
1124         Change the isNativeLibraryData: method to handle universal binaries.
1125         
1126         * Plugins/WebBasePluginPackage.m:
1127         (swapIntsInHeader):
1128         (-[WebBasePluginPackage isNativeLibraryData:]):
1129
1130 2008-05-06  Brady Eidson  <beidson@apple.com>
1131
1132         Reviewed by Darin Adler
1133
1134         Preparation for upcoming work making LocalStorage persistent.
1135
1136         When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
1137
1138         * WebView/WebView.mm:
1139         (+[WebView _applicationWillTerminate]):  Close all LocalStorage areas before quitting.
1140
1141 2008-05-05  Sam Weinig  <sam@webkit.org>
1142
1143         Reviewed by Darin Adler.
1144
1145         Fix for <rdar://problem/5884383>
1146         Escape look-a-like characters from the the entire url.
1147
1148         * Misc/WebNSURLExtras.mm:
1149         (escapeUnsafeCharacters):
1150         (-[NSURL _web_userVisibleString]):
1151
1152 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
1153
1154         Reviewed by Darin.
1155         
1156         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
1157
1158         * WebView/WebView.mm:
1159         (-[WebView _updateSettingsFromPreferences:]): Disable Range mutation on changes to
1160         the document for Tiger and Leopard Mail.  There is code in Mail that does it, and
1161         the two interfere.
1162
1163 2008-05-05  Sam Weinig  <sam@webkit.org>
1164
1165         Reviewed by Tim Hatcher.
1166
1167         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
1168
1169         * WebCoreSupport/WebInspectorClient.mm:
1170         (WebInspectorClient::localizedStringsURL):
1171
1172 2008-05-05  Anders Carlsson  <andersca@apple.com>
1173
1174         Reviewed by Jess.
1175
1176         Apparently preflighting can cause hangs for some reason. Revert this for now.
1177         
1178         * Plugins/WebNetscapePluginPackage.m:
1179         (-[WebNetscapePluginPackage _initWithPath:]):
1180         * Plugins/WebPluginPackage.m:
1181         (-[WebPluginPackage initWithPath:]):
1182
1183 2008-05-05  Darin Adler  <darin@apple.com>
1184
1185         Reviewed by Mitz.
1186
1187         - https://bugs.webkit.org/show_bug.cgi?id=18789
1188           fix some shouldCloseWithWindow edge cases
1189
1190         * WebView/WebView.mm:
1191         (-[WebView viewWillMoveToWindow:]): Fix bug where we would stop observing the
1192         NSWindowWillCloseNotification if the view was moved out of the window but still
1193         had that window set as the host window. Also make sure this function doesn't do
1194         anything if the WebView is already closed.
1195         (-[WebView setHostWindow:]): Ditto.
1196
1197 2008-05-04  David Kilzer  <ddkilzer@apple.com>
1198
1199         Make parameters match for WebChromeClient::addMessageToConsole()
1200
1201         Reviewed by John.
1202
1203         * WebCoreSupport/WebChromeClient.h:
1204         (WebChromeClient::addMessageToConsole): Renamed sourceID parameter
1205         to sourceURL to match implementation in WebChromeClient.mm.
1206
1207 2008-05-02  Anders Carlsson  <andersca@apple.com>
1208
1209         Reviewed by Mark.
1210
1211         Various Cocoa event model and 64-bit plug-in fixes.
1212         
1213         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1214         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1215         Set click count.
1216         
1217         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1218         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1219         Don't try to get the mouse location for keyboard events.
1220         
1221         * Plugins/WebPluginPackage.m:
1222         (-[WebPluginPackage initWithPath:]):
1223         Preflight the bundle so we won't show 32-bit WebKit plug-ins when running as 64-bit.
1224
1225 2008-05-02  Anders Carlsson  <andersca@apple.com>
1226
1227         Reviewed by Sam.
1228
1229         The event union is now named.
1230         
1231         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1232         (WebNetscapePluginEventHandlerCocoa::drawRect):
1233         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1234         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1235         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1236         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
1237         (WebNetscapePluginEventHandlerCocoa::focusChanged):
1238
1239 2008-05-02  Anders Carlsson  <andersca@apple.com>
1240
1241         Reviewed by Mark.
1242
1243         Make sure that 32-bit only plug-ins aren't shown when running as 64-bit.
1244         
1245         Call preflightAndReturnError on the bundle, which will check if any of the architectures
1246         in the bundle match the current architecture.
1247         
1248         * Plugins/WebNetscapePluginPackage.m:
1249         (-[WebNetscapePluginPackage _initWithPath:]):
1250
1251 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
1252
1253         Reviewed by Geoffrey Garen.
1254
1255         https://bugs.webkit.org/show_bug.cgi?id=18826
1256         Make JavaScript heap per-thread
1257
1258         * Misc/WebCoreStatistics.mm:
1259         (+[WebCoreStatistics javaScriptObjectsCount]):
1260         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
1261         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
1262         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
1263         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
1264         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
1265         Replaced static Collector calls with calls to a current thread's instance.
1266
1267         * WebView/WebScriptDebugDelegate.mm:
1268         (-[WebScriptCallFrame evaluateWebScript:]):
1269         Pass ExecState to jsString().
1270
1271 2008-05-01  Anders Carlsson  <andersca@apple.com>
1272
1273         Reviewed by Mark.
1274
1275         64-bit NPAPI plugin build fixes.
1276         
1277         * Plugins/WebBaseNetscapePluginView.mm:
1278         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1279         (-[WebBaseNetscapePluginView updateAndSetWindow]):
1280         (-[WebBaseNetscapePluginView start]):
1281         (-[WebBaseNetscapePluginView windowBecameKey:]):
1282         * Plugins/WebNetscapeDeprecatedFunctions.c:
1283         * Plugins/WebNetscapeDeprecatedFunctions.h:
1284         * Plugins/WebNetscapePluginEventHandler.mm:
1285         (WebNetscapePluginEventHandler::create):
1286         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1287         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1288         * Plugins/WebPluginDatabase.m:
1289         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
1290
1291 2008-05-01  Anders Carlsson  <andersca@apple.com>
1292
1293         Reviewed by Tim.
1294
1295         Remove duplicate npfunctions.h header from WebKit.
1296
1297         * MigrateHeaders.make:
1298         Migrate npfunctions.h
1299         
1300         * Plugins/npfunctions.h: Removed.
1301
1302 2008-05-01  Anders Carlsson  <andersca@apple.com>
1303
1304         Reviewed by John.
1305         
1306         Add null checks for the event handler.
1307         
1308         * Plugins/WebBaseNetscapePluginView.mm:
1309         (-[WebBaseNetscapePluginView stopTimers]):
1310         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1311
1312 2008-05-01  Anders Carlsson  <andersca@apple.com>
1313
1314         Fix 64-bit build.
1315         
1316         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1317         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1318         * WebCoreSupport/WebFrameLoaderClient.mm:
1319
1320 2008-05-01  Anders Carlsson  <andersca@apple.com>
1321
1322         Fix build.
1323         
1324         * Plugins/npfunctions.h:
1325
1326 2008-05-01  Anders Carlsson  <andersca@apple.com>
1327
1328         Reviewed by Adam.
1329
1330         Forward mouse move events to the Netscape plug-in view.
1331         
1332         * Plugins/WebBaseNetscapePluginView.h:
1333         * Plugins/WebBaseNetscapePluginView.mm:
1334         (-[WebBaseNetscapePluginView handleMouseMoved:]):
1335         New method that just calls the current event handler.
1336         
1337         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1338         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1339         NSFlagsChanged is not a regular keyboard event and some of the NSEvent accessors
1340         don't work on it so don't call them.
1341         
1342         * WebCoreSupport/WebFrameLoaderClient.mm:
1343         (NetscapePluginWidget::NetscapePluginWidget):
1344         New Widget subclass to be used for Netscape plug-ins.
1345         
1346         (NetscapePluginWidget::handleEvent):
1347         Forward NSMouseMoved events to the plug-in.
1348         
1349         (WebFrameLoaderClient::createPlugin):
1350         Wrap the plug-in view in a NetscapePluginWidget.
1351
1352 2008-05-01  Alp Toker  <alp@nuanti.com>
1353
1354         Rubber-stamped by Anders.
1355
1356         GTK+ build fix for changes in r32752. Use int32, not int32_t types in
1357         npapi.h.
1358
1359         Additional fix to use same signedness in npapi.h and Mac for the
1360         interval parameter.
1361
1362         * Plugins/WebBaseNetscapePluginView.h:
1363         * Plugins/WebBaseNetscapePluginView.mm:
1364         (PluginTimer::PluginTimer):
1365         (-[WebBaseNetscapePluginView stopTimers]):
1366         (-[WebBaseNetscapePluginView restartTimers]):
1367         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
1368         (-[WebBaseNetscapePluginView unscheduleTimer:]):
1369         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1370         * Plugins/npapi.m:
1371         (NPN_ScheduleTimer):
1372         (NPN_UnscheduleTimer):
1373         * Plugins/npfunctions.h:
1374
1375 2008-04-30  Anders Carlsson  <andersca@apple.com>
1376
1377         Reviewed by Adam.
1378
1379         Add new Cocoa event model and the NPN_ScheduleTimer/NPN_UnscheduleTimer methods.
1380         
1381         * Plugins/WebBaseNetscapePluginView.h:
1382         * Plugins/WebBaseNetscapePluginView.mm:
1383         (PluginTimer::PluginTimer):
1384         (PluginTimer::start):
1385         (PluginTimer::fired):
1386         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1387         (-[WebBaseNetscapePluginView stopTimers]):
1388         (-[WebBaseNetscapePluginView restartTimers]):
1389         (-[WebBaseNetscapePluginView scrollWheel:]):
1390         (-[WebBaseNetscapePluginView flagsChanged:]):
1391         (-[WebBaseNetscapePluginView start]):
1392         (-[WebBaseNetscapePluginView eventModel]):
1393         (-[WebBaseNetscapePluginView fini]):
1394         (-[WebBaseNetscapePluginView getVariable:value:]):
1395         (-[WebBaseNetscapePluginView setVariable:value:]):
1396         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
1397         (-[WebBaseNetscapePluginView unscheduleTimer:]):
1398         * Plugins/WebBaseNetscapePluginViewInternal.h:
1399         * Plugins/WebBaseNetscapePluginViewPrivate.h:
1400         * Plugins/WebNetscapePluginEventHandler.h:
1401         * Plugins/WebNetscapePluginEventHandler.mm:
1402         (WebNetscapePluginEventHandler::create):
1403         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1404         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1405         (WebNetscapePluginEventHandlerCarbon::scrollWheel):
1406         (WebNetscapePluginEventHandlerCarbon::flagsChanged):
1407         (WebNetscapePluginEventHandlerCarbon::platformWindow):
1408         * Plugins/WebNetscapePluginEventHandlerCocoa.h: Added.
1409         (WebNetscapePluginEventHandlerCocoa::startTimers):
1410         (WebNetscapePluginEventHandlerCocoa::stopTimers):
1411         * Plugins/WebNetscapePluginEventHandlerCocoa.mm: Added.
1412         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
1413         (WebNetscapePluginEventHandlerCocoa::drawRect):
1414         (WebNetscapePluginEventHandlerCocoa::mouseDown):
1415         (WebNetscapePluginEventHandlerCocoa::mouseDragged):
1416         (WebNetscapePluginEventHandlerCocoa::mouseEntered):
1417         (WebNetscapePluginEventHandlerCocoa::mouseExited):
1418         (WebNetscapePluginEventHandlerCocoa::mouseMoved):
1419         (WebNetscapePluginEventHandlerCocoa::mouseUp):
1420         (WebNetscapePluginEventHandlerCocoa::scrollWheel):
1421         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
1422         (WebNetscapePluginEventHandlerCocoa::keyDown):
1423         (WebNetscapePluginEventHandlerCocoa::keyUp):
1424         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
1425         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
1426         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
1427         (WebNetscapePluginEventHandlerCocoa::focusChanged):
1428         (WebNetscapePluginEventHandlerCocoa::platformWindow):
1429         (WebNetscapePluginEventHandlerCocoa::sendEvent):
1430         * Plugins/WebNetscapePluginPackage.m:
1431         (-[WebNetscapePluginPackage load]):
1432         * Plugins/npapi.m:
1433         (NPN_ScheduleTimer):
1434         (NPN_UnscheduleTimer):
1435         * Plugins/npfunctions.h:
1436
1437 2008-04-30  Brady Eidson  <beidson@apple.com>
1438
1439         Fix my WebPreferences revert check-in
1440
1441         * WebView/WebView.mm:
1442         (-[WebView _preferencesChangedNotification:]):
1443
1444 2008-04-30  Brady Eidson  <beidson@apple.com>
1445
1446         Rubberstamped by John Sullivan
1447
1448         Revert the remainder of my original preferences changes from last week.
1449         They caused a massive PLT regression (too many notifications being sent out
1450         or listened to that weren't previously) and it's not in my schedule to refine
1451         the preferences code instead of working on my feature!
1452
1453         * WebView/WebView.mm:
1454         (-[WebView _updateSettingsFromPreferences:]):
1455         (-[WebView _commonInitializationWithFrameName:groupName:]):
1456
1457 2008-04-30  Anders Carlsson  <andersca@apple.com>
1458
1459         Fix the 64-bit build.
1460         
1461         * Plugins/WebNetscapePluginEventHandler.h:
1462         * Plugins/WebNetscapePluginEventHandler.mm:
1463         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1464         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1465
1466 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
1467
1468         BUILD FIX for Release build.
1469
1470         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1471         (WebNetscapePluginEventHandlerCarbon::drawRect): Declare acceptedEvent
1472         separately so the compiler doesn't complain about an unused variable.
1473         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): Ditto.
1474
1475 2008-04-29  Anders Carlsson  <andersca@apple.com>
1476
1477         Reviewed by Adam.
1478
1479         Refactor the Carbon event handling code out into a separate class in preparation for adding
1480         the Cocoa event handling code.
1481         
1482         * Plugins/WebBaseNetscapePluginView.h:
1483         * Plugins/WebBaseNetscapePluginView.mm:
1484         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
1485         (-[WebBaseNetscapePluginView sendActivateEvent:]):
1486         (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
1487         (-[WebBaseNetscapePluginView stopTimers]):
1488         (-[WebBaseNetscapePluginView restartTimers]):
1489         (-[WebBaseNetscapePluginView setHasFocus:]):
1490         (-[WebBaseNetscapePluginView mouseDown:]):
1491         (-[WebBaseNetscapePluginView mouseUp:]):
1492         (-[WebBaseNetscapePluginView mouseEntered:]):
1493         (-[WebBaseNetscapePluginView mouseExited:]):
1494         (-[WebBaseNetscapePluginView mouseDragged:]):
1495         (-[WebBaseNetscapePluginView keyUp:]):
1496         (-[WebBaseNetscapePluginView keyDown:]):
1497         (-[WebBaseNetscapePluginView cut:]):
1498         (-[WebBaseNetscapePluginView copy:]):
1499         (-[WebBaseNetscapePluginView paste:]):
1500         (-[WebBaseNetscapePluginView selectAll:]):
1501         (-[WebBaseNetscapePluginView start]):
1502         (-[WebBaseNetscapePluginView stop]):
1503         (-[WebBaseNetscapePluginView fini]):
1504         (-[WebBaseNetscapePluginView drawRect:]):
1505         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
1506         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
1507         (-[WebBaseNetscapePluginView windowBecameKey:]):
1508         (-[WebBaseNetscapePluginView windowResignedKey:]):
1509         (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
1510         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
1511         (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
1512         (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
1513         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1514         (-[WebBaseNetscapePluginView _viewHasMoved]):
1515         * Plugins/WebBaseNetscapePluginViewInternal.h:
1516         * Plugins/WebNetscapePluginEmbeddedView.h:
1517         * Plugins/WebNetscapePluginEventHandler.h: Added.
1518         (WebNetscapePluginEventHandler::~WebNetscapePluginEventHandler):
1519         (WebNetscapePluginEventHandler::currentEventIsUserGesture):
1520         (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
1521         * Plugins/WebNetscapePluginEventHandler.mm: Added.
1522         (WebNetscapePluginEventHandler::create):
1523         * Plugins/WebNetscapePluginEventHandlerCarbon.h: Added.
1524         * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Added.
1525         (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
1526         (getCarbonEvent):
1527         (modifiersForEvent):
1528         (WebNetscapePluginEventHandlerCarbon::sendNullEvent):
1529         (WebNetscapePluginEventHandlerCarbon::drawRect):
1530         (WebNetscapePluginEventHandlerCarbon::mouseDown):
1531         (WebNetscapePluginEventHandlerCarbon::mouseUp):
1532         (WebNetscapePluginEventHandlerCarbon::mouseEntered):
1533         (WebNetscapePluginEventHandlerCarbon::mouseExited):
1534         (WebNetscapePluginEventHandlerCarbon::mouseDragged):
1535         (WebNetscapePluginEventHandlerCarbon::mouseMoved):
1536         (WebNetscapePluginEventHandlerCarbon::keyDown):
1537         (keyMessageForEvent):
1538         (WebNetscapePluginEventHandlerCarbon::keyUp):
1539         (WebNetscapePluginEventHandlerCarbon::focusChanged):
1540         (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
1541         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler):
1542         (WebNetscapePluginEventHandlerCarbon::installKeyEventHandler):
1543         (WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler):
1544         (WebNetscapePluginEventHandlerCarbon::nullEventTimerFired):
1545         (WebNetscapePluginEventHandlerCarbon::startTimers):
1546         (WebNetscapePluginEventHandlerCarbon::stopTimers):
1547         (WebNetscapePluginEventHandlerCarbon::sendEvent):
1548
1549 2008-04-29  Mark Rowe  <mrowe@apple.com>
1550
1551         Reviewed by David Harrison.
1552
1553         Ensure that WebDynamicScrollBarsView defines WebCoreScrollbarAlwaysOn to keep Mail building.
1554
1555         * WebKit.exp:
1556         * WebView/WebDynamicScrollBarsView.h:
1557         * WebView/WebDynamicScrollBarsView.m:
1558
1559 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
1560
1561         Reviewed by Darin.
1562
1563         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
1564
1565         * WebCoreSupport/WebChromeClient.h:
1566         * WebCoreSupport/WebChromeClient.mm:
1567         * WebView/WebClipView.m:
1568         (-[WebClipView scrollWheel:]):
1569         * WebView/WebHTMLView.mm:
1570         (-[WebHTMLView addMouseMovedObserver]):
1571         (-[WebHTMLView removeMouseMovedObserver]):
1572         (-[WebHTMLView acceptsFirstMouse:]):
1573         * WebView/WebUIDelegatePrivate.h:
1574         * WebView/WebView.mm:
1575         (-[WebViewPrivate init]):
1576         * WebView/WebViewPrivate.h:
1577
1578 2008-04-28  Rob Buis  <buis@kde.org>
1579
1580         Reviewed by Maciej.
1581
1582         Build fix for Tiger.
1583
1584         * WebView/WebView.mm:
1585         (WebKitInitializeApplicationCachePathIfNecessary):
1586
1587 2008-04-28  Adele Peterson  <adele@apple.com>
1588
1589         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
1590
1591         WebKit part of fix for <rdar://problem/3709505>
1592         Safari should have a way to upload bundles from the file upload control (as zip)
1593
1594         Added UIDelegate methods to let the application handle generating replacement files for uploads.
1595         In this case, Safari will create archived files for bundles so they can be uploaded properly.
1596
1597         * DefaultDelegates/WebDefaultUIDelegate.m:
1598         (-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]):
1599         (-[WebDefaultUIDelegate webView:generateReplacementFile:]):
1600         * WebCoreSupport/WebChromeClient.h:
1601         * WebCoreSupport/WebChromeClient.mm:
1602         (WebChromeClient::shouldReplaceWithGeneratedFileForUpload):
1603         (WebChromeClient::generateReplacementFile):
1604         * WebView/WebUIDelegatePrivate.h:
1605
1606 2008-04-28  Anders Carlsson  <andersca@apple.com>
1607
1608         Reviewed by Sam, Mark, Adele and Darin.
1609
1610         Initialize the application cache path.
1611         
1612         * WebView/WebView.mm:
1613         (WebKitInitializeApplicationCachePathIfNecessary):
1614         (-[WebView _commonInitializationWithFrameName:groupName:]):
1615
1616 2008-04-28  Alice Liu  <alice.liu@apple.com>
1617
1618         Reviewed by Darin.
1619
1620         Fix <rdar://problem/4911289> Add tabindex property to all children 
1621         of HTMLElement (7138)
1622         http://bugs.webkit.org/show_bug.cgi?id=7138
1623
1624         * MigrateHeaders.make:
1625         Removing DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h
1626         because now that focus() has been moved to DOMHTMLElement.h, these
1627         files are no longer needed.
1628
1629 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
1630
1631         Reviewed by Darin.
1632
1633         Fix run-webkit-tests --threading
1634         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
1635         Proxy server issue in Sunday's Nightly
1636
1637         * WebView/WebView.mm: (-[WebViewPrivate init]): Initialize threading. Previously, this was
1638         only done from icon database code, which is not robust enough.
1639
1640 2008-04-20 Adam Barth <hk9565@gmail.com>
1641
1642         Reviewed by Adam Roben and Sam Weinig.
1643
1644         Updated WebSecurityOrigin to match new SecurityOrigin API.
1645
1646         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
1647
1648         * Storage/WebSecurityOrigin.mm:
1649         (-[WebSecurityOrigin host]):
1650         (-[WebSecurityOrigin domain]):
1651         * Storage/WebSecurityOriginPrivate.h:
1652
1653 2008-04-25  Mark Rowe  <mrowe@apple.com>
1654
1655         Rubber-stamped by Sam Weinig.
1656
1657         Add some content to an empty ICU header file to prevent verification errors.
1658
1659         * icu/unicode/utf_old.h:
1660
1661 2008-04-25  Anders Carlsson  <andersca@apple.com>
1662
1663         Reviewed by Sam.
1664
1665         Add offlineWebApplicationCacheEnabled preference.
1666         
1667         * WebView/WebPreferenceKeysPrivate.h:
1668         * WebView/WebPreferences.m:
1669         (+[WebPreferences initialize]):
1670         (-[WebPreferences offlineWebApplicationCacheEnabled]):
1671         (-[WebPreferences setOfflineWebApplicationCacheEnabled:]):
1672         * WebView/WebPreferencesPrivate.h:
1673         * WebView/WebView.mm:
1674         (-[WebView _updateSettingsFromPreferences:]):
1675
1676 2008-04-24  Mark Rowe  <mrowe@apple.com>
1677
1678         Reviewed by Sam Weinig.
1679
1680         Remove code for calculating the glyph cache size.
1681
1682         * WebCoreSupport/WebSystemInterface.m:
1683         (InitWebCoreSystemInterface): Remove unused symbol.
1684
1685 2008-04-24  Mark Rowe  <mrowe@apple.com>
1686
1687         Reviewed by Sam Weinig.
1688
1689         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
1690
1691         * WebKitPrefix.h:
1692
1693 2008-04-24  Brady Eidson  <beidson@apple.com>
1694
1695         Reviewed by Darin
1696
1697         Fix layout test regressions from my earlier preferences/settings tweak.
1698
1699         * WebView/WebView.mm:
1700         (-[WebView _commonInitializationWithFrameName:groupName:]): Even if we're not posting
1701           the notification to update the settings, each WebView still needs to register for the
1702           notification - restore that behavior.
1703
1704 2008-04-24  Dan Bernstein  <mitz@apple.com>
1705
1706         Reviewed by Darin Adler.
1707
1708         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
1709           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
1710
1711         * WebView/WebFrame.mm:
1712         (-[WebFrame _caretRectAtNode:offset:affinity:]): Changed to use
1713         VisiblePosition::caretRect() instead of the RenderObject method which
1714         was removed.
1715
1716 2008-04-24  Brady Eidson  <beidson@apple.com>
1717
1718         Reviewed by Darin
1719
1720         Rework the Settings population again.
1721
1722         * WebView/WebView.mm:
1723         (-[WebView _updateSettingsFromPreferences:]): This method is called both from _preferencesChangedNotification
1724           and directly from WebView's common init function.
1725         (-[WebView _preferencesChangedNotification:]):
1726         (-[WebView _commonInitializationWithFrameName:groupName:]): Call _updateSettingsFromPreferences immediately
1727           after creating the new Page
1728
1729 2008-04-24  Darin Adler  <darin@apple.com>
1730
1731         Reviewed by Geoff.
1732
1733         - fix crash in regression test where we'd ask a frame for a user agent string
1734           after the WebView was already closed
1735
1736         * WebCoreSupport/WebFrameLoaderClient.mm:
1737         (WebFrameLoaderClient::userAgent): Assert that the WebView is not nil. Also
1738         added some code to prevent the crash in release builds if this problem happens
1739         again.
1740
1741 2008-04-24  Anders Carlsson  <andersca@apple.com>
1742
1743         Reviewed by Sam.
1744
1745         Change some String arguments to be const references instead.
1746
1747         * WebCoreSupport/WebEditorClient.h:
1748         * WebCoreSupport/WebEditorClient.mm:
1749         (WebEditorClient::shouldInsertText):
1750
1751 2008-04-24  John Sullivan  <sullivan@apple.com>
1752
1753         Mac build fix
1754         
1755         * WebCoreSupport/WebViewFactory.mm:
1756         (-[WebViewFactory AXButtonActionVerb]):
1757         implement this method using the text in WebCoreLocalizedStrings.cpp
1758         (-[WebViewFactory AXRadioButtonActionVerb]):
1759         ditto
1760         (-[WebViewFactory AXTextFieldActionVerb]):
1761         ditto
1762         (-[WebViewFactory AXCheckedCheckBoxActionVerb]):
1763         ditto
1764         (-[WebViewFactory AXUncheckedCheckBoxActionVerb]):
1765         ditto
1766         (-[WebViewFactory AXLinkActionVerb]):
1767         ditto
1768
1769 2008-04-23  Brady Eidson  <beidson@apple.com>
1770
1771         Reviewed by Sam Weinig
1772
1773         In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings
1774         object before the Settings object is initialized.  It seems quite prudent to post the preferences changed notification,
1775         thereby populating the Settings object, immediately after the Page is created.
1776
1777         * WebView/WebView.mm:
1778         (-[WebView _commonInitializationWithFrameName:groupName:]): Post the notification right after the Page is created
1779
1780 2008-04-24  John Sullivan  <sullivan@apple.com>
1781
1782         Reviewed by Jess
1783         
1784         - fixed <rdar://problem/5886655> JavaScript input panel automatic resizing doesn't work right with HiDPI
1785
1786         * Misc/WebNSControlExtras.m:
1787         (-[NSControl sizeToFitAndAdjustWindowHeight]):
1788         deploy userSpaceScaleFactor when using view distances on the window
1789
1790 2008-04-22  Anders Carlsson  <andersca@apple.com>
1791
1792         Reviewed by Darin.
1793
1794         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
1795         
1796         * Plugins/npfunctions.h:
1797
1798 2008-04-20  Matt Lilek  <webkit@mattlilek.com>
1799
1800         Mysteriously reviewed by mitz|away.
1801
1802         Bug 18111: Closing a tab while dragging crashes Safari
1803         https://bugs.webkit.org/show_bug.cgi?id=18111
1804
1805         Null check the page before handling drag events.
1806
1807         * WebView/WebView.mm:
1808         (-[WebView draggingUpdated:]):
1809         (-[WebView draggingExited:]):
1810
1811 2008-04-19  Brady Eidson  <beidson@apple.com>
1812
1813         Reviewed by Tim Hatcher
1814
1815         Add a WebPreference for the path of the local storage persistent store.
1816
1817         * WebView/WebPreferenceKeysPrivate.h:
1818
1819         * WebView/WebPreferences.m:
1820         (-[WebPreferences _localStorageDatabasePath]):
1821         (-[WebPreferences _setLocalStorageDatabasePath:]):
1822         * WebView/WebPreferencesPrivate.h:
1823
1824         * WebView/WebView.mm:
1825         (-[WebView _preferencesChangedNotification:]):
1826
1827 2008-04-18  Brady Eidson  <beidson@apple.com>
1828
1829         Reviewed by Sam Weinig
1830
1831         Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this.
1832         No reason to do the work twice...
1833
1834         * WebView/WebView.mm:
1835         (-[WebView _close]):
1836
1837 2008-04-17  Eric Seidel  <eric@webkit.org>
1838
1839         Reviewed by beth.
1840
1841         Rename Frame::renderer() to contentRenderer() and fix uses.
1842
1843         * Misc/WebCoreStatistics.mm:
1844         * WebView/WebRenderNode.mm:
1845         (-[WebRenderNode initWithWebFrameView:]):
1846
1847 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
1848
1849         Reviewed by mrowe.
1850
1851         * WebView/WebFrame.mm: Remove temporary build fix.
1852
1853 2008-04-17  Mark Rowe  <mrowe@apple.com>
1854
1855         Reviewed by Dan Bernstein.
1856
1857         Fix <rdar://problem/5863552> REGRESSION (r30741): Attachments don't appear in the iChat message window after sending
1858
1859         The order of arguments to -[NSDictionary initWithObjects:andKeys:] had been transposed accidentally during refactoring.
1860
1861         * WebCoreSupport/WebFrameLoaderClient.mm:
1862         (WebFrameLoaderClient::createPlugin): Pass the arguments in the correct order.
1863
1864 2008-04-17  Mark Rowe  <mrowe@apple.com>
1865
1866         Rubber-stamped by Dan Bernstein.
1867
1868         Fix the Mac build.
1869
1870         * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
1871         for now.  This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place
1872         for this to live going forward.
1873
1874 2008-04-15  Kevin Decker  <kdecker@apple.com>
1875
1876         Reviewed by Anders.
1877
1878         <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
1879         
1880         In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
1881         preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
1882         a bundle out from underneath itself.
1883
1884         * Plugins/WebBasePluginPackage.h: Added unload method.
1885         * Plugins/WebBasePluginPackage.m:
1886         (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
1887         (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
1888         * Plugins/WebNetscapePluginPackage.m:
1889         (-[WebNetscapePluginPackage unload]): Added.
1890
1891 2008-04-15  Anders Carlsson  <andersca@apple.com>
1892
1893         Reviewed by Adam.
1894
1895         Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
1896
1897         * Configurations/WebKit.xcconfig:
1898
1899 2008-04-15  Brady Eidson  <beidson@apple.com>
1900
1901         Reviewed by John Sullivan
1902
1903         Do a more complete job adding the "WebArchiveDebugMode" pref
1904
1905         * WebView/WebPreferences.m: Add both getter *and* setter
1906         (-[WebPreferences webArchiveDebugModeEnabled]):
1907         (-[WebPreferences setWebArchiveDebugModeEnabled:]):
1908         * WebView/WebPreferencesPrivate.h:
1909
1910         * WebView/WebView.mm:
1911         (-[WebView _preferencesChangedNotification:]): Call the renamed getter
1912
1913 2008-04-14  Brady Eidson  <beidson@apple.com>
1914
1915         Reviewed by Anders
1916
1917         Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
1918         if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the 
1919         network and will instead fail the load as "cancelled."
1920
1921         * WebView/WebPreferenceKeysPrivate.h:
1922
1923         * WebView/WebPreferences.m:
1924         (+[WebPreferences initialize]):
1925         (-[WebPreferences _webArchiveDebugModeEnabled]):
1926         * WebView/WebPreferencesPrivate.h:
1927
1928         * WebView/WebView.mm:
1929         (-[WebView _preferencesChangedNotification:]):
1930
1931 2008-04-11  David Hyatt  <hyatt@apple.com>
1932
1933         Rename CachedResource ref/deref methods to addClient/removeClient.
1934
1935         Reviewed by olliej
1936
1937         * WebView/WebHTMLView.mm:
1938         (-[WebHTMLViewPrivate dealloc]):
1939         (-[WebHTMLViewPrivate finalize]):
1940         (-[WebHTMLViewPrivate clear]):
1941         (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
1942
1943 2008-04-07  Brady Eidson  <beidson@apple.com>
1944
1945         Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project
1946
1947         * Configurations/WebKit.xcconfig:
1948
1949 2008-04-04  Adam Roben  <aroben@apple.com>
1950
1951         Use WebCore's ICU headers instead of our own copy
1952
1953         Rubberstamped by Tim Hatcher.
1954
1955         * Configurations/WebKit.xcconfig: Pick up ICU headers from WebCore's
1956         PrivateHeaders.
1957
1958 2008-04-04  Adam Roben  <aroben@apple.com>
1959
1960         Fix <rdar://problem/5804776> Would like to use WebCore's
1961         ForwardingHeaders in WebKit without manually creating copies
1962
1963         Patch by Tim Hatcher, typed by me.
1964
1965         * Configurations/WebKit.xcconfig: Use the copy of ForwardingHeaders in
1966         WebCore's PrivateHeaders instead of our own copy.
1967
1968 2008-04-04  Ada Chan  <adachan@apple.com>
1969
1970         Now we pass width and height directly as integers to format
1971         the window title for a standalone image.
1972
1973         Reviewed by Dan.
1974
1975         * WebCoreSupport/WebViewFactory.mm:
1976         (-[WebViewFactory imageTitleForFilename:width:height:]):
1977
1978 2008-04-03  Nicholas Shanks  <webkit@nickshanks.com>
1979
1980         Updated by Dan Bernstein. Reviewed by Dave Hyatt.
1981
1982         - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
1983           font-weight does not properly support graded weights
1984
1985         * WebView/WebHTMLView.mm:
1986         (-[WebHTMLView _styleFromFontAttributes:]):
1987         (-[WebHTMLView _originalFontB]):
1988         (-[WebHTMLView _addToStyle:fontA:fontB:]):
1989
1990 2008-04-02  Mark Rowe  <mrowe@apple.com>
1991
1992         Reviewed by Oliver Hunt.
1993
1994         Ensure that debug symbols are generated for x86_64 and ppc64 builds.
1995
1996         * Configurations/Base.xcconfig:
1997
1998 2008-03-31  Alice Liu  <alice.liu@apple.com>
1999
2000         Reviewed by Darin.
2001
2002         * WebView/WebFrame.mm:
2003         (-[WebFrame _accessibilityTree]):
2004         The syntax for fetching an object from the AXObjectCache changed slightly
2005
2006 2008-03-31  Brady Eidson  <beidson@apple.com>
2007
2008         Reviewed by Jon Honeycutt
2009         
2010         Move a WebArchive loading check into WebCore
2011
2012         * WebView/WebHTMLRepresentation.mm:
2013         (-[WebHTMLRepresentation receivedData:withDataSource:]): Don't check "isDisplayingWebArchive" as WebCore is now
2014           responsible for checking that state
2015
2016 2008-03-31  Brady Eidson  <beidson@apple.com>
2017
2018         Reviewed by Darin and Mitz's rubber stamp
2019
2020         Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore
2021
2022         * WebCoreSupport/WebEditorClient.mm:
2023         * WebCoreSupport/WebEditorClient.h:
2024
2025 2008-03-28  Brady Eidson  <beidson@apple.com>
2026
2027         Rubberstamped by Darin Adler
2028
2029         Remove WebArchiver.h/mm
2030
2031         * WebView/WebArchiver.h: Removed.
2032         * WebView/WebArchiver.mm: Removed.
2033
2034         * DOM/WebDOMOperations.mm:
2035         * WebCoreSupport/WebDragClient.mm:
2036         * WebCoreSupport/WebEditorClient.mm:
2037         * WebView/WebDataSource.mm:
2038         * WebView/WebHTMLView.mm:
2039
2040 2008-03-28  Brady Eidson  <beidson@apple.com>
2041
2042         Reviewed by Darin Adler
2043
2044         Now that WebCore can create archives from a frame selection directly, we don't need it in WebArchiver anymore
2045
2046         * WebCoreSupport/WebEditorClient.mm:
2047         (WebEditorClient::dataForArchivedSelection):
2048
2049         * WebView/WebArchiver.h: Nuke archiveSelectionInFrame, as there are no remaining users
2050         * WebView/WebArchiver.mm: Ditto
2051
2052         * WebView/WebHTMLView.mm:
2053         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
2054
2055 2008-03-28  Brady Eidson  <beidson@apple.com>
2056
2057         Reviewed by Darin Adler
2058
2059         More Kit->Core WebArchive changes.
2060
2061         Create an archive from the current selection in a frame
2062
2063         * WebView/WebArchiver.mm: Remove one more *undeclared* method, the last method will drop off
2064           easily in a followup
2065
2066 2008-03-28  Brady Eidson  <beidson@apple.com>
2067
2068         Reviewed by Sam Weinig
2069
2070         WebArchive saga continues - Can now make archives from ranges in WebCore
2071
2072         * DOM/WebDOMOperations.mm:
2073         (-[DOMRange webArchive]):
2074         (-[DOMRange markupString]):
2075
2076         * WebView/WebArchiver.h: Remove newly obsolete [WebArchiver archiveRange:]
2077         * WebView/WebArchiver.mm:
2078
2079 2008-03-28  Brady Eidson  <beidson@apple.com>
2080
2081         Reviewed by Sam Weinig
2082
2083         More Kit->Core webarchive code movement
2084
2085         * DOM/WebDOMOperations.mm:
2086         (-[DOMNode markupString]): Call createFullMarkup() instead
2087
2088         * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
2089         * WebView/WebFrameInternal.h: Ditto
2090
2091 2008-03-28  Brady Eidson  <beidson@apple.com>
2092
2093         Reviewed by Sam Weinig
2094
2095         Fold [WebArchiver archiveFrame:] into WebDataSource - the last remaining caller
2096
2097         * WebView/WebArchiver.h:
2098         * WebView/WebArchiver.mm:
2099         * WebView/WebDataSource.mm:
2100         (-[WebDataSource webArchive]):
2101
2102 2008-03-28  Brady Eidson  <beidson@apple.com>
2103
2104         Reviewed by Sam Weinig
2105
2106         Remove unused [WebArchiver archiveNode:], made obsolete in r31400
2107
2108         * WebView/WebArchiver.h:
2109         * WebView/WebArchiver.mm:
2110
2111 2008-03-28  Brady Eidson  <beidson@apple.com>
2112
2113         Reviewed by Darin
2114
2115         "Yet another transitional step" to empty out WebKit-based code for archiving.
2116
2117         With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
2118         entirely within WebCore, and opens the door to saving WebArchives on Windows.
2119
2120         * DOM/WebDOMOperations.mm:
2121         * WebView/WebArchiver.mm:
2122         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
2123
2124 2008-03-27  Brady Eidson  <beidson@apple.com>
2125
2126         Reviewed by Adam Roben
2127
2128         Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
2129         as the push to core-ify WebArchives continues.
2130
2131         This patch also introduces a behavior change.  WebCore allows ArchiveResources with null or empty data.  
2132         WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.  
2133         Since WebResource is API, I decided to leave it be to avoid a behavior change.  But internally created resources 
2134         (as in "while archiving a page") are accepting of null or empty data.
2135
2136         This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. 
2137
2138         * WebView/WebDataSource.mm:
2139         (-[WebDataSource mainResource]): Call DocumentLoader implementation
2140         (-[WebDataSource subresources]): Ditto
2141         * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete
2142         * WebView/WebFrameInternal.h:
2143
2144 2008-03-27  Brady Eidson  <beidson@apple.com>
2145
2146         Reviewed by Adam
2147
2148         Change the "init from WebCore resource" version of WebResource to take PassRefPtr
2149         (more efficient)
2150
2151         * WebView/WebResource.mm:
2152         (-[WebResource _initWithCoreResource:]):
2153         * WebView/WebResourceInternal.h:
2154
2155 2008-03-26  Brady Eidson  <beidson@apple.com>
2156
2157         Build fix - accidentally checked in this change which was work in progress
2158
2159         * DOM/WebDOMOperations.mm:
2160
2161 2008-03-26  Brady Eidson  <beidson@apple.com>
2162
2163         Reviewed by Darin
2164
2165         When we create a WebArchive, we walk every node from some starting point, asking each node
2166         along the way "What are your subresource URLs?"
2167
2168         That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
2169         WebCore::Node
2170
2171         * DOM/WebDOMOperations.mm:
2172         (-[DOMNode _subresourceURLs]): One generic DOMNode method can now handle all DOMNodes by
2173           calling into individual WebCore::Node implementations
2174         * DOM/WebDOMOperationsPrivate.h:
2175
2176 2008-03-26  Brady Eidson  <beidson@apple.com>
2177
2178         Reviewed by Mark Rowe
2179
2180         Part of the continued push to move WebArchive-related code down to WebCore, this
2181         moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
2182
2183         * WebView/WebDataSource.mm:
2184         (-[WebDataSource subresourceForURL:]): Call through to the DocumentLoader 
2185
2186         * WebView/WebFrame.mm: Remove [WebFrame _getData:andResponse:forURL:], as its only use
2187           has now been ported down to WebCore
2188         * WebView/WebFrameInternal.h:
2189
2190 2008-03-26  Mark Rowe  <mrowe@apple.com>
2191
2192         Rubber-stamped by Brady Eidson.
2193
2194         Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
2195
2196         * Configurations/WebKit.xcconfig:
2197
2198 2008-03-26  Mark Rowe  <mrowe@apple.com>
2199
2200         Reviewed by David Hyatt.
2201
2202         Make the Ahem font antialias correctly on Acid3 on Tiger.
2203
2204         * WebCoreSupport/WebSystemInterface.m:
2205         (InitWebCoreSystemInterface):
2206
2207 2008-03-26  Mark Rowe  <mrowe@apple.com>
2208
2209         Fix the Mac build.
2210
2211         * MigrateHeaders.make: Copy the newly generated header into the right place.
2212
2213 2008-03-25  Brady Eidson  <beidson@apple.com>
2214
2215         Reviewed by Beth Dakin
2216
2217         Remove entirely unused internal method
2218
2219         * WebView/WebArchiver.h:
2220         * WebView/WebArchiver.mm:
2221
2222 2008-03-25  Brady Eidson  <beidson@apple.com>
2223
2224         Reviewed by Adam Roben
2225
2226         <rdar://problem/5819308> - View Source is empty when view webarchives
2227
2228         * WebCore.base.exp:
2229         * loader/DocumentLoader.cpp:
2230         (WebCore::DocumentLoader::setParsedArchiveData):
2231         (WebCore::DocumentLoader::parsedArchiveData):
2232         * loader/DocumentLoader.h:
2233
2234         * loader/FrameLoader.cpp:
2235         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
2236           in the DocumentLoader
2237
2238 2008-03-25  Dan Bernstein  <mitz@apple.com>
2239
2240         Reviewed by Darin Adler.
2241
2242         - fix http://bugs.webkit.org/show_bug.cgi?id=17933
2243           Reopen All Windows From Last Session causes crash
2244
2245         * WebView/WebHTMLView.mm:
2246         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Added null
2247         check.
2248
2249 2008-03-25  Brady Eidson  <beidson@apple.com>
2250
2251         Reviewed by Jon Honeycutt's rubberstamp
2252
2253         Fix a leak with the new WebArchive setup
2254
2255         * WebView/WebArchive.mm:
2256         (-[WebArchivePrivate setCoreArchive:]): Deref() the old WebArchive
2257
2258 2008-03-25  Brady Eidson  <beidson@apple.com>
2259
2260         Reviewed by Darin
2261
2262         Removed the concept of "pending archive resources" and the "archive resources delivery timer"
2263         from WebFrameLoaderClient, as those concepts have been pushed into WebCore
2264
2265         * WebCoreSupport/WebFrameLoaderClient.h:
2266         * WebCoreSupport/WebFrameLoaderClient.mm:
2267         (WebFrameLoaderClient::WebFrameLoaderClient):
2268
2269 2008-03-25  Brady Eidson  <beidson@apple.com>
2270
2271         Reviewed by Darin
2272
2273         Remove newly obsolete FrameLoaderClient methods
2274
2275         * WebCoreSupport/WebFrameLoaderClient.h:
2276         * WebCoreSupport/WebFrameLoaderClient.mm:
2277
2278 2008-03-25  Brady Eidson  <beidson@apple.com>
2279
2280         Release build fix
2281
2282         * WebView/WebArchive.mm:
2283         (-[WebArchive subresources]):
2284         (-[WebArchive subframeArchives]):
2285
2286 2008-03-25  Brady Eidson  <beidson@apple.com>
2287
2288         Reviewed by Darin
2289
2290         <rdar://problem/4516169> - Support WebArchives on Windows
2291         And paves the way for many future WebArchive bug fixes and enhancements
2292
2293         This change moves most of the real workhorse code about WebArchives into WebCore.  It maintains 
2294         1-to-1 relationships between a few objects in WebCore and WebKit.  Such as:
2295          * WebArchive <-> LegacyWebArchive
2296          * WebResource <-> ArchiveResource
2297          * WebUnarchivingState <-> ArchiveResourceCollection
2298  
2299         The other biggest changes involve many FrameLoaderClient methods that existed soley for WebArchives 
2300         and now exist in WebCore
2301
2302         * WebCoreSupport/WebFrameLoaderClient.mm:
2303         (WebFrameLoaderClient::clearUnarchivingState): Emptied - to be removed in a followup patch
2304         (WebFrameLoaderClient::finalSetupForReplace):
2305         (WebFrameLoaderClient::setDefersLoading):
2306         (WebFrameLoaderClient::willUseArchive):
2307         (WebFrameLoaderClient::isArchiveLoadPending):
2308         (WebFrameLoaderClient::cancelPendingArchiveLoad):
2309         (WebFrameLoaderClient::clearArchivedResources):
2310         (WebFrameLoaderClient::createFrame):
2311
2312         * WebView/WebArchive.mm:
2313         (+[WebArchivePrivate initialize]):
2314         (-[WebArchivePrivate init]):
2315         (-[WebArchivePrivate initWithCoreArchive:]):
2316         (-[WebArchivePrivate coreArchive]):
2317         (-[WebArchivePrivate setCoreArchive:]):
2318         (-[WebArchivePrivate dealloc]):
2319         (-[WebArchivePrivate finalize]):
2320         (-[WebArchive init]):
2321         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
2322         (-[WebArchive initWithData:]):
2323         (-[WebArchive initWithCoder:]):
2324         (-[WebArchive encodeWithCoder:]):
2325         (-[WebArchive mainResource]):
2326         (-[WebArchive subresources]):
2327         (-[WebArchive subframeArchives]):
2328         (-[WebArchive data]):
2329         (-[WebArchive _initWithCoreLegacyWebArchive:WebCore::]):
2330         (-[WebArchive WebCore::]):
2331         * WebView/WebArchiveInternal.h: Added.
2332
2333         * WebView/WebDataSource.mm:
2334         (-[WebDataSourcePrivate dealloc]):
2335         (-[WebDataSource _addSubframeArchives:]):
2336         (-[WebDataSource _documentFragmentWithArchive:]):
2337         (-[WebDataSource subresourceForURL:]):
2338         (-[WebDataSource addSubresource:]):
2339         * WebView/WebDataSourceInternal.h:
2340
2341         * WebView/WebFrame.mm:
2342         (-[WebFrame loadArchive:]):
2343         * WebView/WebFrameInternal.h:
2344
2345         * WebView/WebHTMLRepresentation.mm:
2346         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
2347
2348         * WebView/WebResource.mm:
2349         (+[WebResourcePrivate initialize]):
2350         (-[WebResourcePrivate init]):
2351         (-[WebResourcePrivate initWithCoreResource:]):
2352         (-[WebResourcePrivate dealloc]):
2353         (-[WebResourcePrivate finalize]):
2354         (-[WebResource initWithCoder:]):
2355         (-[WebResource encodeWithCoder:]):
2356         (-[WebResource data]):
2357         (-[WebResource URL]):
2358         (-[WebResource MIMEType]):
2359         (-[WebResource textEncodingName]):
2360         (-[WebResource frameName]):
2361         (-[WebResource _initWithCoreResource:WebCore::]):
2362         (-[WebResource WebCore::]):
2363         (-[WebResource _ignoreWhenUnarchiving]):
2364         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2365         (-[WebResource _fileWrapperRepresentation]):
2366         (-[WebResource _response]):
2367         (-[WebResource _stringValue]):
2368         * WebView/WebResourceInternal.h: Added.
2369         * WebView/WebResourcePrivate.h:
2370
2371         * WebView/WebUnarchivingState.h: Removed.
2372         * WebView/WebUnarchivingState.m: Removed.
2373
2374 2008-03-24  Oliver Hunt  <oliver@apple.com>
2375
2376         Reviewed by Mark Rowe.
2377
2378         Bug 18030: REGRESSION(r31236): Space bar fails to scroll down page
2379         <http://bugs.webkit.org/show_bug.cgi?id=18030>
2380
2381         Rollout keyDown changes from r31236 -- fix for keyDown behaviour is
2382         tracked by Bug 18057: keyDown incorrectly propagates up the frame tree
2383         <http://bugs.webkit.org/show_bug.cgi?id=18057>
2384
2385         * WebView/WebHTMLView.mm:
2386         (-[WebHTMLView keyDown:]):
2387
2388 2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2389
2390         Reviewed by Maciej, landed by Brady
2391
2392         Bug 3580: iFrames Appear to be Cached
2393         <http://bugs.webkit.org/show_bug.cgi?id=3580>
2394
2395         Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
2396         <http://bugs.webkit.org/show_bug.cgi?id=15486>
2397
2398         Bug 15554: Reload causes <object> to use old data
2399         <http://bugs.webkit.org/show_bug.cgi?id=15554>
2400
2401         If a page is reloaded, a child frame's URL can not be taken from a history item.
2402
2403         * WebView/WebFrame.mm:
2404         (-[WebFrame _loadURL:referrer:intoChild:]):
2405
2406 2008-03-24  Darin Adler  <darin@apple.com>
2407
2408         Reviewed by Beth.
2409
2410         - fix <rdar://problem/5817067> -[WebDataSource unreachableURL] invokes KURL's copy constructor
2411
2412         * History/WebHistoryItem.mm:
2413         (-[WebHistoryItem URL]): Use a reference to avoid making a copy.
2414         * WebView/WebDataSource.mm:
2415         (-[WebDataSource _URL]): Ditto.
2416         (-[WebDataSource unreachableURL]): Ditto.
2417         * WebView/WebHTMLView.mm:
2418         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
2419
2420         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
2421         * History/WebHistory.mm:
2422         * Misc/WebElementDictionary.mm:
2423         * Misc/WebNSAttributedStringExtras.mm:
2424         Remove unneeded imports of KURL.h.
2425
2426 2008-03-24  Brady Eidson  <beidson@apple.com>
2427
2428         Reviewed by Darin's rubberstamp
2429
2430         Rename this file for upcoming work.
2431
2432         * WebView/WebArchive.m: Removed.
2433         * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m.
2434
2435 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
2436
2437         Build fix.
2438
2439         * MigrateHeaders.make: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h.
2440
2441 2008-03-23  Oliver Hunt  <oliver@apple.com>
2442
2443         Reviewed by Maciej.
2444
2445         Bug 17670: Key events may improperly propagate from iframe to parent frame
2446         <http://bugs.webkit.org/show_bug.cgi?id=17670>
2447         Bug 16381: REGRESSION: Shift, command, option, ctrl keys in Gmail Rich Text changes focus
2448         <http://bugs.webkit.org/show_bug.cgi?id=16381>
2449
2450         Prevent the Cocoa event system from propagating key events to the parent WebHTMLView,
2451         as that results in us dispatching the key events for each frame going up the frame
2452         tree.
2453
2454         * WebView/WebHTMLView.mm:
2455         (-[WebHTMLView keyDown:]):
2456         (-[WebHTMLView keyUp:]):
2457         (-[WebHTMLView flagsChanged:]):
2458
2459 2008-03-21  Timothy Hatcher  <timothy@apple.com>
2460
2461         Bug 17980: Regression: Inspector highlighting of webpage not cleared when going to new URL
2462         http://bugs.webkit.org/show_bug.cgi?id=17980
2463
2464         Reviewed by Adam.
2465
2466         The new highlight drawing was not honoring the fade value, so it was
2467         always drawing at full opacity. The animation code didn't match Windows
2468         and the new highlight anyway, so it has been removed. The highlight
2469         how just detaches when it is hidden.
2470
2471         * WebCoreSupport/WebInspectorClient.mm:
2472         (-[WebInspectorWindowController windowShouldClose:]): Call hideHighlight.
2473         (-[WebInspectorWindowController close]): Ditto.
2474         (-[WebInspectorWindowController highlightNode:]): Call attach.
2475         (-[WebInspectorWindowController hideHighlight]): Call detach and release _currentHighlight.
2476         * WebInspector/WebNodeHighlight.h:
2477         * WebInspector/WebNodeHighlight.m:
2478         (-[WebNodeHighlight initWithTargetView:inspectorController:]):
2479         (-[WebNodeHighlight dealloc]): Assert we have no _highlightView.
2480         (-[WebNodeHighlight attach]): Renamed from attachHighlight.
2481         (-[WebNodeHighlight detach]): Renamed from detachHighlight.
2482         (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Renamed from setHolesNeedUpdateInTargetViewRect:.
2483         * WebInspector/WebNodeHighlightView.h:
2484         * WebInspector/WebNodeHighlightView.m:
2485         (-[WebNodeHighlightView setNeedsDisplayInRect:]): Renamed from setHolesNeedUpdateInRect:.
2486
2487 2008-03-20  Mark Rowe  <mrowe@apple.com>
2488
2489         Reviewed by Sam Weinig.
2490
2491         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
2492         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
2493         command-line.
2494
2495         * Configurations/WebKit.xcconfig:
2496
2497 2008-03-20  Adam Roben  <aroben@apple.com>
2498
2499         Make WebNodeHighlightView use InspectorController to do its painting
2500
2501         Reviewed by Tim Hatcher.
2502
2503         * WebCoreSupport/WebInspectorClient.mm:
2504         (-[WebInspectorWindowController highlightNode:]): Pass the
2505         InspectorController to the WebNodeHighlight, and don't call
2506         setHighlightedNode: (which has been removed).
2507         (-[WebInspectorWindowController hideHighlight]): Removed call to
2508         setHighlightedNode:.
2509         * WebInspector/WebNodeHighlight.h:
2510           - Replaced _highlightNode with _inspectorController
2511           - Removed _highlightedNode accessors
2512           - Added -inspectorController method
2513         * WebInspector/WebNodeHighlight.m:
2514         (-[WebNodeHighlight initWithTargetView:inspectorController:]): Now
2515         takes an InspectorController* and stores it in _inspectorController.
2516         (-[WebNodeHighlight dealloc]): Removed code dealing with
2517         _highlightedNode.
2518         (-[WebNodeHighlight inspectorController]): Added.
2519         * WebInspector/WebNodeHighlightView.m: Removed FileInternal category.
2520         (-[WebNodeHighlightView isFlipped]): Added. WebCore expects all
2521         GraphicsContexts to be based on a flipped CGContext, so we have to
2522         specify that this view is flipped.
2523         (-[WebNodeHighlightView drawRect:]): Changed to create a
2524         GraphicsContext and pass it to InspectorController::drawNodeHighlight.
2525
2526 2008-03-18  David Hyatt  <hyatt@apple.com>
2527
2528         Add support for a preference in WebKit that can be used in nightly builds to test full page
2529         zoom.
2530
2531         Reviewed by Antti
2532
2533         * WebView/WebPreferenceKeysPrivate.h:
2534         * WebView/WebView.mm:
2535         (-[WebView setTextSizeMultiplier:]):
2536         (-[WebView canMakeTextSmaller]):
2537         (-[WebView makeTextSmaller:]):
2538         (-[WebView canMakeTextLarger]):
2539         (-[WebView makeTextLarger:]):
2540         (-[WebView canMakeTextStandardSize]):
2541         (-[WebView makeTextStandardSize:]):
2542
2543 2008-03-17  Eric Seidel  <eric@webkit.org>
2544
2545         Reviewed by darin.
2546
2547         Export _NPN_IntFromIdentifier as part of our NPAPI interface
2548
2549         * Plugins/WebNetscapePluginPackage.m:
2550         (-[WebNetscapePluginPackage load]):
2551
2552 2008-03-14  Brady Eidson  <beidson@apple.com>
2553
2554         Reviewed by Brian Dash's rubberstamp
2555
2556         Remove a class declaration for a class that has never existed
2557
2558         * WebView/WebResource.h:
2559
2560 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
2561
2562         Unify concept of enabling the Mac Java bridge.
2563
2564         Reviewed by Darin and Anders.
2565
2566         * Plugins/WebPluginJava.h: Removed unused file.
2567         * WebCoreSupport/WebFrameLoaderClient.h:
2568         (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2569         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
2570         (WebFrameLoaderClient::javaApplet): Ditto.
2571
2572 2008-03-13  Antti Koivisto  <antti@apple.com>
2573
2574         Reviewed by Darin.
2575
2576         * ForwardingHeaders/wtf/Deque.h: Added.
2577
2578 2008-03-13  Anders Carlsson  <andersca@apple.com>
2579
2580         Reviewed by Adam.
2581
2582         Call originalRequest, not initialRequest.
2583         
2584         * WebView/WebDataSource.mm:
2585         (-[WebDataSource initialRequest]):
2586
2587 2008-03-12  Darin Adler  <darin@apple.com>
2588
2589         Reviewed by John Sullivan.
2590
2591         - cleanup after removing the bridge
2592
2593         * DOM/WebDOMOperations.mm:
2594         (-[DOMDocument URLWithAttributeString:]): Call computeURL directly.
2595
2596         * Misc/WebCoreStatistics.mm:
2597         (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly.
2598
2599         * Plugins/WebBaseNetscapePluginView.mm:
2600         (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of
2601         _frameLoader method.
2602         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
2603         Ditto.
2604         * Plugins/WebPluginController.mm:
2605         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto.
2606
2607         * WebCoreSupport/WebFrameLoaderClient.mm:
2608         (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame
2609         method. Without this we could leave a stale frame pointer around.
2610         (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single
2611         caller of the _isMainFrame method.
2612         (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of
2613         _frameLoader method.
2614         (WebFrameLoaderClient::createFrame): Moved code here from _addChild.
2615
2616         * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others
2617         turned out to be unused.
2618         (core): Added overload for DocumentFragment.
2619         (kit): Ditto.
2620         (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and
2621         to FrameLoader with _private->coreFrame->loader().
2622         (-[WebFrame _attachScriptDebugger]): Ditto.
2623         (-[WebFrame _clearCoreFrame]): Added.
2624         (-[WebFrame _updateBackground]): More of the same.
2625         (-[WebFrame _unmarkAllBadGrammar]): Ditto.
2626         (-[WebFrame _unmarkAllMisspellings]): Ditto.
2627         (-[WebFrame _hasSelection]): Ditto.
2628         (-[WebFrame _atMostOneFrameHasSelection]): Ditto.
2629         (-[WebFrame _findFrameWithSelection]): Ditto.
2630         (-[WebFrame _dataSource]): Ditto.
2631         (-[WebFrame _addData:]): Streamlined code a bit.
2632         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
2633         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
2634         (-[WebFrame _isDescendantOfFrame:]): Ditto.
2635         (-[WebFrame _bodyBackgroundColor]): Ditto.
2636         (-[WebFrame _isFrameSet]): Ditto.
2637         (-[WebFrame _firstLayoutDone]): Ditto.
2638         (-[WebFrame _loadType]): Ditto.
2639         (-[WebFrame _isDisplayingStandaloneImage]): Ditto.
2640         (-[WebFrame name]): Ditto.
2641         (-[WebFrame DOMDocument]): Ditto.
2642         (-[WebFrame frameElement]): Ditto.
2643         (-[WebFrame provisionalDataSource]): Ditto.
2644         (-[WebFrame dataSource]): Ditto.
2645         (-[WebFrame loadRequest:]): Ditto.
2646         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto.
2647         (-[WebFrame loadArchive:]): Ditto.
2648         (-[WebFrame stopLoading]): Ditto.
2649         (-[WebFrame reload]): Ditto.
2650         (-[WebFrame findFrameNamed:]): Ditto.
2651         (-[WebFrame parentFrame]): Ditto.
2652         (-[WebFrame childFrames]): Ditto.
2653         (-[WebFrame windowObject]): Ditto.
2654         (-[WebFrame globalContext]): Ditto.
2655
2656         * WebView/WebFrameInternal.h: Added overloads of core and kit.
2657         Removed method declarations.
2658
2659         * WebView/WebHTMLRepresentation.mm:
2660         (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame.
2661         (formElementFromDOMElement): Ditto.
2662         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
2663         (inputElementFromDOMElement): Ditto.
2664         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
2665         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
2666         (-[WebHTMLRepresentation formForElement:]): Ditto.
2667         (-[WebHTMLRepresentation currentForm]): Ditto.
2668         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
2669         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
2670         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
2671
2672         * WebView/WebHTMLView.mm:
2673         (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame.
2674         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
2675         Call createFragmentFromText directly instead of via WebFrame.
2676         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2677         Moved layout calls here from WebFrame.
2678         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
2679         (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection.
2680         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity.
2681         (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange.
2682         (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit.
2683         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
2684         Moved code here from WebFrame.
2685         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
2686         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
2687         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
2688         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
2689         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
2690         (-[WebHTMLView rectsForTextMatches]): Ditto.
2691
2692         * WebView/WebHTMLViewInternal.h: Removed unused method declarations.
2693
2694         * WebView/WebPDFView.mm:
2695         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of
2696         _frameLoader method.
2697
2698         * WebView/WebRenderNode.mm:
2699         (copyRenderNode): Moved code here from WebFrame.
2700         (-[WebRenderNode initWithWebFrameView:]): Ditto.
2701
2702         * WebView/WebResource.mm:
2703         (-[WebResource _stringValue]): Moved code here from WebFrame.
2704
2705         * WebView/WebView.mm:
2706         (-[WebView _close]): Use core function intsead of _frameLoader method.
2707         (-[WebView setCustomTextEncodingName:]): Ditto.
2708         (-[WebView setHostWindow:]): Moved code here from WebFrame.
2709         (aeDescFromJSValue): Moved this here from WebFrame.
2710         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame.
2711
2712 2008-03-12  Darin Adler  <darin@apple.com>
2713
2714         Reviewed by Anders.
2715
2716         - http://bugs.webkit.org/show_bug.cgi?id=17640
2717           eliminate WebCoreFrameBridge
2718
2719         Moved all the code from the bridge into WebFrame. This need not be the final
2720         home of these methods -- they can be moved closer to their callers and improved
2721         further -- but it eliminates the bridge without requiring a rewrite of the code.
2722         It's a fairly mechanical process (just adding underscores to method names really).
2723
2724         There's even a chance that some of the methods are unused. Those we can remove
2725         after checking if that's so.
2726
2727         * DOM/WebDOMOperations.mm:
2728         (-[DOMNode markupString]): Use WebFrame rather than bridge.
2729         (-[DOMDocument webFrame]): Changed to use the core and kit functions
2730         instead of using the bridge.
2731         (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
2732         (-[DOMRange markupString]): Ditto.
2733         * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.
2734
2735         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
2736         * History/WebHistoryItem.mm: Ditto.
2737
2738         * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
2739         * Misc/WebCoreStatistics.mm:
2740         (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.
2741
2742         * Misc/WebElementDictionary.mm: Removed unneeded import.
2743
2744         * Misc/WebKitStatistics.m:
2745         (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
2746         * Misc/WebKitStatisticsPrivate.h: Ditto.
2747
2748         * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
2749         * Misc/WebNSPasteboardExtras.mm: Ditto.
2750
2751         * Plugins/WebBaseNetscapePluginView.mm:
2752         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
2753         rather than bridge.
2754
2755         * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
2756         * Plugins/WebNetscapePluginStream.mm: Ditto.
2757
2758         * Plugins/WebPluginContainerCheck.mm:
2759         (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
2760         bridge to get to the WebCore::Frame.
2761
2762         * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
2763         * Plugins/WebPluginController.mm:
2764         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
2765         rather than bridge.
2766
2767         * WebCoreSupport/WebEditorClient.mm:
2768         (selectorForKeyEvent): Tweaked comment.
2769
2770         * WebCoreSupport/WebFrameBridge.h: Removed.
2771         * WebCoreSupport/WebFrameBridge.mm: Removed.
2772
2773         * WebCoreSupport/WebFrameLoaderClient.mm:
2774         (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
2775         (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
2776         I could remove this function entirely, but it looks like the Qt port is using it.
2777
2778         * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.
2779
2780         * WebView/WebArchiver.mm:
2781         (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
2782         (+[WebArchiver archiveNode:]): Ditto.
2783         (+[WebArchiver archiveSelectionInFrame:]): Ditto.
2784
2785         * WebView/WebDataSource.mm:
2786         (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
2787         (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
2788         (-[WebDataSource subresources]): Ditto.
2789         (-[WebDataSource subresourceForURL:]): Ditto.
2790
2791         * WebView/WebDataSourceInternal.h: Removed _bridge method.
2792
2793         * WebView/WebFrame.mm:
2794         (-[WebFramePrivate dealloc]): Removed code to release the bridge.
2795         (core): Go directly to the core frame, not via the bridge.
2796         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
2797         Remove the code to deal with the bridge.
2798         (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
2799         shouldCreateRenderers flag, formerly on the bridge.
2800         (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
2801         (aeDescFromJSValue): Moved here from bridge.
2802         (-[WebFrame _domain]): Ditto.
2803         (-[WebFrame _addData:]): Ditto.
2804         (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
2805         (-[WebFrame _nodesFromList:]): Ditto.
2806         (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
2807         (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
2808         (-[WebFrame _selectedString]): Ditto.
2809         (-[WebFrame _stringForRange:]): Ditto.
2810         (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
2811         (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
2812         (-[WebFrame _sendScrollEvent]): Ditto.
2813         (-[WebFrame _drawRect:]): Ditto.
2814         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
2815         (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
2816         (-[WebFrame _copyRenderNode:copier:]): Ditto.
2817         (-[WebFrame _copyRenderTree:]): Ditto.
2818         (inputElementFromDOMElement): Ditto.
2819         (formElementFromDOMElement): Ditto.
2820         (-[WebFrame _elementWithName:inForm:]): Ditto.
2821         (-[WebFrame _elementDoesAutoComplete:]): Ditto.
2822         (-[WebFrame _elementIsPassword:]): Ditto.
2823         (-[WebFrame _formForElement:]): Ditto.
2824         (-[WebFrame _currentForm]): Ditto.
2825         (-[WebFrame _controlsInForm:]): Ditto.
2826         (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
2827         (-[WebFrame _matchLabels:againstElement:]): Ditto.
2828         (-[WebFrame _URLWithAttributeString:]): Ditto.
2829         (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
2830         (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
2831         (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
2832         (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
2833         (-[WebFrame _unmarkAllTextMatches]): Ditto.
2834         (-[WebFrame _rectsForTextMatches]): Ditto.
2835         (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
2836         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
2837         (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
2838         (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
2839         (-[WebFrame _firstRectForDOMRange:]): Ditto.
2840         (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
2841         (-[WebFrame _baseURL]): Ditto.
2842         (-[WebFrame _stringWithData:]): Ditto.
2843         (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
2844         (-[WebFrame _needsLayout]): Ditto.
2845         (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
2846         (-[WebFrame _accessibilityTree]): Ditto.
2847         (-[WebFrame _setBaseBackgroundColor:]): Ditto.
2848         (-[WebFrame _setDrawsBackground:]): Ditto.
2849         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
2850         Ditto.
2851         (-[WebFrame _selectionGranularity]): Ditto.
2852         (-[WebFrame _convertToNSRange:]): Ditto.
2853         (-[WebFrame _convertToDOMRange:]): Ditto.
2854         (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
2855         (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
2856         (-[WebFrame _markDOMRange]): Ditto.
2857         (-[WebFrame _markedTextNSRange]): Ditto.
2858         (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
2859         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
2860         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
2861         (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
2862         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
2863         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
2864         (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
2865         (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
2866         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
2867         (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
2868         (-[WebFrame _visiblePositionForPoint:]): Ditto.
2869         (-[WebFrame _characterRangeAtPoint:]): Ditto.
2870         (-[WebFrame _typingStyle]): Ditto.
2871         (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
2872         (-[WebFrame _fontForSelection:]): Ditto.
2873         (-[WebFrame _dragSourceMovedTo:]): Ditto.
2874         (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
2875         (-[WebFrame _getData:andResponse:forURL:]): Ditto.
2876         (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
2877         (-[WebFrame _canProvideDocumentSource]): Ditto.
2878         (-[WebFrame _canSaveAsWebArchive]): Ditto.
2879         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
2880         (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
2881         function. Couldn't just keep the bridge method because this was already here with the same name.
2882         (-[WebFrame _selectedNSRange]): Ditto.
2883         (-[WebFrame _selectNSRange:]): Ditto.
2884         (-[WebFrame dealloc]): Remove bridge-related code.
2885         (-[WebFrame finalize]): Ditto.
2886
2887         * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
2888         Removed the bridge parameter from the init method. Removed the #if blocks that
2889         tried to make this header work in non-C++ ObjC files -- they were broken and unused.
2890         Removed the _bridge method.
2891
2892         * WebView/WebFrameView.mm: Removed the _bridge method.
2893
2894         * WebView/WebHTMLRepresentation.mm:
2895         (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
2896         field.
2897         (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
2898         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
2899         (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
2900         (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
2901         (-[WebHTMLRepresentation documentSource]): Ditto.
2902         (-[WebHTMLRepresentation DOMDocument]): Ditto.
2903         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
2904         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
2905         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
2906         (-[WebHTMLRepresentation formForElement:]): Ditto.
2907         (-[WebHTMLRepresentation currentForm]): Ditto.
2908         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
2909         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
2910         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
2911
2912         * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.
2913
2914         * WebView/WebHTMLView.mm:
2915         (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
2916         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
2917         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
2918         (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
2919         (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
2920         (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
2921         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
2922         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
2923         (-[WebHTMLView drawSingleRect:]): Ditto.
2924         (-[WebHTMLView draggedImage:movedTo:]): Ditto.
2925         (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
2926         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
2927         (-[WebHTMLView knowsPageRange:]): Ditto.
2928         (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
2929         (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
2930         (-[WebHTMLView accessibilityHitTest:]): Ditto.
2931         (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
2932         (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
2933         (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
2934         (-[WebHTMLView _changeSpellingToWord:]): Ditto.
2935         (-[WebHTMLView startSpeaking:]): Ditto.
2936         (-[WebHTMLView _updateFontPanel]): Ditto.
2937         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
2938         (-[WebHTMLView _layoutIfNeeded]): Ditto.
2939         (-[WebHTMLView characterIndexForPoint:]): Ditto.
2940         (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
2941         (-[WebHTMLView selectedRange]): Ditto.
2942         (-[WebHTMLView markedRange]): Ditto.
2943         (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
2944         (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
2945         (-[WebHTMLView insertText:]): Ditto.
2946         (-[WebTextCompleteController _insertMatch:]): Ditto.
2947         (-[WebTextCompleteController doCompletion]): Ditto.
2948         (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
2949         (-[WebHTMLView string]): Ditto.
2950         (-[WebHTMLView selectedString]): Ditto.
2951         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
2952         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
2953         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
2954         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
2955         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
2956         (-[WebHTMLView rectsForTextMatches]): Ditto.
2957         * WebView/WebRenderNode.mm:
2958         (-[WebRenderNode initWithWebFrameView:]): Ditto.
2959         * WebView/WebResource.mm:
2960         (-[WebResource _stringValue]): Ditto.
2961
2962         * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.
2963
2964         * WebView/WebView.mm:
2965         (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
2966         (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
2967         (-[WebView _setInViewSourceMode:]): Ditto.
2968         (-[WebView _inViewSourceMode]): Ditto.
2969         (-[WebView _executeCoreCommandByName:value:]): Ditto.
2970         (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
2971         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
2972         (-[WebView scrollDOMRangeToVisible:]): Ditto.
2973         (-[WebView setSelectedDOMRange:affinity:]): Ditto.
2974         (-[WebView setEditable:]): Ditto.
2975         (-[WebView setTypingStyle:]): Ditto.
2976         (-[WebView typingStyle]): Ditto.
2977         (-[WebView replaceSelectionWithNode:]): Ditto.
2978         (-[WebView replaceSelectionWithText:]): Ditto.
2979         (-[WebView replaceSelectionWithMarkupString:]): Ditto.
2980         (-[WebView replaceSelectionWithArchive:]): Ditto.
2981         (-[WebView _insertNewlineInQuotedContent]): Ditto.
2982         (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.
2983
2984 2008-03-12  David Hyatt  <hyatt@apple.com>
2985
2986         Make the zoom factor a float and not a percent.
2987
2988         Reviewed by antti
2989
2990         * WebView/WebView.mm:
2991         (-[WebView _setZoomMultiplier:isTextOnly:]):
2992
2993 2008-03-11  David Hyatt  <hyatt@apple.com>
2994
2995         This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom).
2996         New API is added that is parallel to the text zoom public API.  You can get/set a pageSizeMultiplier and you
2997         can zoom the page in, out or reset it to the standard size.
2998
2999         In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode
3000         and set the common zoom factor.  In other words you can't combine text zoom and page zoom.  One will always
3001         win.
3002
3003         Reviewed by Tim H.
3004
3005         * WebCoreSupport/WebFrameBridge.mm:
3006         (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
3007         * WebView/WebDocumentInternal.h:
3008         * WebView/WebHTMLView.mm:
3009         (-[WebHTMLView viewDidMoveToSuperview]):
3010         * WebView/WebPDFView.h:
3011         * WebView/WebPDFView.mm:
3012         (-[WebPDFView _zoomOut:]):
3013         (-[WebPDFView _zoomIn:]):
3014         (-[WebPDFView _resetZoom:]):
3015         (-[WebPDFView _canZoomOut]):
3016         (-[WebPDFView _canZoomIn]):
3017         (-[WebPDFView _canResetZoom]):
3018         * WebView/WebView.mm:
3019         (-[WebViewPrivate init]):
3020         (-[WebView setTextSizeMultiplier:]):
3021         (-[WebView textSizeMultiplier]):
3022         (-[WebView _setZoomMultiplier:isTextOnly:]):
3023         (-[WebView _zoomMultiplier:]):
3024         (-[WebView _realZoomMultiplier]):
3025         (-[WebView _realZoomMultiplierIsTextOnly]):
3026         (-[WebView _canZoomOut:]):
3027         (-[WebView _canZoomIn:]):
3028         (-[WebView _zoomOut:isTextOnly:]):
3029         (-[WebView _zoomIn:isTextOnly:]):
3030         (-[WebView _canResetZoom:]):
3031         (-[WebView _resetZoom:isTextOnly:]):
3032         (-[WebView canMakeTextSmaller]):
3033         (-[WebView makeTextSmaller:]):
3034         (-[WebView canMakeTextLarger]):
3035         (-[WebView makeTextLarger:]):
3036         (-[WebView canMakeTextStandardSize]):
3037         (-[WebView makeTextStandardSize:]):
3038         (-[WebView setPageSizeMultiplier:]):
3039         (-[WebView pageSizeMultiplier]):
3040         (-[WebView canZoomPageIn]):
3041         (-[WebView zoomPageIn:]):
3042         (-[WebView canZoomPageOut]):
3043         (-[WebView zoomPageOut:]):
3044         (-[WebView canResetPageZoom]):
3045         (-[WebView resetPageZoom:]):
3046         (-[WebView _searchWithSpotlightFromMenu:]):
3047         * WebView/WebViewInternal.h:
3048         * WebView/WebViewPrivate.h:
3049
3050 2008-03-12  Dan Bernstein  <mitz@apple.com>
3051
3052         Reviewed by Darin Adler and Sam Weinig.
3053
3054         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
3055
3056         * WebCoreSupport/WebSystemInterface.m:
3057         (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and
3058         WKGetNSFontATSUFontId Tiger-only.
3059
3060 2008-03-12  Darin Adler  <darin@apple.com>
3061
3062         - fix http://bugs.webkit.org/show_bug.cgi?id=17794
3063           REGRESSION (r30980): 23 tests hanging on the Mac buildbot
3064
3065         * WebView/WebFrame.mm:
3066         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set
3067         up pointer from the bridge to the frame. (My next check-in removes the bridge
3068         entirely, but we need this until then.)
3069
3070 2008-03-11  Darin Adler  <darin@apple.com>
3071
3072         Reviewed by Sam.
3073
3074         - remove all bridge-related things from WebCore except the bridge itself
3075
3076         * DOM/WebDOMOperations.mm:
3077         (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.
3078
3079         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.
3080
3081         * Plugins/WebPluginController.mm: Ditto.
3082
3083         * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
3084         init and close methods. Added a setWebFrame: method.
3085
3086         * WebCoreSupport/WebFrameBridge.mm:
3087         (-[WebFrameBridge setWebFrame:]): Added.
3088
3089         * WebCoreSupport/WebFrameLoaderClient.mm:
3090         (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
3091         (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
3092         bridge here. Soon we will be able to remove this entirely!
3093         (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
3094         into WebFrame from the bridge.
3095
3096         * WebView/WebFrame.mm:
3097         (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
3098         now owned by the frame.
3099         (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
3100         debugger under GC without this!
3101         (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
3102         use WebFrameLoaderClient instead of the bridge.
3103         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
3104         This is code that used to live in the bridge's init function.
3105         (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
3106         (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
3107         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
3108         the WebView is now the bridge's owner.
3109         (-[WebFrame _updateBackground]): Changed this one call site that was calling the
3110         WebCore::Frame::bridge function directly to use the kit function instead.
3111         (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
3112         This code won't last long -- we're eliminating the bridge soon.
3113         (-[WebFrame finalize]): Ditto.
3114
3115         * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
3116         for creating frames.
3117
3118         * WebView/WebView.mm:
3119         (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
3120         the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
3121         where we have to allocate a WebFrameBridge and then immediately release it.
3122
3123 2008-03-11  Darin Adler  <darin@apple.com>
3124
3125         Reviewed by Anders.
3126
3127         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
3128
3129         * WebCoreSupport/WebFrameLoaderClient.mm:
3130         (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
3131         to setView. A couple lines later, there is a call to _install, which sets the
3132         view to the scroll view.
3133
3134         * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.
3135
3136         * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
3137         this file, since it's used by Safari.
3138         * WebView/WebDynamicScrollBarsViewInternal.h: Added.
3139         * WebView/WebDynamicScrollBarsView.m:
3140         (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
3141         (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
3142         (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
3143         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
3144         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
3145         (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
3146         (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
3147         (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
3148         (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
3149         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
3150         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
3151         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
3152         (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
3153         (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
3154         (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.
3155
3156         * WebView/WebFrameView.mm:
3157         (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.
3158
3159         * WebView/WebView.mm:
3160         (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
3161         (-[WebView alwaysShowVerticalScroller]): Ditto.
3162         (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
3163         (-[WebView alwaysShowHorizontalScroller]): Ditto.
3164
3165 2008-03-11  Darin Adler  <darin@apple.com>
3166
3167         Reviewed by Sam.
3168
3169         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
3170
3171         * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace
3172         bridge methods.
3173         * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS
3174         to recently-created functions.
3175         (WebChromeClient::firstResponder): Moved code here from the bridge.
3176         (WebChromeClient::makeFirstResponder): Ditto.
3177         (WebChromeClient::runOpenPanel): Ditto.
3178         (WebChromeClient::willPopUpMenu): Ditto.
3179
3180         * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left
3181         is related to creating the bridge and connecting it to WebCore, which will
3182         go next when I eliminate use of the bridge to get to/from the Frame*.
3183         * WebCoreSupport/WebFrameBridge.mm:
3184         (-[WebFrameBridge close]): Moved the code to track the bridge count here
3185         instead of the dealloc and finalize methods.
3186
3187 2008-03-11  Darin Adler  <darin@apple.com>
3188
3189         Reviewed by Mitz.
3190
3191         - update code affected by Range changes
3192
3193         * Misc/WebNSAttributedStringExtras.mm:
3194         (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes.
3195         * WebView/WebHTMLRepresentation.mm:
3196         (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
3197         Use Range::create.
3198         * WebView/WebHTMLView.mm:
3199         (-[WebHTMLView attributedString]): Ditto.
3200
3201 2008-03-10  Darin Adler  <darin@apple.com>
3202
3203         Reviewed by Sam.
3204
3205         - eliminate keyboard UI mode method from WebCoreFrameBridge
3206
3207         * WebCoreSupport/WebChromeClient.h: Added keyboardUIMode function.
3208         * WebCoreSupport/WebChromeClient.mm:
3209         (WebChromeClient::keyboardUIMode): Ditto. Calls WebView.
3210         * WebCoreSupport/WebFrameBridge.h: Removed unused things, including the
3211         fields for keyboard UI mode.
3212         * WebCoreSupport/WebFrameBridge.mm:
3213         (-[WebFrameBridge dealloc]): Removed unneeded code; eliminated the fini
3214         method.
3215         (-[WebFrameBridge finalize]): Ditto.
3216         * WebView/WebView.mm: Moved the keyboard mode code in here.
3217         (-[WebView _close]): Remove observer from the distributed notification
3218         center as well as the normal one.
3219         (-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved
3220         here from the bridge.
3221         (-[WebView _keyboardUIMode]): Ditto.
3222         * WebView/WebViewInternal.h: Added _keyboardUIMode method.
3223
3224 2008-03-10  Darin Adler  <darin@apple.com>
3225
3226         Reviewed by Sam.
3227
3228         - eliminate Java applet methods from WebCoreFrameBridge
3229
3230         * WebCoreSupport/WebChromeClient.mm: Removed unneeded headers and declarations.
3231         * WebCoreSupport/WebFrameBridge.mm: Ditto. Also removed unneeded methods, including
3232         the ones that load Java applets.
3233         * WebCoreSupport/WebFrameLoaderClient.h: Added javaApplet function.
3234         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
3235
3236 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
3237
3238         Reviewed by Darin.
3239
3240         Done with Lars.
3241
3242         Simplified WebViewFactory's refreshPlugins method to only refresh the
3243         plugins and not reload the frames anymore since that's now done in a
3244         platform independent manner by WebCore::Page.
3245
3246         Also removed the now unused pluginNameForMIMEType and
3247         pluginSupportsMIMEType methods.
3248
3249         * WebCoreSupport/WebViewFactory.mm:
3250         * WebView/WebFrame.mm:
3251         * WebView/WebFrameInternal.h:
3252         * WebView/WebView.mm:
3253
3254 2008-03-08  Mark Rowe  <mrowe@apple.com>
3255
3256         Reviewed by Darin Adler.
3257
3258         Fix 64-bit build with GCC 4.2.
3259
3260         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.
3261         * DefaultDelegates/WebDefaultUIDelegate.m: Ditto.
3262         * History/WebHistoryItem.mm: Ditto.
3263         * Misc/WebElementDictionary.mm: Ditto.
3264         * WebCoreSupport/WebFrameLoaderClient.mm:
3265         (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
3266         variable being unused in 64-bit.
3267         * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.
3268         * WebView/WebHTMLView.mm:
3269         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
3270         (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.
3271
3272 2008-03-08  Darin Adler  <darin@apple.com>
3273
3274         Reviewed by Adele.
3275
3276         - eliminate custom highlight methods from WebCoreFrameBridge
3277
3278         * WebCoreSupport/WebChromeClient.h: Added custom highlight functions.
3279         * WebCoreSupport/WebChromeClient.mm:
3280         (WebChromeClient::customHighlightRect): Moved code here from bridge.
3281         (WebChromeClient::paintCustomHighlight): Ditto.
3282         * WebCoreSupport/WebFrameBridge.mm: Removed code here.
3283
3284 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
3285
3286         Unify concept of enabling Netscape Plug-in API (NPAPI).
3287
3288         Reviewed by Darin.
3289
3290         * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
3291
3292         * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
3293         ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
3294
3295         * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
3296         #if ENABLE(NETSCAPE_PLUGIN_API).
3297         * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
3298         * Plugins/WebBaseNetscapePluginView.h: Ditto.
3299         * Plugins/WebBaseNetscapePluginView.mm: Ditto.
3300         * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
3301         * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
3302         * Plugins/WebBasePluginPackage.h: Ditto.
3303         * Plugins/WebBasePluginPackage.m: Ditto.
3304         (+[WebBasePluginPackage pluginWithPath:]):
3305         * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
3306         * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
3307         * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
3308         * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
3309         * Plugins/WebNetscapePluginPackage.h: Ditto.
3310         * Plugins/WebNetscapePluginPackage.m: Ditto.
3311         * Plugins/WebNetscapePluginStream.h: Ditto.
3312         * Plugins/WebNetscapePluginStream.mm: Ditto.
3313         * Plugins/WebPluginDatabase.m: Ditto.
3314         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
3315         * Plugins/npapi.m: Ditto.
3316         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
3317         (WebFrameLoaderClient::objectContentType):
3318         (WebFrameLoaderClient::createPlugin):
3319         * WebView/WebHTMLView.mm: Ditto.
3320         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
3321         * WebView/WebHTMLViewInternal.h: Ditto.
3322
3323         * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
3324         #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
3325         category to (WebInternal) category so we don't expose the ENABLE() macro
3326         from the private header.
3327         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
3328         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
3329         * WebView/WebFrameInternal.h: Ditto.
3330         * WebView/WebFramePrivate.h: Ditto.
3331
3332 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
3333
3334         Reviewed by Darin.
3335
3336         <rdar://problem/5579292> REGRESSION: (safari 2-3): "Default default" encoding for Korean
3337         changed from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
3338
3339         * WebView/WebPreferences.m:
3340         (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Make encoding name match
3341         the one used in Safari.
3342
3343 2008-03-07  Mark Rowe  <mrowe@apple.com>
3344
3345         Reviewed by Oliver Hunt.
3346
3347         Fix WebKit build with GCC 4.2.
3348
3349         * Plugins/WebBaseNetscapePluginView.mm: Use the correct return type in method signature.
3350
3351 2008-03-07  Darin Adler  <darin@apple.com>
3352
3353         Reviewed by Adam.
3354
3355         - eliminated WebCoreFrameBridge runOpenPanel
3356
3357         * WebCoreSupport/WebChromeClient.h: Added runOpenPanel.
3358         * WebCoreSupport/WebChromeClient.mm:
3359         (WebChromeClient::runOpenPanel): Added.
3360         (-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the
3361         FileChooser so it can get a result from the UI delegate.
3362         (-[WebOpenPanelResultListener dealloc]): Added.
3363         (-[WebOpenPanelResultListener finalize]): Added.
3364         (-[WebOpenPanelResultListener cancel]): Added.
3365         (-[WebOpenPanelResultListener chooseFilename:]): Added.
3366
3367 2008-03-06  Darin Adler  <darin@apple.com>
3368
3369         Reviewed by Mitz.
3370
3371         - fix regression test failures from the visited-link change
3372
3373         * History/WebHistory.mm:
3374         (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
3375         to turn off visited links if there is no history object. Also call
3376         removeAllVisitedLinks so we can start over from scratch with the new history.
3377
3378 2008-03-06  Dan Bernstein  <mitz@apple.com>
3379
3380         Reviewed by Darin Adler.
3381
3382         - fix a regression from r30741: a crash under
3383           WebFrameLoaderClient::createPlugin() when showing a Mail message with
3384           an attachment
3385
3386         * WebCoreSupport/WebFrameLoaderClient.mm:
3387         (WebFrameLoaderClient::createPlugin):
3388
3389 2008-03-06  Darin Adler  <darin@apple.com>
3390
3391         - fix Tiger build
3392
3393         * History/WebHistory.mm: Added include of WebTypesInternal.h.
3394
3395 2008-03-06  Darin Adler  <darin@apple.com>
3396
3397         - fix Release build
3398
3399         * History/WebHistory.mm:
3400         (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]): Removed underscore.
3401         (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): Added #if.
3402         (-[WebHistoryPrivate saveToURL:error:]): Ditto.
3403
3404 2008-03-06  Darin Adler  <darin@apple.com>
3405
3406         Reviewed by Mitz.
3407
3408         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
3409           REGRESSION: iframes are added to Safari's History menu
3410           by separating the visited link machinery from global history
3411
3412         * History/WebHistory.mm: Moved WebHistoryPrivate inside this file.
3413         (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this
3414         method name, since it's on a private object.
3415         (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the
3416         PageGroup::removeAllVisitedLinks function if the last URL was removed.
3417         (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this
3418         method name, since it's on a private object.
3419         (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks.
3420         (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this
3421         method name, since it's on a private object.
3422         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
3423         Ditto.
3424         (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this
3425         to correctly return the error by using the newer version of writeToURL: and
3426         removed the FIXME about that.
3427         (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink
3428         for every link in the history.
3429         (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now.
3430         (-[WebHistory addItem:]): Moved into the WebPrivate category.
3431         (-[WebHistory addItemForURL:]): Ditto.
3432         (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we
3433         create an item and already know its title.
3434         (-[WebHistory ageLimitDate]): Moved into the WebPrivate category.
3435         (-[WebHistory containsItemForURLString:]): Ditto.
3436         (-[WebHistory removeItem:]): Ditto.
3437         (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto.
3438         (-[WebHistory _itemForURLString:]): Ditto.
3439         (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit.
3440
3441         * History/WebHistoryInternal.h: Added.
3442         * History/WebHistoryItemInternal.h: Tweaked formatting and includes.
3443         * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header.
3444         Also reorganized what was left behind.
3445
3446         * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.
3447         * WebCoreSupport/WebChromeClient.mm:
3448         (WebChromeClient::populateVisitedLinks): Added a call to the new
3449         -[WebHistory _addVisitedLinksToPageGroup:] method.
3450
3451         * WebCoreSupport/WebFrameLoaderClient.mm:
3452         (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new
3453         -[WebHistory _addItemForURL:title:] method.
3454
3455 2008-03-05  Adam Roben  <aroben@apple.com>
3456
3457         Rename WebCoreScriptDebuggerImp.{h,mm} to WebScriptDebugger.{h,mm}
3458
3459         Reviewed by Kevin M.
3460
3461         * WebView/WebFrame.mm:
3462         * WebView/WebScriptDebugDelegate.mm:
3463         * WebView/WebScriptDebugger.h: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.h.
3464         * WebView/WebScriptDebugger.mm: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.mm.
3465
3466 2008-03-05  Adam Roben  <aroben@apple.com>
3467
3468         Rename WebCoreScriptDebuggerImp to WebScriptDebugger
3469
3470         Reviewed by Kevin M.
3471
3472         * WebView/WebCoreScriptDebuggerImp.h:
3473         * WebView/WebCoreScriptDebuggerImp.mm:
3474         * WebView/WebFrame.mm:
3475         (-[WebFrame _attachScriptDebugger]):
3476         * WebView/WebFrameInternal.h:
3477
3478 2008-03-05  Adam Roben  <aroben@apple.com>
3479
3480         Remove WebScriptDebugger
3481
3482         Uses of WebScriptDebugger have been replaced with
3483         WebCoreScriptDebuggerImp.
3484
3485         Reviewed by Kevin M.
3486
3487         * WebView/WebFrame.mm:
3488         (-[WebFramePrivate dealloc]): Use delete instead of release since
3489         WebCoreScriptDebuggerImp is a C++ class.
3490         (-[WebFrame _attachScriptDebugger]): Updated to use early returns and
3491         WebCoreScriptDebuggerImp.
3492         (-[WebFrame _detachScriptDebugger]): Ditto.
3493         * WebView/WebFrameInternal.h:
3494         * WebView/WebScriptDebugDelegate.mm: Removed WebScriptDebugger
3495         * WebView/WebScriptDebugDelegatePrivate.h: Removed.
3496         * WebView/WebView.mm:
3497
3498 2008-03-05  Adam Roben  <aroben@apple.com>
3499
3500         Remove -webFrame and -globalObject from WebScriptDebugger
3501
3502         WebCoreScriptDebuggerImp is now unaware of WebScriptDebugger
3503
3504         Reviewed by Kevin M.
3505
3506         * WebView/WebCoreScriptDebuggerImp.h: Removed WebScriptDebugger*
3507         parameter to the constructor.
3508         * WebView/WebCoreScriptDebuggerImp.mm:
3509         (toWebFrame): Added.
3510         (WebCoreScriptDebuggerImp::sourceParsed): Call toWebFrame.
3511         (WebCoreScriptDebuggerImp::callEvent): Ditto, and get the Frame's
3512         WindowScriptObject ourselves instead of asking WebScriptDebugger for
3513         it.
3514         (WebCoreScriptDebuggerImp::atStatement): Call toWebFrame.
3515         (WebCoreScriptDebuggerImp::returnEvent): Ditto.
3516         (WebCoreScriptDebuggerImp::exception): Ditto.
3517         * WebView/WebScriptDebugDelegate.mm:
3518         (-[WebScriptDebugger initWithWebFrame:]): Updated for change to
3519         WebScriptDebuggerImp's constructor.
3520         * WebView/WebScriptDebugDelegatePrivate.h: Removed
3521         -webFrame/-globalObject.
3522
3523 2008-03-05  Adam Roben  <aroben@apple.com>
3524
3525         Remove -enterFrame: and -leaveFrame from WebScriptDebugger
3526
3527         Reviewed by Kevin M.
3528
3529         * WebView/WebCoreScriptDebuggerImp.h: Changed to store m_topCallFrame
3530         in a RetainPtr, now that WebCoreScriptDebuggerImp is in charge of its
3531         lifetime.
3532         * WebView/WebCoreScriptDebuggerImp.mm:
3533           - Added declaration of -[WebScriptCallFrame
3534             _initWithGlobalObject:caller:state:].
3535           - Changed most uses of m_topCallFrame to m_topCallFrame.get()
3536         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed
3537         now-unnecessary initialization of m_topCallFrame.
3538         (WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame:
3539         with its implementation. The one difference between this
3540         implementation and the old enterFrame: method is that we don't hand
3541         our reference to m_topCallFrame to _initWithGlobalObject: -- that
3542         method must now retain the passed-in WebScriptCallFrame manually.
3543         (WebCoreScriptDebuggerImp::atStatement):
3544         (WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame
3545         with its implementation.
3546         (WebCoreScriptDebuggerImp::exception):
3547         * WebView/WebScriptDebugDelegate.mm: Removed declaration of
3548         -[WebScriptCallFrame _initWithGlobalObject:caller:state:].
3549         (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Changed
3550         to retain the passed-in caller.
3551         * WebView/WebScriptDebugDelegatePrivate.h:
3552           - Removed _current ivar
3553           - Removed enterFrame:/leaveFrame declarations.
3554
3555 2008-03-05  Adam Roben  <aroben@apple.com>
3556
3557         Remove -parsedSource: from WebScriptDebugger
3558
3559         Reviewed by Kevin M.
3560
3561         * WebView/WebCoreScriptDebuggerImp.mm:
3562         (WebCoreScriptDebuggerImp::sourceParsed): Moved code here from
3563         -[WebScriptDebugger parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]
3564         * WebView/WebScriptDebugDelegate.mm: Removed -parsedSource:.
3565         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
3566
3567 2008-03-05  Adam Roben  <aroben@apple.com>
3568
3569         Remove -enteredFrame:, -leavingFrame:, and -exceptionRaised: from WebScriptDebugger
3570
3571         Reviewed by Kevin M.